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 LlmTokenUsageId(pub String);
927impl From<&str> for LlmTokenUsageId {
928    fn from(value: &str) -> Self {
929        Self(value.to_string())
930    }
931}
932impl From<String> for LlmTokenUsageId {
933    fn from(value: String) -> Self {
934        Self(value)
935    }
936}
937impl IntoID<LlmTokenUsageId> for LlmTokenUsage {
938    fn into_id(
939        self,
940    ) -> std::pin::Pin<
941        Box<dyn core::future::Future<Output = Result<LlmTokenUsageId, DaggerError>> + Send>,
942    > {
943        Box::pin(async move { self.id().await })
944    }
945}
946impl IntoID<LlmTokenUsageId> for LlmTokenUsageId {
947    fn into_id(
948        self,
949    ) -> std::pin::Pin<
950        Box<dyn core::future::Future<Output = Result<LlmTokenUsageId, DaggerError>> + Send>,
951    > {
952        Box::pin(async move { Ok::<LlmTokenUsageId, DaggerError>(self) })
953    }
954}
955impl LlmTokenUsageId {
956    fn quote(&self) -> String {
957        format!("\"{}\"", self.0.clone())
958    }
959}
960#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
961pub struct LlmVariableId(pub String);
962impl From<&str> for LlmVariableId {
963    fn from(value: &str) -> Self {
964        Self(value.to_string())
965    }
966}
967impl From<String> for LlmVariableId {
968    fn from(value: String) -> Self {
969        Self(value)
970    }
971}
972impl IntoID<LlmVariableId> for LlmVariable {
973    fn into_id(
974        self,
975    ) -> std::pin::Pin<
976        Box<dyn core::future::Future<Output = Result<LlmVariableId, DaggerError>> + Send>,
977    > {
978        Box::pin(async move { self.id().await })
979    }
980}
981impl IntoID<LlmVariableId> for LlmVariableId {
982    fn into_id(
983        self,
984    ) -> std::pin::Pin<
985        Box<dyn core::future::Future<Output = Result<LlmVariableId, DaggerError>> + Send>,
986    > {
987        Box::pin(async move { Ok::<LlmVariableId, DaggerError>(self) })
988    }
989}
990impl LlmVariableId {
991    fn quote(&self) -> String {
992        format!("\"{}\"", self.0.clone())
993    }
994}
995#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
996pub struct LabelId(pub String);
997impl From<&str> for LabelId {
998    fn from(value: &str) -> Self {
999        Self(value.to_string())
1000    }
1001}
1002impl From<String> for LabelId {
1003    fn from(value: String) -> Self {
1004        Self(value)
1005    }
1006}
1007impl IntoID<LabelId> for Label {
1008    fn into_id(
1009        self,
1010    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<LabelId, DaggerError>> + Send>>
1011    {
1012        Box::pin(async move { self.id().await })
1013    }
1014}
1015impl IntoID<LabelId> for LabelId {
1016    fn into_id(
1017        self,
1018    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<LabelId, DaggerError>> + Send>>
1019    {
1020        Box::pin(async move { Ok::<LabelId, DaggerError>(self) })
1021    }
1022}
1023impl LabelId {
1024    fn quote(&self) -> String {
1025        format!("\"{}\"", self.0.clone())
1026    }
1027}
1028#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1029pub struct ListTypeDefId(pub String);
1030impl From<&str> for ListTypeDefId {
1031    fn from(value: &str) -> Self {
1032        Self(value.to_string())
1033    }
1034}
1035impl From<String> for ListTypeDefId {
1036    fn from(value: String) -> Self {
1037        Self(value)
1038    }
1039}
1040impl IntoID<ListTypeDefId> for ListTypeDef {
1041    fn into_id(
1042        self,
1043    ) -> std::pin::Pin<
1044        Box<dyn core::future::Future<Output = Result<ListTypeDefId, DaggerError>> + Send>,
1045    > {
1046        Box::pin(async move { self.id().await })
1047    }
1048}
1049impl IntoID<ListTypeDefId> for ListTypeDefId {
1050    fn into_id(
1051        self,
1052    ) -> std::pin::Pin<
1053        Box<dyn core::future::Future<Output = Result<ListTypeDefId, DaggerError>> + Send>,
1054    > {
1055        Box::pin(async move { Ok::<ListTypeDefId, DaggerError>(self) })
1056    }
1057}
1058impl ListTypeDefId {
1059    fn quote(&self) -> String {
1060        format!("\"{}\"", self.0.clone())
1061    }
1062}
1063#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1064pub struct ModuleConfigClientId(pub String);
1065impl From<&str> for ModuleConfigClientId {
1066    fn from(value: &str) -> Self {
1067        Self(value.to_string())
1068    }
1069}
1070impl From<String> for ModuleConfigClientId {
1071    fn from(value: String) -> Self {
1072        Self(value)
1073    }
1074}
1075impl IntoID<ModuleConfigClientId> for ModuleConfigClient {
1076    fn into_id(
1077        self,
1078    ) -> std::pin::Pin<
1079        Box<dyn core::future::Future<Output = Result<ModuleConfigClientId, DaggerError>> + Send>,
1080    > {
1081        Box::pin(async move { self.id().await })
1082    }
1083}
1084impl IntoID<ModuleConfigClientId> for ModuleConfigClientId {
1085    fn into_id(
1086        self,
1087    ) -> std::pin::Pin<
1088        Box<dyn core::future::Future<Output = Result<ModuleConfigClientId, DaggerError>> + Send>,
1089    > {
1090        Box::pin(async move { Ok::<ModuleConfigClientId, DaggerError>(self) })
1091    }
1092}
1093impl ModuleConfigClientId {
1094    fn quote(&self) -> String {
1095        format!("\"{}\"", self.0.clone())
1096    }
1097}
1098#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1099pub struct ModuleId(pub String);
1100impl From<&str> for ModuleId {
1101    fn from(value: &str) -> Self {
1102        Self(value.to_string())
1103    }
1104}
1105impl From<String> for ModuleId {
1106    fn from(value: String) -> Self {
1107        Self(value)
1108    }
1109}
1110impl IntoID<ModuleId> for Module {
1111    fn into_id(
1112        self,
1113    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ModuleId, DaggerError>> + Send>>
1114    {
1115        Box::pin(async move { self.id().await })
1116    }
1117}
1118impl IntoID<ModuleId> for ModuleId {
1119    fn into_id(
1120        self,
1121    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ModuleId, DaggerError>> + Send>>
1122    {
1123        Box::pin(async move { Ok::<ModuleId, DaggerError>(self) })
1124    }
1125}
1126impl ModuleId {
1127    fn quote(&self) -> String {
1128        format!("\"{}\"", self.0.clone())
1129    }
1130}
1131#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1132pub struct ModuleSourceId(pub String);
1133impl From<&str> for ModuleSourceId {
1134    fn from(value: &str) -> Self {
1135        Self(value.to_string())
1136    }
1137}
1138impl From<String> for ModuleSourceId {
1139    fn from(value: String) -> Self {
1140        Self(value)
1141    }
1142}
1143impl IntoID<ModuleSourceId> for ModuleSource {
1144    fn into_id(
1145        self,
1146    ) -> std::pin::Pin<
1147        Box<dyn core::future::Future<Output = Result<ModuleSourceId, DaggerError>> + Send>,
1148    > {
1149        Box::pin(async move { self.id().await })
1150    }
1151}
1152impl IntoID<ModuleSourceId> for ModuleSourceId {
1153    fn into_id(
1154        self,
1155    ) -> std::pin::Pin<
1156        Box<dyn core::future::Future<Output = Result<ModuleSourceId, DaggerError>> + Send>,
1157    > {
1158        Box::pin(async move { Ok::<ModuleSourceId, DaggerError>(self) })
1159    }
1160}
1161impl ModuleSourceId {
1162    fn quote(&self) -> String {
1163        format!("\"{}\"", self.0.clone())
1164    }
1165}
1166#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1167pub struct ObjectTypeDefId(pub String);
1168impl From<&str> for ObjectTypeDefId {
1169    fn from(value: &str) -> Self {
1170        Self(value.to_string())
1171    }
1172}
1173impl From<String> for ObjectTypeDefId {
1174    fn from(value: String) -> Self {
1175        Self(value)
1176    }
1177}
1178impl IntoID<ObjectTypeDefId> for ObjectTypeDef {
1179    fn into_id(
1180        self,
1181    ) -> std::pin::Pin<
1182        Box<dyn core::future::Future<Output = Result<ObjectTypeDefId, DaggerError>> + Send>,
1183    > {
1184        Box::pin(async move { self.id().await })
1185    }
1186}
1187impl IntoID<ObjectTypeDefId> for ObjectTypeDefId {
1188    fn into_id(
1189        self,
1190    ) -> std::pin::Pin<
1191        Box<dyn core::future::Future<Output = Result<ObjectTypeDefId, DaggerError>> + Send>,
1192    > {
1193        Box::pin(async move { Ok::<ObjectTypeDefId, DaggerError>(self) })
1194    }
1195}
1196impl ObjectTypeDefId {
1197    fn quote(&self) -> String {
1198        format!("\"{}\"", self.0.clone())
1199    }
1200}
1201#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1202pub struct Platform(pub String);
1203impl From<&str> for Platform {
1204    fn from(value: &str) -> Self {
1205        Self(value.to_string())
1206    }
1207}
1208impl From<String> for Platform {
1209    fn from(value: String) -> Self {
1210        Self(value)
1211    }
1212}
1213impl Platform {
1214    fn quote(&self) -> String {
1215        format!("\"{}\"", self.0.clone())
1216    }
1217}
1218#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1219pub struct PortId(pub String);
1220impl From<&str> for PortId {
1221    fn from(value: &str) -> Self {
1222        Self(value.to_string())
1223    }
1224}
1225impl From<String> for PortId {
1226    fn from(value: String) -> Self {
1227        Self(value)
1228    }
1229}
1230impl IntoID<PortId> for Port {
1231    fn into_id(
1232        self,
1233    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<PortId, DaggerError>> + Send>>
1234    {
1235        Box::pin(async move { self.id().await })
1236    }
1237}
1238impl IntoID<PortId> for PortId {
1239    fn into_id(
1240        self,
1241    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<PortId, DaggerError>> + Send>>
1242    {
1243        Box::pin(async move { Ok::<PortId, DaggerError>(self) })
1244    }
1245}
1246impl PortId {
1247    fn quote(&self) -> String {
1248        format!("\"{}\"", self.0.clone())
1249    }
1250}
1251#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1252pub struct SdkConfigId(pub String);
1253impl From<&str> for SdkConfigId {
1254    fn from(value: &str) -> Self {
1255        Self(value.to_string())
1256    }
1257}
1258impl From<String> for SdkConfigId {
1259    fn from(value: String) -> Self {
1260        Self(value)
1261    }
1262}
1263impl IntoID<SdkConfigId> for SdkConfig {
1264    fn into_id(
1265        self,
1266    ) -> std::pin::Pin<
1267        Box<dyn core::future::Future<Output = Result<SdkConfigId, DaggerError>> + Send>,
1268    > {
1269        Box::pin(async move { self.id().await })
1270    }
1271}
1272impl IntoID<SdkConfigId> for SdkConfigId {
1273    fn into_id(
1274        self,
1275    ) -> std::pin::Pin<
1276        Box<dyn core::future::Future<Output = Result<SdkConfigId, DaggerError>> + Send>,
1277    > {
1278        Box::pin(async move { Ok::<SdkConfigId, DaggerError>(self) })
1279    }
1280}
1281impl SdkConfigId {
1282    fn quote(&self) -> String {
1283        format!("\"{}\"", self.0.clone())
1284    }
1285}
1286#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1287pub struct ScalarTypeDefId(pub String);
1288impl From<&str> for ScalarTypeDefId {
1289    fn from(value: &str) -> Self {
1290        Self(value.to_string())
1291    }
1292}
1293impl From<String> for ScalarTypeDefId {
1294    fn from(value: String) -> Self {
1295        Self(value)
1296    }
1297}
1298impl IntoID<ScalarTypeDefId> for ScalarTypeDef {
1299    fn into_id(
1300        self,
1301    ) -> std::pin::Pin<
1302        Box<dyn core::future::Future<Output = Result<ScalarTypeDefId, DaggerError>> + Send>,
1303    > {
1304        Box::pin(async move { self.id().await })
1305    }
1306}
1307impl IntoID<ScalarTypeDefId> for ScalarTypeDefId {
1308    fn into_id(
1309        self,
1310    ) -> std::pin::Pin<
1311        Box<dyn core::future::Future<Output = Result<ScalarTypeDefId, DaggerError>> + Send>,
1312    > {
1313        Box::pin(async move { Ok::<ScalarTypeDefId, DaggerError>(self) })
1314    }
1315}
1316impl ScalarTypeDefId {
1317    fn quote(&self) -> String {
1318        format!("\"{}\"", self.0.clone())
1319    }
1320}
1321#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1322pub struct SecretId(pub String);
1323impl From<&str> for SecretId {
1324    fn from(value: &str) -> Self {
1325        Self(value.to_string())
1326    }
1327}
1328impl From<String> for SecretId {
1329    fn from(value: String) -> Self {
1330        Self(value)
1331    }
1332}
1333impl IntoID<SecretId> for Secret {
1334    fn into_id(
1335        self,
1336    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SecretId, DaggerError>> + Send>>
1337    {
1338        Box::pin(async move { self.id().await })
1339    }
1340}
1341impl IntoID<SecretId> for SecretId {
1342    fn into_id(
1343        self,
1344    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SecretId, DaggerError>> + Send>>
1345    {
1346        Box::pin(async move { Ok::<SecretId, DaggerError>(self) })
1347    }
1348}
1349impl SecretId {
1350    fn quote(&self) -> String {
1351        format!("\"{}\"", self.0.clone())
1352    }
1353}
1354#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1355pub struct ServiceId(pub String);
1356impl From<&str> for ServiceId {
1357    fn from(value: &str) -> Self {
1358        Self(value.to_string())
1359    }
1360}
1361impl From<String> for ServiceId {
1362    fn from(value: String) -> Self {
1363        Self(value)
1364    }
1365}
1366impl IntoID<ServiceId> for Service {
1367    fn into_id(
1368        self,
1369    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ServiceId, DaggerError>> + Send>>
1370    {
1371        Box::pin(async move { self.id().await })
1372    }
1373}
1374impl IntoID<ServiceId> for ServiceId {
1375    fn into_id(
1376        self,
1377    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ServiceId, DaggerError>> + Send>>
1378    {
1379        Box::pin(async move { Ok::<ServiceId, DaggerError>(self) })
1380    }
1381}
1382impl ServiceId {
1383    fn quote(&self) -> String {
1384        format!("\"{}\"", self.0.clone())
1385    }
1386}
1387#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1388pub struct SocketId(pub String);
1389impl From<&str> for SocketId {
1390    fn from(value: &str) -> Self {
1391        Self(value.to_string())
1392    }
1393}
1394impl From<String> for SocketId {
1395    fn from(value: String) -> Self {
1396        Self(value)
1397    }
1398}
1399impl IntoID<SocketId> for Socket {
1400    fn into_id(
1401        self,
1402    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SocketId, DaggerError>> + Send>>
1403    {
1404        Box::pin(async move { self.id().await })
1405    }
1406}
1407impl IntoID<SocketId> for SocketId {
1408    fn into_id(
1409        self,
1410    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SocketId, DaggerError>> + Send>>
1411    {
1412        Box::pin(async move { Ok::<SocketId, DaggerError>(self) })
1413    }
1414}
1415impl SocketId {
1416    fn quote(&self) -> String {
1417        format!("\"{}\"", self.0.clone())
1418    }
1419}
1420#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1421pub struct SourceMapId(pub String);
1422impl From<&str> for SourceMapId {
1423    fn from(value: &str) -> Self {
1424        Self(value.to_string())
1425    }
1426}
1427impl From<String> for SourceMapId {
1428    fn from(value: String) -> Self {
1429        Self(value)
1430    }
1431}
1432impl IntoID<SourceMapId> for SourceMap {
1433    fn into_id(
1434        self,
1435    ) -> std::pin::Pin<
1436        Box<dyn core::future::Future<Output = Result<SourceMapId, DaggerError>> + Send>,
1437    > {
1438        Box::pin(async move { self.id().await })
1439    }
1440}
1441impl IntoID<SourceMapId> for SourceMapId {
1442    fn into_id(
1443        self,
1444    ) -> std::pin::Pin<
1445        Box<dyn core::future::Future<Output = Result<SourceMapId, DaggerError>> + Send>,
1446    > {
1447        Box::pin(async move { Ok::<SourceMapId, DaggerError>(self) })
1448    }
1449}
1450impl SourceMapId {
1451    fn quote(&self) -> String {
1452        format!("\"{}\"", self.0.clone())
1453    }
1454}
1455#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1456pub struct TerminalId(pub String);
1457impl From<&str> for TerminalId {
1458    fn from(value: &str) -> Self {
1459        Self(value.to_string())
1460    }
1461}
1462impl From<String> for TerminalId {
1463    fn from(value: String) -> Self {
1464        Self(value)
1465    }
1466}
1467impl IntoID<TerminalId> for Terminal {
1468    fn into_id(
1469        self,
1470    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TerminalId, DaggerError>> + Send>>
1471    {
1472        Box::pin(async move { self.id().await })
1473    }
1474}
1475impl IntoID<TerminalId> for TerminalId {
1476    fn into_id(
1477        self,
1478    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TerminalId, DaggerError>> + Send>>
1479    {
1480        Box::pin(async move { Ok::<TerminalId, DaggerError>(self) })
1481    }
1482}
1483impl TerminalId {
1484    fn quote(&self) -> String {
1485        format!("\"{}\"", self.0.clone())
1486    }
1487}
1488#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1489pub struct TypeDefId(pub String);
1490impl From<&str> for TypeDefId {
1491    fn from(value: &str) -> Self {
1492        Self(value.to_string())
1493    }
1494}
1495impl From<String> for TypeDefId {
1496    fn from(value: String) -> Self {
1497        Self(value)
1498    }
1499}
1500impl IntoID<TypeDefId> for TypeDef {
1501    fn into_id(
1502        self,
1503    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TypeDefId, DaggerError>> + Send>>
1504    {
1505        Box::pin(async move { self.id().await })
1506    }
1507}
1508impl IntoID<TypeDefId> for TypeDefId {
1509    fn into_id(
1510        self,
1511    ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TypeDefId, DaggerError>> + Send>>
1512    {
1513        Box::pin(async move { Ok::<TypeDefId, DaggerError>(self) })
1514    }
1515}
1516impl TypeDefId {
1517    fn quote(&self) -> String {
1518        format!("\"{}\"", self.0.clone())
1519    }
1520}
1521#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1522pub struct Void(pub String);
1523impl From<&str> for Void {
1524    fn from(value: &str) -> Self {
1525        Self(value.to_string())
1526    }
1527}
1528impl From<String> for Void {
1529    fn from(value: String) -> Self {
1530        Self(value)
1531    }
1532}
1533impl Void {
1534    fn quote(&self) -> String {
1535        format!("\"{}\"", self.0.clone())
1536    }
1537}
1538#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1539pub struct BuildArg {
1540    pub name: String,
1541    pub value: String,
1542}
1543#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1544pub struct PipelineLabel {
1545    pub name: String,
1546    pub value: String,
1547}
1548#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1549pub struct PortForward {
1550    pub backend: isize,
1551    pub frontend: isize,
1552    pub protocol: NetworkProtocol,
1553}
1554#[derive(Clone)]
1555pub struct CacheVolume {
1556    pub proc: Option<Arc<DaggerSessionProc>>,
1557    pub selection: Selection,
1558    pub graphql_client: DynGraphQLClient,
1559}
1560impl CacheVolume {
1561    /// A unique identifier for this CacheVolume.
1562    pub async fn id(&self) -> Result<CacheVolumeId, DaggerError> {
1563        let query = self.selection.select("id");
1564        query.execute(self.graphql_client.clone()).await
1565    }
1566}
1567#[derive(Clone)]
1568pub struct Container {
1569    pub proc: Option<Arc<DaggerSessionProc>>,
1570    pub selection: Selection,
1571    pub graphql_client: DynGraphQLClient,
1572}
1573#[derive(Builder, Debug, PartialEq)]
1574pub struct ContainerAsServiceOpts<'a> {
1575    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
1576    /// If empty, the container's default command is used.
1577    #[builder(setter(into, strip_option), default)]
1578    pub args: Option<Vec<&'a str>>,
1579    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1580    #[builder(setter(into, strip_option), default)]
1581    pub expand: Option<bool>,
1582    /// Provides Dagger access to the executed command.
1583    /// 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.
1584    #[builder(setter(into, strip_option), default)]
1585    pub experimental_privileged_nesting: Option<bool>,
1586    /// 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.
1587    #[builder(setter(into, strip_option), default)]
1588    pub insecure_root_capabilities: Option<bool>,
1589    /// If set, skip the automatic init process injected into containers by default.
1590    /// 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.
1591    #[builder(setter(into, strip_option), default)]
1592    pub no_init: Option<bool>,
1593    /// If the container has an entrypoint, prepend it to the args.
1594    #[builder(setter(into, strip_option), default)]
1595    pub use_entrypoint: Option<bool>,
1596}
1597#[derive(Builder, Debug, PartialEq)]
1598pub struct ContainerAsTarballOpts {
1599    /// Force each layer of the image to use the specified compression algorithm.
1600    /// 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.
1601    #[builder(setter(into, strip_option), default)]
1602    pub forced_compression: Option<ImageLayerCompression>,
1603    /// Use the specified media types for the image's layers.
1604    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
1605    #[builder(setter(into, strip_option), default)]
1606    pub media_types: Option<ImageMediaTypes>,
1607    /// Identifiers for other platform specific containers.
1608    /// Used for multi-platform images.
1609    #[builder(setter(into, strip_option), default)]
1610    pub platform_variants: Option<Vec<ContainerId>>,
1611}
1612#[derive(Builder, Debug, PartialEq)]
1613pub struct ContainerBuildOpts<'a> {
1614    /// Additional build arguments.
1615    #[builder(setter(into, strip_option), default)]
1616    pub build_args: Option<Vec<BuildArg>>,
1617    /// Path to the Dockerfile to use.
1618    #[builder(setter(into, strip_option), default)]
1619    pub dockerfile: Option<&'a str>,
1620    /// Secrets to pass to the build.
1621    /// They will be mounted at /run/secrets/[secret-name] in the build container
1622    /// 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))
1623    #[builder(setter(into, strip_option), default)]
1624    pub secrets: Option<Vec<SecretId>>,
1625    /// Target build stage to build.
1626    #[builder(setter(into, strip_option), default)]
1627    pub target: Option<&'a str>,
1628}
1629#[derive(Builder, Debug, PartialEq)]
1630pub struct ContainerDirectoryOpts {
1631    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1632    #[builder(setter(into, strip_option), default)]
1633    pub expand: Option<bool>,
1634}
1635#[derive(Builder, Debug, PartialEq)]
1636pub struct ContainerExportOpts {
1637    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1638    #[builder(setter(into, strip_option), default)]
1639    pub expand: Option<bool>,
1640    /// Force each layer of the exported image to use the specified compression algorithm.
1641    /// 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.
1642    #[builder(setter(into, strip_option), default)]
1643    pub forced_compression: Option<ImageLayerCompression>,
1644    /// Use the specified media types for the exported image's layers.
1645    /// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
1646    #[builder(setter(into, strip_option), default)]
1647    pub media_types: Option<ImageMediaTypes>,
1648    /// Identifiers for other platform specific containers.
1649    /// Used for multi-platform image.
1650    #[builder(setter(into, strip_option), default)]
1651    pub platform_variants: Option<Vec<ContainerId>>,
1652}
1653#[derive(Builder, Debug, PartialEq)]
1654pub struct ContainerFileOpts {
1655    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1656    #[builder(setter(into, strip_option), default)]
1657    pub expand: Option<bool>,
1658}
1659#[derive(Builder, Debug, PartialEq)]
1660pub struct ContainerImportOpts<'a> {
1661    /// Identifies the tag to import from the archive, if the archive bundles multiple tags.
1662    #[builder(setter(into, strip_option), default)]
1663    pub tag: Option<&'a str>,
1664}
1665#[derive(Builder, Debug, PartialEq)]
1666pub struct ContainerPublishOpts {
1667    /// Force each layer of the published image to use the specified compression algorithm.
1668    /// 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.
1669    #[builder(setter(into, strip_option), default)]
1670    pub forced_compression: Option<ImageLayerCompression>,
1671    /// Use the specified media types for the published image's layers.
1672    /// Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support.
1673    #[builder(setter(into, strip_option), default)]
1674    pub media_types: Option<ImageMediaTypes>,
1675    /// Identifiers for other platform specific containers.
1676    /// Used for multi-platform image.
1677    #[builder(setter(into, strip_option), default)]
1678    pub platform_variants: Option<Vec<ContainerId>>,
1679}
1680#[derive(Builder, Debug, PartialEq)]
1681pub struct ContainerTerminalOpts<'a> {
1682    /// If set, override the container's default terminal command and invoke these command arguments instead.
1683    #[builder(setter(into, strip_option), default)]
1684    pub cmd: Option<Vec<&'a str>>,
1685    /// Provides Dagger access to the executed command.
1686    /// 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.
1687    #[builder(setter(into, strip_option), default)]
1688    pub experimental_privileged_nesting: Option<bool>,
1689    /// 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.
1690    #[builder(setter(into, strip_option), default)]
1691    pub insecure_root_capabilities: Option<bool>,
1692}
1693#[derive(Builder, Debug, PartialEq)]
1694pub struct ContainerUpOpts<'a> {
1695    /// Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
1696    /// If empty, the container's default command is used.
1697    #[builder(setter(into, strip_option), default)]
1698    pub args: Option<Vec<&'a str>>,
1699    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1700    #[builder(setter(into, strip_option), default)]
1701    pub expand: Option<bool>,
1702    /// Provides Dagger access to the executed command.
1703    /// 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.
1704    #[builder(setter(into, strip_option), default)]
1705    pub experimental_privileged_nesting: Option<bool>,
1706    /// 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.
1707    #[builder(setter(into, strip_option), default)]
1708    pub insecure_root_capabilities: Option<bool>,
1709    /// If set, skip the automatic init process injected into containers by default.
1710    /// 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.
1711    #[builder(setter(into, strip_option), default)]
1712    pub no_init: Option<bool>,
1713    /// List of frontend/backend port mappings to forward.
1714    /// Frontend is the port accepting traffic on the host, backend is the service port.
1715    #[builder(setter(into, strip_option), default)]
1716    pub ports: Option<Vec<PortForward>>,
1717    /// Bind each tunnel port to a random port on the host.
1718    #[builder(setter(into, strip_option), default)]
1719    pub random: Option<bool>,
1720    /// If the container has an entrypoint, prepend it to the args.
1721    #[builder(setter(into, strip_option), default)]
1722    pub use_entrypoint: Option<bool>,
1723}
1724#[derive(Builder, Debug, PartialEq)]
1725pub struct ContainerWithDefaultTerminalCmdOpts {
1726    /// Provides Dagger access to the executed command.
1727    /// 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.
1728    #[builder(setter(into, strip_option), default)]
1729    pub experimental_privileged_nesting: Option<bool>,
1730    /// 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.
1731    #[builder(setter(into, strip_option), default)]
1732    pub insecure_root_capabilities: Option<bool>,
1733}
1734#[derive(Builder, Debug, PartialEq)]
1735pub struct ContainerWithDirectoryOpts<'a> {
1736    /// Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
1737    #[builder(setter(into, strip_option), default)]
1738    pub exclude: Option<Vec<&'a str>>,
1739    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1740    #[builder(setter(into, strip_option), default)]
1741    pub expand: Option<bool>,
1742    /// Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
1743    #[builder(setter(into, strip_option), default)]
1744    pub include: Option<Vec<&'a str>>,
1745    /// A user:group to set for the directory and its contents.
1746    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1747    /// If the group is omitted, it defaults to the same as the user.
1748    #[builder(setter(into, strip_option), default)]
1749    pub owner: Option<&'a str>,
1750}
1751#[derive(Builder, Debug, PartialEq)]
1752pub struct ContainerWithEntrypointOpts {
1753    /// Don't remove the default arguments when setting the entrypoint.
1754    #[builder(setter(into, strip_option), default)]
1755    pub keep_default_args: Option<bool>,
1756}
1757#[derive(Builder, Debug, PartialEq)]
1758pub struct ContainerWithEnvVariableOpts {
1759    /// Replace "${VAR}" or "$VAR" in the value according to the current environment variables defined in the container (e.g. "/opt/bin:$PATH").
1760    #[builder(setter(into, strip_option), default)]
1761    pub expand: Option<bool>,
1762}
1763#[derive(Builder, Debug, PartialEq)]
1764pub struct ContainerWithExecOpts<'a> {
1765    /// Replace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1766    #[builder(setter(into, strip_option), default)]
1767    pub expand: Option<bool>,
1768    /// Exit codes this command is allowed to exit with without error
1769    #[builder(setter(into, strip_option), default)]
1770    pub expect: Option<ReturnType>,
1771    /// Provides Dagger access to the executed command.
1772    /// 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.
1773    #[builder(setter(into, strip_option), default)]
1774    pub experimental_privileged_nesting: Option<bool>,
1775    /// 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.
1776    #[builder(setter(into, strip_option), default)]
1777    pub insecure_root_capabilities: Option<bool>,
1778    /// If set, skip the automatic init process injected into containers by default.
1779    /// 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.
1780    #[builder(setter(into, strip_option), default)]
1781    pub no_init: Option<bool>,
1782    /// Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
1783    #[builder(setter(into, strip_option), default)]
1784    pub redirect_stderr: Option<&'a str>,
1785    /// Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
1786    #[builder(setter(into, strip_option), default)]
1787    pub redirect_stdout: Option<&'a str>,
1788    /// Content to write to the command's standard input before closing (e.g., "Hello world").
1789    #[builder(setter(into, strip_option), default)]
1790    pub stdin: Option<&'a str>,
1791    /// If the container has an entrypoint, prepend it to the args.
1792    #[builder(setter(into, strip_option), default)]
1793    pub use_entrypoint: Option<bool>,
1794}
1795#[derive(Builder, Debug, PartialEq)]
1796pub struct ContainerWithExposedPortOpts<'a> {
1797    /// Optional port description
1798    #[builder(setter(into, strip_option), default)]
1799    pub description: Option<&'a str>,
1800    /// Skip the health check when run as a service.
1801    #[builder(setter(into, strip_option), default)]
1802    pub experimental_skip_healthcheck: Option<bool>,
1803    /// Transport layer network protocol
1804    #[builder(setter(into, strip_option), default)]
1805    pub protocol: Option<NetworkProtocol>,
1806}
1807#[derive(Builder, Debug, PartialEq)]
1808pub struct ContainerWithFileOpts<'a> {
1809    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1810    #[builder(setter(into, strip_option), default)]
1811    pub expand: Option<bool>,
1812    /// A user:group to set for the file.
1813    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1814    /// If the group is omitted, it defaults to the same as the user.
1815    #[builder(setter(into, strip_option), default)]
1816    pub owner: Option<&'a str>,
1817    /// Permission given to the copied file (e.g., 0600).
1818    #[builder(setter(into, strip_option), default)]
1819    pub permissions: Option<isize>,
1820}
1821#[derive(Builder, Debug, PartialEq)]
1822pub struct ContainerWithFilesOpts<'a> {
1823    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1824    #[builder(setter(into, strip_option), default)]
1825    pub expand: Option<bool>,
1826    /// A user:group to set for the files.
1827    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1828    /// If the group is omitted, it defaults to the same as the user.
1829    #[builder(setter(into, strip_option), default)]
1830    pub owner: Option<&'a str>,
1831    /// Permission given to the copied files (e.g., 0600).
1832    #[builder(setter(into, strip_option), default)]
1833    pub permissions: Option<isize>,
1834}
1835#[derive(Builder, Debug, PartialEq)]
1836pub struct ContainerWithMountedCacheOpts<'a> {
1837    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1838    #[builder(setter(into, strip_option), default)]
1839    pub expand: Option<bool>,
1840    /// A user:group to set for the mounted cache directory.
1841    /// 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.
1842    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1843    /// If the group is omitted, it defaults to the same as the user.
1844    #[builder(setter(into, strip_option), default)]
1845    pub owner: Option<&'a str>,
1846    /// Sharing mode of the cache volume.
1847    #[builder(setter(into, strip_option), default)]
1848    pub sharing: Option<CacheSharingMode>,
1849    /// Identifier of the directory to use as the cache volume's root.
1850    #[builder(setter(into, strip_option), default)]
1851    pub source: Option<DirectoryId>,
1852}
1853#[derive(Builder, Debug, PartialEq)]
1854pub struct ContainerWithMountedDirectoryOpts<'a> {
1855    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1856    #[builder(setter(into, strip_option), default)]
1857    pub expand: Option<bool>,
1858    /// A user:group to set for the mounted directory and its contents.
1859    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1860    /// If the group is omitted, it defaults to the same as the user.
1861    #[builder(setter(into, strip_option), default)]
1862    pub owner: Option<&'a str>,
1863}
1864#[derive(Builder, Debug, PartialEq)]
1865pub struct ContainerWithMountedFileOpts<'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 or user:group to set for the mounted 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}
1875#[derive(Builder, Debug, PartialEq)]
1876pub struct ContainerWithMountedSecretOpts<'a> {
1877    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1878    #[builder(setter(into, strip_option), default)]
1879    pub expand: Option<bool>,
1880    /// Permission given to the mounted secret (e.g., 0600).
1881    /// This option requires an owner to be set to be active.
1882    #[builder(setter(into, strip_option), default)]
1883    pub mode: Option<isize>,
1884    /// A user:group to set for the mounted secret.
1885    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1886    /// If the group is omitted, it defaults to the same as the user.
1887    #[builder(setter(into, strip_option), default)]
1888    pub owner: Option<&'a str>,
1889}
1890#[derive(Builder, Debug, PartialEq)]
1891pub struct ContainerWithMountedTempOpts {
1892    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1893    #[builder(setter(into, strip_option), default)]
1894    pub expand: Option<bool>,
1895    /// Size of the temporary directory in bytes.
1896    #[builder(setter(into, strip_option), default)]
1897    pub size: Option<isize>,
1898}
1899#[derive(Builder, Debug, PartialEq)]
1900pub struct ContainerWithNewFileOpts<'a> {
1901    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1902    #[builder(setter(into, strip_option), default)]
1903    pub expand: Option<bool>,
1904    /// A user:group to set for the file.
1905    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1906    /// If the group is omitted, it defaults to the same as the user.
1907    #[builder(setter(into, strip_option), default)]
1908    pub owner: Option<&'a str>,
1909    /// Permission given to the written file (e.g., 0600).
1910    #[builder(setter(into, strip_option), default)]
1911    pub permissions: Option<isize>,
1912}
1913#[derive(Builder, Debug, PartialEq)]
1914pub struct ContainerWithUnixSocketOpts<'a> {
1915    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1916    #[builder(setter(into, strip_option), default)]
1917    pub expand: Option<bool>,
1918    /// A user:group to set for the mounted socket.
1919    /// The user and group can either be an ID (1000:1000) or a name (foo:bar).
1920    /// If the group is omitted, it defaults to the same as the user.
1921    #[builder(setter(into, strip_option), default)]
1922    pub owner: Option<&'a str>,
1923}
1924#[derive(Builder, Debug, PartialEq)]
1925pub struct ContainerWithWorkdirOpts {
1926    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1927    #[builder(setter(into, strip_option), default)]
1928    pub expand: Option<bool>,
1929}
1930#[derive(Builder, Debug, PartialEq)]
1931pub struct ContainerWithoutDirectoryOpts {
1932    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1933    #[builder(setter(into, strip_option), default)]
1934    pub expand: Option<bool>,
1935}
1936#[derive(Builder, Debug, PartialEq)]
1937pub struct ContainerWithoutEntrypointOpts {
1938    /// Don't remove the default arguments when unsetting the entrypoint.
1939    #[builder(setter(into, strip_option), default)]
1940    pub keep_default_args: Option<bool>,
1941}
1942#[derive(Builder, Debug, PartialEq)]
1943pub struct ContainerWithoutExposedPortOpts {
1944    /// Port protocol to unexpose
1945    #[builder(setter(into, strip_option), default)]
1946    pub protocol: Option<NetworkProtocol>,
1947}
1948#[derive(Builder, Debug, PartialEq)]
1949pub struct ContainerWithoutFileOpts {
1950    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1951    #[builder(setter(into, strip_option), default)]
1952    pub expand: Option<bool>,
1953}
1954#[derive(Builder, Debug, PartialEq)]
1955pub struct ContainerWithoutFilesOpts {
1956    /// Replace "${VAR}" or "$VAR" in the value of paths according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
1957    #[builder(setter(into, strip_option), default)]
1958    pub expand: Option<bool>,
1959}
1960#[derive(Builder, Debug, PartialEq)]
1961pub struct ContainerWithoutMountOpts {
1962    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1963    #[builder(setter(into, strip_option), default)]
1964    pub expand: Option<bool>,
1965}
1966#[derive(Builder, Debug, PartialEq)]
1967pub struct ContainerWithoutUnixSocketOpts {
1968    /// Replace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
1969    #[builder(setter(into, strip_option), default)]
1970    pub expand: Option<bool>,
1971}
1972impl Container {
1973    /// Turn the container into a Service.
1974    /// Be sure to set any exposed ports before this conversion.
1975    ///
1976    /// # Arguments
1977    ///
1978    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1979    pub fn as_service(&self) -> Service {
1980        let query = self.selection.select("asService");
1981        Service {
1982            proc: self.proc.clone(),
1983            selection: query,
1984            graphql_client: self.graphql_client.clone(),
1985        }
1986    }
1987    /// Turn the container into a Service.
1988    /// Be sure to set any exposed ports before this conversion.
1989    ///
1990    /// # Arguments
1991    ///
1992    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
1993    pub fn as_service_opts<'a>(&self, opts: ContainerAsServiceOpts<'a>) -> Service {
1994        let mut query = self.selection.select("asService");
1995        if let Some(args) = opts.args {
1996            query = query.arg("args", args);
1997        }
1998        if let Some(use_entrypoint) = opts.use_entrypoint {
1999            query = query.arg("useEntrypoint", use_entrypoint);
2000        }
2001        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2002            query = query.arg(
2003                "experimentalPrivilegedNesting",
2004                experimental_privileged_nesting,
2005            );
2006        }
2007        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2008            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2009        }
2010        if let Some(expand) = opts.expand {
2011            query = query.arg("expand", expand);
2012        }
2013        if let Some(no_init) = opts.no_init {
2014            query = query.arg("noInit", no_init);
2015        }
2016        Service {
2017            proc: self.proc.clone(),
2018            selection: query,
2019            graphql_client: self.graphql_client.clone(),
2020        }
2021    }
2022    /// Returns a File representing the container serialized to a tarball.
2023    ///
2024    /// # Arguments
2025    ///
2026    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2027    pub fn as_tarball(&self) -> File {
2028        let query = self.selection.select("asTarball");
2029        File {
2030            proc: self.proc.clone(),
2031            selection: query,
2032            graphql_client: self.graphql_client.clone(),
2033        }
2034    }
2035    /// Returns a File representing the container serialized to a tarball.
2036    ///
2037    /// # Arguments
2038    ///
2039    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2040    pub fn as_tarball_opts(&self, opts: ContainerAsTarballOpts) -> File {
2041        let mut query = self.selection.select("asTarball");
2042        if let Some(platform_variants) = opts.platform_variants {
2043            query = query.arg("platformVariants", platform_variants);
2044        }
2045        if let Some(forced_compression) = opts.forced_compression {
2046            query = query.arg("forcedCompression", forced_compression);
2047        }
2048        if let Some(media_types) = opts.media_types {
2049            query = query.arg("mediaTypes", media_types);
2050        }
2051        File {
2052            proc: self.proc.clone(),
2053            selection: query,
2054            graphql_client: self.graphql_client.clone(),
2055        }
2056    }
2057    /// Initializes this container from a Dockerfile build.
2058    ///
2059    /// # Arguments
2060    ///
2061    /// * `context` - Directory context used by the Dockerfile.
2062    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2063    pub fn build(&self, context: impl IntoID<DirectoryId>) -> Container {
2064        let mut query = self.selection.select("build");
2065        query = query.arg_lazy(
2066            "context",
2067            Box::new(move || {
2068                let context = context.clone();
2069                Box::pin(async move { context.into_id().await.unwrap().quote() })
2070            }),
2071        );
2072        Container {
2073            proc: self.proc.clone(),
2074            selection: query,
2075            graphql_client: self.graphql_client.clone(),
2076        }
2077    }
2078    /// Initializes this container from a Dockerfile build.
2079    ///
2080    /// # Arguments
2081    ///
2082    /// * `context` - Directory context used by the Dockerfile.
2083    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2084    pub fn build_opts<'a>(
2085        &self,
2086        context: impl IntoID<DirectoryId>,
2087        opts: ContainerBuildOpts<'a>,
2088    ) -> Container {
2089        let mut query = self.selection.select("build");
2090        query = query.arg_lazy(
2091            "context",
2092            Box::new(move || {
2093                let context = context.clone();
2094                Box::pin(async move { context.into_id().await.unwrap().quote() })
2095            }),
2096        );
2097        if let Some(dockerfile) = opts.dockerfile {
2098            query = query.arg("dockerfile", dockerfile);
2099        }
2100        if let Some(target) = opts.target {
2101            query = query.arg("target", target);
2102        }
2103        if let Some(build_args) = opts.build_args {
2104            query = query.arg("buildArgs", build_args);
2105        }
2106        if let Some(secrets) = opts.secrets {
2107            query = query.arg("secrets", secrets);
2108        }
2109        Container {
2110            proc: self.proc.clone(),
2111            selection: query,
2112            graphql_client: self.graphql_client.clone(),
2113        }
2114    }
2115    /// Retrieves default arguments for future commands.
2116    pub async fn default_args(&self) -> Result<Vec<String>, DaggerError> {
2117        let query = self.selection.select("defaultArgs");
2118        query.execute(self.graphql_client.clone()).await
2119    }
2120    /// Retrieves a directory at the given path.
2121    /// Mounts are included.
2122    ///
2123    /// # Arguments
2124    ///
2125    /// * `path` - The path of the directory to retrieve (e.g., "./src").
2126    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2127    pub fn directory(&self, path: impl Into<String>) -> Directory {
2128        let mut query = self.selection.select("directory");
2129        query = query.arg("path", path.into());
2130        Directory {
2131            proc: self.proc.clone(),
2132            selection: query,
2133            graphql_client: self.graphql_client.clone(),
2134        }
2135    }
2136    /// Retrieves a directory at the given path.
2137    /// Mounts are included.
2138    ///
2139    /// # Arguments
2140    ///
2141    /// * `path` - The path of the directory to retrieve (e.g., "./src").
2142    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2143    pub fn directory_opts(
2144        &self,
2145        path: impl Into<String>,
2146        opts: ContainerDirectoryOpts,
2147    ) -> Directory {
2148        let mut query = self.selection.select("directory");
2149        query = query.arg("path", path.into());
2150        if let Some(expand) = opts.expand {
2151            query = query.arg("expand", expand);
2152        }
2153        Directory {
2154            proc: self.proc.clone(),
2155            selection: query,
2156            graphql_client: self.graphql_client.clone(),
2157        }
2158    }
2159    /// Retrieves entrypoint to be prepended to the arguments of all commands.
2160    pub async fn entrypoint(&self) -> Result<Vec<String>, DaggerError> {
2161        let query = self.selection.select("entrypoint");
2162        query.execute(self.graphql_client.clone()).await
2163    }
2164    /// Retrieves the value of the specified environment variable.
2165    ///
2166    /// # Arguments
2167    ///
2168    /// * `name` - The name of the environment variable to retrieve (e.g., "PATH").
2169    pub async fn env_variable(&self, name: impl Into<String>) -> Result<String, DaggerError> {
2170        let mut query = self.selection.select("envVariable");
2171        query = query.arg("name", name.into());
2172        query.execute(self.graphql_client.clone()).await
2173    }
2174    /// Retrieves the list of environment variables passed to commands.
2175    pub fn env_variables(&self) -> Vec<EnvVariable> {
2176        let query = self.selection.select("envVariables");
2177        vec![EnvVariable {
2178            proc: self.proc.clone(),
2179            selection: query,
2180            graphql_client: self.graphql_client.clone(),
2181        }]
2182    }
2183    /// The exit code of the last executed command.
2184    /// Returns an error if no command was set.
2185    pub async fn exit_code(&self) -> Result<isize, DaggerError> {
2186        let query = self.selection.select("exitCode");
2187        query.execute(self.graphql_client.clone()).await
2188    }
2189    /// EXPERIMENTAL API! Subject to change/removal at any time.
2190    /// Configures all available GPUs on the host to be accessible to this container.
2191    /// This currently works for Nvidia devices only.
2192    pub fn experimental_with_all_gp_us(&self) -> Container {
2193        let query = self.selection.select("experimentalWithAllGPUs");
2194        Container {
2195            proc: self.proc.clone(),
2196            selection: query,
2197            graphql_client: self.graphql_client.clone(),
2198        }
2199    }
2200    /// EXPERIMENTAL API! Subject to change/removal at any time.
2201    /// Configures the provided list of devices to be accessible to this container.
2202    /// This currently works for Nvidia devices only.
2203    ///
2204    /// # Arguments
2205    ///
2206    /// * `devices` - List of devices to be accessible to this container.
2207    pub fn experimental_with_gpu(&self, devices: Vec<impl Into<String>>) -> Container {
2208        let mut query = self.selection.select("experimentalWithGPU");
2209        query = query.arg(
2210            "devices",
2211            devices
2212                .into_iter()
2213                .map(|i| i.into())
2214                .collect::<Vec<String>>(),
2215        );
2216        Container {
2217            proc: self.proc.clone(),
2218            selection: query,
2219            graphql_client: self.graphql_client.clone(),
2220        }
2221    }
2222    /// Writes the container as an OCI tarball to the destination file path on the host.
2223    /// It can also export platform variants.
2224    ///
2225    /// # Arguments
2226    ///
2227    /// * `path` - Host's destination path (e.g., "./tarball").
2228    ///
2229    /// Path can be relative to the engine's workdir or absolute.
2230    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2231    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
2232        let mut query = self.selection.select("export");
2233        query = query.arg("path", path.into());
2234        query.execute(self.graphql_client.clone()).await
2235    }
2236    /// Writes the container as an OCI tarball to the destination file path on the host.
2237    /// It can also export platform variants.
2238    ///
2239    /// # Arguments
2240    ///
2241    /// * `path` - Host's destination path (e.g., "./tarball").
2242    ///
2243    /// Path can be relative to the engine's workdir or absolute.
2244    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2245    pub async fn export_opts(
2246        &self,
2247        path: impl Into<String>,
2248        opts: ContainerExportOpts,
2249    ) -> Result<String, DaggerError> {
2250        let mut query = self.selection.select("export");
2251        query = query.arg("path", path.into());
2252        if let Some(platform_variants) = opts.platform_variants {
2253            query = query.arg("platformVariants", platform_variants);
2254        }
2255        if let Some(forced_compression) = opts.forced_compression {
2256            query = query.arg("forcedCompression", forced_compression);
2257        }
2258        if let Some(media_types) = opts.media_types {
2259            query = query.arg("mediaTypes", media_types);
2260        }
2261        if let Some(expand) = opts.expand {
2262            query = query.arg("expand", expand);
2263        }
2264        query.execute(self.graphql_client.clone()).await
2265    }
2266    /// Retrieves the list of exposed ports.
2267    /// This includes ports already exposed by the image, even if not explicitly added with dagger.
2268    pub fn exposed_ports(&self) -> Vec<Port> {
2269        let query = self.selection.select("exposedPorts");
2270        vec![Port {
2271            proc: self.proc.clone(),
2272            selection: query,
2273            graphql_client: self.graphql_client.clone(),
2274        }]
2275    }
2276    /// Retrieves a file at the given path.
2277    /// Mounts are included.
2278    ///
2279    /// # Arguments
2280    ///
2281    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
2282    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2283    pub fn file(&self, path: impl Into<String>) -> File {
2284        let mut query = self.selection.select("file");
2285        query = query.arg("path", path.into());
2286        File {
2287            proc: self.proc.clone(),
2288            selection: query,
2289            graphql_client: self.graphql_client.clone(),
2290        }
2291    }
2292    /// Retrieves a file at the given path.
2293    /// Mounts are included.
2294    ///
2295    /// # Arguments
2296    ///
2297    /// * `path` - The path of the file to retrieve (e.g., "./README.md").
2298    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2299    pub fn file_opts(&self, path: impl Into<String>, opts: ContainerFileOpts) -> File {
2300        let mut query = self.selection.select("file");
2301        query = query.arg("path", path.into());
2302        if let Some(expand) = opts.expand {
2303            query = query.arg("expand", expand);
2304        }
2305        File {
2306            proc: self.proc.clone(),
2307            selection: query,
2308            graphql_client: self.graphql_client.clone(),
2309        }
2310    }
2311    /// Initializes this container from a pulled base image.
2312    ///
2313    /// # Arguments
2314    ///
2315    /// * `address` - Image's address from its registry.
2316    ///
2317    /// Formatted as [host]/[user]/[repo]:[tag] (e.g., "docker.io/dagger/dagger:main").
2318    pub fn from(&self, address: impl Into<String>) -> Container {
2319        let mut query = self.selection.select("from");
2320        query = query.arg("address", address.into());
2321        Container {
2322            proc: self.proc.clone(),
2323            selection: query,
2324            graphql_client: self.graphql_client.clone(),
2325        }
2326    }
2327    /// A unique identifier for this Container.
2328    pub async fn id(&self) -> Result<ContainerId, DaggerError> {
2329        let query = self.selection.select("id");
2330        query.execute(self.graphql_client.clone()).await
2331    }
2332    /// The unique image reference which can only be retrieved immediately after the 'Container.From' call.
2333    pub async fn image_ref(&self) -> Result<String, DaggerError> {
2334        let query = self.selection.select("imageRef");
2335        query.execute(self.graphql_client.clone()).await
2336    }
2337    /// Reads the container from an OCI tarball.
2338    ///
2339    /// # Arguments
2340    ///
2341    /// * `source` - File to read the container from.
2342    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2343    pub fn import(&self, source: impl IntoID<FileId>) -> Container {
2344        let mut query = self.selection.select("import");
2345        query = query.arg_lazy(
2346            "source",
2347            Box::new(move || {
2348                let source = source.clone();
2349                Box::pin(async move { source.into_id().await.unwrap().quote() })
2350            }),
2351        );
2352        Container {
2353            proc: self.proc.clone(),
2354            selection: query,
2355            graphql_client: self.graphql_client.clone(),
2356        }
2357    }
2358    /// Reads the container from an OCI tarball.
2359    ///
2360    /// # Arguments
2361    ///
2362    /// * `source` - File to read the container from.
2363    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2364    pub fn import_opts<'a>(
2365        &self,
2366        source: impl IntoID<FileId>,
2367        opts: ContainerImportOpts<'a>,
2368    ) -> Container {
2369        let mut query = self.selection.select("import");
2370        query = query.arg_lazy(
2371            "source",
2372            Box::new(move || {
2373                let source = source.clone();
2374                Box::pin(async move { source.into_id().await.unwrap().quote() })
2375            }),
2376        );
2377        if let Some(tag) = opts.tag {
2378            query = query.arg("tag", tag);
2379        }
2380        Container {
2381            proc: self.proc.clone(),
2382            selection: query,
2383            graphql_client: self.graphql_client.clone(),
2384        }
2385    }
2386    /// Retrieves the value of the specified label.
2387    ///
2388    /// # Arguments
2389    ///
2390    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
2391    pub async fn label(&self, name: impl Into<String>) -> Result<String, DaggerError> {
2392        let mut query = self.selection.select("label");
2393        query = query.arg("name", name.into());
2394        query.execute(self.graphql_client.clone()).await
2395    }
2396    /// Retrieves the list of labels passed to container.
2397    pub fn labels(&self) -> Vec<Label> {
2398        let query = self.selection.select("labels");
2399        vec![Label {
2400            proc: self.proc.clone(),
2401            selection: query,
2402            graphql_client: self.graphql_client.clone(),
2403        }]
2404    }
2405    /// Retrieves the list of paths where a directory is mounted.
2406    pub async fn mounts(&self) -> Result<Vec<String>, DaggerError> {
2407        let query = self.selection.select("mounts");
2408        query.execute(self.graphql_client.clone()).await
2409    }
2410    /// The platform this container executes and publishes as.
2411    pub async fn platform(&self) -> Result<Platform, DaggerError> {
2412        let query = self.selection.select("platform");
2413        query.execute(self.graphql_client.clone()).await
2414    }
2415    /// Publishes this container as a new image to the specified address.
2416    /// Publish returns a fully qualified ref.
2417    /// It can also publish platform variants.
2418    ///
2419    /// # Arguments
2420    ///
2421    /// * `address` - Registry's address to publish the image to.
2422    ///
2423    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main").
2424    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2425    pub async fn publish(&self, address: impl Into<String>) -> Result<String, DaggerError> {
2426        let mut query = self.selection.select("publish");
2427        query = query.arg("address", address.into());
2428        query.execute(self.graphql_client.clone()).await
2429    }
2430    /// Publishes this container as a new image to the specified address.
2431    /// Publish returns a fully qualified ref.
2432    /// It can also publish platform variants.
2433    ///
2434    /// # Arguments
2435    ///
2436    /// * `address` - Registry's address to publish the image to.
2437    ///
2438    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main").
2439    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2440    pub async fn publish_opts(
2441        &self,
2442        address: impl Into<String>,
2443        opts: ContainerPublishOpts,
2444    ) -> Result<String, DaggerError> {
2445        let mut query = self.selection.select("publish");
2446        query = query.arg("address", address.into());
2447        if let Some(platform_variants) = opts.platform_variants {
2448            query = query.arg("platformVariants", platform_variants);
2449        }
2450        if let Some(forced_compression) = opts.forced_compression {
2451            query = query.arg("forcedCompression", forced_compression);
2452        }
2453        if let Some(media_types) = opts.media_types {
2454            query = query.arg("mediaTypes", media_types);
2455        }
2456        query.execute(self.graphql_client.clone()).await
2457    }
2458    /// Retrieves this container's root filesystem. Mounts are not included.
2459    pub fn rootfs(&self) -> Directory {
2460        let query = self.selection.select("rootfs");
2461        Directory {
2462            proc: self.proc.clone(),
2463            selection: query,
2464            graphql_client: self.graphql_client.clone(),
2465        }
2466    }
2467    /// The error stream of the last executed command.
2468    /// Returns an error if no command was set.
2469    pub async fn stderr(&self) -> Result<String, DaggerError> {
2470        let query = self.selection.select("stderr");
2471        query.execute(self.graphql_client.clone()).await
2472    }
2473    /// The output stream of the last executed command.
2474    /// Returns an error if no command was set.
2475    pub async fn stdout(&self) -> Result<String, DaggerError> {
2476        let query = self.selection.select("stdout");
2477        query.execute(self.graphql_client.clone()).await
2478    }
2479    /// Forces evaluation of the pipeline in the engine.
2480    /// It doesn't run the default command if no exec has been set.
2481    pub async fn sync(&self) -> Result<ContainerId, DaggerError> {
2482        let query = self.selection.select("sync");
2483        query.execute(self.graphql_client.clone()).await
2484    }
2485    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
2486    ///
2487    /// # Arguments
2488    ///
2489    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2490    pub fn terminal(&self) -> Container {
2491        let query = self.selection.select("terminal");
2492        Container {
2493            proc: self.proc.clone(),
2494            selection: query,
2495            graphql_client: self.graphql_client.clone(),
2496        }
2497    }
2498    /// Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).
2499    ///
2500    /// # Arguments
2501    ///
2502    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2503    pub fn terminal_opts<'a>(&self, opts: ContainerTerminalOpts<'a>) -> Container {
2504        let mut query = self.selection.select("terminal");
2505        if let Some(cmd) = opts.cmd {
2506            query = query.arg("cmd", cmd);
2507        }
2508        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2509            query = query.arg(
2510                "experimentalPrivilegedNesting",
2511                experimental_privileged_nesting,
2512            );
2513        }
2514        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2515            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2516        }
2517        Container {
2518            proc: self.proc.clone(),
2519            selection: query,
2520            graphql_client: self.graphql_client.clone(),
2521        }
2522    }
2523    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
2524    /// Be sure to set any exposed ports before calling this api.
2525    ///
2526    /// # Arguments
2527    ///
2528    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2529    pub async fn up(&self) -> Result<Void, DaggerError> {
2530        let query = self.selection.select("up");
2531        query.execute(self.graphql_client.clone()).await
2532    }
2533    /// Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
2534    /// Be sure to set any exposed ports before calling this api.
2535    ///
2536    /// # Arguments
2537    ///
2538    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2539    pub async fn up_opts<'a>(&self, opts: ContainerUpOpts<'a>) -> Result<Void, DaggerError> {
2540        let mut query = self.selection.select("up");
2541        if let Some(ports) = opts.ports {
2542            query = query.arg("ports", ports);
2543        }
2544        if let Some(random) = opts.random {
2545            query = query.arg("random", random);
2546        }
2547        if let Some(args) = opts.args {
2548            query = query.arg("args", args);
2549        }
2550        if let Some(use_entrypoint) = opts.use_entrypoint {
2551            query = query.arg("useEntrypoint", use_entrypoint);
2552        }
2553        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2554            query = query.arg(
2555                "experimentalPrivilegedNesting",
2556                experimental_privileged_nesting,
2557            );
2558        }
2559        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2560            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2561        }
2562        if let Some(expand) = opts.expand {
2563            query = query.arg("expand", expand);
2564        }
2565        if let Some(no_init) = opts.no_init {
2566            query = query.arg("noInit", no_init);
2567        }
2568        query.execute(self.graphql_client.clone()).await
2569    }
2570    /// Retrieves the user to be set for all commands.
2571    pub async fn user(&self) -> Result<String, DaggerError> {
2572        let query = self.selection.select("user");
2573        query.execute(self.graphql_client.clone()).await
2574    }
2575    /// Retrieves this container plus the given OCI anotation.
2576    ///
2577    /// # Arguments
2578    ///
2579    /// * `name` - The name of the annotation.
2580    /// * `value` - The value of the annotation.
2581    pub fn with_annotation(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
2582        let mut query = self.selection.select("withAnnotation");
2583        query = query.arg("name", name.into());
2584        query = query.arg("value", value.into());
2585        Container {
2586            proc: self.proc.clone(),
2587            selection: query,
2588            graphql_client: self.graphql_client.clone(),
2589        }
2590    }
2591    /// Configures default arguments for future commands.
2592    ///
2593    /// # Arguments
2594    ///
2595    /// * `args` - Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
2596    pub fn with_default_args(&self, args: Vec<impl Into<String>>) -> Container {
2597        let mut query = self.selection.select("withDefaultArgs");
2598        query = query.arg(
2599            "args",
2600            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2601        );
2602        Container {
2603            proc: self.proc.clone(),
2604            selection: query,
2605            graphql_client: self.graphql_client.clone(),
2606        }
2607    }
2608    /// Set the default command to invoke for the container's terminal API.
2609    ///
2610    /// # Arguments
2611    ///
2612    /// * `args` - The args of the command.
2613    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2614    pub fn with_default_terminal_cmd(&self, args: Vec<impl Into<String>>) -> Container {
2615        let mut query = self.selection.select("withDefaultTerminalCmd");
2616        query = query.arg(
2617            "args",
2618            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2619        );
2620        Container {
2621            proc: self.proc.clone(),
2622            selection: query,
2623            graphql_client: self.graphql_client.clone(),
2624        }
2625    }
2626    /// Set the default command to invoke for the container's terminal API.
2627    ///
2628    /// # Arguments
2629    ///
2630    /// * `args` - The args of the command.
2631    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2632    pub fn with_default_terminal_cmd_opts(
2633        &self,
2634        args: Vec<impl Into<String>>,
2635        opts: ContainerWithDefaultTerminalCmdOpts,
2636    ) -> Container {
2637        let mut query = self.selection.select("withDefaultTerminalCmd");
2638        query = query.arg(
2639            "args",
2640            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2641        );
2642        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2643            query = query.arg(
2644                "experimentalPrivilegedNesting",
2645                experimental_privileged_nesting,
2646            );
2647        }
2648        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2649            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2650        }
2651        Container {
2652            proc: self.proc.clone(),
2653            selection: query,
2654            graphql_client: self.graphql_client.clone(),
2655        }
2656    }
2657    /// Retrieves this container plus a directory written at the given path.
2658    ///
2659    /// # Arguments
2660    ///
2661    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
2662    /// * `directory` - Identifier of the directory to write
2663    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2664    pub fn with_directory(
2665        &self,
2666        path: impl Into<String>,
2667        directory: impl IntoID<DirectoryId>,
2668    ) -> Container {
2669        let mut query = self.selection.select("withDirectory");
2670        query = query.arg("path", path.into());
2671        query = query.arg_lazy(
2672            "directory",
2673            Box::new(move || {
2674                let directory = directory.clone();
2675                Box::pin(async move { directory.into_id().await.unwrap().quote() })
2676            }),
2677        );
2678        Container {
2679            proc: self.proc.clone(),
2680            selection: query,
2681            graphql_client: self.graphql_client.clone(),
2682        }
2683    }
2684    /// Retrieves this container plus a directory written at the given path.
2685    ///
2686    /// # Arguments
2687    ///
2688    /// * `path` - Location of the written directory (e.g., "/tmp/directory").
2689    /// * `directory` - Identifier of the directory to write
2690    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2691    pub fn with_directory_opts<'a>(
2692        &self,
2693        path: impl Into<String>,
2694        directory: impl IntoID<DirectoryId>,
2695        opts: ContainerWithDirectoryOpts<'a>,
2696    ) -> Container {
2697        let mut query = self.selection.select("withDirectory");
2698        query = query.arg("path", path.into());
2699        query = query.arg_lazy(
2700            "directory",
2701            Box::new(move || {
2702                let directory = directory.clone();
2703                Box::pin(async move { directory.into_id().await.unwrap().quote() })
2704            }),
2705        );
2706        if let Some(exclude) = opts.exclude {
2707            query = query.arg("exclude", exclude);
2708        }
2709        if let Some(include) = opts.include {
2710            query = query.arg("include", include);
2711        }
2712        if let Some(owner) = opts.owner {
2713            query = query.arg("owner", owner);
2714        }
2715        if let Some(expand) = opts.expand {
2716            query = query.arg("expand", expand);
2717        }
2718        Container {
2719            proc: self.proc.clone(),
2720            selection: query,
2721            graphql_client: self.graphql_client.clone(),
2722        }
2723    }
2724    /// Retrieves this container but with a different command entrypoint.
2725    ///
2726    /// # Arguments
2727    ///
2728    /// * `args` - Entrypoint to use for future executions (e.g., ["go", "run"]).
2729    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2730    pub fn with_entrypoint(&self, args: Vec<impl Into<String>>) -> Container {
2731        let mut query = self.selection.select("withEntrypoint");
2732        query = query.arg(
2733            "args",
2734            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2735        );
2736        Container {
2737            proc: self.proc.clone(),
2738            selection: query,
2739            graphql_client: self.graphql_client.clone(),
2740        }
2741    }
2742    /// Retrieves this container but with a different command entrypoint.
2743    ///
2744    /// # Arguments
2745    ///
2746    /// * `args` - Entrypoint to use for future executions (e.g., ["go", "run"]).
2747    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2748    pub fn with_entrypoint_opts(
2749        &self,
2750        args: Vec<impl Into<String>>,
2751        opts: ContainerWithEntrypointOpts,
2752    ) -> Container {
2753        let mut query = self.selection.select("withEntrypoint");
2754        query = query.arg(
2755            "args",
2756            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2757        );
2758        if let Some(keep_default_args) = opts.keep_default_args {
2759            query = query.arg("keepDefaultArgs", keep_default_args);
2760        }
2761        Container {
2762            proc: self.proc.clone(),
2763            selection: query,
2764            graphql_client: self.graphql_client.clone(),
2765        }
2766    }
2767    /// Retrieves this container plus the given environment variable.
2768    ///
2769    /// # Arguments
2770    ///
2771    /// * `name` - The name of the environment variable (e.g., "HOST").
2772    /// * `value` - The value of the environment variable. (e.g., "localhost").
2773    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2774    pub fn with_env_variable(
2775        &self,
2776        name: impl Into<String>,
2777        value: impl Into<String>,
2778    ) -> Container {
2779        let mut query = self.selection.select("withEnvVariable");
2780        query = query.arg("name", name.into());
2781        query = query.arg("value", value.into());
2782        Container {
2783            proc: self.proc.clone(),
2784            selection: query,
2785            graphql_client: self.graphql_client.clone(),
2786        }
2787    }
2788    /// Retrieves this container plus the given environment variable.
2789    ///
2790    /// # Arguments
2791    ///
2792    /// * `name` - The name of the environment variable (e.g., "HOST").
2793    /// * `value` - The value of the environment variable. (e.g., "localhost").
2794    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2795    pub fn with_env_variable_opts(
2796        &self,
2797        name: impl Into<String>,
2798        value: impl Into<String>,
2799        opts: ContainerWithEnvVariableOpts,
2800    ) -> Container {
2801        let mut query = self.selection.select("withEnvVariable");
2802        query = query.arg("name", name.into());
2803        query = query.arg("value", value.into());
2804        if let Some(expand) = opts.expand {
2805            query = query.arg("expand", expand);
2806        }
2807        Container {
2808            proc: self.proc.clone(),
2809            selection: query,
2810            graphql_client: self.graphql_client.clone(),
2811        }
2812    }
2813    /// Retrieves this container after executing the specified command inside it.
2814    ///
2815    /// # Arguments
2816    ///
2817    /// * `args` - Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
2818    ///
2819    /// If empty, the container's default command is used.
2820    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2821    pub fn with_exec(&self, args: Vec<impl Into<String>>) -> Container {
2822        let mut query = self.selection.select("withExec");
2823        query = query.arg(
2824            "args",
2825            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2826        );
2827        Container {
2828            proc: self.proc.clone(),
2829            selection: query,
2830            graphql_client: self.graphql_client.clone(),
2831        }
2832    }
2833    /// Retrieves this container after executing the specified command inside it.
2834    ///
2835    /// # Arguments
2836    ///
2837    /// * `args` - Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
2838    ///
2839    /// If empty, the container's default command is used.
2840    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2841    pub fn with_exec_opts<'a>(
2842        &self,
2843        args: Vec<impl Into<String>>,
2844        opts: ContainerWithExecOpts<'a>,
2845    ) -> Container {
2846        let mut query = self.selection.select("withExec");
2847        query = query.arg(
2848            "args",
2849            args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
2850        );
2851        if let Some(use_entrypoint) = opts.use_entrypoint {
2852            query = query.arg("useEntrypoint", use_entrypoint);
2853        }
2854        if let Some(stdin) = opts.stdin {
2855            query = query.arg("stdin", stdin);
2856        }
2857        if let Some(redirect_stdout) = opts.redirect_stdout {
2858            query = query.arg("redirectStdout", redirect_stdout);
2859        }
2860        if let Some(redirect_stderr) = opts.redirect_stderr {
2861            query = query.arg("redirectStderr", redirect_stderr);
2862        }
2863        if let Some(expect) = opts.expect {
2864            query = query.arg("expect", expect);
2865        }
2866        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
2867            query = query.arg(
2868                "experimentalPrivilegedNesting",
2869                experimental_privileged_nesting,
2870            );
2871        }
2872        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
2873            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
2874        }
2875        if let Some(expand) = opts.expand {
2876            query = query.arg("expand", expand);
2877        }
2878        if let Some(no_init) = opts.no_init {
2879            query = query.arg("noInit", no_init);
2880        }
2881        Container {
2882            proc: self.proc.clone(),
2883            selection: query,
2884            graphql_client: self.graphql_client.clone(),
2885        }
2886    }
2887    /// Expose a network port.
2888    /// Exposed ports serve two purposes:
2889    /// - For health checks and introspection, when running services
2890    /// - For setting the EXPOSE OCI field when publishing the container
2891    ///
2892    /// # Arguments
2893    ///
2894    /// * `port` - Port number to expose
2895    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2896    pub fn with_exposed_port(&self, port: isize) -> Container {
2897        let mut query = self.selection.select("withExposedPort");
2898        query = query.arg("port", port);
2899        Container {
2900            proc: self.proc.clone(),
2901            selection: query,
2902            graphql_client: self.graphql_client.clone(),
2903        }
2904    }
2905    /// Expose a network port.
2906    /// Exposed ports serve two purposes:
2907    /// - For health checks and introspection, when running services
2908    /// - For setting the EXPOSE OCI field when publishing the container
2909    ///
2910    /// # Arguments
2911    ///
2912    /// * `port` - Port number to expose
2913    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2914    pub fn with_exposed_port_opts<'a>(
2915        &self,
2916        port: isize,
2917        opts: ContainerWithExposedPortOpts<'a>,
2918    ) -> Container {
2919        let mut query = self.selection.select("withExposedPort");
2920        query = query.arg("port", port);
2921        if let Some(protocol) = opts.protocol {
2922            query = query.arg("protocol", protocol);
2923        }
2924        if let Some(description) = opts.description {
2925            query = query.arg("description", description);
2926        }
2927        if let Some(experimental_skip_healthcheck) = opts.experimental_skip_healthcheck {
2928            query = query.arg("experimentalSkipHealthcheck", experimental_skip_healthcheck);
2929        }
2930        Container {
2931            proc: self.proc.clone(),
2932            selection: query,
2933            graphql_client: self.graphql_client.clone(),
2934        }
2935    }
2936    /// Retrieves this container plus the contents of the given file copied to the given path.
2937    ///
2938    /// # Arguments
2939    ///
2940    /// * `path` - Location of the copied file (e.g., "/tmp/file.txt").
2941    /// * `source` - Identifier of the file to copy.
2942    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2943    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Container {
2944        let mut query = self.selection.select("withFile");
2945        query = query.arg("path", path.into());
2946        query = query.arg_lazy(
2947            "source",
2948            Box::new(move || {
2949                let source = source.clone();
2950                Box::pin(async move { source.into_id().await.unwrap().quote() })
2951            }),
2952        );
2953        Container {
2954            proc: self.proc.clone(),
2955            selection: query,
2956            graphql_client: self.graphql_client.clone(),
2957        }
2958    }
2959    /// Retrieves this container plus the contents of the given file copied to the given path.
2960    ///
2961    /// # Arguments
2962    ///
2963    /// * `path` - Location of the copied file (e.g., "/tmp/file.txt").
2964    /// * `source` - Identifier of the file to copy.
2965    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
2966    pub fn with_file_opts<'a>(
2967        &self,
2968        path: impl Into<String>,
2969        source: impl IntoID<FileId>,
2970        opts: ContainerWithFileOpts<'a>,
2971    ) -> Container {
2972        let mut query = self.selection.select("withFile");
2973        query = query.arg("path", path.into());
2974        query = query.arg_lazy(
2975            "source",
2976            Box::new(move || {
2977                let source = source.clone();
2978                Box::pin(async move { source.into_id().await.unwrap().quote() })
2979            }),
2980        );
2981        if let Some(permissions) = opts.permissions {
2982            query = query.arg("permissions", permissions);
2983        }
2984        if let Some(owner) = opts.owner {
2985            query = query.arg("owner", owner);
2986        }
2987        if let Some(expand) = opts.expand {
2988            query = query.arg("expand", expand);
2989        }
2990        Container {
2991            proc: self.proc.clone(),
2992            selection: query,
2993            graphql_client: self.graphql_client.clone(),
2994        }
2995    }
2996    /// Retrieves this container plus the contents of the given files copied to the given path.
2997    ///
2998    /// # Arguments
2999    ///
3000    /// * `path` - Location where copied files should be placed (e.g., "/src").
3001    /// * `sources` - Identifiers of the files to copy.
3002    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3003    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Container {
3004        let mut query = self.selection.select("withFiles");
3005        query = query.arg("path", path.into());
3006        query = query.arg("sources", sources);
3007        Container {
3008            proc: self.proc.clone(),
3009            selection: query,
3010            graphql_client: self.graphql_client.clone(),
3011        }
3012    }
3013    /// Retrieves this container plus the contents of the given files copied to the given path.
3014    ///
3015    /// # Arguments
3016    ///
3017    /// * `path` - Location where copied files should be placed (e.g., "/src").
3018    /// * `sources` - Identifiers of the files to copy.
3019    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3020    pub fn with_files_opts<'a>(
3021        &self,
3022        path: impl Into<String>,
3023        sources: Vec<FileId>,
3024        opts: ContainerWithFilesOpts<'a>,
3025    ) -> Container {
3026        let mut query = self.selection.select("withFiles");
3027        query = query.arg("path", path.into());
3028        query = query.arg("sources", sources);
3029        if let Some(permissions) = opts.permissions {
3030            query = query.arg("permissions", permissions);
3031        }
3032        if let Some(owner) = opts.owner {
3033            query = query.arg("owner", owner);
3034        }
3035        if let Some(expand) = opts.expand {
3036            query = query.arg("expand", expand);
3037        }
3038        Container {
3039            proc: self.proc.clone(),
3040            selection: query,
3041            graphql_client: self.graphql_client.clone(),
3042        }
3043    }
3044    /// Retrieves this container plus the given label.
3045    ///
3046    /// # Arguments
3047    ///
3048    /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created").
3049    /// * `value` - The value of the label (e.g., "2023-01-01T00:00:00Z").
3050    pub fn with_label(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
3051        let mut query = self.selection.select("withLabel");
3052        query = query.arg("name", name.into());
3053        query = query.arg("value", value.into());
3054        Container {
3055            proc: self.proc.clone(),
3056            selection: query,
3057            graphql_client: self.graphql_client.clone(),
3058        }
3059    }
3060    /// Retrieves this container plus a cache volume mounted at the given path.
3061    ///
3062    /// # Arguments
3063    ///
3064    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3065    /// * `cache` - Identifier of the cache volume to mount.
3066    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3067    pub fn with_mounted_cache(
3068        &self,
3069        path: impl Into<String>,
3070        cache: impl IntoID<CacheVolumeId>,
3071    ) -> Container {
3072        let mut query = self.selection.select("withMountedCache");
3073        query = query.arg("path", path.into());
3074        query = query.arg_lazy(
3075            "cache",
3076            Box::new(move || {
3077                let cache = cache.clone();
3078                Box::pin(async move { cache.into_id().await.unwrap().quote() })
3079            }),
3080        );
3081        Container {
3082            proc: self.proc.clone(),
3083            selection: query,
3084            graphql_client: self.graphql_client.clone(),
3085        }
3086    }
3087    /// Retrieves this container plus a cache volume mounted at the given path.
3088    ///
3089    /// # Arguments
3090    ///
3091    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3092    /// * `cache` - Identifier of the cache volume to mount.
3093    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3094    pub fn with_mounted_cache_opts<'a>(
3095        &self,
3096        path: impl Into<String>,
3097        cache: impl IntoID<CacheVolumeId>,
3098        opts: ContainerWithMountedCacheOpts<'a>,
3099    ) -> Container {
3100        let mut query = self.selection.select("withMountedCache");
3101        query = query.arg("path", path.into());
3102        query = query.arg_lazy(
3103            "cache",
3104            Box::new(move || {
3105                let cache = cache.clone();
3106                Box::pin(async move { cache.into_id().await.unwrap().quote() })
3107            }),
3108        );
3109        if let Some(source) = opts.source {
3110            query = query.arg("source", source);
3111        }
3112        if let Some(sharing) = opts.sharing {
3113            query = query.arg("sharing", sharing);
3114        }
3115        if let Some(owner) = opts.owner {
3116            query = query.arg("owner", owner);
3117        }
3118        if let Some(expand) = opts.expand {
3119            query = query.arg("expand", expand);
3120        }
3121        Container {
3122            proc: self.proc.clone(),
3123            selection: query,
3124            graphql_client: self.graphql_client.clone(),
3125        }
3126    }
3127    /// Retrieves this container plus a directory mounted at the given path.
3128    ///
3129    /// # Arguments
3130    ///
3131    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
3132    /// * `source` - Identifier of the mounted directory.
3133    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3134    pub fn with_mounted_directory(
3135        &self,
3136        path: impl Into<String>,
3137        source: impl IntoID<DirectoryId>,
3138    ) -> Container {
3139        let mut query = self.selection.select("withMountedDirectory");
3140        query = query.arg("path", path.into());
3141        query = query.arg_lazy(
3142            "source",
3143            Box::new(move || {
3144                let source = source.clone();
3145                Box::pin(async move { source.into_id().await.unwrap().quote() })
3146            }),
3147        );
3148        Container {
3149            proc: self.proc.clone(),
3150            selection: query,
3151            graphql_client: self.graphql_client.clone(),
3152        }
3153    }
3154    /// Retrieves this container plus a directory mounted at the given path.
3155    ///
3156    /// # Arguments
3157    ///
3158    /// * `path` - Location of the mounted directory (e.g., "/mnt/directory").
3159    /// * `source` - Identifier of the mounted directory.
3160    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3161    pub fn with_mounted_directory_opts<'a>(
3162        &self,
3163        path: impl Into<String>,
3164        source: impl IntoID<DirectoryId>,
3165        opts: ContainerWithMountedDirectoryOpts<'a>,
3166    ) -> Container {
3167        let mut query = self.selection.select("withMountedDirectory");
3168        query = query.arg("path", path.into());
3169        query = query.arg_lazy(
3170            "source",
3171            Box::new(move || {
3172                let source = source.clone();
3173                Box::pin(async move { source.into_id().await.unwrap().quote() })
3174            }),
3175        );
3176        if let Some(owner) = opts.owner {
3177            query = query.arg("owner", owner);
3178        }
3179        if let Some(expand) = opts.expand {
3180            query = query.arg("expand", expand);
3181        }
3182        Container {
3183            proc: self.proc.clone(),
3184            selection: query,
3185            graphql_client: self.graphql_client.clone(),
3186        }
3187    }
3188    /// Retrieves this container plus a file mounted at the given path.
3189    ///
3190    /// # Arguments
3191    ///
3192    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
3193    /// * `source` - Identifier of the mounted file.
3194    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3195    pub fn with_mounted_file(
3196        &self,
3197        path: impl Into<String>,
3198        source: impl IntoID<FileId>,
3199    ) -> Container {
3200        let mut query = self.selection.select("withMountedFile");
3201        query = query.arg("path", path.into());
3202        query = query.arg_lazy(
3203            "source",
3204            Box::new(move || {
3205                let source = source.clone();
3206                Box::pin(async move { source.into_id().await.unwrap().quote() })
3207            }),
3208        );
3209        Container {
3210            proc: self.proc.clone(),
3211            selection: query,
3212            graphql_client: self.graphql_client.clone(),
3213        }
3214    }
3215    /// Retrieves this container plus a file mounted at the given path.
3216    ///
3217    /// # Arguments
3218    ///
3219    /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt").
3220    /// * `source` - Identifier of the mounted file.
3221    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3222    pub fn with_mounted_file_opts<'a>(
3223        &self,
3224        path: impl Into<String>,
3225        source: impl IntoID<FileId>,
3226        opts: ContainerWithMountedFileOpts<'a>,
3227    ) -> Container {
3228        let mut query = self.selection.select("withMountedFile");
3229        query = query.arg("path", path.into());
3230        query = query.arg_lazy(
3231            "source",
3232            Box::new(move || {
3233                let source = source.clone();
3234                Box::pin(async move { source.into_id().await.unwrap().quote() })
3235            }),
3236        );
3237        if let Some(owner) = opts.owner {
3238            query = query.arg("owner", owner);
3239        }
3240        if let Some(expand) = opts.expand {
3241            query = query.arg("expand", expand);
3242        }
3243        Container {
3244            proc: self.proc.clone(),
3245            selection: query,
3246            graphql_client: self.graphql_client.clone(),
3247        }
3248    }
3249    /// Retrieves this container plus a secret mounted into a file at the given path.
3250    ///
3251    /// # Arguments
3252    ///
3253    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
3254    /// * `source` - Identifier of the secret to mount.
3255    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3256    pub fn with_mounted_secret(
3257        &self,
3258        path: impl Into<String>,
3259        source: impl IntoID<SecretId>,
3260    ) -> Container {
3261        let mut query = self.selection.select("withMountedSecret");
3262        query = query.arg("path", path.into());
3263        query = query.arg_lazy(
3264            "source",
3265            Box::new(move || {
3266                let source = source.clone();
3267                Box::pin(async move { source.into_id().await.unwrap().quote() })
3268            }),
3269        );
3270        Container {
3271            proc: self.proc.clone(),
3272            selection: query,
3273            graphql_client: self.graphql_client.clone(),
3274        }
3275    }
3276    /// Retrieves this container plus a secret mounted into a file at the given path.
3277    ///
3278    /// # Arguments
3279    ///
3280    /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt").
3281    /// * `source` - Identifier of the secret to mount.
3282    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3283    pub fn with_mounted_secret_opts<'a>(
3284        &self,
3285        path: impl Into<String>,
3286        source: impl IntoID<SecretId>,
3287        opts: ContainerWithMountedSecretOpts<'a>,
3288    ) -> Container {
3289        let mut query = self.selection.select("withMountedSecret");
3290        query = query.arg("path", path.into());
3291        query = query.arg_lazy(
3292            "source",
3293            Box::new(move || {
3294                let source = source.clone();
3295                Box::pin(async move { source.into_id().await.unwrap().quote() })
3296            }),
3297        );
3298        if let Some(owner) = opts.owner {
3299            query = query.arg("owner", owner);
3300        }
3301        if let Some(mode) = opts.mode {
3302            query = query.arg("mode", mode);
3303        }
3304        if let Some(expand) = opts.expand {
3305            query = query.arg("expand", expand);
3306        }
3307        Container {
3308            proc: self.proc.clone(),
3309            selection: query,
3310            graphql_client: self.graphql_client.clone(),
3311        }
3312    }
3313    /// 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.
3314    ///
3315    /// # Arguments
3316    ///
3317    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
3318    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3319    pub fn with_mounted_temp(&self, path: impl Into<String>) -> Container {
3320        let mut query = self.selection.select("withMountedTemp");
3321        query = query.arg("path", path.into());
3322        Container {
3323            proc: self.proc.clone(),
3324            selection: query,
3325            graphql_client: self.graphql_client.clone(),
3326        }
3327    }
3328    /// 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.
3329    ///
3330    /// # Arguments
3331    ///
3332    /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir").
3333    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3334    pub fn with_mounted_temp_opts(
3335        &self,
3336        path: impl Into<String>,
3337        opts: ContainerWithMountedTempOpts,
3338    ) -> Container {
3339        let mut query = self.selection.select("withMountedTemp");
3340        query = query.arg("path", path.into());
3341        if let Some(size) = opts.size {
3342            query = query.arg("size", size);
3343        }
3344        if let Some(expand) = opts.expand {
3345            query = query.arg("expand", expand);
3346        }
3347        Container {
3348            proc: self.proc.clone(),
3349            selection: query,
3350            graphql_client: self.graphql_client.clone(),
3351        }
3352    }
3353    /// Retrieves this container plus a new file written at the given path.
3354    ///
3355    /// # Arguments
3356    ///
3357    /// * `path` - Location of the written file (e.g., "/tmp/file.txt").
3358    /// * `contents` - Content of the file to write (e.g., "Hello world!").
3359    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3360    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Container {
3361        let mut query = self.selection.select("withNewFile");
3362        query = query.arg("path", path.into());
3363        query = query.arg("contents", contents.into());
3364        Container {
3365            proc: self.proc.clone(),
3366            selection: query,
3367            graphql_client: self.graphql_client.clone(),
3368        }
3369    }
3370    /// Retrieves this container plus a new file written at the given path.
3371    ///
3372    /// # Arguments
3373    ///
3374    /// * `path` - Location of the written file (e.g., "/tmp/file.txt").
3375    /// * `contents` - Content of the file to write (e.g., "Hello world!").
3376    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3377    pub fn with_new_file_opts<'a>(
3378        &self,
3379        path: impl Into<String>,
3380        contents: impl Into<String>,
3381        opts: ContainerWithNewFileOpts<'a>,
3382    ) -> Container {
3383        let mut query = self.selection.select("withNewFile");
3384        query = query.arg("path", path.into());
3385        query = query.arg("contents", contents.into());
3386        if let Some(permissions) = opts.permissions {
3387            query = query.arg("permissions", permissions);
3388        }
3389        if let Some(owner) = opts.owner {
3390            query = query.arg("owner", owner);
3391        }
3392        if let Some(expand) = opts.expand {
3393            query = query.arg("expand", expand);
3394        }
3395        Container {
3396            proc: self.proc.clone(),
3397            selection: query,
3398            graphql_client: self.graphql_client.clone(),
3399        }
3400    }
3401    /// Retrieves this container with a registry authentication for a given address.
3402    ///
3403    /// # Arguments
3404    ///
3405    /// * `address` - Registry's address to bind the authentication to.
3406    ///
3407    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
3408    /// * `username` - The username of the registry's account (e.g., "Dagger").
3409    /// * `secret` - The API key, password or token to authenticate to this registry.
3410    pub fn with_registry_auth(
3411        &self,
3412        address: impl Into<String>,
3413        username: impl Into<String>,
3414        secret: impl IntoID<SecretId>,
3415    ) -> Container {
3416        let mut query = self.selection.select("withRegistryAuth");
3417        query = query.arg("address", address.into());
3418        query = query.arg("username", username.into());
3419        query = query.arg_lazy(
3420            "secret",
3421            Box::new(move || {
3422                let secret = secret.clone();
3423                Box::pin(async move { secret.into_id().await.unwrap().quote() })
3424            }),
3425        );
3426        Container {
3427            proc: self.proc.clone(),
3428            selection: query,
3429            graphql_client: self.graphql_client.clone(),
3430        }
3431    }
3432    /// Retrieves the container with the given directory mounted to /.
3433    ///
3434    /// # Arguments
3435    ///
3436    /// * `directory` - Directory to mount.
3437    pub fn with_rootfs(&self, directory: impl IntoID<DirectoryId>) -> Container {
3438        let mut query = self.selection.select("withRootfs");
3439        query = query.arg_lazy(
3440            "directory",
3441            Box::new(move || {
3442                let directory = directory.clone();
3443                Box::pin(async move { directory.into_id().await.unwrap().quote() })
3444            }),
3445        );
3446        Container {
3447            proc: self.proc.clone(),
3448            selection: query,
3449            graphql_client: self.graphql_client.clone(),
3450        }
3451    }
3452    /// Retrieves this container plus an env variable containing the given secret.
3453    ///
3454    /// # Arguments
3455    ///
3456    /// * `name` - The name of the secret variable (e.g., "API_SECRET").
3457    /// * `secret` - The identifier of the secret value.
3458    pub fn with_secret_variable(
3459        &self,
3460        name: impl Into<String>,
3461        secret: impl IntoID<SecretId>,
3462    ) -> Container {
3463        let mut query = self.selection.select("withSecretVariable");
3464        query = query.arg("name", name.into());
3465        query = query.arg_lazy(
3466            "secret",
3467            Box::new(move || {
3468                let secret = secret.clone();
3469                Box::pin(async move { secret.into_id().await.unwrap().quote() })
3470            }),
3471        );
3472        Container {
3473            proc: self.proc.clone(),
3474            selection: query,
3475            graphql_client: self.graphql_client.clone(),
3476        }
3477    }
3478    /// Establish a runtime dependency on a service.
3479    /// The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
3480    /// The service will be reachable from the container via the provided hostname alias.
3481    /// The service dependency will also convey to any files or directories produced by the container.
3482    ///
3483    /// # Arguments
3484    ///
3485    /// * `alias` - A name that can be used to reach the service from the container
3486    /// * `service` - Identifier of the service container
3487    pub fn with_service_binding(
3488        &self,
3489        alias: impl Into<String>,
3490        service: impl IntoID<ServiceId>,
3491    ) -> Container {
3492        let mut query = self.selection.select("withServiceBinding");
3493        query = query.arg("alias", alias.into());
3494        query = query.arg_lazy(
3495            "service",
3496            Box::new(move || {
3497                let service = service.clone();
3498                Box::pin(async move { service.into_id().await.unwrap().quote() })
3499            }),
3500        );
3501        Container {
3502            proc: self.proc.clone(),
3503            selection: query,
3504            graphql_client: self.graphql_client.clone(),
3505        }
3506    }
3507    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
3508    ///
3509    /// # Arguments
3510    ///
3511    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
3512    /// * `source` - Identifier of the socket to forward.
3513    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3514    pub fn with_unix_socket(
3515        &self,
3516        path: impl Into<String>,
3517        source: impl IntoID<SocketId>,
3518    ) -> Container {
3519        let mut query = self.selection.select("withUnixSocket");
3520        query = query.arg("path", path.into());
3521        query = query.arg_lazy(
3522            "source",
3523            Box::new(move || {
3524                let source = source.clone();
3525                Box::pin(async move { source.into_id().await.unwrap().quote() })
3526            }),
3527        );
3528        Container {
3529            proc: self.proc.clone(),
3530            selection: query,
3531            graphql_client: self.graphql_client.clone(),
3532        }
3533    }
3534    /// Retrieves this container plus a socket forwarded to the given Unix socket path.
3535    ///
3536    /// # Arguments
3537    ///
3538    /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket").
3539    /// * `source` - Identifier of the socket to forward.
3540    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3541    pub fn with_unix_socket_opts<'a>(
3542        &self,
3543        path: impl Into<String>,
3544        source: impl IntoID<SocketId>,
3545        opts: ContainerWithUnixSocketOpts<'a>,
3546    ) -> Container {
3547        let mut query = self.selection.select("withUnixSocket");
3548        query = query.arg("path", path.into());
3549        query = query.arg_lazy(
3550            "source",
3551            Box::new(move || {
3552                let source = source.clone();
3553                Box::pin(async move { source.into_id().await.unwrap().quote() })
3554            }),
3555        );
3556        if let Some(owner) = opts.owner {
3557            query = query.arg("owner", owner);
3558        }
3559        if let Some(expand) = opts.expand {
3560            query = query.arg("expand", expand);
3561        }
3562        Container {
3563            proc: self.proc.clone(),
3564            selection: query,
3565            graphql_client: self.graphql_client.clone(),
3566        }
3567    }
3568    /// Retrieves this container with a different command user.
3569    ///
3570    /// # Arguments
3571    ///
3572    /// * `name` - The user to set (e.g., "root").
3573    pub fn with_user(&self, name: impl Into<String>) -> Container {
3574        let mut query = self.selection.select("withUser");
3575        query = query.arg("name", name.into());
3576        Container {
3577            proc: self.proc.clone(),
3578            selection: query,
3579            graphql_client: self.graphql_client.clone(),
3580        }
3581    }
3582    /// Retrieves this container with a different working directory.
3583    ///
3584    /// # Arguments
3585    ///
3586    /// * `path` - The path to set as the working directory (e.g., "/app").
3587    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3588    pub fn with_workdir(&self, path: impl Into<String>) -> Container {
3589        let mut query = self.selection.select("withWorkdir");
3590        query = query.arg("path", path.into());
3591        Container {
3592            proc: self.proc.clone(),
3593            selection: query,
3594            graphql_client: self.graphql_client.clone(),
3595        }
3596    }
3597    /// Retrieves this container with a different working directory.
3598    ///
3599    /// # Arguments
3600    ///
3601    /// * `path` - The path to set as the working directory (e.g., "/app").
3602    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3603    pub fn with_workdir_opts(
3604        &self,
3605        path: impl Into<String>,
3606        opts: ContainerWithWorkdirOpts,
3607    ) -> Container {
3608        let mut query = self.selection.select("withWorkdir");
3609        query = query.arg("path", path.into());
3610        if let Some(expand) = opts.expand {
3611            query = query.arg("expand", expand);
3612        }
3613        Container {
3614            proc: self.proc.clone(),
3615            selection: query,
3616            graphql_client: self.graphql_client.clone(),
3617        }
3618    }
3619    /// Retrieves this container minus the given OCI annotation.
3620    ///
3621    /// # Arguments
3622    ///
3623    /// * `name` - The name of the annotation.
3624    pub fn without_annotation(&self, name: impl Into<String>) -> Container {
3625        let mut query = self.selection.select("withoutAnnotation");
3626        query = query.arg("name", name.into());
3627        Container {
3628            proc: self.proc.clone(),
3629            selection: query,
3630            graphql_client: self.graphql_client.clone(),
3631        }
3632    }
3633    /// Retrieves this container with unset default arguments for future commands.
3634    pub fn without_default_args(&self) -> Container {
3635        let query = self.selection.select("withoutDefaultArgs");
3636        Container {
3637            proc: self.proc.clone(),
3638            selection: query,
3639            graphql_client: self.graphql_client.clone(),
3640        }
3641    }
3642    /// Retrieves this container with the directory at the given path removed.
3643    ///
3644    /// # Arguments
3645    ///
3646    /// * `path` - Location of the directory to remove (e.g., ".github/").
3647    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3648    pub fn without_directory(&self, path: impl Into<String>) -> Container {
3649        let mut query = self.selection.select("withoutDirectory");
3650        query = query.arg("path", path.into());
3651        Container {
3652            proc: self.proc.clone(),
3653            selection: query,
3654            graphql_client: self.graphql_client.clone(),
3655        }
3656    }
3657    /// Retrieves this container with the directory at the given path removed.
3658    ///
3659    /// # Arguments
3660    ///
3661    /// * `path` - Location of the directory to remove (e.g., ".github/").
3662    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3663    pub fn without_directory_opts(
3664        &self,
3665        path: impl Into<String>,
3666        opts: ContainerWithoutDirectoryOpts,
3667    ) -> Container {
3668        let mut query = self.selection.select("withoutDirectory");
3669        query = query.arg("path", path.into());
3670        if let Some(expand) = opts.expand {
3671            query = query.arg("expand", expand);
3672        }
3673        Container {
3674            proc: self.proc.clone(),
3675            selection: query,
3676            graphql_client: self.graphql_client.clone(),
3677        }
3678    }
3679    /// Retrieves this container with an unset command entrypoint.
3680    ///
3681    /// # Arguments
3682    ///
3683    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3684    pub fn without_entrypoint(&self) -> Container {
3685        let query = self.selection.select("withoutEntrypoint");
3686        Container {
3687            proc: self.proc.clone(),
3688            selection: query,
3689            graphql_client: self.graphql_client.clone(),
3690        }
3691    }
3692    /// Retrieves this container with an unset command entrypoint.
3693    ///
3694    /// # Arguments
3695    ///
3696    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3697    pub fn without_entrypoint_opts(&self, opts: ContainerWithoutEntrypointOpts) -> Container {
3698        let mut query = self.selection.select("withoutEntrypoint");
3699        if let Some(keep_default_args) = opts.keep_default_args {
3700            query = query.arg("keepDefaultArgs", keep_default_args);
3701        }
3702        Container {
3703            proc: self.proc.clone(),
3704            selection: query,
3705            graphql_client: self.graphql_client.clone(),
3706        }
3707    }
3708    /// Retrieves this container minus the given environment variable.
3709    ///
3710    /// # Arguments
3711    ///
3712    /// * `name` - The name of the environment variable (e.g., "HOST").
3713    pub fn without_env_variable(&self, name: impl Into<String>) -> Container {
3714        let mut query = self.selection.select("withoutEnvVariable");
3715        query = query.arg("name", name.into());
3716        Container {
3717            proc: self.proc.clone(),
3718            selection: query,
3719            graphql_client: self.graphql_client.clone(),
3720        }
3721    }
3722    /// Unexpose a previously exposed port.
3723    ///
3724    /// # Arguments
3725    ///
3726    /// * `port` - Port number to unexpose
3727    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3728    pub fn without_exposed_port(&self, port: isize) -> Container {
3729        let mut query = self.selection.select("withoutExposedPort");
3730        query = query.arg("port", port);
3731        Container {
3732            proc: self.proc.clone(),
3733            selection: query,
3734            graphql_client: self.graphql_client.clone(),
3735        }
3736    }
3737    /// Unexpose a previously exposed port.
3738    ///
3739    /// # Arguments
3740    ///
3741    /// * `port` - Port number to unexpose
3742    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3743    pub fn without_exposed_port_opts(
3744        &self,
3745        port: isize,
3746        opts: ContainerWithoutExposedPortOpts,
3747    ) -> Container {
3748        let mut query = self.selection.select("withoutExposedPort");
3749        query = query.arg("port", port);
3750        if let Some(protocol) = opts.protocol {
3751            query = query.arg("protocol", protocol);
3752        }
3753        Container {
3754            proc: self.proc.clone(),
3755            selection: query,
3756            graphql_client: self.graphql_client.clone(),
3757        }
3758    }
3759    /// Retrieves this container with the file at the given path removed.
3760    ///
3761    /// # Arguments
3762    ///
3763    /// * `path` - Location of the file to remove (e.g., "/file.txt").
3764    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3765    pub fn without_file(&self, path: impl Into<String>) -> Container {
3766        let mut query = self.selection.select("withoutFile");
3767        query = query.arg("path", path.into());
3768        Container {
3769            proc: self.proc.clone(),
3770            selection: query,
3771            graphql_client: self.graphql_client.clone(),
3772        }
3773    }
3774    /// Retrieves this container with the file at the given path removed.
3775    ///
3776    /// # Arguments
3777    ///
3778    /// * `path` - Location of the file to remove (e.g., "/file.txt").
3779    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3780    pub fn without_file_opts(
3781        &self,
3782        path: impl Into<String>,
3783        opts: ContainerWithoutFileOpts,
3784    ) -> Container {
3785        let mut query = self.selection.select("withoutFile");
3786        query = query.arg("path", path.into());
3787        if let Some(expand) = opts.expand {
3788            query = query.arg("expand", expand);
3789        }
3790        Container {
3791            proc: self.proc.clone(),
3792            selection: query,
3793            graphql_client: self.graphql_client.clone(),
3794        }
3795    }
3796    /// Retrieves this container with the files at the given paths removed.
3797    ///
3798    /// # Arguments
3799    ///
3800    /// * `paths` - Location of the files to remove (e.g., ["/file.txt"]).
3801    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3802    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Container {
3803        let mut query = self.selection.select("withoutFiles");
3804        query = query.arg(
3805            "paths",
3806            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3807        );
3808        Container {
3809            proc: self.proc.clone(),
3810            selection: query,
3811            graphql_client: self.graphql_client.clone(),
3812        }
3813    }
3814    /// Retrieves this container with the files at the given paths removed.
3815    ///
3816    /// # Arguments
3817    ///
3818    /// * `paths` - Location of the files to remove (e.g., ["/file.txt"]).
3819    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3820    pub fn without_files_opts(
3821        &self,
3822        paths: Vec<impl Into<String>>,
3823        opts: ContainerWithoutFilesOpts,
3824    ) -> Container {
3825        let mut query = self.selection.select("withoutFiles");
3826        query = query.arg(
3827            "paths",
3828            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3829        );
3830        if let Some(expand) = opts.expand {
3831            query = query.arg("expand", expand);
3832        }
3833        Container {
3834            proc: self.proc.clone(),
3835            selection: query,
3836            graphql_client: self.graphql_client.clone(),
3837        }
3838    }
3839    /// Retrieves this container minus the given environment label.
3840    ///
3841    /// # Arguments
3842    ///
3843    /// * `name` - The name of the label to remove (e.g., "org.opencontainers.artifact.created").
3844    pub fn without_label(&self, name: impl Into<String>) -> Container {
3845        let mut query = self.selection.select("withoutLabel");
3846        query = query.arg("name", name.into());
3847        Container {
3848            proc: self.proc.clone(),
3849            selection: query,
3850            graphql_client: self.graphql_client.clone(),
3851        }
3852    }
3853    /// Retrieves this container after unmounting everything at the given path.
3854    ///
3855    /// # Arguments
3856    ///
3857    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3858    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3859    pub fn without_mount(&self, path: impl Into<String>) -> Container {
3860        let mut query = self.selection.select("withoutMount");
3861        query = query.arg("path", path.into());
3862        Container {
3863            proc: self.proc.clone(),
3864            selection: query,
3865            graphql_client: self.graphql_client.clone(),
3866        }
3867    }
3868    /// Retrieves this container after unmounting everything at the given path.
3869    ///
3870    /// # Arguments
3871    ///
3872    /// * `path` - Location of the cache directory (e.g., "/root/.npm").
3873    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3874    pub fn without_mount_opts(
3875        &self,
3876        path: impl Into<String>,
3877        opts: ContainerWithoutMountOpts,
3878    ) -> Container {
3879        let mut query = self.selection.select("withoutMount");
3880        query = query.arg("path", path.into());
3881        if let Some(expand) = opts.expand {
3882            query = query.arg("expand", expand);
3883        }
3884        Container {
3885            proc: self.proc.clone(),
3886            selection: query,
3887            graphql_client: self.graphql_client.clone(),
3888        }
3889    }
3890    /// Retrieves this container without the registry authentication of a given address.
3891    ///
3892    /// # Arguments
3893    ///
3894    /// * `address` - Registry's address to remove the authentication from.
3895    ///
3896    /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
3897    pub fn without_registry_auth(&self, address: impl Into<String>) -> Container {
3898        let mut query = self.selection.select("withoutRegistryAuth");
3899        query = query.arg("address", address.into());
3900        Container {
3901            proc: self.proc.clone(),
3902            selection: query,
3903            graphql_client: self.graphql_client.clone(),
3904        }
3905    }
3906    /// Retrieves this container minus the given environment variable containing the secret.
3907    ///
3908    /// # Arguments
3909    ///
3910    /// * `name` - The name of the environment variable (e.g., "HOST").
3911    pub fn without_secret_variable(&self, name: impl Into<String>) -> Container {
3912        let mut query = self.selection.select("withoutSecretVariable");
3913        query = query.arg("name", name.into());
3914        Container {
3915            proc: self.proc.clone(),
3916            selection: query,
3917            graphql_client: self.graphql_client.clone(),
3918        }
3919    }
3920    /// Retrieves this container with a previously added Unix socket removed.
3921    ///
3922    /// # Arguments
3923    ///
3924    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
3925    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3926    pub fn without_unix_socket(&self, path: impl Into<String>) -> Container {
3927        let mut query = self.selection.select("withoutUnixSocket");
3928        query = query.arg("path", path.into());
3929        Container {
3930            proc: self.proc.clone(),
3931            selection: query,
3932            graphql_client: self.graphql_client.clone(),
3933        }
3934    }
3935    /// Retrieves this container with a previously added Unix socket removed.
3936    ///
3937    /// # Arguments
3938    ///
3939    /// * `path` - Location of the socket to remove (e.g., "/tmp/socket").
3940    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
3941    pub fn without_unix_socket_opts(
3942        &self,
3943        path: impl Into<String>,
3944        opts: ContainerWithoutUnixSocketOpts,
3945    ) -> Container {
3946        let mut query = self.selection.select("withoutUnixSocket");
3947        query = query.arg("path", path.into());
3948        if let Some(expand) = opts.expand {
3949            query = query.arg("expand", expand);
3950        }
3951        Container {
3952            proc: self.proc.clone(),
3953            selection: query,
3954            graphql_client: self.graphql_client.clone(),
3955        }
3956    }
3957    /// Retrieves this container with an unset command user.
3958    /// Should default to root.
3959    pub fn without_user(&self) -> Container {
3960        let query = self.selection.select("withoutUser");
3961        Container {
3962            proc: self.proc.clone(),
3963            selection: query,
3964            graphql_client: self.graphql_client.clone(),
3965        }
3966    }
3967    /// Retrieves this container with an unset working directory.
3968    /// Should default to "/".
3969    pub fn without_workdir(&self) -> Container {
3970        let query = self.selection.select("withoutWorkdir");
3971        Container {
3972            proc: self.proc.clone(),
3973            selection: query,
3974            graphql_client: self.graphql_client.clone(),
3975        }
3976    }
3977    /// Retrieves the working directory for all commands.
3978    pub async fn workdir(&self) -> Result<String, DaggerError> {
3979        let query = self.selection.select("workdir");
3980        query.execute(self.graphql_client.clone()).await
3981    }
3982}
3983#[derive(Clone)]
3984pub struct CurrentModule {
3985    pub proc: Option<Arc<DaggerSessionProc>>,
3986    pub selection: Selection,
3987    pub graphql_client: DynGraphQLClient,
3988}
3989#[derive(Builder, Debug, PartialEq)]
3990pub struct CurrentModuleWorkdirOpts<'a> {
3991    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
3992    #[builder(setter(into, strip_option), default)]
3993    pub exclude: Option<Vec<&'a str>>,
3994    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
3995    #[builder(setter(into, strip_option), default)]
3996    pub include: Option<Vec<&'a str>>,
3997}
3998impl CurrentModule {
3999    /// A unique identifier for this CurrentModule.
4000    pub async fn id(&self) -> Result<CurrentModuleId, DaggerError> {
4001        let query = self.selection.select("id");
4002        query.execute(self.graphql_client.clone()).await
4003    }
4004    /// The name of the module being executed in
4005    pub async fn name(&self) -> Result<String, DaggerError> {
4006        let query = self.selection.select("name");
4007        query.execute(self.graphql_client.clone()).await
4008    }
4009    /// The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).
4010    pub fn source(&self) -> Directory {
4011        let query = self.selection.select("source");
4012        Directory {
4013            proc: self.proc.clone(),
4014            selection: query,
4015            graphql_client: self.graphql_client.clone(),
4016        }
4017    }
4018    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
4019    ///
4020    /// # Arguments
4021    ///
4022    /// * `path` - Location of the directory to access (e.g., ".").
4023    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4024    pub fn workdir(&self, path: impl Into<String>) -> Directory {
4025        let mut query = self.selection.select("workdir");
4026        query = query.arg("path", path.into());
4027        Directory {
4028            proc: self.proc.clone(),
4029            selection: query,
4030            graphql_client: self.graphql_client.clone(),
4031        }
4032    }
4033    /// Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.
4034    ///
4035    /// # Arguments
4036    ///
4037    /// * `path` - Location of the directory to access (e.g., ".").
4038    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4039    pub fn workdir_opts<'a>(
4040        &self,
4041        path: impl Into<String>,
4042        opts: CurrentModuleWorkdirOpts<'a>,
4043    ) -> Directory {
4044        let mut query = self.selection.select("workdir");
4045        query = query.arg("path", path.into());
4046        if let Some(exclude) = opts.exclude {
4047            query = query.arg("exclude", exclude);
4048        }
4049        if let Some(include) = opts.include {
4050            query = query.arg("include", include);
4051        }
4052        Directory {
4053            proc: self.proc.clone(),
4054            selection: query,
4055            graphql_client: self.graphql_client.clone(),
4056        }
4057    }
4058    /// 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.
4059    ///
4060    /// # Arguments
4061    ///
4062    /// * `path` - Location of the file to retrieve (e.g., "README.md").
4063    pub fn workdir_file(&self, path: impl Into<String>) -> File {
4064        let mut query = self.selection.select("workdirFile");
4065        query = query.arg("path", path.into());
4066        File {
4067            proc: self.proc.clone(),
4068            selection: query,
4069            graphql_client: self.graphql_client.clone(),
4070        }
4071    }
4072}
4073#[derive(Clone)]
4074pub struct Directory {
4075    pub proc: Option<Arc<DaggerSessionProc>>,
4076    pub selection: Selection,
4077    pub graphql_client: DynGraphQLClient,
4078}
4079#[derive(Builder, Debug, PartialEq)]
4080pub struct DirectoryAsModuleOpts<'a> {
4081    /// An optional subpath of the directory which contains the module's configuration file.
4082    /// If not set, the module source code is loaded from the root of the directory.
4083    #[builder(setter(into, strip_option), default)]
4084    pub source_root_path: Option<&'a str>,
4085}
4086#[derive(Builder, Debug, PartialEq)]
4087pub struct DirectoryAsModuleSourceOpts<'a> {
4088    /// An optional subpath of the directory which contains the module's configuration file.
4089    /// If not set, the module source code is loaded from the root of the directory.
4090    #[builder(setter(into, strip_option), default)]
4091    pub source_root_path: Option<&'a str>,
4092}
4093#[derive(Builder, Debug, PartialEq)]
4094pub struct DirectoryDockerBuildOpts<'a> {
4095    /// Build arguments to use in the build.
4096    #[builder(setter(into, strip_option), default)]
4097    pub build_args: Option<Vec<BuildArg>>,
4098    /// Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
4099    #[builder(setter(into, strip_option), default)]
4100    pub dockerfile: Option<&'a str>,
4101    /// The platform to build.
4102    #[builder(setter(into, strip_option), default)]
4103    pub platform: Option<Platform>,
4104    /// Secrets to pass to the build.
4105    /// They will be mounted at /run/secrets/[secret-name].
4106    #[builder(setter(into, strip_option), default)]
4107    pub secrets: Option<Vec<SecretId>>,
4108    /// Target build stage to build.
4109    #[builder(setter(into, strip_option), default)]
4110    pub target: Option<&'a str>,
4111}
4112#[derive(Builder, Debug, PartialEq)]
4113pub struct DirectoryEntriesOpts<'a> {
4114    /// Location of the directory to look at (e.g., "/src").
4115    #[builder(setter(into, strip_option), default)]
4116    pub path: Option<&'a str>,
4117}
4118#[derive(Builder, Debug, PartialEq)]
4119pub struct DirectoryExportOpts {
4120    /// 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.
4121    #[builder(setter(into, strip_option), default)]
4122    pub wipe: Option<bool>,
4123}
4124#[derive(Builder, Debug, PartialEq)]
4125pub struct DirectoryFilterOpts<'a> {
4126    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
4127    #[builder(setter(into, strip_option), default)]
4128    pub exclude: Option<Vec<&'a str>>,
4129    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
4130    #[builder(setter(into, strip_option), default)]
4131    pub include: Option<Vec<&'a str>>,
4132}
4133#[derive(Builder, Debug, PartialEq)]
4134pub struct DirectoryTerminalOpts<'a> {
4135    /// If set, override the container's default terminal command and invoke these command arguments instead.
4136    #[builder(setter(into, strip_option), default)]
4137    pub cmd: Option<Vec<&'a str>>,
4138    /// If set, override the default container used for the terminal.
4139    #[builder(setter(into, strip_option), default)]
4140    pub container: Option<ContainerId>,
4141    /// Provides Dagger access to the executed command.
4142    /// 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.
4143    #[builder(setter(into, strip_option), default)]
4144    pub experimental_privileged_nesting: Option<bool>,
4145    /// 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.
4146    #[builder(setter(into, strip_option), default)]
4147    pub insecure_root_capabilities: Option<bool>,
4148}
4149#[derive(Builder, Debug, PartialEq)]
4150pub struct DirectoryWithDirectoryOpts<'a> {
4151    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
4152    #[builder(setter(into, strip_option), default)]
4153    pub exclude: Option<Vec<&'a str>>,
4154    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
4155    #[builder(setter(into, strip_option), default)]
4156    pub include: Option<Vec<&'a str>>,
4157}
4158#[derive(Builder, Debug, PartialEq)]
4159pub struct DirectoryWithFileOpts {
4160    /// Permission given to the copied file (e.g., 0600).
4161    #[builder(setter(into, strip_option), default)]
4162    pub permissions: Option<isize>,
4163}
4164#[derive(Builder, Debug, PartialEq)]
4165pub struct DirectoryWithFilesOpts {
4166    /// Permission given to the copied files (e.g., 0600).
4167    #[builder(setter(into, strip_option), default)]
4168    pub permissions: Option<isize>,
4169}
4170#[derive(Builder, Debug, PartialEq)]
4171pub struct DirectoryWithNewDirectoryOpts {
4172    /// Permission granted to the created directory (e.g., 0777).
4173    #[builder(setter(into, strip_option), default)]
4174    pub permissions: Option<isize>,
4175}
4176#[derive(Builder, Debug, PartialEq)]
4177pub struct DirectoryWithNewFileOpts {
4178    /// Permission given to the copied file (e.g., 0600).
4179    #[builder(setter(into, strip_option), default)]
4180    pub permissions: Option<isize>,
4181}
4182impl Directory {
4183    /// Converts this directory into a git repository
4184    pub fn as_git(&self) -> GitRepository {
4185        let query = self.selection.select("asGit");
4186        GitRepository {
4187            proc: self.proc.clone(),
4188            selection: query,
4189            graphql_client: self.graphql_client.clone(),
4190        }
4191    }
4192    /// Load the directory as a Dagger module source
4193    ///
4194    /// # Arguments
4195    ///
4196    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4197    pub fn as_module(&self) -> Module {
4198        let query = self.selection.select("asModule");
4199        Module {
4200            proc: self.proc.clone(),
4201            selection: query,
4202            graphql_client: self.graphql_client.clone(),
4203        }
4204    }
4205    /// Load the directory as a Dagger module source
4206    ///
4207    /// # Arguments
4208    ///
4209    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4210    pub fn as_module_opts<'a>(&self, opts: DirectoryAsModuleOpts<'a>) -> Module {
4211        let mut query = self.selection.select("asModule");
4212        if let Some(source_root_path) = opts.source_root_path {
4213            query = query.arg("sourceRootPath", source_root_path);
4214        }
4215        Module {
4216            proc: self.proc.clone(),
4217            selection: query,
4218            graphql_client: self.graphql_client.clone(),
4219        }
4220    }
4221    /// Load the directory as a Dagger module source
4222    ///
4223    /// # Arguments
4224    ///
4225    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4226    pub fn as_module_source(&self) -> ModuleSource {
4227        let query = self.selection.select("asModuleSource");
4228        ModuleSource {
4229            proc: self.proc.clone(),
4230            selection: query,
4231            graphql_client: self.graphql_client.clone(),
4232        }
4233    }
4234    /// Load the directory as a Dagger module source
4235    ///
4236    /// # Arguments
4237    ///
4238    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4239    pub fn as_module_source_opts<'a>(&self, opts: DirectoryAsModuleSourceOpts<'a>) -> ModuleSource {
4240        let mut query = self.selection.select("asModuleSource");
4241        if let Some(source_root_path) = opts.source_root_path {
4242            query = query.arg("sourceRootPath", source_root_path);
4243        }
4244        ModuleSource {
4245            proc: self.proc.clone(),
4246            selection: query,
4247            graphql_client: self.graphql_client.clone(),
4248        }
4249    }
4250    /// Gets the difference between this directory and an another directory.
4251    ///
4252    /// # Arguments
4253    ///
4254    /// * `other` - Identifier of the directory to compare.
4255    pub fn diff(&self, other: impl IntoID<DirectoryId>) -> Directory {
4256        let mut query = self.selection.select("diff");
4257        query = query.arg_lazy(
4258            "other",
4259            Box::new(move || {
4260                let other = other.clone();
4261                Box::pin(async move { other.into_id().await.unwrap().quote() })
4262            }),
4263        );
4264        Directory {
4265            proc: self.proc.clone(),
4266            selection: query,
4267            graphql_client: self.graphql_client.clone(),
4268        }
4269    }
4270    /// 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.
4271    pub async fn digest(&self) -> Result<String, DaggerError> {
4272        let query = self.selection.select("digest");
4273        query.execute(self.graphql_client.clone()).await
4274    }
4275    /// Retrieves a directory at the given path.
4276    ///
4277    /// # Arguments
4278    ///
4279    /// * `path` - Location of the directory to retrieve (e.g., "/src").
4280    pub fn directory(&self, path: impl Into<String>) -> Directory {
4281        let mut query = self.selection.select("directory");
4282        query = query.arg("path", path.into());
4283        Directory {
4284            proc: self.proc.clone(),
4285            selection: query,
4286            graphql_client: self.graphql_client.clone(),
4287        }
4288    }
4289    /// Builds a new Docker container from this directory.
4290    ///
4291    /// # Arguments
4292    ///
4293    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4294    pub fn docker_build(&self) -> Container {
4295        let query = self.selection.select("dockerBuild");
4296        Container {
4297            proc: self.proc.clone(),
4298            selection: query,
4299            graphql_client: self.graphql_client.clone(),
4300        }
4301    }
4302    /// Builds a new Docker container from this directory.
4303    ///
4304    /// # Arguments
4305    ///
4306    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4307    pub fn docker_build_opts<'a>(&self, opts: DirectoryDockerBuildOpts<'a>) -> Container {
4308        let mut query = self.selection.select("dockerBuild");
4309        if let Some(platform) = opts.platform {
4310            query = query.arg("platform", platform);
4311        }
4312        if let Some(dockerfile) = opts.dockerfile {
4313            query = query.arg("dockerfile", dockerfile);
4314        }
4315        if let Some(target) = opts.target {
4316            query = query.arg("target", target);
4317        }
4318        if let Some(build_args) = opts.build_args {
4319            query = query.arg("buildArgs", build_args);
4320        }
4321        if let Some(secrets) = opts.secrets {
4322            query = query.arg("secrets", secrets);
4323        }
4324        Container {
4325            proc: self.proc.clone(),
4326            selection: query,
4327            graphql_client: self.graphql_client.clone(),
4328        }
4329    }
4330    /// Returns a list of files and directories at the given path.
4331    ///
4332    /// # Arguments
4333    ///
4334    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4335    pub async fn entries(&self) -> Result<Vec<String>, DaggerError> {
4336        let query = self.selection.select("entries");
4337        query.execute(self.graphql_client.clone()).await
4338    }
4339    /// Returns a list of files and directories at the given path.
4340    ///
4341    /// # Arguments
4342    ///
4343    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4344    pub async fn entries_opts<'a>(
4345        &self,
4346        opts: DirectoryEntriesOpts<'a>,
4347    ) -> Result<Vec<String>, DaggerError> {
4348        let mut query = self.selection.select("entries");
4349        if let Some(path) = opts.path {
4350            query = query.arg("path", path);
4351        }
4352        query.execute(self.graphql_client.clone()).await
4353    }
4354    /// Writes the contents of the directory to a path on the host.
4355    ///
4356    /// # Arguments
4357    ///
4358    /// * `path` - Location of the copied directory (e.g., "logs/").
4359    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4360    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
4361        let mut query = self.selection.select("export");
4362        query = query.arg("path", path.into());
4363        query.execute(self.graphql_client.clone()).await
4364    }
4365    /// Writes the contents of the directory to a path on the host.
4366    ///
4367    /// # Arguments
4368    ///
4369    /// * `path` - Location of the copied directory (e.g., "logs/").
4370    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4371    pub async fn export_opts(
4372        &self,
4373        path: impl Into<String>,
4374        opts: DirectoryExportOpts,
4375    ) -> Result<String, DaggerError> {
4376        let mut query = self.selection.select("export");
4377        query = query.arg("path", path.into());
4378        if let Some(wipe) = opts.wipe {
4379            query = query.arg("wipe", wipe);
4380        }
4381        query.execute(self.graphql_client.clone()).await
4382    }
4383    /// Retrieves a file at the given path.
4384    ///
4385    /// # Arguments
4386    ///
4387    /// * `path` - Location of the file to retrieve (e.g., "README.md").
4388    pub fn file(&self, path: impl Into<String>) -> File {
4389        let mut query = self.selection.select("file");
4390        query = query.arg("path", path.into());
4391        File {
4392            proc: self.proc.clone(),
4393            selection: query,
4394            graphql_client: self.graphql_client.clone(),
4395        }
4396    }
4397    /// Retrieves this directory as per exclude/include filters.
4398    ///
4399    /// # Arguments
4400    ///
4401    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4402    pub fn filter(&self) -> Directory {
4403        let query = self.selection.select("filter");
4404        Directory {
4405            proc: self.proc.clone(),
4406            selection: query,
4407            graphql_client: self.graphql_client.clone(),
4408        }
4409    }
4410    /// Retrieves this directory as per exclude/include filters.
4411    ///
4412    /// # Arguments
4413    ///
4414    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4415    pub fn filter_opts<'a>(&self, opts: DirectoryFilterOpts<'a>) -> Directory {
4416        let mut query = self.selection.select("filter");
4417        if let Some(exclude) = opts.exclude {
4418            query = query.arg("exclude", exclude);
4419        }
4420        if let Some(include) = opts.include {
4421            query = query.arg("include", include);
4422        }
4423        Directory {
4424            proc: self.proc.clone(),
4425            selection: query,
4426            graphql_client: self.graphql_client.clone(),
4427        }
4428    }
4429    /// Returns a list of files and directories that matche the given pattern.
4430    ///
4431    /// # Arguments
4432    ///
4433    /// * `pattern` - Pattern to match (e.g., "*.md").
4434    pub async fn glob(&self, pattern: impl Into<String>) -> Result<Vec<String>, DaggerError> {
4435        let mut query = self.selection.select("glob");
4436        query = query.arg("pattern", pattern.into());
4437        query.execute(self.graphql_client.clone()).await
4438    }
4439    /// A unique identifier for this Directory.
4440    pub async fn id(&self) -> Result<DirectoryId, DaggerError> {
4441        let query = self.selection.select("id");
4442        query.execute(self.graphql_client.clone()).await
4443    }
4444    /// Returns the name of the directory.
4445    pub async fn name(&self) -> Result<String, DaggerError> {
4446        let query = self.selection.select("name");
4447        query.execute(self.graphql_client.clone()).await
4448    }
4449    /// Force evaluation in the engine.
4450    pub async fn sync(&self) -> Result<DirectoryId, DaggerError> {
4451        let query = self.selection.select("sync");
4452        query.execute(self.graphql_client.clone()).await
4453    }
4454    /// Opens an interactive terminal in new container with this directory mounted inside.
4455    ///
4456    /// # Arguments
4457    ///
4458    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4459    pub fn terminal(&self) -> Directory {
4460        let query = self.selection.select("terminal");
4461        Directory {
4462            proc: self.proc.clone(),
4463            selection: query,
4464            graphql_client: self.graphql_client.clone(),
4465        }
4466    }
4467    /// Opens an interactive terminal in new container with this directory mounted inside.
4468    ///
4469    /// # Arguments
4470    ///
4471    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4472    pub fn terminal_opts<'a>(&self, opts: DirectoryTerminalOpts<'a>) -> Directory {
4473        let mut query = self.selection.select("terminal");
4474        if let Some(cmd) = opts.cmd {
4475            query = query.arg("cmd", cmd);
4476        }
4477        if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
4478            query = query.arg(
4479                "experimentalPrivilegedNesting",
4480                experimental_privileged_nesting,
4481            );
4482        }
4483        if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
4484            query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
4485        }
4486        if let Some(container) = opts.container {
4487            query = query.arg("container", container);
4488        }
4489        Directory {
4490            proc: self.proc.clone(),
4491            selection: query,
4492            graphql_client: self.graphql_client.clone(),
4493        }
4494    }
4495    /// Retrieves this directory plus a directory written at the given path.
4496    ///
4497    /// # Arguments
4498    ///
4499    /// * `path` - Location of the written directory (e.g., "/src/").
4500    /// * `directory` - Identifier of the directory to copy.
4501    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4502    pub fn with_directory(
4503        &self,
4504        path: impl Into<String>,
4505        directory: impl IntoID<DirectoryId>,
4506    ) -> Directory {
4507        let mut query = self.selection.select("withDirectory");
4508        query = query.arg("path", path.into());
4509        query = query.arg_lazy(
4510            "directory",
4511            Box::new(move || {
4512                let directory = directory.clone();
4513                Box::pin(async move { directory.into_id().await.unwrap().quote() })
4514            }),
4515        );
4516        Directory {
4517            proc: self.proc.clone(),
4518            selection: query,
4519            graphql_client: self.graphql_client.clone(),
4520        }
4521    }
4522    /// Retrieves this directory plus a directory written at the given path.
4523    ///
4524    /// # Arguments
4525    ///
4526    /// * `path` - Location of the written directory (e.g., "/src/").
4527    /// * `directory` - Identifier of the directory to copy.
4528    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4529    pub fn with_directory_opts<'a>(
4530        &self,
4531        path: impl Into<String>,
4532        directory: impl IntoID<DirectoryId>,
4533        opts: DirectoryWithDirectoryOpts<'a>,
4534    ) -> Directory {
4535        let mut query = self.selection.select("withDirectory");
4536        query = query.arg("path", path.into());
4537        query = query.arg_lazy(
4538            "directory",
4539            Box::new(move || {
4540                let directory = directory.clone();
4541                Box::pin(async move { directory.into_id().await.unwrap().quote() })
4542            }),
4543        );
4544        if let Some(exclude) = opts.exclude {
4545            query = query.arg("exclude", exclude);
4546        }
4547        if let Some(include) = opts.include {
4548            query = query.arg("include", include);
4549        }
4550        Directory {
4551            proc: self.proc.clone(),
4552            selection: query,
4553            graphql_client: self.graphql_client.clone(),
4554        }
4555    }
4556    /// Retrieves this directory plus the contents of the given file copied to the given path.
4557    ///
4558    /// # Arguments
4559    ///
4560    /// * `path` - Location of the copied file (e.g., "/file.txt").
4561    /// * `source` - Identifier of the file to copy.
4562    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4563    pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Directory {
4564        let mut query = self.selection.select("withFile");
4565        query = query.arg("path", path.into());
4566        query = query.arg_lazy(
4567            "source",
4568            Box::new(move || {
4569                let source = source.clone();
4570                Box::pin(async move { source.into_id().await.unwrap().quote() })
4571            }),
4572        );
4573        Directory {
4574            proc: self.proc.clone(),
4575            selection: query,
4576            graphql_client: self.graphql_client.clone(),
4577        }
4578    }
4579    /// Retrieves this directory plus the contents of the given file copied to the given path.
4580    ///
4581    /// # Arguments
4582    ///
4583    /// * `path` - Location of the copied file (e.g., "/file.txt").
4584    /// * `source` - Identifier of the file to copy.
4585    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4586    pub fn with_file_opts(
4587        &self,
4588        path: impl Into<String>,
4589        source: impl IntoID<FileId>,
4590        opts: DirectoryWithFileOpts,
4591    ) -> Directory {
4592        let mut query = self.selection.select("withFile");
4593        query = query.arg("path", path.into());
4594        query = query.arg_lazy(
4595            "source",
4596            Box::new(move || {
4597                let source = source.clone();
4598                Box::pin(async move { source.into_id().await.unwrap().quote() })
4599            }),
4600        );
4601        if let Some(permissions) = opts.permissions {
4602            query = query.arg("permissions", permissions);
4603        }
4604        Directory {
4605            proc: self.proc.clone(),
4606            selection: query,
4607            graphql_client: self.graphql_client.clone(),
4608        }
4609    }
4610    /// Retrieves this directory plus the contents of the given files copied to the given path.
4611    ///
4612    /// # Arguments
4613    ///
4614    /// * `path` - Location where copied files should be placed (e.g., "/src").
4615    /// * `sources` - Identifiers of the files to copy.
4616    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4617    pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Directory {
4618        let mut query = self.selection.select("withFiles");
4619        query = query.arg("path", path.into());
4620        query = query.arg("sources", sources);
4621        Directory {
4622            proc: self.proc.clone(),
4623            selection: query,
4624            graphql_client: self.graphql_client.clone(),
4625        }
4626    }
4627    /// Retrieves this directory plus the contents of the given files copied to the given path.
4628    ///
4629    /// # Arguments
4630    ///
4631    /// * `path` - Location where copied files should be placed (e.g., "/src").
4632    /// * `sources` - Identifiers of the files to copy.
4633    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4634    pub fn with_files_opts(
4635        &self,
4636        path: impl Into<String>,
4637        sources: Vec<FileId>,
4638        opts: DirectoryWithFilesOpts,
4639    ) -> Directory {
4640        let mut query = self.selection.select("withFiles");
4641        query = query.arg("path", path.into());
4642        query = query.arg("sources", sources);
4643        if let Some(permissions) = opts.permissions {
4644            query = query.arg("permissions", permissions);
4645        }
4646        Directory {
4647            proc: self.proc.clone(),
4648            selection: query,
4649            graphql_client: self.graphql_client.clone(),
4650        }
4651    }
4652    /// Retrieves this directory plus a new directory created at the given path.
4653    ///
4654    /// # Arguments
4655    ///
4656    /// * `path` - Location of the directory created (e.g., "/logs").
4657    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4658    pub fn with_new_directory(&self, path: impl Into<String>) -> Directory {
4659        let mut query = self.selection.select("withNewDirectory");
4660        query = query.arg("path", path.into());
4661        Directory {
4662            proc: self.proc.clone(),
4663            selection: query,
4664            graphql_client: self.graphql_client.clone(),
4665        }
4666    }
4667    /// Retrieves this directory plus a new directory created at the given path.
4668    ///
4669    /// # Arguments
4670    ///
4671    /// * `path` - Location of the directory created (e.g., "/logs").
4672    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4673    pub fn with_new_directory_opts(
4674        &self,
4675        path: impl Into<String>,
4676        opts: DirectoryWithNewDirectoryOpts,
4677    ) -> Directory {
4678        let mut query = self.selection.select("withNewDirectory");
4679        query = query.arg("path", path.into());
4680        if let Some(permissions) = opts.permissions {
4681            query = query.arg("permissions", permissions);
4682        }
4683        Directory {
4684            proc: self.proc.clone(),
4685            selection: query,
4686            graphql_client: self.graphql_client.clone(),
4687        }
4688    }
4689    /// Retrieves this directory plus a new file written at the given path.
4690    ///
4691    /// # Arguments
4692    ///
4693    /// * `path` - Location of the written file (e.g., "/file.txt").
4694    /// * `contents` - Content of the written file (e.g., "Hello world!").
4695    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4696    pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Directory {
4697        let mut query = self.selection.select("withNewFile");
4698        query = query.arg("path", path.into());
4699        query = query.arg("contents", contents.into());
4700        Directory {
4701            proc: self.proc.clone(),
4702            selection: query,
4703            graphql_client: self.graphql_client.clone(),
4704        }
4705    }
4706    /// Retrieves this directory plus a new file written at the given path.
4707    ///
4708    /// # Arguments
4709    ///
4710    /// * `path` - Location of the written file (e.g., "/file.txt").
4711    /// * `contents` - Content of the written file (e.g., "Hello world!").
4712    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4713    pub fn with_new_file_opts(
4714        &self,
4715        path: impl Into<String>,
4716        contents: impl Into<String>,
4717        opts: DirectoryWithNewFileOpts,
4718    ) -> Directory {
4719        let mut query = self.selection.select("withNewFile");
4720        query = query.arg("path", path.into());
4721        query = query.arg("contents", contents.into());
4722        if let Some(permissions) = opts.permissions {
4723            query = query.arg("permissions", permissions);
4724        }
4725        Directory {
4726            proc: self.proc.clone(),
4727            selection: query,
4728            graphql_client: self.graphql_client.clone(),
4729        }
4730    }
4731    /// Retrieves this directory with all file/dir timestamps set to the given time.
4732    ///
4733    /// # Arguments
4734    ///
4735    /// * `timestamp` - Timestamp to set dir/files in.
4736    ///
4737    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
4738    pub fn with_timestamps(&self, timestamp: isize) -> Directory {
4739        let mut query = self.selection.select("withTimestamps");
4740        query = query.arg("timestamp", timestamp);
4741        Directory {
4742            proc: self.proc.clone(),
4743            selection: query,
4744            graphql_client: self.graphql_client.clone(),
4745        }
4746    }
4747    /// Retrieves this directory with the directory at the given path removed.
4748    ///
4749    /// # Arguments
4750    ///
4751    /// * `path` - Location of the directory to remove (e.g., ".github/").
4752    pub fn without_directory(&self, path: impl Into<String>) -> Directory {
4753        let mut query = self.selection.select("withoutDirectory");
4754        query = query.arg("path", path.into());
4755        Directory {
4756            proc: self.proc.clone(),
4757            selection: query,
4758            graphql_client: self.graphql_client.clone(),
4759        }
4760    }
4761    /// Retrieves this directory with the file at the given path removed.
4762    ///
4763    /// # Arguments
4764    ///
4765    /// * `path` - Location of the file to remove (e.g., "/file.txt").
4766    pub fn without_file(&self, path: impl Into<String>) -> Directory {
4767        let mut query = self.selection.select("withoutFile");
4768        query = query.arg("path", path.into());
4769        Directory {
4770            proc: self.proc.clone(),
4771            selection: query,
4772            graphql_client: self.graphql_client.clone(),
4773        }
4774    }
4775    /// Retrieves this directory with the files at the given paths removed.
4776    ///
4777    /// # Arguments
4778    ///
4779    /// * `paths` - Location of the file to remove (e.g., ["/file.txt"]).
4780    pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Directory {
4781        let mut query = self.selection.select("withoutFiles");
4782        query = query.arg(
4783            "paths",
4784            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4785        );
4786        Directory {
4787            proc: self.proc.clone(),
4788            selection: query,
4789            graphql_client: self.graphql_client.clone(),
4790        }
4791    }
4792}
4793#[derive(Clone)]
4794pub struct Engine {
4795    pub proc: Option<Arc<DaggerSessionProc>>,
4796    pub selection: Selection,
4797    pub graphql_client: DynGraphQLClient,
4798}
4799impl Engine {
4800    /// A unique identifier for this Engine.
4801    pub async fn id(&self) -> Result<EngineId, DaggerError> {
4802        let query = self.selection.select("id");
4803        query.execute(self.graphql_client.clone()).await
4804    }
4805    /// The local (on-disk) cache for the Dagger engine
4806    pub fn local_cache(&self) -> EngineCache {
4807        let query = self.selection.select("localCache");
4808        EngineCache {
4809            proc: self.proc.clone(),
4810            selection: query,
4811            graphql_client: self.graphql_client.clone(),
4812        }
4813    }
4814}
4815#[derive(Clone)]
4816pub struct EngineCache {
4817    pub proc: Option<Arc<DaggerSessionProc>>,
4818    pub selection: Selection,
4819    pub graphql_client: DynGraphQLClient,
4820}
4821#[derive(Builder, Debug, PartialEq)]
4822pub struct EngineCacheEntrySetOpts<'a> {
4823    #[builder(setter(into, strip_option), default)]
4824    pub key: Option<&'a str>,
4825}
4826impl EngineCache {
4827    /// The current set of entries in the cache
4828    ///
4829    /// # Arguments
4830    ///
4831    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4832    pub fn entry_set(&self) -> EngineCacheEntrySet {
4833        let query = self.selection.select("entrySet");
4834        EngineCacheEntrySet {
4835            proc: self.proc.clone(),
4836            selection: query,
4837            graphql_client: self.graphql_client.clone(),
4838        }
4839    }
4840    /// The current set of entries in the cache
4841    ///
4842    /// # Arguments
4843    ///
4844    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
4845    pub fn entry_set_opts<'a>(&self, opts: EngineCacheEntrySetOpts<'a>) -> EngineCacheEntrySet {
4846        let mut query = self.selection.select("entrySet");
4847        if let Some(key) = opts.key {
4848            query = query.arg("key", key);
4849        }
4850        EngineCacheEntrySet {
4851            proc: self.proc.clone(),
4852            selection: query,
4853            graphql_client: self.graphql_client.clone(),
4854        }
4855    }
4856    /// A unique identifier for this EngineCache.
4857    pub async fn id(&self) -> Result<EngineCacheId, DaggerError> {
4858        let query = self.selection.select("id");
4859        query.execute(self.graphql_client.clone()).await
4860    }
4861    /// The maximum bytes to keep in the cache without pruning, after which automatic pruning may kick in.
4862    pub async fn keep_bytes(&self) -> Result<isize, DaggerError> {
4863        let query = self.selection.select("keepBytes");
4864        query.execute(self.graphql_client.clone()).await
4865    }
4866    /// The maximum bytes to keep in the cache without pruning.
4867    pub async fn max_used_space(&self) -> Result<isize, DaggerError> {
4868        let query = self.selection.select("maxUsedSpace");
4869        query.execute(self.graphql_client.clone()).await
4870    }
4871    /// The target amount of free disk space the garbage collector will attempt to leave.
4872    pub async fn min_free_space(&self) -> Result<isize, DaggerError> {
4873        let query = self.selection.select("minFreeSpace");
4874        query.execute(self.graphql_client.clone()).await
4875    }
4876    /// Prune the cache of releaseable entries
4877    pub async fn prune(&self) -> Result<Void, DaggerError> {
4878        let query = self.selection.select("prune");
4879        query.execute(self.graphql_client.clone()).await
4880    }
4881    pub async fn reserved_space(&self) -> Result<isize, DaggerError> {
4882        let query = self.selection.select("reservedSpace");
4883        query.execute(self.graphql_client.clone()).await
4884    }
4885}
4886#[derive(Clone)]
4887pub struct EngineCacheEntry {
4888    pub proc: Option<Arc<DaggerSessionProc>>,
4889    pub selection: Selection,
4890    pub graphql_client: DynGraphQLClient,
4891}
4892impl EngineCacheEntry {
4893    /// Whether the cache entry is actively being used.
4894    pub async fn actively_used(&self) -> Result<bool, DaggerError> {
4895        let query = self.selection.select("activelyUsed");
4896        query.execute(self.graphql_client.clone()).await
4897    }
4898    /// The time the cache entry was created, in Unix nanoseconds.
4899    pub async fn created_time_unix_nano(&self) -> Result<isize, DaggerError> {
4900        let query = self.selection.select("createdTimeUnixNano");
4901        query.execute(self.graphql_client.clone()).await
4902    }
4903    /// The description of the cache entry.
4904    pub async fn description(&self) -> Result<String, DaggerError> {
4905        let query = self.selection.select("description");
4906        query.execute(self.graphql_client.clone()).await
4907    }
4908    /// The disk space used by the cache entry.
4909    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
4910        let query = self.selection.select("diskSpaceBytes");
4911        query.execute(self.graphql_client.clone()).await
4912    }
4913    /// A unique identifier for this EngineCacheEntry.
4914    pub async fn id(&self) -> Result<EngineCacheEntryId, DaggerError> {
4915        let query = self.selection.select("id");
4916        query.execute(self.graphql_client.clone()).await
4917    }
4918    /// The most recent time the cache entry was used, in Unix nanoseconds.
4919    pub async fn most_recent_use_time_unix_nano(&self) -> Result<isize, DaggerError> {
4920        let query = self.selection.select("mostRecentUseTimeUnixNano");
4921        query.execute(self.graphql_client.clone()).await
4922    }
4923}
4924#[derive(Clone)]
4925pub struct EngineCacheEntrySet {
4926    pub proc: Option<Arc<DaggerSessionProc>>,
4927    pub selection: Selection,
4928    pub graphql_client: DynGraphQLClient,
4929}
4930impl EngineCacheEntrySet {
4931    /// The total disk space used by the cache entries in this set.
4932    pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
4933        let query = self.selection.select("diskSpaceBytes");
4934        query.execute(self.graphql_client.clone()).await
4935    }
4936    /// The list of individual cache entries in the set
4937    pub fn entries(&self) -> Vec<EngineCacheEntry> {
4938        let query = self.selection.select("entries");
4939        vec![EngineCacheEntry {
4940            proc: self.proc.clone(),
4941            selection: query,
4942            graphql_client: self.graphql_client.clone(),
4943        }]
4944    }
4945    /// The number of cache entries in this set.
4946    pub async fn entry_count(&self) -> Result<isize, DaggerError> {
4947        let query = self.selection.select("entryCount");
4948        query.execute(self.graphql_client.clone()).await
4949    }
4950    /// A unique identifier for this EngineCacheEntrySet.
4951    pub async fn id(&self) -> Result<EngineCacheEntrySetId, DaggerError> {
4952        let query = self.selection.select("id");
4953        query.execute(self.graphql_client.clone()).await
4954    }
4955}
4956#[derive(Clone)]
4957pub struct EnumTypeDef {
4958    pub proc: Option<Arc<DaggerSessionProc>>,
4959    pub selection: Selection,
4960    pub graphql_client: DynGraphQLClient,
4961}
4962impl EnumTypeDef {
4963    /// A doc string for the enum, if any.
4964    pub async fn description(&self) -> Result<String, DaggerError> {
4965        let query = self.selection.select("description");
4966        query.execute(self.graphql_client.clone()).await
4967    }
4968    /// A unique identifier for this EnumTypeDef.
4969    pub async fn id(&self) -> Result<EnumTypeDefId, DaggerError> {
4970        let query = self.selection.select("id");
4971        query.execute(self.graphql_client.clone()).await
4972    }
4973    /// The name of the enum.
4974    pub async fn name(&self) -> Result<String, DaggerError> {
4975        let query = self.selection.select("name");
4976        query.execute(self.graphql_client.clone()).await
4977    }
4978    /// The location of this enum declaration.
4979    pub fn source_map(&self) -> SourceMap {
4980        let query = self.selection.select("sourceMap");
4981        SourceMap {
4982            proc: self.proc.clone(),
4983            selection: query,
4984            graphql_client: self.graphql_client.clone(),
4985        }
4986    }
4987    /// If this EnumTypeDef is associated with a Module, the name of the module. Unset otherwise.
4988    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
4989        let query = self.selection.select("sourceModuleName");
4990        query.execute(self.graphql_client.clone()).await
4991    }
4992    /// The values of the enum.
4993    pub fn values(&self) -> Vec<EnumValueTypeDef> {
4994        let query = self.selection.select("values");
4995        vec![EnumValueTypeDef {
4996            proc: self.proc.clone(),
4997            selection: query,
4998            graphql_client: self.graphql_client.clone(),
4999        }]
5000    }
5001}
5002#[derive(Clone)]
5003pub struct EnumValueTypeDef {
5004    pub proc: Option<Arc<DaggerSessionProc>>,
5005    pub selection: Selection,
5006    pub graphql_client: DynGraphQLClient,
5007}
5008impl EnumValueTypeDef {
5009    /// A doc string for the enum value, if any.
5010    pub async fn description(&self) -> Result<String, DaggerError> {
5011        let query = self.selection.select("description");
5012        query.execute(self.graphql_client.clone()).await
5013    }
5014    /// A unique identifier for this EnumValueTypeDef.
5015    pub async fn id(&self) -> Result<EnumValueTypeDefId, DaggerError> {
5016        let query = self.selection.select("id");
5017        query.execute(self.graphql_client.clone()).await
5018    }
5019    /// The name of the enum value.
5020    pub async fn name(&self) -> Result<String, DaggerError> {
5021        let query = self.selection.select("name");
5022        query.execute(self.graphql_client.clone()).await
5023    }
5024    /// The location of this enum value declaration.
5025    pub fn source_map(&self) -> SourceMap {
5026        let query = self.selection.select("sourceMap");
5027        SourceMap {
5028            proc: self.proc.clone(),
5029            selection: query,
5030            graphql_client: self.graphql_client.clone(),
5031        }
5032    }
5033}
5034#[derive(Clone)]
5035pub struct EnvVariable {
5036    pub proc: Option<Arc<DaggerSessionProc>>,
5037    pub selection: Selection,
5038    pub graphql_client: DynGraphQLClient,
5039}
5040impl EnvVariable {
5041    /// A unique identifier for this EnvVariable.
5042    pub async fn id(&self) -> Result<EnvVariableId, DaggerError> {
5043        let query = self.selection.select("id");
5044        query.execute(self.graphql_client.clone()).await
5045    }
5046    /// The environment variable name.
5047    pub async fn name(&self) -> Result<String, DaggerError> {
5048        let query = self.selection.select("name");
5049        query.execute(self.graphql_client.clone()).await
5050    }
5051    /// The environment variable value.
5052    pub async fn value(&self) -> Result<String, DaggerError> {
5053        let query = self.selection.select("value");
5054        query.execute(self.graphql_client.clone()).await
5055    }
5056}
5057#[derive(Clone)]
5058pub struct Error {
5059    pub proc: Option<Arc<DaggerSessionProc>>,
5060    pub selection: Selection,
5061    pub graphql_client: DynGraphQLClient,
5062}
5063impl Error {
5064    /// A unique identifier for this Error.
5065    pub async fn id(&self) -> Result<ErrorId, DaggerError> {
5066        let query = self.selection.select("id");
5067        query.execute(self.graphql_client.clone()).await
5068    }
5069    /// A description of the error.
5070    pub async fn message(&self) -> Result<String, DaggerError> {
5071        let query = self.selection.select("message");
5072        query.execute(self.graphql_client.clone()).await
5073    }
5074    /// The extensions of the error.
5075    pub fn values(&self) -> Vec<ErrorValue> {
5076        let query = self.selection.select("values");
5077        vec![ErrorValue {
5078            proc: self.proc.clone(),
5079            selection: query,
5080            graphql_client: self.graphql_client.clone(),
5081        }]
5082    }
5083    /// Add a value to the error.
5084    ///
5085    /// # Arguments
5086    ///
5087    /// * `name` - The name of the value.
5088    /// * `value` - The value to store on the error.
5089    pub fn with_value(&self, name: impl Into<String>, value: Json) -> Error {
5090        let mut query = self.selection.select("withValue");
5091        query = query.arg("name", name.into());
5092        query = query.arg("value", value);
5093        Error {
5094            proc: self.proc.clone(),
5095            selection: query,
5096            graphql_client: self.graphql_client.clone(),
5097        }
5098    }
5099}
5100#[derive(Clone)]
5101pub struct ErrorValue {
5102    pub proc: Option<Arc<DaggerSessionProc>>,
5103    pub selection: Selection,
5104    pub graphql_client: DynGraphQLClient,
5105}
5106impl ErrorValue {
5107    /// A unique identifier for this ErrorValue.
5108    pub async fn id(&self) -> Result<ErrorValueId, DaggerError> {
5109        let query = self.selection.select("id");
5110        query.execute(self.graphql_client.clone()).await
5111    }
5112    /// The name of the value.
5113    pub async fn name(&self) -> Result<String, DaggerError> {
5114        let query = self.selection.select("name");
5115        query.execute(self.graphql_client.clone()).await
5116    }
5117    /// The value.
5118    pub async fn value(&self) -> Result<Json, DaggerError> {
5119        let query = self.selection.select("value");
5120        query.execute(self.graphql_client.clone()).await
5121    }
5122}
5123#[derive(Clone)]
5124pub struct FieldTypeDef {
5125    pub proc: Option<Arc<DaggerSessionProc>>,
5126    pub selection: Selection,
5127    pub graphql_client: DynGraphQLClient,
5128}
5129impl FieldTypeDef {
5130    /// A doc string for the field, if any.
5131    pub async fn description(&self) -> Result<String, DaggerError> {
5132        let query = self.selection.select("description");
5133        query.execute(self.graphql_client.clone()).await
5134    }
5135    /// A unique identifier for this FieldTypeDef.
5136    pub async fn id(&self) -> Result<FieldTypeDefId, DaggerError> {
5137        let query = self.selection.select("id");
5138        query.execute(self.graphql_client.clone()).await
5139    }
5140    /// The name of the field in lowerCamelCase format.
5141    pub async fn name(&self) -> Result<String, DaggerError> {
5142        let query = self.selection.select("name");
5143        query.execute(self.graphql_client.clone()).await
5144    }
5145    /// The location of this field declaration.
5146    pub fn source_map(&self) -> SourceMap {
5147        let query = self.selection.select("sourceMap");
5148        SourceMap {
5149            proc: self.proc.clone(),
5150            selection: query,
5151            graphql_client: self.graphql_client.clone(),
5152        }
5153    }
5154    /// The type of the field.
5155    pub fn type_def(&self) -> TypeDef {
5156        let query = self.selection.select("typeDef");
5157        TypeDef {
5158            proc: self.proc.clone(),
5159            selection: query,
5160            graphql_client: self.graphql_client.clone(),
5161        }
5162    }
5163}
5164#[derive(Clone)]
5165pub struct File {
5166    pub proc: Option<Arc<DaggerSessionProc>>,
5167    pub selection: Selection,
5168    pub graphql_client: DynGraphQLClient,
5169}
5170#[derive(Builder, Debug, PartialEq)]
5171pub struct FileDigestOpts {
5172    /// If true, exclude metadata from the digest.
5173    #[builder(setter(into, strip_option), default)]
5174    pub exclude_metadata: Option<bool>,
5175}
5176#[derive(Builder, Debug, PartialEq)]
5177pub struct FileExportOpts {
5178    /// If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
5179    #[builder(setter(into, strip_option), default)]
5180    pub allow_parent_dir_path: Option<bool>,
5181}
5182impl File {
5183    /// Retrieves the contents of the file.
5184    pub async fn contents(&self) -> Result<String, DaggerError> {
5185        let query = self.selection.select("contents");
5186        query.execute(self.graphql_client.clone()).await
5187    }
5188    /// 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.
5189    ///
5190    /// # Arguments
5191    ///
5192    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5193    pub async fn digest(&self) -> Result<String, DaggerError> {
5194        let query = self.selection.select("digest");
5195        query.execute(self.graphql_client.clone()).await
5196    }
5197    /// 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.
5198    ///
5199    /// # Arguments
5200    ///
5201    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5202    pub async fn digest_opts(&self, opts: FileDigestOpts) -> Result<String, DaggerError> {
5203        let mut query = self.selection.select("digest");
5204        if let Some(exclude_metadata) = opts.exclude_metadata {
5205            query = query.arg("excludeMetadata", exclude_metadata);
5206        }
5207        query.execute(self.graphql_client.clone()).await
5208    }
5209    /// Writes the file to a file path on the host.
5210    ///
5211    /// # Arguments
5212    ///
5213    /// * `path` - Location of the written directory (e.g., "output.txt").
5214    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5215    pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
5216        let mut query = self.selection.select("export");
5217        query = query.arg("path", path.into());
5218        query.execute(self.graphql_client.clone()).await
5219    }
5220    /// Writes the file to a file path on the host.
5221    ///
5222    /// # Arguments
5223    ///
5224    /// * `path` - Location of the written directory (e.g., "output.txt").
5225    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5226    pub async fn export_opts(
5227        &self,
5228        path: impl Into<String>,
5229        opts: FileExportOpts,
5230    ) -> Result<String, DaggerError> {
5231        let mut query = self.selection.select("export");
5232        query = query.arg("path", path.into());
5233        if let Some(allow_parent_dir_path) = opts.allow_parent_dir_path {
5234            query = query.arg("allowParentDirPath", allow_parent_dir_path);
5235        }
5236        query.execute(self.graphql_client.clone()).await
5237    }
5238    /// A unique identifier for this File.
5239    pub async fn id(&self) -> Result<FileId, DaggerError> {
5240        let query = self.selection.select("id");
5241        query.execute(self.graphql_client.clone()).await
5242    }
5243    /// Retrieves the name of the file.
5244    pub async fn name(&self) -> Result<String, DaggerError> {
5245        let query = self.selection.select("name");
5246        query.execute(self.graphql_client.clone()).await
5247    }
5248    /// Retrieves the size of the file, in bytes.
5249    pub async fn size(&self) -> Result<isize, DaggerError> {
5250        let query = self.selection.select("size");
5251        query.execute(self.graphql_client.clone()).await
5252    }
5253    /// Force evaluation in the engine.
5254    pub async fn sync(&self) -> Result<FileId, DaggerError> {
5255        let query = self.selection.select("sync");
5256        query.execute(self.graphql_client.clone()).await
5257    }
5258    /// Retrieves this file with its name set to the given name.
5259    ///
5260    /// # Arguments
5261    ///
5262    /// * `name` - Name to set file to.
5263    pub fn with_name(&self, name: impl Into<String>) -> File {
5264        let mut query = self.selection.select("withName");
5265        query = query.arg("name", name.into());
5266        File {
5267            proc: self.proc.clone(),
5268            selection: query,
5269            graphql_client: self.graphql_client.clone(),
5270        }
5271    }
5272    /// Retrieves this file with its created/modified timestamps set to the given time.
5273    ///
5274    /// # Arguments
5275    ///
5276    /// * `timestamp` - Timestamp to set dir/files in.
5277    ///
5278    /// Formatted in seconds following Unix epoch (e.g., 1672531199).
5279    pub fn with_timestamps(&self, timestamp: isize) -> File {
5280        let mut query = self.selection.select("withTimestamps");
5281        query = query.arg("timestamp", timestamp);
5282        File {
5283            proc: self.proc.clone(),
5284            selection: query,
5285            graphql_client: self.graphql_client.clone(),
5286        }
5287    }
5288}
5289#[derive(Clone)]
5290pub struct Function {
5291    pub proc: Option<Arc<DaggerSessionProc>>,
5292    pub selection: Selection,
5293    pub graphql_client: DynGraphQLClient,
5294}
5295#[derive(Builder, Debug, PartialEq)]
5296pub struct FunctionWithArgOpts<'a> {
5297    /// If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
5298    #[builder(setter(into, strip_option), default)]
5299    pub default_path: Option<&'a str>,
5300    /// A default value to use for this argument if not explicitly set by the caller, if any
5301    #[builder(setter(into, strip_option), default)]
5302    pub default_value: Option<Json>,
5303    /// A doc string for the argument, if any
5304    #[builder(setter(into, strip_option), default)]
5305    pub description: Option<&'a str>,
5306    /// Patterns to ignore when loading the contextual argument value.
5307    #[builder(setter(into, strip_option), default)]
5308    pub ignore: Option<Vec<&'a str>>,
5309    #[builder(setter(into, strip_option), default)]
5310    pub source_map: Option<SourceMapId>,
5311}
5312impl Function {
5313    /// Arguments accepted by the function, if any.
5314    pub fn args(&self) -> Vec<FunctionArg> {
5315        let query = self.selection.select("args");
5316        vec![FunctionArg {
5317            proc: self.proc.clone(),
5318            selection: query,
5319            graphql_client: self.graphql_client.clone(),
5320        }]
5321    }
5322    /// A doc string for the function, if any.
5323    pub async fn description(&self) -> Result<String, DaggerError> {
5324        let query = self.selection.select("description");
5325        query.execute(self.graphql_client.clone()).await
5326    }
5327    /// A unique identifier for this Function.
5328    pub async fn id(&self) -> Result<FunctionId, DaggerError> {
5329        let query = self.selection.select("id");
5330        query.execute(self.graphql_client.clone()).await
5331    }
5332    /// The name of the function.
5333    pub async fn name(&self) -> Result<String, DaggerError> {
5334        let query = self.selection.select("name");
5335        query.execute(self.graphql_client.clone()).await
5336    }
5337    /// The type returned by the function.
5338    pub fn return_type(&self) -> TypeDef {
5339        let query = self.selection.select("returnType");
5340        TypeDef {
5341            proc: self.proc.clone(),
5342            selection: query,
5343            graphql_client: self.graphql_client.clone(),
5344        }
5345    }
5346    /// The location of this function declaration.
5347    pub fn source_map(&self) -> SourceMap {
5348        let query = self.selection.select("sourceMap");
5349        SourceMap {
5350            proc: self.proc.clone(),
5351            selection: query,
5352            graphql_client: self.graphql_client.clone(),
5353        }
5354    }
5355    /// Returns the function with the provided argument
5356    ///
5357    /// # Arguments
5358    ///
5359    /// * `name` - The name of the argument
5360    /// * `type_def` - The type of the argument
5361    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5362    pub fn with_arg(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> Function {
5363        let mut query = self.selection.select("withArg");
5364        query = query.arg("name", name.into());
5365        query = query.arg_lazy(
5366            "typeDef",
5367            Box::new(move || {
5368                let type_def = type_def.clone();
5369                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
5370            }),
5371        );
5372        Function {
5373            proc: self.proc.clone(),
5374            selection: query,
5375            graphql_client: self.graphql_client.clone(),
5376        }
5377    }
5378    /// Returns the function with the provided argument
5379    ///
5380    /// # Arguments
5381    ///
5382    /// * `name` - The name of the argument
5383    /// * `type_def` - The type of the argument
5384    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5385    pub fn with_arg_opts<'a>(
5386        &self,
5387        name: impl Into<String>,
5388        type_def: impl IntoID<TypeDefId>,
5389        opts: FunctionWithArgOpts<'a>,
5390    ) -> Function {
5391        let mut query = self.selection.select("withArg");
5392        query = query.arg("name", name.into());
5393        query = query.arg_lazy(
5394            "typeDef",
5395            Box::new(move || {
5396                let type_def = type_def.clone();
5397                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
5398            }),
5399        );
5400        if let Some(description) = opts.description {
5401            query = query.arg("description", description);
5402        }
5403        if let Some(default_value) = opts.default_value {
5404            query = query.arg("defaultValue", default_value);
5405        }
5406        if let Some(default_path) = opts.default_path {
5407            query = query.arg("defaultPath", default_path);
5408        }
5409        if let Some(ignore) = opts.ignore {
5410            query = query.arg("ignore", ignore);
5411        }
5412        if let Some(source_map) = opts.source_map {
5413            query = query.arg("sourceMap", source_map);
5414        }
5415        Function {
5416            proc: self.proc.clone(),
5417            selection: query,
5418            graphql_client: self.graphql_client.clone(),
5419        }
5420    }
5421    /// Returns the function with the given doc string.
5422    ///
5423    /// # Arguments
5424    ///
5425    /// * `description` - The doc string to set.
5426    pub fn with_description(&self, description: impl Into<String>) -> Function {
5427        let mut query = self.selection.select("withDescription");
5428        query = query.arg("description", description.into());
5429        Function {
5430            proc: self.proc.clone(),
5431            selection: query,
5432            graphql_client: self.graphql_client.clone(),
5433        }
5434    }
5435    /// Returns the function with the given source map.
5436    ///
5437    /// # Arguments
5438    ///
5439    /// * `source_map` - The source map for the function definition.
5440    pub fn with_source_map(&self, source_map: impl IntoID<SourceMapId>) -> Function {
5441        let mut query = self.selection.select("withSourceMap");
5442        query = query.arg_lazy(
5443            "sourceMap",
5444            Box::new(move || {
5445                let source_map = source_map.clone();
5446                Box::pin(async move { source_map.into_id().await.unwrap().quote() })
5447            }),
5448        );
5449        Function {
5450            proc: self.proc.clone(),
5451            selection: query,
5452            graphql_client: self.graphql_client.clone(),
5453        }
5454    }
5455}
5456#[derive(Clone)]
5457pub struct FunctionArg {
5458    pub proc: Option<Arc<DaggerSessionProc>>,
5459    pub selection: Selection,
5460    pub graphql_client: DynGraphQLClient,
5461}
5462impl FunctionArg {
5463    /// 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
5464    pub async fn default_path(&self) -> Result<String, DaggerError> {
5465        let query = self.selection.select("defaultPath");
5466        query.execute(self.graphql_client.clone()).await
5467    }
5468    /// A default value to use for this argument when not explicitly set by the caller, if any.
5469    pub async fn default_value(&self) -> Result<Json, DaggerError> {
5470        let query = self.selection.select("defaultValue");
5471        query.execute(self.graphql_client.clone()).await
5472    }
5473    /// A doc string for the argument, if any.
5474    pub async fn description(&self) -> Result<String, DaggerError> {
5475        let query = self.selection.select("description");
5476        query.execute(self.graphql_client.clone()).await
5477    }
5478    /// A unique identifier for this FunctionArg.
5479    pub async fn id(&self) -> Result<FunctionArgId, DaggerError> {
5480        let query = self.selection.select("id");
5481        query.execute(self.graphql_client.clone()).await
5482    }
5483    /// 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.
5484    pub async fn ignore(&self) -> Result<Vec<String>, DaggerError> {
5485        let query = self.selection.select("ignore");
5486        query.execute(self.graphql_client.clone()).await
5487    }
5488    /// The name of the argument in lowerCamelCase format.
5489    pub async fn name(&self) -> Result<String, DaggerError> {
5490        let query = self.selection.select("name");
5491        query.execute(self.graphql_client.clone()).await
5492    }
5493    /// The location of this arg declaration.
5494    pub fn source_map(&self) -> SourceMap {
5495        let query = self.selection.select("sourceMap");
5496        SourceMap {
5497            proc: self.proc.clone(),
5498            selection: query,
5499            graphql_client: self.graphql_client.clone(),
5500        }
5501    }
5502    /// The type of the argument.
5503    pub fn type_def(&self) -> TypeDef {
5504        let query = self.selection.select("typeDef");
5505        TypeDef {
5506            proc: self.proc.clone(),
5507            selection: query,
5508            graphql_client: self.graphql_client.clone(),
5509        }
5510    }
5511}
5512#[derive(Clone)]
5513pub struct FunctionCall {
5514    pub proc: Option<Arc<DaggerSessionProc>>,
5515    pub selection: Selection,
5516    pub graphql_client: DynGraphQLClient,
5517}
5518impl FunctionCall {
5519    /// A unique identifier for this FunctionCall.
5520    pub async fn id(&self) -> Result<FunctionCallId, DaggerError> {
5521        let query = self.selection.select("id");
5522        query.execute(self.graphql_client.clone()).await
5523    }
5524    /// The argument values the function is being invoked with.
5525    pub fn input_args(&self) -> Vec<FunctionCallArgValue> {
5526        let query = self.selection.select("inputArgs");
5527        vec![FunctionCallArgValue {
5528            proc: self.proc.clone(),
5529            selection: query,
5530            graphql_client: self.graphql_client.clone(),
5531        }]
5532    }
5533    /// The name of the function being called.
5534    pub async fn name(&self) -> Result<String, DaggerError> {
5535        let query = self.selection.select("name");
5536        query.execute(self.graphql_client.clone()).await
5537    }
5538    /// 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.
5539    pub async fn parent(&self) -> Result<Json, DaggerError> {
5540        let query = self.selection.select("parent");
5541        query.execute(self.graphql_client.clone()).await
5542    }
5543    /// 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.
5544    pub async fn parent_name(&self) -> Result<String, DaggerError> {
5545        let query = self.selection.select("parentName");
5546        query.execute(self.graphql_client.clone()).await
5547    }
5548    /// Return an error from the function.
5549    ///
5550    /// # Arguments
5551    ///
5552    /// * `error` - The error to return.
5553    pub async fn return_error(&self, error: impl IntoID<ErrorId>) -> Result<Void, DaggerError> {
5554        let mut query = self.selection.select("returnError");
5555        query = query.arg_lazy(
5556            "error",
5557            Box::new(move || {
5558                let error = error.clone();
5559                Box::pin(async move { error.into_id().await.unwrap().quote() })
5560            }),
5561        );
5562        query.execute(self.graphql_client.clone()).await
5563    }
5564    /// Set the return value of the function call to the provided value.
5565    ///
5566    /// # Arguments
5567    ///
5568    /// * `value` - JSON serialization of the return value.
5569    pub async fn return_value(&self, value: Json) -> Result<Void, DaggerError> {
5570        let mut query = self.selection.select("returnValue");
5571        query = query.arg("value", value);
5572        query.execute(self.graphql_client.clone()).await
5573    }
5574}
5575#[derive(Clone)]
5576pub struct FunctionCallArgValue {
5577    pub proc: Option<Arc<DaggerSessionProc>>,
5578    pub selection: Selection,
5579    pub graphql_client: DynGraphQLClient,
5580}
5581impl FunctionCallArgValue {
5582    /// A unique identifier for this FunctionCallArgValue.
5583    pub async fn id(&self) -> Result<FunctionCallArgValueId, DaggerError> {
5584        let query = self.selection.select("id");
5585        query.execute(self.graphql_client.clone()).await
5586    }
5587    /// The name of the argument.
5588    pub async fn name(&self) -> Result<String, DaggerError> {
5589        let query = self.selection.select("name");
5590        query.execute(self.graphql_client.clone()).await
5591    }
5592    /// The value of the argument represented as a JSON serialized string.
5593    pub async fn value(&self) -> Result<Json, DaggerError> {
5594        let query = self.selection.select("value");
5595        query.execute(self.graphql_client.clone()).await
5596    }
5597}
5598#[derive(Clone)]
5599pub struct GeneratedCode {
5600    pub proc: Option<Arc<DaggerSessionProc>>,
5601    pub selection: Selection,
5602    pub graphql_client: DynGraphQLClient,
5603}
5604impl GeneratedCode {
5605    /// The directory containing the generated code.
5606    pub fn code(&self) -> Directory {
5607        let query = self.selection.select("code");
5608        Directory {
5609            proc: self.proc.clone(),
5610            selection: query,
5611            graphql_client: self.graphql_client.clone(),
5612        }
5613    }
5614    /// A unique identifier for this GeneratedCode.
5615    pub async fn id(&self) -> Result<GeneratedCodeId, DaggerError> {
5616        let query = self.selection.select("id");
5617        query.execute(self.graphql_client.clone()).await
5618    }
5619    /// List of paths to mark generated in version control (i.e. .gitattributes).
5620    pub async fn vcs_generated_paths(&self) -> Result<Vec<String>, DaggerError> {
5621        let query = self.selection.select("vcsGeneratedPaths");
5622        query.execute(self.graphql_client.clone()).await
5623    }
5624    /// List of paths to ignore in version control (i.e. .gitignore).
5625    pub async fn vcs_ignored_paths(&self) -> Result<Vec<String>, DaggerError> {
5626        let query = self.selection.select("vcsIgnoredPaths");
5627        query.execute(self.graphql_client.clone()).await
5628    }
5629    /// Set the list of paths to mark generated in version control.
5630    pub fn with_vcs_generated_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
5631        let mut query = self.selection.select("withVCSGeneratedPaths");
5632        query = query.arg(
5633            "paths",
5634            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
5635        );
5636        GeneratedCode {
5637            proc: self.proc.clone(),
5638            selection: query,
5639            graphql_client: self.graphql_client.clone(),
5640        }
5641    }
5642    /// Set the list of paths to ignore in version control.
5643    pub fn with_vcs_ignored_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
5644        let mut query = self.selection.select("withVCSIgnoredPaths");
5645        query = query.arg(
5646            "paths",
5647            paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
5648        );
5649        GeneratedCode {
5650            proc: self.proc.clone(),
5651            selection: query,
5652            graphql_client: self.graphql_client.clone(),
5653        }
5654    }
5655}
5656#[derive(Clone)]
5657pub struct GitRef {
5658    pub proc: Option<Arc<DaggerSessionProc>>,
5659    pub selection: Selection,
5660    pub graphql_client: DynGraphQLClient,
5661}
5662#[derive(Builder, Debug, PartialEq)]
5663pub struct GitRefTreeOpts {
5664    /// Set to true to discard .git directory.
5665    #[builder(setter(into, strip_option), default)]
5666    pub discard_git_dir: Option<bool>,
5667}
5668impl GitRef {
5669    /// The resolved commit id at this ref.
5670    pub async fn commit(&self) -> Result<String, DaggerError> {
5671        let query = self.selection.select("commit");
5672        query.execute(self.graphql_client.clone()).await
5673    }
5674    /// A unique identifier for this GitRef.
5675    pub async fn id(&self) -> Result<GitRefId, DaggerError> {
5676        let query = self.selection.select("id");
5677        query.execute(self.graphql_client.clone()).await
5678    }
5679    /// The filesystem tree at this ref.
5680    ///
5681    /// # Arguments
5682    ///
5683    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5684    pub fn tree(&self) -> Directory {
5685        let query = self.selection.select("tree");
5686        Directory {
5687            proc: self.proc.clone(),
5688            selection: query,
5689            graphql_client: self.graphql_client.clone(),
5690        }
5691    }
5692    /// The filesystem tree at this ref.
5693    ///
5694    /// # Arguments
5695    ///
5696    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5697    pub fn tree_opts(&self, opts: GitRefTreeOpts) -> Directory {
5698        let mut query = self.selection.select("tree");
5699        if let Some(discard_git_dir) = opts.discard_git_dir {
5700            query = query.arg("discardGitDir", discard_git_dir);
5701        }
5702        Directory {
5703            proc: self.proc.clone(),
5704            selection: query,
5705            graphql_client: self.graphql_client.clone(),
5706        }
5707    }
5708}
5709#[derive(Clone)]
5710pub struct GitRepository {
5711    pub proc: Option<Arc<DaggerSessionProc>>,
5712    pub selection: Selection,
5713    pub graphql_client: DynGraphQLClient,
5714}
5715#[derive(Builder, Debug, PartialEq)]
5716pub struct GitRepositoryTagsOpts<'a> {
5717    /// Glob patterns (e.g., "refs/tags/v*").
5718    #[builder(setter(into, strip_option), default)]
5719    pub patterns: Option<Vec<&'a str>>,
5720}
5721impl GitRepository {
5722    /// Returns details of a branch.
5723    ///
5724    /// # Arguments
5725    ///
5726    /// * `name` - Branch's name (e.g., "main").
5727    pub fn branch(&self, name: impl Into<String>) -> GitRef {
5728        let mut query = self.selection.select("branch");
5729        query = query.arg("name", name.into());
5730        GitRef {
5731            proc: self.proc.clone(),
5732            selection: query,
5733            graphql_client: self.graphql_client.clone(),
5734        }
5735    }
5736    /// Returns details of a commit.
5737    ///
5738    /// # Arguments
5739    ///
5740    /// * `id` - Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
5741    pub fn commit(&self, id: impl Into<String>) -> GitRef {
5742        let mut query = self.selection.select("commit");
5743        query = query.arg("id", id.into());
5744        GitRef {
5745            proc: self.proc.clone(),
5746            selection: query,
5747            graphql_client: self.graphql_client.clone(),
5748        }
5749    }
5750    /// Returns details for HEAD.
5751    pub fn head(&self) -> GitRef {
5752        let query = self.selection.select("head");
5753        GitRef {
5754            proc: self.proc.clone(),
5755            selection: query,
5756            graphql_client: self.graphql_client.clone(),
5757        }
5758    }
5759    /// A unique identifier for this GitRepository.
5760    pub async fn id(&self) -> Result<GitRepositoryId, DaggerError> {
5761        let query = self.selection.select("id");
5762        query.execute(self.graphql_client.clone()).await
5763    }
5764    /// Returns details of a ref.
5765    ///
5766    /// # Arguments
5767    ///
5768    /// * `name` - Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref).
5769    pub fn r#ref(&self, name: impl Into<String>) -> GitRef {
5770        let mut query = self.selection.select("ref");
5771        query = query.arg("name", name.into());
5772        GitRef {
5773            proc: self.proc.clone(),
5774            selection: query,
5775            graphql_client: self.graphql_client.clone(),
5776        }
5777    }
5778    /// Returns details of a tag.
5779    ///
5780    /// # Arguments
5781    ///
5782    /// * `name` - Tag's name (e.g., "v0.3.9").
5783    pub fn tag(&self, name: impl Into<String>) -> GitRef {
5784        let mut query = self.selection.select("tag");
5785        query = query.arg("name", name.into());
5786        GitRef {
5787            proc: self.proc.clone(),
5788            selection: query,
5789            graphql_client: self.graphql_client.clone(),
5790        }
5791    }
5792    /// tags that match any of the given glob patterns.
5793    ///
5794    /// # Arguments
5795    ///
5796    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5797    pub async fn tags(&self) -> Result<Vec<String>, DaggerError> {
5798        let query = self.selection.select("tags");
5799        query.execute(self.graphql_client.clone()).await
5800    }
5801    /// tags that match any of the given glob patterns.
5802    ///
5803    /// # Arguments
5804    ///
5805    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5806    pub async fn tags_opts<'a>(
5807        &self,
5808        opts: GitRepositoryTagsOpts<'a>,
5809    ) -> Result<Vec<String>, DaggerError> {
5810        let mut query = self.selection.select("tags");
5811        if let Some(patterns) = opts.patterns {
5812            query = query.arg("patterns", patterns);
5813        }
5814        query.execute(self.graphql_client.clone()).await
5815    }
5816    /// Header to authenticate the remote with.
5817    ///
5818    /// # Arguments
5819    ///
5820    /// * `header` - Secret used to populate the Authorization HTTP header
5821    pub fn with_auth_header(&self, header: impl IntoID<SecretId>) -> GitRepository {
5822        let mut query = self.selection.select("withAuthHeader");
5823        query = query.arg_lazy(
5824            "header",
5825            Box::new(move || {
5826                let header = header.clone();
5827                Box::pin(async move { header.into_id().await.unwrap().quote() })
5828            }),
5829        );
5830        GitRepository {
5831            proc: self.proc.clone(),
5832            selection: query,
5833            graphql_client: self.graphql_client.clone(),
5834        }
5835    }
5836    /// Token to authenticate the remote with.
5837    ///
5838    /// # Arguments
5839    ///
5840    /// * `token` - Secret used to populate the password during basic HTTP Authorization
5841    pub fn with_auth_token(&self, token: impl IntoID<SecretId>) -> GitRepository {
5842        let mut query = self.selection.select("withAuthToken");
5843        query = query.arg_lazy(
5844            "token",
5845            Box::new(move || {
5846                let token = token.clone();
5847                Box::pin(async move { token.into_id().await.unwrap().quote() })
5848            }),
5849        );
5850        GitRepository {
5851            proc: self.proc.clone(),
5852            selection: query,
5853            graphql_client: self.graphql_client.clone(),
5854        }
5855    }
5856}
5857#[derive(Clone)]
5858pub struct Host {
5859    pub proc: Option<Arc<DaggerSessionProc>>,
5860    pub selection: Selection,
5861    pub graphql_client: DynGraphQLClient,
5862}
5863#[derive(Builder, Debug, PartialEq)]
5864pub struct HostDirectoryOpts<'a> {
5865    /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
5866    #[builder(setter(into, strip_option), default)]
5867    pub exclude: Option<Vec<&'a str>>,
5868    /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
5869    #[builder(setter(into, strip_option), default)]
5870    pub include: Option<Vec<&'a str>>,
5871}
5872#[derive(Builder, Debug, PartialEq)]
5873pub struct HostServiceOpts<'a> {
5874    /// Upstream host to forward traffic to.
5875    #[builder(setter(into, strip_option), default)]
5876    pub host: Option<&'a str>,
5877}
5878#[derive(Builder, Debug, PartialEq)]
5879pub struct HostTunnelOpts {
5880    /// Map each service port to the same port on the host, as if the service were running natively.
5881    /// Note: enabling may result in port conflicts.
5882    #[builder(setter(into, strip_option), default)]
5883    pub native: Option<bool>,
5884    /// Configure explicit port forwarding rules for the tunnel.
5885    /// If a port's frontend is unspecified or 0, a random port will be chosen by the host.
5886    /// 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.
5887    /// If ports are given and native is true, the ports are additive.
5888    #[builder(setter(into, strip_option), default)]
5889    pub ports: Option<Vec<PortForward>>,
5890}
5891impl Host {
5892    /// Accesses a directory on the host.
5893    ///
5894    /// # Arguments
5895    ///
5896    /// * `path` - Location of the directory to access (e.g., ".").
5897    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5898    pub fn directory(&self, path: impl Into<String>) -> Directory {
5899        let mut query = self.selection.select("directory");
5900        query = query.arg("path", path.into());
5901        Directory {
5902            proc: self.proc.clone(),
5903            selection: query,
5904            graphql_client: self.graphql_client.clone(),
5905        }
5906    }
5907    /// Accesses a directory on the host.
5908    ///
5909    /// # Arguments
5910    ///
5911    /// * `path` - Location of the directory to access (e.g., ".").
5912    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5913    pub fn directory_opts<'a>(
5914        &self,
5915        path: impl Into<String>,
5916        opts: HostDirectoryOpts<'a>,
5917    ) -> Directory {
5918        let mut query = self.selection.select("directory");
5919        query = query.arg("path", path.into());
5920        if let Some(exclude) = opts.exclude {
5921            query = query.arg("exclude", exclude);
5922        }
5923        if let Some(include) = opts.include {
5924            query = query.arg("include", include);
5925        }
5926        Directory {
5927            proc: self.proc.clone(),
5928            selection: query,
5929            graphql_client: self.graphql_client.clone(),
5930        }
5931    }
5932    /// Accesses a file on the host.
5933    ///
5934    /// # Arguments
5935    ///
5936    /// * `path` - Location of the file to retrieve (e.g., "README.md").
5937    pub fn file(&self, path: impl Into<String>) -> File {
5938        let mut query = self.selection.select("file");
5939        query = query.arg("path", path.into());
5940        File {
5941            proc: self.proc.clone(),
5942            selection: query,
5943            graphql_client: self.graphql_client.clone(),
5944        }
5945    }
5946    /// A unique identifier for this Host.
5947    pub async fn id(&self) -> Result<HostId, DaggerError> {
5948        let query = self.selection.select("id");
5949        query.execute(self.graphql_client.clone()).await
5950    }
5951    /// Creates a service that forwards traffic to a specified address via the host.
5952    ///
5953    /// # Arguments
5954    ///
5955    /// * `ports` - Ports to expose via the service, forwarding through the host network.
5956    ///
5957    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
5958    ///
5959    /// An empty set of ports is not valid; an error will be returned.
5960    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5961    pub fn service(&self, ports: Vec<PortForward>) -> Service {
5962        let mut query = self.selection.select("service");
5963        query = query.arg("ports", ports);
5964        Service {
5965            proc: self.proc.clone(),
5966            selection: query,
5967            graphql_client: self.graphql_client.clone(),
5968        }
5969    }
5970    /// Creates a service that forwards traffic to a specified address via the host.
5971    ///
5972    /// # Arguments
5973    ///
5974    /// * `ports` - Ports to expose via the service, forwarding through the host network.
5975    ///
5976    /// If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
5977    ///
5978    /// An empty set of ports is not valid; an error will be returned.
5979    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
5980    pub fn service_opts<'a>(&self, ports: Vec<PortForward>, opts: HostServiceOpts<'a>) -> Service {
5981        let mut query = self.selection.select("service");
5982        query = query.arg("ports", ports);
5983        if let Some(host) = opts.host {
5984            query = query.arg("host", host);
5985        }
5986        Service {
5987            proc: self.proc.clone(),
5988            selection: query,
5989            graphql_client: self.graphql_client.clone(),
5990        }
5991    }
5992    /// Sets a secret given a user-defined name and the file path on the host, and returns the secret.
5993    /// The file is limited to a size of 512000 bytes.
5994    ///
5995    /// # Arguments
5996    ///
5997    /// * `name` - The user defined name for this secret.
5998    /// * `path` - Location of the file to set as a secret.
5999    pub fn set_secret_file(&self, name: impl Into<String>, path: impl Into<String>) -> Secret {
6000        let mut query = self.selection.select("setSecretFile");
6001        query = query.arg("name", name.into());
6002        query = query.arg("path", path.into());
6003        Secret {
6004            proc: self.proc.clone(),
6005            selection: query,
6006            graphql_client: self.graphql_client.clone(),
6007        }
6008    }
6009    /// Creates a tunnel that forwards traffic from the host to a service.
6010    ///
6011    /// # Arguments
6012    ///
6013    /// * `service` - Service to send traffic from the tunnel.
6014    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6015    pub fn tunnel(&self, service: impl IntoID<ServiceId>) -> Service {
6016        let mut query = self.selection.select("tunnel");
6017        query = query.arg_lazy(
6018            "service",
6019            Box::new(move || {
6020                let service = service.clone();
6021                Box::pin(async move { service.into_id().await.unwrap().quote() })
6022            }),
6023        );
6024        Service {
6025            proc: self.proc.clone(),
6026            selection: query,
6027            graphql_client: self.graphql_client.clone(),
6028        }
6029    }
6030    /// Creates a tunnel that forwards traffic from the host to a service.
6031    ///
6032    /// # Arguments
6033    ///
6034    /// * `service` - Service to send traffic from the tunnel.
6035    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
6036    pub fn tunnel_opts(&self, service: impl IntoID<ServiceId>, opts: HostTunnelOpts) -> Service {
6037        let mut query = self.selection.select("tunnel");
6038        query = query.arg_lazy(
6039            "service",
6040            Box::new(move || {
6041                let service = service.clone();
6042                Box::pin(async move { service.into_id().await.unwrap().quote() })
6043            }),
6044        );
6045        if let Some(ports) = opts.ports {
6046            query = query.arg("ports", ports);
6047        }
6048        if let Some(native) = opts.native {
6049            query = query.arg("native", native);
6050        }
6051        Service {
6052            proc: self.proc.clone(),
6053            selection: query,
6054            graphql_client: self.graphql_client.clone(),
6055        }
6056    }
6057    /// Accesses a Unix socket on the host.
6058    ///
6059    /// # Arguments
6060    ///
6061    /// * `path` - Location of the Unix socket (e.g., "/var/run/docker.sock").
6062    pub fn unix_socket(&self, path: impl Into<String>) -> Socket {
6063        let mut query = self.selection.select("unixSocket");
6064        query = query.arg("path", path.into());
6065        Socket {
6066            proc: self.proc.clone(),
6067            selection: query,
6068            graphql_client: self.graphql_client.clone(),
6069        }
6070    }
6071}
6072#[derive(Clone)]
6073pub struct InputTypeDef {
6074    pub proc: Option<Arc<DaggerSessionProc>>,
6075    pub selection: Selection,
6076    pub graphql_client: DynGraphQLClient,
6077}
6078impl InputTypeDef {
6079    /// Static fields defined on this input object, if any.
6080    pub fn fields(&self) -> Vec<FieldTypeDef> {
6081        let query = self.selection.select("fields");
6082        vec![FieldTypeDef {
6083            proc: self.proc.clone(),
6084            selection: query,
6085            graphql_client: self.graphql_client.clone(),
6086        }]
6087    }
6088    /// A unique identifier for this InputTypeDef.
6089    pub async fn id(&self) -> Result<InputTypeDefId, DaggerError> {
6090        let query = self.selection.select("id");
6091        query.execute(self.graphql_client.clone()).await
6092    }
6093    /// The name of the input object.
6094    pub async fn name(&self) -> Result<String, DaggerError> {
6095        let query = self.selection.select("name");
6096        query.execute(self.graphql_client.clone()).await
6097    }
6098}
6099#[derive(Clone)]
6100pub struct InterfaceTypeDef {
6101    pub proc: Option<Arc<DaggerSessionProc>>,
6102    pub selection: Selection,
6103    pub graphql_client: DynGraphQLClient,
6104}
6105impl InterfaceTypeDef {
6106    /// The doc string for the interface, if any.
6107    pub async fn description(&self) -> Result<String, DaggerError> {
6108        let query = self.selection.select("description");
6109        query.execute(self.graphql_client.clone()).await
6110    }
6111    /// Functions defined on this interface, if any.
6112    pub fn functions(&self) -> Vec<Function> {
6113        let query = self.selection.select("functions");
6114        vec![Function {
6115            proc: self.proc.clone(),
6116            selection: query,
6117            graphql_client: self.graphql_client.clone(),
6118        }]
6119    }
6120    /// A unique identifier for this InterfaceTypeDef.
6121    pub async fn id(&self) -> Result<InterfaceTypeDefId, DaggerError> {
6122        let query = self.selection.select("id");
6123        query.execute(self.graphql_client.clone()).await
6124    }
6125    /// The name of the interface.
6126    pub async fn name(&self) -> Result<String, DaggerError> {
6127        let query = self.selection.select("name");
6128        query.execute(self.graphql_client.clone()).await
6129    }
6130    /// The location of this interface declaration.
6131    pub fn source_map(&self) -> SourceMap {
6132        let query = self.selection.select("sourceMap");
6133        SourceMap {
6134            proc: self.proc.clone(),
6135            selection: query,
6136            graphql_client: self.graphql_client.clone(),
6137        }
6138    }
6139    /// If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise.
6140    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
6141        let query = self.selection.select("sourceModuleName");
6142        query.execute(self.graphql_client.clone()).await
6143    }
6144}
6145#[derive(Clone)]
6146pub struct Llm {
6147    pub proc: Option<Arc<DaggerSessionProc>>,
6148    pub selection: Selection,
6149    pub graphql_client: DynGraphQLClient,
6150}
6151impl Llm {
6152    /// create a branch in the LLM's history
6153    pub fn attempt(&self, number: isize) -> Llm {
6154        let mut query = self.selection.select("attempt");
6155        query = query.arg("number", number);
6156        Llm {
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 CacheVolume
6163    pub fn cache_volume(&self) -> CacheVolume {
6164        let query = self.selection.select("cacheVolume");
6165        CacheVolume {
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 Container
6172    pub fn container(&self) -> Container {
6173        let query = self.selection.select("container");
6174        Container {
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 CurrentModule
6181    pub fn current_module(&self) -> CurrentModule {
6182        let query = self.selection.select("currentModule");
6183        CurrentModule {
6184            proc: self.proc.clone(),
6185            selection: query,
6186            graphql_client: self.graphql_client.clone(),
6187        }
6188    }
6189    /// returns the type of the current state
6190    pub async fn current_type(&self) -> Result<String, DaggerError> {
6191        let query = self.selection.select("currentType");
6192        query.execute(self.graphql_client.clone()).await
6193    }
6194    /// Retrieve a the current value in the LLM environment, of type Directory
6195    pub fn directory(&self) -> Directory {
6196        let query = self.selection.select("directory");
6197        Directory {
6198            proc: self.proc.clone(),
6199            selection: query,
6200            graphql_client: self.graphql_client.clone(),
6201        }
6202    }
6203    /// Retrieve a the current value in the LLM environment, of type EnumTypeDef
6204    pub fn enum_type_def(&self) -> EnumTypeDef {
6205        let query = self.selection.select("enumTypeDef");
6206        EnumTypeDef {
6207            proc: self.proc.clone(),
6208            selection: query,
6209            graphql_client: self.graphql_client.clone(),
6210        }
6211    }
6212    /// Retrieve a the current value in the LLM environment, of type EnumValueTypeDef
6213    pub fn enum_value_type_def(&self) -> EnumValueTypeDef {
6214        let query = self.selection.select("enumValueTypeDef");
6215        EnumValueTypeDef {
6216            proc: self.proc.clone(),
6217            selection: query,
6218            graphql_client: self.graphql_client.clone(),
6219        }
6220    }
6221    /// Retrieve a the current value in the LLM environment, of type Error
6222    pub fn error(&self) -> Error {
6223        let query = self.selection.select("error");
6224        Error {
6225            proc: self.proc.clone(),
6226            selection: query,
6227            graphql_client: self.graphql_client.clone(),
6228        }
6229    }
6230    /// Retrieve a the current value in the LLM environment, of type ErrorValue
6231    pub fn error_value(&self) -> ErrorValue {
6232        let query = self.selection.select("errorValue");
6233        ErrorValue {
6234            proc: self.proc.clone(),
6235            selection: query,
6236            graphql_client: self.graphql_client.clone(),
6237        }
6238    }
6239    /// Retrieve a the current value in the LLM environment, of type FieldTypeDef
6240    pub fn field_type_def(&self) -> FieldTypeDef {
6241        let query = self.selection.select("fieldTypeDef");
6242        FieldTypeDef {
6243            proc: self.proc.clone(),
6244            selection: query,
6245            graphql_client: self.graphql_client.clone(),
6246        }
6247    }
6248    /// Retrieve a the current value in the LLM environment, of type File
6249    pub fn file(&self) -> File {
6250        let query = self.selection.select("file");
6251        File {
6252            proc: self.proc.clone(),
6253            selection: query,
6254            graphql_client: self.graphql_client.clone(),
6255        }
6256    }
6257    /// Retrieve a the current value in the LLM environment, of type Function
6258    pub fn function(&self) -> Function {
6259        let query = self.selection.select("function");
6260        Function {
6261            proc: self.proc.clone(),
6262            selection: query,
6263            graphql_client: self.graphql_client.clone(),
6264        }
6265    }
6266    /// Retrieve a the current value in the LLM environment, of type FunctionArg
6267    pub fn function_arg(&self) -> FunctionArg {
6268        let query = self.selection.select("functionArg");
6269        FunctionArg {
6270            proc: self.proc.clone(),
6271            selection: query,
6272            graphql_client: self.graphql_client.clone(),
6273        }
6274    }
6275    /// Retrieve a the current value in the LLM environment, of type FunctionCall
6276    pub fn function_call(&self) -> FunctionCall {
6277        let query = self.selection.select("functionCall");
6278        FunctionCall {
6279            proc: self.proc.clone(),
6280            selection: query,
6281            graphql_client: self.graphql_client.clone(),
6282        }
6283    }
6284    /// Retrieve a the current value in the LLM environment, of type FunctionCallArgValue
6285    pub fn function_call_arg_value(&self) -> FunctionCallArgValue {
6286        let query = self.selection.select("functionCallArgValue");
6287        FunctionCallArgValue {
6288            proc: self.proc.clone(),
6289            selection: query,
6290            graphql_client: self.graphql_client.clone(),
6291        }
6292    }
6293    /// Retrieve a the current value in the LLM environment, of type GeneratedCode
6294    pub fn generated_code(&self) -> GeneratedCode {
6295        let query = self.selection.select("generatedCode");
6296        GeneratedCode {
6297            proc: self.proc.clone(),
6298            selection: query,
6299            graphql_client: self.graphql_client.clone(),
6300        }
6301    }
6302    /// Retrieve a variable in the llm environment, of type CacheVolume
6303    ///
6304    /// # Arguments
6305    ///
6306    /// * `name` - The name of the variable
6307    pub fn get_cache_volume(&self, name: impl Into<String>) -> CacheVolume {
6308        let mut query = self.selection.select("getCacheVolume");
6309        query = query.arg("name", name.into());
6310        CacheVolume {
6311            proc: self.proc.clone(),
6312            selection: query,
6313            graphql_client: self.graphql_client.clone(),
6314        }
6315    }
6316    /// Retrieve a variable in the llm environment, of type Container
6317    ///
6318    /// # Arguments
6319    ///
6320    /// * `name` - The name of the variable
6321    pub fn get_container(&self, name: impl Into<String>) -> Container {
6322        let mut query = self.selection.select("getContainer");
6323        query = query.arg("name", name.into());
6324        Container {
6325            proc: self.proc.clone(),
6326            selection: query,
6327            graphql_client: self.graphql_client.clone(),
6328        }
6329    }
6330    /// Retrieve a variable in the llm environment, of type CurrentModule
6331    ///
6332    /// # Arguments
6333    ///
6334    /// * `name` - The name of the variable
6335    pub fn get_current_module(&self, name: impl Into<String>) -> CurrentModule {
6336        let mut query = self.selection.select("getCurrentModule");
6337        query = query.arg("name", name.into());
6338        CurrentModule {
6339            proc: self.proc.clone(),
6340            selection: query,
6341            graphql_client: self.graphql_client.clone(),
6342        }
6343    }
6344    /// Retrieve a variable in the llm environment, of type Directory
6345    ///
6346    /// # Arguments
6347    ///
6348    /// * `name` - The name of the variable
6349    pub fn get_directory(&self, name: impl Into<String>) -> Directory {
6350        let mut query = self.selection.select("getDirectory");
6351        query = query.arg("name", name.into());
6352        Directory {
6353            proc: self.proc.clone(),
6354            selection: query,
6355            graphql_client: self.graphql_client.clone(),
6356        }
6357    }
6358    /// Retrieve a variable in the llm environment, of type EnumTypeDef
6359    ///
6360    /// # Arguments
6361    ///
6362    /// * `name` - The name of the variable
6363    pub fn get_enum_type_def(&self, name: impl Into<String>) -> EnumTypeDef {
6364        let mut query = self.selection.select("getEnumTypeDef");
6365        query = query.arg("name", name.into());
6366        EnumTypeDef {
6367            proc: self.proc.clone(),
6368            selection: query,
6369            graphql_client: self.graphql_client.clone(),
6370        }
6371    }
6372    /// Retrieve a variable in the llm environment, of type EnumValueTypeDef
6373    ///
6374    /// # Arguments
6375    ///
6376    /// * `name` - The name of the variable
6377    pub fn get_enum_value_type_def(&self, name: impl Into<String>) -> EnumValueTypeDef {
6378        let mut query = self.selection.select("getEnumValueTypeDef");
6379        query = query.arg("name", name.into());
6380        EnumValueTypeDef {
6381            proc: self.proc.clone(),
6382            selection: query,
6383            graphql_client: self.graphql_client.clone(),
6384        }
6385    }
6386    /// Retrieve a variable in the llm environment, of type Error
6387    ///
6388    /// # Arguments
6389    ///
6390    /// * `name` - The name of the variable
6391    pub fn get_error(&self, name: impl Into<String>) -> Error {
6392        let mut query = self.selection.select("getError");
6393        query = query.arg("name", name.into());
6394        Error {
6395            proc: self.proc.clone(),
6396            selection: query,
6397            graphql_client: self.graphql_client.clone(),
6398        }
6399    }
6400    /// Retrieve a variable in the llm environment, of type ErrorValue
6401    ///
6402    /// # Arguments
6403    ///
6404    /// * `name` - The name of the variable
6405    pub fn get_error_value(&self, name: impl Into<String>) -> ErrorValue {
6406        let mut query = self.selection.select("getErrorValue");
6407        query = query.arg("name", name.into());
6408        ErrorValue {
6409            proc: self.proc.clone(),
6410            selection: query,
6411            graphql_client: self.graphql_client.clone(),
6412        }
6413    }
6414    /// Retrieve a variable in the llm environment, of type FieldTypeDef
6415    ///
6416    /// # Arguments
6417    ///
6418    /// * `name` - The name of the variable
6419    pub fn get_field_type_def(&self, name: impl Into<String>) -> FieldTypeDef {
6420        let mut query = self.selection.select("getFieldTypeDef");
6421        query = query.arg("name", name.into());
6422        FieldTypeDef {
6423            proc: self.proc.clone(),
6424            selection: query,
6425            graphql_client: self.graphql_client.clone(),
6426        }
6427    }
6428    /// Retrieve a variable in the llm environment, of type File
6429    ///
6430    /// # Arguments
6431    ///
6432    /// * `name` - The name of the variable
6433    pub fn get_file(&self, name: impl Into<String>) -> File {
6434        let mut query = self.selection.select("getFile");
6435        query = query.arg("name", name.into());
6436        File {
6437            proc: self.proc.clone(),
6438            selection: query,
6439            graphql_client: self.graphql_client.clone(),
6440        }
6441    }
6442    /// Retrieve a variable in the llm environment, of type Function
6443    ///
6444    /// # Arguments
6445    ///
6446    /// * `name` - The name of the variable
6447    pub fn get_function(&self, name: impl Into<String>) -> Function {
6448        let mut query = self.selection.select("getFunction");
6449        query = query.arg("name", name.into());
6450        Function {
6451            proc: self.proc.clone(),
6452            selection: query,
6453            graphql_client: self.graphql_client.clone(),
6454        }
6455    }
6456    /// Retrieve a variable in the llm environment, of type FunctionArg
6457    ///
6458    /// # Arguments
6459    ///
6460    /// * `name` - The name of the variable
6461    pub fn get_function_arg(&self, name: impl Into<String>) -> FunctionArg {
6462        let mut query = self.selection.select("getFunctionArg");
6463        query = query.arg("name", name.into());
6464        FunctionArg {
6465            proc: self.proc.clone(),
6466            selection: query,
6467            graphql_client: self.graphql_client.clone(),
6468        }
6469    }
6470    /// Retrieve a variable in the llm environment, of type FunctionCall
6471    ///
6472    /// # Arguments
6473    ///
6474    /// * `name` - The name of the variable
6475    pub fn get_function_call(&self, name: impl Into<String>) -> FunctionCall {
6476        let mut query = self.selection.select("getFunctionCall");
6477        query = query.arg("name", name.into());
6478        FunctionCall {
6479            proc: self.proc.clone(),
6480            selection: query,
6481            graphql_client: self.graphql_client.clone(),
6482        }
6483    }
6484    /// Retrieve a variable in the llm environment, of type FunctionCallArgValue
6485    ///
6486    /// # Arguments
6487    ///
6488    /// * `name` - The name of the variable
6489    pub fn get_function_call_arg_value(&self, name: impl Into<String>) -> FunctionCallArgValue {
6490        let mut query = self.selection.select("getFunctionCallArgValue");
6491        query = query.arg("name", name.into());
6492        FunctionCallArgValue {
6493            proc: self.proc.clone(),
6494            selection: query,
6495            graphql_client: self.graphql_client.clone(),
6496        }
6497    }
6498    /// Retrieve a variable in the llm environment, of type GeneratedCode
6499    ///
6500    /// # Arguments
6501    ///
6502    /// * `name` - The name of the variable
6503    pub fn get_generated_code(&self, name: impl Into<String>) -> GeneratedCode {
6504        let mut query = self.selection.select("getGeneratedCode");
6505        query = query.arg("name", name.into());
6506        GeneratedCode {
6507            proc: self.proc.clone(),
6508            selection: query,
6509            graphql_client: self.graphql_client.clone(),
6510        }
6511    }
6512    /// Retrieve a variable in the llm environment, of type GitRef
6513    ///
6514    /// # Arguments
6515    ///
6516    /// * `name` - The name of the variable
6517    pub fn get_git_ref(&self, name: impl Into<String>) -> GitRef {
6518        let mut query = self.selection.select("getGitRef");
6519        query = query.arg("name", name.into());
6520        GitRef {
6521            proc: self.proc.clone(),
6522            selection: query,
6523            graphql_client: self.graphql_client.clone(),
6524        }
6525    }
6526    /// Retrieve a variable in the llm environment, of type GitRepository
6527    ///
6528    /// # Arguments
6529    ///
6530    /// * `name` - The name of the variable
6531    pub fn get_git_repository(&self, name: impl Into<String>) -> GitRepository {
6532        let mut query = self.selection.select("getGitRepository");
6533        query = query.arg("name", name.into());
6534        GitRepository {
6535            proc: self.proc.clone(),
6536            selection: query,
6537            graphql_client: self.graphql_client.clone(),
6538        }
6539    }
6540    /// Retrieve a variable in the llm environment, of type InputTypeDef
6541    ///
6542    /// # Arguments
6543    ///
6544    /// * `name` - The name of the variable
6545    pub fn get_input_type_def(&self, name: impl Into<String>) -> InputTypeDef {
6546        let mut query = self.selection.select("getInputTypeDef");
6547        query = query.arg("name", name.into());
6548        InputTypeDef {
6549            proc: self.proc.clone(),
6550            selection: query,
6551            graphql_client: self.graphql_client.clone(),
6552        }
6553    }
6554    /// Retrieve a variable in the llm environment, of type InterfaceTypeDef
6555    ///
6556    /// # Arguments
6557    ///
6558    /// * `name` - The name of the variable
6559    pub fn get_interface_type_def(&self, name: impl Into<String>) -> InterfaceTypeDef {
6560        let mut query = self.selection.select("getInterfaceTypeDef");
6561        query = query.arg("name", name.into());
6562        InterfaceTypeDef {
6563            proc: self.proc.clone(),
6564            selection: query,
6565            graphql_client: self.graphql_client.clone(),
6566        }
6567    }
6568    /// Retrieve a variable in the llm environment, of type LLM
6569    ///
6570    /// # Arguments
6571    ///
6572    /// * `name` - The name of the variable
6573    pub fn get_llm(&self, name: impl Into<String>) -> Llm {
6574        let mut query = self.selection.select("getLLM");
6575        query = query.arg("name", name.into());
6576        Llm {
6577            proc: self.proc.clone(),
6578            selection: query,
6579            graphql_client: self.graphql_client.clone(),
6580        }
6581    }
6582    /// Retrieve a variable in the llm environment, of type ListTypeDef
6583    ///
6584    /// # Arguments
6585    ///
6586    /// * `name` - The name of the variable
6587    pub fn get_list_type_def(&self, name: impl Into<String>) -> ListTypeDef {
6588        let mut query = self.selection.select("getListTypeDef");
6589        query = query.arg("name", name.into());
6590        ListTypeDef {
6591            proc: self.proc.clone(),
6592            selection: query,
6593            graphql_client: self.graphql_client.clone(),
6594        }
6595    }
6596    /// Retrieve a variable in the llm environment, of type Module
6597    ///
6598    /// # Arguments
6599    ///
6600    /// * `name` - The name of the variable
6601    pub fn get_module(&self, name: impl Into<String>) -> Module {
6602        let mut query = self.selection.select("getModule");
6603        query = query.arg("name", name.into());
6604        Module {
6605            proc: self.proc.clone(),
6606            selection: query,
6607            graphql_client: self.graphql_client.clone(),
6608        }
6609    }
6610    /// Retrieve a variable in the llm environment, of type ModuleConfigClient
6611    ///
6612    /// # Arguments
6613    ///
6614    /// * `name` - The name of the variable
6615    pub fn get_module_config_client(&self, name: impl Into<String>) -> ModuleConfigClient {
6616        let mut query = self.selection.select("getModuleConfigClient");
6617        query = query.arg("name", name.into());
6618        ModuleConfigClient {
6619            proc: self.proc.clone(),
6620            selection: query,
6621            graphql_client: self.graphql_client.clone(),
6622        }
6623    }
6624    /// Retrieve a variable in the llm environment, of type ModuleSource
6625    ///
6626    /// # Arguments
6627    ///
6628    /// * `name` - The name of the variable
6629    pub fn get_module_source(&self, name: impl Into<String>) -> ModuleSource {
6630        let mut query = self.selection.select("getModuleSource");
6631        query = query.arg("name", name.into());
6632        ModuleSource {
6633            proc: self.proc.clone(),
6634            selection: query,
6635            graphql_client: self.graphql_client.clone(),
6636        }
6637    }
6638    /// Retrieve a variable in the llm environment, of type ObjectTypeDef
6639    ///
6640    /// # Arguments
6641    ///
6642    /// * `name` - The name of the variable
6643    pub fn get_object_type_def(&self, name: impl Into<String>) -> ObjectTypeDef {
6644        let mut query = self.selection.select("getObjectTypeDef");
6645        query = query.arg("name", name.into());
6646        ObjectTypeDef {
6647            proc: self.proc.clone(),
6648            selection: query,
6649            graphql_client: self.graphql_client.clone(),
6650        }
6651    }
6652    /// Retrieve a variable in the llm environment, of type SDKConfig
6653    ///
6654    /// # Arguments
6655    ///
6656    /// * `name` - The name of the variable
6657    pub fn get_sdk_config(&self, name: impl Into<String>) -> SdkConfig {
6658        let mut query = self.selection.select("getSDKConfig");
6659        query = query.arg("name", name.into());
6660        SdkConfig {
6661            proc: self.proc.clone(),
6662            selection: query,
6663            graphql_client: self.graphql_client.clone(),
6664        }
6665    }
6666    /// Retrieve a variable in the llm environment, of type ScalarTypeDef
6667    ///
6668    /// # Arguments
6669    ///
6670    /// * `name` - The name of the variable
6671    pub fn get_scalar_type_def(&self, name: impl Into<String>) -> ScalarTypeDef {
6672        let mut query = self.selection.select("getScalarTypeDef");
6673        query = query.arg("name", name.into());
6674        ScalarTypeDef {
6675            proc: self.proc.clone(),
6676            selection: query,
6677            graphql_client: self.graphql_client.clone(),
6678        }
6679    }
6680    /// Retrieve a variable in the llm environment, of type Secret
6681    ///
6682    /// # Arguments
6683    ///
6684    /// * `name` - The name of the variable
6685    pub fn get_secret(&self, name: impl Into<String>) -> Secret {
6686        let mut query = self.selection.select("getSecret");
6687        query = query.arg("name", name.into());
6688        Secret {
6689            proc: self.proc.clone(),
6690            selection: query,
6691            graphql_client: self.graphql_client.clone(),
6692        }
6693    }
6694    /// Retrieve a variable in the llm environment, of type Service
6695    ///
6696    /// # Arguments
6697    ///
6698    /// * `name` - The name of the variable
6699    pub fn get_service(&self, name: impl Into<String>) -> Service {
6700        let mut query = self.selection.select("getService");
6701        query = query.arg("name", name.into());
6702        Service {
6703            proc: self.proc.clone(),
6704            selection: query,
6705            graphql_client: self.graphql_client.clone(),
6706        }
6707    }
6708    /// Retrieve a variable in the llm environment, of type Socket
6709    ///
6710    /// # Arguments
6711    ///
6712    /// * `name` - The name of the variable
6713    pub fn get_socket(&self, name: impl Into<String>) -> Socket {
6714        let mut query = self.selection.select("getSocket");
6715        query = query.arg("name", name.into());
6716        Socket {
6717            proc: self.proc.clone(),
6718            selection: query,
6719            graphql_client: self.graphql_client.clone(),
6720        }
6721    }
6722    /// Retrieve a variable in the llm environment, of type SourceMap
6723    ///
6724    /// # Arguments
6725    ///
6726    /// * `name` - The name of the variable
6727    pub fn get_source_map(&self, name: impl Into<String>) -> SourceMap {
6728        let mut query = self.selection.select("getSourceMap");
6729        query = query.arg("name", name.into());
6730        SourceMap {
6731            proc: self.proc.clone(),
6732            selection: query,
6733            graphql_client: self.graphql_client.clone(),
6734        }
6735    }
6736    /// Get a string variable from the LLM's environment
6737    ///
6738    /// # Arguments
6739    ///
6740    /// * `name` - The variable name
6741    pub async fn get_string(&self, name: impl Into<String>) -> Result<String, DaggerError> {
6742        let mut query = self.selection.select("getString");
6743        query = query.arg("name", name.into());
6744        query.execute(self.graphql_client.clone()).await
6745    }
6746    /// Retrieve a variable in the llm environment, of type Terminal
6747    ///
6748    /// # Arguments
6749    ///
6750    /// * `name` - The name of the variable
6751    pub fn get_terminal(&self, name: impl Into<String>) -> Terminal {
6752        let mut query = self.selection.select("getTerminal");
6753        query = query.arg("name", name.into());
6754        Terminal {
6755            proc: self.proc.clone(),
6756            selection: query,
6757            graphql_client: self.graphql_client.clone(),
6758        }
6759    }
6760    /// Retrieve a variable in the llm environment, of type TypeDef
6761    ///
6762    /// # Arguments
6763    ///
6764    /// * `name` - The name of the variable
6765    pub fn get_type_def(&self, name: impl Into<String>) -> TypeDef {
6766        let mut query = self.selection.select("getTypeDef");
6767        query = query.arg("name", name.into());
6768        TypeDef {
6769            proc: self.proc.clone(),
6770            selection: query,
6771            graphql_client: self.graphql_client.clone(),
6772        }
6773    }
6774    /// Retrieve a the current value in the LLM environment, of type GitRef
6775    pub fn git_ref(&self) -> GitRef {
6776        let query = self.selection.select("gitRef");
6777        GitRef {
6778            proc: self.proc.clone(),
6779            selection: query,
6780            graphql_client: self.graphql_client.clone(),
6781        }
6782    }
6783    /// Retrieve a the current value in the LLM environment, of type GitRepository
6784    pub fn git_repository(&self) -> GitRepository {
6785        let query = self.selection.select("gitRepository");
6786        GitRepository {
6787            proc: self.proc.clone(),
6788            selection: query,
6789            graphql_client: self.graphql_client.clone(),
6790        }
6791    }
6792    /// return the llm message history
6793    pub async fn history(&self) -> Result<Vec<String>, DaggerError> {
6794        let query = self.selection.select("history");
6795        query.execute(self.graphql_client.clone()).await
6796    }
6797    /// return the raw llm message history as json
6798    pub async fn history_json(&self) -> Result<String, DaggerError> {
6799        let query = self.selection.select("historyJSON");
6800        query.execute(self.graphql_client.clone()).await
6801    }
6802    /// A unique identifier for this LLM.
6803    pub async fn id(&self) -> Result<Llmid, DaggerError> {
6804        let query = self.selection.select("id");
6805        query.execute(self.graphql_client.clone()).await
6806    }
6807    /// Retrieve a the current value in the LLM environment, of type InputTypeDef
6808    pub fn input_type_def(&self) -> InputTypeDef {
6809        let query = self.selection.select("inputTypeDef");
6810        InputTypeDef {
6811            proc: self.proc.clone(),
6812            selection: query,
6813            graphql_client: self.graphql_client.clone(),
6814        }
6815    }
6816    /// Retrieve a the current value in the LLM environment, of type InterfaceTypeDef
6817    pub fn interface_type_def(&self) -> InterfaceTypeDef {
6818        let query = self.selection.select("interfaceTypeDef");
6819        InterfaceTypeDef {
6820            proc: self.proc.clone(),
6821            selection: query,
6822            graphql_client: self.graphql_client.clone(),
6823        }
6824    }
6825    /// Retrieve a the current value in the LLM environment, of type LLM
6826    pub fn l_lm(&self) -> Llm {
6827        let query = self.selection.select("lLM");
6828        Llm {
6829            proc: self.proc.clone(),
6830            selection: query,
6831            graphql_client: self.graphql_client.clone(),
6832        }
6833    }
6834    /// return the last llm reply from the history
6835    pub async fn last_reply(&self) -> Result<String, DaggerError> {
6836        let query = self.selection.select("lastReply");
6837        query.execute(self.graphql_client.clone()).await
6838    }
6839    /// Retrieve a the current value in the LLM environment, of type ListTypeDef
6840    pub fn list_type_def(&self) -> ListTypeDef {
6841        let query = self.selection.select("listTypeDef");
6842        ListTypeDef {
6843            proc: self.proc.clone(),
6844            selection: query,
6845            graphql_client: self.graphql_client.clone(),
6846        }
6847    }
6848    /// synchronize LLM state
6849    pub fn r#loop(&self) -> Llm {
6850        let query = self.selection.select("loop");
6851        Llm {
6852            proc: self.proc.clone(),
6853            selection: query,
6854            graphql_client: self.graphql_client.clone(),
6855        }
6856    }
6857    /// return the model used by the llm
6858    pub async fn model(&self) -> Result<String, DaggerError> {
6859        let query = self.selection.select("model");
6860        query.execute(self.graphql_client.clone()).await
6861    }
6862    /// Retrieve a the current value in the LLM environment, of type Module
6863    pub fn module(&self) -> Module {
6864        let query = self.selection.select("module");
6865        Module {
6866            proc: self.proc.clone(),
6867            selection: query,
6868            graphql_client: self.graphql_client.clone(),
6869        }
6870    }
6871    /// Retrieve a the current value in the LLM environment, of type ModuleConfigClient
6872    pub fn module_config_client(&self) -> ModuleConfigClient {
6873        let query = self.selection.select("moduleConfigClient");
6874        ModuleConfigClient {
6875            proc: self.proc.clone(),
6876            selection: query,
6877            graphql_client: self.graphql_client.clone(),
6878        }
6879    }
6880    /// Retrieve a the current value in the LLM environment, of type ModuleSource
6881    pub fn module_source(&self) -> ModuleSource {
6882        let query = self.selection.select("moduleSource");
6883        ModuleSource {
6884            proc: self.proc.clone(),
6885            selection: query,
6886            graphql_client: self.graphql_client.clone(),
6887        }
6888    }
6889    /// Retrieve a the current value in the LLM environment, of type ObjectTypeDef
6890    pub fn object_type_def(&self) -> ObjectTypeDef {
6891        let query = self.selection.select("objectTypeDef");
6892        ObjectTypeDef {
6893            proc: self.proc.clone(),
6894            selection: query,
6895            graphql_client: self.graphql_client.clone(),
6896        }
6897    }
6898    /// return the provider used by the llm
6899    pub async fn provider(&self) -> Result<String, DaggerError> {
6900        let query = self.selection.select("provider");
6901        query.execute(self.graphql_client.clone()).await
6902    }
6903    /// Retrieve a the current value in the LLM environment, of type ScalarTypeDef
6904    pub fn scalar_type_def(&self) -> ScalarTypeDef {
6905        let query = self.selection.select("scalarTypeDef");
6906        ScalarTypeDef {
6907            proc: self.proc.clone(),
6908            selection: query,
6909            graphql_client: self.graphql_client.clone(),
6910        }
6911    }
6912    /// Retrieve a the current value in the LLM environment, of type SDKConfig
6913    pub fn sdkconfig(&self) -> SdkConfig {
6914        let query = self.selection.select("sdkconfig");
6915        SdkConfig {
6916            proc: self.proc.clone(),
6917            selection: query,
6918            graphql_client: self.graphql_client.clone(),
6919        }
6920    }
6921    /// Retrieve a the current value in the LLM environment, of type Secret
6922    pub fn secret(&self) -> Secret {
6923        let query = self.selection.select("secret");
6924        Secret {
6925            proc: self.proc.clone(),
6926            selection: query,
6927            graphql_client: self.graphql_client.clone(),
6928        }
6929    }
6930    /// Retrieve a the current value in the LLM environment, of type Service
6931    pub fn service(&self) -> Service {
6932        let query = self.selection.select("service");
6933        Service {
6934            proc: self.proc.clone(),
6935            selection: query,
6936            graphql_client: self.graphql_client.clone(),
6937        }
6938    }
6939    /// Set a variable of type CacheVolume in the llm environment
6940    ///
6941    /// # Arguments
6942    ///
6943    /// * `name` - The name of the variable
6944    /// * `value` - The CacheVolume value to assign to the variable
6945    pub fn set_cache_volume(
6946        &self,
6947        name: impl Into<String>,
6948        value: impl IntoID<CacheVolumeId>,
6949    ) -> Llm {
6950        let mut query = self.selection.select("setCacheVolume");
6951        query = query.arg("name", name.into());
6952        query = query.arg_lazy(
6953            "value",
6954            Box::new(move || {
6955                let value = value.clone();
6956                Box::pin(async move { value.into_id().await.unwrap().quote() })
6957            }),
6958        );
6959        Llm {
6960            proc: self.proc.clone(),
6961            selection: query,
6962            graphql_client: self.graphql_client.clone(),
6963        }
6964    }
6965    /// Set a variable of type Container in the llm environment
6966    ///
6967    /// # Arguments
6968    ///
6969    /// * `name` - The name of the variable
6970    /// * `value` - The Container value to assign to the variable
6971    pub fn set_container(&self, name: impl Into<String>, value: impl IntoID<ContainerId>) -> Llm {
6972        let mut query = self.selection.select("setContainer");
6973        query = query.arg("name", name.into());
6974        query = query.arg_lazy(
6975            "value",
6976            Box::new(move || {
6977                let value = value.clone();
6978                Box::pin(async move { value.into_id().await.unwrap().quote() })
6979            }),
6980        );
6981        Llm {
6982            proc: self.proc.clone(),
6983            selection: query,
6984            graphql_client: self.graphql_client.clone(),
6985        }
6986    }
6987    /// Set a variable of type CurrentModule in the llm environment
6988    ///
6989    /// # Arguments
6990    ///
6991    /// * `name` - The name of the variable
6992    /// * `value` - The CurrentModule value to assign to the variable
6993    pub fn set_current_module(
6994        &self,
6995        name: impl Into<String>,
6996        value: impl IntoID<CurrentModuleId>,
6997    ) -> Llm {
6998        let mut query = self.selection.select("setCurrentModule");
6999        query = query.arg("name", name.into());
7000        query = query.arg_lazy(
7001            "value",
7002            Box::new(move || {
7003                let value = value.clone();
7004                Box::pin(async move { value.into_id().await.unwrap().quote() })
7005            }),
7006        );
7007        Llm {
7008            proc: self.proc.clone(),
7009            selection: query,
7010            graphql_client: self.graphql_client.clone(),
7011        }
7012    }
7013    /// Set a variable of type Directory in the llm environment
7014    ///
7015    /// # Arguments
7016    ///
7017    /// * `name` - The name of the variable
7018    /// * `value` - The Directory value to assign to the variable
7019    pub fn set_directory(&self, name: impl Into<String>, value: impl IntoID<DirectoryId>) -> Llm {
7020        let mut query = self.selection.select("setDirectory");
7021        query = query.arg("name", name.into());
7022        query = query.arg_lazy(
7023            "value",
7024            Box::new(move || {
7025                let value = value.clone();
7026                Box::pin(async move { value.into_id().await.unwrap().quote() })
7027            }),
7028        );
7029        Llm {
7030            proc: self.proc.clone(),
7031            selection: query,
7032            graphql_client: self.graphql_client.clone(),
7033        }
7034    }
7035    /// Set a variable of type EnumTypeDef in the llm environment
7036    ///
7037    /// # Arguments
7038    ///
7039    /// * `name` - The name of the variable
7040    /// * `value` - The EnumTypeDef value to assign to the variable
7041    pub fn set_enum_type_def(
7042        &self,
7043        name: impl Into<String>,
7044        value: impl IntoID<EnumTypeDefId>,
7045    ) -> Llm {
7046        let mut query = self.selection.select("setEnumTypeDef");
7047        query = query.arg("name", name.into());
7048        query = query.arg_lazy(
7049            "value",
7050            Box::new(move || {
7051                let value = value.clone();
7052                Box::pin(async move { value.into_id().await.unwrap().quote() })
7053            }),
7054        );
7055        Llm {
7056            proc: self.proc.clone(),
7057            selection: query,
7058            graphql_client: self.graphql_client.clone(),
7059        }
7060    }
7061    /// Set a variable of type EnumValueTypeDef in the llm environment
7062    ///
7063    /// # Arguments
7064    ///
7065    /// * `name` - The name of the variable
7066    /// * `value` - The EnumValueTypeDef value to assign to the variable
7067    pub fn set_enum_value_type_def(
7068        &self,
7069        name: impl Into<String>,
7070        value: impl IntoID<EnumValueTypeDefId>,
7071    ) -> Llm {
7072        let mut query = self.selection.select("setEnumValueTypeDef");
7073        query = query.arg("name", name.into());
7074        query = query.arg_lazy(
7075            "value",
7076            Box::new(move || {
7077                let value = value.clone();
7078                Box::pin(async move { value.into_id().await.unwrap().quote() })
7079            }),
7080        );
7081        Llm {
7082            proc: self.proc.clone(),
7083            selection: query,
7084            graphql_client: self.graphql_client.clone(),
7085        }
7086    }
7087    /// Set a variable of type Error in the llm environment
7088    ///
7089    /// # Arguments
7090    ///
7091    /// * `name` - The name of the variable
7092    /// * `value` - The Error value to assign to the variable
7093    pub fn set_error(&self, name: impl Into<String>, value: impl IntoID<ErrorId>) -> Llm {
7094        let mut query = self.selection.select("setError");
7095        query = query.arg("name", name.into());
7096        query = query.arg_lazy(
7097            "value",
7098            Box::new(move || {
7099                let value = value.clone();
7100                Box::pin(async move { value.into_id().await.unwrap().quote() })
7101            }),
7102        );
7103        Llm {
7104            proc: self.proc.clone(),
7105            selection: query,
7106            graphql_client: self.graphql_client.clone(),
7107        }
7108    }
7109    /// Set a variable of type ErrorValue in the llm environment
7110    ///
7111    /// # Arguments
7112    ///
7113    /// * `name` - The name of the variable
7114    /// * `value` - The ErrorValue value to assign to the variable
7115    pub fn set_error_value(
7116        &self,
7117        name: impl Into<String>,
7118        value: impl IntoID<ErrorValueId>,
7119    ) -> Llm {
7120        let mut query = self.selection.select("setErrorValue");
7121        query = query.arg("name", name.into());
7122        query = query.arg_lazy(
7123            "value",
7124            Box::new(move || {
7125                let value = value.clone();
7126                Box::pin(async move { value.into_id().await.unwrap().quote() })
7127            }),
7128        );
7129        Llm {
7130            proc: self.proc.clone(),
7131            selection: query,
7132            graphql_client: self.graphql_client.clone(),
7133        }
7134    }
7135    /// Set a variable of type FieldTypeDef in the llm environment
7136    ///
7137    /// # Arguments
7138    ///
7139    /// * `name` - The name of the variable
7140    /// * `value` - The FieldTypeDef value to assign to the variable
7141    pub fn set_field_type_def(
7142        &self,
7143        name: impl Into<String>,
7144        value: impl IntoID<FieldTypeDefId>,
7145    ) -> Llm {
7146        let mut query = self.selection.select("setFieldTypeDef");
7147        query = query.arg("name", name.into());
7148        query = query.arg_lazy(
7149            "value",
7150            Box::new(move || {
7151                let value = value.clone();
7152                Box::pin(async move { value.into_id().await.unwrap().quote() })
7153            }),
7154        );
7155        Llm {
7156            proc: self.proc.clone(),
7157            selection: query,
7158            graphql_client: self.graphql_client.clone(),
7159        }
7160    }
7161    /// Set a variable of type File in the llm environment
7162    ///
7163    /// # Arguments
7164    ///
7165    /// * `name` - The name of the variable
7166    /// * `value` - The File value to assign to the variable
7167    pub fn set_file(&self, name: impl Into<String>, value: impl IntoID<FileId>) -> Llm {
7168        let mut query = self.selection.select("setFile");
7169        query = query.arg("name", name.into());
7170        query = query.arg_lazy(
7171            "value",
7172            Box::new(move || {
7173                let value = value.clone();
7174                Box::pin(async move { value.into_id().await.unwrap().quote() })
7175            }),
7176        );
7177        Llm {
7178            proc: self.proc.clone(),
7179            selection: query,
7180            graphql_client: self.graphql_client.clone(),
7181        }
7182    }
7183    /// Set a variable of type Function in the llm environment
7184    ///
7185    /// # Arguments
7186    ///
7187    /// * `name` - The name of the variable
7188    /// * `value` - The Function value to assign to the variable
7189    pub fn set_function(&self, name: impl Into<String>, value: impl IntoID<FunctionId>) -> Llm {
7190        let mut query = self.selection.select("setFunction");
7191        query = query.arg("name", name.into());
7192        query = query.arg_lazy(
7193            "value",
7194            Box::new(move || {
7195                let value = value.clone();
7196                Box::pin(async move { value.into_id().await.unwrap().quote() })
7197            }),
7198        );
7199        Llm {
7200            proc: self.proc.clone(),
7201            selection: query,
7202            graphql_client: self.graphql_client.clone(),
7203        }
7204    }
7205    /// Set a variable of type FunctionArg in the llm environment
7206    ///
7207    /// # Arguments
7208    ///
7209    /// * `name` - The name of the variable
7210    /// * `value` - The FunctionArg value to assign to the variable
7211    pub fn set_function_arg(
7212        &self,
7213        name: impl Into<String>,
7214        value: impl IntoID<FunctionArgId>,
7215    ) -> Llm {
7216        let mut query = self.selection.select("setFunctionArg");
7217        query = query.arg("name", name.into());
7218        query = query.arg_lazy(
7219            "value",
7220            Box::new(move || {
7221                let value = value.clone();
7222                Box::pin(async move { value.into_id().await.unwrap().quote() })
7223            }),
7224        );
7225        Llm {
7226            proc: self.proc.clone(),
7227            selection: query,
7228            graphql_client: self.graphql_client.clone(),
7229        }
7230    }
7231    /// Set a variable of type FunctionCall in the llm environment
7232    ///
7233    /// # Arguments
7234    ///
7235    /// * `name` - The name of the variable
7236    /// * `value` - The FunctionCall value to assign to the variable
7237    pub fn set_function_call(
7238        &self,
7239        name: impl Into<String>,
7240        value: impl IntoID<FunctionCallId>,
7241    ) -> Llm {
7242        let mut query = self.selection.select("setFunctionCall");
7243        query = query.arg("name", name.into());
7244        query = query.arg_lazy(
7245            "value",
7246            Box::new(move || {
7247                let value = value.clone();
7248                Box::pin(async move { value.into_id().await.unwrap().quote() })
7249            }),
7250        );
7251        Llm {
7252            proc: self.proc.clone(),
7253            selection: query,
7254            graphql_client: self.graphql_client.clone(),
7255        }
7256    }
7257    /// Set a variable of type FunctionCallArgValue in the llm environment
7258    ///
7259    /// # Arguments
7260    ///
7261    /// * `name` - The name of the variable
7262    /// * `value` - The FunctionCallArgValue value to assign to the variable
7263    pub fn set_function_call_arg_value(
7264        &self,
7265        name: impl Into<String>,
7266        value: impl IntoID<FunctionCallArgValueId>,
7267    ) -> Llm {
7268        let mut query = self.selection.select("setFunctionCallArgValue");
7269        query = query.arg("name", name.into());
7270        query = query.arg_lazy(
7271            "value",
7272            Box::new(move || {
7273                let value = value.clone();
7274                Box::pin(async move { value.into_id().await.unwrap().quote() })
7275            }),
7276        );
7277        Llm {
7278            proc: self.proc.clone(),
7279            selection: query,
7280            graphql_client: self.graphql_client.clone(),
7281        }
7282    }
7283    /// Set a variable of type GeneratedCode in the llm environment
7284    ///
7285    /// # Arguments
7286    ///
7287    /// * `name` - The name of the variable
7288    /// * `value` - The GeneratedCode value to assign to the variable
7289    pub fn set_generated_code(
7290        &self,
7291        name: impl Into<String>,
7292        value: impl IntoID<GeneratedCodeId>,
7293    ) -> Llm {
7294        let mut query = self.selection.select("setGeneratedCode");
7295        query = query.arg("name", name.into());
7296        query = query.arg_lazy(
7297            "value",
7298            Box::new(move || {
7299                let value = value.clone();
7300                Box::pin(async move { value.into_id().await.unwrap().quote() })
7301            }),
7302        );
7303        Llm {
7304            proc: self.proc.clone(),
7305            selection: query,
7306            graphql_client: self.graphql_client.clone(),
7307        }
7308    }
7309    /// Set a variable of type GitRef in the llm environment
7310    ///
7311    /// # Arguments
7312    ///
7313    /// * `name` - The name of the variable
7314    /// * `value` - The GitRef value to assign to the variable
7315    pub fn set_git_ref(&self, name: impl Into<String>, value: impl IntoID<GitRefId>) -> Llm {
7316        let mut query = self.selection.select("setGitRef");
7317        query = query.arg("name", name.into());
7318        query = query.arg_lazy(
7319            "value",
7320            Box::new(move || {
7321                let value = value.clone();
7322                Box::pin(async move { value.into_id().await.unwrap().quote() })
7323            }),
7324        );
7325        Llm {
7326            proc: self.proc.clone(),
7327            selection: query,
7328            graphql_client: self.graphql_client.clone(),
7329        }
7330    }
7331    /// Set a variable of type GitRepository in the llm environment
7332    ///
7333    /// # Arguments
7334    ///
7335    /// * `name` - The name of the variable
7336    /// * `value` - The GitRepository value to assign to the variable
7337    pub fn set_git_repository(
7338        &self,
7339        name: impl Into<String>,
7340        value: impl IntoID<GitRepositoryId>,
7341    ) -> Llm {
7342        let mut query = self.selection.select("setGitRepository");
7343        query = query.arg("name", name.into());
7344        query = query.arg_lazy(
7345            "value",
7346            Box::new(move || {
7347                let value = value.clone();
7348                Box::pin(async move { value.into_id().await.unwrap().quote() })
7349            }),
7350        );
7351        Llm {
7352            proc: self.proc.clone(),
7353            selection: query,
7354            graphql_client: self.graphql_client.clone(),
7355        }
7356    }
7357    /// Set a variable of type InputTypeDef in the llm environment
7358    ///
7359    /// # Arguments
7360    ///
7361    /// * `name` - The name of the variable
7362    /// * `value` - The InputTypeDef value to assign to the variable
7363    pub fn set_input_type_def(
7364        &self,
7365        name: impl Into<String>,
7366        value: impl IntoID<InputTypeDefId>,
7367    ) -> Llm {
7368        let mut query = self.selection.select("setInputTypeDef");
7369        query = query.arg("name", name.into());
7370        query = query.arg_lazy(
7371            "value",
7372            Box::new(move || {
7373                let value = value.clone();
7374                Box::pin(async move { value.into_id().await.unwrap().quote() })
7375            }),
7376        );
7377        Llm {
7378            proc: self.proc.clone(),
7379            selection: query,
7380            graphql_client: self.graphql_client.clone(),
7381        }
7382    }
7383    /// Set a variable of type InterfaceTypeDef in the llm environment
7384    ///
7385    /// # Arguments
7386    ///
7387    /// * `name` - The name of the variable
7388    /// * `value` - The InterfaceTypeDef value to assign to the variable
7389    pub fn set_interface_type_def(
7390        &self,
7391        name: impl Into<String>,
7392        value: impl IntoID<InterfaceTypeDefId>,
7393    ) -> Llm {
7394        let mut query = self.selection.select("setInterfaceTypeDef");
7395        query = query.arg("name", name.into());
7396        query = query.arg_lazy(
7397            "value",
7398            Box::new(move || {
7399                let value = value.clone();
7400                Box::pin(async move { value.into_id().await.unwrap().quote() })
7401            }),
7402        );
7403        Llm {
7404            proc: self.proc.clone(),
7405            selection: query,
7406            graphql_client: self.graphql_client.clone(),
7407        }
7408    }
7409    /// Set a variable of type LLM in the llm environment
7410    ///
7411    /// # Arguments
7412    ///
7413    /// * `name` - The name of the variable
7414    /// * `value` - The LLM value to assign to the variable
7415    pub fn set_llm(&self, name: impl Into<String>, value: impl IntoID<Llmid>) -> Llm {
7416        let mut query = self.selection.select("setLLM");
7417        query = query.arg("name", name.into());
7418        query = query.arg_lazy(
7419            "value",
7420            Box::new(move || {
7421                let value = value.clone();
7422                Box::pin(async move { value.into_id().await.unwrap().quote() })
7423            }),
7424        );
7425        Llm {
7426            proc: self.proc.clone(),
7427            selection: query,
7428            graphql_client: self.graphql_client.clone(),
7429        }
7430    }
7431    /// Set a variable of type ListTypeDef in the llm environment
7432    ///
7433    /// # Arguments
7434    ///
7435    /// * `name` - The name of the variable
7436    /// * `value` - The ListTypeDef value to assign to the variable
7437    pub fn set_list_type_def(
7438        &self,
7439        name: impl Into<String>,
7440        value: impl IntoID<ListTypeDefId>,
7441    ) -> Llm {
7442        let mut query = self.selection.select("setListTypeDef");
7443        query = query.arg("name", name.into());
7444        query = query.arg_lazy(
7445            "value",
7446            Box::new(move || {
7447                let value = value.clone();
7448                Box::pin(async move { value.into_id().await.unwrap().quote() })
7449            }),
7450        );
7451        Llm {
7452            proc: self.proc.clone(),
7453            selection: query,
7454            graphql_client: self.graphql_client.clone(),
7455        }
7456    }
7457    /// Set a variable of type Module in the llm environment
7458    ///
7459    /// # Arguments
7460    ///
7461    /// * `name` - The name of the variable
7462    /// * `value` - The Module value to assign to the variable
7463    pub fn set_module(&self, name: impl Into<String>, value: impl IntoID<ModuleId>) -> Llm {
7464        let mut query = self.selection.select("setModule");
7465        query = query.arg("name", name.into());
7466        query = query.arg_lazy(
7467            "value",
7468            Box::new(move || {
7469                let value = value.clone();
7470                Box::pin(async move { value.into_id().await.unwrap().quote() })
7471            }),
7472        );
7473        Llm {
7474            proc: self.proc.clone(),
7475            selection: query,
7476            graphql_client: self.graphql_client.clone(),
7477        }
7478    }
7479    /// Set a variable of type ModuleConfigClient in the llm environment
7480    ///
7481    /// # Arguments
7482    ///
7483    /// * `name` - The name of the variable
7484    /// * `value` - The ModuleConfigClient value to assign to the variable
7485    pub fn set_module_config_client(
7486        &self,
7487        name: impl Into<String>,
7488        value: impl IntoID<ModuleConfigClientId>,
7489    ) -> Llm {
7490        let mut query = self.selection.select("setModuleConfigClient");
7491        query = query.arg("name", name.into());
7492        query = query.arg_lazy(
7493            "value",
7494            Box::new(move || {
7495                let value = value.clone();
7496                Box::pin(async move { value.into_id().await.unwrap().quote() })
7497            }),
7498        );
7499        Llm {
7500            proc: self.proc.clone(),
7501            selection: query,
7502            graphql_client: self.graphql_client.clone(),
7503        }
7504    }
7505    /// Set a variable of type ModuleSource in the llm environment
7506    ///
7507    /// # Arguments
7508    ///
7509    /// * `name` - The name of the variable
7510    /// * `value` - The ModuleSource value to assign to the variable
7511    pub fn set_module_source(
7512        &self,
7513        name: impl Into<String>,
7514        value: impl IntoID<ModuleSourceId>,
7515    ) -> Llm {
7516        let mut query = self.selection.select("setModuleSource");
7517        query = query.arg("name", name.into());
7518        query = query.arg_lazy(
7519            "value",
7520            Box::new(move || {
7521                let value = value.clone();
7522                Box::pin(async move { value.into_id().await.unwrap().quote() })
7523            }),
7524        );
7525        Llm {
7526            proc: self.proc.clone(),
7527            selection: query,
7528            graphql_client: self.graphql_client.clone(),
7529        }
7530    }
7531    /// Set a variable of type ObjectTypeDef in the llm environment
7532    ///
7533    /// # Arguments
7534    ///
7535    /// * `name` - The name of the variable
7536    /// * `value` - The ObjectTypeDef value to assign to the variable
7537    pub fn set_object_type_def(
7538        &self,
7539        name: impl Into<String>,
7540        value: impl IntoID<ObjectTypeDefId>,
7541    ) -> Llm {
7542        let mut query = self.selection.select("setObjectTypeDef");
7543        query = query.arg("name", name.into());
7544        query = query.arg_lazy(
7545            "value",
7546            Box::new(move || {
7547                let value = value.clone();
7548                Box::pin(async move { value.into_id().await.unwrap().quote() })
7549            }),
7550        );
7551        Llm {
7552            proc: self.proc.clone(),
7553            selection: query,
7554            graphql_client: self.graphql_client.clone(),
7555        }
7556    }
7557    /// Set a variable of type SDKConfig in the llm environment
7558    ///
7559    /// # Arguments
7560    ///
7561    /// * `name` - The name of the variable
7562    /// * `value` - The SDKConfig value to assign to the variable
7563    pub fn set_sdk_config(&self, name: impl Into<String>, value: impl IntoID<SdkConfigId>) -> Llm {
7564        let mut query = self.selection.select("setSDKConfig");
7565        query = query.arg("name", name.into());
7566        query = query.arg_lazy(
7567            "value",
7568            Box::new(move || {
7569                let value = value.clone();
7570                Box::pin(async move { value.into_id().await.unwrap().quote() })
7571            }),
7572        );
7573        Llm {
7574            proc: self.proc.clone(),
7575            selection: query,
7576            graphql_client: self.graphql_client.clone(),
7577        }
7578    }
7579    /// Set a variable of type ScalarTypeDef in the llm environment
7580    ///
7581    /// # Arguments
7582    ///
7583    /// * `name` - The name of the variable
7584    /// * `value` - The ScalarTypeDef value to assign to the variable
7585    pub fn set_scalar_type_def(
7586        &self,
7587        name: impl Into<String>,
7588        value: impl IntoID<ScalarTypeDefId>,
7589    ) -> Llm {
7590        let mut query = self.selection.select("setScalarTypeDef");
7591        query = query.arg("name", name.into());
7592        query = query.arg_lazy(
7593            "value",
7594            Box::new(move || {
7595                let value = value.clone();
7596                Box::pin(async move { value.into_id().await.unwrap().quote() })
7597            }),
7598        );
7599        Llm {
7600            proc: self.proc.clone(),
7601            selection: query,
7602            graphql_client: self.graphql_client.clone(),
7603        }
7604    }
7605    /// Set a variable of type Secret in the llm environment
7606    ///
7607    /// # Arguments
7608    ///
7609    /// * `name` - The name of the variable
7610    /// * `value` - The Secret value to assign to the variable
7611    pub fn set_secret(&self, name: impl Into<String>, value: impl IntoID<SecretId>) -> Llm {
7612        let mut query = self.selection.select("setSecret");
7613        query = query.arg("name", name.into());
7614        query = query.arg_lazy(
7615            "value",
7616            Box::new(move || {
7617                let value = value.clone();
7618                Box::pin(async move { value.into_id().await.unwrap().quote() })
7619            }),
7620        );
7621        Llm {
7622            proc: self.proc.clone(),
7623            selection: query,
7624            graphql_client: self.graphql_client.clone(),
7625        }
7626    }
7627    /// Set a variable of type Service in the llm environment
7628    ///
7629    /// # Arguments
7630    ///
7631    /// * `name` - The name of the variable
7632    /// * `value` - The Service value to assign to the variable
7633    pub fn set_service(&self, name: impl Into<String>, value: impl IntoID<ServiceId>) -> Llm {
7634        let mut query = self.selection.select("setService");
7635        query = query.arg("name", name.into());
7636        query = query.arg_lazy(
7637            "value",
7638            Box::new(move || {
7639                let value = value.clone();
7640                Box::pin(async move { value.into_id().await.unwrap().quote() })
7641            }),
7642        );
7643        Llm {
7644            proc: self.proc.clone(),
7645            selection: query,
7646            graphql_client: self.graphql_client.clone(),
7647        }
7648    }
7649    /// Set a variable of type Socket in the llm environment
7650    ///
7651    /// # Arguments
7652    ///
7653    /// * `name` - The name of the variable
7654    /// * `value` - The Socket value to assign to the variable
7655    pub fn set_socket(&self, name: impl Into<String>, value: impl IntoID<SocketId>) -> Llm {
7656        let mut query = self.selection.select("setSocket");
7657        query = query.arg("name", name.into());
7658        query = query.arg_lazy(
7659            "value",
7660            Box::new(move || {
7661                let value = value.clone();
7662                Box::pin(async move { value.into_id().await.unwrap().quote() })
7663            }),
7664        );
7665        Llm {
7666            proc: self.proc.clone(),
7667            selection: query,
7668            graphql_client: self.graphql_client.clone(),
7669        }
7670    }
7671    /// Set a variable of type SourceMap in the llm environment
7672    ///
7673    /// # Arguments
7674    ///
7675    /// * `name` - The name of the variable
7676    /// * `value` - The SourceMap value to assign to the variable
7677    pub fn set_source_map(&self, name: impl Into<String>, value: impl IntoID<SourceMapId>) -> Llm {
7678        let mut query = self.selection.select("setSourceMap");
7679        query = query.arg("name", name.into());
7680        query = query.arg_lazy(
7681            "value",
7682            Box::new(move || {
7683                let value = value.clone();
7684                Box::pin(async move { value.into_id().await.unwrap().quote() })
7685            }),
7686        );
7687        Llm {
7688            proc: self.proc.clone(),
7689            selection: query,
7690            graphql_client: self.graphql_client.clone(),
7691        }
7692    }
7693    /// Add a string variable to the LLM's environment
7694    ///
7695    /// # Arguments
7696    ///
7697    /// * `name` - The variable name
7698    /// * `value` - The variable value
7699    pub fn set_string(&self, name: impl Into<String>, value: impl Into<String>) -> Llm {
7700        let mut query = self.selection.select("setString");
7701        query = query.arg("name", name.into());
7702        query = query.arg("value", value.into());
7703        Llm {
7704            proc: self.proc.clone(),
7705            selection: query,
7706            graphql_client: self.graphql_client.clone(),
7707        }
7708    }
7709    /// Set a variable of type Terminal in the llm environment
7710    ///
7711    /// # Arguments
7712    ///
7713    /// * `name` - The name of the variable
7714    /// * `value` - The Terminal value to assign to the variable
7715    pub fn set_terminal(&self, name: impl Into<String>, value: impl IntoID<TerminalId>) -> Llm {
7716        let mut query = self.selection.select("setTerminal");
7717        query = query.arg("name", name.into());
7718        query = query.arg_lazy(
7719            "value",
7720            Box::new(move || {
7721                let value = value.clone();
7722                Box::pin(async move { value.into_id().await.unwrap().quote() })
7723            }),
7724        );
7725        Llm {
7726            proc: self.proc.clone(),
7727            selection: query,
7728            graphql_client: self.graphql_client.clone(),
7729        }
7730    }
7731    /// Set a variable of type TypeDef in the llm environment
7732    ///
7733    /// # Arguments
7734    ///
7735    /// * `name` - The name of the variable
7736    /// * `value` - The TypeDef value to assign to the variable
7737    pub fn set_type_def(&self, name: impl Into<String>, value: impl IntoID<TypeDefId>) -> Llm {
7738        let mut query = self.selection.select("setTypeDef");
7739        query = query.arg("name", name.into());
7740        query = query.arg_lazy(
7741            "value",
7742            Box::new(move || {
7743                let value = value.clone();
7744                Box::pin(async move { value.into_id().await.unwrap().quote() })
7745            }),
7746        );
7747        Llm {
7748            proc: self.proc.clone(),
7749            selection: query,
7750            graphql_client: self.graphql_client.clone(),
7751        }
7752    }
7753    /// Retrieve a the current value in the LLM environment, of type Socket
7754    pub fn socket(&self) -> Socket {
7755        let query = self.selection.select("socket");
7756        Socket {
7757            proc: self.proc.clone(),
7758            selection: query,
7759            graphql_client: self.graphql_client.clone(),
7760        }
7761    }
7762    /// Retrieve a the current value in the LLM environment, of type SourceMap
7763    pub fn source_map(&self) -> SourceMap {
7764        let query = self.selection.select("sourceMap");
7765        SourceMap {
7766            proc: self.proc.clone(),
7767            selection: query,
7768            graphql_client: self.graphql_client.clone(),
7769        }
7770    }
7771    /// synchronize LLM state
7772    pub async fn sync(&self) -> Result<Llmid, DaggerError> {
7773        let query = self.selection.select("sync");
7774        query.execute(self.graphql_client.clone()).await
7775    }
7776    /// Retrieve a the current value in the LLM environment, of type Terminal
7777    pub fn terminal(&self) -> Terminal {
7778        let query = self.selection.select("terminal");
7779        Terminal {
7780            proc: self.proc.clone(),
7781            selection: query,
7782            graphql_client: self.graphql_client.clone(),
7783        }
7784    }
7785    /// returns the token usage of the current state
7786    pub fn token_usage(&self) -> LlmTokenUsage {
7787        let query = self.selection.select("tokenUsage");
7788        LlmTokenUsage {
7789            proc: self.proc.clone(),
7790            selection: query,
7791            graphql_client: self.graphql_client.clone(),
7792        }
7793    }
7794    /// print documentation for available tools
7795    pub async fn tools(&self) -> Result<String, DaggerError> {
7796        let query = self.selection.select("tools");
7797        query.execute(self.graphql_client.clone()).await
7798    }
7799    /// Retrieve a the current value in the LLM environment, of type TypeDef
7800    pub fn type_def(&self) -> TypeDef {
7801        let query = self.selection.select("typeDef");
7802        TypeDef {
7803            proc: self.proc.clone(),
7804            selection: query,
7805            graphql_client: self.graphql_client.clone(),
7806        }
7807    }
7808    /// list variables in the LLM environment
7809    pub fn variables(&self) -> Vec<LlmVariable> {
7810        let query = self.selection.select("variables");
7811        vec![LlmVariable {
7812            proc: self.proc.clone(),
7813            selection: query,
7814            graphql_client: self.graphql_client.clone(),
7815        }]
7816    }
7817    /// Set a variable of type CacheVolume in the llm environment
7818    ///
7819    /// # Arguments
7820    ///
7821    /// * `value` - The CacheVolume value to assign to the variable
7822    pub fn with_cache_volume(&self, value: impl IntoID<CacheVolumeId>) -> Llm {
7823        let mut query = self.selection.select("withCacheVolume");
7824        query = query.arg_lazy(
7825            "value",
7826            Box::new(move || {
7827                let value = value.clone();
7828                Box::pin(async move { value.into_id().await.unwrap().quote() })
7829            }),
7830        );
7831        Llm {
7832            proc: self.proc.clone(),
7833            selection: query,
7834            graphql_client: self.graphql_client.clone(),
7835        }
7836    }
7837    /// Set a variable of type Container in the llm environment
7838    ///
7839    /// # Arguments
7840    ///
7841    /// * `value` - The Container value to assign to the variable
7842    pub fn with_container(&self, value: impl IntoID<ContainerId>) -> Llm {
7843        let mut query = self.selection.select("withContainer");
7844        query = query.arg_lazy(
7845            "value",
7846            Box::new(move || {
7847                let value = value.clone();
7848                Box::pin(async move { value.into_id().await.unwrap().quote() })
7849            }),
7850        );
7851        Llm {
7852            proc: self.proc.clone(),
7853            selection: query,
7854            graphql_client: self.graphql_client.clone(),
7855        }
7856    }
7857    /// Set a variable of type CurrentModule in the llm environment
7858    ///
7859    /// # Arguments
7860    ///
7861    /// * `value` - The CurrentModule value to assign to the variable
7862    pub fn with_current_module(&self, value: impl IntoID<CurrentModuleId>) -> Llm {
7863        let mut query = self.selection.select("withCurrentModule");
7864        query = query.arg_lazy(
7865            "value",
7866            Box::new(move || {
7867                let value = value.clone();
7868                Box::pin(async move { value.into_id().await.unwrap().quote() })
7869            }),
7870        );
7871        Llm {
7872            proc: self.proc.clone(),
7873            selection: query,
7874            graphql_client: self.graphql_client.clone(),
7875        }
7876    }
7877    /// Set a variable of type Directory in the llm environment
7878    ///
7879    /// # Arguments
7880    ///
7881    /// * `value` - The Directory value to assign to the variable
7882    pub fn with_directory(&self, value: impl IntoID<DirectoryId>) -> Llm {
7883        let mut query = self.selection.select("withDirectory");
7884        query = query.arg_lazy(
7885            "value",
7886            Box::new(move || {
7887                let value = value.clone();
7888                Box::pin(async move { value.into_id().await.unwrap().quote() })
7889            }),
7890        );
7891        Llm {
7892            proc: self.proc.clone(),
7893            selection: query,
7894            graphql_client: self.graphql_client.clone(),
7895        }
7896    }
7897    /// Set a variable of type EnumTypeDef in the llm environment
7898    ///
7899    /// # Arguments
7900    ///
7901    /// * `value` - The EnumTypeDef value to assign to the variable
7902    pub fn with_enum_type_def(&self, value: impl IntoID<EnumTypeDefId>) -> Llm {
7903        let mut query = self.selection.select("withEnumTypeDef");
7904        query = query.arg_lazy(
7905            "value",
7906            Box::new(move || {
7907                let value = value.clone();
7908                Box::pin(async move { value.into_id().await.unwrap().quote() })
7909            }),
7910        );
7911        Llm {
7912            proc: self.proc.clone(),
7913            selection: query,
7914            graphql_client: self.graphql_client.clone(),
7915        }
7916    }
7917    /// Set a variable of type EnumValueTypeDef in the llm environment
7918    ///
7919    /// # Arguments
7920    ///
7921    /// * `value` - The EnumValueTypeDef value to assign to the variable
7922    pub fn with_enum_value_type_def(&self, value: impl IntoID<EnumValueTypeDefId>) -> Llm {
7923        let mut query = self.selection.select("withEnumValueTypeDef");
7924        query = query.arg_lazy(
7925            "value",
7926            Box::new(move || {
7927                let value = value.clone();
7928                Box::pin(async move { value.into_id().await.unwrap().quote() })
7929            }),
7930        );
7931        Llm {
7932            proc: self.proc.clone(),
7933            selection: query,
7934            graphql_client: self.graphql_client.clone(),
7935        }
7936    }
7937    /// Set a variable of type Error in the llm environment
7938    ///
7939    /// # Arguments
7940    ///
7941    /// * `value` - The Error value to assign to the variable
7942    pub fn with_error(&self, value: impl IntoID<ErrorId>) -> Llm {
7943        let mut query = self.selection.select("withError");
7944        query = query.arg_lazy(
7945            "value",
7946            Box::new(move || {
7947                let value = value.clone();
7948                Box::pin(async move { value.into_id().await.unwrap().quote() })
7949            }),
7950        );
7951        Llm {
7952            proc: self.proc.clone(),
7953            selection: query,
7954            graphql_client: self.graphql_client.clone(),
7955        }
7956    }
7957    /// Set a variable of type ErrorValue in the llm environment
7958    ///
7959    /// # Arguments
7960    ///
7961    /// * `value` - The ErrorValue value to assign to the variable
7962    pub fn with_error_value(&self, value: impl IntoID<ErrorValueId>) -> Llm {
7963        let mut query = self.selection.select("withErrorValue");
7964        query = query.arg_lazy(
7965            "value",
7966            Box::new(move || {
7967                let value = value.clone();
7968                Box::pin(async move { value.into_id().await.unwrap().quote() })
7969            }),
7970        );
7971        Llm {
7972            proc: self.proc.clone(),
7973            selection: query,
7974            graphql_client: self.graphql_client.clone(),
7975        }
7976    }
7977    /// Set a variable of type FieldTypeDef in the llm environment
7978    ///
7979    /// # Arguments
7980    ///
7981    /// * `value` - The FieldTypeDef value to assign to the variable
7982    pub fn with_field_type_def(&self, value: impl IntoID<FieldTypeDefId>) -> Llm {
7983        let mut query = self.selection.select("withFieldTypeDef");
7984        query = query.arg_lazy(
7985            "value",
7986            Box::new(move || {
7987                let value = value.clone();
7988                Box::pin(async move { value.into_id().await.unwrap().quote() })
7989            }),
7990        );
7991        Llm {
7992            proc: self.proc.clone(),
7993            selection: query,
7994            graphql_client: self.graphql_client.clone(),
7995        }
7996    }
7997    /// Set a variable of type File in the llm environment
7998    ///
7999    /// # Arguments
8000    ///
8001    /// * `value` - The File value to assign to the variable
8002    pub fn with_file(&self, value: impl IntoID<FileId>) -> Llm {
8003        let mut query = self.selection.select("withFile");
8004        query = query.arg_lazy(
8005            "value",
8006            Box::new(move || {
8007                let value = value.clone();
8008                Box::pin(async move { value.into_id().await.unwrap().quote() })
8009            }),
8010        );
8011        Llm {
8012            proc: self.proc.clone(),
8013            selection: query,
8014            graphql_client: self.graphql_client.clone(),
8015        }
8016    }
8017    /// Set a variable of type Function in the llm environment
8018    ///
8019    /// # Arguments
8020    ///
8021    /// * `value` - The Function value to assign to the variable
8022    pub fn with_function(&self, value: impl IntoID<FunctionId>) -> Llm {
8023        let mut query = self.selection.select("withFunction");
8024        query = query.arg_lazy(
8025            "value",
8026            Box::new(move || {
8027                let value = value.clone();
8028                Box::pin(async move { value.into_id().await.unwrap().quote() })
8029            }),
8030        );
8031        Llm {
8032            proc: self.proc.clone(),
8033            selection: query,
8034            graphql_client: self.graphql_client.clone(),
8035        }
8036    }
8037    /// Set a variable of type FunctionArg in the llm environment
8038    ///
8039    /// # Arguments
8040    ///
8041    /// * `value` - The FunctionArg value to assign to the variable
8042    pub fn with_function_arg(&self, value: impl IntoID<FunctionArgId>) -> Llm {
8043        let mut query = self.selection.select("withFunctionArg");
8044        query = query.arg_lazy(
8045            "value",
8046            Box::new(move || {
8047                let value = value.clone();
8048                Box::pin(async move { value.into_id().await.unwrap().quote() })
8049            }),
8050        );
8051        Llm {
8052            proc: self.proc.clone(),
8053            selection: query,
8054            graphql_client: self.graphql_client.clone(),
8055        }
8056    }
8057    /// Set a variable of type FunctionCall in the llm environment
8058    ///
8059    /// # Arguments
8060    ///
8061    /// * `value` - The FunctionCall value to assign to the variable
8062    pub fn with_function_call(&self, value: impl IntoID<FunctionCallId>) -> Llm {
8063        let mut query = self.selection.select("withFunctionCall");
8064        query = query.arg_lazy(
8065            "value",
8066            Box::new(move || {
8067                let value = value.clone();
8068                Box::pin(async move { value.into_id().await.unwrap().quote() })
8069            }),
8070        );
8071        Llm {
8072            proc: self.proc.clone(),
8073            selection: query,
8074            graphql_client: self.graphql_client.clone(),
8075        }
8076    }
8077    /// Set a variable of type FunctionCallArgValue in the llm environment
8078    ///
8079    /// # Arguments
8080    ///
8081    /// * `value` - The FunctionCallArgValue value to assign to the variable
8082    pub fn with_function_call_arg_value(&self, value: impl IntoID<FunctionCallArgValueId>) -> Llm {
8083        let mut query = self.selection.select("withFunctionCallArgValue");
8084        query = query.arg_lazy(
8085            "value",
8086            Box::new(move || {
8087                let value = value.clone();
8088                Box::pin(async move { value.into_id().await.unwrap().quote() })
8089            }),
8090        );
8091        Llm {
8092            proc: self.proc.clone(),
8093            selection: query,
8094            graphql_client: self.graphql_client.clone(),
8095        }
8096    }
8097    /// Set a variable of type GeneratedCode in the llm environment
8098    ///
8099    /// # Arguments
8100    ///
8101    /// * `value` - The GeneratedCode value to assign to the variable
8102    pub fn with_generated_code(&self, value: impl IntoID<GeneratedCodeId>) -> Llm {
8103        let mut query = self.selection.select("withGeneratedCode");
8104        query = query.arg_lazy(
8105            "value",
8106            Box::new(move || {
8107                let value = value.clone();
8108                Box::pin(async move { value.into_id().await.unwrap().quote() })
8109            }),
8110        );
8111        Llm {
8112            proc: self.proc.clone(),
8113            selection: query,
8114            graphql_client: self.graphql_client.clone(),
8115        }
8116    }
8117    /// Set a variable of type GitRef in the llm environment
8118    ///
8119    /// # Arguments
8120    ///
8121    /// * `value` - The GitRef value to assign to the variable
8122    pub fn with_git_ref(&self, value: impl IntoID<GitRefId>) -> Llm {
8123        let mut query = self.selection.select("withGitRef");
8124        query = query.arg_lazy(
8125            "value",
8126            Box::new(move || {
8127                let value = value.clone();
8128                Box::pin(async move { value.into_id().await.unwrap().quote() })
8129            }),
8130        );
8131        Llm {
8132            proc: self.proc.clone(),
8133            selection: query,
8134            graphql_client: self.graphql_client.clone(),
8135        }
8136    }
8137    /// Set a variable of type GitRepository in the llm environment
8138    ///
8139    /// # Arguments
8140    ///
8141    /// * `value` - The GitRepository value to assign to the variable
8142    pub fn with_git_repository(&self, value: impl IntoID<GitRepositoryId>) -> Llm {
8143        let mut query = self.selection.select("withGitRepository");
8144        query = query.arg_lazy(
8145            "value",
8146            Box::new(move || {
8147                let value = value.clone();
8148                Box::pin(async move { value.into_id().await.unwrap().quote() })
8149            }),
8150        );
8151        Llm {
8152            proc: self.proc.clone(),
8153            selection: query,
8154            graphql_client: self.graphql_client.clone(),
8155        }
8156    }
8157    /// Set a variable of type InputTypeDef in the llm environment
8158    ///
8159    /// # Arguments
8160    ///
8161    /// * `value` - The InputTypeDef value to assign to the variable
8162    pub fn with_input_type_def(&self, value: impl IntoID<InputTypeDefId>) -> Llm {
8163        let mut query = self.selection.select("withInputTypeDef");
8164        query = query.arg_lazy(
8165            "value",
8166            Box::new(move || {
8167                let value = value.clone();
8168                Box::pin(async move { value.into_id().await.unwrap().quote() })
8169            }),
8170        );
8171        Llm {
8172            proc: self.proc.clone(),
8173            selection: query,
8174            graphql_client: self.graphql_client.clone(),
8175        }
8176    }
8177    /// Set a variable of type InterfaceTypeDef in the llm environment
8178    ///
8179    /// # Arguments
8180    ///
8181    /// * `value` - The InterfaceTypeDef value to assign to the variable
8182    pub fn with_interface_type_def(&self, value: impl IntoID<InterfaceTypeDefId>) -> Llm {
8183        let mut query = self.selection.select("withInterfaceTypeDef");
8184        query = query.arg_lazy(
8185            "value",
8186            Box::new(move || {
8187                let value = value.clone();
8188                Box::pin(async move { value.into_id().await.unwrap().quote() })
8189            }),
8190        );
8191        Llm {
8192            proc: self.proc.clone(),
8193            selection: query,
8194            graphql_client: self.graphql_client.clone(),
8195        }
8196    }
8197    /// Set a variable of type LLM in the llm environment
8198    ///
8199    /// # Arguments
8200    ///
8201    /// * `value` - The LLM value to assign to the variable
8202    pub fn with_llm(&self, value: impl IntoID<Llmid>) -> Llm {
8203        let mut query = self.selection.select("withLLM");
8204        query = query.arg_lazy(
8205            "value",
8206            Box::new(move || {
8207                let value = value.clone();
8208                Box::pin(async move { value.into_id().await.unwrap().quote() })
8209            }),
8210        );
8211        Llm {
8212            proc: self.proc.clone(),
8213            selection: query,
8214            graphql_client: self.graphql_client.clone(),
8215        }
8216    }
8217    /// Set a variable of type ListTypeDef in the llm environment
8218    ///
8219    /// # Arguments
8220    ///
8221    /// * `value` - The ListTypeDef value to assign to the variable
8222    pub fn with_list_type_def(&self, value: impl IntoID<ListTypeDefId>) -> Llm {
8223        let mut query = self.selection.select("withListTypeDef");
8224        query = query.arg_lazy(
8225            "value",
8226            Box::new(move || {
8227                let value = value.clone();
8228                Box::pin(async move { value.into_id().await.unwrap().quote() })
8229            }),
8230        );
8231        Llm {
8232            proc: self.proc.clone(),
8233            selection: query,
8234            graphql_client: self.graphql_client.clone(),
8235        }
8236    }
8237    /// swap out the llm model
8238    ///
8239    /// # Arguments
8240    ///
8241    /// * `model` - The model to use
8242    pub fn with_model(&self, model: impl Into<String>) -> Llm {
8243        let mut query = self.selection.select("withModel");
8244        query = query.arg("model", model.into());
8245        Llm {
8246            proc: self.proc.clone(),
8247            selection: query,
8248            graphql_client: self.graphql_client.clone(),
8249        }
8250    }
8251    /// Set a variable of type Module in the llm environment
8252    ///
8253    /// # Arguments
8254    ///
8255    /// * `value` - The Module value to assign to the variable
8256    pub fn with_module(&self, value: impl IntoID<ModuleId>) -> Llm {
8257        let mut query = self.selection.select("withModule");
8258        query = query.arg_lazy(
8259            "value",
8260            Box::new(move || {
8261                let value = value.clone();
8262                Box::pin(async move { value.into_id().await.unwrap().quote() })
8263            }),
8264        );
8265        Llm {
8266            proc: self.proc.clone(),
8267            selection: query,
8268            graphql_client: self.graphql_client.clone(),
8269        }
8270    }
8271    /// Set a variable of type ModuleConfigClient in the llm environment
8272    ///
8273    /// # Arguments
8274    ///
8275    /// * `value` - The ModuleConfigClient value to assign to the variable
8276    pub fn with_module_config_client(&self, value: impl IntoID<ModuleConfigClientId>) -> Llm {
8277        let mut query = self.selection.select("withModuleConfigClient");
8278        query = query.arg_lazy(
8279            "value",
8280            Box::new(move || {
8281                let value = value.clone();
8282                Box::pin(async move { value.into_id().await.unwrap().quote() })
8283            }),
8284        );
8285        Llm {
8286            proc: self.proc.clone(),
8287            selection: query,
8288            graphql_client: self.graphql_client.clone(),
8289        }
8290    }
8291    /// Set a variable of type ModuleSource in the llm environment
8292    ///
8293    /// # Arguments
8294    ///
8295    /// * `value` - The ModuleSource value to assign to the variable
8296    pub fn with_module_source(&self, value: impl IntoID<ModuleSourceId>) -> Llm {
8297        let mut query = self.selection.select("withModuleSource");
8298        query = query.arg_lazy(
8299            "value",
8300            Box::new(move || {
8301                let value = value.clone();
8302                Box::pin(async move { value.into_id().await.unwrap().quote() })
8303            }),
8304        );
8305        Llm {
8306            proc: self.proc.clone(),
8307            selection: query,
8308            graphql_client: self.graphql_client.clone(),
8309        }
8310    }
8311    /// Set a variable of type ObjectTypeDef in the llm environment
8312    ///
8313    /// # Arguments
8314    ///
8315    /// * `value` - The ObjectTypeDef value to assign to the variable
8316    pub fn with_object_type_def(&self, value: impl IntoID<ObjectTypeDefId>) -> Llm {
8317        let mut query = self.selection.select("withObjectTypeDef");
8318        query = query.arg_lazy(
8319            "value",
8320            Box::new(move || {
8321                let value = value.clone();
8322                Box::pin(async move { value.into_id().await.unwrap().quote() })
8323            }),
8324        );
8325        Llm {
8326            proc: self.proc.clone(),
8327            selection: query,
8328            graphql_client: self.graphql_client.clone(),
8329        }
8330    }
8331    /// append a prompt to the llm context
8332    ///
8333    /// # Arguments
8334    ///
8335    /// * `prompt` - The prompt to send
8336    pub fn with_prompt(&self, prompt: impl Into<String>) -> Llm {
8337        let mut query = self.selection.select("withPrompt");
8338        query = query.arg("prompt", prompt.into());
8339        Llm {
8340            proc: self.proc.clone(),
8341            selection: query,
8342            graphql_client: self.graphql_client.clone(),
8343        }
8344    }
8345    /// append the contents of a file to the llm context
8346    ///
8347    /// # Arguments
8348    ///
8349    /// * `file` - The file to read the prompt from
8350    pub fn with_prompt_file(&self, file: impl IntoID<FileId>) -> Llm {
8351        let mut query = self.selection.select("withPromptFile");
8352        query = query.arg_lazy(
8353            "file",
8354            Box::new(move || {
8355                let file = file.clone();
8356                Box::pin(async move { file.into_id().await.unwrap().quote() })
8357            }),
8358        );
8359        Llm {
8360            proc: self.proc.clone(),
8361            selection: query,
8362            graphql_client: self.graphql_client.clone(),
8363        }
8364    }
8365    /// Add a string variable to the LLM's environment
8366    ///
8367    /// # Arguments
8368    ///
8369    /// * `name` - The variable name
8370    /// * `value` - The variable value
8371    pub fn with_prompt_var(&self, name: impl Into<String>, value: impl Into<String>) -> Llm {
8372        let mut query = self.selection.select("withPromptVar");
8373        query = query.arg("name", name.into());
8374        query = query.arg("value", value.into());
8375        Llm {
8376            proc: self.proc.clone(),
8377            selection: query,
8378            graphql_client: self.graphql_client.clone(),
8379        }
8380    }
8381    /// Provide the entire Query object to the LLM
8382    pub fn with_query(&self) -> Llm {
8383        let query = self.selection.select("withQuery");
8384        Llm {
8385            proc: self.proc.clone(),
8386            selection: query,
8387            graphql_client: self.graphql_client.clone(),
8388        }
8389    }
8390    /// Set a variable of type SDKConfig in the llm environment
8391    ///
8392    /// # Arguments
8393    ///
8394    /// * `value` - The SDKConfig value to assign to the variable
8395    pub fn with_sdk_config(&self, value: impl IntoID<SdkConfigId>) -> Llm {
8396        let mut query = self.selection.select("withSDKConfig");
8397        query = query.arg_lazy(
8398            "value",
8399            Box::new(move || {
8400                let value = value.clone();
8401                Box::pin(async move { value.into_id().await.unwrap().quote() })
8402            }),
8403        );
8404        Llm {
8405            proc: self.proc.clone(),
8406            selection: query,
8407            graphql_client: self.graphql_client.clone(),
8408        }
8409    }
8410    /// Set a variable of type ScalarTypeDef in the llm environment
8411    ///
8412    /// # Arguments
8413    ///
8414    /// * `value` - The ScalarTypeDef value to assign to the variable
8415    pub fn with_scalar_type_def(&self, value: impl IntoID<ScalarTypeDefId>) -> Llm {
8416        let mut query = self.selection.select("withScalarTypeDef");
8417        query = query.arg_lazy(
8418            "value",
8419            Box::new(move || {
8420                let value = value.clone();
8421                Box::pin(async move { value.into_id().await.unwrap().quote() })
8422            }),
8423        );
8424        Llm {
8425            proc: self.proc.clone(),
8426            selection: query,
8427            graphql_client: self.graphql_client.clone(),
8428        }
8429    }
8430    /// Set a variable of type Secret in the llm environment
8431    ///
8432    /// # Arguments
8433    ///
8434    /// * `value` - The Secret value to assign to the variable
8435    pub fn with_secret(&self, value: impl IntoID<SecretId>) -> Llm {
8436        let mut query = self.selection.select("withSecret");
8437        query = query.arg_lazy(
8438            "value",
8439            Box::new(move || {
8440                let value = value.clone();
8441                Box::pin(async move { value.into_id().await.unwrap().quote() })
8442            }),
8443        );
8444        Llm {
8445            proc: self.proc.clone(),
8446            selection: query,
8447            graphql_client: self.graphql_client.clone(),
8448        }
8449    }
8450    /// Set a variable of type Service in the llm environment
8451    ///
8452    /// # Arguments
8453    ///
8454    /// * `value` - The Service value to assign to the variable
8455    pub fn with_service(&self, value: impl IntoID<ServiceId>) -> Llm {
8456        let mut query = self.selection.select("withService");
8457        query = query.arg_lazy(
8458            "value",
8459            Box::new(move || {
8460                let value = value.clone();
8461                Box::pin(async move { value.into_id().await.unwrap().quote() })
8462            }),
8463        );
8464        Llm {
8465            proc: self.proc.clone(),
8466            selection: query,
8467            graphql_client: self.graphql_client.clone(),
8468        }
8469    }
8470    /// Set a variable of type Socket in the llm environment
8471    ///
8472    /// # Arguments
8473    ///
8474    /// * `value` - The Socket value to assign to the variable
8475    pub fn with_socket(&self, value: impl IntoID<SocketId>) -> Llm {
8476        let mut query = self.selection.select("withSocket");
8477        query = query.arg_lazy(
8478            "value",
8479            Box::new(move || {
8480                let value = value.clone();
8481                Box::pin(async move { value.into_id().await.unwrap().quote() })
8482            }),
8483        );
8484        Llm {
8485            proc: self.proc.clone(),
8486            selection: query,
8487            graphql_client: self.graphql_client.clone(),
8488        }
8489    }
8490    /// Set a variable of type SourceMap in the llm environment
8491    ///
8492    /// # Arguments
8493    ///
8494    /// * `value` - The SourceMap value to assign to the variable
8495    pub fn with_source_map(&self, value: impl IntoID<SourceMapId>) -> Llm {
8496        let mut query = self.selection.select("withSourceMap");
8497        query = query.arg_lazy(
8498            "value",
8499            Box::new(move || {
8500                let value = value.clone();
8501                Box::pin(async move { value.into_id().await.unwrap().quote() })
8502            }),
8503        );
8504        Llm {
8505            proc: self.proc.clone(),
8506            selection: query,
8507            graphql_client: self.graphql_client.clone(),
8508        }
8509    }
8510    /// Add a system prompt to the LLM's environment
8511    ///
8512    /// # Arguments
8513    ///
8514    /// * `prompt` - The system prompt to send
8515    pub fn with_system_prompt(&self, prompt: impl Into<String>) -> Llm {
8516        let mut query = self.selection.select("withSystemPrompt");
8517        query = query.arg("prompt", prompt.into());
8518        Llm {
8519            proc: self.proc.clone(),
8520            selection: query,
8521            graphql_client: self.graphql_client.clone(),
8522        }
8523    }
8524    /// Set a variable of type Terminal in the llm environment
8525    ///
8526    /// # Arguments
8527    ///
8528    /// * `value` - The Terminal value to assign to the variable
8529    pub fn with_terminal(&self, value: impl IntoID<TerminalId>) -> Llm {
8530        let mut query = self.selection.select("withTerminal");
8531        query = query.arg_lazy(
8532            "value",
8533            Box::new(move || {
8534                let value = value.clone();
8535                Box::pin(async move { value.into_id().await.unwrap().quote() })
8536            }),
8537        );
8538        Llm {
8539            proc: self.proc.clone(),
8540            selection: query,
8541            graphql_client: self.graphql_client.clone(),
8542        }
8543    }
8544    /// Set a variable of type TypeDef in the llm environment
8545    ///
8546    /// # Arguments
8547    ///
8548    /// * `value` - The TypeDef value to assign to the variable
8549    pub fn with_type_def(&self, value: impl IntoID<TypeDefId>) -> Llm {
8550        let mut query = self.selection.select("withTypeDef");
8551        query = query.arg_lazy(
8552            "value",
8553            Box::new(move || {
8554                let value = value.clone();
8555                Box::pin(async move { value.into_id().await.unwrap().quote() })
8556            }),
8557        );
8558        Llm {
8559            proc: self.proc.clone(),
8560            selection: query,
8561            graphql_client: self.graphql_client.clone(),
8562        }
8563    }
8564}
8565#[derive(Clone)]
8566pub struct LlmTokenUsage {
8567    pub proc: Option<Arc<DaggerSessionProc>>,
8568    pub selection: Selection,
8569    pub graphql_client: DynGraphQLClient,
8570}
8571impl LlmTokenUsage {
8572    /// A unique identifier for this LLMTokenUsage.
8573    pub async fn id(&self) -> Result<LlmTokenUsageId, DaggerError> {
8574        let query = self.selection.select("id");
8575        query.execute(self.graphql_client.clone()).await
8576    }
8577    pub async fn input_tokens(&self) -> Result<isize, DaggerError> {
8578        let query = self.selection.select("inputTokens");
8579        query.execute(self.graphql_client.clone()).await
8580    }
8581    pub async fn output_tokens(&self) -> Result<isize, DaggerError> {
8582        let query = self.selection.select("outputTokens");
8583        query.execute(self.graphql_client.clone()).await
8584    }
8585    pub async fn total_tokens(&self) -> Result<isize, DaggerError> {
8586        let query = self.selection.select("totalTokens");
8587        query.execute(self.graphql_client.clone()).await
8588    }
8589}
8590#[derive(Clone)]
8591pub struct LlmVariable {
8592    pub proc: Option<Arc<DaggerSessionProc>>,
8593    pub selection: Selection,
8594    pub graphql_client: DynGraphQLClient,
8595}
8596impl LlmVariable {
8597    pub async fn hash(&self) -> Result<String, DaggerError> {
8598        let query = self.selection.select("hash");
8599        query.execute(self.graphql_client.clone()).await
8600    }
8601    /// A unique identifier for this LLMVariable.
8602    pub async fn id(&self) -> Result<LlmVariableId, DaggerError> {
8603        let query = self.selection.select("id");
8604        query.execute(self.graphql_client.clone()).await
8605    }
8606    pub async fn name(&self) -> Result<String, DaggerError> {
8607        let query = self.selection.select("name");
8608        query.execute(self.graphql_client.clone()).await
8609    }
8610    pub async fn type_name(&self) -> Result<String, DaggerError> {
8611        let query = self.selection.select("typeName");
8612        query.execute(self.graphql_client.clone()).await
8613    }
8614}
8615#[derive(Clone)]
8616pub struct Label {
8617    pub proc: Option<Arc<DaggerSessionProc>>,
8618    pub selection: Selection,
8619    pub graphql_client: DynGraphQLClient,
8620}
8621impl Label {
8622    /// A unique identifier for this Label.
8623    pub async fn id(&self) -> Result<LabelId, DaggerError> {
8624        let query = self.selection.select("id");
8625        query.execute(self.graphql_client.clone()).await
8626    }
8627    /// The label name.
8628    pub async fn name(&self) -> Result<String, DaggerError> {
8629        let query = self.selection.select("name");
8630        query.execute(self.graphql_client.clone()).await
8631    }
8632    /// The label value.
8633    pub async fn value(&self) -> Result<String, DaggerError> {
8634        let query = self.selection.select("value");
8635        query.execute(self.graphql_client.clone()).await
8636    }
8637}
8638#[derive(Clone)]
8639pub struct ListTypeDef {
8640    pub proc: Option<Arc<DaggerSessionProc>>,
8641    pub selection: Selection,
8642    pub graphql_client: DynGraphQLClient,
8643}
8644impl ListTypeDef {
8645    /// The type of the elements in the list.
8646    pub fn element_type_def(&self) -> TypeDef {
8647        let query = self.selection.select("elementTypeDef");
8648        TypeDef {
8649            proc: self.proc.clone(),
8650            selection: query,
8651            graphql_client: self.graphql_client.clone(),
8652        }
8653    }
8654    /// A unique identifier for this ListTypeDef.
8655    pub async fn id(&self) -> Result<ListTypeDefId, DaggerError> {
8656        let query = self.selection.select("id");
8657        query.execute(self.graphql_client.clone()).await
8658    }
8659}
8660#[derive(Clone)]
8661pub struct Module {
8662    pub proc: Option<Arc<DaggerSessionProc>>,
8663    pub selection: Selection,
8664    pub graphql_client: DynGraphQLClient,
8665}
8666impl Module {
8667    /// The dependencies of the module.
8668    pub fn dependencies(&self) -> Vec<Module> {
8669        let query = self.selection.select("dependencies");
8670        vec![Module {
8671            proc: self.proc.clone(),
8672            selection: query,
8673            graphql_client: self.graphql_client.clone(),
8674        }]
8675    }
8676    /// The doc string of the module, if any
8677    pub async fn description(&self) -> Result<String, DaggerError> {
8678        let query = self.selection.select("description");
8679        query.execute(self.graphql_client.clone()).await
8680    }
8681    /// Enumerations served by this module.
8682    pub fn enums(&self) -> Vec<TypeDef> {
8683        let query = self.selection.select("enums");
8684        vec![TypeDef {
8685            proc: self.proc.clone(),
8686            selection: query,
8687            graphql_client: self.graphql_client.clone(),
8688        }]
8689    }
8690    /// The generated files and directories made on top of the module source's context directory.
8691    pub fn generated_context_directory(&self) -> Directory {
8692        let query = self.selection.select("generatedContextDirectory");
8693        Directory {
8694            proc: self.proc.clone(),
8695            selection: query,
8696            graphql_client: self.graphql_client.clone(),
8697        }
8698    }
8699    /// A unique identifier for this Module.
8700    pub async fn id(&self) -> Result<ModuleId, DaggerError> {
8701        let query = self.selection.select("id");
8702        query.execute(self.graphql_client.clone()).await
8703    }
8704    /// Interfaces served by this module.
8705    pub fn interfaces(&self) -> Vec<TypeDef> {
8706        let query = self.selection.select("interfaces");
8707        vec![TypeDef {
8708            proc: self.proc.clone(),
8709            selection: query,
8710            graphql_client: self.graphql_client.clone(),
8711        }]
8712    }
8713    /// The name of the module
8714    pub async fn name(&self) -> Result<String, DaggerError> {
8715        let query = self.selection.select("name");
8716        query.execute(self.graphql_client.clone()).await
8717    }
8718    /// Objects served by this module.
8719    pub fn objects(&self) -> Vec<TypeDef> {
8720        let query = self.selection.select("objects");
8721        vec![TypeDef {
8722            proc: self.proc.clone(),
8723            selection: query,
8724            graphql_client: self.graphql_client.clone(),
8725        }]
8726    }
8727    /// The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
8728    pub fn runtime(&self) -> Container {
8729        let query = self.selection.select("runtime");
8730        Container {
8731            proc: self.proc.clone(),
8732            selection: query,
8733            graphql_client: self.graphql_client.clone(),
8734        }
8735    }
8736    /// The SDK config used by this module.
8737    pub fn sdk(&self) -> SdkConfig {
8738        let query = self.selection.select("sdk");
8739        SdkConfig {
8740            proc: self.proc.clone(),
8741            selection: query,
8742            graphql_client: self.graphql_client.clone(),
8743        }
8744    }
8745    /// Serve a module's API in the current session.
8746    /// Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
8747    pub async fn serve(&self) -> Result<Void, DaggerError> {
8748        let query = self.selection.select("serve");
8749        query.execute(self.graphql_client.clone()).await
8750    }
8751    /// The source for the module.
8752    pub fn source(&self) -> ModuleSource {
8753        let query = self.selection.select("source");
8754        ModuleSource {
8755            proc: self.proc.clone(),
8756            selection: query,
8757            graphql_client: self.graphql_client.clone(),
8758        }
8759    }
8760    /// Forces evaluation of the module, including any loading into the engine and associated validation.
8761    pub async fn sync(&self) -> Result<ModuleId, DaggerError> {
8762        let query = self.selection.select("sync");
8763        query.execute(self.graphql_client.clone()).await
8764    }
8765    /// Retrieves the module with the given description
8766    ///
8767    /// # Arguments
8768    ///
8769    /// * `description` - The description to set
8770    pub fn with_description(&self, description: impl Into<String>) -> Module {
8771        let mut query = self.selection.select("withDescription");
8772        query = query.arg("description", description.into());
8773        Module {
8774            proc: self.proc.clone(),
8775            selection: query,
8776            graphql_client: self.graphql_client.clone(),
8777        }
8778    }
8779    /// This module plus the given Enum type and associated values
8780    pub fn with_enum(&self, r#enum: impl IntoID<TypeDefId>) -> Module {
8781        let mut query = self.selection.select("withEnum");
8782        query = query.arg_lazy(
8783            "enum",
8784            Box::new(move || {
8785                let r#enum = r#enum.clone();
8786                Box::pin(async move { r#enum.into_id().await.unwrap().quote() })
8787            }),
8788        );
8789        Module {
8790            proc: self.proc.clone(),
8791            selection: query,
8792            graphql_client: self.graphql_client.clone(),
8793        }
8794    }
8795    /// This module plus the given Interface type and associated functions
8796    pub fn with_interface(&self, iface: impl IntoID<TypeDefId>) -> Module {
8797        let mut query = self.selection.select("withInterface");
8798        query = query.arg_lazy(
8799            "iface",
8800            Box::new(move || {
8801                let iface = iface.clone();
8802                Box::pin(async move { iface.into_id().await.unwrap().quote() })
8803            }),
8804        );
8805        Module {
8806            proc: self.proc.clone(),
8807            selection: query,
8808            graphql_client: self.graphql_client.clone(),
8809        }
8810    }
8811    /// This module plus the given Object type and associated functions.
8812    pub fn with_object(&self, object: impl IntoID<TypeDefId>) -> Module {
8813        let mut query = self.selection.select("withObject");
8814        query = query.arg_lazy(
8815            "object",
8816            Box::new(move || {
8817                let object = object.clone();
8818                Box::pin(async move { object.into_id().await.unwrap().quote() })
8819            }),
8820        );
8821        Module {
8822            proc: self.proc.clone(),
8823            selection: query,
8824            graphql_client: self.graphql_client.clone(),
8825        }
8826    }
8827}
8828#[derive(Clone)]
8829pub struct ModuleConfigClient {
8830    pub proc: Option<Arc<DaggerSessionProc>>,
8831    pub selection: Selection,
8832    pub graphql_client: DynGraphQLClient,
8833}
8834impl ModuleConfigClient {
8835    /// If true, generate the client in developer mode.
8836    pub async fn dev(&self) -> Result<bool, DaggerError> {
8837        let query = self.selection.select("dev");
8838        query.execute(self.graphql_client.clone()).await
8839    }
8840    /// The directory the client is generated in.
8841    pub async fn directory(&self) -> Result<String, DaggerError> {
8842        let query = self.selection.select("directory");
8843        query.execute(self.graphql_client.clone()).await
8844    }
8845    /// The generator to use
8846    pub async fn generator(&self) -> Result<String, DaggerError> {
8847        let query = self.selection.select("generator");
8848        query.execute(self.graphql_client.clone()).await
8849    }
8850    /// A unique identifier for this ModuleConfigClient.
8851    pub async fn id(&self) -> Result<ModuleConfigClientId, DaggerError> {
8852        let query = self.selection.select("id");
8853        query.execute(self.graphql_client.clone()).await
8854    }
8855}
8856#[derive(Clone)]
8857pub struct ModuleSource {
8858    pub proc: Option<Arc<DaggerSessionProc>>,
8859    pub selection: Selection,
8860    pub graphql_client: DynGraphQLClient,
8861}
8862#[derive(Builder, Debug, PartialEq)]
8863pub struct ModuleSourceWithClientOpts {
8864    /// Generate in developer mode
8865    #[builder(setter(into, strip_option), default)]
8866    pub dev: Option<bool>,
8867}
8868impl ModuleSource {
8869    /// Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation
8870    pub fn as_module(&self) -> Module {
8871        let query = self.selection.select("asModule");
8872        Module {
8873            proc: self.proc.clone(),
8874            selection: query,
8875            graphql_client: self.graphql_client.clone(),
8876        }
8877    }
8878    /// A human readable ref string representation of this module source.
8879    pub async fn as_string(&self) -> Result<String, DaggerError> {
8880        let query = self.selection.select("asString");
8881        query.execute(self.graphql_client.clone()).await
8882    }
8883    /// The ref to clone the root of the git repo from. Only valid for git sources.
8884    pub async fn clone_ref(&self) -> Result<String, DaggerError> {
8885        let query = self.selection.select("cloneRef");
8886        query.execute(self.graphql_client.clone()).await
8887    }
8888    /// The resolved commit of the git repo this source points to.
8889    pub async fn commit(&self) -> Result<String, DaggerError> {
8890        let query = self.selection.select("commit");
8891        query.execute(self.graphql_client.clone()).await
8892    }
8893    /// The clients generated for the module.
8894    pub fn config_clients(&self) -> Vec<ModuleConfigClient> {
8895        let query = self.selection.select("configClients");
8896        vec![ModuleConfigClient {
8897            proc: self.proc.clone(),
8898            selection: query,
8899            graphql_client: self.graphql_client.clone(),
8900        }]
8901    }
8902    /// Whether an existing dagger.json for the module was found.
8903    pub async fn config_exists(&self) -> Result<bool, DaggerError> {
8904        let query = self.selection.select("configExists");
8905        query.execute(self.graphql_client.clone()).await
8906    }
8907    /// The full directory loaded for the module source, including the source code as a subdirectory.
8908    pub fn context_directory(&self) -> Directory {
8909        let query = self.selection.select("contextDirectory");
8910        Directory {
8911            proc: self.proc.clone(),
8912            selection: query,
8913            graphql_client: self.graphql_client.clone(),
8914        }
8915    }
8916    /// The dependencies of the module source.
8917    pub fn dependencies(&self) -> Vec<ModuleSource> {
8918        let query = self.selection.select("dependencies");
8919        vec![ModuleSource {
8920            proc: self.proc.clone(),
8921            selection: query,
8922            graphql_client: self.graphql_client.clone(),
8923        }]
8924    }
8925    /// 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.
8926    pub async fn digest(&self) -> Result<String, DaggerError> {
8927        let query = self.selection.select("digest");
8928        query.execute(self.graphql_client.clone()).await
8929    }
8930    /// The directory containing the module configuration and source code (source code may be in a subdir).
8931    ///
8932    /// # Arguments
8933    ///
8934    /// * `path` - A subpath from the source directory to select.
8935    pub fn directory(&self, path: impl Into<String>) -> Directory {
8936        let mut query = self.selection.select("directory");
8937        query = query.arg("path", path.into());
8938        Directory {
8939            proc: self.proc.clone(),
8940            selection: query,
8941            graphql_client: self.graphql_client.clone(),
8942        }
8943    }
8944    /// The engine version of the module.
8945    pub async fn engine_version(&self) -> Result<String, DaggerError> {
8946        let query = self.selection.select("engineVersion");
8947        query.execute(self.graphql_client.clone()).await
8948    }
8949    /// The generated files and directories made on top of the module source's context directory.
8950    pub fn generated_context_directory(&self) -> Directory {
8951        let query = self.selection.select("generatedContextDirectory");
8952        Directory {
8953            proc: self.proc.clone(),
8954            selection: query,
8955            graphql_client: self.graphql_client.clone(),
8956        }
8957    }
8958    /// The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket).
8959    pub async fn html_repo_url(&self) -> Result<String, DaggerError> {
8960        let query = self.selection.select("htmlRepoURL");
8961        query.execute(self.graphql_client.clone()).await
8962    }
8963    /// The URL to the source's git repo in a web browser. Only valid for git sources.
8964    pub async fn html_url(&self) -> Result<String, DaggerError> {
8965        let query = self.selection.select("htmlURL");
8966        query.execute(self.graphql_client.clone()).await
8967    }
8968    /// A unique identifier for this ModuleSource.
8969    pub async fn id(&self) -> Result<ModuleSourceId, DaggerError> {
8970        let query = self.selection.select("id");
8971        query.execute(self.graphql_client.clone()).await
8972    }
8973    /// The kind of module source (currently local, git or dir).
8974    pub async fn kind(&self) -> Result<ModuleSourceKind, DaggerError> {
8975        let query = self.selection.select("kind");
8976        query.execute(self.graphql_client.clone()).await
8977    }
8978    /// 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.
8979    pub async fn local_context_directory_path(&self) -> Result<String, DaggerError> {
8980        let query = self.selection.select("localContextDirectoryPath");
8981        query.execute(self.graphql_client.clone()).await
8982    }
8983    /// The name of the module, including any setting via the withName API.
8984    pub async fn module_name(&self) -> Result<String, DaggerError> {
8985        let query = self.selection.select("moduleName");
8986        query.execute(self.graphql_client.clone()).await
8987    }
8988    /// The original name of the module as read from the module's dagger.json (or set for the first time with the withName API).
8989    pub async fn module_original_name(&self) -> Result<String, DaggerError> {
8990        let query = self.selection.select("moduleOriginalName");
8991        query.execute(self.graphql_client.clone()).await
8992    }
8993    /// The original subpath used when instantiating this module source, relative to the context directory.
8994    pub async fn original_subpath(&self) -> Result<String, DaggerError> {
8995        let query = self.selection.select("originalSubpath");
8996        query.execute(self.graphql_client.clone()).await
8997    }
8998    /// The pinned version of this module source.
8999    pub async fn pin(&self) -> Result<String, DaggerError> {
9000        let query = self.selection.select("pin");
9001        query.execute(self.graphql_client.clone()).await
9002    }
9003    /// The import path corresponding to the root of the git repo this source points to. Only valid for git sources.
9004    pub async fn repo_root_path(&self) -> Result<String, DaggerError> {
9005        let query = self.selection.select("repoRootPath");
9006        query.execute(self.graphql_client.clone()).await
9007    }
9008    /// The SDK configuration of the module.
9009    pub fn sdk(&self) -> SdkConfig {
9010        let query = self.selection.select("sdk");
9011        SdkConfig {
9012            proc: self.proc.clone(),
9013            selection: query,
9014            graphql_client: self.graphql_client.clone(),
9015        }
9016    }
9017    /// The path, relative to the context directory, that contains the module's dagger.json.
9018    pub async fn source_root_subpath(&self) -> Result<String, DaggerError> {
9019        let query = self.selection.select("sourceRootSubpath");
9020        query.execute(self.graphql_client.clone()).await
9021    }
9022    /// The path to the directory containing the module's source code, relative to the context directory.
9023    pub async fn source_subpath(&self) -> Result<String, DaggerError> {
9024        let query = self.selection.select("sourceSubpath");
9025        query.execute(self.graphql_client.clone()).await
9026    }
9027    /// Forces evaluation of the module source, including any loading into the engine and associated validation.
9028    pub async fn sync(&self) -> Result<ModuleSourceId, DaggerError> {
9029        let query = self.selection.select("sync");
9030        query.execute(self.graphql_client.clone()).await
9031    }
9032    /// The specified version of the git repo this source points to.
9033    pub async fn version(&self) -> Result<String, DaggerError> {
9034        let query = self.selection.select("version");
9035        query.execute(self.graphql_client.clone()).await
9036    }
9037    /// Update the module source with a new client to generate.
9038    ///
9039    /// # Arguments
9040    ///
9041    /// * `generator` - The generator to use
9042    /// * `output_dir` - The output directory for the generated client.
9043    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9044    pub fn with_client(
9045        &self,
9046        generator: impl Into<String>,
9047        output_dir: impl Into<String>,
9048    ) -> ModuleSource {
9049        let mut query = self.selection.select("withClient");
9050        query = query.arg("generator", generator.into());
9051        query = query.arg("outputDir", output_dir.into());
9052        ModuleSource {
9053            proc: self.proc.clone(),
9054            selection: query,
9055            graphql_client: self.graphql_client.clone(),
9056        }
9057    }
9058    /// Update the module source with a new client to generate.
9059    ///
9060    /// # Arguments
9061    ///
9062    /// * `generator` - The generator to use
9063    /// * `output_dir` - The output directory for the generated client.
9064    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9065    pub fn with_client_opts(
9066        &self,
9067        generator: impl Into<String>,
9068        output_dir: impl Into<String>,
9069        opts: ModuleSourceWithClientOpts,
9070    ) -> ModuleSource {
9071        let mut query = self.selection.select("withClient");
9072        query = query.arg("generator", generator.into());
9073        query = query.arg("outputDir", output_dir.into());
9074        if let Some(dev) = opts.dev {
9075            query = query.arg("dev", dev);
9076        }
9077        ModuleSource {
9078            proc: self.proc.clone(),
9079            selection: query,
9080            graphql_client: self.graphql_client.clone(),
9081        }
9082    }
9083    /// Append the provided dependencies to the module source's dependency list.
9084    ///
9085    /// # Arguments
9086    ///
9087    /// * `dependencies` - The dependencies to append.
9088    pub fn with_dependencies(&self, dependencies: Vec<ModuleSourceId>) -> ModuleSource {
9089        let mut query = self.selection.select("withDependencies");
9090        query = query.arg("dependencies", dependencies);
9091        ModuleSource {
9092            proc: self.proc.clone(),
9093            selection: query,
9094            graphql_client: self.graphql_client.clone(),
9095        }
9096    }
9097    /// Upgrade the engine version of the module to the given value.
9098    ///
9099    /// # Arguments
9100    ///
9101    /// * `version` - The engine version to upgrade to.
9102    pub fn with_engine_version(&self, version: impl Into<String>) -> ModuleSource {
9103        let mut query = self.selection.select("withEngineVersion");
9104        query = query.arg("version", version.into());
9105        ModuleSource {
9106            proc: self.proc.clone(),
9107            selection: query,
9108            graphql_client: self.graphql_client.clone(),
9109        }
9110    }
9111    /// Update the module source with additional include patterns for files+directories from its context that are required for building it
9112    ///
9113    /// # Arguments
9114    ///
9115    /// * `patterns` - The new additional include patterns.
9116    pub fn with_includes(&self, patterns: Vec<impl Into<String>>) -> ModuleSource {
9117        let mut query = self.selection.select("withIncludes");
9118        query = query.arg(
9119            "patterns",
9120            patterns
9121                .into_iter()
9122                .map(|i| i.into())
9123                .collect::<Vec<String>>(),
9124        );
9125        ModuleSource {
9126            proc: self.proc.clone(),
9127            selection: query,
9128            graphql_client: self.graphql_client.clone(),
9129        }
9130    }
9131    /// Update the module source with a new name.
9132    ///
9133    /// # Arguments
9134    ///
9135    /// * `name` - The name to set.
9136    pub fn with_name(&self, name: impl Into<String>) -> ModuleSource {
9137        let mut query = self.selection.select("withName");
9138        query = query.arg("name", name.into());
9139        ModuleSource {
9140            proc: self.proc.clone(),
9141            selection: query,
9142            graphql_client: self.graphql_client.clone(),
9143        }
9144    }
9145    /// Update the module source with a new SDK.
9146    ///
9147    /// # Arguments
9148    ///
9149    /// * `source` - The SDK source to set.
9150    pub fn with_sdk(&self, source: impl Into<String>) -> ModuleSource {
9151        let mut query = self.selection.select("withSDK");
9152        query = query.arg("source", source.into());
9153        ModuleSource {
9154            proc: self.proc.clone(),
9155            selection: query,
9156            graphql_client: self.graphql_client.clone(),
9157        }
9158    }
9159    /// Update the module source with a new source subpath.
9160    ///
9161    /// # Arguments
9162    ///
9163    /// * `path` - The path to set as the source subpath. Must be relative to the module source's source root directory.
9164    pub fn with_source_subpath(&self, path: impl Into<String>) -> ModuleSource {
9165        let mut query = self.selection.select("withSourceSubpath");
9166        query = query.arg("path", path.into());
9167        ModuleSource {
9168            proc: self.proc.clone(),
9169            selection: query,
9170            graphql_client: self.graphql_client.clone(),
9171        }
9172    }
9173    /// Update one or more module dependencies.
9174    ///
9175    /// # Arguments
9176    ///
9177    /// * `dependencies` - The dependencies to update.
9178    pub fn with_update_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
9179        let mut query = self.selection.select("withUpdateDependencies");
9180        query = query.arg(
9181            "dependencies",
9182            dependencies
9183                .into_iter()
9184                .map(|i| i.into())
9185                .collect::<Vec<String>>(),
9186        );
9187        ModuleSource {
9188            proc: self.proc.clone(),
9189            selection: query,
9190            graphql_client: self.graphql_client.clone(),
9191        }
9192    }
9193    /// Remove the provided dependencies from the module source's dependency list.
9194    ///
9195    /// # Arguments
9196    ///
9197    /// * `dependencies` - The dependencies to remove.
9198    pub fn without_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
9199        let mut query = self.selection.select("withoutDependencies");
9200        query = query.arg(
9201            "dependencies",
9202            dependencies
9203                .into_iter()
9204                .map(|i| i.into())
9205                .collect::<Vec<String>>(),
9206        );
9207        ModuleSource {
9208            proc: self.proc.clone(),
9209            selection: query,
9210            graphql_client: self.graphql_client.clone(),
9211        }
9212    }
9213}
9214#[derive(Clone)]
9215pub struct ObjectTypeDef {
9216    pub proc: Option<Arc<DaggerSessionProc>>,
9217    pub selection: Selection,
9218    pub graphql_client: DynGraphQLClient,
9219}
9220impl ObjectTypeDef {
9221    /// The function used to construct new instances of this object, if any
9222    pub fn constructor(&self) -> Function {
9223        let query = self.selection.select("constructor");
9224        Function {
9225            proc: self.proc.clone(),
9226            selection: query,
9227            graphql_client: self.graphql_client.clone(),
9228        }
9229    }
9230    /// The doc string for the object, if any.
9231    pub async fn description(&self) -> Result<String, DaggerError> {
9232        let query = self.selection.select("description");
9233        query.execute(self.graphql_client.clone()).await
9234    }
9235    /// Static fields defined on this object, if any.
9236    pub fn fields(&self) -> Vec<FieldTypeDef> {
9237        let query = self.selection.select("fields");
9238        vec![FieldTypeDef {
9239            proc: self.proc.clone(),
9240            selection: query,
9241            graphql_client: self.graphql_client.clone(),
9242        }]
9243    }
9244    /// Functions defined on this object, if any.
9245    pub fn functions(&self) -> Vec<Function> {
9246        let query = self.selection.select("functions");
9247        vec![Function {
9248            proc: self.proc.clone(),
9249            selection: query,
9250            graphql_client: self.graphql_client.clone(),
9251        }]
9252    }
9253    /// A unique identifier for this ObjectTypeDef.
9254    pub async fn id(&self) -> Result<ObjectTypeDefId, DaggerError> {
9255        let query = self.selection.select("id");
9256        query.execute(self.graphql_client.clone()).await
9257    }
9258    /// The name of the object.
9259    pub async fn name(&self) -> Result<String, DaggerError> {
9260        let query = self.selection.select("name");
9261        query.execute(self.graphql_client.clone()).await
9262    }
9263    /// The location of this object declaration.
9264    pub fn source_map(&self) -> SourceMap {
9265        let query = self.selection.select("sourceMap");
9266        SourceMap {
9267            proc: self.proc.clone(),
9268            selection: query,
9269            graphql_client: self.graphql_client.clone(),
9270        }
9271    }
9272    /// If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.
9273    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
9274        let query = self.selection.select("sourceModuleName");
9275        query.execute(self.graphql_client.clone()).await
9276    }
9277}
9278#[derive(Clone)]
9279pub struct Port {
9280    pub proc: Option<Arc<DaggerSessionProc>>,
9281    pub selection: Selection,
9282    pub graphql_client: DynGraphQLClient,
9283}
9284impl Port {
9285    /// The port description.
9286    pub async fn description(&self) -> Result<String, DaggerError> {
9287        let query = self.selection.select("description");
9288        query.execute(self.graphql_client.clone()).await
9289    }
9290    /// Skip the health check when run as a service.
9291    pub async fn experimental_skip_healthcheck(&self) -> Result<bool, DaggerError> {
9292        let query = self.selection.select("experimentalSkipHealthcheck");
9293        query.execute(self.graphql_client.clone()).await
9294    }
9295    /// A unique identifier for this Port.
9296    pub async fn id(&self) -> Result<PortId, DaggerError> {
9297        let query = self.selection.select("id");
9298        query.execute(self.graphql_client.clone()).await
9299    }
9300    /// The port number.
9301    pub async fn port(&self) -> Result<isize, DaggerError> {
9302        let query = self.selection.select("port");
9303        query.execute(self.graphql_client.clone()).await
9304    }
9305    /// The transport layer protocol.
9306    pub async fn protocol(&self) -> Result<NetworkProtocol, DaggerError> {
9307        let query = self.selection.select("protocol");
9308        query.execute(self.graphql_client.clone()).await
9309    }
9310}
9311#[derive(Clone)]
9312pub struct Query {
9313    pub proc: Option<Arc<DaggerSessionProc>>,
9314    pub selection: Selection,
9315    pub graphql_client: DynGraphQLClient,
9316}
9317#[derive(Builder, Debug, PartialEq)]
9318pub struct QueryCacheVolumeOpts<'a> {
9319    #[builder(setter(into, strip_option), default)]
9320    pub namespace: Option<&'a str>,
9321}
9322#[derive(Builder, Debug, PartialEq)]
9323pub struct QueryContainerOpts {
9324    /// Platform to initialize the container with.
9325    #[builder(setter(into, strip_option), default)]
9326    pub platform: Option<Platform>,
9327}
9328#[derive(Builder, Debug, PartialEq)]
9329pub struct QueryGitOpts<'a> {
9330    /// A service which must be started before the repo is fetched.
9331    #[builder(setter(into, strip_option), default)]
9332    pub experimental_service_host: Option<ServiceId>,
9333    /// DEPRECATED: Set to true to keep .git directory.
9334    #[builder(setter(into, strip_option), default)]
9335    pub keep_git_dir: Option<bool>,
9336    /// Set SSH auth socket
9337    #[builder(setter(into, strip_option), default)]
9338    pub ssh_auth_socket: Option<SocketId>,
9339    /// Set SSH known hosts
9340    #[builder(setter(into, strip_option), default)]
9341    pub ssh_known_hosts: Option<&'a str>,
9342}
9343#[derive(Builder, Debug, PartialEq)]
9344pub struct QueryHttpOpts {
9345    /// A service which must be started before the URL is fetched.
9346    #[builder(setter(into, strip_option), default)]
9347    pub experimental_service_host: Option<ServiceId>,
9348}
9349#[derive(Builder, Debug, PartialEq)]
9350pub struct QueryLlmOpts<'a> {
9351    /// Cap the number of API calls for this LLM
9352    #[builder(setter(into, strip_option), default)]
9353    pub max_api_calls: Option<isize>,
9354    /// Model to use
9355    #[builder(setter(into, strip_option), default)]
9356    pub model: Option<&'a str>,
9357}
9358#[derive(Builder, Debug, PartialEq)]
9359pub struct QueryLoadSecretFromNameOpts<'a> {
9360    #[builder(setter(into, strip_option), default)]
9361    pub accessor: Option<&'a str>,
9362}
9363#[derive(Builder, Debug, PartialEq)]
9364pub struct QueryModuleSourceOpts<'a> {
9365    /// 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.
9366    #[builder(setter(into, strip_option), default)]
9367    pub allow_not_exists: Option<bool>,
9368    /// If true, do not attempt to find dagger.json in a parent directory of the provided path. Only relevant for local module sources.
9369    #[builder(setter(into, strip_option), default)]
9370    pub disable_find_up: Option<bool>,
9371    /// The pinned version of the module source
9372    #[builder(setter(into, strip_option), default)]
9373    pub ref_pin: Option<&'a str>,
9374    /// If set, error out if the ref string is not of the provided requireKind.
9375    #[builder(setter(into, strip_option), default)]
9376    pub require_kind: Option<ModuleSourceKind>,
9377}
9378impl Query {
9379    /// Constructs a cache volume for a given cache key.
9380    ///
9381    /// # Arguments
9382    ///
9383    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
9384    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9385    pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume {
9386        let mut query = self.selection.select("cacheVolume");
9387        query = query.arg("key", key.into());
9388        CacheVolume {
9389            proc: self.proc.clone(),
9390            selection: query,
9391            graphql_client: self.graphql_client.clone(),
9392        }
9393    }
9394    /// Constructs a cache volume for a given cache key.
9395    ///
9396    /// # Arguments
9397    ///
9398    /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache").
9399    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9400    pub fn cache_volume_opts<'a>(
9401        &self,
9402        key: impl Into<String>,
9403        opts: QueryCacheVolumeOpts<'a>,
9404    ) -> CacheVolume {
9405        let mut query = self.selection.select("cacheVolume");
9406        query = query.arg("key", key.into());
9407        if let Some(namespace) = opts.namespace {
9408            query = query.arg("namespace", namespace);
9409        }
9410        CacheVolume {
9411            proc: self.proc.clone(),
9412            selection: query,
9413            graphql_client: self.graphql_client.clone(),
9414        }
9415    }
9416    /// Creates a scratch container.
9417    /// Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.
9418    ///
9419    /// # Arguments
9420    ///
9421    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9422    pub fn container(&self) -> Container {
9423        let query = self.selection.select("container");
9424        Container {
9425            proc: self.proc.clone(),
9426            selection: query,
9427            graphql_client: self.graphql_client.clone(),
9428        }
9429    }
9430    /// Creates a scratch container.
9431    /// Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.
9432    ///
9433    /// # Arguments
9434    ///
9435    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9436    pub fn container_opts(&self, opts: QueryContainerOpts) -> Container {
9437        let mut query = self.selection.select("container");
9438        if let Some(platform) = opts.platform {
9439            query = query.arg("platform", platform);
9440        }
9441        Container {
9442            proc: self.proc.clone(),
9443            selection: query,
9444            graphql_client: self.graphql_client.clone(),
9445        }
9446    }
9447    /// The FunctionCall context that the SDK caller is currently executing in.
9448    /// If the caller is not currently executing in a function, this will return an error.
9449    pub fn current_function_call(&self) -> FunctionCall {
9450        let query = self.selection.select("currentFunctionCall");
9451        FunctionCall {
9452            proc: self.proc.clone(),
9453            selection: query,
9454            graphql_client: self.graphql_client.clone(),
9455        }
9456    }
9457    /// The module currently being served in the session, if any.
9458    pub fn current_module(&self) -> CurrentModule {
9459        let query = self.selection.select("currentModule");
9460        CurrentModule {
9461            proc: self.proc.clone(),
9462            selection: query,
9463            graphql_client: self.graphql_client.clone(),
9464        }
9465    }
9466    /// The TypeDef representations of the objects currently being served in the session.
9467    pub fn current_type_defs(&self) -> Vec<TypeDef> {
9468        let query = self.selection.select("currentTypeDefs");
9469        vec![TypeDef {
9470            proc: self.proc.clone(),
9471            selection: query,
9472            graphql_client: self.graphql_client.clone(),
9473        }]
9474    }
9475    /// The default platform of the engine.
9476    pub async fn default_platform(&self) -> Result<Platform, DaggerError> {
9477        let query = self.selection.select("defaultPlatform");
9478        query.execute(self.graphql_client.clone()).await
9479    }
9480    /// Creates an empty directory.
9481    pub fn directory(&self) -> Directory {
9482        let query = self.selection.select("directory");
9483        Directory {
9484            proc: self.proc.clone(),
9485            selection: query,
9486            graphql_client: self.graphql_client.clone(),
9487        }
9488    }
9489    /// The Dagger engine container configuration and state
9490    pub fn engine(&self) -> Engine {
9491        let query = self.selection.select("engine");
9492        Engine {
9493            proc: self.proc.clone(),
9494            selection: query,
9495            graphql_client: self.graphql_client.clone(),
9496        }
9497    }
9498    /// Create a new error.
9499    ///
9500    /// # Arguments
9501    ///
9502    /// * `message` - A brief description of the error.
9503    pub fn error(&self, message: impl Into<String>) -> Error {
9504        let mut query = self.selection.select("error");
9505        query = query.arg("message", message.into());
9506        Error {
9507            proc: self.proc.clone(),
9508            selection: query,
9509            graphql_client: self.graphql_client.clone(),
9510        }
9511    }
9512    /// Creates a function.
9513    ///
9514    /// # Arguments
9515    ///
9516    /// * `name` - Name of the function, in its original format from the implementation language.
9517    /// * `return_type` - Return type of the function.
9518    pub fn function(
9519        &self,
9520        name: impl Into<String>,
9521        return_type: impl IntoID<TypeDefId>,
9522    ) -> Function {
9523        let mut query = self.selection.select("function");
9524        query = query.arg("name", name.into());
9525        query = query.arg_lazy(
9526            "returnType",
9527            Box::new(move || {
9528                let return_type = return_type.clone();
9529                Box::pin(async move { return_type.into_id().await.unwrap().quote() })
9530            }),
9531        );
9532        Function {
9533            proc: self.proc.clone(),
9534            selection: query,
9535            graphql_client: self.graphql_client.clone(),
9536        }
9537    }
9538    /// Create a code generation result, given a directory containing the generated code.
9539    pub fn generated_code(&self, code: impl IntoID<DirectoryId>) -> GeneratedCode {
9540        let mut query = self.selection.select("generatedCode");
9541        query = query.arg_lazy(
9542            "code",
9543            Box::new(move || {
9544                let code = code.clone();
9545                Box::pin(async move { code.into_id().await.unwrap().quote() })
9546            }),
9547        );
9548        GeneratedCode {
9549            proc: self.proc.clone(),
9550            selection: query,
9551            graphql_client: self.graphql_client.clone(),
9552        }
9553    }
9554    /// Queries a Git repository.
9555    ///
9556    /// # Arguments
9557    ///
9558    /// * `url` - URL of the git repository.
9559    ///
9560    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
9561    ///
9562    /// Suffix ".git" is optional.
9563    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9564    pub fn git(&self, url: impl Into<String>) -> GitRepository {
9565        let mut query = self.selection.select("git");
9566        query = query.arg("url", url.into());
9567        GitRepository {
9568            proc: self.proc.clone(),
9569            selection: query,
9570            graphql_client: self.graphql_client.clone(),
9571        }
9572    }
9573    /// Queries a Git repository.
9574    ///
9575    /// # Arguments
9576    ///
9577    /// * `url` - URL of the git repository.
9578    ///
9579    /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`.
9580    ///
9581    /// Suffix ".git" is optional.
9582    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9583    pub fn git_opts<'a>(&self, url: impl Into<String>, opts: QueryGitOpts<'a>) -> GitRepository {
9584        let mut query = self.selection.select("git");
9585        query = query.arg("url", url.into());
9586        if let Some(keep_git_dir) = opts.keep_git_dir {
9587            query = query.arg("keepGitDir", keep_git_dir);
9588        }
9589        if let Some(experimental_service_host) = opts.experimental_service_host {
9590            query = query.arg("experimentalServiceHost", experimental_service_host);
9591        }
9592        if let Some(ssh_known_hosts) = opts.ssh_known_hosts {
9593            query = query.arg("sshKnownHosts", ssh_known_hosts);
9594        }
9595        if let Some(ssh_auth_socket) = opts.ssh_auth_socket {
9596            query = query.arg("sshAuthSocket", ssh_auth_socket);
9597        }
9598        GitRepository {
9599            proc: self.proc.clone(),
9600            selection: query,
9601            graphql_client: self.graphql_client.clone(),
9602        }
9603    }
9604    /// Queries the host environment.
9605    pub fn host(&self) -> Host {
9606        let query = self.selection.select("host");
9607        Host {
9608            proc: self.proc.clone(),
9609            selection: query,
9610            graphql_client: self.graphql_client.clone(),
9611        }
9612    }
9613    /// Returns a file containing an http remote url content.
9614    ///
9615    /// # Arguments
9616    ///
9617    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
9618    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9619    pub fn http(&self, url: impl Into<String>) -> File {
9620        let mut query = self.selection.select("http");
9621        query = query.arg("url", url.into());
9622        File {
9623            proc: self.proc.clone(),
9624            selection: query,
9625            graphql_client: self.graphql_client.clone(),
9626        }
9627    }
9628    /// Returns a file containing an http remote url content.
9629    ///
9630    /// # Arguments
9631    ///
9632    /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io").
9633    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9634    pub fn http_opts(&self, url: impl Into<String>, opts: QueryHttpOpts) -> File {
9635        let mut query = self.selection.select("http");
9636        query = query.arg("url", url.into());
9637        if let Some(experimental_service_host) = opts.experimental_service_host {
9638            query = query.arg("experimentalServiceHost", experimental_service_host);
9639        }
9640        File {
9641            proc: self.proc.clone(),
9642            selection: query,
9643            graphql_client: self.graphql_client.clone(),
9644        }
9645    }
9646    /// Initialize a Large Language Model (LLM)
9647    ///
9648    /// # Arguments
9649    ///
9650    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9651    pub fn llm(&self) -> Llm {
9652        let query = self.selection.select("llm");
9653        Llm {
9654            proc: self.proc.clone(),
9655            selection: query,
9656            graphql_client: self.graphql_client.clone(),
9657        }
9658    }
9659    /// Initialize a Large Language Model (LLM)
9660    ///
9661    /// # Arguments
9662    ///
9663    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
9664    pub fn llm_opts<'a>(&self, opts: QueryLlmOpts<'a>) -> Llm {
9665        let mut query = self.selection.select("llm");
9666        if let Some(model) = opts.model {
9667            query = query.arg("model", model);
9668        }
9669        if let Some(max_api_calls) = opts.max_api_calls {
9670            query = query.arg("maxAPICalls", max_api_calls);
9671        }
9672        Llm {
9673            proc: self.proc.clone(),
9674            selection: query,
9675            graphql_client: self.graphql_client.clone(),
9676        }
9677    }
9678    /// Load a CacheVolume from its ID.
9679    pub fn load_cache_volume_from_id(&self, id: impl IntoID<CacheVolumeId>) -> CacheVolume {
9680        let mut query = self.selection.select("loadCacheVolumeFromID");
9681        query = query.arg_lazy(
9682            "id",
9683            Box::new(move || {
9684                let id = id.clone();
9685                Box::pin(async move { id.into_id().await.unwrap().quote() })
9686            }),
9687        );
9688        CacheVolume {
9689            proc: self.proc.clone(),
9690            selection: query,
9691            graphql_client: self.graphql_client.clone(),
9692        }
9693    }
9694    /// Load a Container from its ID.
9695    pub fn load_container_from_id(&self, id: impl IntoID<ContainerId>) -> Container {
9696        let mut query = self.selection.select("loadContainerFromID");
9697        query = query.arg_lazy(
9698            "id",
9699            Box::new(move || {
9700                let id = id.clone();
9701                Box::pin(async move { id.into_id().await.unwrap().quote() })
9702            }),
9703        );
9704        Container {
9705            proc: self.proc.clone(),
9706            selection: query,
9707            graphql_client: self.graphql_client.clone(),
9708        }
9709    }
9710    /// Load a CurrentModule from its ID.
9711    pub fn load_current_module_from_id(&self, id: impl IntoID<CurrentModuleId>) -> CurrentModule {
9712        let mut query = self.selection.select("loadCurrentModuleFromID");
9713        query = query.arg_lazy(
9714            "id",
9715            Box::new(move || {
9716                let id = id.clone();
9717                Box::pin(async move { id.into_id().await.unwrap().quote() })
9718            }),
9719        );
9720        CurrentModule {
9721            proc: self.proc.clone(),
9722            selection: query,
9723            graphql_client: self.graphql_client.clone(),
9724        }
9725    }
9726    /// Load a Directory from its ID.
9727    pub fn load_directory_from_id(&self, id: impl IntoID<DirectoryId>) -> Directory {
9728        let mut query = self.selection.select("loadDirectoryFromID");
9729        query = query.arg_lazy(
9730            "id",
9731            Box::new(move || {
9732                let id = id.clone();
9733                Box::pin(async move { id.into_id().await.unwrap().quote() })
9734            }),
9735        );
9736        Directory {
9737            proc: self.proc.clone(),
9738            selection: query,
9739            graphql_client: self.graphql_client.clone(),
9740        }
9741    }
9742    /// Load a EngineCacheEntry from its ID.
9743    pub fn load_engine_cache_entry_from_id(
9744        &self,
9745        id: impl IntoID<EngineCacheEntryId>,
9746    ) -> EngineCacheEntry {
9747        let mut query = self.selection.select("loadEngineCacheEntryFromID");
9748        query = query.arg_lazy(
9749            "id",
9750            Box::new(move || {
9751                let id = id.clone();
9752                Box::pin(async move { id.into_id().await.unwrap().quote() })
9753            }),
9754        );
9755        EngineCacheEntry {
9756            proc: self.proc.clone(),
9757            selection: query,
9758            graphql_client: self.graphql_client.clone(),
9759        }
9760    }
9761    /// Load a EngineCacheEntrySet from its ID.
9762    pub fn load_engine_cache_entry_set_from_id(
9763        &self,
9764        id: impl IntoID<EngineCacheEntrySetId>,
9765    ) -> EngineCacheEntrySet {
9766        let mut query = self.selection.select("loadEngineCacheEntrySetFromID");
9767        query = query.arg_lazy(
9768            "id",
9769            Box::new(move || {
9770                let id = id.clone();
9771                Box::pin(async move { id.into_id().await.unwrap().quote() })
9772            }),
9773        );
9774        EngineCacheEntrySet {
9775            proc: self.proc.clone(),
9776            selection: query,
9777            graphql_client: self.graphql_client.clone(),
9778        }
9779    }
9780    /// Load a EngineCache from its ID.
9781    pub fn load_engine_cache_from_id(&self, id: impl IntoID<EngineCacheId>) -> EngineCache {
9782        let mut query = self.selection.select("loadEngineCacheFromID");
9783        query = query.arg_lazy(
9784            "id",
9785            Box::new(move || {
9786                let id = id.clone();
9787                Box::pin(async move { id.into_id().await.unwrap().quote() })
9788            }),
9789        );
9790        EngineCache {
9791            proc: self.proc.clone(),
9792            selection: query,
9793            graphql_client: self.graphql_client.clone(),
9794        }
9795    }
9796    /// Load a Engine from its ID.
9797    pub fn load_engine_from_id(&self, id: impl IntoID<EngineId>) -> Engine {
9798        let mut query = self.selection.select("loadEngineFromID");
9799        query = query.arg_lazy(
9800            "id",
9801            Box::new(move || {
9802                let id = id.clone();
9803                Box::pin(async move { id.into_id().await.unwrap().quote() })
9804            }),
9805        );
9806        Engine {
9807            proc: self.proc.clone(),
9808            selection: query,
9809            graphql_client: self.graphql_client.clone(),
9810        }
9811    }
9812    /// Load a EnumTypeDef from its ID.
9813    pub fn load_enum_type_def_from_id(&self, id: impl IntoID<EnumTypeDefId>) -> EnumTypeDef {
9814        let mut query = self.selection.select("loadEnumTypeDefFromID");
9815        query = query.arg_lazy(
9816            "id",
9817            Box::new(move || {
9818                let id = id.clone();
9819                Box::pin(async move { id.into_id().await.unwrap().quote() })
9820            }),
9821        );
9822        EnumTypeDef {
9823            proc: self.proc.clone(),
9824            selection: query,
9825            graphql_client: self.graphql_client.clone(),
9826        }
9827    }
9828    /// Load a EnumValueTypeDef from its ID.
9829    pub fn load_enum_value_type_def_from_id(
9830        &self,
9831        id: impl IntoID<EnumValueTypeDefId>,
9832    ) -> EnumValueTypeDef {
9833        let mut query = self.selection.select("loadEnumValueTypeDefFromID");
9834        query = query.arg_lazy(
9835            "id",
9836            Box::new(move || {
9837                let id = id.clone();
9838                Box::pin(async move { id.into_id().await.unwrap().quote() })
9839            }),
9840        );
9841        EnumValueTypeDef {
9842            proc: self.proc.clone(),
9843            selection: query,
9844            graphql_client: self.graphql_client.clone(),
9845        }
9846    }
9847    /// Load a EnvVariable from its ID.
9848    pub fn load_env_variable_from_id(&self, id: impl IntoID<EnvVariableId>) -> EnvVariable {
9849        let mut query = self.selection.select("loadEnvVariableFromID");
9850        query = query.arg_lazy(
9851            "id",
9852            Box::new(move || {
9853                let id = id.clone();
9854                Box::pin(async move { id.into_id().await.unwrap().quote() })
9855            }),
9856        );
9857        EnvVariable {
9858            proc: self.proc.clone(),
9859            selection: query,
9860            graphql_client: self.graphql_client.clone(),
9861        }
9862    }
9863    /// Load a Error from its ID.
9864    pub fn load_error_from_id(&self, id: impl IntoID<ErrorId>) -> Error {
9865        let mut query = self.selection.select("loadErrorFromID");
9866        query = query.arg_lazy(
9867            "id",
9868            Box::new(move || {
9869                let id = id.clone();
9870                Box::pin(async move { id.into_id().await.unwrap().quote() })
9871            }),
9872        );
9873        Error {
9874            proc: self.proc.clone(),
9875            selection: query,
9876            graphql_client: self.graphql_client.clone(),
9877        }
9878    }
9879    /// Load a ErrorValue from its ID.
9880    pub fn load_error_value_from_id(&self, id: impl IntoID<ErrorValueId>) -> ErrorValue {
9881        let mut query = self.selection.select("loadErrorValueFromID");
9882        query = query.arg_lazy(
9883            "id",
9884            Box::new(move || {
9885                let id = id.clone();
9886                Box::pin(async move { id.into_id().await.unwrap().quote() })
9887            }),
9888        );
9889        ErrorValue {
9890            proc: self.proc.clone(),
9891            selection: query,
9892            graphql_client: self.graphql_client.clone(),
9893        }
9894    }
9895    /// Load a FieldTypeDef from its ID.
9896    pub fn load_field_type_def_from_id(&self, id: impl IntoID<FieldTypeDefId>) -> FieldTypeDef {
9897        let mut query = self.selection.select("loadFieldTypeDefFromID");
9898        query = query.arg_lazy(
9899            "id",
9900            Box::new(move || {
9901                let id = id.clone();
9902                Box::pin(async move { id.into_id().await.unwrap().quote() })
9903            }),
9904        );
9905        FieldTypeDef {
9906            proc: self.proc.clone(),
9907            selection: query,
9908            graphql_client: self.graphql_client.clone(),
9909        }
9910    }
9911    /// Load a File from its ID.
9912    pub fn load_file_from_id(&self, id: impl IntoID<FileId>) -> File {
9913        let mut query = self.selection.select("loadFileFromID");
9914        query = query.arg_lazy(
9915            "id",
9916            Box::new(move || {
9917                let id = id.clone();
9918                Box::pin(async move { id.into_id().await.unwrap().quote() })
9919            }),
9920        );
9921        File {
9922            proc: self.proc.clone(),
9923            selection: query,
9924            graphql_client: self.graphql_client.clone(),
9925        }
9926    }
9927    /// Load a FunctionArg from its ID.
9928    pub fn load_function_arg_from_id(&self, id: impl IntoID<FunctionArgId>) -> FunctionArg {
9929        let mut query = self.selection.select("loadFunctionArgFromID");
9930        query = query.arg_lazy(
9931            "id",
9932            Box::new(move || {
9933                let id = id.clone();
9934                Box::pin(async move { id.into_id().await.unwrap().quote() })
9935            }),
9936        );
9937        FunctionArg {
9938            proc: self.proc.clone(),
9939            selection: query,
9940            graphql_client: self.graphql_client.clone(),
9941        }
9942    }
9943    /// Load a FunctionCallArgValue from its ID.
9944    pub fn load_function_call_arg_value_from_id(
9945        &self,
9946        id: impl IntoID<FunctionCallArgValueId>,
9947    ) -> FunctionCallArgValue {
9948        let mut query = self.selection.select("loadFunctionCallArgValueFromID");
9949        query = query.arg_lazy(
9950            "id",
9951            Box::new(move || {
9952                let id = id.clone();
9953                Box::pin(async move { id.into_id().await.unwrap().quote() })
9954            }),
9955        );
9956        FunctionCallArgValue {
9957            proc: self.proc.clone(),
9958            selection: query,
9959            graphql_client: self.graphql_client.clone(),
9960        }
9961    }
9962    /// Load a FunctionCall from its ID.
9963    pub fn load_function_call_from_id(&self, id: impl IntoID<FunctionCallId>) -> FunctionCall {
9964        let mut query = self.selection.select("loadFunctionCallFromID");
9965        query = query.arg_lazy(
9966            "id",
9967            Box::new(move || {
9968                let id = id.clone();
9969                Box::pin(async move { id.into_id().await.unwrap().quote() })
9970            }),
9971        );
9972        FunctionCall {
9973            proc: self.proc.clone(),
9974            selection: query,
9975            graphql_client: self.graphql_client.clone(),
9976        }
9977    }
9978    /// Load a Function from its ID.
9979    pub fn load_function_from_id(&self, id: impl IntoID<FunctionId>) -> Function {
9980        let mut query = self.selection.select("loadFunctionFromID");
9981        query = query.arg_lazy(
9982            "id",
9983            Box::new(move || {
9984                let id = id.clone();
9985                Box::pin(async move { id.into_id().await.unwrap().quote() })
9986            }),
9987        );
9988        Function {
9989            proc: self.proc.clone(),
9990            selection: query,
9991            graphql_client: self.graphql_client.clone(),
9992        }
9993    }
9994    /// Load a GeneratedCode from its ID.
9995    pub fn load_generated_code_from_id(&self, id: impl IntoID<GeneratedCodeId>) -> GeneratedCode {
9996        let mut query = self.selection.select("loadGeneratedCodeFromID");
9997        query = query.arg_lazy(
9998            "id",
9999            Box::new(move || {
10000                let id = id.clone();
10001                Box::pin(async move { id.into_id().await.unwrap().quote() })
10002            }),
10003        );
10004        GeneratedCode {
10005            proc: self.proc.clone(),
10006            selection: query,
10007            graphql_client: self.graphql_client.clone(),
10008        }
10009    }
10010    /// Load a GitRef from its ID.
10011    pub fn load_git_ref_from_id(&self, id: impl IntoID<GitRefId>) -> GitRef {
10012        let mut query = self.selection.select("loadGitRefFromID");
10013        query = query.arg_lazy(
10014            "id",
10015            Box::new(move || {
10016                let id = id.clone();
10017                Box::pin(async move { id.into_id().await.unwrap().quote() })
10018            }),
10019        );
10020        GitRef {
10021            proc: self.proc.clone(),
10022            selection: query,
10023            graphql_client: self.graphql_client.clone(),
10024        }
10025    }
10026    /// Load a GitRepository from its ID.
10027    pub fn load_git_repository_from_id(&self, id: impl IntoID<GitRepositoryId>) -> GitRepository {
10028        let mut query = self.selection.select("loadGitRepositoryFromID");
10029        query = query.arg_lazy(
10030            "id",
10031            Box::new(move || {
10032                let id = id.clone();
10033                Box::pin(async move { id.into_id().await.unwrap().quote() })
10034            }),
10035        );
10036        GitRepository {
10037            proc: self.proc.clone(),
10038            selection: query,
10039            graphql_client: self.graphql_client.clone(),
10040        }
10041    }
10042    /// Load a Host from its ID.
10043    pub fn load_host_from_id(&self, id: impl IntoID<HostId>) -> Host {
10044        let mut query = self.selection.select("loadHostFromID");
10045        query = query.arg_lazy(
10046            "id",
10047            Box::new(move || {
10048                let id = id.clone();
10049                Box::pin(async move { id.into_id().await.unwrap().quote() })
10050            }),
10051        );
10052        Host {
10053            proc: self.proc.clone(),
10054            selection: query,
10055            graphql_client: self.graphql_client.clone(),
10056        }
10057    }
10058    /// Load a InputTypeDef from its ID.
10059    pub fn load_input_type_def_from_id(&self, id: impl IntoID<InputTypeDefId>) -> InputTypeDef {
10060        let mut query = self.selection.select("loadInputTypeDefFromID");
10061        query = query.arg_lazy(
10062            "id",
10063            Box::new(move || {
10064                let id = id.clone();
10065                Box::pin(async move { id.into_id().await.unwrap().quote() })
10066            }),
10067        );
10068        InputTypeDef {
10069            proc: self.proc.clone(),
10070            selection: query,
10071            graphql_client: self.graphql_client.clone(),
10072        }
10073    }
10074    /// Load a InterfaceTypeDef from its ID.
10075    pub fn load_interface_type_def_from_id(
10076        &self,
10077        id: impl IntoID<InterfaceTypeDefId>,
10078    ) -> InterfaceTypeDef {
10079        let mut query = self.selection.select("loadInterfaceTypeDefFromID");
10080        query = query.arg_lazy(
10081            "id",
10082            Box::new(move || {
10083                let id = id.clone();
10084                Box::pin(async move { id.into_id().await.unwrap().quote() })
10085            }),
10086        );
10087        InterfaceTypeDef {
10088            proc: self.proc.clone(),
10089            selection: query,
10090            graphql_client: self.graphql_client.clone(),
10091        }
10092    }
10093    /// Load a LLM from its ID.
10094    pub fn load_llm_from_id(&self, id: impl IntoID<Llmid>) -> Llm {
10095        let mut query = self.selection.select("loadLLMFromID");
10096        query = query.arg_lazy(
10097            "id",
10098            Box::new(move || {
10099                let id = id.clone();
10100                Box::pin(async move { id.into_id().await.unwrap().quote() })
10101            }),
10102        );
10103        Llm {
10104            proc: self.proc.clone(),
10105            selection: query,
10106            graphql_client: self.graphql_client.clone(),
10107        }
10108    }
10109    /// Load a LLMTokenUsage from its ID.
10110    pub fn load_llm_token_usage_from_id(&self, id: impl IntoID<LlmTokenUsageId>) -> LlmTokenUsage {
10111        let mut query = self.selection.select("loadLLMTokenUsageFromID");
10112        query = query.arg_lazy(
10113            "id",
10114            Box::new(move || {
10115                let id = id.clone();
10116                Box::pin(async move { id.into_id().await.unwrap().quote() })
10117            }),
10118        );
10119        LlmTokenUsage {
10120            proc: self.proc.clone(),
10121            selection: query,
10122            graphql_client: self.graphql_client.clone(),
10123        }
10124    }
10125    /// Load a LLMVariable from its ID.
10126    pub fn load_llm_variable_from_id(&self, id: impl IntoID<LlmVariableId>) -> LlmVariable {
10127        let mut query = self.selection.select("loadLLMVariableFromID");
10128        query = query.arg_lazy(
10129            "id",
10130            Box::new(move || {
10131                let id = id.clone();
10132                Box::pin(async move { id.into_id().await.unwrap().quote() })
10133            }),
10134        );
10135        LlmVariable {
10136            proc: self.proc.clone(),
10137            selection: query,
10138            graphql_client: self.graphql_client.clone(),
10139        }
10140    }
10141    /// Load a Label from its ID.
10142    pub fn load_label_from_id(&self, id: impl IntoID<LabelId>) -> Label {
10143        let mut query = self.selection.select("loadLabelFromID");
10144        query = query.arg_lazy(
10145            "id",
10146            Box::new(move || {
10147                let id = id.clone();
10148                Box::pin(async move { id.into_id().await.unwrap().quote() })
10149            }),
10150        );
10151        Label {
10152            proc: self.proc.clone(),
10153            selection: query,
10154            graphql_client: self.graphql_client.clone(),
10155        }
10156    }
10157    /// Load a ListTypeDef from its ID.
10158    pub fn load_list_type_def_from_id(&self, id: impl IntoID<ListTypeDefId>) -> ListTypeDef {
10159        let mut query = self.selection.select("loadListTypeDefFromID");
10160        query = query.arg_lazy(
10161            "id",
10162            Box::new(move || {
10163                let id = id.clone();
10164                Box::pin(async move { id.into_id().await.unwrap().quote() })
10165            }),
10166        );
10167        ListTypeDef {
10168            proc: self.proc.clone(),
10169            selection: query,
10170            graphql_client: self.graphql_client.clone(),
10171        }
10172    }
10173    /// Load a ModuleConfigClient from its ID.
10174    pub fn load_module_config_client_from_id(
10175        &self,
10176        id: impl IntoID<ModuleConfigClientId>,
10177    ) -> ModuleConfigClient {
10178        let mut query = self.selection.select("loadModuleConfigClientFromID");
10179        query = query.arg_lazy(
10180            "id",
10181            Box::new(move || {
10182                let id = id.clone();
10183                Box::pin(async move { id.into_id().await.unwrap().quote() })
10184            }),
10185        );
10186        ModuleConfigClient {
10187            proc: self.proc.clone(),
10188            selection: query,
10189            graphql_client: self.graphql_client.clone(),
10190        }
10191    }
10192    /// Load a Module from its ID.
10193    pub fn load_module_from_id(&self, id: impl IntoID<ModuleId>) -> Module {
10194        let mut query = self.selection.select("loadModuleFromID");
10195        query = query.arg_lazy(
10196            "id",
10197            Box::new(move || {
10198                let id = id.clone();
10199                Box::pin(async move { id.into_id().await.unwrap().quote() })
10200            }),
10201        );
10202        Module {
10203            proc: self.proc.clone(),
10204            selection: query,
10205            graphql_client: self.graphql_client.clone(),
10206        }
10207    }
10208    /// Load a ModuleSource from its ID.
10209    pub fn load_module_source_from_id(&self, id: impl IntoID<ModuleSourceId>) -> ModuleSource {
10210        let mut query = self.selection.select("loadModuleSourceFromID");
10211        query = query.arg_lazy(
10212            "id",
10213            Box::new(move || {
10214                let id = id.clone();
10215                Box::pin(async move { id.into_id().await.unwrap().quote() })
10216            }),
10217        );
10218        ModuleSource {
10219            proc: self.proc.clone(),
10220            selection: query,
10221            graphql_client: self.graphql_client.clone(),
10222        }
10223    }
10224    /// Load a ObjectTypeDef from its ID.
10225    pub fn load_object_type_def_from_id(&self, id: impl IntoID<ObjectTypeDefId>) -> ObjectTypeDef {
10226        let mut query = self.selection.select("loadObjectTypeDefFromID");
10227        query = query.arg_lazy(
10228            "id",
10229            Box::new(move || {
10230                let id = id.clone();
10231                Box::pin(async move { id.into_id().await.unwrap().quote() })
10232            }),
10233        );
10234        ObjectTypeDef {
10235            proc: self.proc.clone(),
10236            selection: query,
10237            graphql_client: self.graphql_client.clone(),
10238        }
10239    }
10240    /// Load a Port from its ID.
10241    pub fn load_port_from_id(&self, id: impl IntoID<PortId>) -> Port {
10242        let mut query = self.selection.select("loadPortFromID");
10243        query = query.arg_lazy(
10244            "id",
10245            Box::new(move || {
10246                let id = id.clone();
10247                Box::pin(async move { id.into_id().await.unwrap().quote() })
10248            }),
10249        );
10250        Port {
10251            proc: self.proc.clone(),
10252            selection: query,
10253            graphql_client: self.graphql_client.clone(),
10254        }
10255    }
10256    /// Load a SDKConfig from its ID.
10257    pub fn load_sdk_config_from_id(&self, id: impl IntoID<SdkConfigId>) -> SdkConfig {
10258        let mut query = self.selection.select("loadSDKConfigFromID");
10259        query = query.arg_lazy(
10260            "id",
10261            Box::new(move || {
10262                let id = id.clone();
10263                Box::pin(async move { id.into_id().await.unwrap().quote() })
10264            }),
10265        );
10266        SdkConfig {
10267            proc: self.proc.clone(),
10268            selection: query,
10269            graphql_client: self.graphql_client.clone(),
10270        }
10271    }
10272    /// Load a ScalarTypeDef from its ID.
10273    pub fn load_scalar_type_def_from_id(&self, id: impl IntoID<ScalarTypeDefId>) -> ScalarTypeDef {
10274        let mut query = self.selection.select("loadScalarTypeDefFromID");
10275        query = query.arg_lazy(
10276            "id",
10277            Box::new(move || {
10278                let id = id.clone();
10279                Box::pin(async move { id.into_id().await.unwrap().quote() })
10280            }),
10281        );
10282        ScalarTypeDef {
10283            proc: self.proc.clone(),
10284            selection: query,
10285            graphql_client: self.graphql_client.clone(),
10286        }
10287    }
10288    /// Load a Secret from its ID.
10289    pub fn load_secret_from_id(&self, id: impl IntoID<SecretId>) -> Secret {
10290        let mut query = self.selection.select("loadSecretFromID");
10291        query = query.arg_lazy(
10292            "id",
10293            Box::new(move || {
10294                let id = id.clone();
10295                Box::pin(async move { id.into_id().await.unwrap().quote() })
10296            }),
10297        );
10298        Secret {
10299            proc: self.proc.clone(),
10300            selection: query,
10301            graphql_client: self.graphql_client.clone(),
10302        }
10303    }
10304    /// Load a Secret from its Name.
10305    ///
10306    /// # Arguments
10307    ///
10308    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10309    pub fn load_secret_from_name(&self, name: impl Into<String>) -> Secret {
10310        let mut query = self.selection.select("loadSecretFromName");
10311        query = query.arg("name", name.into());
10312        Secret {
10313            proc: self.proc.clone(),
10314            selection: query,
10315            graphql_client: self.graphql_client.clone(),
10316        }
10317    }
10318    /// Load a Secret from its Name.
10319    ///
10320    /// # Arguments
10321    ///
10322    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10323    pub fn load_secret_from_name_opts<'a>(
10324        &self,
10325        name: impl Into<String>,
10326        opts: QueryLoadSecretFromNameOpts<'a>,
10327    ) -> Secret {
10328        let mut query = self.selection.select("loadSecretFromName");
10329        query = query.arg("name", name.into());
10330        if let Some(accessor) = opts.accessor {
10331            query = query.arg("accessor", accessor);
10332        }
10333        Secret {
10334            proc: self.proc.clone(),
10335            selection: query,
10336            graphql_client: self.graphql_client.clone(),
10337        }
10338    }
10339    /// Load a Service from its ID.
10340    pub fn load_service_from_id(&self, id: impl IntoID<ServiceId>) -> Service {
10341        let mut query = self.selection.select("loadServiceFromID");
10342        query = query.arg_lazy(
10343            "id",
10344            Box::new(move || {
10345                let id = id.clone();
10346                Box::pin(async move { id.into_id().await.unwrap().quote() })
10347            }),
10348        );
10349        Service {
10350            proc: self.proc.clone(),
10351            selection: query,
10352            graphql_client: self.graphql_client.clone(),
10353        }
10354    }
10355    /// Load a Socket from its ID.
10356    pub fn load_socket_from_id(&self, id: impl IntoID<SocketId>) -> Socket {
10357        let mut query = self.selection.select("loadSocketFromID");
10358        query = query.arg_lazy(
10359            "id",
10360            Box::new(move || {
10361                let id = id.clone();
10362                Box::pin(async move { id.into_id().await.unwrap().quote() })
10363            }),
10364        );
10365        Socket {
10366            proc: self.proc.clone(),
10367            selection: query,
10368            graphql_client: self.graphql_client.clone(),
10369        }
10370    }
10371    /// Load a SourceMap from its ID.
10372    pub fn load_source_map_from_id(&self, id: impl IntoID<SourceMapId>) -> SourceMap {
10373        let mut query = self.selection.select("loadSourceMapFromID");
10374        query = query.arg_lazy(
10375            "id",
10376            Box::new(move || {
10377                let id = id.clone();
10378                Box::pin(async move { id.into_id().await.unwrap().quote() })
10379            }),
10380        );
10381        SourceMap {
10382            proc: self.proc.clone(),
10383            selection: query,
10384            graphql_client: self.graphql_client.clone(),
10385        }
10386    }
10387    /// Load a Terminal from its ID.
10388    pub fn load_terminal_from_id(&self, id: impl IntoID<TerminalId>) -> Terminal {
10389        let mut query = self.selection.select("loadTerminalFromID");
10390        query = query.arg_lazy(
10391            "id",
10392            Box::new(move || {
10393                let id = id.clone();
10394                Box::pin(async move { id.into_id().await.unwrap().quote() })
10395            }),
10396        );
10397        Terminal {
10398            proc: self.proc.clone(),
10399            selection: query,
10400            graphql_client: self.graphql_client.clone(),
10401        }
10402    }
10403    /// Load a TypeDef from its ID.
10404    pub fn load_type_def_from_id(&self, id: impl IntoID<TypeDefId>) -> TypeDef {
10405        let mut query = self.selection.select("loadTypeDefFromID");
10406        query = query.arg_lazy(
10407            "id",
10408            Box::new(move || {
10409                let id = id.clone();
10410                Box::pin(async move { id.into_id().await.unwrap().quote() })
10411            }),
10412        );
10413        TypeDef {
10414            proc: self.proc.clone(),
10415            selection: query,
10416            graphql_client: self.graphql_client.clone(),
10417        }
10418    }
10419    /// Create a new module.
10420    pub fn module(&self) -> Module {
10421        let query = self.selection.select("module");
10422        Module {
10423            proc: self.proc.clone(),
10424            selection: query,
10425            graphql_client: self.graphql_client.clone(),
10426        }
10427    }
10428    /// Create a new module source instance from a source ref string
10429    ///
10430    /// # Arguments
10431    ///
10432    /// * `ref_string` - The string ref representation of the module source
10433    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10434    pub fn module_source(&self, ref_string: impl Into<String>) -> ModuleSource {
10435        let mut query = self.selection.select("moduleSource");
10436        query = query.arg("refString", ref_string.into());
10437        ModuleSource {
10438            proc: self.proc.clone(),
10439            selection: query,
10440            graphql_client: self.graphql_client.clone(),
10441        }
10442    }
10443    /// Create a new module source instance from a source ref string
10444    ///
10445    /// # Arguments
10446    ///
10447    /// * `ref_string` - The string ref representation of the module source
10448    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10449    pub fn module_source_opts<'a>(
10450        &self,
10451        ref_string: impl Into<String>,
10452        opts: QueryModuleSourceOpts<'a>,
10453    ) -> ModuleSource {
10454        let mut query = self.selection.select("moduleSource");
10455        query = query.arg("refString", ref_string.into());
10456        if let Some(ref_pin) = opts.ref_pin {
10457            query = query.arg("refPin", ref_pin);
10458        }
10459        if let Some(disable_find_up) = opts.disable_find_up {
10460            query = query.arg("disableFindUp", disable_find_up);
10461        }
10462        if let Some(allow_not_exists) = opts.allow_not_exists {
10463            query = query.arg("allowNotExists", allow_not_exists);
10464        }
10465        if let Some(require_kind) = opts.require_kind {
10466            query = query.arg("requireKind", require_kind);
10467        }
10468        ModuleSource {
10469            proc: self.proc.clone(),
10470            selection: query,
10471            graphql_client: self.graphql_client.clone(),
10472        }
10473    }
10474    /// Creates a new secret.
10475    ///
10476    /// # Arguments
10477    ///
10478    /// * `uri` - The URI of the secret store
10479    pub fn secret(&self, uri: impl Into<String>) -> Secret {
10480        let mut query = self.selection.select("secret");
10481        query = query.arg("uri", uri.into());
10482        Secret {
10483            proc: self.proc.clone(),
10484            selection: query,
10485            graphql_client: self.graphql_client.clone(),
10486        }
10487    }
10488    /// Sets a secret given a user defined name to its plaintext and returns the secret.
10489    /// The plaintext value is limited to a size of 128000 bytes.
10490    ///
10491    /// # Arguments
10492    ///
10493    /// * `name` - The user defined name for this secret
10494    /// * `plaintext` - The plaintext of the secret
10495    pub fn set_secret(&self, name: impl Into<String>, plaintext: impl Into<String>) -> Secret {
10496        let mut query = self.selection.select("setSecret");
10497        query = query.arg("name", name.into());
10498        query = query.arg("plaintext", plaintext.into());
10499        Secret {
10500            proc: self.proc.clone(),
10501            selection: query,
10502            graphql_client: self.graphql_client.clone(),
10503        }
10504    }
10505    /// Creates source map metadata.
10506    ///
10507    /// # Arguments
10508    ///
10509    /// * `filename` - The filename from the module source.
10510    /// * `line` - The line number within the filename.
10511    /// * `column` - The column number within the line.
10512    pub fn source_map(&self, filename: impl Into<String>, line: isize, column: isize) -> SourceMap {
10513        let mut query = self.selection.select("sourceMap");
10514        query = query.arg("filename", filename.into());
10515        query = query.arg("line", line);
10516        query = query.arg("column", column);
10517        SourceMap {
10518            proc: self.proc.clone(),
10519            selection: query,
10520            graphql_client: self.graphql_client.clone(),
10521        }
10522    }
10523    /// Create a new TypeDef.
10524    pub fn type_def(&self) -> TypeDef {
10525        let query = self.selection.select("typeDef");
10526        TypeDef {
10527            proc: self.proc.clone(),
10528            selection: query,
10529            graphql_client: self.graphql_client.clone(),
10530        }
10531    }
10532    /// Get the current Dagger Engine version.
10533    pub async fn version(&self) -> Result<String, DaggerError> {
10534        let query = self.selection.select("version");
10535        query.execute(self.graphql_client.clone()).await
10536    }
10537}
10538#[derive(Clone)]
10539pub struct SdkConfig {
10540    pub proc: Option<Arc<DaggerSessionProc>>,
10541    pub selection: Selection,
10542    pub graphql_client: DynGraphQLClient,
10543}
10544impl SdkConfig {
10545    /// A unique identifier for this SDKConfig.
10546    pub async fn id(&self) -> Result<SdkConfigId, DaggerError> {
10547        let query = self.selection.select("id");
10548        query.execute(self.graphql_client.clone()).await
10549    }
10550    /// Source of the SDK. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.
10551    pub async fn source(&self) -> Result<String, DaggerError> {
10552        let query = self.selection.select("source");
10553        query.execute(self.graphql_client.clone()).await
10554    }
10555}
10556#[derive(Clone)]
10557pub struct ScalarTypeDef {
10558    pub proc: Option<Arc<DaggerSessionProc>>,
10559    pub selection: Selection,
10560    pub graphql_client: DynGraphQLClient,
10561}
10562impl ScalarTypeDef {
10563    /// A doc string for the scalar, if any.
10564    pub async fn description(&self) -> Result<String, DaggerError> {
10565        let query = self.selection.select("description");
10566        query.execute(self.graphql_client.clone()).await
10567    }
10568    /// A unique identifier for this ScalarTypeDef.
10569    pub async fn id(&self) -> Result<ScalarTypeDefId, DaggerError> {
10570        let query = self.selection.select("id");
10571        query.execute(self.graphql_client.clone()).await
10572    }
10573    /// The name of the scalar.
10574    pub async fn name(&self) -> Result<String, DaggerError> {
10575        let query = self.selection.select("name");
10576        query.execute(self.graphql_client.clone()).await
10577    }
10578    /// If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise.
10579    pub async fn source_module_name(&self) -> Result<String, DaggerError> {
10580        let query = self.selection.select("sourceModuleName");
10581        query.execute(self.graphql_client.clone()).await
10582    }
10583}
10584#[derive(Clone)]
10585pub struct Secret {
10586    pub proc: Option<Arc<DaggerSessionProc>>,
10587    pub selection: Selection,
10588    pub graphql_client: DynGraphQLClient,
10589}
10590impl Secret {
10591    /// A unique identifier for this Secret.
10592    pub async fn id(&self) -> Result<SecretId, DaggerError> {
10593        let query = self.selection.select("id");
10594        query.execute(self.graphql_client.clone()).await
10595    }
10596    /// The name of this secret.
10597    pub async fn name(&self) -> Result<String, DaggerError> {
10598        let query = self.selection.select("name");
10599        query.execute(self.graphql_client.clone()).await
10600    }
10601    /// The value of this secret.
10602    pub async fn plaintext(&self) -> Result<String, DaggerError> {
10603        let query = self.selection.select("plaintext");
10604        query.execute(self.graphql_client.clone()).await
10605    }
10606    /// The URI of this secret.
10607    pub async fn uri(&self) -> Result<String, DaggerError> {
10608        let query = self.selection.select("uri");
10609        query.execute(self.graphql_client.clone()).await
10610    }
10611}
10612#[derive(Clone)]
10613pub struct Service {
10614    pub proc: Option<Arc<DaggerSessionProc>>,
10615    pub selection: Selection,
10616    pub graphql_client: DynGraphQLClient,
10617}
10618#[derive(Builder, Debug, PartialEq)]
10619pub struct ServiceEndpointOpts<'a> {
10620    /// The exposed port number for the endpoint
10621    #[builder(setter(into, strip_option), default)]
10622    pub port: Option<isize>,
10623    /// Return a URL with the given scheme, eg. http for http://
10624    #[builder(setter(into, strip_option), default)]
10625    pub scheme: Option<&'a str>,
10626}
10627#[derive(Builder, Debug, PartialEq)]
10628pub struct ServiceStopOpts {
10629    /// Immediately kill the service without waiting for a graceful exit
10630    #[builder(setter(into, strip_option), default)]
10631    pub kill: Option<bool>,
10632}
10633#[derive(Builder, Debug, PartialEq)]
10634pub struct ServiceUpOpts {
10635    /// List of frontend/backend port mappings to forward.
10636    /// Frontend is the port accepting traffic on the host, backend is the service port.
10637    #[builder(setter(into, strip_option), default)]
10638    pub ports: Option<Vec<PortForward>>,
10639    /// Bind each tunnel port to a random port on the host.
10640    #[builder(setter(into, strip_option), default)]
10641    pub random: Option<bool>,
10642}
10643impl Service {
10644    /// Retrieves an endpoint that clients can use to reach this container.
10645    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
10646    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
10647    ///
10648    /// # Arguments
10649    ///
10650    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10651    pub async fn endpoint(&self) -> Result<String, DaggerError> {
10652        let query = self.selection.select("endpoint");
10653        query.execute(self.graphql_client.clone()).await
10654    }
10655    /// Retrieves an endpoint that clients can use to reach this container.
10656    /// If no port is specified, the first exposed port is used. If none exist an error is returned.
10657    /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
10658    ///
10659    /// # Arguments
10660    ///
10661    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10662    pub async fn endpoint_opts<'a>(
10663        &self,
10664        opts: ServiceEndpointOpts<'a>,
10665    ) -> Result<String, DaggerError> {
10666        let mut query = self.selection.select("endpoint");
10667        if let Some(port) = opts.port {
10668            query = query.arg("port", port);
10669        }
10670        if let Some(scheme) = opts.scheme {
10671            query = query.arg("scheme", scheme);
10672        }
10673        query.execute(self.graphql_client.clone()).await
10674    }
10675    /// Retrieves a hostname which can be used by clients to reach this container.
10676    pub async fn hostname(&self) -> Result<String, DaggerError> {
10677        let query = self.selection.select("hostname");
10678        query.execute(self.graphql_client.clone()).await
10679    }
10680    /// A unique identifier for this Service.
10681    pub async fn id(&self) -> Result<ServiceId, DaggerError> {
10682        let query = self.selection.select("id");
10683        query.execute(self.graphql_client.clone()).await
10684    }
10685    /// Retrieves the list of ports provided by the service.
10686    pub fn ports(&self) -> Vec<Port> {
10687        let query = self.selection.select("ports");
10688        vec![Port {
10689            proc: self.proc.clone(),
10690            selection: query,
10691            graphql_client: self.graphql_client.clone(),
10692        }]
10693    }
10694    /// Start the service and wait for its health checks to succeed.
10695    /// Services bound to a Container do not need to be manually started.
10696    pub async fn start(&self) -> Result<ServiceId, DaggerError> {
10697        let query = self.selection.select("start");
10698        query.execute(self.graphql_client.clone()).await
10699    }
10700    /// Stop the service.
10701    ///
10702    /// # Arguments
10703    ///
10704    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10705    pub async fn stop(&self) -> Result<ServiceId, DaggerError> {
10706        let query = self.selection.select("stop");
10707        query.execute(self.graphql_client.clone()).await
10708    }
10709    /// Stop the service.
10710    ///
10711    /// # Arguments
10712    ///
10713    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10714    pub async fn stop_opts(&self, opts: ServiceStopOpts) -> Result<ServiceId, DaggerError> {
10715        let mut query = self.selection.select("stop");
10716        if let Some(kill) = opts.kill {
10717            query = query.arg("kill", kill);
10718        }
10719        query.execute(self.graphql_client.clone()).await
10720    }
10721    /// Creates a tunnel that forwards traffic from the caller's network to this service.
10722    ///
10723    /// # Arguments
10724    ///
10725    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10726    pub async fn up(&self) -> Result<Void, DaggerError> {
10727        let query = self.selection.select("up");
10728        query.execute(self.graphql_client.clone()).await
10729    }
10730    /// Creates a tunnel that forwards traffic from the caller's network to this service.
10731    ///
10732    /// # Arguments
10733    ///
10734    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10735    pub async fn up_opts(&self, opts: ServiceUpOpts) -> Result<Void, DaggerError> {
10736        let mut query = self.selection.select("up");
10737        if let Some(ports) = opts.ports {
10738            query = query.arg("ports", ports);
10739        }
10740        if let Some(random) = opts.random {
10741            query = query.arg("random", random);
10742        }
10743        query.execute(self.graphql_client.clone()).await
10744    }
10745    /// Configures a hostname which can be used by clients within the session to reach this container.
10746    ///
10747    /// # Arguments
10748    ///
10749    /// * `hostname` - The hostname to use.
10750    pub fn with_hostname(&self, hostname: impl Into<String>) -> Service {
10751        let mut query = self.selection.select("withHostname");
10752        query = query.arg("hostname", hostname.into());
10753        Service {
10754            proc: self.proc.clone(),
10755            selection: query,
10756            graphql_client: self.graphql_client.clone(),
10757        }
10758    }
10759}
10760#[derive(Clone)]
10761pub struct Socket {
10762    pub proc: Option<Arc<DaggerSessionProc>>,
10763    pub selection: Selection,
10764    pub graphql_client: DynGraphQLClient,
10765}
10766impl Socket {
10767    /// A unique identifier for this Socket.
10768    pub async fn id(&self) -> Result<SocketId, DaggerError> {
10769        let query = self.selection.select("id");
10770        query.execute(self.graphql_client.clone()).await
10771    }
10772}
10773#[derive(Clone)]
10774pub struct SourceMap {
10775    pub proc: Option<Arc<DaggerSessionProc>>,
10776    pub selection: Selection,
10777    pub graphql_client: DynGraphQLClient,
10778}
10779impl SourceMap {
10780    /// The column number within the line.
10781    pub async fn column(&self) -> Result<isize, DaggerError> {
10782        let query = self.selection.select("column");
10783        query.execute(self.graphql_client.clone()).await
10784    }
10785    /// The filename from the module source.
10786    pub async fn filename(&self) -> Result<String, DaggerError> {
10787        let query = self.selection.select("filename");
10788        query.execute(self.graphql_client.clone()).await
10789    }
10790    /// A unique identifier for this SourceMap.
10791    pub async fn id(&self) -> Result<SourceMapId, DaggerError> {
10792        let query = self.selection.select("id");
10793        query.execute(self.graphql_client.clone()).await
10794    }
10795    /// The line number within the filename.
10796    pub async fn line(&self) -> Result<isize, DaggerError> {
10797        let query = self.selection.select("line");
10798        query.execute(self.graphql_client.clone()).await
10799    }
10800    /// The module dependency this was declared in.
10801    pub async fn module(&self) -> Result<String, DaggerError> {
10802        let query = self.selection.select("module");
10803        query.execute(self.graphql_client.clone()).await
10804    }
10805}
10806#[derive(Clone)]
10807pub struct Terminal {
10808    pub proc: Option<Arc<DaggerSessionProc>>,
10809    pub selection: Selection,
10810    pub graphql_client: DynGraphQLClient,
10811}
10812impl Terminal {
10813    /// A unique identifier for this Terminal.
10814    pub async fn id(&self) -> Result<TerminalId, DaggerError> {
10815        let query = self.selection.select("id");
10816        query.execute(self.graphql_client.clone()).await
10817    }
10818    /// Forces evaluation of the pipeline in the engine.
10819    /// It doesn't run the default command if no exec has been set.
10820    pub async fn sync(&self) -> Result<TerminalId, DaggerError> {
10821        let query = self.selection.select("sync");
10822        query.execute(self.graphql_client.clone()).await
10823    }
10824}
10825#[derive(Clone)]
10826pub struct TypeDef {
10827    pub proc: Option<Arc<DaggerSessionProc>>,
10828    pub selection: Selection,
10829    pub graphql_client: DynGraphQLClient,
10830}
10831#[derive(Builder, Debug, PartialEq)]
10832pub struct TypeDefWithEnumOpts<'a> {
10833    /// A doc string for the enum, if any
10834    #[builder(setter(into, strip_option), default)]
10835    pub description: Option<&'a str>,
10836    /// The source map for the enum definition.
10837    #[builder(setter(into, strip_option), default)]
10838    pub source_map: Option<SourceMapId>,
10839}
10840#[derive(Builder, Debug, PartialEq)]
10841pub struct TypeDefWithEnumValueOpts<'a> {
10842    /// A doc string for the value, if any
10843    #[builder(setter(into, strip_option), default)]
10844    pub description: Option<&'a str>,
10845    /// The source map for the enum value definition.
10846    #[builder(setter(into, strip_option), default)]
10847    pub source_map: Option<SourceMapId>,
10848}
10849#[derive(Builder, Debug, PartialEq)]
10850pub struct TypeDefWithFieldOpts<'a> {
10851    /// A doc string for the field, if any
10852    #[builder(setter(into, strip_option), default)]
10853    pub description: Option<&'a str>,
10854    /// The source map for the field definition.
10855    #[builder(setter(into, strip_option), default)]
10856    pub source_map: Option<SourceMapId>,
10857}
10858#[derive(Builder, Debug, PartialEq)]
10859pub struct TypeDefWithInterfaceOpts<'a> {
10860    #[builder(setter(into, strip_option), default)]
10861    pub description: Option<&'a str>,
10862    #[builder(setter(into, strip_option), default)]
10863    pub source_map: Option<SourceMapId>,
10864}
10865#[derive(Builder, Debug, PartialEq)]
10866pub struct TypeDefWithObjectOpts<'a> {
10867    #[builder(setter(into, strip_option), default)]
10868    pub description: Option<&'a str>,
10869    #[builder(setter(into, strip_option), default)]
10870    pub source_map: Option<SourceMapId>,
10871}
10872#[derive(Builder, Debug, PartialEq)]
10873pub struct TypeDefWithScalarOpts<'a> {
10874    #[builder(setter(into, strip_option), default)]
10875    pub description: Option<&'a str>,
10876}
10877impl TypeDef {
10878    /// If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null.
10879    pub fn as_enum(&self) -> EnumTypeDef {
10880        let query = self.selection.select("asEnum");
10881        EnumTypeDef {
10882            proc: self.proc.clone(),
10883            selection: query,
10884            graphql_client: self.graphql_client.clone(),
10885        }
10886    }
10887    /// If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null.
10888    pub fn as_input(&self) -> InputTypeDef {
10889        let query = self.selection.select("asInput");
10890        InputTypeDef {
10891            proc: self.proc.clone(),
10892            selection: query,
10893            graphql_client: self.graphql_client.clone(),
10894        }
10895    }
10896    /// If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null.
10897    pub fn as_interface(&self) -> InterfaceTypeDef {
10898        let query = self.selection.select("asInterface");
10899        InterfaceTypeDef {
10900            proc: self.proc.clone(),
10901            selection: query,
10902            graphql_client: self.graphql_client.clone(),
10903        }
10904    }
10905    /// If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null.
10906    pub fn as_list(&self) -> ListTypeDef {
10907        let query = self.selection.select("asList");
10908        ListTypeDef {
10909            proc: self.proc.clone(),
10910            selection: query,
10911            graphql_client: self.graphql_client.clone(),
10912        }
10913    }
10914    /// If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null.
10915    pub fn as_object(&self) -> ObjectTypeDef {
10916        let query = self.selection.select("asObject");
10917        ObjectTypeDef {
10918            proc: self.proc.clone(),
10919            selection: query,
10920            graphql_client: self.graphql_client.clone(),
10921        }
10922    }
10923    /// If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null.
10924    pub fn as_scalar(&self) -> ScalarTypeDef {
10925        let query = self.selection.select("asScalar");
10926        ScalarTypeDef {
10927            proc: self.proc.clone(),
10928            selection: query,
10929            graphql_client: self.graphql_client.clone(),
10930        }
10931    }
10932    /// A unique identifier for this TypeDef.
10933    pub async fn id(&self) -> Result<TypeDefId, DaggerError> {
10934        let query = self.selection.select("id");
10935        query.execute(self.graphql_client.clone()).await
10936    }
10937    /// The kind of type this is (e.g. primitive, list, object).
10938    pub async fn kind(&self) -> Result<TypeDefKind, DaggerError> {
10939        let query = self.selection.select("kind");
10940        query.execute(self.graphql_client.clone()).await
10941    }
10942    /// Whether this type can be set to null. Defaults to false.
10943    pub async fn optional(&self) -> Result<bool, DaggerError> {
10944        let query = self.selection.select("optional");
10945        query.execute(self.graphql_client.clone()).await
10946    }
10947    /// Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.
10948    pub fn with_constructor(&self, function: impl IntoID<FunctionId>) -> TypeDef {
10949        let mut query = self.selection.select("withConstructor");
10950        query = query.arg_lazy(
10951            "function",
10952            Box::new(move || {
10953                let function = function.clone();
10954                Box::pin(async move { function.into_id().await.unwrap().quote() })
10955            }),
10956        );
10957        TypeDef {
10958            proc: self.proc.clone(),
10959            selection: query,
10960            graphql_client: self.graphql_client.clone(),
10961        }
10962    }
10963    /// Returns a TypeDef of kind Enum with the provided name.
10964    /// 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.
10965    ///
10966    /// # Arguments
10967    ///
10968    /// * `name` - The name of the enum
10969    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10970    pub fn with_enum(&self, name: impl Into<String>) -> TypeDef {
10971        let mut query = self.selection.select("withEnum");
10972        query = query.arg("name", name.into());
10973        TypeDef {
10974            proc: self.proc.clone(),
10975            selection: query,
10976            graphql_client: self.graphql_client.clone(),
10977        }
10978    }
10979    /// Returns a TypeDef of kind Enum with the provided name.
10980    /// 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.
10981    ///
10982    /// # Arguments
10983    ///
10984    /// * `name` - The name of the enum
10985    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
10986    pub fn with_enum_opts<'a>(
10987        &self,
10988        name: impl Into<String>,
10989        opts: TypeDefWithEnumOpts<'a>,
10990    ) -> TypeDef {
10991        let mut query = self.selection.select("withEnum");
10992        query = query.arg("name", name.into());
10993        if let Some(description) = opts.description {
10994            query = query.arg("description", description);
10995        }
10996        if let Some(source_map) = opts.source_map {
10997            query = query.arg("sourceMap", source_map);
10998        }
10999        TypeDef {
11000            proc: self.proc.clone(),
11001            selection: query,
11002            graphql_client: self.graphql_client.clone(),
11003        }
11004    }
11005    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
11006    ///
11007    /// # Arguments
11008    ///
11009    /// * `value` - The name of the value in the enum
11010    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11011    pub fn with_enum_value(&self, value: impl Into<String>) -> TypeDef {
11012        let mut query = self.selection.select("withEnumValue");
11013        query = query.arg("value", value.into());
11014        TypeDef {
11015            proc: self.proc.clone(),
11016            selection: query,
11017            graphql_client: self.graphql_client.clone(),
11018        }
11019    }
11020    /// Adds a static value for an Enum TypeDef, failing if the type is not an enum.
11021    ///
11022    /// # Arguments
11023    ///
11024    /// * `value` - The name of the value in the enum
11025    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11026    pub fn with_enum_value_opts<'a>(
11027        &self,
11028        value: impl Into<String>,
11029        opts: TypeDefWithEnumValueOpts<'a>,
11030    ) -> TypeDef {
11031        let mut query = self.selection.select("withEnumValue");
11032        query = query.arg("value", value.into());
11033        if let Some(description) = opts.description {
11034            query = query.arg("description", description);
11035        }
11036        if let Some(source_map) = opts.source_map {
11037            query = query.arg("sourceMap", source_map);
11038        }
11039        TypeDef {
11040            proc: self.proc.clone(),
11041            selection: query,
11042            graphql_client: self.graphql_client.clone(),
11043        }
11044    }
11045    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
11046    ///
11047    /// # Arguments
11048    ///
11049    /// * `name` - The name of the field in the object
11050    /// * `type_def` - The type of the field
11051    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11052    pub fn with_field(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> TypeDef {
11053        let mut query = self.selection.select("withField");
11054        query = query.arg("name", name.into());
11055        query = query.arg_lazy(
11056            "typeDef",
11057            Box::new(move || {
11058                let type_def = type_def.clone();
11059                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
11060            }),
11061        );
11062        TypeDef {
11063            proc: self.proc.clone(),
11064            selection: query,
11065            graphql_client: self.graphql_client.clone(),
11066        }
11067    }
11068    /// Adds a static field for an Object TypeDef, failing if the type is not an object.
11069    ///
11070    /// # Arguments
11071    ///
11072    /// * `name` - The name of the field in the object
11073    /// * `type_def` - The type of the field
11074    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11075    pub fn with_field_opts<'a>(
11076        &self,
11077        name: impl Into<String>,
11078        type_def: impl IntoID<TypeDefId>,
11079        opts: TypeDefWithFieldOpts<'a>,
11080    ) -> TypeDef {
11081        let mut query = self.selection.select("withField");
11082        query = query.arg("name", name.into());
11083        query = query.arg_lazy(
11084            "typeDef",
11085            Box::new(move || {
11086                let type_def = type_def.clone();
11087                Box::pin(async move { type_def.into_id().await.unwrap().quote() })
11088            }),
11089        );
11090        if let Some(description) = opts.description {
11091            query = query.arg("description", description);
11092        }
11093        if let Some(source_map) = opts.source_map {
11094            query = query.arg("sourceMap", source_map);
11095        }
11096        TypeDef {
11097            proc: self.proc.clone(),
11098            selection: query,
11099            graphql_client: self.graphql_client.clone(),
11100        }
11101    }
11102    /// Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds.
11103    pub fn with_function(&self, function: impl IntoID<FunctionId>) -> TypeDef {
11104        let mut query = self.selection.select("withFunction");
11105        query = query.arg_lazy(
11106            "function",
11107            Box::new(move || {
11108                let function = function.clone();
11109                Box::pin(async move { function.into_id().await.unwrap().quote() })
11110            }),
11111        );
11112        TypeDef {
11113            proc: self.proc.clone(),
11114            selection: query,
11115            graphql_client: self.graphql_client.clone(),
11116        }
11117    }
11118    /// Returns a TypeDef of kind Interface with the provided name.
11119    ///
11120    /// # Arguments
11121    ///
11122    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11123    pub fn with_interface(&self, name: impl Into<String>) -> TypeDef {
11124        let mut query = self.selection.select("withInterface");
11125        query = query.arg("name", name.into());
11126        TypeDef {
11127            proc: self.proc.clone(),
11128            selection: query,
11129            graphql_client: self.graphql_client.clone(),
11130        }
11131    }
11132    /// Returns a TypeDef of kind Interface with the provided name.
11133    ///
11134    /// # Arguments
11135    ///
11136    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11137    pub fn with_interface_opts<'a>(
11138        &self,
11139        name: impl Into<String>,
11140        opts: TypeDefWithInterfaceOpts<'a>,
11141    ) -> TypeDef {
11142        let mut query = self.selection.select("withInterface");
11143        query = query.arg("name", name.into());
11144        if let Some(description) = opts.description {
11145            query = query.arg("description", description);
11146        }
11147        if let Some(source_map) = opts.source_map {
11148            query = query.arg("sourceMap", source_map);
11149        }
11150        TypeDef {
11151            proc: self.proc.clone(),
11152            selection: query,
11153            graphql_client: self.graphql_client.clone(),
11154        }
11155    }
11156    /// Sets the kind of the type.
11157    pub fn with_kind(&self, kind: TypeDefKind) -> TypeDef {
11158        let mut query = self.selection.select("withKind");
11159        query = query.arg("kind", kind);
11160        TypeDef {
11161            proc: self.proc.clone(),
11162            selection: query,
11163            graphql_client: self.graphql_client.clone(),
11164        }
11165    }
11166    /// Returns a TypeDef of kind List with the provided type for its elements.
11167    pub fn with_list_of(&self, element_type: impl IntoID<TypeDefId>) -> TypeDef {
11168        let mut query = self.selection.select("withListOf");
11169        query = query.arg_lazy(
11170            "elementType",
11171            Box::new(move || {
11172                let element_type = element_type.clone();
11173                Box::pin(async move { element_type.into_id().await.unwrap().quote() })
11174            }),
11175        );
11176        TypeDef {
11177            proc: self.proc.clone(),
11178            selection: query,
11179            graphql_client: self.graphql_client.clone(),
11180        }
11181    }
11182    /// Returns a TypeDef of kind Object with the provided name.
11183    /// 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.
11184    ///
11185    /// # Arguments
11186    ///
11187    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11188    pub fn with_object(&self, name: impl Into<String>) -> TypeDef {
11189        let mut query = self.selection.select("withObject");
11190        query = query.arg("name", name.into());
11191        TypeDef {
11192            proc: self.proc.clone(),
11193            selection: query,
11194            graphql_client: self.graphql_client.clone(),
11195        }
11196    }
11197    /// Returns a TypeDef of kind Object with the provided name.
11198    /// 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.
11199    ///
11200    /// # Arguments
11201    ///
11202    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11203    pub fn with_object_opts<'a>(
11204        &self,
11205        name: impl Into<String>,
11206        opts: TypeDefWithObjectOpts<'a>,
11207    ) -> TypeDef {
11208        let mut query = self.selection.select("withObject");
11209        query = query.arg("name", name.into());
11210        if let Some(description) = opts.description {
11211            query = query.arg("description", description);
11212        }
11213        if let Some(source_map) = opts.source_map {
11214            query = query.arg("sourceMap", source_map);
11215        }
11216        TypeDef {
11217            proc: self.proc.clone(),
11218            selection: query,
11219            graphql_client: self.graphql_client.clone(),
11220        }
11221    }
11222    /// Sets whether this type can be set to null.
11223    pub fn with_optional(&self, optional: bool) -> TypeDef {
11224        let mut query = self.selection.select("withOptional");
11225        query = query.arg("optional", optional);
11226        TypeDef {
11227            proc: self.proc.clone(),
11228            selection: query,
11229            graphql_client: self.graphql_client.clone(),
11230        }
11231    }
11232    /// Returns a TypeDef of kind Scalar with the provided name.
11233    ///
11234    /// # Arguments
11235    ///
11236    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11237    pub fn with_scalar(&self, name: impl Into<String>) -> TypeDef {
11238        let mut query = self.selection.select("withScalar");
11239        query = query.arg("name", name.into());
11240        TypeDef {
11241            proc: self.proc.clone(),
11242            selection: query,
11243            graphql_client: self.graphql_client.clone(),
11244        }
11245    }
11246    /// Returns a TypeDef of kind Scalar with the provided name.
11247    ///
11248    /// # Arguments
11249    ///
11250    /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use
11251    pub fn with_scalar_opts<'a>(
11252        &self,
11253        name: impl Into<String>,
11254        opts: TypeDefWithScalarOpts<'a>,
11255    ) -> TypeDef {
11256        let mut query = self.selection.select("withScalar");
11257        query = query.arg("name", name.into());
11258        if let Some(description) = opts.description {
11259            query = query.arg("description", description);
11260        }
11261        TypeDef {
11262            proc: self.proc.clone(),
11263            selection: query,
11264            graphql_client: self.graphql_client.clone(),
11265        }
11266    }
11267}
11268#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11269pub enum CacheSharingMode {
11270    #[serde(rename = "LOCKED")]
11271    Locked,
11272    #[serde(rename = "PRIVATE")]
11273    Private,
11274    #[serde(rename = "SHARED")]
11275    Shared,
11276}
11277#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11278pub enum ImageLayerCompression {
11279    #[serde(rename = "EStarGZ")]
11280    EStarGz,
11281    #[serde(rename = "Gzip")]
11282    Gzip,
11283    #[serde(rename = "Uncompressed")]
11284    Uncompressed,
11285    #[serde(rename = "Zstd")]
11286    Zstd,
11287}
11288#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11289pub enum ImageMediaTypes {
11290    #[serde(rename = "DockerMediaTypes")]
11291    DockerMediaTypes,
11292    #[serde(rename = "OCIMediaTypes")]
11293    OciMediaTypes,
11294}
11295#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11296pub enum ModuleSourceKind {
11297    #[serde(rename = "DIR_SOURCE")]
11298    DirSource,
11299    #[serde(rename = "GIT_SOURCE")]
11300    GitSource,
11301    #[serde(rename = "LOCAL_SOURCE")]
11302    LocalSource,
11303}
11304#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11305pub enum NetworkProtocol {
11306    #[serde(rename = "TCP")]
11307    Tcp,
11308    #[serde(rename = "UDP")]
11309    Udp,
11310}
11311#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11312pub enum ReturnType {
11313    #[serde(rename = "ANY")]
11314    Any,
11315    #[serde(rename = "FAILURE")]
11316    Failure,
11317    #[serde(rename = "SUCCESS")]
11318    Success,
11319}
11320#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
11321pub enum TypeDefKind {
11322    #[serde(rename = "BOOLEAN_KIND")]
11323    BooleanKind,
11324    #[serde(rename = "ENUM_KIND")]
11325    EnumKind,
11326    #[serde(rename = "FLOAT_KIND")]
11327    FloatKind,
11328    #[serde(rename = "INPUT_KIND")]
11329    InputKind,
11330    #[serde(rename = "INTEGER_KIND")]
11331    IntegerKind,
11332    #[serde(rename = "INTERFACE_KIND")]
11333    InterfaceKind,
11334    #[serde(rename = "LIST_KIND")]
11335    ListKind,
11336    #[serde(rename = "OBJECT_KIND")]
11337    ObjectKind,
11338    #[serde(rename = "SCALAR_KIND")]
11339    ScalarKind,
11340    #[serde(rename = "STRING_KIND")]
11341    StringKind,
11342    #[serde(rename = "VOID_KIND")]
11343    VoidKind,
11344}