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    /// returns the type of the current state
6104    pub async fn current_type(&self) -> Result<String, DaggerError> {
6105        let query = self.selection.select("currentType");
6106        query.execute(self.graphql_client.clone()).await
6107    }
6108    /// Retrieve a the current value in the LLM environment, of type Directory
6109    pub fn directory(&self) -> Directory {
6110        let query = self.selection.select("directory");
6111        Directory {
6112            proc: self.proc.clone(),
6113            selection: query,
6114            graphql_client: self.graphql_client.clone(),
6115        }
6116    }
6117    /// Retrieve a the current value in the LLM environment, of type EnumTypeDef
6118    pub fn enum_type_def(&self) -> EnumTypeDef {
6119        let query = self.selection.select("enumTypeDef");
6120        EnumTypeDef {
6121            proc: self.proc.clone(),
6122            selection: query,
6123            graphql_client: self.graphql_client.clone(),
6124        }
6125    }
6126    /// Retrieve a the current value in the LLM environment, of type EnumValueTypeDef
6127    pub fn enum_value_type_def(&self) -> EnumValueTypeDef {
6128        let query = self.selection.select("enumValueTypeDef");
6129        EnumValueTypeDef {
6130            proc: self.proc.clone(),
6131            selection: query,
6132            graphql_client: self.graphql_client.clone(),
6133        }
6134    }
6135    /// Retrieve a the current value in the LLM environment, of type Error
6136    pub fn error(&self) -> Error {
6137        let query = self.selection.select("error");
6138        Error {
6139            proc: self.proc.clone(),
6140            selection: query,
6141            graphql_client: self.graphql_client.clone(),
6142        }
6143    }
6144    /// Retrieve a the current value in the LLM environment, of type ErrorValue
6145    pub fn error_value(&self) -> ErrorValue {
6146        let query = self.selection.select("errorValue");
6147        ErrorValue {
6148            proc: self.proc.clone(),
6149            selection: query,
6150            graphql_client: self.graphql_client.clone(),
6151        }
6152    }
6153    /// Retrieve a the current value in the LLM environment, of type FieldTypeDef
6154    pub fn field_type_def(&self) -> FieldTypeDef {
6155        let query = self.selection.select("fieldTypeDef");
6156        FieldTypeDef {
6157            proc: self.proc.clone(),
6158            selection: query,
6159            graphql_client: self.graphql_client.clone(),
6160        }
6161    }
6162    /// Retrieve a the current value in the LLM environment, of type File
6163    pub fn file(&self) -> File {
6164        let query = self.selection.select("file");
6165        File {
6166            proc: self.proc.clone(),
6167            selection: query,
6168            graphql_client: self.graphql_client.clone(),
6169        }
6170    }
6171    /// Retrieve a the current value in the LLM environment, of type Function
6172    pub fn function(&self) -> Function {
6173        let query = self.selection.select("function");
6174        Function {
6175            proc: self.proc.clone(),
6176            selection: query,
6177            graphql_client: self.graphql_client.clone(),
6178        }
6179    }
6180    /// Retrieve a the current value in the LLM environment, of type FunctionArg
6181    pub fn function_arg(&self) -> FunctionArg {
6182        let query = self.selection.select("functionArg");
6183        FunctionArg {
6184            proc: self.proc.clone(),
6185            selection: query,
6186            graphql_client: self.graphql_client.clone(),
6187        }
6188    }
6189    /// Retrieve a the current value in the LLM environment, of type FunctionCall
6190    pub fn function_call(&self) -> FunctionCall {
6191        let query = self.selection.select("functionCall");
6192        FunctionCall {
6193            proc: self.proc.clone(),
6194            selection: query,
6195            graphql_client: self.graphql_client.clone(),
6196        }
6197    }
6198    /// Retrieve a the current value in the LLM environment, of type FunctionCallArgValue
6199    pub fn function_call_arg_value(&self) -> FunctionCallArgValue {
6200        let query = self.selection.select("functionCallArgValue");
6201        FunctionCallArgValue {
6202            proc: self.proc.clone(),
6203            selection: query,
6204            graphql_client: self.graphql_client.clone(),
6205        }
6206    }
6207    /// Retrieve a the current value in the LLM environment, of type GeneratedCode
6208    pub fn generated_code(&self) -> GeneratedCode {
6209        let query = self.selection.select("generatedCode");
6210        GeneratedCode {
6211            proc: self.proc.clone(),
6212            selection: query,
6213            graphql_client: self.graphql_client.clone(),
6214        }
6215    }
6216    /// Retrieve a variable in the llm environment, of type CacheVolume
6217    ///
6218    /// # Arguments
6219    ///
6220    /// * `name` - The name of the variable
6221    pub fn get_cache_volume(&self, name: impl Into<String>) -> CacheVolume {
6222        let mut query = self.selection.select("getCacheVolume");
6223        query = query.arg("name", name.into());
6224        CacheVolume {
6225            proc: self.proc.clone(),
6226            selection: query,
6227            graphql_client: self.graphql_client.clone(),
6228        }
6229    }
6230    /// Retrieve a variable in the llm environment, of type Container
6231    ///
6232    /// # Arguments
6233    ///
6234    /// * `name` - The name of the variable
6235    pub fn get_container(&self, name: impl Into<String>) -> Container {
6236        let mut query = self.selection.select("getContainer");
6237        query = query.arg("name", name.into());
6238        Container {
6239            proc: self.proc.clone(),
6240            selection: query,
6241            graphql_client: self.graphql_client.clone(),
6242        }
6243    }
6244    /// Retrieve a variable in the llm environment, of type CurrentModule
6245    ///
6246    /// # Arguments
6247    ///
6248    /// * `name` - The name of the variable
6249    pub fn get_current_module(&self, name: impl Into<String>) -> CurrentModule {
6250        let mut query = self.selection.select("getCurrentModule");
6251        query = query.arg("name", name.into());
6252        CurrentModule {
6253            proc: self.proc.clone(),
6254            selection: query,
6255            graphql_client: self.graphql_client.clone(),
6256        }
6257    }
6258    /// Retrieve a variable in the llm environment, of type Directory
6259    ///
6260    /// # Arguments
6261    ///
6262    /// * `name` - The name of the variable
6263    pub fn get_directory(&self, name: impl Into<String>) -> Directory {
6264        let mut query = self.selection.select("getDirectory");
6265        query = query.arg("name", name.into());
6266        Directory {
6267            proc: self.proc.clone(),
6268            selection: query,
6269            graphql_client: self.graphql_client.clone(),
6270        }
6271    }
6272    /// Retrieve a variable in the llm environment, of type EnumTypeDef
6273    ///
6274    /// # Arguments
6275    ///
6276    /// * `name` - The name of the variable
6277    pub fn get_enum_type_def(&self, name: impl Into<String>) -> EnumTypeDef {
6278        let mut query = self.selection.select("getEnumTypeDef");
6279        query = query.arg("name", name.into());
6280        EnumTypeDef {
6281            proc: self.proc.clone(),
6282            selection: query,
6283            graphql_client: self.graphql_client.clone(),
6284        }
6285    }
6286    /// Retrieve a variable in the llm environment, of type EnumValueTypeDef
6287    ///
6288    /// # Arguments
6289    ///
6290    /// * `name` - The name of the variable
6291    pub fn get_enum_value_type_def(&self, name: impl Into<String>) -> EnumValueTypeDef {
6292        let mut query = self.selection.select("getEnumValueTypeDef");
6293        query = query.arg("name", name.into());
6294        EnumValueTypeDef {
6295            proc: self.proc.clone(),
6296            selection: query,
6297            graphql_client: self.graphql_client.clone(),
6298        }
6299    }
6300    /// Retrieve a variable in the llm environment, of type Error
6301    ///
6302    /// # Arguments
6303    ///
6304    /// * `name` - The name of the variable
6305    pub fn get_error(&self, name: impl Into<String>) -> Error {
6306        let mut query = self.selection.select("getError");
6307        query = query.arg("name", name.into());
6308        Error {
6309            proc: self.proc.clone(),
6310            selection: query,
6311            graphql_client: self.graphql_client.clone(),
6312        }
6313    }
6314    /// Retrieve a variable in the llm environment, of type ErrorValue
6315    ///
6316    /// # Arguments
6317    ///
6318    /// * `name` - The name of the variable
6319    pub fn get_error_value(&self, name: impl Into<String>) -> ErrorValue {
6320        let mut query = self.selection.select("getErrorValue");
6321        query = query.arg("name", name.into());
6322        ErrorValue {
6323            proc: self.proc.clone(),
6324            selection: query,
6325            graphql_client: self.graphql_client.clone(),
6326        }
6327    }
6328    /// Retrieve a variable in the llm environment, of type FieldTypeDef
6329    ///
6330    /// # Arguments
6331    ///
6332    /// * `name` - The name of the variable
6333    pub fn get_field_type_def(&self, name: impl Into<String>) -> FieldTypeDef {
6334        let mut query = self.selection.select("getFieldTypeDef");
6335        query = query.arg("name", name.into());
6336        FieldTypeDef {
6337            proc: self.proc.clone(),
6338            selection: query,
6339            graphql_client: self.graphql_client.clone(),
6340        }
6341    }
6342    /// Retrieve a variable in the llm environment, of type File
6343    ///
6344    /// # Arguments
6345    ///
6346    /// * `name` - The name of the variable
6347    pub fn get_file(&self, name: impl Into<String>) -> File {
6348        let mut query = self.selection.select("getFile");
6349        query = query.arg("name", name.into());
6350        File {
6351            proc: self.proc.clone(),
6352            selection: query,
6353            graphql_client: self.graphql_client.clone(),
6354        }
6355    }
6356    /// Retrieve a variable in the llm environment, of type Function
6357    ///
6358    /// # Arguments
6359    ///
6360    /// * `name` - The name of the variable
6361    pub fn get_function(&self, name: impl Into<String>) -> Function {
6362        let mut query = self.selection.select("getFunction");
6363        query = query.arg("name", name.into());
6364        Function {
6365            proc: self.proc.clone(),
6366            selection: query,
6367            graphql_client: self.graphql_client.clone(),
6368        }
6369    }
6370    /// Retrieve a variable in the llm environment, of type FunctionArg
6371    ///
6372    /// # Arguments
6373    ///
6374    /// * `name` - The name of the variable
6375    pub fn get_function_arg(&self, name: impl Into<String>) -> FunctionArg {
6376        let mut query = self.selection.select("getFunctionArg");
6377        query = query.arg("name", name.into());
6378        FunctionArg {
6379            proc: self.proc.clone(),
6380            selection: query,
6381            graphql_client: self.graphql_client.clone(),
6382        }
6383    }
6384    /// Retrieve a variable in the llm environment, of type FunctionCall
6385    ///
6386    /// # Arguments
6387    ///
6388    /// * `name` - The name of the variable
6389    pub fn get_function_call(&self, name: impl Into<String>) -> FunctionCall {
6390        let mut query = self.selection.select("getFunctionCall");
6391        query = query.arg("name", name.into());
6392        FunctionCall {
6393            proc: self.proc.clone(),
6394            selection: query,
6395            graphql_client: self.graphql_client.clone(),
6396        }
6397    }
6398    /// Retrieve a variable in the llm environment, of type FunctionCallArgValue
6399    ///
6400    /// # Arguments
6401    ///
6402    /// * `name` - The name of the variable
6403    pub fn get_function_call_arg_value(&self, name: impl Into<String>) -> FunctionCallArgValue {
6404        let mut query = self.selection.select("getFunctionCallArgValue");
6405        query = query.arg("name", name.into());
6406        FunctionCallArgValue {
6407            proc: self.proc.clone(),
6408            selection: query,
6409            graphql_client: self.graphql_client.clone(),
6410        }
6411    }
6412    /// Retrieve a variable in the llm environment, of type GeneratedCode
6413    ///
6414    /// # Arguments
6415    ///
6416    /// * `name` - The name of the variable
6417    pub fn get_generated_code(&self, name: impl Into<String>) -> GeneratedCode {
6418        let mut query = self.selection.select("getGeneratedCode");
6419        query = query.arg("name", name.into());
6420        GeneratedCode {
6421            proc: self.proc.clone(),
6422            selection: query,
6423            graphql_client: self.graphql_client.clone(),
6424        }
6425    }
6426    /// Retrieve a variable in the llm environment, of type GitRef
6427    ///
6428    /// # Arguments
6429    ///
6430    /// * `name` - The name of the variable
6431    pub fn get_git_ref(&self, name: impl Into<String>) -> GitRef {
6432        let mut query = self.selection.select("getGitRef");
6433        query = query.arg("name", name.into());
6434        GitRef {
6435            proc: self.proc.clone(),
6436            selection: query,
6437            graphql_client: self.graphql_client.clone(),
6438        }
6439    }
6440    /// Retrieve a variable in the llm environment, of type GitRepository
6441    ///
6442    /// # Arguments
6443    ///
6444    /// * `name` - The name of the variable
6445    pub fn get_git_repository(&self, name: impl Into<String>) -> GitRepository {
6446        let mut query = self.selection.select("getGitRepository");
6447        query = query.arg("name", name.into());
6448        GitRepository {
6449            proc: self.proc.clone(),
6450            selection: query,
6451            graphql_client: self.graphql_client.clone(),
6452        }
6453    }
6454    /// Retrieve a variable in the llm environment, of type InputTypeDef
6455    ///
6456    /// # Arguments
6457    ///
6458    /// * `name` - The name of the variable
6459    pub fn get_input_type_def(&self, name: impl Into<String>) -> InputTypeDef {
6460        let mut query = self.selection.select("getInputTypeDef");
6461        query = query.arg("name", name.into());
6462        InputTypeDef {
6463            proc: self.proc.clone(),
6464            selection: query,
6465            graphql_client: self.graphql_client.clone(),
6466        }
6467    }
6468    /// Retrieve a variable in the llm environment, of type InterfaceTypeDef
6469    ///
6470    /// # Arguments
6471    ///
6472    /// * `name` - The name of the variable
6473    pub fn get_interface_type_def(&self, name: impl Into<String>) -> InterfaceTypeDef {
6474        let mut query = self.selection.select("getInterfaceTypeDef");
6475        query = query.arg("name", name.into());
6476        InterfaceTypeDef {
6477            proc: self.proc.clone(),
6478            selection: query,
6479            graphql_client: self.graphql_client.clone(),
6480        }
6481    }
6482    /// Retrieve a variable in the llm environment, of type LLM
6483    ///
6484    /// # Arguments
6485    ///
6486    /// * `name` - The name of the variable
6487    pub fn get_llm(&self, name: impl Into<String>) -> Llm {
6488        let mut query = self.selection.select("getLLM");
6489        query = query.arg("name", name.into());
6490        Llm {
6491            proc: self.proc.clone(),
6492            selection: query,
6493            graphql_client: self.graphql_client.clone(),
6494        }
6495    }
6496    /// Retrieve a variable in the llm environment, of type ListTypeDef
6497    ///
6498    /// # Arguments
6499    ///
6500    /// * `name` - The name of the variable
6501    pub fn get_list_type_def(&self, name: impl Into<String>) -> ListTypeDef {
6502        let mut query = self.selection.select("getListTypeDef");
6503        query = query.arg("name", name.into());
6504        ListTypeDef {
6505            proc: self.proc.clone(),
6506            selection: query,
6507            graphql_client: self.graphql_client.clone(),
6508        }
6509    }
6510    /// Retrieve a variable in the llm environment, of type Module
6511    ///
6512    /// # Arguments
6513    ///
6514    /// * `name` - The name of the variable
6515    pub fn get_module(&self, name: impl Into<String>) -> Module {
6516        let mut query = self.selection.select("getModule");
6517        query = query.arg("name", name.into());
6518        Module {
6519            proc: self.proc.clone(),
6520            selection: query,
6521            graphql_client: self.graphql_client.clone(),
6522        }
6523    }
6524    /// Retrieve a variable in the llm environment, of type ModuleConfigClient
6525    ///
6526    /// # Arguments
6527    ///
6528    /// * `name` - The name of the variable
6529    pub fn get_module_config_client(&self, name: impl Into<String>) -> ModuleConfigClient {
6530        let mut query = self.selection.select("getModuleConfigClient");
6531        query = query.arg("name", name.into());
6532        ModuleConfigClient {
6533            proc: self.proc.clone(),
6534            selection: query,
6535            graphql_client: self.graphql_client.clone(),
6536        }
6537    }
6538    /// Retrieve a variable in the llm environment, of type ModuleSource
6539    ///
6540    /// # Arguments
6541    ///
6542    /// * `name` - The name of the variable
6543    pub fn get_module_source(&self, name: impl Into<String>) -> ModuleSource {
6544        let mut query = self.selection.select("getModuleSource");
6545        query = query.arg("name", name.into());
6546        ModuleSource {
6547            proc: self.proc.clone(),
6548            selection: query,
6549            graphql_client: self.graphql_client.clone(),
6550        }
6551    }
6552    /// Retrieve a variable in the llm environment, of type ObjectTypeDef
6553    ///
6554    /// # Arguments
6555    ///
6556    /// * `name` - The name of the variable
6557    pub fn get_object_type_def(&self, name: impl Into<String>) -> ObjectTypeDef {
6558        let mut query = self.selection.select("getObjectTypeDef");
6559        query = query.arg("name", name.into());
6560        ObjectTypeDef {
6561            proc: self.proc.clone(),
6562            selection: query,
6563            graphql_client: self.graphql_client.clone(),
6564        }
6565    }
6566    /// Retrieve a variable in the llm environment, of type SDKConfig
6567    ///
6568    /// # Arguments
6569    ///
6570    /// * `name` - The name of the variable
6571    pub fn get_sdk_config(&self, name: impl Into<String>) -> SdkConfig {
6572        let mut query = self.selection.select("getSDKConfig");
6573        query = query.arg("name", name.into());
6574        SdkConfig {
6575            proc: self.proc.clone(),
6576            selection: query,
6577            graphql_client: self.graphql_client.clone(),
6578        }
6579    }
6580    /// Retrieve a variable in the llm environment, of type ScalarTypeDef
6581    ///
6582    /// # Arguments
6583    ///
6584    /// * `name` - The name of the variable
6585    pub fn get_scalar_type_def(&self, name: impl Into<String>) -> ScalarTypeDef {
6586        let mut query = self.selection.select("getScalarTypeDef");
6587        query = query.arg("name", name.into());
6588        ScalarTypeDef {
6589            proc: self.proc.clone(),
6590            selection: query,
6591            graphql_client: self.graphql_client.clone(),
6592        }
6593    }
6594    /// Retrieve a variable in the llm environment, of type Secret
6595    ///
6596    /// # Arguments
6597    ///
6598    /// * `name` - The name of the variable
6599    pub fn get_secret(&self, name: impl Into<String>) -> Secret {
6600        let mut query = self.selection.select("getSecret");
6601        query = query.arg("name", name.into());
6602        Secret {
6603            proc: self.proc.clone(),
6604            selection: query,
6605            graphql_client: self.graphql_client.clone(),
6606        }
6607    }
6608    /// Retrieve a variable in the llm environment, of type Service
6609    ///
6610    /// # Arguments
6611    ///
6612    /// * `name` - The name of the variable
6613    pub fn get_service(&self, name: impl Into<String>) -> Service {
6614        let mut query = self.selection.select("getService");
6615        query = query.arg("name", name.into());
6616        Service {
6617            proc: self.proc.clone(),
6618            selection: query,
6619            graphql_client: self.graphql_client.clone(),
6620        }
6621    }
6622    /// Retrieve a variable in the llm environment, of type Socket
6623    ///
6624    /// # Arguments
6625    ///
6626    /// * `name` - The name of the variable
6627    pub fn get_socket(&self, name: impl Into<String>) -> Socket {
6628        let mut query = self.selection.select("getSocket");
6629        query = query.arg("name", name.into());
6630        Socket {
6631            proc: self.proc.clone(),
6632            selection: query,
6633            graphql_client: self.graphql_client.clone(),
6634        }
6635    }
6636    /// Retrieve a variable in the llm environment, of type SourceMap
6637    ///
6638    /// # Arguments
6639    ///
6640    /// * `name` - The name of the variable
6641    pub fn get_source_map(&self, name: impl Into<String>) -> SourceMap {
6642        let mut query = self.selection.select("getSourceMap");
6643        query = query.arg("name", name.into());
6644        SourceMap {
6645            proc: self.proc.clone(),
6646            selection: query,
6647            graphql_client: self.graphql_client.clone(),
6648        }
6649    }
6650    /// Get a string variable from the LLM's environment
6651    ///
6652    /// # Arguments
6653    ///
6654    /// * `name` - The variable name
6655    pub async fn get_string(&self, name: impl Into<String>) -> Result<String, DaggerError> {
6656        let mut query = self.selection.select("getString");
6657        query = query.arg("name", name.into());
6658        query.execute(self.graphql_client.clone()).await
6659    }
6660    /// Retrieve a variable in the llm environment, of type Terminal
6661    ///
6662    /// # Arguments
6663    ///
6664    /// * `name` - The name of the variable
6665    pub fn get_terminal(&self, name: impl Into<String>) -> Terminal {
6666        let mut query = self.selection.select("getTerminal");
6667        query = query.arg("name", name.into());
6668        Terminal {
6669            proc: self.proc.clone(),
6670            selection: query,
6671            graphql_client: self.graphql_client.clone(),
6672        }
6673    }
6674    /// Retrieve a variable in the llm environment, of type TypeDef
6675    ///
6676    /// # Arguments
6677    ///
6678    /// * `name` - The name of the variable
6679    pub fn get_type_def(&self, name: impl Into<String>) -> TypeDef {
6680        let mut query = self.selection.select("getTypeDef");
6681        query = query.arg("name", name.into());
6682        TypeDef {
6683            proc: self.proc.clone(),
6684            selection: query,
6685            graphql_client: self.graphql_client.clone(),
6686        }
6687    }
6688    /// Retrieve a the current value in the LLM environment, of type GitRef
6689    pub fn git_ref(&self) -> GitRef {
6690        let query = self.selection.select("gitRef");
6691        GitRef {
6692            proc: self.proc.clone(),
6693            selection: query,
6694            graphql_client: self.graphql_client.clone(),
6695        }
6696    }
6697    /// Retrieve a the current value in the LLM environment, of type GitRepository
6698    pub fn git_repository(&self) -> GitRepository {
6699        let query = self.selection.select("gitRepository");
6700        GitRepository {
6701            proc: self.proc.clone(),
6702            selection: query,
6703            graphql_client: self.graphql_client.clone(),
6704        }
6705    }
6706    /// return the llm message history
6707    pub async fn history(&self) -> Result<Vec<String>, DaggerError> {
6708        let query = self.selection.select("history");
6709        query.execute(self.graphql_client.clone()).await
6710    }
6711    /// return the raw llm message history as json
6712    pub async fn history_json(&self) -> Result<String, DaggerError> {
6713        let query = self.selection.select("historyJSON");
6714        query.execute(self.graphql_client.clone()).await
6715    }
6716    /// A unique identifier for this LLM.
6717    pub async fn id(&self) -> Result<Llmid, DaggerError> {
6718        let query = self.selection.select("id");
6719        query.execute(self.graphql_client.clone()).await
6720    }
6721    /// Retrieve a the current value in the LLM environment, of type InputTypeDef
6722    pub fn input_type_def(&self) -> InputTypeDef {
6723        let query = self.selection.select("inputTypeDef");
6724        InputTypeDef {
6725            proc: self.proc.clone(),
6726            selection: query,
6727            graphql_client: self.graphql_client.clone(),
6728        }
6729    }
6730    /// Retrieve a the current value in the LLM environment, of type InterfaceTypeDef
6731    pub fn interface_type_def(&self) -> InterfaceTypeDef {
6732        let query = self.selection.select("interfaceTypeDef");
6733        InterfaceTypeDef {
6734            proc: self.proc.clone(),
6735            selection: query,
6736            graphql_client: self.graphql_client.clone(),
6737        }
6738    }
6739    /// Retrieve a the current value in the LLM environment, of type LLM
6740    pub fn l_lm(&self) -> Llm {
6741        let query = self.selection.select("lLM");
6742        Llm {
6743            proc: self.proc.clone(),
6744            selection: query,
6745            graphql_client: self.graphql_client.clone(),
6746        }
6747    }
6748    /// return the last llm reply from the history
6749    pub async fn last_reply(&self) -> Result<String, DaggerError> {
6750        let query = self.selection.select("lastReply");
6751        query.execute(self.graphql_client.clone()).await
6752    }
6753    /// Retrieve a the current value in the LLM environment, of type ListTypeDef
6754    pub fn list_type_def(&self) -> ListTypeDef {
6755        let query = self.selection.select("listTypeDef");
6756        ListTypeDef {
6757            proc: self.proc.clone(),
6758            selection: query,
6759            graphql_client: self.graphql_client.clone(),
6760        }
6761    }
6762    /// synchronize LLM state
6763    pub fn r#loop(&self) -> Llm {
6764        let query = self.selection.select("loop");
6765        Llm {
6766            proc: self.proc.clone(),
6767            selection: query,
6768            graphql_client: self.graphql_client.clone(),
6769        }
6770    }
6771    /// return the model used by the llm
6772    pub async fn model(&self) -> Result<String, DaggerError> {
6773        let query = self.selection.select("model");
6774        query.execute(self.graphql_client.clone()).await
6775    }
6776    /// Retrieve a the current value in the LLM environment, of type Module
6777    pub fn module(&self) -> Module {
6778        let query = self.selection.select("module");
6779        Module {
6780            proc: self.proc.clone(),
6781            selection: query,
6782            graphql_client: self.graphql_client.clone(),
6783        }
6784    }
6785    /// Retrieve a the current value in the LLM environment, of type ModuleConfigClient
6786    pub fn module_config_client(&self) -> ModuleConfigClient {
6787        let query = self.selection.select("moduleConfigClient");
6788        ModuleConfigClient {
6789            proc: self.proc.clone(),
6790            selection: query,
6791            graphql_client: self.graphql_client.clone(),
6792        }
6793    }
6794    /// Retrieve a the current value in the LLM environment, of type ModuleSource
6795    pub fn module_source(&self) -> ModuleSource {
6796        let query = self.selection.select("moduleSource");
6797        ModuleSource {
6798            proc: self.proc.clone(),
6799            selection: query,
6800            graphql_client: self.graphql_client.clone(),
6801        }
6802    }
6803    /// Retrieve a the current value in the LLM environment, of type ObjectTypeDef
6804    pub fn object_type_def(&self) -> ObjectTypeDef {
6805        let query = self.selection.select("objectTypeDef");
6806        ObjectTypeDef {
6807            proc: self.proc.clone(),
6808            selection: query,
6809            graphql_client: self.graphql_client.clone(),
6810        }
6811    }
6812    /// return the provider used by the llm
6813    pub async fn provider(&self) -> Result<String, DaggerError> {
6814        let query = self.selection.select("provider");
6815        query.execute(self.graphql_client.clone()).await
6816    }
6817    /// Retrieve a the current value in the LLM environment, of type ScalarTypeDef
6818    pub fn scalar_type_def(&self) -> ScalarTypeDef {
6819        let query = self.selection.select("scalarTypeDef");
6820        ScalarTypeDef {
6821            proc: self.proc.clone(),
6822            selection: query,
6823            graphql_client: self.graphql_client.clone(),
6824        }
6825    }
6826    /// Retrieve a the current value in the LLM environment, of type SDKConfig
6827    pub fn sdkconfig(&self) -> SdkConfig {
6828        let query = self.selection.select("sdkconfig");
6829        SdkConfig {
6830            proc: self.proc.clone(),
6831            selection: query,
6832            graphql_client: self.graphql_client.clone(),
6833        }
6834    }
6835    /// Retrieve a the current value in the LLM environment, of type Secret
6836    pub fn secret(&self) -> Secret {
6837        let query = self.selection.select("secret");
6838        Secret {
6839            proc: self.proc.clone(),
6840            selection: query,
6841            graphql_client: self.graphql_client.clone(),
6842        }
6843    }
6844    /// Retrieve a the current value in the LLM environment, of type Service
6845    pub fn service(&self) -> Service {
6846        let query = self.selection.select("service");
6847        Service {
6848            proc: self.proc.clone(),
6849            selection: query,
6850            graphql_client: self.graphql_client.clone(),
6851        }
6852    }
6853    /// Set a variable of type CacheVolume in the llm environment
6854    ///
6855    /// # Arguments
6856    ///
6857    /// * `name` - The name of the variable
6858    /// * `value` - The CacheVolume value to assign to the variable
6859    pub fn set_cache_volume(
6860        &self,
6861        name: impl Into<String>,
6862        value: impl IntoID<CacheVolumeId>,
6863    ) -> Llm {
6864        let mut query = self.selection.select("setCacheVolume");
6865        query = query.arg("name", name.into());
6866        query = query.arg_lazy(
6867            "value",
6868            Box::new(move || {
6869                let value = value.clone();
6870                Box::pin(async move { value.into_id().await.unwrap().quote() })
6871            }),
6872        );
6873        Llm {
6874            proc: self.proc.clone(),
6875            selection: query,
6876            graphql_client: self.graphql_client.clone(),
6877        }
6878    }
6879    /// Set a variable of type Container in the llm environment
6880    ///
6881    /// # Arguments
6882    ///
6883    /// * `name` - The name of the variable
6884    /// * `value` - The Container value to assign to the variable
6885    pub fn set_container(&self, name: impl Into<String>, value: impl IntoID<ContainerId>) -> Llm {
6886        let mut query = self.selection.select("setContainer");
6887        query = query.arg("name", name.into());
6888        query = query.arg_lazy(
6889            "value",
6890            Box::new(move || {
6891                let value = value.clone();
6892                Box::pin(async move { value.into_id().await.unwrap().quote() })
6893            }),
6894        );
6895        Llm {
6896            proc: self.proc.clone(),
6897            selection: query,
6898            graphql_client: self.graphql_client.clone(),
6899        }
6900    }
6901    /// Set a variable of type CurrentModule in the llm environment
6902    ///
6903    /// # Arguments
6904    ///
6905    /// * `name` - The name of the variable
6906    /// * `value` - The CurrentModule value to assign to the variable
6907    pub fn set_current_module(
6908        &self,
6909        name: impl Into<String>,
6910        value: impl IntoID<CurrentModuleId>,
6911    ) -> Llm {
6912        let mut query = self.selection.select("setCurrentModule");
6913        query = query.arg("name", name.into());
6914        query = query.arg_lazy(
6915            "value",
6916            Box::new(move || {
6917                let value = value.clone();
6918                Box::pin(async move { value.into_id().await.unwrap().quote() })
6919            }),
6920        );
6921        Llm {
6922            proc: self.proc.clone(),
6923            selection: query,
6924            graphql_client: self.graphql_client.clone(),
6925        }
6926    }
6927    /// Set a variable of type Directory in the llm environment
6928    ///
6929    /// # Arguments
6930    ///
6931    /// * `name` - The name of the variable
6932    /// * `value` - The Directory value to assign to the variable
6933    pub fn set_directory(&self, name: impl Into<String>, value: impl IntoID<DirectoryId>) -> Llm {
6934        let mut query = self.selection.select("setDirectory");
6935        query = query.arg("name", name.into());
6936        query = query.arg_lazy(
6937            "value",
6938            Box::new(move || {
6939                let value = value.clone();
6940                Box::pin(async move { value.into_id().await.unwrap().quote() })
6941            }),
6942        );
6943        Llm {
6944            proc: self.proc.clone(),
6945            selection: query,
6946            graphql_client: self.graphql_client.clone(),
6947        }
6948    }
6949    /// Set a variable of type EnumTypeDef in the llm environment
6950    ///
6951    /// # Arguments
6952    ///
6953    /// * `name` - The name of the variable
6954    /// * `value` - The EnumTypeDef value to assign to the variable
6955    pub fn set_enum_type_def(
6956        &self,
6957        name: impl Into<String>,
6958        value: impl IntoID<EnumTypeDefId>,
6959    ) -> Llm {
6960        let mut query = self.selection.select("setEnumTypeDef");
6961        query = query.arg("name", name.into());
6962        query = query.arg_lazy(
6963            "value",
6964            Box::new(move || {
6965                let value = value.clone();
6966                Box::pin(async move { value.into_id().await.unwrap().quote() })
6967            }),
6968        );
6969        Llm {
6970            proc: self.proc.clone(),
6971            selection: query,
6972            graphql_client: self.graphql_client.clone(),
6973        }
6974    }
6975    /// Set a variable of type EnumValueTypeDef in the llm environment
6976    ///
6977    /// # Arguments
6978    ///
6979    /// * `name` - The name of the variable
6980    /// * `value` - The EnumValueTypeDef value to assign to the variable
6981    pub fn set_enum_value_type_def(
6982        &self,
6983        name: impl Into<String>,
6984        value: impl IntoID<EnumValueTypeDefId>,
6985    ) -> Llm {
6986        let mut query = self.selection.select("setEnumValueTypeDef");
6987        query = query.arg("name", name.into());
6988        query = query.arg_lazy(
6989            "value",
6990            Box::new(move || {
6991                let value = value.clone();
6992                Box::pin(async move { value.into_id().await.unwrap().quote() })
6993            }),
6994        );
6995        Llm {
6996            proc: self.proc.clone(),
6997            selection: query,
6998            graphql_client: self.graphql_client.clone(),
6999        }
7000    }
7001    /// Set a variable of type Error in the llm environment
7002    ///
7003    /// # Arguments
7004    ///
7005    /// * `name` - The name of the variable
7006    /// * `value` - The Error value to assign to the variable
7007    pub fn set_error(&self, name: impl Into<String>, value: impl IntoID<ErrorId>) -> Llm {
7008        let mut query = self.selection.select("setError");
7009        query = query.arg("name", name.into());
7010        query = query.arg_lazy(
7011            "value",
7012            Box::new(move || {
7013                let value = value.clone();
7014                Box::pin(async move { value.into_id().await.unwrap().quote() })
7015            }),
7016        );
7017        Llm {
7018            proc: self.proc.clone(),
7019            selection: query,
7020            graphql_client: self.graphql_client.clone(),
7021        }
7022    }
7023    /// Set a variable of type ErrorValue in the llm environment
7024    ///
7025    /// # Arguments
7026    ///
7027    /// * `name` - The name of the variable
7028    /// * `value` - The ErrorValue value to assign to the variable
7029    pub fn set_error_value(
7030        &self,
7031        name: impl Into<String>,
7032        value: impl IntoID<ErrorValueId>,
7033    ) -> Llm {
7034        let mut query = self.selection.select("setErrorValue");
7035        query = query.arg("name", name.into());
7036        query = query.arg_lazy(
7037            "value",
7038            Box::new(move || {
7039                let value = value.clone();
7040                Box::pin(async move { value.into_id().await.unwrap().quote() })
7041            }),
7042        );
7043        Llm {
7044            proc: self.proc.clone(),
7045            selection: query,
7046            graphql_client: self.graphql_client.clone(),
7047        }
7048    }
7049    /// Set a variable of type FieldTypeDef in the llm environment
7050    ///
7051    /// # Arguments
7052    ///
7053    /// * `name` - The name of the variable
7054    /// * `value` - The FieldTypeDef value to assign to the variable
7055    pub fn set_field_type_def(
7056        &self,
7057        name: impl Into<String>,
7058        value: impl IntoID<FieldTypeDefId>,
7059    ) -> Llm {
7060        let mut query = self.selection.select("setFieldTypeDef");
7061        query = query.arg("name", name.into());
7062        query = query.arg_lazy(
7063            "value",
7064            Box::new(move || {
7065                let value = value.clone();
7066                Box::pin(async move { value.into_id().await.unwrap().quote() })
7067            }),
7068        );
7069        Llm {
7070            proc: self.proc.clone(),
7071            selection: query,
7072            graphql_client: self.graphql_client.clone(),
7073        }
7074    }
7075    /// Set a variable of type File in the llm environment
7076    ///
7077    /// # Arguments
7078    ///
7079    /// * `name` - The name of the variable
7080    /// * `value` - The File value to assign to the variable
7081    pub fn set_file(&self, name: impl Into<String>, value: impl IntoID<FileId>) -> Llm {
7082        let mut query = self.selection.select("setFile");
7083        query = query.arg("name", name.into());
7084        query = query.arg_lazy(
7085            "value",
7086            Box::new(move || {
7087                let value = value.clone();
7088                Box::pin(async move { value.into_id().await.unwrap().quote() })
7089            }),
7090        );
7091        Llm {
7092            proc: self.proc.clone(),
7093            selection: query,
7094            graphql_client: self.graphql_client.clone(),
7095        }
7096    }
7097    /// Set a variable of type Function in the llm environment
7098    ///
7099    /// # Arguments
7100    ///
7101    /// * `name` - The name of the variable
7102    /// * `value` - The Function value to assign to the variable
7103    pub fn set_function(&self, name: impl Into<String>, value: impl IntoID<FunctionId>) -> Llm {
7104        let mut query = self.selection.select("setFunction");
7105        query = query.arg("name", name.into());
7106        query = query.arg_lazy(
7107            "value",
7108            Box::new(move || {
7109                let value = value.clone();
7110                Box::pin(async move { value.into_id().await.unwrap().quote() })
7111            }),
7112        );
7113        Llm {
7114            proc: self.proc.clone(),
7115            selection: query,
7116            graphql_client: self.graphql_client.clone(),
7117        }
7118    }
7119    /// Set a variable of type FunctionArg in the llm environment
7120    ///
7121    /// # Arguments
7122    ///
7123    /// * `name` - The name of the variable
7124    /// * `value` - The FunctionArg value to assign to the variable
7125    pub fn set_function_arg(
7126        &self,
7127        name: impl Into<String>,
7128        value: impl IntoID<FunctionArgId>,
7129    ) -> Llm {
7130        let mut query = self.selection.select("setFunctionArg");
7131        query = query.arg("name", name.into());
7132        query = query.arg_lazy(
7133            "value",
7134            Box::new(move || {
7135                let value = value.clone();
7136                Box::pin(async move { value.into_id().await.unwrap().quote() })
7137            }),
7138        );
7139        Llm {
7140            proc: self.proc.clone(),
7141            selection: query,
7142            graphql_client: self.graphql_client.clone(),
7143        }
7144    }
7145    /// Set a variable of type FunctionCall in the llm environment
7146    ///
7147    /// # Arguments
7148    ///
7149    /// * `name` - The name of the variable
7150    /// * `value` - The FunctionCall value to assign to the variable
7151    pub fn set_function_call(
7152        &self,
7153        name: impl Into<String>,
7154        value: impl IntoID<FunctionCallId>,
7155    ) -> Llm {
7156        let mut query = self.selection.select("setFunctionCall");
7157        query = query.arg("name", name.into());
7158        query = query.arg_lazy(
7159            "value",
7160            Box::new(move || {
7161                let value = value.clone();
7162                Box::pin(async move { value.into_id().await.unwrap().quote() })
7163            }),
7164        );
7165        Llm {
7166            proc: self.proc.clone(),
7167            selection: query,
7168            graphql_client: self.graphql_client.clone(),
7169        }
7170    }
7171    /// Set a variable of type FunctionCallArgValue in the llm environment
7172    ///
7173    /// # Arguments
7174    ///
7175    /// * `name` - The name of the variable
7176    /// * `value` - The FunctionCallArgValue value to assign to the variable
7177    pub fn set_function_call_arg_value(
7178        &self,
7179        name: impl Into<String>,
7180        value: impl IntoID<FunctionCallArgValueId>,
7181    ) -> Llm {
7182        let mut query = self.selection.select("setFunctionCallArgValue");
7183        query = query.arg("name", name.into());
7184        query = query.arg_lazy(
7185            "value",
7186            Box::new(move || {
7187                let value = value.clone();
7188                Box::pin(async move { value.into_id().await.unwrap().quote() })
7189            }),
7190        );
7191        Llm {
7192            proc: self.proc.clone(),
7193            selection: query,
7194            graphql_client: self.graphql_client.clone(),
7195        }
7196    }
7197    /// Set a variable of type GeneratedCode in the llm environment
7198    ///
7199    /// # Arguments
7200    ///
7201    /// * `name` - The name of the variable
7202    /// * `value` - The GeneratedCode value to assign to the variable
7203    pub fn set_generated_code(
7204        &self,
7205        name: impl Into<String>,
7206        value: impl IntoID<GeneratedCodeId>,
7207    ) -> Llm {
7208        let mut query = self.selection.select("setGeneratedCode");
7209        query = query.arg("name", name.into());
7210        query = query.arg_lazy(
7211            "value",
7212            Box::new(move || {
7213                let value = value.clone();
7214                Box::pin(async move { value.into_id().await.unwrap().quote() })
7215            }),
7216        );
7217        Llm {
7218            proc: self.proc.clone(),
7219            selection: query,
7220            graphql_client: self.graphql_client.clone(),
7221        }
7222    }
7223    /// Set a variable of type GitRef in the llm environment
7224    ///
7225    /// # Arguments
7226    ///
7227    /// * `name` - The name of the variable
7228    /// * `value` - The GitRef value to assign to the variable
7229    pub fn set_git_ref(&self, name: impl Into<String>, value: impl IntoID<GitRefId>) -> Llm {
7230        let mut query = self.selection.select("setGitRef");
7231        query = query.arg("name", name.into());
7232        query = query.arg_lazy(
7233            "value",
7234            Box::new(move || {
7235                let value = value.clone();
7236                Box::pin(async move { value.into_id().await.unwrap().quote() })
7237            }),
7238        );
7239        Llm {
7240            proc: self.proc.clone(),
7241            selection: query,
7242            graphql_client: self.graphql_client.clone(),
7243        }
7244    }
7245    /// Set a variable of type GitRepository in the llm environment
7246    ///
7247    /// # Arguments
7248    ///
7249    /// * `name` - The name of the variable
7250    /// * `value` - The GitRepository value to assign to the variable
7251    pub fn set_git_repository(
7252        &self,
7253        name: impl Into<String>,
7254        value: impl IntoID<GitRepositoryId>,
7255    ) -> Llm {
7256        let mut query = self.selection.select("setGitRepository");
7257        query = query.arg("name", name.into());
7258        query = query.arg_lazy(
7259            "value",
7260            Box::new(move || {
7261                let value = value.clone();
7262                Box::pin(async move { value.into_id().await.unwrap().quote() })
7263            }),
7264        );
7265        Llm {
7266            proc: self.proc.clone(),
7267            selection: query,
7268            graphql_client: self.graphql_client.clone(),
7269        }
7270    }
7271    /// Set a variable of type InputTypeDef in the llm environment
7272    ///
7273    /// # Arguments
7274    ///
7275    /// * `name` - The name of the variable
7276    /// * `value` - The InputTypeDef value to assign to the variable
7277    pub fn set_input_type_def(
7278        &self,
7279        name: impl Into<String>,
7280        value: impl IntoID<InputTypeDefId>,
7281    ) -> Llm {
7282        let mut query = self.selection.select("setInputTypeDef");
7283        query = query.arg("name", name.into());
7284        query = query.arg_lazy(
7285            "value",
7286            Box::new(move || {
7287                let value = value.clone();
7288                Box::pin(async move { value.into_id().await.unwrap().quote() })
7289            }),
7290        );
7291        Llm {
7292            proc: self.proc.clone(),
7293            selection: query,
7294            graphql_client: self.graphql_client.clone(),
7295        }
7296    }
7297    /// Set a variable of type InterfaceTypeDef in the llm environment
7298    ///
7299    /// # Arguments
7300    ///
7301    /// * `name` - The name of the variable
7302    /// * `value` - The InterfaceTypeDef value to assign to the variable
7303    pub fn set_interface_type_def(
7304        &self,
7305        name: impl Into<String>,
7306        value: impl IntoID<InterfaceTypeDefId>,
7307    ) -> Llm {
7308        let mut query = self.selection.select("setInterfaceTypeDef");
7309        query = query.arg("name", name.into());
7310        query = query.arg_lazy(
7311            "value",
7312            Box::new(move || {
7313                let value = value.clone();
7314                Box::pin(async move { value.into_id().await.unwrap().quote() })
7315            }),
7316        );
7317        Llm {
7318            proc: self.proc.clone(),
7319            selection: query,
7320            graphql_client: self.graphql_client.clone(),
7321        }
7322    }
7323    /// Set a variable of type LLM in the llm environment
7324    ///
7325    /// # Arguments
7326    ///
7327    /// * `name` - The name of the variable
7328    /// * `value` - The LLM value to assign to the variable
7329    pub fn set_llm(&self, name: impl Into<String>, value: impl IntoID<Llmid>) -> Llm {
7330        let mut query = self.selection.select("setLLM");
7331        query = query.arg("name", name.into());
7332        query = query.arg_lazy(
7333            "value",
7334            Box::new(move || {
7335                let value = value.clone();
7336                Box::pin(async move { value.into_id().await.unwrap().quote() })
7337            }),
7338        );
7339        Llm {
7340            proc: self.proc.clone(),
7341            selection: query,
7342            graphql_client: self.graphql_client.clone(),
7343        }
7344    }
7345    /// Set a variable of type ListTypeDef in the llm environment
7346    ///
7347    /// # Arguments
7348    ///
7349    /// * `name` - The name of the variable
7350    /// * `value` - The ListTypeDef value to assign to the variable
7351    pub fn set_list_type_def(
7352        &self,
7353        name: impl Into<String>,
7354        value: impl IntoID<ListTypeDefId>,
7355    ) -> Llm {
7356        let mut query = self.selection.select("setListTypeDef");
7357        query = query.arg("name", name.into());
7358        query = query.arg_lazy(
7359            "value",
7360            Box::new(move || {
7361                let value = value.clone();
7362                Box::pin(async move { value.into_id().await.unwrap().quote() })
7363            }),
7364        );
7365        Llm {
7366            proc: self.proc.clone(),
7367            selection: query,
7368            graphql_client: self.graphql_client.clone(),
7369        }
7370    }
7371    /// Set a variable of type Module in the llm environment
7372    ///
7373    /// # Arguments
7374    ///
7375    /// * `name` - The name of the variable
7376    /// * `value` - The Module value to assign to the variable
7377    pub fn set_module(&self, name: impl Into<String>, value: impl IntoID<ModuleId>) -> Llm {
7378        let mut query = self.selection.select("setModule");
7379        query = query.arg("name", name.into());
7380        query = query.arg_lazy(
7381            "value",
7382            Box::new(move || {
7383                let value = value.clone();
7384                Box::pin(async move { value.into_id().await.unwrap().quote() })
7385            }),
7386        );
7387        Llm {
7388            proc: self.proc.clone(),
7389            selection: query,
7390            graphql_client: self.graphql_client.clone(),
7391        }
7392    }
7393    /// Set a variable of type ModuleConfigClient in the llm environment
7394    ///
7395    /// # Arguments
7396    ///
7397    /// * `name` - The name of the variable
7398    /// * `value` - The ModuleConfigClient value to assign to the variable
7399    pub fn set_module_config_client(
7400        &self,
7401        name: impl Into<String>,
7402        value: impl IntoID<ModuleConfigClientId>,
7403    ) -> Llm {
7404        let mut query = self.selection.select("setModuleConfigClient");
7405        query = query.arg("name", name.into());
7406        query = query.arg_lazy(
7407            "value",
7408            Box::new(move || {
7409                let value = value.clone();
7410                Box::pin(async move { value.into_id().await.unwrap().quote() })
7411            }),
7412        );
7413        Llm {
7414            proc: self.proc.clone(),
7415            selection: query,
7416            graphql_client: self.graphql_client.clone(),
7417        }
7418    }
7419    /// Set a variable of type ModuleSource in the llm environment
7420    ///
7421    /// # Arguments
7422    ///
7423    /// * `name` - The name of the variable
7424    /// * `value` - The ModuleSource value to assign to the variable
7425    pub fn set_module_source(
7426        &self,
7427        name: impl Into<String>,
7428        value: impl IntoID<ModuleSourceId>,
7429    ) -> Llm {
7430        let mut query = self.selection.select("setModuleSource");
7431        query = query.arg("name", name.into());
7432        query = query.arg_lazy(
7433            "value",
7434            Box::new(move || {
7435                let value = value.clone();
7436                Box::pin(async move { value.into_id().await.unwrap().quote() })
7437            }),
7438        );
7439        Llm {
7440            proc: self.proc.clone(),
7441            selection: query,
7442            graphql_client: self.graphql_client.clone(),
7443        }
7444    }
7445    /// Set a variable of type ObjectTypeDef in the llm environment
7446    ///
7447    /// # Arguments
7448    ///
7449    /// * `name` - The name of the variable
7450    /// * `value` - The ObjectTypeDef value to assign to the variable
7451    pub fn set_object_type_def(
7452        &self,
7453        name: impl Into<String>,
7454        value: impl IntoID<ObjectTypeDefId>,
7455    ) -> Llm {
7456        let mut query = self.selection.select("setObjectTypeDef");
7457        query = query.arg("name", name.into());
7458        query = query.arg_lazy(
7459            "value",
7460            Box::new(move || {
7461                let value = value.clone();
7462                Box::pin(async move { value.into_id().await.unwrap().quote() })
7463            }),
7464        );
7465        Llm {
7466            proc: self.proc.clone(),
7467            selection: query,
7468            graphql_client: self.graphql_client.clone(),
7469        }
7470    }
7471    /// Set a variable of type SDKConfig in the llm environment
7472    ///
7473    /// # Arguments
7474    ///
7475    /// * `name` - The name of the variable
7476    /// * `value` - The SDKConfig value to assign to the variable
7477    pub fn set_sdk_config(&self, name: impl Into<String>, value: impl IntoID<SdkConfigId>) -> Llm {
7478        let mut query = self.selection.select("setSDKConfig");
7479        query = query.arg("name", name.into());
7480        query = query.arg_lazy(
7481            "value",
7482            Box::new(move || {
7483                let value = value.clone();
7484                Box::pin(async move { value.into_id().await.unwrap().quote() })
7485            }),
7486        );
7487        Llm {
7488            proc: self.proc.clone(),
7489            selection: query,
7490            graphql_client: self.graphql_client.clone(),
7491        }
7492    }
7493    /// Set a variable of type ScalarTypeDef in the llm environment
7494    ///
7495    /// # Arguments
7496    ///
7497    /// * `name` - The name of the variable
7498    /// * `value` - The ScalarTypeDef value to assign to the variable
7499    pub fn set_scalar_type_def(
7500        &self,
7501        name: impl Into<String>,
7502        value: impl IntoID<ScalarTypeDefId>,
7503    ) -> Llm {
7504        let mut query = self.selection.select("setScalarTypeDef");
7505        query = query.arg("name", name.into());
7506        query = query.arg_lazy(
7507            "value",
7508            Box::new(move || {
7509                let value = value.clone();
7510                Box::pin(async move { value.into_id().await.unwrap().quote() })
7511            }),
7512        );
7513        Llm {
7514            proc: self.proc.clone(),
7515            selection: query,
7516            graphql_client: self.graphql_client.clone(),
7517        }
7518    }
7519    /// Set a variable of type Secret in the llm environment
7520    ///
7521    /// # Arguments
7522    ///
7523    /// * `name` - The name of the variable
7524    /// * `value` - The Secret value to assign to the variable
7525    pub fn set_secret(&self, name: impl Into<String>, value: impl IntoID<SecretId>) -> Llm {
7526        let mut query = self.selection.select("setSecret");
7527        query = query.arg("name", name.into());
7528        query = query.arg_lazy(
7529            "value",
7530            Box::new(move || {
7531                let value = value.clone();
7532                Box::pin(async move { value.into_id().await.unwrap().quote() })
7533            }),
7534        );
7535        Llm {
7536            proc: self.proc.clone(),
7537            selection: query,
7538            graphql_client: self.graphql_client.clone(),
7539        }
7540    }
7541    /// Set a variable of type Service in the llm environment
7542    ///
7543    /// # Arguments
7544    ///
7545    /// * `name` - The name of the variable
7546    /// * `value` - The Service value to assign to the variable
7547    pub fn set_service(&self, name: impl Into<String>, value: impl IntoID<ServiceId>) -> Llm {
7548        let mut query = self.selection.select("setService");
7549        query = query.arg("name", name.into());
7550        query = query.arg_lazy(
7551            "value",
7552            Box::new(move || {
7553                let value = value.clone();
7554                Box::pin(async move { value.into_id().await.unwrap().quote() })
7555            }),
7556        );
7557        Llm {
7558            proc: self.proc.clone(),
7559            selection: query,
7560            graphql_client: self.graphql_client.clone(),
7561        }
7562    }
7563    /// Set a variable of type Socket in the llm environment
7564    ///
7565    /// # Arguments
7566    ///
7567    /// * `name` - The name of the variable
7568    /// * `value` - The Socket value to assign to the variable
7569    pub fn set_socket(&self, name: impl Into<String>, value: impl IntoID<SocketId>) -> Llm {
7570        let mut query = self.selection.select("setSocket");
7571        query = query.arg("name", name.into());
7572        query = query.arg_lazy(
7573            "value",
7574            Box::new(move || {
7575                let value = value.clone();
7576                Box::pin(async move { value.into_id().await.unwrap().quote() })
7577            }),
7578        );
7579        Llm {
7580            proc: self.proc.clone(),
7581            selection: query,
7582            graphql_client: self.graphql_client.clone(),
7583        }
7584    }
7585    /// Set a variable of type SourceMap in the llm environment
7586    ///
7587    /// # Arguments
7588    ///
7589    /// * `name` - The name of the variable
7590    /// * `value` - The SourceMap value to assign to the variable
7591    pub fn set_source_map(&self, name: impl Into<String>, value: impl IntoID<SourceMapId>) -> Llm {
7592        let mut query = self.selection.select("setSourceMap");
7593        query = query.arg("name", name.into());
7594        query = query.arg_lazy(
7595            "value",
7596            Box::new(move || {
7597                let value = value.clone();
7598                Box::pin(async move { value.into_id().await.unwrap().quote() })
7599            }),
7600        );
7601        Llm {
7602            proc: self.proc.clone(),
7603            selection: query,
7604            graphql_client: self.graphql_client.clone(),
7605        }
7606    }
7607    /// Add a string variable to the LLM's environment
7608    ///
7609    /// # Arguments
7610    ///
7611    /// * `name` - The variable name
7612    /// * `value` - The variable value
7613    pub fn set_string(&self, name: impl Into<String>, value: impl Into<String>) -> Llm {
7614        let mut query = self.selection.select("setString");
7615        query = query.arg("name", name.into());
7616        query = query.arg("value", value.into());
7617        Llm {
7618            proc: self.proc.clone(),
7619            selection: query,
7620            graphql_client: self.graphql_client.clone(),
7621        }
7622    }
7623    /// Set a variable of type Terminal in the llm environment
7624    ///
7625    /// # Arguments
7626    ///
7627    /// * `name` - The name of the variable
7628    /// * `value` - The Terminal value to assign to the variable
7629    pub fn set_terminal(&self, name: impl Into<String>, value: impl IntoID<TerminalId>) -> Llm {
7630        let mut query = self.selection.select("setTerminal");
7631        query = query.arg("name", name.into());
7632        query = query.arg_lazy(
7633            "value",
7634            Box::new(move || {
7635                let value = value.clone();
7636                Box::pin(async move { value.into_id().await.unwrap().quote() })
7637            }),
7638        );
7639        Llm {
7640            proc: self.proc.clone(),
7641            selection: query,
7642            graphql_client: self.graphql_client.clone(),
7643        }
7644    }
7645    /// Set a variable of type TypeDef in the llm environment
7646    ///
7647    /// # Arguments
7648    ///
7649    /// * `name` - The name of the variable
7650    /// * `value` - The TypeDef value to assign to the variable
7651    pub fn set_type_def(&self, name: impl Into<String>, value: impl IntoID<TypeDefId>) -> Llm {
7652        let mut query = self.selection.select("setTypeDef");
7653        query = query.arg("name", name.into());
7654        query = query.arg_lazy(
7655            "value",
7656            Box::new(move || {
7657                let value = value.clone();
7658                Box::pin(async move { value.into_id().await.unwrap().quote() })
7659            }),
7660        );
7661        Llm {
7662            proc: self.proc.clone(),
7663            selection: query,
7664            graphql_client: self.graphql_client.clone(),
7665        }
7666    }
7667    /// Retrieve a the current value in the LLM environment, of type Socket
7668    pub fn socket(&self) -> Socket {
7669        let query = self.selection.select("socket");
7670        Socket {
7671            proc: self.proc.clone(),
7672            selection: query,
7673            graphql_client: self.graphql_client.clone(),
7674        }
7675    }
7676    /// Retrieve a the current value in the LLM environment, of type SourceMap
7677    pub fn source_map(&self) -> SourceMap {
7678        let query = self.selection.select("sourceMap");
7679        SourceMap {
7680            proc: self.proc.clone(),
7681            selection: query,
7682            graphql_client: self.graphql_client.clone(),
7683        }
7684    }
7685    /// synchronize LLM state
7686    pub async fn sync(&self) -> Result<Llmid, DaggerError> {
7687        let query = self.selection.select("sync");
7688        query.execute(self.graphql_client.clone()).await
7689    }
7690    /// Retrieve a the current value in the LLM environment, of type Terminal
7691    pub fn terminal(&self) -> Terminal {
7692        let query = self.selection.select("terminal");
7693        Terminal {
7694            proc: self.proc.clone(),
7695            selection: query,
7696            graphql_client: self.graphql_client.clone(),
7697        }
7698    }
7699    /// print documentation for available tools
7700    pub async fn tools(&self) -> Result<String, DaggerError> {
7701        let query = self.selection.select("tools");
7702        query.execute(self.graphql_client.clone()).await
7703    }
7704    /// Retrieve a the current value in the LLM environment, of type TypeDef
7705    pub fn type_def(&self) -> TypeDef {
7706        let query = self.selection.select("typeDef");
7707        TypeDef {
7708            proc: self.proc.clone(),
7709            selection: query,
7710            graphql_client: self.graphql_client.clone(),
7711        }
7712    }
7713    /// list variables in the LLM environment
7714    pub fn variables(&self) -> Vec<LlmVariable> {
7715        let query = self.selection.select("variables");
7716        vec![LlmVariable {
7717            proc: self.proc.clone(),
7718            selection: query,
7719            graphql_client: self.graphql_client.clone(),
7720        }]
7721    }
7722    /// Set a variable of type CacheVolume in the llm environment
7723    ///
7724    /// # Arguments
7725    ///
7726    /// * `value` - The CacheVolume value to assign to the variable
7727    pub fn with_cache_volume(&self, value: impl IntoID<CacheVolumeId>) -> Llm {
7728        let mut query = self.selection.select("withCacheVolume");
7729        query = query.arg_lazy(
7730            "value",
7731            Box::new(move || {
7732                let value = value.clone();
7733                Box::pin(async move { value.into_id().await.unwrap().quote() })
7734            }),
7735        );
7736        Llm {
7737            proc: self.proc.clone(),
7738            selection: query,
7739            graphql_client: self.graphql_client.clone(),
7740        }
7741    }
7742    /// Set a variable of type Container in the llm environment
7743    ///
7744    /// # Arguments
7745    ///
7746    /// * `value` - The Container value to assign to the variable
7747    pub fn with_container(&self, value: impl IntoID<ContainerId>) -> Llm {
7748        let mut query = self.selection.select("withContainer");
7749        query = query.arg_lazy(
7750            "value",
7751            Box::new(move || {
7752                let value = value.clone();
7753                Box::pin(async move { value.into_id().await.unwrap().quote() })
7754            }),
7755        );
7756        Llm {
7757            proc: self.proc.clone(),
7758            selection: query,
7759            graphql_client: self.graphql_client.clone(),
7760        }
7761    }
7762    /// Set a variable of type CurrentModule in the llm environment
7763    ///
7764    /// # Arguments
7765    ///
7766    /// * `value` - The CurrentModule value to assign to the variable
7767    pub fn with_current_module(&self, value: impl IntoID<CurrentModuleId>) -> Llm {
7768        let mut query = self.selection.select("withCurrentModule");
7769        query = query.arg_lazy(
7770            "value",
7771            Box::new(move || {
7772                let value = value.clone();
7773                Box::pin(async move { value.into_id().await.unwrap().quote() })
7774            }),
7775        );
7776        Llm {
7777            proc: self.proc.clone(),
7778            selection: query,
7779            graphql_client: self.graphql_client.clone(),
7780        }
7781    }
7782    /// Set a variable of type Directory in the llm environment
7783    ///
7784    /// # Arguments
7785    ///
7786    /// * `value` - The Directory value to assign to the variable
7787    pub fn with_directory(&self, value: impl IntoID<DirectoryId>) -> Llm {
7788        let mut query = self.selection.select("withDirectory");
7789        query = query.arg_lazy(
7790            "value",
7791            Box::new(move || {
7792                let value = value.clone();
7793                Box::pin(async move { value.into_id().await.unwrap().quote() })
7794            }),
7795        );
7796        Llm {
7797            proc: self.proc.clone(),
7798            selection: query,
7799            graphql_client: self.graphql_client.clone(),
7800        }
7801    }
7802    /// Set a variable of type EnumTypeDef in the llm environment
7803    ///
7804    /// # Arguments
7805    ///
7806    /// * `value` - The EnumTypeDef value to assign to the variable
7807    pub fn with_enum_type_def(&self, value: impl IntoID<EnumTypeDefId>) -> Llm {
7808        let mut query = self.selection.select("withEnumTypeDef");
7809        query = query.arg_lazy(
7810            "value",
7811            Box::new(move || {
7812                let value = value.clone();
7813                Box::pin(async move { value.into_id().await.unwrap().quote() })
7814            }),
7815        );
7816        Llm {
7817            proc: self.proc.clone(),
7818            selection: query,
7819            graphql_client: self.graphql_client.clone(),
7820        }
7821    }
7822    /// Set a variable of type EnumValueTypeDef in the llm environment
7823    ///
7824    /// # Arguments
7825    ///
7826    /// * `value` - The EnumValueTypeDef value to assign to the variable
7827    pub fn with_enum_value_type_def(&self, value: impl IntoID<EnumValueTypeDefId>) -> Llm {
7828        let mut query = self.selection.select("withEnumValueTypeDef");
7829        query = query.arg_lazy(
7830            "value",
7831            Box::new(move || {
7832                let value = value.clone();
7833                Box::pin(async move { value.into_id().await.unwrap().quote() })
7834            }),
7835        );
7836        Llm {
7837            proc: self.proc.clone(),
7838            selection: query,
7839            graphql_client: self.graphql_client.clone(),
7840        }
7841    }
7842    /// Set a variable of type Error in the llm environment
7843    ///
7844    /// # Arguments
7845    ///
7846    /// * `value` - The Error value to assign to the variable
7847    pub fn with_error(&self, value: impl IntoID<ErrorId>) -> Llm {
7848        let mut query = self.selection.select("withError");
7849        query = query.arg_lazy(
7850            "value",
7851            Box::new(move || {
7852                let value = value.clone();
7853                Box::pin(async move { value.into_id().await.unwrap().quote() })
7854            }),
7855        );
7856        Llm {
7857            proc: self.proc.clone(),
7858            selection: query,
7859            graphql_client: self.graphql_client.clone(),
7860        }
7861    }
7862    /// Set a variable of type ErrorValue in the llm environment
7863    ///
7864    /// # Arguments
7865    ///
7866    /// * `value` - The ErrorValue value to assign to the variable
7867    pub fn with_error_value(&self, value: impl IntoID<ErrorValueId>) -> Llm {
7868        let mut query = self.selection.select("withErrorValue");
7869        query = query.arg_lazy(
7870            "value",
7871            Box::new(move || {
7872                let value = value.clone();
7873                Box::pin(async move { value.into_id().await.unwrap().quote() })
7874            }),
7875        );
7876        Llm {
7877            proc: self.proc.clone(),
7878            selection: query,
7879            graphql_client: self.graphql_client.clone(),
7880        }
7881    }
7882    /// Set a variable of type FieldTypeDef in the llm environment
7883    ///
7884    /// # Arguments
7885    ///
7886    /// * `value` - The FieldTypeDef value to assign to the variable
7887    pub fn with_field_type_def(&self, value: impl IntoID<FieldTypeDefId>) -> Llm {
7888        let mut query = self.selection.select("withFieldTypeDef");
7889        query = query.arg_lazy(
7890            "value",
7891            Box::new(move || {
7892                let value = value.clone();
7893                Box::pin(async move { value.into_id().await.unwrap().quote() })
7894            }),
7895        );
7896        Llm {
7897            proc: self.proc.clone(),
7898            selection: query,
7899            graphql_client: self.graphql_client.clone(),
7900        }
7901    }
7902    /// Set a variable of type File in the llm environment
7903    ///
7904    /// # Arguments
7905    ///
7906    /// * `value` - The File value to assign to the variable
7907    pub fn with_file(&self, value: impl IntoID<FileId>) -> Llm {
7908        let mut query = self.selection.select("withFile");
7909        query = query.arg_lazy(
7910            "value",
7911            Box::new(move || {
7912                let value = value.clone();
7913                Box::pin(async move { value.into_id().await.unwrap().quote() })
7914            }),
7915        );
7916        Llm {
7917            proc: self.proc.clone(),
7918            selection: query,
7919            graphql_client: self.graphql_client.clone(),
7920        }
7921    }
7922    /// Set a variable of type Function in the llm environment
7923    ///
7924    /// # Arguments
7925    ///
7926    /// * `value` - The Function value to assign to the variable
7927    pub fn with_function(&self, value: impl IntoID<FunctionId>) -> Llm {
7928        let mut query = self.selection.select("withFunction");
7929        query = query.arg_lazy(
7930            "value",
7931            Box::new(move || {
7932                let value = value.clone();
7933                Box::pin(async move { value.into_id().await.unwrap().quote() })
7934            }),
7935        );
7936        Llm {
7937            proc: self.proc.clone(),
7938            selection: query,
7939            graphql_client: self.graphql_client.clone(),
7940        }
7941    }
7942    /// Set a variable of type FunctionArg in the llm environment
7943    ///
7944    /// # Arguments
7945    ///
7946    /// * `value` - The FunctionArg value to assign to the variable
7947    pub fn with_function_arg(&self, value: impl IntoID<FunctionArgId>) -> Llm {
7948        let mut query = self.selection.select("withFunctionArg");
7949        query = query.arg_lazy(
7950            "value",
7951            Box::new(move || {
7952                let value = value.clone();
7953                Box::pin(async move { value.into_id().await.unwrap().quote() })
7954            }),
7955        );
7956        Llm {
7957            proc: self.proc.clone(),
7958            selection: query,
7959            graphql_client: self.graphql_client.clone(),
7960        }
7961    }
7962    /// Set a variable of type FunctionCall in the llm environment
7963    ///
7964    /// # Arguments
7965    ///
7966    /// * `value` - The FunctionCall value to assign to the variable
7967    pub fn with_function_call(&self, value: impl IntoID<FunctionCallId>) -> Llm {
7968        let mut query = self.selection.select("withFunctionCall");
7969        query = query.arg_lazy(
7970            "value",
7971            Box::new(move || {
7972                let value = value.clone();
7973                Box::pin(async move { value.into_id().await.unwrap().quote() })
7974            }),
7975        );
7976        Llm {
7977            proc: self.proc.clone(),
7978            selection: query,
7979            graphql_client: self.graphql_client.clone(),
7980        }
7981    }
7982    /// Set a variable of type FunctionCallArgValue in the llm environment
7983    ///
7984    /// # Arguments
7985    ///
7986    /// * `value` - The FunctionCallArgValue value to assign to the variable
7987    pub fn with_function_call_arg_value(&self, value: impl IntoID<FunctionCallArgValueId>) -> Llm {
7988        let mut query = self.selection.select("withFunctionCallArgValue");
7989        query = query.arg_lazy(
7990            "value",
7991            Box::new(move || {
7992                let value = value.clone();
7993                Box::pin(async move { value.into_id().await.unwrap().quote() })
7994            }),
7995        );
7996        Llm {
7997            proc: self.proc.clone(),
7998            selection: query,
7999            graphql_client: self.graphql_client.clone(),
8000        }
8001    }
8002    /// Set a variable of type GeneratedCode in the llm environment
8003    ///
8004    /// # Arguments
8005    ///
8006    /// * `value` - The GeneratedCode value to assign to the variable
8007    pub fn with_generated_code(&self, value: impl IntoID<GeneratedCodeId>) -> Llm {
8008        let mut query = self.selection.select("withGeneratedCode");
8009        query = query.arg_lazy(
8010            "value",
8011            Box::new(move || {
8012                let value = value.clone();
8013                Box::pin(async move { value.into_id().await.unwrap().quote() })
8014            }),
8015        );
8016        Llm {
8017            proc: self.proc.clone(),
8018            selection: query,
8019            graphql_client: self.graphql_client.clone(),
8020        }
8021    }
8022    /// Set a variable of type GitRef in the llm environment
8023    ///
8024    /// # Arguments
8025    ///
8026    /// * `value` - The GitRef value to assign to the variable
8027    pub fn with_git_ref(&self, value: impl IntoID<GitRefId>) -> Llm {
8028        let mut query = self.selection.select("withGitRef");
8029        query = query.arg_lazy(
8030            "value",
8031            Box::new(move || {
8032                let value = value.clone();
8033                Box::pin(async move { value.into_id().await.unwrap().quote() })
8034            }),
8035        );
8036        Llm {
8037            proc: self.proc.clone(),
8038            selection: query,
8039            graphql_client: self.graphql_client.clone(),
8040        }
8041    }
8042    /// Set a variable of type GitRepository in the llm environment
8043    ///
8044    /// # Arguments
8045    ///
8046    /// * `value` - The GitRepository value to assign to the variable
8047    pub fn with_git_repository(&self, value: impl IntoID<GitRepositoryId>) -> Llm {
8048        let mut query = self.selection.select("withGitRepository");
8049        query = query.arg_lazy(
8050            "value",
8051            Box::new(move || {
8052                let value = value.clone();
8053                Box::pin(async move { value.into_id().await.unwrap().quote() })
8054            }),
8055        );
8056        Llm {
8057            proc: self.proc.clone(),
8058            selection: query,
8059            graphql_client: self.graphql_client.clone(),
8060        }
8061    }
8062    /// Set a variable of type InputTypeDef in the llm environment
8063    ///
8064    /// # Arguments
8065    ///
8066    /// * `value` - The InputTypeDef value to assign to the variable
8067    pub fn with_input_type_def(&self, value: impl IntoID<InputTypeDefId>) -> Llm {
8068        let mut query = self.selection.select("withInputTypeDef");
8069        query = query.arg_lazy(
8070            "value",
8071            Box::new(move || {
8072                let value = value.clone();
8073                Box::pin(async move { value.into_id().await.unwrap().quote() })
8074            }),
8075        );
8076        Llm {
8077            proc: self.proc.clone(),
8078            selection: query,
8079            graphql_client: self.graphql_client.clone(),
8080        }
8081    }
8082    /// Set a variable of type InterfaceTypeDef in the llm environment
8083    ///
8084    /// # Arguments
8085    ///
8086    /// * `value` - The InterfaceTypeDef value to assign to the variable
8087    pub fn with_interface_type_def(&self, value: impl IntoID<InterfaceTypeDefId>) -> Llm {
8088        let mut query = self.selection.select("withInterfaceTypeDef");
8089        query = query.arg_lazy(
8090            "value",
8091            Box::new(move || {
8092                let value = value.clone();
8093                Box::pin(async move { value.into_id().await.unwrap().quote() })
8094            }),
8095        );
8096        Llm {
8097            proc: self.proc.clone(),
8098            selection: query,
8099            graphql_client: self.graphql_client.clone(),
8100        }
8101    }
8102    /// Set a variable of type LLM in the llm environment
8103    ///
8104    /// # Arguments
8105    ///
8106    /// * `value` - The LLM value to assign to the variable
8107    pub fn with_llm(&self, value: impl IntoID<Llmid>) -> Llm {
8108        let mut query = self.selection.select("withLLM");
8109        query = query.arg_lazy(
8110            "value",
8111            Box::new(move || {
8112                let value = value.clone();
8113                Box::pin(async move { value.into_id().await.unwrap().quote() })
8114            }),
8115        );
8116        Llm {
8117            proc: self.proc.clone(),
8118            selection: query,
8119            graphql_client: self.graphql_client.clone(),
8120        }
8121    }
8122    /// Set a variable of type ListTypeDef in the llm environment
8123    ///
8124    /// # Arguments
8125    ///
8126    /// * `value` - The ListTypeDef value to assign to the variable
8127    pub fn with_list_type_def(&self, value: impl IntoID<ListTypeDefId>) -> Llm {
8128        let mut query = self.selection.select("withListTypeDef");
8129        query = query.arg_lazy(
8130            "value",
8131            Box::new(move || {
8132                let value = value.clone();
8133                Box::pin(async move { value.into_id().await.unwrap().quote() })
8134            }),
8135        );
8136        Llm {
8137            proc: self.proc.clone(),
8138            selection: query,
8139            graphql_client: self.graphql_client.clone(),
8140        }
8141    }
8142    /// swap out the llm model
8143    ///
8144    /// # Arguments
8145    ///
8146    /// * `model` - The model to use
8147    pub fn with_model(&self, model: impl Into<String>) -> Llm {
8148        let mut query = self.selection.select("withModel");
8149        query = query.arg("model", model.into());
8150        Llm {
8151            proc: self.proc.clone(),
8152            selection: query,
8153            graphql_client: self.graphql_client.clone(),
8154        }
8155    }
8156    /// Set a variable of type Module in the llm environment
8157    ///
8158    /// # Arguments
8159    ///
8160    /// * `value` - The Module value to assign to the variable
8161    pub fn with_module(&self, value: impl IntoID<ModuleId>) -> Llm {
8162        let mut query = self.selection.select("withModule");
8163        query = query.arg_lazy(
8164            "value",
8165            Box::new(move || {
8166                let value = value.clone();
8167                Box::pin(async move { value.into_id().await.unwrap().quote() })
8168            }),
8169        );
8170        Llm {
8171            proc: self.proc.clone(),
8172            selection: query,
8173            graphql_client: self.graphql_client.clone(),
8174        }
8175    }
8176    /// Set a variable of type ModuleConfigClient in the llm environment
8177    ///
8178    /// # Arguments
8179    ///
8180    /// * `value` - The ModuleConfigClient value to assign to the variable
8181    pub fn with_module_config_client(&self, value: impl IntoID<ModuleConfigClientId>) -> Llm {
8182        let mut query = self.selection.select("withModuleConfigClient");
8183        query = query.arg_lazy(
8184            "value",
8185            Box::new(move || {
8186                let value = value.clone();
8187                Box::pin(async move { value.into_id().await.unwrap().quote() })
8188            }),
8189        );
8190        Llm {
8191            proc: self.proc.clone(),
8192            selection: query,
8193            graphql_client: self.graphql_client.clone(),
8194        }
8195    }
8196    /// Set a variable of type ModuleSource in the llm environment
8197    ///
8198    /// # Arguments
8199    ///
8200    /// * `value` - The ModuleSource value to assign to the variable
8201    pub fn with_module_source(&self, value: impl IntoID<ModuleSourceId>) -> Llm {
8202        let mut query = self.selection.select("withModuleSource");
8203        query = query.arg_lazy(
8204            "value",
8205            Box::new(move || {
8206                let value = value.clone();
8207                Box::pin(async move { value.into_id().await.unwrap().quote() })
8208            }),
8209        );
8210        Llm {
8211            proc: self.proc.clone(),
8212            selection: query,
8213            graphql_client: self.graphql_client.clone(),
8214        }
8215    }
8216    /// Set a variable of type ObjectTypeDef in the llm environment
8217    ///
8218    /// # Arguments
8219    ///
8220    /// * `value` - The ObjectTypeDef value to assign to the variable
8221    pub fn with_object_type_def(&self, value: impl IntoID<ObjectTypeDefId>) -> Llm {
8222        let mut query = self.selection.select("withObjectTypeDef");
8223        query = query.arg_lazy(
8224            "value",
8225            Box::new(move || {
8226                let value = value.clone();
8227                Box::pin(async move { value.into_id().await.unwrap().quote() })
8228            }),
8229        );
8230        Llm {
8231            proc: self.proc.clone(),
8232            selection: query,
8233            graphql_client: self.graphql_client.clone(),
8234        }
8235    }
8236    /// append a prompt to the llm context
8237    ///
8238    /// # Arguments
8239    ///
8240    /// * `prompt` - The prompt to send
8241    pub fn with_prompt(&self, prompt: impl Into<String>) -> Llm {
8242        let mut query = self.selection.select("withPrompt");
8243        query = query.arg("prompt", prompt.into());
8244        Llm {
8245            proc: self.proc.clone(),
8246            selection: query,
8247            graphql_client: self.graphql_client.clone(),
8248        }
8249    }
8250    /// append the contents of a file to the llm context
8251    ///
8252    /// # Arguments
8253    ///
8254    /// * `file` - The file to read the prompt from
8255    pub fn with_prompt_file(&self, file: impl IntoID<FileId>) -> Llm {
8256        let mut query = self.selection.select("withPromptFile");
8257        query = query.arg_lazy(
8258            "file",
8259            Box::new(move || {
8260                let file = file.clone();
8261                Box::pin(async move { file.into_id().await.unwrap().quote() })
8262            }),
8263        );
8264        Llm {
8265            proc: self.proc.clone(),
8266            selection: query,
8267            graphql_client: self.graphql_client.clone(),
8268        }
8269    }
8270    /// Add a string variable to the LLM's environment
8271    ///
8272    /// # Arguments
8273    ///
8274    /// * `name` - The variable name
8275    /// * `value` - The variable value
8276    pub fn with_prompt_var(&self, name: impl Into<String>, value: impl Into<String>) -> Llm {
8277        let mut query = self.selection.select("withPromptVar");
8278        query = query.arg("name", name.into());
8279        query = query.arg("value", value.into());
8280        Llm {
8281            proc: self.proc.clone(),
8282            selection: query,
8283            graphql_client: self.graphql_client.clone(),
8284        }
8285    }
8286    /// Provide the entire Query object to the LLM
8287    pub fn with_query(&self) -> Llm {
8288        let query = self.selection.select("withQuery");
8289        Llm {
8290            proc: self.proc.clone(),
8291            selection: query,
8292            graphql_client: self.graphql_client.clone(),
8293        }
8294    }
8295    /// Set a variable of type SDKConfig in the llm environment
8296    ///
8297    /// # Arguments
8298    ///
8299    /// * `value` - The SDKConfig value to assign to the variable
8300    pub fn with_sdk_config(&self, value: impl IntoID<SdkConfigId>) -> Llm {
8301        let mut query = self.selection.select("withSDKConfig");
8302        query = query.arg_lazy(
8303            "value",
8304            Box::new(move || {
8305                let value = value.clone();
8306                Box::pin(async move { value.into_id().await.unwrap().quote() })
8307            }),
8308        );
8309        Llm {
8310            proc: self.proc.clone(),
8311            selection: query,
8312            graphql_client: self.graphql_client.clone(),
8313        }
8314    }
8315    /// Set a variable of type ScalarTypeDef in the llm environment
8316    ///
8317    /// # Arguments
8318    ///
8319    /// * `value` - The ScalarTypeDef value to assign to the variable
8320    pub fn with_scalar_type_def(&self, value: impl IntoID<ScalarTypeDefId>) -> Llm {
8321        let mut query = self.selection.select("withScalarTypeDef");
8322        query = query.arg_lazy(
8323            "value",
8324            Box::new(move || {
8325                let value = value.clone();
8326                Box::pin(async move { value.into_id().await.unwrap().quote() })
8327            }),
8328        );
8329        Llm {
8330            proc: self.proc.clone(),
8331            selection: query,
8332            graphql_client: self.graphql_client.clone(),
8333        }
8334    }
8335    /// Set a variable of type Secret in the llm environment
8336    ///
8337    /// # Arguments
8338    ///
8339    /// * `value` - The Secret value to assign to the variable
8340    pub fn with_secret(&self, value: impl IntoID<SecretId>) -> Llm {
8341        let mut query = self.selection.select("withSecret");
8342        query = query.arg_lazy(
8343            "value",
8344            Box::new(move || {
8345                let value = value.clone();
8346                Box::pin(async move { value.into_id().await.unwrap().quote() })
8347            }),
8348        );
8349        Llm {
8350            proc: self.proc.clone(),
8351            selection: query,
8352            graphql_client: self.graphql_client.clone(),
8353        }
8354    }
8355    /// Set a variable of type Service in the llm environment
8356    ///
8357    /// # Arguments
8358    ///
8359    /// * `value` - The Service value to assign to the variable
8360    pub fn with_service(&self, value: impl IntoID<ServiceId>) -> Llm {
8361        let mut query = self.selection.select("withService");
8362        query = query.arg_lazy(
8363            "value",
8364            Box::new(move || {
8365                let value = value.clone();
8366                Box::pin(async move { value.into_id().await.unwrap().quote() })
8367            }),
8368        );
8369        Llm {
8370            proc: self.proc.clone(),
8371            selection: query,
8372            graphql_client: self.graphql_client.clone(),
8373        }
8374    }
8375    /// Set a variable of type Socket in the llm environment
8376    ///
8377    /// # Arguments
8378    ///
8379    /// * `value` - The Socket value to assign to the variable
8380    pub fn with_socket(&self, value: impl IntoID<SocketId>) -> Llm {
8381        let mut query = self.selection.select("withSocket");
8382        query = query.arg_lazy(
8383            "value",
8384            Box::new(move || {
8385                let value = value.clone();
8386                Box::pin(async move { value.into_id().await.unwrap().quote() })
8387            }),
8388        );
8389        Llm {
8390            proc: self.proc.clone(),
8391            selection: query,
8392            graphql_client: self.graphql_client.clone(),
8393        }
8394    }
8395    /// Set a variable of type SourceMap in the llm environment
8396    ///
8397    /// # Arguments
8398    ///
8399    /// * `value` - The SourceMap value to assign to the variable
8400    pub fn with_source_map(&self, value: impl IntoID<SourceMapId>) -> Llm {
8401        let mut query = self.selection.select("withSourceMap");
8402        query = query.arg_lazy(
8403            "value",
8404            Box::new(move || {
8405                let value = value.clone();
8406                Box::pin(async move { value.into_id().await.unwrap().quote() })
8407            }),
8408        );
8409        Llm {
8410            proc: self.proc.clone(),
8411            selection: query,
8412            graphql_client: self.graphql_client.clone(),
8413        }
8414    }
8415    /// Set a variable of type Terminal in the llm environment
8416    ///
8417    /// # Arguments
8418    ///
8419    /// * `value` - The Terminal value to assign to the variable
8420    pub fn with_terminal(&self, value: impl IntoID<TerminalId>) -> Llm {
8421        let mut query = self.selection.select("withTerminal");
8422        query = query.arg_lazy(
8423            "value",
8424            Box::new(move || {
8425                let value = value.clone();
8426                Box::pin(async move { value.into_id().await.unwrap().quote() })
8427            }),
8428        );
8429        Llm {
8430            proc: self.proc.clone(),
8431            selection: query,
8432            graphql_client: self.graphql_client.clone(),
8433        }
8434    }
8435    /// Set a variable of type TypeDef in the llm environment
8436    ///
8437    /// # Arguments
8438    ///
8439    /// * `value` - The TypeDef value to assign to the variable
8440    pub fn with_type_def(&self, value: impl IntoID<TypeDefId>) -> Llm {
8441        let mut query = self.selection.select("withTypeDef");
8442        query = query.arg_lazy(
8443            "value",
8444            Box::new(move || {
8445                let value = value.clone();
8446                Box::pin(async move { value.into_id().await.unwrap().quote() })
8447            }),
8448        );
8449        Llm {
8450            proc: self.proc.clone(),
8451            selection: query,
8452            graphql_client: self.graphql_client.clone(),
8453        }
8454    }
8455}
8456#[derive(Clone)]
8457pub struct LlmVariable {
8458    pub proc: Option<Arc<DaggerSessionProc>>,
8459    pub selection: Selection,
8460    pub graphql_client: DynGraphQLClient,
8461}
8462impl LlmVariable {
8463    pub async fn hash(&self) -> Result<String, DaggerError> {
8464        let query = self.selection.select("hash");
8465        query.execute(self.graphql_client.clone()).await
8466    }
8467    /// A unique identifier for this LLMVariable.
8468    pub async fn id(&self) -> Result<LlmVariableId, DaggerError> {
8469        let query = self.selection.select("id");
8470        query.execute(self.graphql_client.clone()).await
8471    }
8472    pub async fn name(&self) -> Result<String, DaggerError> {
8473        let query = self.selection.select("name");
8474        query.execute(self.graphql_client.clone()).await
8475    }
8476    pub async fn type_name(&self) -> Result<String, DaggerError> {
8477        let query = self.selection.select("typeName");
8478        query.execute(self.graphql_client.clone()).await
8479    }
8480}
8481#[derive(Clone)]
8482pub struct Label {
8483    pub proc: Option<Arc<DaggerSessionProc>>,
8484    pub selection: Selection,
8485    pub graphql_client: DynGraphQLClient,
8486}
8487impl Label {
8488    /// A unique identifier for this Label.
8489    pub async fn id(&self) -> Result<LabelId, DaggerError> {
8490        let query = self.selection.select("id");
8491        query.execute(self.graphql_client.clone()).await
8492    }
8493    /// The label name.
8494    pub async fn name(&self) -> Result<String, DaggerError> {
8495        let query = self.selection.select("name");
8496        query.execute(self.graphql_client.clone()).await
8497    }
8498    /// The label value.
8499    pub async fn value(&self) -> Result<String, DaggerError> {
8500        let query = self.selection.select("value");
8501        query.execute(self.graphql_client.clone()).await
8502    }
8503}
8504#[derive(Clone)]
8505pub struct ListTypeDef {
8506    pub proc: Option<Arc<DaggerSessionProc>>,
8507    pub selection: Selection,
8508    pub graphql_client: DynGraphQLClient,
8509}
8510impl ListTypeDef {
8511    /// The type of the elements in the list.
8512    pub fn element_type_def(&self) -> TypeDef {
8513        let query = self.selection.select("elementTypeDef");
8514        TypeDef {
8515            proc: self.proc.clone(),
8516            selection: query,
8517            graphql_client: self.graphql_client.clone(),
8518        }
8519    }
8520    /// A unique identifier for this ListTypeDef.
8521    pub async fn id(&self) -> Result<ListTypeDefId, DaggerError> {
8522        let query = self.selection.select("id");
8523        query.execute(self.graphql_client.clone()).await
8524    }
8525}
8526#[derive(Clone)]
8527pub struct Module {
8528    pub proc: Option<Arc<DaggerSessionProc>>,
8529    pub selection: Selection,
8530    pub graphql_client: DynGraphQLClient,
8531}
8532impl Module {
8533    /// The dependencies of the module.
8534    pub fn dependencies(&self) -> Vec<Module> {
8535        let query = self.selection.select("dependencies");
8536        vec![Module {
8537            proc: self.proc.clone(),
8538            selection: query,
8539            graphql_client: self.graphql_client.clone(),
8540        }]
8541    }
8542    /// The doc string of the module, if any
8543    pub async fn description(&self) -> Result<String, DaggerError> {
8544        let query = self.selection.select("description");
8545        query.execute(self.graphql_client.clone()).await
8546    }
8547    /// Enumerations served by this module.
8548    pub fn enums(&self) -> Vec<TypeDef> {
8549        let query = self.selection.select("enums");
8550        vec![TypeDef {
8551            proc: self.proc.clone(),
8552            selection: query,
8553            graphql_client: self.graphql_client.clone(),
8554        }]
8555    }
8556    /// The generated files and directories made on top of the module source's context directory.
8557    pub fn generated_context_directory(&self) -> Directory {
8558        let query = self.selection.select("generatedContextDirectory");
8559        Directory {
8560            proc: self.proc.clone(),
8561            selection: query,
8562            graphql_client: self.graphql_client.clone(),
8563        }
8564    }
8565    /// A unique identifier for this Module.
8566    pub async fn id(&self) -> Result<ModuleId, DaggerError> {
8567        let query = self.selection.select("id");
8568        query.execute(self.graphql_client.clone()).await
8569    }
8570    /// Interfaces served by this module.
8571    pub fn interfaces(&self) -> Vec<TypeDef> {
8572        let query = self.selection.select("interfaces");
8573        vec![TypeDef {
8574            proc: self.proc.clone(),
8575            selection: query,
8576            graphql_client: self.graphql_client.clone(),
8577        }]
8578    }
8579    /// The name of the module
8580    pub async fn name(&self) -> Result<String, DaggerError> {
8581        let query = self.selection.select("name");
8582        query.execute(self.graphql_client.clone()).await
8583    }
8584    /// Objects served by this module.
8585    pub fn objects(&self) -> Vec<TypeDef> {
8586        let query = self.selection.select("objects");
8587        vec![TypeDef {
8588            proc: self.proc.clone(),
8589            selection: query,
8590            graphql_client: self.graphql_client.clone(),
8591        }]
8592    }
8593    /// The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
8594    pub fn runtime(&self) -> Container {
8595        let query = self.selection.select("runtime");
8596        Container {
8597            proc: self.proc.clone(),
8598            selection: query,
8599            graphql_client: self.graphql_client.clone(),
8600        }
8601    }
8602    /// The SDK config used by this module.
8603    pub fn sdk(&self) -> SdkConfig {
8604        let query = self.selection.select("sdk");
8605        SdkConfig {
8606            proc: self.proc.clone(),
8607            selection: query,
8608            graphql_client: self.graphql_client.clone(),
8609        }
8610    }
8611    /// Serve a module's API in the current session.
8612    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
8613    pub async fn serve(&self) -> Result<Void, DaggerError> {
8614        let query = self.selection.select("serve");
8615        query.execute(self.graphql_client.clone()).await
8616    }
8617    /// The source for the module.
8618    pub fn source(&self) -> ModuleSource {
8619        let query = self.selection.select("source");
8620        ModuleSource {
8621            proc: self.proc.clone(),
8622            selection: query,
8623            graphql_client: self.graphql_client.clone(),
8624        }
8625    }
8626    /// Forces evaluation of the module, including any loading into the engine and associated validation.
8627    pub async fn sync(&self) -> Result<ModuleId, DaggerError> {
8628        let query = self.selection.select("sync");
8629        query.execute(self.graphql_client.clone()).await
8630    }
8631    /// Retrieves the module with the given description
8632    ///
8633    /// # Arguments
8634    ///
8635    /// * `description` - The description to set
8636    pub fn with_description(&self, description: impl Into<String>) -> Module {
8637        let mut query = self.selection.select("withDescription");
8638        query = query.arg("description", description.into());
8639        Module {
8640            proc: self.proc.clone(),
8641            selection: query,
8642            graphql_client: self.graphql_client.clone(),
8643        }
8644    }
8645    /// This module plus the given Enum type and associated values
8646    pub fn with_enum(&self, r#enum: impl IntoID<TypeDefId>) -> Module {
8647        let mut query = self.selection.select("withEnum");
8648        query = query.arg_lazy(
8649            "enum",
8650            Box::new(move || {
8651                let r#enum = r#enum.clone();
8652                Box::pin(async move { r#enum.into_id().await.unwrap().quote() })
8653            }),
8654        );
8655        Module {
8656            proc: self.proc.clone(),
8657            selection: query,
8658            graphql_client: self.graphql_client.clone(),
8659        }
8660    }
8661    /// This module plus the given Interface type and associated functions
8662    pub fn with_interface(&self, iface: impl IntoID<TypeDefId>) -> Module {
8663        let mut query = self.selection.select("withInterface");
8664        query = query.arg_lazy(
8665            "iface",
8666            Box::new(move || {
8667                let iface = iface.clone();
8668                Box::pin(async move { iface.into_id().await.unwrap().quote() })
8669            }),
8670        );
8671        Module {
8672            proc: self.proc.clone(),
8673            selection: query,
8674            graphql_client: self.graphql_client.clone(),
8675        }
8676    }
8677    /// This module plus the given Object type and associated functions.
8678    pub fn with_object(&self, object: impl IntoID<TypeDefId>) -> Module {
8679        let mut query = self.selection.select("withObject");
8680        query = query.arg_lazy(
8681            "object",
8682            Box::new(move || {
8683                let object = object.clone();
8684                Box::pin(async move { object.into_id().await.unwrap().quote() })
8685            }),
8686        );
8687        Module {
8688            proc: self.proc.clone(),
8689            selection: query,
8690            graphql_client: self.graphql_client.clone(),
8691        }
8692    }
8693}
8694#[derive(Clone)]
8695pub struct ModuleConfigClient {
8696    pub proc: Option<Arc<DaggerSessionProc>>,
8697    pub selection: Selection,
8698    pub graphql_client: DynGraphQLClient,
8699}
8700impl ModuleConfigClient {
8701    /// If true, generate the client in developer mode.
8702    pub async fn dev(&self) -> Result<bool, DaggerError> {
8703        let query = self.selection.select("dev");
8704        query.execute(self.graphql_client.clone()).await
8705    }
8706    /// The directory the client is generated in.
8707    pub async fn directory(&self) -> Result<String, DaggerError> {
8708        let query = self.selection.select("directory");
8709        query.execute(self.graphql_client.clone()).await
8710    }
8711    /// The generator to use
8712    pub async fn generator(&self) -> Result<String, DaggerError> {
8713        let query = self.selection.select("generator");
8714        query.execute(self.graphql_client.clone()).await
8715    }
8716    /// A unique identifier for this ModuleConfigClient.
8717    pub async fn id(&self) -> Result<ModuleConfigClientId, DaggerError> {
8718        let query = self.selection.select("id");
8719        query.execute(self.graphql_client.clone()).await
8720    }
8721}
8722#[derive(Clone)]
8723pub struct ModuleSource {
8724    pub proc: Option<Arc<DaggerSessionProc>>,
8725    pub selection: Selection,
8726    pub graphql_client: DynGraphQLClient,
8727}
8728#[derive(Builder, Debug, PartialEq)]
8729pub struct ModuleSourceWithClientOpts {
8730    /// Generate in developer mode
8731    #[builder(setter(into, strip_option), default)]
8732    pub dev: Option<bool>,
8733}
8734impl ModuleSource {
8735    /// Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
8736    pub fn as_module(&self) -> Module {
8737        let query = self.selection.select("asModule");
8738        Module {
8739            proc: self.proc.clone(),
8740            selection: query,
8741            graphql_client: self.graphql_client.clone(),
8742        }
8743    }
8744    /// A human readable ref string representation of this module source.
8745    pub async fn as_string(&self) -> Result<String, DaggerError> {
8746        let query = self.selection.select("asString");
8747        query.execute(self.graphql_client.clone()).await
8748    }
8749    /// The ref to clone the root of the git repo from. Only valid for git sources.
8750    pub async fn clone_ref(&self) -> Result<String, DaggerError> {
8751        let query = self.selection.select("cloneRef");
8752        query.execute(self.graphql_client.clone()).await
8753    }
8754    /// The resolved commit of the git repo this source points to.
8755    pub async fn commit(&self) -> Result<String, DaggerError> {
8756        let query = self.selection.select("commit");
8757        query.execute(self.graphql_client.clone()).await
8758    }
8759    /// The clients generated for the module.
8760    pub fn config_clients(&self) -> Vec<ModuleConfigClient> {
8761        let query = self.selection.select("configClients");
8762        vec![ModuleConfigClient {
8763            proc: self.proc.clone(),
8764            selection: query,
8765            graphql_client: self.graphql_client.clone(),
8766        }]
8767    }
8768    /// Whether an existing dagger.json for the module was found.
8769    pub async fn config_exists(&self) -> Result<bool, DaggerError> {
8770        let query = self.selection.select("configExists");
8771        query.execute(self.graphql_client.clone()).await
8772    }
8773    /// The full directory loaded for the module source, including the source code as a subdirectory.
8774    pub fn context_directory(&self) -> Directory {
8775        let query = self.selection.select("contextDirectory");
8776        Directory {
8777            proc: self.proc.clone(),
8778            selection: query,
8779            graphql_client: self.graphql_client.clone(),
8780        }
8781    }
8782    /// The dependencies of the module source.
8783    pub fn dependencies(&self) -> Vec<ModuleSource> {
8784        let query = self.selection.select("dependencies");
8785        vec![ModuleSource {
8786            proc: self.proc.clone(),
8787            selection: query,
8788            graphql_client: self.graphql_client.clone(),
8789        }]
8790    }
8791    /// 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.
8792    pub async fn digest(&self) -> Result<String, DaggerError> {
8793        let query = self.selection.select("digest");
8794        query.execute(self.graphql_client.clone()).await
8795    }
8796    /// The directory containing the module configuration and source code (source code may be in a subdir).
8797    ///
8798    /// # Arguments
8799    ///
8800    /// * `path` - A subpath from the source directory to select.
8801    pub fn directory(&self, path: impl Into<String>) -> Directory {
8802        let mut query = self.selection.select("directory");
8803        query = query.arg("path", path.into());
8804        Directory {
8805            proc: self.proc.clone(),
8806            selection: query,
8807            graphql_client: self.graphql_client.clone(),
8808        }
8809    }
8810    /// The engine version of the module.
8811    pub async fn engine_version(&self) -> Result<String, DaggerError> {
8812        let query = self.selection.select("engineVersion");
8813        query.execute(self.graphql_client.clone()).await
8814    }
8815    /// The generated files and directories made on top of the module source's context directory.
8816    pub fn generated_context_directory(&self) -> Directory {
8817        let query = self.selection.select("generatedContextDirectory");
8818        Directory {
8819            proc: self.proc.clone(),
8820            selection: query,
8821            graphql_client: self.graphql_client.clone(),
8822        }
8823    }
8824    /// The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).
8825    pub async fn html_repo_url(&self) -> Result<String, DaggerError> {
8826        let query = self.selection.select("htmlRepoURL");
8827        query.execute(self.graphql_client.clone()).await
8828    }
8829    /// The URL to the source's git repo in a web browser. Only valid for git sources.
8830    pub async fn html_url(&self) -> Result<String, DaggerError> {
8831        let query = self.selection.select("htmlURL");
8832        query.execute(self.graphql_client.clone()).await
8833    }
8834    /// A unique identifier for this ModuleSource.
8835    pub async fn id(&self) -> Result<ModuleSourceId, DaggerError> {
8836        let query = self.selection.select("id");
8837        query.execute(self.graphql_client.clone()).await
8838    }
8839    /// The kind of module source (currently local, git or dir).
8840    pub async fn kind(&self) -> Result<ModuleSourceKind, DaggerError> {
8841        let query = self.selection.select("kind");
8842        query.execute(self.graphql_client.clone()).await
8843    }
8844    /// 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.
8845    pub async fn local_context_directory_path(&self) -> Result<String, DaggerError> {
8846        let query = self.selection.select("localContextDirectoryPath");
8847        query.execute(self.graphql_client.clone()).await
8848    }
8849    /// The name of the module, including any setting via the withName API.
8850    pub async fn module_name(&self) -> Result<String, DaggerError> {
8851        let query = self.selection.select("moduleName");
8852        query.execute(self.graphql_client.clone()).await
8853    }
8854    /// The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).
8855    pub async fn module_original_name(&self) -> Result<String, DaggerError> {
8856        let query = self.selection.select("moduleOriginalName");
8857        query.execute(self.graphql_client.clone()).await
8858    }
8859    /// The original subpath used when instantiating this module source, relative to the context directory.
8860    pub async fn original_subpath(&self) -> Result<String, DaggerError> {
8861        let query = self.selection.select("originalSubpath");
8862        query.execute(self.graphql_client.clone()).await
8863    }
8864    /// The pinned version of this module source.
8865    pub async fn pin(&self) -> Result<String, DaggerError> {
8866        let query = self.selection.select("pin");
8867        query.execute(self.graphql_client.clone()).await
8868    }
8869    /// The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
8870    pub async fn repo_root_path(&self) -> Result<String, DaggerError> {
8871        let query = self.selection.select("repoRootPath");
8872        query.execute(self.graphql_client.clone()).await
8873    }
8874    /// The SDK configuration of the module.
8875    pub fn sdk(&self) -> SdkConfig {
8876        let query = self.selection.select("sdk");
8877        SdkConfig {
8878            proc: self.proc.clone(),
8879            selection: query,
8880            graphql_client: self.graphql_client.clone(),
8881        }
8882    }
8883    /// The path, relative to the context directory, that contains the module's dagger.json.
8884    pub async fn source_root_subpath(&self) -> Result<String, DaggerError> {
8885        let query = self.selection.select("sourceRootSubpath");
8886        query.execute(self.graphql_client.clone()).await
8887    }
8888    /// The path to the directory containing the module's source code, relative to the context directory.
8889    pub async fn source_subpath(&self) -> Result<String, DaggerError> {
8890        let query = self.selection.select("sourceSubpath");
8891        query.execute(self.graphql_client.clone()).await
8892    }
8893    /// Forces evaluation of the module source, including any loading into the engine and associated validation.
8894    pub async fn sync(&self) -> Result<ModuleSourceId, DaggerError> {
8895        let query = self.selection.select("sync");
8896        query.execute(self.graphql_client.clone()).await
8897    }
8898    /// The specified version of the git repo this source points to.
8899    pub async fn version(&self) -> Result<String, DaggerError> {
8900        let query = self.selection.select("version");
8901        query.execute(self.graphql_client.clone()).await
8902    }
8903    /// Update the module source with a new client to generate.
8904    ///
8905    /// # Arguments
8906    ///
8907    /// * `generator` - The generator to use
8908    /// * `output_dir` - The output directory for the generated client.
8909    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8910    pub fn with_client(
8911        &self,
8912        generator: impl Into<String>,
8913        output_dir: impl Into<String>,
8914    ) -> ModuleSource {
8915        let mut query = self.selection.select("withClient");
8916        query = query.arg("generator", generator.into());
8917        query = query.arg("outputDir", output_dir.into());
8918        ModuleSource {
8919            proc: self.proc.clone(),
8920            selection: query,
8921            graphql_client: self.graphql_client.clone(),
8922        }
8923    }
8924    /// Update the module source with a new client to generate.
8925    ///
8926    /// # Arguments
8927    ///
8928    /// * `generator` - The generator to use
8929    /// * `output_dir` - The output directory for the generated client.
8930    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
8931    pub fn with_client_opts(
8932        &self,
8933        generator: impl Into<String>,
8934        output_dir: impl Into<String>,
8935        opts: ModuleSourceWithClientOpts,
8936    ) -> ModuleSource {
8937        let mut query = self.selection.select("withClient");
8938        query = query.arg("generator", generator.into());
8939        query = query.arg("outputDir", output_dir.into());
8940        if let Some(dev) = opts.dev {
8941            query = query.arg("dev", dev);
8942        }
8943        ModuleSource {
8944            proc: self.proc.clone(),
8945            selection: query,
8946            graphql_client: self.graphql_client.clone(),
8947        }
8948    }
8949    /// Append the provided dependencies to the module source's dependency list.
8950    ///
8951    /// # Arguments
8952    ///
8953    /// * `dependencies` - The dependencies to append.
8954    pub fn with_dependencies(&self, dependencies: Vec<ModuleSourceId>) -> ModuleSource {
8955        let mut query = self.selection.select("withDependencies");
8956        query = query.arg("dependencies", dependencies);
8957        ModuleSource {
8958            proc: self.proc.clone(),
8959            selection: query,
8960            graphql_client: self.graphql_client.clone(),
8961        }
8962    }
8963    /// Upgrade the engine version of the module to the given value.
8964    ///
8965    /// # Arguments
8966    ///
8967    /// * `version` - The engine version to upgrade to.
8968    pub fn with_engine_version(&self, version: impl Into<String>) -> ModuleSource {
8969        let mut query = self.selection.select("withEngineVersion");
8970        query = query.arg("version", version.into());
8971        ModuleSource {
8972            proc: self.proc.clone(),
8973            selection: query,
8974            graphql_client: self.graphql_client.clone(),
8975        }
8976    }
8977    /// Update the module source with additional include patterns for files+directories from its context that are required for building it
8978    ///
8979    /// # Arguments
8980    ///
8981    /// * `patterns` - The new additional include patterns.
8982    pub fn with_includes(&self, patterns: Vec<impl Into<String>>) -> ModuleSource {
8983        let mut query = self.selection.select("withIncludes");
8984        query = query.arg(
8985            "patterns",
8986            patterns
8987                .into_iter()
8988                .map(|i| i.into())
8989                .collect::<Vec<String>>(),
8990        );
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 name.
8998    ///
8999    /// # Arguments
9000    ///
9001    /// * `name` - The name to set.
9002    pub fn with_name(&self, name: impl Into<String>) -> ModuleSource {
9003        let mut query = self.selection.select("withName");
9004        query = query.arg("name", name.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 SDK.
9012    ///
9013    /// # Arguments
9014    ///
9015    /// * `source` - The SDK source to set.
9016    pub fn with_sdk(&self, source: impl Into<String>) -> ModuleSource {
9017        let mut query = self.selection.select("withSDK");
9018        query = query.arg("source", source.into());
9019        ModuleSource {
9020            proc: self.proc.clone(),
9021            selection: query,
9022            graphql_client: self.graphql_client.clone(),
9023        }
9024    }
9025    /// Update the module source with a new source subpath.
9026    ///
9027    /// # Arguments
9028    ///
9029    /// * `path` - The path to set as the source subpath. Must be relative to the module source's source root directory.
9030    pub fn with_source_subpath(&self, path: impl Into<String>) -> ModuleSource {
9031        let mut query = self.selection.select("withSourceSubpath");
9032        query = query.arg("path", path.into());
9033        ModuleSource {
9034            proc: self.proc.clone(),
9035            selection: query,
9036            graphql_client: self.graphql_client.clone(),
9037        }
9038    }
9039    /// Update one or more module dependencies.
9040    ///
9041    /// # Arguments
9042    ///
9043    /// * `dependencies` - The dependencies to update.
9044    pub fn with_update_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
9045        let mut query = self.selection.select("withUpdateDependencies");
9046        query = query.arg(
9047            "dependencies",
9048            dependencies
9049                .into_iter()
9050                .map(|i| i.into())
9051                .collect::<Vec<String>>(),
9052        );
9053        ModuleSource {
9054            proc: self.proc.clone(),
9055            selection: query,
9056            graphql_client: self.graphql_client.clone(),
9057        }
9058    }
9059    /// Remove the provided dependencies from the module source's dependency list.
9060    ///
9061    /// # Arguments
9062    ///
9063    /// * `dependencies` - The dependencies to remove.
9064    pub fn without_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
9065        let mut query = self.selection.select("withoutDependencies");
9066        query = query.arg(
9067            "dependencies",
9068            dependencies
9069                .into_iter()
9070                .map(|i| i.into())
9071                .collect::<Vec<String>>(),
9072        );
9073        ModuleSource {
9074            proc: self.proc.clone(),
9075            selection: query,
9076            graphql_client: self.graphql_client.clone(),
9077        }
9078    }
9079}
9080#[derive(Clone)]
9081pub struct ObjectTypeDef {
9082    pub proc: Option<Arc<DaggerSessionProc>>,
9083    pub selection: Selection,
9084    pub graphql_client: DynGraphQLClient,
9085}
9086impl ObjectTypeDef {
9087    /// The function used to construct new instances of this object, if any
9088    pub fn constructor(&self) -> Function {
9089        let query = self.selection.select("constructor");
9090        Function {
9091            proc: self.proc.clone(),
9092            selection: query,
9093            graphql_client: self.graphql_client.clone(),
9094        }
9095    }
9096    /// The doc string for the object, if any.
9097    pub async fn description(&self) -> Result<String, DaggerError> {
9098        let query = self.selection.select("description");
9099        query.execute(self.graphql_client.clone()).await
9100    }
9101    /// Static fields defined on this object, if any.
9102    pub fn fields(&self) -> Vec<FieldTypeDef> {
9103        let query = self.selection.select("fields");
9104        vec![FieldTypeDef {
9105            proc: self.proc.clone(),
9106            selection: query,
9107            graphql_client: self.graphql_client.clone(),
9108        }]
9109    }
9110    /// Functions defined on this object, if any.
9111    pub fn functions(&self) -> Vec<Function> {
9112        let query = self.selection.select("functions");
9113        vec![Function {
9114            proc: self.proc.clone(),
9115            selection: query,
9116            graphql_client: self.graphql_client.clone(),
9117        }]
9118    }
9119    /// A unique identifier for this ObjectTypeDef.
9120    pub async fn id(&self) -> Result<ObjectTypeDefId, DaggerError> {
9121        let query = self.selection.select("id");
9122        query.execute(self.graphql_client.clone()).await
9123    }
9124    /// The name of the object.
9125    pub async fn name(&self) -> Result<String, DaggerError> {
9126        let query = self.selection.select("name");
9127        query.execute(self.graphql_client.clone()).await
9128    }
9129    /// The location of this object declaration.
9130    pub fn source_map(&self) -> SourceMap {
9131        let query = self.selection.select("sourceMap");
9132        SourceMap {
9133            proc: self.proc.clone(),
9134            selection: query,
9135            graphql_client: self.graphql_client.clone(),
9136        }
9137    }
9138    /// If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.
9139    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
9140        let query = self.selection.select("sourceModuleName");
9141        query.execute(self.graphql_client.clone()).await
9142    }
9143}
9144#[derive(Clone)]
9145pub struct Port {
9146    pub proc: Option<Arc<DaggerSessionProc>>,
9147    pub selection: Selection,
9148    pub graphql_client: DynGraphQLClient,
9149}
9150impl Port {
9151    /// The port description.
9152    pub async fn description(&self) -> Result<String, DaggerError> {
9153        let query = self.selection.select("description");
9154        query.execute(self.graphql_client.clone()).await
9155    }
9156    /// Skip the health check when run as a service.
9157    pub async fn experimental_skip_healthcheck(&self) -> Result<bool, DaggerError> {
9158        let query = self.selection.select("experimentalSkipHealthcheck");
9159        query.execute(self.graphql_client.clone()).await
9160    }
9161    /// A unique identifier for this Port.
9162    pub async fn id(&self) -> Result<PortId, DaggerError> {
9163        let query = self.selection.select("id");
9164        query.execute(self.graphql_client.clone()).await
9165    }
9166    /// The port number.
9167    pub async fn port(&self) -> Result<isize, DaggerError> {
9168        let query = self.selection.select("port");
9169        query.execute(self.graphql_client.clone()).await
9170    }
9171    /// The transport layer protocol.
9172    pub async fn protocol(&self) -> Result<NetworkProtocol, DaggerError> {
9173        let query = self.selection.select("protocol");
9174        query.execute(self.graphql_client.clone()).await
9175    }
9176}
9177#[derive(Clone)]
9178pub struct Query {
9179    pub proc: Option<Arc<DaggerSessionProc>>,
9180    pub selection: Selection,
9181    pub graphql_client: DynGraphQLClient,
9182}
9183#[derive(Builder, Debug, PartialEq)]
9184pub struct QueryCacheVolumeOpts<'a> {
9185    #[builder(setter(into, strip_option), default)]
9186    pub namespace: Option<&'a str>,
9187}
9188#[derive(Builder, Debug, PartialEq)]
9189pub struct QueryContainerOpts {
9190    /// Platform to initialize the container with.
9191    #[builder(setter(into, strip_option), default)]
9192    pub platform: Option<Platform>,
9193}
9194#[derive(Builder, Debug, PartialEq)]
9195pub struct QueryGitOpts<'a> {
9196    /// A service which must be started before the repo is fetched.
9197    #[builder(setter(into, strip_option), default)]
9198    pub experimental_service_host: Option<ServiceId>,
9199    /// DEPRECATED: Set to true to keep .git directory.
9200    #[builder(setter(into, strip_option), default)]
9201    pub keep_git_dir: Option<bool>,
9202    /// Set SSH auth socket
9203    #[builder(setter(into, strip_option), default)]
9204    pub ssh_auth_socket: Option<SocketId>,
9205    /// Set SSH known hosts
9206    #[builder(setter(into, strip_option), default)]
9207    pub ssh_known_hosts: Option<&'a str>,
9208}
9209#[derive(Builder, Debug, PartialEq)]
9210pub struct QueryHttpOpts {
9211    /// A service which must be started before the URL is fetched.
9212    #[builder(setter(into, strip_option), default)]
9213    pub experimental_service_host: Option<ServiceId>,
9214}
9215#[derive(Builder, Debug, PartialEq)]
9216pub struct QueryLlmOpts<'a> {
9217    /// Cap the number of API calls for this LLM
9218    #[builder(setter(into, strip_option), default)]
9219    pub max_api_calls: Option<isize>,
9220    /// Model to use
9221    #[builder(setter(into, strip_option), default)]
9222    pub model: Option<&'a str>,
9223}
9224#[derive(Builder, Debug, PartialEq)]
9225pub struct QueryLoadSecretFromNameOpts<'a> {
9226    #[builder(setter(into, strip_option), default)]
9227    pub accessor: Option<&'a str>,
9228}
9229#[derive(Builder, Debug, PartialEq)]
9230pub struct QueryModuleSourceOpts<'a> {
9231    /// 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.
9232    #[builder(setter(into, strip_option), default)]
9233    pub allow_not_exists: Option<bool>,
9234    /// If true, do not attempt to find dagger.json in a parent directory of the provided path. Only relevant for local module sources.
9235    #[builder(setter(into, strip_option), default)]
9236    pub disable_find_up: Option<bool>,
9237    /// The pinned version of the module source
9238    #[builder(setter(into, strip_option), default)]
9239    pub ref_pin: Option<&'a str>,
9240    /// If set, error out if the ref string is not of the provided requireKind.
9241    #[builder(setter(into, strip_option), default)]
9242    pub require_kind: Option<ModuleSourceKind>,
9243}
9244impl Query {
9245    /// Retrieves a container builtin to the engine.
9246    ///
9247    /// # Arguments
9248    ///
9249    /// * `digest` - Digest of the image manifest
9250    pub fn builtin_container(&self, digest: impl Into<String>) -> Container {
9251        let mut query = self.selection.select("builtinContainer");
9252        query = query.arg("digest", digest.into());
9253        Container {
9254            proc: self.proc.clone(),
9255            selection: query,
9256            graphql_client: self.graphql_client.clone(),
9257        }
9258    }
9259    /// Constructs a cache volume for a given cache key.
9260    ///
9261    /// # Arguments
9262    ///
9263    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
9264    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9265    pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume {
9266        let mut query = self.selection.select("cacheVolume");
9267        query = query.arg("key", key.into());
9268        CacheVolume {
9269            proc: self.proc.clone(),
9270            selection: query,
9271            graphql_client: self.graphql_client.clone(),
9272        }
9273    }
9274    /// Constructs a cache volume for a given cache key.
9275    ///
9276    /// # Arguments
9277    ///
9278    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
9279    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9280    pub fn cache_volume_opts<'a>(
9281        &self,
9282        key: impl Into<String>,
9283        opts: QueryCacheVolumeOpts<'a>,
9284    ) -> CacheVolume {
9285        let mut query = self.selection.select("cacheVolume");
9286        query = query.arg("key", key.into());
9287        if let Some(namespace) = opts.namespace {
9288            query = query.arg("namespace", namespace);
9289        }
9290        CacheVolume {
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(&self) -> Container {
9303        let query = self.selection.select("container");
9304        Container {
9305            proc: self.proc.clone(),
9306            selection: query,
9307            graphql_client: self.graphql_client.clone(),
9308        }
9309    }
9310    /// Creates a scratch container.
9311    /// Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.
9312    ///
9313    /// # Arguments
9314    ///
9315    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9316    pub fn container_opts(&self, opts: QueryContainerOpts) -> Container {
9317        let mut query = self.selection.select("container");
9318        if let Some(platform) = opts.platform {
9319            query = query.arg("platform", platform);
9320        }
9321        Container {
9322            proc: self.proc.clone(),
9323            selection: query,
9324            graphql_client: self.graphql_client.clone(),
9325        }
9326    }
9327    /// The FunctionCall context that the SDK caller is currently executing in.
9328    /// If the caller is not currently executing in a function, this will return an error.
9329    pub fn current_function_call(&self) -> FunctionCall {
9330        let query = self.selection.select("currentFunctionCall");
9331        FunctionCall {
9332            proc: self.proc.clone(),
9333            selection: query,
9334            graphql_client: self.graphql_client.clone(),
9335        }
9336    }
9337    /// The module currently being served in the session, if any.
9338    pub fn current_module(&self) -> CurrentModule {
9339        let query = self.selection.select("currentModule");
9340        CurrentModule {
9341            proc: self.proc.clone(),
9342            selection: query,
9343            graphql_client: self.graphql_client.clone(),
9344        }
9345    }
9346    /// The TypeDef representations of the objects currently being served in the session.
9347    pub fn current_type_defs(&self) -> Vec<TypeDef> {
9348        let query = self.selection.select("currentTypeDefs");
9349        vec![TypeDef {
9350            proc: self.proc.clone(),
9351            selection: query,
9352            graphql_client: self.graphql_client.clone(),
9353        }]
9354    }
9355    /// The default platform of the engine.
9356    pub async fn default_platform(&self) -> Result<Platform, DaggerError> {
9357        let query = self.selection.select("defaultPlatform");
9358        query.execute(self.graphql_client.clone()).await
9359    }
9360    /// Creates an empty directory.
9361    pub fn directory(&self) -> Directory {
9362        let query = self.selection.select("directory");
9363        Directory {
9364            proc: self.proc.clone(),
9365            selection: query,
9366            graphql_client: self.graphql_client.clone(),
9367        }
9368    }
9369    /// The Dagger engine container configuration and state
9370    pub fn engine(&self) -> Engine {
9371        let query = self.selection.select("engine");
9372        Engine {
9373            proc: self.proc.clone(),
9374            selection: query,
9375            graphql_client: self.graphql_client.clone(),
9376        }
9377    }
9378    /// Create a new error.
9379    ///
9380    /// # Arguments
9381    ///
9382    /// * `message` - A brief description of the error.
9383    pub fn error(&self, message: impl Into<String>) -> Error {
9384        let mut query = self.selection.select("error");
9385        query = query.arg("message", message.into());
9386        Error {
9387            proc: self.proc.clone(),
9388            selection: query,
9389            graphql_client: self.graphql_client.clone(),
9390        }
9391    }
9392    /// Creates a function.
9393    ///
9394    /// # Arguments
9395    ///
9396    /// * `name` - Name of the function, in its original format from the implementation language.
9397    /// * `return_type` - Return type of the function.
9398    pub fn function(
9399        &self,
9400        name: impl Into<String>,
9401        return_type: impl IntoID<TypeDefId>,
9402    ) -> Function {
9403        let mut query = self.selection.select("function");
9404        query = query.arg("name", name.into());
9405        query = query.arg_lazy(
9406            "returnType",
9407            Box::new(move || {
9408                let return_type = return_type.clone();
9409                Box::pin(async move { return_type.into_id().await.unwrap().quote() })
9410            }),
9411        );
9412        Function {
9413            proc: self.proc.clone(),
9414            selection: query,
9415            graphql_client: self.graphql_client.clone(),
9416        }
9417    }
9418    /// Create a code generation result, given a directory containing the generated code.
9419    pub fn generated_code(&self, code: impl IntoID<DirectoryId>) -> GeneratedCode {
9420        let mut query = self.selection.select("generatedCode");
9421        query = query.arg_lazy(
9422            "code",
9423            Box::new(move || {
9424                let code = code.clone();
9425                Box::pin(async move { code.into_id().await.unwrap().quote() })
9426            }),
9427        );
9428        GeneratedCode {
9429            proc: self.proc.clone(),
9430            selection: query,
9431            graphql_client: self.graphql_client.clone(),
9432        }
9433    }
9434    /// Queries a Git repository.
9435    ///
9436    /// # Arguments
9437    ///
9438    /// * `url` - URL of the git repository.
9439    ///
9440    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
9441    ///
9442    /// Suffix ".git" is optional.
9443    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9444    pub fn git(&self, url: impl Into<String>) -> GitRepository {
9445        let mut query = self.selection.select("git");
9446        query = query.arg("url", url.into());
9447        GitRepository {
9448            proc: self.proc.clone(),
9449            selection: query,
9450            graphql_client: self.graphql_client.clone(),
9451        }
9452    }
9453    /// Queries a Git repository.
9454    ///
9455    /// # Arguments
9456    ///
9457    /// * `url` - URL of the git repository.
9458    ///
9459    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
9460    ///
9461    /// Suffix ".git" is optional.
9462    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9463    pub fn git_opts<'a>(&self, url: impl Into<String>, opts: QueryGitOpts<'a>) -> GitRepository {
9464        let mut query = self.selection.select("git");
9465        query = query.arg("url", url.into());
9466        if let Some(keep_git_dir) = opts.keep_git_dir {
9467            query = query.arg("keepGitDir", keep_git_dir);
9468        }
9469        if let Some(experimental_service_host) = opts.experimental_service_host {
9470            query = query.arg("experimentalServiceHost", experimental_service_host);
9471        }
9472        if let Some(ssh_known_hosts) = opts.ssh_known_hosts {
9473            query = query.arg("sshKnownHosts", ssh_known_hosts);
9474        }
9475        if let Some(ssh_auth_socket) = opts.ssh_auth_socket {
9476            query = query.arg("sshAuthSocket", ssh_auth_socket);
9477        }
9478        GitRepository {
9479            proc: self.proc.clone(),
9480            selection: query,
9481            graphql_client: self.graphql_client.clone(),
9482        }
9483    }
9484    /// Queries the host environment.
9485    pub fn host(&self) -> Host {
9486        let query = self.selection.select("host");
9487        Host {
9488            proc: self.proc.clone(),
9489            selection: query,
9490            graphql_client: self.graphql_client.clone(),
9491        }
9492    }
9493    /// Returns a file containing an http remote url content.
9494    ///
9495    /// # Arguments
9496    ///
9497    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
9498    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9499    pub fn http(&self, url: impl Into<String>) -> File {
9500        let mut query = self.selection.select("http");
9501        query = query.arg("url", url.into());
9502        File {
9503            proc: self.proc.clone(),
9504            selection: query,
9505            graphql_client: self.graphql_client.clone(),
9506        }
9507    }
9508    /// Returns a file containing an http remote url content.
9509    ///
9510    /// # Arguments
9511    ///
9512    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
9513    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9514    pub fn http_opts(&self, url: impl Into<String>, opts: QueryHttpOpts) -> File {
9515        let mut query = self.selection.select("http");
9516        query = query.arg("url", url.into());
9517        if let Some(experimental_service_host) = opts.experimental_service_host {
9518            query = query.arg("experimentalServiceHost", experimental_service_host);
9519        }
9520        File {
9521            proc: self.proc.clone(),
9522            selection: query,
9523            graphql_client: self.graphql_client.clone(),
9524        }
9525    }
9526    /// Initialize a Large Language Model (LLM)
9527    ///
9528    /// # Arguments
9529    ///
9530    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9531    pub fn llm(&self) -> Llm {
9532        let query = self.selection.select("llm");
9533        Llm {
9534            proc: self.proc.clone(),
9535            selection: query,
9536            graphql_client: self.graphql_client.clone(),
9537        }
9538    }
9539    /// Initialize a Large Language Model (LLM)
9540    ///
9541    /// # Arguments
9542    ///
9543    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9544    pub fn llm_opts<'a>(&self, opts: QueryLlmOpts<'a>) -> Llm {
9545        let mut query = self.selection.select("llm");
9546        if let Some(model) = opts.model {
9547            query = query.arg("model", model);
9548        }
9549        if let Some(max_api_calls) = opts.max_api_calls {
9550            query = query.arg("maxAPICalls", max_api_calls);
9551        }
9552        Llm {
9553            proc: self.proc.clone(),
9554            selection: query,
9555            graphql_client: self.graphql_client.clone(),
9556        }
9557    }
9558    /// Load a CacheVolume from its ID.
9559    pub fn load_cache_volume_from_id(&self, id: impl IntoID<CacheVolumeId>) -> CacheVolume {
9560        let mut query = self.selection.select("loadCacheVolumeFromID");
9561        query = query.arg_lazy(
9562            "id",
9563            Box::new(move || {
9564                let id = id.clone();
9565                Box::pin(async move { id.into_id().await.unwrap().quote() })
9566            }),
9567        );
9568        CacheVolume {
9569            proc: self.proc.clone(),
9570            selection: query,
9571            graphql_client: self.graphql_client.clone(),
9572        }
9573    }
9574    /// Load a Container from its ID.
9575    pub fn load_container_from_id(&self, id: impl IntoID<ContainerId>) -> Container {
9576        let mut query = self.selection.select("loadContainerFromID");
9577        query = query.arg_lazy(
9578            "id",
9579            Box::new(move || {
9580                let id = id.clone();
9581                Box::pin(async move { id.into_id().await.unwrap().quote() })
9582            }),
9583        );
9584        Container {
9585            proc: self.proc.clone(),
9586            selection: query,
9587            graphql_client: self.graphql_client.clone(),
9588        }
9589    }
9590    /// Load a CurrentModule from its ID.
9591    pub fn load_current_module_from_id(&self, id: impl IntoID<CurrentModuleId>) -> CurrentModule {
9592        let mut query = self.selection.select("loadCurrentModuleFromID");
9593        query = query.arg_lazy(
9594            "id",
9595            Box::new(move || {
9596                let id = id.clone();
9597                Box::pin(async move { id.into_id().await.unwrap().quote() })
9598            }),
9599        );
9600        CurrentModule {
9601            proc: self.proc.clone(),
9602            selection: query,
9603            graphql_client: self.graphql_client.clone(),
9604        }
9605    }
9606    /// Load a Directory from its ID.
9607    pub fn load_directory_from_id(&self, id: impl IntoID<DirectoryId>) -> Directory {
9608        let mut query = self.selection.select("loadDirectoryFromID");
9609        query = query.arg_lazy(
9610            "id",
9611            Box::new(move || {
9612                let id = id.clone();
9613                Box::pin(async move { id.into_id().await.unwrap().quote() })
9614            }),
9615        );
9616        Directory {
9617            proc: self.proc.clone(),
9618            selection: query,
9619            graphql_client: self.graphql_client.clone(),
9620        }
9621    }
9622    /// Load a EngineCacheEntry from its ID.
9623    pub fn load_engine_cache_entry_from_id(
9624        &self,
9625        id: impl IntoID<EngineCacheEntryId>,
9626    ) -> EngineCacheEntry {
9627        let mut query = self.selection.select("loadEngineCacheEntryFromID");
9628        query = query.arg_lazy(
9629            "id",
9630            Box::new(move || {
9631                let id = id.clone();
9632                Box::pin(async move { id.into_id().await.unwrap().quote() })
9633            }),
9634        );
9635        EngineCacheEntry {
9636            proc: self.proc.clone(),
9637            selection: query,
9638            graphql_client: self.graphql_client.clone(),
9639        }
9640    }
9641    /// Load a EngineCacheEntrySet from its ID.
9642    pub fn load_engine_cache_entry_set_from_id(
9643        &self,
9644        id: impl IntoID<EngineCacheEntrySetId>,
9645    ) -> EngineCacheEntrySet {
9646        let mut query = self.selection.select("loadEngineCacheEntrySetFromID");
9647        query = query.arg_lazy(
9648            "id",
9649            Box::new(move || {
9650                let id = id.clone();
9651                Box::pin(async move { id.into_id().await.unwrap().quote() })
9652            }),
9653        );
9654        EngineCacheEntrySet {
9655            proc: self.proc.clone(),
9656            selection: query,
9657            graphql_client: self.graphql_client.clone(),
9658        }
9659    }
9660    /// Load a EngineCache from its ID.
9661    pub fn load_engine_cache_from_id(&self, id: impl IntoID<EngineCacheId>) -> EngineCache {
9662        let mut query = self.selection.select("loadEngineCacheFromID");
9663        query = query.arg_lazy(
9664            "id",
9665            Box::new(move || {
9666                let id = id.clone();
9667                Box::pin(async move { id.into_id().await.unwrap().quote() })
9668            }),
9669        );
9670        EngineCache {
9671            proc: self.proc.clone(),
9672            selection: query,
9673            graphql_client: self.graphql_client.clone(),
9674        }
9675    }
9676    /// Load a Engine from its ID.
9677    pub fn load_engine_from_id(&self, id: impl IntoID<EngineId>) -> Engine {
9678        let mut query = self.selection.select("loadEngineFromID");
9679        query = query.arg_lazy(
9680            "id",
9681            Box::new(move || {
9682                let id = id.clone();
9683                Box::pin(async move { id.into_id().await.unwrap().quote() })
9684            }),
9685        );
9686        Engine {
9687            proc: self.proc.clone(),
9688            selection: query,
9689            graphql_client: self.graphql_client.clone(),
9690        }
9691    }
9692    /// Load a EnumTypeDef from its ID.
9693    pub fn load_enum_type_def_from_id(&self, id: impl IntoID<EnumTypeDefId>) -> EnumTypeDef {
9694        let mut query = self.selection.select("loadEnumTypeDefFromID");
9695        query = query.arg_lazy(
9696            "id",
9697            Box::new(move || {
9698                let id = id.clone();
9699                Box::pin(async move { id.into_id().await.unwrap().quote() })
9700            }),
9701        );
9702        EnumTypeDef {
9703            proc: self.proc.clone(),
9704            selection: query,
9705            graphql_client: self.graphql_client.clone(),
9706        }
9707    }
9708    /// Load a EnumValueTypeDef from its ID.
9709    pub fn load_enum_value_type_def_from_id(
9710        &self,
9711        id: impl IntoID<EnumValueTypeDefId>,
9712    ) -> EnumValueTypeDef {
9713        let mut query = self.selection.select("loadEnumValueTypeDefFromID");
9714        query = query.arg_lazy(
9715            "id",
9716            Box::new(move || {
9717                let id = id.clone();
9718                Box::pin(async move { id.into_id().await.unwrap().quote() })
9719            }),
9720        );
9721        EnumValueTypeDef {
9722            proc: self.proc.clone(),
9723            selection: query,
9724            graphql_client: self.graphql_client.clone(),
9725        }
9726    }
9727    /// Load a EnvVariable from its ID.
9728    pub fn load_env_variable_from_id(&self, id: impl IntoID<EnvVariableId>) -> EnvVariable {
9729        let mut query = self.selection.select("loadEnvVariableFromID");
9730        query = query.arg_lazy(
9731            "id",
9732            Box::new(move || {
9733                let id = id.clone();
9734                Box::pin(async move { id.into_id().await.unwrap().quote() })
9735            }),
9736        );
9737        EnvVariable {
9738            proc: self.proc.clone(),
9739            selection: query,
9740            graphql_client: self.graphql_client.clone(),
9741        }
9742    }
9743    /// Load a Error from its ID.
9744    pub fn load_error_from_id(&self, id: impl IntoID<ErrorId>) -> Error {
9745        let mut query = self.selection.select("loadErrorFromID");
9746        query = query.arg_lazy(
9747            "id",
9748            Box::new(move || {
9749                let id = id.clone();
9750                Box::pin(async move { id.into_id().await.unwrap().quote() })
9751            }),
9752        );
9753        Error {
9754            proc: self.proc.clone(),
9755            selection: query,
9756            graphql_client: self.graphql_client.clone(),
9757        }
9758    }
9759    /// Load a ErrorValue from its ID.
9760    pub fn load_error_value_from_id(&self, id: impl IntoID<ErrorValueId>) -> ErrorValue {
9761        let mut query = self.selection.select("loadErrorValueFromID");
9762        query = query.arg_lazy(
9763            "id",
9764            Box::new(move || {
9765                let id = id.clone();
9766                Box::pin(async move { id.into_id().await.unwrap().quote() })
9767            }),
9768        );
9769        ErrorValue {
9770            proc: self.proc.clone(),
9771            selection: query,
9772            graphql_client: self.graphql_client.clone(),
9773        }
9774    }
9775    /// Load a FieldTypeDef from its ID.
9776    pub fn load_field_type_def_from_id(&self, id: impl IntoID<FieldTypeDefId>) -> FieldTypeDef {
9777        let mut query = self.selection.select("loadFieldTypeDefFromID");
9778        query = query.arg_lazy(
9779            "id",
9780            Box::new(move || {
9781                let id = id.clone();
9782                Box::pin(async move { id.into_id().await.unwrap().quote() })
9783            }),
9784        );
9785        FieldTypeDef {
9786            proc: self.proc.clone(),
9787            selection: query,
9788            graphql_client: self.graphql_client.clone(),
9789        }
9790    }
9791    /// Load a File from its ID.
9792    pub fn load_file_from_id(&self, id: impl IntoID<FileId>) -> File {
9793        let mut query = self.selection.select("loadFileFromID");
9794        query = query.arg_lazy(
9795            "id",
9796            Box::new(move || {
9797                let id = id.clone();
9798                Box::pin(async move { id.into_id().await.unwrap().quote() })
9799            }),
9800        );
9801        File {
9802            proc: self.proc.clone(),
9803            selection: query,
9804            graphql_client: self.graphql_client.clone(),
9805        }
9806    }
9807    /// Load a FunctionArg from its ID.
9808    pub fn load_function_arg_from_id(&self, id: impl IntoID<FunctionArgId>) -> FunctionArg {
9809        let mut query = self.selection.select("loadFunctionArgFromID");
9810        query = query.arg_lazy(
9811            "id",
9812            Box::new(move || {
9813                let id = id.clone();
9814                Box::pin(async move { id.into_id().await.unwrap().quote() })
9815            }),
9816        );
9817        FunctionArg {
9818            proc: self.proc.clone(),
9819            selection: query,
9820            graphql_client: self.graphql_client.clone(),
9821        }
9822    }
9823    /// Load a FunctionCallArgValue from its ID.
9824    pub fn load_function_call_arg_value_from_id(
9825        &self,
9826        id: impl IntoID<FunctionCallArgValueId>,
9827    ) -> FunctionCallArgValue {
9828        let mut query = self.selection.select("loadFunctionCallArgValueFromID");
9829        query = query.arg_lazy(
9830            "id",
9831            Box::new(move || {
9832                let id = id.clone();
9833                Box::pin(async move { id.into_id().await.unwrap().quote() })
9834            }),
9835        );
9836        FunctionCallArgValue {
9837            proc: self.proc.clone(),
9838            selection: query,
9839            graphql_client: self.graphql_client.clone(),
9840        }
9841    }
9842    /// Load a FunctionCall from its ID.
9843    pub fn load_function_call_from_id(&self, id: impl IntoID<FunctionCallId>) -> FunctionCall {
9844        let mut query = self.selection.select("loadFunctionCallFromID");
9845        query = query.arg_lazy(
9846            "id",
9847            Box::new(move || {
9848                let id = id.clone();
9849                Box::pin(async move { id.into_id().await.unwrap().quote() })
9850            }),
9851        );
9852        FunctionCall {
9853            proc: self.proc.clone(),
9854            selection: query,
9855            graphql_client: self.graphql_client.clone(),
9856        }
9857    }
9858    /// Load a Function from its ID.
9859    pub fn load_function_from_id(&self, id: impl IntoID<FunctionId>) -> Function {
9860        let mut query = self.selection.select("loadFunctionFromID");
9861        query = query.arg_lazy(
9862            "id",
9863            Box::new(move || {
9864                let id = id.clone();
9865                Box::pin(async move { id.into_id().await.unwrap().quote() })
9866            }),
9867        );
9868        Function {
9869            proc: self.proc.clone(),
9870            selection: query,
9871            graphql_client: self.graphql_client.clone(),
9872        }
9873    }
9874    /// Load a GeneratedCode from its ID.
9875    pub fn load_generated_code_from_id(&self, id: impl IntoID<GeneratedCodeId>) -> GeneratedCode {
9876        let mut query = self.selection.select("loadGeneratedCodeFromID");
9877        query = query.arg_lazy(
9878            "id",
9879            Box::new(move || {
9880                let id = id.clone();
9881                Box::pin(async move { id.into_id().await.unwrap().quote() })
9882            }),
9883        );
9884        GeneratedCode {
9885            proc: self.proc.clone(),
9886            selection: query,
9887            graphql_client: self.graphql_client.clone(),
9888        }
9889    }
9890    /// Load a GitRef from its ID.
9891    pub fn load_git_ref_from_id(&self, id: impl IntoID<GitRefId>) -> GitRef {
9892        let mut query = self.selection.select("loadGitRefFromID");
9893        query = query.arg_lazy(
9894            "id",
9895            Box::new(move || {
9896                let id = id.clone();
9897                Box::pin(async move { id.into_id().await.unwrap().quote() })
9898            }),
9899        );
9900        GitRef {
9901            proc: self.proc.clone(),
9902            selection: query,
9903            graphql_client: self.graphql_client.clone(),
9904        }
9905    }
9906    /// Load a GitRepository from its ID.
9907    pub fn load_git_repository_from_id(&self, id: impl IntoID<GitRepositoryId>) -> GitRepository {
9908        let mut query = self.selection.select("loadGitRepositoryFromID");
9909        query = query.arg_lazy(
9910            "id",
9911            Box::new(move || {
9912                let id = id.clone();
9913                Box::pin(async move { id.into_id().await.unwrap().quote() })
9914            }),
9915        );
9916        GitRepository {
9917            proc: self.proc.clone(),
9918            selection: query,
9919            graphql_client: self.graphql_client.clone(),
9920        }
9921    }
9922    /// Load a Host from its ID.
9923    pub fn load_host_from_id(&self, id: impl IntoID<HostId>) -> Host {
9924        let mut query = self.selection.select("loadHostFromID");
9925        query = query.arg_lazy(
9926            "id",
9927            Box::new(move || {
9928                let id = id.clone();
9929                Box::pin(async move { id.into_id().await.unwrap().quote() })
9930            }),
9931        );
9932        Host {
9933            proc: self.proc.clone(),
9934            selection: query,
9935            graphql_client: self.graphql_client.clone(),
9936        }
9937    }
9938    /// Load a InputTypeDef from its ID.
9939    pub fn load_input_type_def_from_id(&self, id: impl IntoID<InputTypeDefId>) -> InputTypeDef {
9940        let mut query = self.selection.select("loadInputTypeDefFromID");
9941        query = query.arg_lazy(
9942            "id",
9943            Box::new(move || {
9944                let id = id.clone();
9945                Box::pin(async move { id.into_id().await.unwrap().quote() })
9946            }),
9947        );
9948        InputTypeDef {
9949            proc: self.proc.clone(),
9950            selection: query,
9951            graphql_client: self.graphql_client.clone(),
9952        }
9953    }
9954    /// Load a InterfaceTypeDef from its ID.
9955    pub fn load_interface_type_def_from_id(
9956        &self,
9957        id: impl IntoID<InterfaceTypeDefId>,
9958    ) -> InterfaceTypeDef {
9959        let mut query = self.selection.select("loadInterfaceTypeDefFromID");
9960        query = query.arg_lazy(
9961            "id",
9962            Box::new(move || {
9963                let id = id.clone();
9964                Box::pin(async move { id.into_id().await.unwrap().quote() })
9965            }),
9966        );
9967        InterfaceTypeDef {
9968            proc: self.proc.clone(),
9969            selection: query,
9970            graphql_client: self.graphql_client.clone(),
9971        }
9972    }
9973    /// Load a LLM from its ID.
9974    pub fn load_llm_from_id(&self, id: impl IntoID<Llmid>) -> Llm {
9975        let mut query = self.selection.select("loadLLMFromID");
9976        query = query.arg_lazy(
9977            "id",
9978            Box::new(move || {
9979                let id = id.clone();
9980                Box::pin(async move { id.into_id().await.unwrap().quote() })
9981            }),
9982        );
9983        Llm {
9984            proc: self.proc.clone(),
9985            selection: query,
9986            graphql_client: self.graphql_client.clone(),
9987        }
9988    }
9989    /// Load a LLMVariable from its ID.
9990    pub fn load_llm_variable_from_id(&self, id: impl IntoID<LlmVariableId>) -> LlmVariable {
9991        let mut query = self.selection.select("loadLLMVariableFromID");
9992        query = query.arg_lazy(
9993            "id",
9994            Box::new(move || {
9995                let id = id.clone();
9996                Box::pin(async move { id.into_id().await.unwrap().quote() })
9997            }),
9998        );
9999        LlmVariable {
10000            proc: self.proc.clone(),
10001            selection: query,
10002            graphql_client: self.graphql_client.clone(),
10003        }
10004    }
10005    /// Load a Label from its ID.
10006    pub fn load_label_from_id(&self, id: impl IntoID<LabelId>) -> Label {
10007        let mut query = self.selection.select("loadLabelFromID");
10008        query = query.arg_lazy(
10009            "id",
10010            Box::new(move || {
10011                let id = id.clone();
10012                Box::pin(async move { id.into_id().await.unwrap().quote() })
10013            }),
10014        );
10015        Label {
10016            proc: self.proc.clone(),
10017            selection: query,
10018            graphql_client: self.graphql_client.clone(),
10019        }
10020    }
10021    /// Load a ListTypeDef from its ID.
10022    pub fn load_list_type_def_from_id(&self, id: impl IntoID<ListTypeDefId>) -> ListTypeDef {
10023        let mut query = self.selection.select("loadListTypeDefFromID");
10024        query = query.arg_lazy(
10025            "id",
10026            Box::new(move || {
10027                let id = id.clone();
10028                Box::pin(async move { id.into_id().await.unwrap().quote() })
10029            }),
10030        );
10031        ListTypeDef {
10032            proc: self.proc.clone(),
10033            selection: query,
10034            graphql_client: self.graphql_client.clone(),
10035        }
10036    }
10037    /// Load a ModuleConfigClient from its ID.
10038    pub fn load_module_config_client_from_id(
10039        &self,
10040        id: impl IntoID<ModuleConfigClientId>,
10041    ) -> ModuleConfigClient {
10042        let mut query = self.selection.select("loadModuleConfigClientFromID");
10043        query = query.arg_lazy(
10044            "id",
10045            Box::new(move || {
10046                let id = id.clone();
10047                Box::pin(async move { id.into_id().await.unwrap().quote() })
10048            }),
10049        );
10050        ModuleConfigClient {
10051            proc: self.proc.clone(),
10052            selection: query,
10053            graphql_client: self.graphql_client.clone(),
10054        }
10055    }
10056    /// Load a Module from its ID.
10057    pub fn load_module_from_id(&self, id: impl IntoID<ModuleId>) -> Module {
10058        let mut query = self.selection.select("loadModuleFromID");
10059        query = query.arg_lazy(
10060            "id",
10061            Box::new(move || {
10062                let id = id.clone();
10063                Box::pin(async move { id.into_id().await.unwrap().quote() })
10064            }),
10065        );
10066        Module {
10067            proc: self.proc.clone(),
10068            selection: query,
10069            graphql_client: self.graphql_client.clone(),
10070        }
10071    }
10072    /// Load a ModuleSource from its ID.
10073    pub fn load_module_source_from_id(&self, id: impl IntoID<ModuleSourceId>) -> ModuleSource {
10074        let mut query = self.selection.select("loadModuleSourceFromID");
10075        query = query.arg_lazy(
10076            "id",
10077            Box::new(move || {
10078                let id = id.clone();
10079                Box::pin(async move { id.into_id().await.unwrap().quote() })
10080            }),
10081        );
10082        ModuleSource {
10083            proc: self.proc.clone(),
10084            selection: query,
10085            graphql_client: self.graphql_client.clone(),
10086        }
10087    }
10088    /// Load a ObjectTypeDef from its ID.
10089    pub fn load_object_type_def_from_id(&self, id: impl IntoID<ObjectTypeDefId>) -> ObjectTypeDef {
10090        let mut query = self.selection.select("loadObjectTypeDefFromID");
10091        query = query.arg_lazy(
10092            "id",
10093            Box::new(move || {
10094                let id = id.clone();
10095                Box::pin(async move { id.into_id().await.unwrap().quote() })
10096            }),
10097        );
10098        ObjectTypeDef {
10099            proc: self.proc.clone(),
10100            selection: query,
10101            graphql_client: self.graphql_client.clone(),
10102        }
10103    }
10104    /// Load a Port from its ID.
10105    pub fn load_port_from_id(&self, id: impl IntoID<PortId>) -> Port {
10106        let mut query = self.selection.select("loadPortFromID");
10107        query = query.arg_lazy(
10108            "id",
10109            Box::new(move || {
10110                let id = id.clone();
10111                Box::pin(async move { id.into_id().await.unwrap().quote() })
10112            }),
10113        );
10114        Port {
10115            proc: self.proc.clone(),
10116            selection: query,
10117            graphql_client: self.graphql_client.clone(),
10118        }
10119    }
10120    /// Load a SDKConfig from its ID.
10121    pub fn load_sdk_config_from_id(&self, id: impl IntoID<SdkConfigId>) -> SdkConfig {
10122        let mut query = self.selection.select("loadSDKConfigFromID");
10123        query = query.arg_lazy(
10124            "id",
10125            Box::new(move || {
10126                let id = id.clone();
10127                Box::pin(async move { id.into_id().await.unwrap().quote() })
10128            }),
10129        );
10130        SdkConfig {
10131            proc: self.proc.clone(),
10132            selection: query,
10133            graphql_client: self.graphql_client.clone(),
10134        }
10135    }
10136    /// Load a ScalarTypeDef from its ID.
10137    pub fn load_scalar_type_def_from_id(&self, id: impl IntoID<ScalarTypeDefId>) -> ScalarTypeDef {
10138        let mut query = self.selection.select("loadScalarTypeDefFromID");
10139        query = query.arg_lazy(
10140            "id",
10141            Box::new(move || {
10142                let id = id.clone();
10143                Box::pin(async move { id.into_id().await.unwrap().quote() })
10144            }),
10145        );
10146        ScalarTypeDef {
10147            proc: self.proc.clone(),
10148            selection: query,
10149            graphql_client: self.graphql_client.clone(),
10150        }
10151    }
10152    /// Load a Secret from its ID.
10153    pub fn load_secret_from_id(&self, id: impl IntoID<SecretId>) -> Secret {
10154        let mut query = self.selection.select("loadSecretFromID");
10155        query = query.arg_lazy(
10156            "id",
10157            Box::new(move || {
10158                let id = id.clone();
10159                Box::pin(async move { id.into_id().await.unwrap().quote() })
10160            }),
10161        );
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(&self, name: impl Into<String>) -> Secret {
10174        let mut query = self.selection.select("loadSecretFromName");
10175        query = query.arg("name", name.into());
10176        Secret {
10177            proc: self.proc.clone(),
10178            selection: query,
10179            graphql_client: self.graphql_client.clone(),
10180        }
10181    }
10182    /// Load a Secret from its Name.
10183    ///
10184    /// # Arguments
10185    ///
10186    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10187    pub fn load_secret_from_name_opts<'a>(
10188        &self,
10189        name: impl Into<String>,
10190        opts: QueryLoadSecretFromNameOpts<'a>,
10191    ) -> Secret {
10192        let mut query = self.selection.select("loadSecretFromName");
10193        query = query.arg("name", name.into());
10194        if let Some(accessor) = opts.accessor {
10195            query = query.arg("accessor", accessor);
10196        }
10197        Secret {
10198            proc: self.proc.clone(),
10199            selection: query,
10200            graphql_client: self.graphql_client.clone(),
10201        }
10202    }
10203    /// Load a Service from its ID.
10204    pub fn load_service_from_id(&self, id: impl IntoID<ServiceId>) -> Service {
10205        let mut query = self.selection.select("loadServiceFromID");
10206        query = query.arg_lazy(
10207            "id",
10208            Box::new(move || {
10209                let id = id.clone();
10210                Box::pin(async move { id.into_id().await.unwrap().quote() })
10211            }),
10212        );
10213        Service {
10214            proc: self.proc.clone(),
10215            selection: query,
10216            graphql_client: self.graphql_client.clone(),
10217        }
10218    }
10219    /// Load a Socket from its ID.
10220    pub fn load_socket_from_id(&self, id: impl IntoID<SocketId>) -> Socket {
10221        let mut query = self.selection.select("loadSocketFromID");
10222        query = query.arg_lazy(
10223            "id",
10224            Box::new(move || {
10225                let id = id.clone();
10226                Box::pin(async move { id.into_id().await.unwrap().quote() })
10227            }),
10228        );
10229        Socket {
10230            proc: self.proc.clone(),
10231            selection: query,
10232            graphql_client: self.graphql_client.clone(),
10233        }
10234    }
10235    /// Load a SourceMap from its ID.
10236    pub fn load_source_map_from_id(&self, id: impl IntoID<SourceMapId>) -> SourceMap {
10237        let mut query = self.selection.select("loadSourceMapFromID");
10238        query = query.arg_lazy(
10239            "id",
10240            Box::new(move || {
10241                let id = id.clone();
10242                Box::pin(async move { id.into_id().await.unwrap().quote() })
10243            }),
10244        );
10245        SourceMap {
10246            proc: self.proc.clone(),
10247            selection: query,
10248            graphql_client: self.graphql_client.clone(),
10249        }
10250    }
10251    /// Load a Terminal from its ID.
10252    pub fn load_terminal_from_id(&self, id: impl IntoID<TerminalId>) -> Terminal {
10253        let mut query = self.selection.select("loadTerminalFromID");
10254        query = query.arg_lazy(
10255            "id",
10256            Box::new(move || {
10257                let id = id.clone();
10258                Box::pin(async move { id.into_id().await.unwrap().quote() })
10259            }),
10260        );
10261        Terminal {
10262            proc: self.proc.clone(),
10263            selection: query,
10264            graphql_client: self.graphql_client.clone(),
10265        }
10266    }
10267    /// Load a TypeDef from its ID.
10268    pub fn load_type_def_from_id(&self, id: impl IntoID<TypeDefId>) -> TypeDef {
10269        let mut query = self.selection.select("loadTypeDefFromID");
10270        query = query.arg_lazy(
10271            "id",
10272            Box::new(move || {
10273                let id = id.clone();
10274                Box::pin(async move { id.into_id().await.unwrap().quote() })
10275            }),
10276        );
10277        TypeDef {
10278            proc: self.proc.clone(),
10279            selection: query,
10280            graphql_client: self.graphql_client.clone(),
10281        }
10282    }
10283    /// Create a new module.
10284    pub fn module(&self) -> Module {
10285        let query = self.selection.select("module");
10286        Module {
10287            proc: self.proc.clone(),
10288            selection: query,
10289            graphql_client: self.graphql_client.clone(),
10290        }
10291    }
10292    /// Create a new module source instance from a source ref string
10293    ///
10294    /// # Arguments
10295    ///
10296    /// * `ref_string` - The string ref representation of the module source
10297    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10298    pub fn module_source(&self, ref_string: impl Into<String>) -> ModuleSource {
10299        let mut query = self.selection.select("moduleSource");
10300        query = query.arg("refString", ref_string.into());
10301        ModuleSource {
10302            proc: self.proc.clone(),
10303            selection: query,
10304            graphql_client: self.graphql_client.clone(),
10305        }
10306    }
10307    /// Create a new module source instance from a source ref string
10308    ///
10309    /// # Arguments
10310    ///
10311    /// * `ref_string` - The string ref representation of the module source
10312    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10313    pub fn module_source_opts<'a>(
10314        &self,
10315        ref_string: impl Into<String>,
10316        opts: QueryModuleSourceOpts<'a>,
10317    ) -> ModuleSource {
10318        let mut query = self.selection.select("moduleSource");
10319        query = query.arg("refString", ref_string.into());
10320        if let Some(ref_pin) = opts.ref_pin {
10321            query = query.arg("refPin", ref_pin);
10322        }
10323        if let Some(disable_find_up) = opts.disable_find_up {
10324            query = query.arg("disableFindUp", disable_find_up);
10325        }
10326        if let Some(allow_not_exists) = opts.allow_not_exists {
10327            query = query.arg("allowNotExists", allow_not_exists);
10328        }
10329        if let Some(require_kind) = opts.require_kind {
10330            query = query.arg("requireKind", require_kind);
10331        }
10332        ModuleSource {
10333            proc: self.proc.clone(),
10334            selection: query,
10335            graphql_client: self.graphql_client.clone(),
10336        }
10337    }
10338    /// Creates a new secret.
10339    ///
10340    /// # Arguments
10341    ///
10342    /// * `uri` - The URI of the secret store
10343    pub fn secret(&self, uri: impl Into<String>) -> Secret {
10344        let mut query = self.selection.select("secret");
10345        query = query.arg("uri", uri.into());
10346        Secret {
10347            proc: self.proc.clone(),
10348            selection: query,
10349            graphql_client: self.graphql_client.clone(),
10350        }
10351    }
10352    /// Sets a secret given a user defined name to its plaintext and returns the secret.
10353    /// The plaintext value is limited to a size of 128000 bytes.
10354    ///
10355    /// # Arguments
10356    ///
10357    /// * `name` - The user defined name for this secret
10358    /// * `plaintext` - The plaintext of the secret
10359    pub fn set_secret(&self, name: impl Into<String>, plaintext: impl Into<String>) -> Secret {
10360        let mut query = self.selection.select("setSecret");
10361        query = query.arg("name", name.into());
10362        query = query.arg("plaintext", plaintext.into());
10363        Secret {
10364            proc: self.proc.clone(),
10365            selection: query,
10366            graphql_client: self.graphql_client.clone(),
10367        }
10368    }
10369    /// Creates source map metadata.
10370    ///
10371    /// # Arguments
10372    ///
10373    /// * `filename` - The filename from the module source.
10374    /// * `line` - The line number within the filename.
10375    /// * `column` - The column number within the line.
10376    pub fn source_map(&self, filename: impl Into<String>, line: isize, column: isize) -> SourceMap {
10377        let mut query = self.selection.select("sourceMap");
10378        query = query.arg("filename", filename.into());
10379        query = query.arg("line", line);
10380        query = query.arg("column", column);
10381        SourceMap {
10382            proc: self.proc.clone(),
10383            selection: query,
10384            graphql_client: self.graphql_client.clone(),
10385        }
10386    }
10387    /// Create a new TypeDef.
10388    pub fn type_def(&self) -> TypeDef {
10389        let query = self.selection.select("typeDef");
10390        TypeDef {
10391            proc: self.proc.clone(),
10392            selection: query,
10393            graphql_client: self.graphql_client.clone(),
10394        }
10395    }
10396    /// Get the current Dagger Engine version.
10397    pub async fn version(&self) -> Result<String, DaggerError> {
10398        let query = self.selection.select("version");
10399        query.execute(self.graphql_client.clone()).await
10400    }
10401}
10402#[derive(Clone)]
10403pub struct SdkConfig {
10404    pub proc: Option<Arc<DaggerSessionProc>>,
10405    pub selection: Selection,
10406    pub graphql_client: DynGraphQLClient,
10407}
10408impl SdkConfig {
10409    /// A unique identifier for this SDKConfig.
10410    pub async fn id(&self) -> Result<SdkConfigId, DaggerError> {
10411        let query = self.selection.select("id");
10412        query.execute(self.graphql_client.clone()).await
10413    }
10414    /// Source of the SDK. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.
10415    pub async fn source(&self) -> Result<String, DaggerError> {
10416        let query = self.selection.select("source");
10417        query.execute(self.graphql_client.clone()).await
10418    }
10419}
10420#[derive(Clone)]
10421pub struct ScalarTypeDef {
10422    pub proc: Option<Arc<DaggerSessionProc>>,
10423    pub selection: Selection,
10424    pub graphql_client: DynGraphQLClient,
10425}
10426impl ScalarTypeDef {
10427    /// A doc string for the scalar, if any.
10428    pub async fn description(&self) -> Result<String, DaggerError> {
10429        let query = self.selection.select("description");
10430        query.execute(self.graphql_client.clone()).await
10431    }
10432    /// A unique identifier for this ScalarTypeDef.
10433    pub async fn id(&self) -> Result<ScalarTypeDefId, DaggerError> {
10434        let query = self.selection.select("id");
10435        query.execute(self.graphql_client.clone()).await
10436    }
10437    /// The name of the scalar.
10438    pub async fn name(&self) -> Result<String, DaggerError> {
10439        let query = self.selection.select("name");
10440        query.execute(self.graphql_client.clone()).await
10441    }
10442    /// If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise.
10443    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
10444        let query = self.selection.select("sourceModuleName");
10445        query.execute(self.graphql_client.clone()).await
10446    }
10447}
10448#[derive(Clone)]
10449pub struct Secret {
10450    pub proc: Option<Arc<DaggerSessionProc>>,
10451    pub selection: Selection,
10452    pub graphql_client: DynGraphQLClient,
10453}
10454impl Secret {
10455    /// A unique identifier for this Secret.
10456    pub async fn id(&self) -> Result<SecretId, DaggerError> {
10457        let query = self.selection.select("id");
10458        query.execute(self.graphql_client.clone()).await
10459    }
10460    /// The name of this secret.
10461    pub async fn name(&self) -> Result<String, DaggerError> {
10462        let query = self.selection.select("name");
10463        query.execute(self.graphql_client.clone()).await
10464    }
10465    /// The value of this secret.
10466    pub async fn plaintext(&self) -> Result<String, DaggerError> {
10467        let query = self.selection.select("plaintext");
10468        query.execute(self.graphql_client.clone()).await
10469    }
10470    /// The URI of this secret.
10471    pub async fn uri(&self) -> Result<String, DaggerError> {
10472        let query = self.selection.select("uri");
10473        query.execute(self.graphql_client.clone()).await
10474    }
10475}
10476#[derive(Clone)]
10477pub struct Service {
10478    pub proc: Option<Arc<DaggerSessionProc>>,
10479    pub selection: Selection,
10480    pub graphql_client: DynGraphQLClient,
10481}
10482#[derive(Builder, Debug, PartialEq)]
10483pub struct ServiceEndpointOpts<'a> {
10484    /// The exposed port number for the endpoint
10485    #[builder(setter(into, strip_option), default)]
10486    pub port: Option<isize>,
10487    /// Return a URL with the given scheme, eg. http for http://
10488    #[builder(setter(into, strip_option), default)]
10489    pub scheme: Option<&'a str>,
10490}
10491#[derive(Builder, Debug, PartialEq)]
10492pub struct ServiceStopOpts {
10493    /// Immediately kill the service without waiting for a graceful exit
10494    #[builder(setter(into, strip_option), default)]
10495    pub kill: Option<bool>,
10496}
10497#[derive(Builder, Debug, PartialEq)]
10498pub struct ServiceUpOpts {
10499    /// List of frontend/backend port mappings to forward.
10500    /// Frontend is the port accepting traffic on the host, backend is the service port.
10501    #[builder(setter(into, strip_option), default)]
10502    pub ports: Option<Vec<PortForward>>,
10503    /// Bind each tunnel port to a random port on the host.
10504    #[builder(setter(into, strip_option), default)]
10505    pub random: Option<bool>,
10506}
10507impl Service {
10508    /// Retrieves an endpoint that clients can use to reach this container.
10509    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
10510    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
10511    ///
10512    /// # Arguments
10513    ///
10514    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10515    pub async fn endpoint(&self) -> Result<String, DaggerError> {
10516        let query = self.selection.select("endpoint");
10517        query.execute(self.graphql_client.clone()).await
10518    }
10519    /// Retrieves an endpoint that clients can use to reach this container.
10520    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
10521    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
10522    ///
10523    /// # Arguments
10524    ///
10525    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10526    pub async fn endpoint_opts<'a>(
10527        &self,
10528        opts: ServiceEndpointOpts<'a>,
10529    ) -> Result<String, DaggerError> {
10530        let mut query = self.selection.select("endpoint");
10531        if let Some(port) = opts.port {
10532            query = query.arg("port", port);
10533        }
10534        if let Some(scheme) = opts.scheme {
10535            query = query.arg("scheme", scheme);
10536        }
10537        query.execute(self.graphql_client.clone()).await
10538    }
10539    /// Retrieves a hostname which can be used by clients to reach this container.
10540    pub async fn hostname(&self) -> Result<String, DaggerError> {
10541        let query = self.selection.select("hostname");
10542        query.execute(self.graphql_client.clone()).await
10543    }
10544    /// A unique identifier for this Service.
10545    pub async fn id(&self) -> Result<ServiceId, DaggerError> {
10546        let query = self.selection.select("id");
10547        query.execute(self.graphql_client.clone()).await
10548    }
10549    /// Retrieves the list of ports provided by the service.
10550    pub fn ports(&self) -> Vec<Port> {
10551        let query = self.selection.select("ports");
10552        vec![Port {
10553            proc: self.proc.clone(),
10554            selection: query,
10555            graphql_client: self.graphql_client.clone(),
10556        }]
10557    }
10558    /// Start the service and wait for its health checks to succeed.
10559    /// Services bound to a Container do not need to be manually started.
10560    pub async fn start(&self) -> Result<ServiceId, DaggerError> {
10561        let query = self.selection.select("start");
10562        query.execute(self.graphql_client.clone()).await
10563    }
10564    /// Stop the service.
10565    ///
10566    /// # Arguments
10567    ///
10568    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10569    pub async fn stop(&self) -> Result<ServiceId, DaggerError> {
10570        let query = self.selection.select("stop");
10571        query.execute(self.graphql_client.clone()).await
10572    }
10573    /// Stop the service.
10574    ///
10575    /// # Arguments
10576    ///
10577    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10578    pub async fn stop_opts(&self, opts: ServiceStopOpts) -> Result<ServiceId, DaggerError> {
10579        let mut query = self.selection.select("stop");
10580        if let Some(kill) = opts.kill {
10581            query = query.arg("kill", kill);
10582        }
10583        query.execute(self.graphql_client.clone()).await
10584    }
10585    /// Creates a tunnel that forwards traffic from the caller's network to this service.
10586    ///
10587    /// # Arguments
10588    ///
10589    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10590    pub async fn up(&self) -> Result<Void, DaggerError> {
10591        let query = self.selection.select("up");
10592        query.execute(self.graphql_client.clone()).await
10593    }
10594    /// Creates a tunnel that forwards traffic from the caller's network to this service.
10595    ///
10596    /// # Arguments
10597    ///
10598    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10599    pub async fn up_opts(&self, opts: ServiceUpOpts) -> Result<Void, DaggerError> {
10600        let mut query = self.selection.select("up");
10601        if let Some(ports) = opts.ports {
10602            query = query.arg("ports", ports);
10603        }
10604        if let Some(random) = opts.random {
10605            query = query.arg("random", random);
10606        }
10607        query.execute(self.graphql_client.clone()).await
10608    }
10609    /// Configures a hostname which can be used by clients within the session to reach this container.
10610    ///
10611    /// # Arguments
10612    ///
10613    /// * `hostname` - The hostname to use.
10614    pub fn with_hostname(&self, hostname: impl Into<String>) -> Service {
10615        let mut query = self.selection.select("withHostname");
10616        query = query.arg("hostname", hostname.into());
10617        Service {
10618            proc: self.proc.clone(),
10619            selection: query,
10620            graphql_client: self.graphql_client.clone(),
10621        }
10622    }
10623}
10624#[derive(Clone)]
10625pub struct Socket {
10626    pub proc: Option<Arc<DaggerSessionProc>>,
10627    pub selection: Selection,
10628    pub graphql_client: DynGraphQLClient,
10629}
10630impl Socket {
10631    /// A unique identifier for this Socket.
10632    pub async fn id(&self) -> Result<SocketId, DaggerError> {
10633        let query = self.selection.select("id");
10634        query.execute(self.graphql_client.clone()).await
10635    }
10636}
10637#[derive(Clone)]
10638pub struct SourceMap {
10639    pub proc: Option<Arc<DaggerSessionProc>>,
10640    pub selection: Selection,
10641    pub graphql_client: DynGraphQLClient,
10642}
10643impl SourceMap {
10644    /// The column number within the line.
10645    pub async fn column(&self) -> Result<isize, DaggerError> {
10646        let query = self.selection.select("column");
10647        query.execute(self.graphql_client.clone()).await
10648    }
10649    /// The filename from the module source.
10650    pub async fn filename(&self) -> Result<String, DaggerError> {
10651        let query = self.selection.select("filename");
10652        query.execute(self.graphql_client.clone()).await
10653    }
10654    /// A unique identifier for this SourceMap.
10655    pub async fn id(&self) -> Result<SourceMapId, DaggerError> {
10656        let query = self.selection.select("id");
10657        query.execute(self.graphql_client.clone()).await
10658    }
10659    /// The line number within the filename.
10660    pub async fn line(&self) -> Result<isize, DaggerError> {
10661        let query = self.selection.select("line");
10662        query.execute(self.graphql_client.clone()).await
10663    }
10664    /// The module dependency this was declared in.
10665    pub async fn module(&self) -> Result<String, DaggerError> {
10666        let query = self.selection.select("module");
10667        query.execute(self.graphql_client.clone()).await
10668    }
10669}
10670#[derive(Clone)]
10671pub struct Terminal {
10672    pub proc: Option<Arc<DaggerSessionProc>>,
10673    pub selection: Selection,
10674    pub graphql_client: DynGraphQLClient,
10675}
10676impl Terminal {
10677    /// A unique identifier for this Terminal.
10678    pub async fn id(&self) -> Result<TerminalId, DaggerError> {
10679        let query = self.selection.select("id");
10680        query.execute(self.graphql_client.clone()).await
10681    }
10682    /// Forces evaluation of the pipeline in the engine.
10683    /// It doesn't run the default command if no exec has been set.
10684    pub async fn sync(&self) -> Result<TerminalId, DaggerError> {
10685        let query = self.selection.select("sync");
10686        query.execute(self.graphql_client.clone()).await
10687    }
10688}
10689#[derive(Clone)]
10690pub struct TypeDef {
10691    pub proc: Option<Arc<DaggerSessionProc>>,
10692    pub selection: Selection,
10693    pub graphql_client: DynGraphQLClient,
10694}
10695#[derive(Builder, Debug, PartialEq)]
10696pub struct TypeDefWithEnumOpts<'a> {
10697    /// A doc string for the enum, if any
10698    #[builder(setter(into, strip_option), default)]
10699    pub description: Option<&'a str>,
10700    /// The source map for the enum definition.
10701    #[builder(setter(into, strip_option), default)]
10702    pub source_map: Option<SourceMapId>,
10703}
10704#[derive(Builder, Debug, PartialEq)]
10705pub struct TypeDefWithEnumValueOpts<'a> {
10706    /// A doc string for the value, if any
10707    #[builder(setter(into, strip_option), default)]
10708    pub description: Option<&'a str>,
10709    /// The source map for the enum value definition.
10710    #[builder(setter(into, strip_option), default)]
10711    pub source_map: Option<SourceMapId>,
10712}
10713#[derive(Builder, Debug, PartialEq)]
10714pub struct TypeDefWithFieldOpts<'a> {
10715    /// A doc string for the field, if any
10716    #[builder(setter(into, strip_option), default)]
10717    pub description: Option<&'a str>,
10718    /// The source map for the field definition.
10719    #[builder(setter(into, strip_option), default)]
10720    pub source_map: Option<SourceMapId>,
10721}
10722#[derive(Builder, Debug, PartialEq)]
10723pub struct TypeDefWithInterfaceOpts<'a> {
10724    #[builder(setter(into, strip_option), default)]
10725    pub description: Option<&'a str>,
10726    #[builder(setter(into, strip_option), default)]
10727    pub source_map: Option<SourceMapId>,
10728}
10729#[derive(Builder, Debug, PartialEq)]
10730pub struct TypeDefWithObjectOpts<'a> {
10731    #[builder(setter(into, strip_option), default)]
10732    pub description: Option<&'a str>,
10733    #[builder(setter(into, strip_option), default)]
10734    pub source_map: Option<SourceMapId>,
10735}
10736#[derive(Builder, Debug, PartialEq)]
10737pub struct TypeDefWithScalarOpts<'a> {
10738    #[builder(setter(into, strip_option), default)]
10739    pub description: Option<&'a str>,
10740}
10741impl TypeDef {
10742    /// If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null.
10743    pub fn as_enum(&self) -> EnumTypeDef {
10744        let query = self.selection.select("asEnum");
10745        EnumTypeDef {
10746            proc: self.proc.clone(),
10747            selection: query,
10748            graphql_client: self.graphql_client.clone(),
10749        }
10750    }
10751    /// If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null.
10752    pub fn as_input(&self) -> InputTypeDef {
10753        let query = self.selection.select("asInput");
10754        InputTypeDef {
10755            proc: self.proc.clone(),
10756            selection: query,
10757            graphql_client: self.graphql_client.clone(),
10758        }
10759    }
10760    /// If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null.
10761    pub fn as_interface(&self) -> InterfaceTypeDef {
10762        let query = self.selection.select("asInterface");
10763        InterfaceTypeDef {
10764            proc: self.proc.clone(),
10765            selection: query,
10766            graphql_client: self.graphql_client.clone(),
10767        }
10768    }
10769    /// If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null.
10770    pub fn as_list(&self) -> ListTypeDef {
10771        let query = self.selection.select("asList");
10772        ListTypeDef {
10773            proc: self.proc.clone(),
10774            selection: query,
10775            graphql_client: self.graphql_client.clone(),
10776        }
10777    }
10778    /// If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null.
10779    pub fn as_object(&self) -> ObjectTypeDef {
10780        let query = self.selection.select("asObject");
10781        ObjectTypeDef {
10782            proc: self.proc.clone(),
10783            selection: query,
10784            graphql_client: self.graphql_client.clone(),
10785        }
10786    }
10787    /// If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null.
10788    pub fn as_scalar(&self) -> ScalarTypeDef {
10789        let query = self.selection.select("asScalar");
10790        ScalarTypeDef {
10791            proc: self.proc.clone(),
10792            selection: query,
10793            graphql_client: self.graphql_client.clone(),
10794        }
10795    }
10796    /// A unique identifier for this TypeDef.
10797    pub async fn id(&self) -> Result<TypeDefId, DaggerError> {
10798        let query = self.selection.select("id");
10799        query.execute(self.graphql_client.clone()).await
10800    }
10801    /// The kind of type this is (e.g. primitive, list, object).
10802    pub async fn kind(&self) -> Result<TypeDefKind, DaggerError> {
10803        let query = self.selection.select("kind");
10804        query.execute(self.graphql_client.clone()).await
10805    }
10806    /// Whether this type can be set to null. Defaults to false.
10807    pub async fn optional(&self) -> Result<bool, DaggerError> {
10808        let query = self.selection.select("optional");
10809        query.execute(self.graphql_client.clone()).await
10810    }
10811    /// Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
10812    pub fn with_constructor(&self, function: impl IntoID<FunctionId>) -> TypeDef {
10813        let mut query = self.selection.select("withConstructor");
10814        query = query.arg_lazy(
10815            "function",
10816            Box::new(move || {
10817                let function = function.clone();
10818                Box::pin(async move { function.into_id().await.unwrap().quote() })
10819            }),
10820        );
10821        TypeDef {
10822            proc: self.proc.clone(),
10823            selection: query,
10824            graphql_client: self.graphql_client.clone(),
10825        }
10826    }
10827    /// Returns a TypeDef of kind Enum with the provided name.
10828    /// 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.
10829    ///
10830    /// # Arguments
10831    ///
10832    /// * `name` - The name of the enum
10833    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10834    pub fn with_enum(&self, name: impl Into<String>) -> TypeDef {
10835        let mut query = self.selection.select("withEnum");
10836        query = query.arg("name", name.into());
10837        TypeDef {
10838            proc: self.proc.clone(),
10839            selection: query,
10840            graphql_client: self.graphql_client.clone(),
10841        }
10842    }
10843    /// Returns a TypeDef of kind Enum with the provided name.
10844    /// 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.
10845    ///
10846    /// # Arguments
10847    ///
10848    /// * `name` - The name of the enum
10849    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10850    pub fn with_enum_opts<'a>(
10851        &self,
10852        name: impl Into<String>,
10853        opts: TypeDefWithEnumOpts<'a>,
10854    ) -> TypeDef {
10855        let mut query = self.selection.select("withEnum");
10856        query = query.arg("name", name.into());
10857        if let Some(description) = opts.description {
10858            query = query.arg("description", description);
10859        }
10860        if let Some(source_map) = opts.source_map {
10861            query = query.arg("sourceMap", source_map);
10862        }
10863        TypeDef {
10864            proc: self.proc.clone(),
10865            selection: query,
10866            graphql_client: self.graphql_client.clone(),
10867        }
10868    }
10869    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
10870    ///
10871    /// # Arguments
10872    ///
10873    /// * `value` - The name of the value in the enum
10874    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10875    pub fn with_enum_value(&self, value: impl Into<String>) -> TypeDef {
10876        let mut query = self.selection.select("withEnumValue");
10877        query = query.arg("value", value.into());
10878        TypeDef {
10879            proc: self.proc.clone(),
10880            selection: query,
10881            graphql_client: self.graphql_client.clone(),
10882        }
10883    }
10884    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
10885    ///
10886    /// # Arguments
10887    ///
10888    /// * `value` - The name of the value in the enum
10889    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10890    pub fn with_enum_value_opts<'a>(
10891        &self,
10892        value: impl Into<String>,
10893        opts: TypeDefWithEnumValueOpts<'a>,
10894    ) -> TypeDef {
10895        let mut query = self.selection.select("withEnumValue");
10896        query = query.arg("value", value.into());
10897        if let Some(description) = opts.description {
10898            query = query.arg("description", description);
10899        }
10900        if let Some(source_map) = opts.source_map {
10901            query = query.arg("sourceMap", source_map);
10902        }
10903        TypeDef {
10904            proc: self.proc.clone(),
10905            selection: query,
10906            graphql_client: self.graphql_client.clone(),
10907        }
10908    }
10909    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
10910    ///
10911    /// # Arguments
10912    ///
10913    /// * `name` - The name of the field in the object
10914    /// * `type_def` - The type of the field
10915    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10916    pub fn with_field(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> TypeDef {
10917        let mut query = self.selection.select("withField");
10918        query = query.arg("name", name.into());
10919        query = query.arg_lazy(
10920            "typeDef",
10921            Box::new(move || {
10922                let type_def = type_def.clone();
10923                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
10924            }),
10925        );
10926        TypeDef {
10927            proc: self.proc.clone(),
10928            selection: query,
10929            graphql_client: self.graphql_client.clone(),
10930        }
10931    }
10932    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
10933    ///
10934    /// # Arguments
10935    ///
10936    /// * `name` - The name of the field in the object
10937    /// * `type_def` - The type of the field
10938    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10939    pub fn with_field_opts<'a>(
10940        &self,
10941        name: impl Into<String>,
10942        type_def: impl IntoID<TypeDefId>,
10943        opts: TypeDefWithFieldOpts<'a>,
10944    ) -> TypeDef {
10945        let mut query = self.selection.select("withField");
10946        query = query.arg("name", name.into());
10947        query = query.arg_lazy(
10948            "typeDef",
10949            Box::new(move || {
10950                let type_def = type_def.clone();
10951                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
10952            }),
10953        );
10954        if let Some(description) = opts.description {
10955            query = query.arg("description", description);
10956        }
10957        if let Some(source_map) = opts.source_map {
10958            query = query.arg("sourceMap", source_map);
10959        }
10960        TypeDef {
10961            proc: self.proc.clone(),
10962            selection: query,
10963            graphql_client: self.graphql_client.clone(),
10964        }
10965    }
10966    /// Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds.
10967    pub fn with_function(&self, function: impl IntoID<FunctionId>) -> TypeDef {
10968        let mut query = self.selection.select("withFunction");
10969        query = query.arg_lazy(
10970            "function",
10971            Box::new(move || {
10972                let function = function.clone();
10973                Box::pin(async move { function.into_id().await.unwrap().quote() })
10974            }),
10975        );
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(&self, name: impl Into<String>) -> TypeDef {
10988        let mut query = self.selection.select("withInterface");
10989        query = query.arg("name", name.into());
10990        TypeDef {
10991            proc: self.proc.clone(),
10992            selection: query,
10993            graphql_client: self.graphql_client.clone(),
10994        }
10995    }
10996    /// Returns a TypeDef of kind Interface with the provided name.
10997    ///
10998    /// # Arguments
10999    ///
11000    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11001    pub fn with_interface_opts<'a>(
11002        &self,
11003        name: impl Into<String>,
11004        opts: TypeDefWithInterfaceOpts<'a>,
11005    ) -> TypeDef {
11006        let mut query = self.selection.select("withInterface");
11007        query = query.arg("name", name.into());
11008        if let Some(description) = opts.description {
11009            query = query.arg("description", description);
11010        }
11011        if let Some(source_map) = opts.source_map {
11012            query = query.arg("sourceMap", source_map);
11013        }
11014        TypeDef {
11015            proc: self.proc.clone(),
11016            selection: query,
11017            graphql_client: self.graphql_client.clone(),
11018        }
11019    }
11020    /// Sets the kind of the type.
11021    pub fn with_kind(&self, kind: TypeDefKind) -> TypeDef {
11022        let mut query = self.selection.select("withKind");
11023        query = query.arg("kind", kind);
11024        TypeDef {
11025            proc: self.proc.clone(),
11026            selection: query,
11027            graphql_client: self.graphql_client.clone(),
11028        }
11029    }
11030    /// Returns a TypeDef of kind List with the provided type for its elements.
11031    pub fn with_list_of(&self, element_type: impl IntoID<TypeDefId>) -> TypeDef {
11032        let mut query = self.selection.select("withListOf");
11033        query = query.arg_lazy(
11034            "elementType",
11035            Box::new(move || {
11036                let element_type = element_type.clone();
11037                Box::pin(async move { element_type.into_id().await.unwrap().quote() })
11038            }),
11039        );
11040        TypeDef {
11041            proc: self.proc.clone(),
11042            selection: query,
11043            graphql_client: self.graphql_client.clone(),
11044        }
11045    }
11046    /// Returns a TypeDef of kind Object with the provided name.
11047    /// 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.
11048    ///
11049    /// # Arguments
11050    ///
11051    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11052    pub fn with_object(&self, name: impl Into<String>) -> TypeDef {
11053        let mut query = self.selection.select("withObject");
11054        query = query.arg("name", name.into());
11055        TypeDef {
11056            proc: self.proc.clone(),
11057            selection: query,
11058            graphql_client: self.graphql_client.clone(),
11059        }
11060    }
11061    /// Returns a TypeDef of kind Object with the provided name.
11062    /// 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.
11063    ///
11064    /// # Arguments
11065    ///
11066    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11067    pub fn with_object_opts<'a>(
11068        &self,
11069        name: impl Into<String>,
11070        opts: TypeDefWithObjectOpts<'a>,
11071    ) -> TypeDef {
11072        let mut query = self.selection.select("withObject");
11073        query = query.arg("name", name.into());
11074        if let Some(description) = opts.description {
11075            query = query.arg("description", description);
11076        }
11077        if let Some(source_map) = opts.source_map {
11078            query = query.arg("sourceMap", source_map);
11079        }
11080        TypeDef {
11081            proc: self.proc.clone(),
11082            selection: query,
11083            graphql_client: self.graphql_client.clone(),
11084        }
11085    }
11086    /// Sets whether this type can be set to null.
11087    pub fn with_optional(&self, optional: bool) -> TypeDef {
11088        let mut query = self.selection.select("withOptional");
11089        query = query.arg("optional", optional);
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(&self, name: impl Into<String>) -> TypeDef {
11102        let mut query = self.selection.select("withScalar");
11103        query = query.arg("name", name.into());
11104        TypeDef {
11105            proc: self.proc.clone(),
11106            selection: query,
11107            graphql_client: self.graphql_client.clone(),
11108        }
11109    }
11110    /// Returns a TypeDef of kind Scalar with the provided name.
11111    ///
11112    /// # Arguments
11113    ///
11114    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11115    pub fn with_scalar_opts<'a>(
11116        &self,
11117        name: impl Into<String>,
11118        opts: TypeDefWithScalarOpts<'a>,
11119    ) -> TypeDef {
11120        let mut query = self.selection.select("withScalar");
11121        query = query.arg("name", name.into());
11122        if let Some(description) = opts.description {
11123            query = query.arg("description", description);
11124        }
11125        TypeDef {
11126            proc: self.proc.clone(),
11127            selection: query,
11128            graphql_client: self.graphql_client.clone(),
11129        }
11130    }
11131}
11132#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11133pub enum CacheSharingMode {
11134    #[serde(rename = "LOCKED")]
11135    Locked,
11136    #[serde(rename = "PRIVATE")]
11137    Private,
11138    #[serde(rename = "SHARED")]
11139    Shared,
11140}
11141#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11142pub enum ImageLayerCompression {
11143    #[serde(rename = "EStarGZ")]
11144    EStarGz,
11145    #[serde(rename = "Gzip")]
11146    Gzip,
11147    #[serde(rename = "Uncompressed")]
11148    Uncompressed,
11149    #[serde(rename = "Zstd")]
11150    Zstd,
11151}
11152#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11153pub enum ImageMediaTypes {
11154    #[serde(rename = "DockerMediaTypes")]
11155    DockerMediaTypes,
11156    #[serde(rename = "OCIMediaTypes")]
11157    OciMediaTypes,
11158}
11159#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11160pub enum ModuleSourceKind {
11161    #[serde(rename = "DIR_SOURCE")]
11162    DirSource,
11163    #[serde(rename = "GIT_SOURCE")]
11164    GitSource,
11165    #[serde(rename = "LOCAL_SOURCE")]
11166    LocalSource,
11167}
11168#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11169pub enum NetworkProtocol {
11170    #[serde(rename = "TCP")]
11171    Tcp,
11172    #[serde(rename = "UDP")]
11173    Udp,
11174}
11175#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11176pub enum ReturnType {
11177    #[serde(rename = "ANY")]
11178    Any,
11179    #[serde(rename = "FAILURE")]
11180    Failure,
11181    #[serde(rename = "SUCCESS")]
11182    Success,
11183}
11184#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11185pub enum TypeDefKind {
11186    #[serde(rename = "BOOLEAN_KIND")]
11187    BooleanKind,
11188    #[serde(rename = "ENUM_KIND")]
11189    EnumKind,
11190    #[serde(rename = "FLOAT_KIND")]
11191    FloatKind,
11192    #[serde(rename = "INPUT_KIND")]
11193    InputKind,
11194    #[serde(rename = "INTEGER_KIND")]
11195    IntegerKind,
11196    #[serde(rename = "INTERFACE_KIND")]
11197    InterfaceKind,
11198    #[serde(rename = "LIST_KIND")]
11199    ListKind,
11200    #[serde(rename = "OBJECT_KIND")]
11201    ObjectKind,
11202    #[serde(rename = "SCALAR_KIND")]
11203    ScalarKind,
11204    #[serde(rename = "STRING_KIND")]
11205    StringKind,
11206    #[serde(rename = "VOID_KIND")]
11207    VoidKind,
11208}