1#![allow(clippy::needless_lifetimes)]
2
3use crate::core::cli_session::DaggerSessionProc;
4use crate::core::graphql_client::DynGraphQLClient;
5use crate::errors::DaggerError;
6use crate::id::IntoID;
7use crate::querybuilder::Selection;
8use derive_builder::Builder;
9use serde::{Deserialize, Serialize};
10use std::sync::Arc;
11
12#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
13pub struct AddressId(pub String);
14impl From<&str> for AddressId {
15 fn from(value: &str) -> Self {
16 Self(value.to_string())
17 }
18}
19impl From<String> for AddressId {
20 fn from(value: String) -> Self {
21 Self(value)
22 }
23}
24impl IntoID<AddressId> for Address {
25 fn into_id(
26 self,
27 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<AddressId, DaggerError>> + Send>>
28 {
29 Box::pin(async move { self.id().await })
30 }
31}
32impl IntoID<AddressId> for AddressId {
33 fn into_id(
34 self,
35 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<AddressId, DaggerError>> + Send>>
36 {
37 Box::pin(async move { Ok::<AddressId, DaggerError>(self) })
38 }
39}
40impl AddressId {
41 fn quote(&self) -> String {
42 format!("\"{}\"", self.0.clone())
43 }
44}
45#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
46pub struct BindingId(pub String);
47impl From<&str> for BindingId {
48 fn from(value: &str) -> Self {
49 Self(value.to_string())
50 }
51}
52impl From<String> for BindingId {
53 fn from(value: String) -> Self {
54 Self(value)
55 }
56}
57impl IntoID<BindingId> for Binding {
58 fn into_id(
59 self,
60 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<BindingId, DaggerError>> + Send>>
61 {
62 Box::pin(async move { self.id().await })
63 }
64}
65impl IntoID<BindingId> for BindingId {
66 fn into_id(
67 self,
68 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<BindingId, DaggerError>> + Send>>
69 {
70 Box::pin(async move { Ok::<BindingId, DaggerError>(self) })
71 }
72}
73impl BindingId {
74 fn quote(&self) -> String {
75 format!("\"{}\"", self.0.clone())
76 }
77}
78#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
79pub struct CacheVolumeId(pub String);
80impl From<&str> for CacheVolumeId {
81 fn from(value: &str) -> Self {
82 Self(value.to_string())
83 }
84}
85impl From<String> for CacheVolumeId {
86 fn from(value: String) -> Self {
87 Self(value)
88 }
89}
90impl IntoID<CacheVolumeId> for CacheVolume {
91 fn into_id(
92 self,
93 ) -> std::pin::Pin<
94 Box<dyn core::future::Future<Output = Result<CacheVolumeId, DaggerError>> + Send>,
95 > {
96 Box::pin(async move { self.id().await })
97 }
98}
99impl IntoID<CacheVolumeId> for CacheVolumeId {
100 fn into_id(
101 self,
102 ) -> std::pin::Pin<
103 Box<dyn core::future::Future<Output = Result<CacheVolumeId, DaggerError>> + Send>,
104 > {
105 Box::pin(async move { Ok::<CacheVolumeId, DaggerError>(self) })
106 }
107}
108impl CacheVolumeId {
109 fn quote(&self) -> String {
110 format!("\"{}\"", self.0.clone())
111 }
112}
113#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
114pub struct ChangesetId(pub String);
115impl From<&str> for ChangesetId {
116 fn from(value: &str) -> Self {
117 Self(value.to_string())
118 }
119}
120impl From<String> for ChangesetId {
121 fn from(value: String) -> Self {
122 Self(value)
123 }
124}
125impl IntoID<ChangesetId> for Changeset {
126 fn into_id(
127 self,
128 ) -> std::pin::Pin<
129 Box<dyn core::future::Future<Output = Result<ChangesetId, DaggerError>> + Send>,
130 > {
131 Box::pin(async move { self.id().await })
132 }
133}
134impl IntoID<ChangesetId> for ChangesetId {
135 fn into_id(
136 self,
137 ) -> std::pin::Pin<
138 Box<dyn core::future::Future<Output = Result<ChangesetId, DaggerError>> + Send>,
139 > {
140 Box::pin(async move { Ok::<ChangesetId, DaggerError>(self) })
141 }
142}
143impl ChangesetId {
144 fn quote(&self) -> String {
145 format!("\"{}\"", self.0.clone())
146 }
147}
148#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
149pub struct CheckGroupId(pub String);
150impl From<&str> for CheckGroupId {
151 fn from(value: &str) -> Self {
152 Self(value.to_string())
153 }
154}
155impl From<String> for CheckGroupId {
156 fn from(value: String) -> Self {
157 Self(value)
158 }
159}
160impl IntoID<CheckGroupId> for CheckGroup {
161 fn into_id(
162 self,
163 ) -> std::pin::Pin<
164 Box<dyn core::future::Future<Output = Result<CheckGroupId, DaggerError>> + Send>,
165 > {
166 Box::pin(async move { self.id().await })
167 }
168}
169impl IntoID<CheckGroupId> for CheckGroupId {
170 fn into_id(
171 self,
172 ) -> std::pin::Pin<
173 Box<dyn core::future::Future<Output = Result<CheckGroupId, DaggerError>> + Send>,
174 > {
175 Box::pin(async move { Ok::<CheckGroupId, DaggerError>(self) })
176 }
177}
178impl CheckGroupId {
179 fn quote(&self) -> String {
180 format!("\"{}\"", self.0.clone())
181 }
182}
183#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
184pub struct CheckId(pub String);
185impl From<&str> for CheckId {
186 fn from(value: &str) -> Self {
187 Self(value.to_string())
188 }
189}
190impl From<String> for CheckId {
191 fn from(value: String) -> Self {
192 Self(value)
193 }
194}
195impl IntoID<CheckId> for Check {
196 fn into_id(
197 self,
198 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<CheckId, DaggerError>> + Send>>
199 {
200 Box::pin(async move { self.id().await })
201 }
202}
203impl IntoID<CheckId> for CheckId {
204 fn into_id(
205 self,
206 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<CheckId, DaggerError>> + Send>>
207 {
208 Box::pin(async move { Ok::<CheckId, DaggerError>(self) })
209 }
210}
211impl CheckId {
212 fn quote(&self) -> String {
213 format!("\"{}\"", self.0.clone())
214 }
215}
216#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
217pub struct CloudId(pub String);
218impl From<&str> for CloudId {
219 fn from(value: &str) -> Self {
220 Self(value.to_string())
221 }
222}
223impl From<String> for CloudId {
224 fn from(value: String) -> Self {
225 Self(value)
226 }
227}
228impl IntoID<CloudId> for Cloud {
229 fn into_id(
230 self,
231 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<CloudId, DaggerError>> + Send>>
232 {
233 Box::pin(async move { self.id().await })
234 }
235}
236impl IntoID<CloudId> for CloudId {
237 fn into_id(
238 self,
239 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<CloudId, DaggerError>> + Send>>
240 {
241 Box::pin(async move { Ok::<CloudId, DaggerError>(self) })
242 }
243}
244impl CloudId {
245 fn quote(&self) -> String {
246 format!("\"{}\"", self.0.clone())
247 }
248}
249#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
250pub struct ContainerId(pub String);
251impl From<&str> for ContainerId {
252 fn from(value: &str) -> Self {
253 Self(value.to_string())
254 }
255}
256impl From<String> for ContainerId {
257 fn from(value: String) -> Self {
258 Self(value)
259 }
260}
261impl IntoID<ContainerId> for Container {
262 fn into_id(
263 self,
264 ) -> std::pin::Pin<
265 Box<dyn core::future::Future<Output = Result<ContainerId, DaggerError>> + Send>,
266 > {
267 Box::pin(async move { self.id().await })
268 }
269}
270impl IntoID<ContainerId> for ContainerId {
271 fn into_id(
272 self,
273 ) -> std::pin::Pin<
274 Box<dyn core::future::Future<Output = Result<ContainerId, DaggerError>> + Send>,
275 > {
276 Box::pin(async move { Ok::<ContainerId, DaggerError>(self) })
277 }
278}
279impl ContainerId {
280 fn quote(&self) -> String {
281 format!("\"{}\"", self.0.clone())
282 }
283}
284#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
285pub struct CurrentModuleId(pub String);
286impl From<&str> for CurrentModuleId {
287 fn from(value: &str) -> Self {
288 Self(value.to_string())
289 }
290}
291impl From<String> for CurrentModuleId {
292 fn from(value: String) -> Self {
293 Self(value)
294 }
295}
296impl IntoID<CurrentModuleId> for CurrentModule {
297 fn into_id(
298 self,
299 ) -> std::pin::Pin<
300 Box<dyn core::future::Future<Output = Result<CurrentModuleId, DaggerError>> + Send>,
301 > {
302 Box::pin(async move { self.id().await })
303 }
304}
305impl IntoID<CurrentModuleId> for CurrentModuleId {
306 fn into_id(
307 self,
308 ) -> std::pin::Pin<
309 Box<dyn core::future::Future<Output = Result<CurrentModuleId, DaggerError>> + Send>,
310 > {
311 Box::pin(async move { Ok::<CurrentModuleId, DaggerError>(self) })
312 }
313}
314impl CurrentModuleId {
315 fn quote(&self) -> String {
316 format!("\"{}\"", self.0.clone())
317 }
318}
319#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
320pub struct DirectoryId(pub String);
321impl From<&str> for DirectoryId {
322 fn from(value: &str) -> Self {
323 Self(value.to_string())
324 }
325}
326impl From<String> for DirectoryId {
327 fn from(value: String) -> Self {
328 Self(value)
329 }
330}
331impl IntoID<DirectoryId> for Directory {
332 fn into_id(
333 self,
334 ) -> std::pin::Pin<
335 Box<dyn core::future::Future<Output = Result<DirectoryId, DaggerError>> + Send>,
336 > {
337 Box::pin(async move { self.id().await })
338 }
339}
340impl IntoID<DirectoryId> for DirectoryId {
341 fn into_id(
342 self,
343 ) -> std::pin::Pin<
344 Box<dyn core::future::Future<Output = Result<DirectoryId, DaggerError>> + Send>,
345 > {
346 Box::pin(async move { Ok::<DirectoryId, DaggerError>(self) })
347 }
348}
349impl DirectoryId {
350 fn quote(&self) -> String {
351 format!("\"{}\"", self.0.clone())
352 }
353}
354#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
355pub struct EngineCacheEntryId(pub String);
356impl From<&str> for EngineCacheEntryId {
357 fn from(value: &str) -> Self {
358 Self(value.to_string())
359 }
360}
361impl From<String> for EngineCacheEntryId {
362 fn from(value: String) -> Self {
363 Self(value)
364 }
365}
366impl IntoID<EngineCacheEntryId> for EngineCacheEntry {
367 fn into_id(
368 self,
369 ) -> std::pin::Pin<
370 Box<dyn core::future::Future<Output = Result<EngineCacheEntryId, DaggerError>> + Send>,
371 > {
372 Box::pin(async move { self.id().await })
373 }
374}
375impl IntoID<EngineCacheEntryId> for EngineCacheEntryId {
376 fn into_id(
377 self,
378 ) -> std::pin::Pin<
379 Box<dyn core::future::Future<Output = Result<EngineCacheEntryId, DaggerError>> + Send>,
380 > {
381 Box::pin(async move { Ok::<EngineCacheEntryId, DaggerError>(self) })
382 }
383}
384impl EngineCacheEntryId {
385 fn quote(&self) -> String {
386 format!("\"{}\"", self.0.clone())
387 }
388}
389#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
390pub struct EngineCacheEntrySetId(pub String);
391impl From<&str> for EngineCacheEntrySetId {
392 fn from(value: &str) -> Self {
393 Self(value.to_string())
394 }
395}
396impl From<String> for EngineCacheEntrySetId {
397 fn from(value: String) -> Self {
398 Self(value)
399 }
400}
401impl IntoID<EngineCacheEntrySetId> for EngineCacheEntrySet {
402 fn into_id(
403 self,
404 ) -> std::pin::Pin<
405 Box<dyn core::future::Future<Output = Result<EngineCacheEntrySetId, DaggerError>> + Send>,
406 > {
407 Box::pin(async move { self.id().await })
408 }
409}
410impl IntoID<EngineCacheEntrySetId> for EngineCacheEntrySetId {
411 fn into_id(
412 self,
413 ) -> std::pin::Pin<
414 Box<dyn core::future::Future<Output = Result<EngineCacheEntrySetId, DaggerError>> + Send>,
415 > {
416 Box::pin(async move { Ok::<EngineCacheEntrySetId, DaggerError>(self) })
417 }
418}
419impl EngineCacheEntrySetId {
420 fn quote(&self) -> String {
421 format!("\"{}\"", self.0.clone())
422 }
423}
424#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
425pub struct EngineCacheId(pub String);
426impl From<&str> for EngineCacheId {
427 fn from(value: &str) -> Self {
428 Self(value.to_string())
429 }
430}
431impl From<String> for EngineCacheId {
432 fn from(value: String) -> Self {
433 Self(value)
434 }
435}
436impl IntoID<EngineCacheId> for EngineCache {
437 fn into_id(
438 self,
439 ) -> std::pin::Pin<
440 Box<dyn core::future::Future<Output = Result<EngineCacheId, DaggerError>> + Send>,
441 > {
442 Box::pin(async move { self.id().await })
443 }
444}
445impl IntoID<EngineCacheId> for EngineCacheId {
446 fn into_id(
447 self,
448 ) -> std::pin::Pin<
449 Box<dyn core::future::Future<Output = Result<EngineCacheId, DaggerError>> + Send>,
450 > {
451 Box::pin(async move { Ok::<EngineCacheId, DaggerError>(self) })
452 }
453}
454impl EngineCacheId {
455 fn quote(&self) -> String {
456 format!("\"{}\"", self.0.clone())
457 }
458}
459#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
460pub struct EngineId(pub String);
461impl From<&str> for EngineId {
462 fn from(value: &str) -> Self {
463 Self(value.to_string())
464 }
465}
466impl From<String> for EngineId {
467 fn from(value: String) -> Self {
468 Self(value)
469 }
470}
471impl IntoID<EngineId> for Engine {
472 fn into_id(
473 self,
474 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EngineId, DaggerError>> + Send>>
475 {
476 Box::pin(async move { self.id().await })
477 }
478}
479impl IntoID<EngineId> for EngineId {
480 fn into_id(
481 self,
482 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EngineId, DaggerError>> + Send>>
483 {
484 Box::pin(async move { Ok::<EngineId, DaggerError>(self) })
485 }
486}
487impl EngineId {
488 fn quote(&self) -> String {
489 format!("\"{}\"", self.0.clone())
490 }
491}
492#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
493pub struct EnumTypeDefId(pub String);
494impl From<&str> for EnumTypeDefId {
495 fn from(value: &str) -> Self {
496 Self(value.to_string())
497 }
498}
499impl From<String> for EnumTypeDefId {
500 fn from(value: String) -> Self {
501 Self(value)
502 }
503}
504impl IntoID<EnumTypeDefId> for EnumTypeDef {
505 fn into_id(
506 self,
507 ) -> std::pin::Pin<
508 Box<dyn core::future::Future<Output = Result<EnumTypeDefId, DaggerError>> + Send>,
509 > {
510 Box::pin(async move { self.id().await })
511 }
512}
513impl IntoID<EnumTypeDefId> for EnumTypeDefId {
514 fn into_id(
515 self,
516 ) -> std::pin::Pin<
517 Box<dyn core::future::Future<Output = Result<EnumTypeDefId, DaggerError>> + Send>,
518 > {
519 Box::pin(async move { Ok::<EnumTypeDefId, DaggerError>(self) })
520 }
521}
522impl EnumTypeDefId {
523 fn quote(&self) -> String {
524 format!("\"{}\"", self.0.clone())
525 }
526}
527#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
528pub struct EnumValueTypeDefId(pub String);
529impl From<&str> for EnumValueTypeDefId {
530 fn from(value: &str) -> Self {
531 Self(value.to_string())
532 }
533}
534impl From<String> for EnumValueTypeDefId {
535 fn from(value: String) -> Self {
536 Self(value)
537 }
538}
539impl IntoID<EnumValueTypeDefId> for EnumValueTypeDef {
540 fn into_id(
541 self,
542 ) -> std::pin::Pin<
543 Box<dyn core::future::Future<Output = Result<EnumValueTypeDefId, DaggerError>> + Send>,
544 > {
545 Box::pin(async move { self.id().await })
546 }
547}
548impl IntoID<EnumValueTypeDefId> for EnumValueTypeDefId {
549 fn into_id(
550 self,
551 ) -> std::pin::Pin<
552 Box<dyn core::future::Future<Output = Result<EnumValueTypeDefId, DaggerError>> + Send>,
553 > {
554 Box::pin(async move { Ok::<EnumValueTypeDefId, DaggerError>(self) })
555 }
556}
557impl EnumValueTypeDefId {
558 fn quote(&self) -> String {
559 format!("\"{}\"", self.0.clone())
560 }
561}
562#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
563pub struct EnvFileId(pub String);
564impl From<&str> for EnvFileId {
565 fn from(value: &str) -> Self {
566 Self(value.to_string())
567 }
568}
569impl From<String> for EnvFileId {
570 fn from(value: String) -> Self {
571 Self(value)
572 }
573}
574impl IntoID<EnvFileId> for EnvFile {
575 fn into_id(
576 self,
577 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EnvFileId, DaggerError>> + Send>>
578 {
579 Box::pin(async move { self.id().await })
580 }
581}
582impl IntoID<EnvFileId> for EnvFileId {
583 fn into_id(
584 self,
585 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EnvFileId, DaggerError>> + Send>>
586 {
587 Box::pin(async move { Ok::<EnvFileId, DaggerError>(self) })
588 }
589}
590impl EnvFileId {
591 fn quote(&self) -> String {
592 format!("\"{}\"", self.0.clone())
593 }
594}
595#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
596pub struct EnvId(pub String);
597impl From<&str> for EnvId {
598 fn from(value: &str) -> Self {
599 Self(value.to_string())
600 }
601}
602impl From<String> for EnvId {
603 fn from(value: String) -> Self {
604 Self(value)
605 }
606}
607impl IntoID<EnvId> for Env {
608 fn into_id(
609 self,
610 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EnvId, DaggerError>> + Send>>
611 {
612 Box::pin(async move { self.id().await })
613 }
614}
615impl IntoID<EnvId> for EnvId {
616 fn into_id(
617 self,
618 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<EnvId, DaggerError>> + Send>>
619 {
620 Box::pin(async move { Ok::<EnvId, DaggerError>(self) })
621 }
622}
623impl EnvId {
624 fn quote(&self) -> String {
625 format!("\"{}\"", self.0.clone())
626 }
627}
628#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
629pub struct EnvVariableId(pub String);
630impl From<&str> for EnvVariableId {
631 fn from(value: &str) -> Self {
632 Self(value.to_string())
633 }
634}
635impl From<String> for EnvVariableId {
636 fn from(value: String) -> Self {
637 Self(value)
638 }
639}
640impl IntoID<EnvVariableId> for EnvVariable {
641 fn into_id(
642 self,
643 ) -> std::pin::Pin<
644 Box<dyn core::future::Future<Output = Result<EnvVariableId, DaggerError>> + Send>,
645 > {
646 Box::pin(async move { self.id().await })
647 }
648}
649impl IntoID<EnvVariableId> for EnvVariableId {
650 fn into_id(
651 self,
652 ) -> std::pin::Pin<
653 Box<dyn core::future::Future<Output = Result<EnvVariableId, DaggerError>> + Send>,
654 > {
655 Box::pin(async move { Ok::<EnvVariableId, DaggerError>(self) })
656 }
657}
658impl EnvVariableId {
659 fn quote(&self) -> String {
660 format!("\"{}\"", self.0.clone())
661 }
662}
663#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
664pub struct ErrorId(pub String);
665impl From<&str> for ErrorId {
666 fn from(value: &str) -> Self {
667 Self(value.to_string())
668 }
669}
670impl From<String> for ErrorId {
671 fn from(value: String) -> Self {
672 Self(value)
673 }
674}
675impl IntoID<ErrorId> for Error {
676 fn into_id(
677 self,
678 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ErrorId, DaggerError>> + Send>>
679 {
680 Box::pin(async move { self.id().await })
681 }
682}
683impl IntoID<ErrorId> for ErrorId {
684 fn into_id(
685 self,
686 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ErrorId, DaggerError>> + Send>>
687 {
688 Box::pin(async move { Ok::<ErrorId, DaggerError>(self) })
689 }
690}
691impl ErrorId {
692 fn quote(&self) -> String {
693 format!("\"{}\"", self.0.clone())
694 }
695}
696#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
697pub struct ErrorValueId(pub String);
698impl From<&str> for ErrorValueId {
699 fn from(value: &str) -> Self {
700 Self(value.to_string())
701 }
702}
703impl From<String> for ErrorValueId {
704 fn from(value: String) -> Self {
705 Self(value)
706 }
707}
708impl IntoID<ErrorValueId> for ErrorValue {
709 fn into_id(
710 self,
711 ) -> std::pin::Pin<
712 Box<dyn core::future::Future<Output = Result<ErrorValueId, DaggerError>> + Send>,
713 > {
714 Box::pin(async move { self.id().await })
715 }
716}
717impl IntoID<ErrorValueId> for ErrorValueId {
718 fn into_id(
719 self,
720 ) -> std::pin::Pin<
721 Box<dyn core::future::Future<Output = Result<ErrorValueId, DaggerError>> + Send>,
722 > {
723 Box::pin(async move { Ok::<ErrorValueId, DaggerError>(self) })
724 }
725}
726impl ErrorValueId {
727 fn quote(&self) -> String {
728 format!("\"{}\"", self.0.clone())
729 }
730}
731#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
732pub struct FieldTypeDefId(pub String);
733impl From<&str> for FieldTypeDefId {
734 fn from(value: &str) -> Self {
735 Self(value.to_string())
736 }
737}
738impl From<String> for FieldTypeDefId {
739 fn from(value: String) -> Self {
740 Self(value)
741 }
742}
743impl IntoID<FieldTypeDefId> for FieldTypeDef {
744 fn into_id(
745 self,
746 ) -> std::pin::Pin<
747 Box<dyn core::future::Future<Output = Result<FieldTypeDefId, DaggerError>> + Send>,
748 > {
749 Box::pin(async move { self.id().await })
750 }
751}
752impl IntoID<FieldTypeDefId> for FieldTypeDefId {
753 fn into_id(
754 self,
755 ) -> std::pin::Pin<
756 Box<dyn core::future::Future<Output = Result<FieldTypeDefId, DaggerError>> + Send>,
757 > {
758 Box::pin(async move { Ok::<FieldTypeDefId, DaggerError>(self) })
759 }
760}
761impl FieldTypeDefId {
762 fn quote(&self) -> String {
763 format!("\"{}\"", self.0.clone())
764 }
765}
766#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
767pub struct FileId(pub String);
768impl From<&str> for FileId {
769 fn from(value: &str) -> Self {
770 Self(value.to_string())
771 }
772}
773impl From<String> for FileId {
774 fn from(value: String) -> Self {
775 Self(value)
776 }
777}
778impl IntoID<FileId> for File {
779 fn into_id(
780 self,
781 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FileId, DaggerError>> + Send>>
782 {
783 Box::pin(async move { self.id().await })
784 }
785}
786impl IntoID<FileId> for FileId {
787 fn into_id(
788 self,
789 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FileId, DaggerError>> + Send>>
790 {
791 Box::pin(async move { Ok::<FileId, DaggerError>(self) })
792 }
793}
794impl FileId {
795 fn quote(&self) -> String {
796 format!("\"{}\"", self.0.clone())
797 }
798}
799#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
800pub struct FunctionArgId(pub String);
801impl From<&str> for FunctionArgId {
802 fn from(value: &str) -> Self {
803 Self(value.to_string())
804 }
805}
806impl From<String> for FunctionArgId {
807 fn from(value: String) -> Self {
808 Self(value)
809 }
810}
811impl IntoID<FunctionArgId> for FunctionArg {
812 fn into_id(
813 self,
814 ) -> std::pin::Pin<
815 Box<dyn core::future::Future<Output = Result<FunctionArgId, DaggerError>> + Send>,
816 > {
817 Box::pin(async move { self.id().await })
818 }
819}
820impl IntoID<FunctionArgId> for FunctionArgId {
821 fn into_id(
822 self,
823 ) -> std::pin::Pin<
824 Box<dyn core::future::Future<Output = Result<FunctionArgId, DaggerError>> + Send>,
825 > {
826 Box::pin(async move { Ok::<FunctionArgId, DaggerError>(self) })
827 }
828}
829impl FunctionArgId {
830 fn quote(&self) -> String {
831 format!("\"{}\"", self.0.clone())
832 }
833}
834#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
835pub struct FunctionCallArgValueId(pub String);
836impl From<&str> for FunctionCallArgValueId {
837 fn from(value: &str) -> Self {
838 Self(value.to_string())
839 }
840}
841impl From<String> for FunctionCallArgValueId {
842 fn from(value: String) -> Self {
843 Self(value)
844 }
845}
846impl IntoID<FunctionCallArgValueId> for FunctionCallArgValue {
847 fn into_id(
848 self,
849 ) -> std::pin::Pin<
850 Box<dyn core::future::Future<Output = Result<FunctionCallArgValueId, DaggerError>> + Send>,
851 > {
852 Box::pin(async move { self.id().await })
853 }
854}
855impl IntoID<FunctionCallArgValueId> for FunctionCallArgValueId {
856 fn into_id(
857 self,
858 ) -> std::pin::Pin<
859 Box<dyn core::future::Future<Output = Result<FunctionCallArgValueId, DaggerError>> + Send>,
860 > {
861 Box::pin(async move { Ok::<FunctionCallArgValueId, DaggerError>(self) })
862 }
863}
864impl FunctionCallArgValueId {
865 fn quote(&self) -> String {
866 format!("\"{}\"", self.0.clone())
867 }
868}
869#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
870pub struct FunctionCallId(pub String);
871impl From<&str> for FunctionCallId {
872 fn from(value: &str) -> Self {
873 Self(value.to_string())
874 }
875}
876impl From<String> for FunctionCallId {
877 fn from(value: String) -> Self {
878 Self(value)
879 }
880}
881impl IntoID<FunctionCallId> for FunctionCall {
882 fn into_id(
883 self,
884 ) -> std::pin::Pin<
885 Box<dyn core::future::Future<Output = Result<FunctionCallId, DaggerError>> + Send>,
886 > {
887 Box::pin(async move { self.id().await })
888 }
889}
890impl IntoID<FunctionCallId> for FunctionCallId {
891 fn into_id(
892 self,
893 ) -> std::pin::Pin<
894 Box<dyn core::future::Future<Output = Result<FunctionCallId, DaggerError>> + Send>,
895 > {
896 Box::pin(async move { Ok::<FunctionCallId, DaggerError>(self) })
897 }
898}
899impl FunctionCallId {
900 fn quote(&self) -> String {
901 format!("\"{}\"", self.0.clone())
902 }
903}
904#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
905pub struct FunctionId(pub String);
906impl From<&str> for FunctionId {
907 fn from(value: &str) -> Self {
908 Self(value.to_string())
909 }
910}
911impl From<String> for FunctionId {
912 fn from(value: String) -> Self {
913 Self(value)
914 }
915}
916impl IntoID<FunctionId> for Function {
917 fn into_id(
918 self,
919 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FunctionId, DaggerError>> + Send>>
920 {
921 Box::pin(async move { self.id().await })
922 }
923}
924impl IntoID<FunctionId> for FunctionId {
925 fn into_id(
926 self,
927 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<FunctionId, DaggerError>> + Send>>
928 {
929 Box::pin(async move { Ok::<FunctionId, DaggerError>(self) })
930 }
931}
932impl FunctionId {
933 fn quote(&self) -> String {
934 format!("\"{}\"", self.0.clone())
935 }
936}
937#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
938pub struct GeneratedCodeId(pub String);
939impl From<&str> for GeneratedCodeId {
940 fn from(value: &str) -> Self {
941 Self(value.to_string())
942 }
943}
944impl From<String> for GeneratedCodeId {
945 fn from(value: String) -> Self {
946 Self(value)
947 }
948}
949impl IntoID<GeneratedCodeId> for GeneratedCode {
950 fn into_id(
951 self,
952 ) -> std::pin::Pin<
953 Box<dyn core::future::Future<Output = Result<GeneratedCodeId, DaggerError>> + Send>,
954 > {
955 Box::pin(async move { self.id().await })
956 }
957}
958impl IntoID<GeneratedCodeId> for GeneratedCodeId {
959 fn into_id(
960 self,
961 ) -> std::pin::Pin<
962 Box<dyn core::future::Future<Output = Result<GeneratedCodeId, DaggerError>> + Send>,
963 > {
964 Box::pin(async move { Ok::<GeneratedCodeId, DaggerError>(self) })
965 }
966}
967impl GeneratedCodeId {
968 fn quote(&self) -> String {
969 format!("\"{}\"", self.0.clone())
970 }
971}
972#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
973pub struct GeneratorGroupId(pub String);
974impl From<&str> for GeneratorGroupId {
975 fn from(value: &str) -> Self {
976 Self(value.to_string())
977 }
978}
979impl From<String> for GeneratorGroupId {
980 fn from(value: String) -> Self {
981 Self(value)
982 }
983}
984impl IntoID<GeneratorGroupId> for GeneratorGroup {
985 fn into_id(
986 self,
987 ) -> std::pin::Pin<
988 Box<dyn core::future::Future<Output = Result<GeneratorGroupId, DaggerError>> + Send>,
989 > {
990 Box::pin(async move { self.id().await })
991 }
992}
993impl IntoID<GeneratorGroupId> for GeneratorGroupId {
994 fn into_id(
995 self,
996 ) -> std::pin::Pin<
997 Box<dyn core::future::Future<Output = Result<GeneratorGroupId, DaggerError>> + Send>,
998 > {
999 Box::pin(async move { Ok::<GeneratorGroupId, DaggerError>(self) })
1000 }
1001}
1002impl GeneratorGroupId {
1003 fn quote(&self) -> String {
1004 format!("\"{}\"", self.0.clone())
1005 }
1006}
1007#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1008pub struct GeneratorId(pub String);
1009impl From<&str> for GeneratorId {
1010 fn from(value: &str) -> Self {
1011 Self(value.to_string())
1012 }
1013}
1014impl From<String> for GeneratorId {
1015 fn from(value: String) -> Self {
1016 Self(value)
1017 }
1018}
1019impl IntoID<GeneratorId> for Generator {
1020 fn into_id(
1021 self,
1022 ) -> std::pin::Pin<
1023 Box<dyn core::future::Future<Output = Result<GeneratorId, DaggerError>> + Send>,
1024 > {
1025 Box::pin(async move { self.id().await })
1026 }
1027}
1028impl IntoID<GeneratorId> for GeneratorId {
1029 fn into_id(
1030 self,
1031 ) -> std::pin::Pin<
1032 Box<dyn core::future::Future<Output = Result<GeneratorId, DaggerError>> + Send>,
1033 > {
1034 Box::pin(async move { Ok::<GeneratorId, DaggerError>(self) })
1035 }
1036}
1037impl GeneratorId {
1038 fn quote(&self) -> String {
1039 format!("\"{}\"", self.0.clone())
1040 }
1041}
1042#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1043pub struct GitRefId(pub String);
1044impl From<&str> for GitRefId {
1045 fn from(value: &str) -> Self {
1046 Self(value.to_string())
1047 }
1048}
1049impl From<String> for GitRefId {
1050 fn from(value: String) -> Self {
1051 Self(value)
1052 }
1053}
1054impl IntoID<GitRefId> for GitRef {
1055 fn into_id(
1056 self,
1057 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<GitRefId, DaggerError>> + Send>>
1058 {
1059 Box::pin(async move { self.id().await })
1060 }
1061}
1062impl IntoID<GitRefId> for GitRefId {
1063 fn into_id(
1064 self,
1065 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<GitRefId, DaggerError>> + Send>>
1066 {
1067 Box::pin(async move { Ok::<GitRefId, DaggerError>(self) })
1068 }
1069}
1070impl GitRefId {
1071 fn quote(&self) -> String {
1072 format!("\"{}\"", self.0.clone())
1073 }
1074}
1075#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1076pub struct GitRepositoryId(pub String);
1077impl From<&str> for GitRepositoryId {
1078 fn from(value: &str) -> Self {
1079 Self(value.to_string())
1080 }
1081}
1082impl From<String> for GitRepositoryId {
1083 fn from(value: String) -> Self {
1084 Self(value)
1085 }
1086}
1087impl IntoID<GitRepositoryId> for GitRepository {
1088 fn into_id(
1089 self,
1090 ) -> std::pin::Pin<
1091 Box<dyn core::future::Future<Output = Result<GitRepositoryId, DaggerError>> + Send>,
1092 > {
1093 Box::pin(async move { self.id().await })
1094 }
1095}
1096impl IntoID<GitRepositoryId> for GitRepositoryId {
1097 fn into_id(
1098 self,
1099 ) -> std::pin::Pin<
1100 Box<dyn core::future::Future<Output = Result<GitRepositoryId, DaggerError>> + Send>,
1101 > {
1102 Box::pin(async move { Ok::<GitRepositoryId, DaggerError>(self) })
1103 }
1104}
1105impl GitRepositoryId {
1106 fn quote(&self) -> String {
1107 format!("\"{}\"", self.0.clone())
1108 }
1109}
1110#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1111pub struct HostId(pub String);
1112impl From<&str> for HostId {
1113 fn from(value: &str) -> Self {
1114 Self(value.to_string())
1115 }
1116}
1117impl From<String> for HostId {
1118 fn from(value: String) -> Self {
1119 Self(value)
1120 }
1121}
1122impl IntoID<HostId> for Host {
1123 fn into_id(
1124 self,
1125 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<HostId, DaggerError>> + Send>>
1126 {
1127 Box::pin(async move { self.id().await })
1128 }
1129}
1130impl IntoID<HostId> for HostId {
1131 fn into_id(
1132 self,
1133 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<HostId, DaggerError>> + Send>>
1134 {
1135 Box::pin(async move { Ok::<HostId, DaggerError>(self) })
1136 }
1137}
1138impl HostId {
1139 fn quote(&self) -> String {
1140 format!("\"{}\"", self.0.clone())
1141 }
1142}
1143#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1144pub struct InputTypeDefId(pub String);
1145impl From<&str> for InputTypeDefId {
1146 fn from(value: &str) -> Self {
1147 Self(value.to_string())
1148 }
1149}
1150impl From<String> for InputTypeDefId {
1151 fn from(value: String) -> Self {
1152 Self(value)
1153 }
1154}
1155impl IntoID<InputTypeDefId> for InputTypeDef {
1156 fn into_id(
1157 self,
1158 ) -> std::pin::Pin<
1159 Box<dyn core::future::Future<Output = Result<InputTypeDefId, DaggerError>> + Send>,
1160 > {
1161 Box::pin(async move { self.id().await })
1162 }
1163}
1164impl IntoID<InputTypeDefId> for InputTypeDefId {
1165 fn into_id(
1166 self,
1167 ) -> std::pin::Pin<
1168 Box<dyn core::future::Future<Output = Result<InputTypeDefId, DaggerError>> + Send>,
1169 > {
1170 Box::pin(async move { Ok::<InputTypeDefId, DaggerError>(self) })
1171 }
1172}
1173impl InputTypeDefId {
1174 fn quote(&self) -> String {
1175 format!("\"{}\"", self.0.clone())
1176 }
1177}
1178#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1179pub struct InterfaceTypeDefId(pub String);
1180impl From<&str> for InterfaceTypeDefId {
1181 fn from(value: &str) -> Self {
1182 Self(value.to_string())
1183 }
1184}
1185impl From<String> for InterfaceTypeDefId {
1186 fn from(value: String) -> Self {
1187 Self(value)
1188 }
1189}
1190impl IntoID<InterfaceTypeDefId> for InterfaceTypeDef {
1191 fn into_id(
1192 self,
1193 ) -> std::pin::Pin<
1194 Box<dyn core::future::Future<Output = Result<InterfaceTypeDefId, DaggerError>> + Send>,
1195 > {
1196 Box::pin(async move { self.id().await })
1197 }
1198}
1199impl IntoID<InterfaceTypeDefId> for InterfaceTypeDefId {
1200 fn into_id(
1201 self,
1202 ) -> std::pin::Pin<
1203 Box<dyn core::future::Future<Output = Result<InterfaceTypeDefId, DaggerError>> + Send>,
1204 > {
1205 Box::pin(async move { Ok::<InterfaceTypeDefId, DaggerError>(self) })
1206 }
1207}
1208impl InterfaceTypeDefId {
1209 fn quote(&self) -> String {
1210 format!("\"{}\"", self.0.clone())
1211 }
1212}
1213#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1214pub struct Json(pub String);
1215impl From<&str> for Json {
1216 fn from(value: &str) -> Self {
1217 Self(value.to_string())
1218 }
1219}
1220impl From<String> for Json {
1221 fn from(value: String) -> Self {
1222 Self(value)
1223 }
1224}
1225impl Json {
1226 fn quote(&self) -> String {
1227 format!("\"{}\"", self.0.clone())
1228 }
1229}
1230#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1231pub struct JsonValueId(pub String);
1232impl From<&str> for JsonValueId {
1233 fn from(value: &str) -> Self {
1234 Self(value.to_string())
1235 }
1236}
1237impl From<String> for JsonValueId {
1238 fn from(value: String) -> Self {
1239 Self(value)
1240 }
1241}
1242impl IntoID<JsonValueId> for JsonValue {
1243 fn into_id(
1244 self,
1245 ) -> std::pin::Pin<
1246 Box<dyn core::future::Future<Output = Result<JsonValueId, DaggerError>> + Send>,
1247 > {
1248 Box::pin(async move { self.id().await })
1249 }
1250}
1251impl IntoID<JsonValueId> for JsonValueId {
1252 fn into_id(
1253 self,
1254 ) -> std::pin::Pin<
1255 Box<dyn core::future::Future<Output = Result<JsonValueId, DaggerError>> + Send>,
1256 > {
1257 Box::pin(async move { Ok::<JsonValueId, DaggerError>(self) })
1258 }
1259}
1260impl JsonValueId {
1261 fn quote(&self) -> String {
1262 format!("\"{}\"", self.0.clone())
1263 }
1264}
1265#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1266pub struct Llmid(pub String);
1267impl From<&str> for Llmid {
1268 fn from(value: &str) -> Self {
1269 Self(value.to_string())
1270 }
1271}
1272impl From<String> for Llmid {
1273 fn from(value: String) -> Self {
1274 Self(value)
1275 }
1276}
1277impl IntoID<Llmid> for Llm {
1278 fn into_id(
1279 self,
1280 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Llmid, DaggerError>> + Send>>
1281 {
1282 Box::pin(async move { self.id().await })
1283 }
1284}
1285impl IntoID<Llmid> for Llmid {
1286 fn into_id(
1287 self,
1288 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<Llmid, DaggerError>> + Send>>
1289 {
1290 Box::pin(async move { Ok::<Llmid, DaggerError>(self) })
1291 }
1292}
1293impl Llmid {
1294 fn quote(&self) -> String {
1295 format!("\"{}\"", self.0.clone())
1296 }
1297}
1298#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1299pub struct LlmTokenUsageId(pub String);
1300impl From<&str> for LlmTokenUsageId {
1301 fn from(value: &str) -> Self {
1302 Self(value.to_string())
1303 }
1304}
1305impl From<String> for LlmTokenUsageId {
1306 fn from(value: String) -> Self {
1307 Self(value)
1308 }
1309}
1310impl IntoID<LlmTokenUsageId> for LlmTokenUsage {
1311 fn into_id(
1312 self,
1313 ) -> std::pin::Pin<
1314 Box<dyn core::future::Future<Output = Result<LlmTokenUsageId, DaggerError>> + Send>,
1315 > {
1316 Box::pin(async move { self.id().await })
1317 }
1318}
1319impl IntoID<LlmTokenUsageId> for LlmTokenUsageId {
1320 fn into_id(
1321 self,
1322 ) -> std::pin::Pin<
1323 Box<dyn core::future::Future<Output = Result<LlmTokenUsageId, DaggerError>> + Send>,
1324 > {
1325 Box::pin(async move { Ok::<LlmTokenUsageId, DaggerError>(self) })
1326 }
1327}
1328impl LlmTokenUsageId {
1329 fn quote(&self) -> String {
1330 format!("\"{}\"", self.0.clone())
1331 }
1332}
1333#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1334pub struct LabelId(pub String);
1335impl From<&str> for LabelId {
1336 fn from(value: &str) -> Self {
1337 Self(value.to_string())
1338 }
1339}
1340impl From<String> for LabelId {
1341 fn from(value: String) -> Self {
1342 Self(value)
1343 }
1344}
1345impl IntoID<LabelId> for Label {
1346 fn into_id(
1347 self,
1348 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<LabelId, DaggerError>> + Send>>
1349 {
1350 Box::pin(async move { self.id().await })
1351 }
1352}
1353impl IntoID<LabelId> for LabelId {
1354 fn into_id(
1355 self,
1356 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<LabelId, DaggerError>> + Send>>
1357 {
1358 Box::pin(async move { Ok::<LabelId, DaggerError>(self) })
1359 }
1360}
1361impl LabelId {
1362 fn quote(&self) -> String {
1363 format!("\"{}\"", self.0.clone())
1364 }
1365}
1366#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1367pub struct ListTypeDefId(pub String);
1368impl From<&str> for ListTypeDefId {
1369 fn from(value: &str) -> Self {
1370 Self(value.to_string())
1371 }
1372}
1373impl From<String> for ListTypeDefId {
1374 fn from(value: String) -> Self {
1375 Self(value)
1376 }
1377}
1378impl IntoID<ListTypeDefId> for ListTypeDef {
1379 fn into_id(
1380 self,
1381 ) -> std::pin::Pin<
1382 Box<dyn core::future::Future<Output = Result<ListTypeDefId, DaggerError>> + Send>,
1383 > {
1384 Box::pin(async move { self.id().await })
1385 }
1386}
1387impl IntoID<ListTypeDefId> for ListTypeDefId {
1388 fn into_id(
1389 self,
1390 ) -> std::pin::Pin<
1391 Box<dyn core::future::Future<Output = Result<ListTypeDefId, DaggerError>> + Send>,
1392 > {
1393 Box::pin(async move { Ok::<ListTypeDefId, DaggerError>(self) })
1394 }
1395}
1396impl ListTypeDefId {
1397 fn quote(&self) -> String {
1398 format!("\"{}\"", self.0.clone())
1399 }
1400}
1401#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1402pub struct ModuleConfigClientId(pub String);
1403impl From<&str> for ModuleConfigClientId {
1404 fn from(value: &str) -> Self {
1405 Self(value.to_string())
1406 }
1407}
1408impl From<String> for ModuleConfigClientId {
1409 fn from(value: String) -> Self {
1410 Self(value)
1411 }
1412}
1413impl IntoID<ModuleConfigClientId> for ModuleConfigClient {
1414 fn into_id(
1415 self,
1416 ) -> std::pin::Pin<
1417 Box<dyn core::future::Future<Output = Result<ModuleConfigClientId, DaggerError>> + Send>,
1418 > {
1419 Box::pin(async move { self.id().await })
1420 }
1421}
1422impl IntoID<ModuleConfigClientId> for ModuleConfigClientId {
1423 fn into_id(
1424 self,
1425 ) -> std::pin::Pin<
1426 Box<dyn core::future::Future<Output = Result<ModuleConfigClientId, DaggerError>> + Send>,
1427 > {
1428 Box::pin(async move { Ok::<ModuleConfigClientId, DaggerError>(self) })
1429 }
1430}
1431impl ModuleConfigClientId {
1432 fn quote(&self) -> String {
1433 format!("\"{}\"", self.0.clone())
1434 }
1435}
1436#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1437pub struct ModuleId(pub String);
1438impl From<&str> for ModuleId {
1439 fn from(value: &str) -> Self {
1440 Self(value.to_string())
1441 }
1442}
1443impl From<String> for ModuleId {
1444 fn from(value: String) -> Self {
1445 Self(value)
1446 }
1447}
1448impl IntoID<ModuleId> for Module {
1449 fn into_id(
1450 self,
1451 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ModuleId, DaggerError>> + Send>>
1452 {
1453 Box::pin(async move { self.id().await })
1454 }
1455}
1456impl IntoID<ModuleId> for ModuleId {
1457 fn into_id(
1458 self,
1459 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ModuleId, DaggerError>> + Send>>
1460 {
1461 Box::pin(async move { Ok::<ModuleId, DaggerError>(self) })
1462 }
1463}
1464impl ModuleId {
1465 fn quote(&self) -> String {
1466 format!("\"{}\"", self.0.clone())
1467 }
1468}
1469#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1470pub struct ModuleSourceId(pub String);
1471impl From<&str> for ModuleSourceId {
1472 fn from(value: &str) -> Self {
1473 Self(value.to_string())
1474 }
1475}
1476impl From<String> for ModuleSourceId {
1477 fn from(value: String) -> Self {
1478 Self(value)
1479 }
1480}
1481impl IntoID<ModuleSourceId> for ModuleSource {
1482 fn into_id(
1483 self,
1484 ) -> std::pin::Pin<
1485 Box<dyn core::future::Future<Output = Result<ModuleSourceId, DaggerError>> + Send>,
1486 > {
1487 Box::pin(async move { self.id().await })
1488 }
1489}
1490impl IntoID<ModuleSourceId> for ModuleSourceId {
1491 fn into_id(
1492 self,
1493 ) -> std::pin::Pin<
1494 Box<dyn core::future::Future<Output = Result<ModuleSourceId, DaggerError>> + Send>,
1495 > {
1496 Box::pin(async move { Ok::<ModuleSourceId, DaggerError>(self) })
1497 }
1498}
1499impl ModuleSourceId {
1500 fn quote(&self) -> String {
1501 format!("\"{}\"", self.0.clone())
1502 }
1503}
1504#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1505pub struct ObjectTypeDefId(pub String);
1506impl From<&str> for ObjectTypeDefId {
1507 fn from(value: &str) -> Self {
1508 Self(value.to_string())
1509 }
1510}
1511impl From<String> for ObjectTypeDefId {
1512 fn from(value: String) -> Self {
1513 Self(value)
1514 }
1515}
1516impl IntoID<ObjectTypeDefId> for ObjectTypeDef {
1517 fn into_id(
1518 self,
1519 ) -> std::pin::Pin<
1520 Box<dyn core::future::Future<Output = Result<ObjectTypeDefId, DaggerError>> + Send>,
1521 > {
1522 Box::pin(async move { self.id().await })
1523 }
1524}
1525impl IntoID<ObjectTypeDefId> for ObjectTypeDefId {
1526 fn into_id(
1527 self,
1528 ) -> std::pin::Pin<
1529 Box<dyn core::future::Future<Output = Result<ObjectTypeDefId, DaggerError>> + Send>,
1530 > {
1531 Box::pin(async move { Ok::<ObjectTypeDefId, DaggerError>(self) })
1532 }
1533}
1534impl ObjectTypeDefId {
1535 fn quote(&self) -> String {
1536 format!("\"{}\"", self.0.clone())
1537 }
1538}
1539#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1540pub struct Platform(pub String);
1541impl From<&str> for Platform {
1542 fn from(value: &str) -> Self {
1543 Self(value.to_string())
1544 }
1545}
1546impl From<String> for Platform {
1547 fn from(value: String) -> Self {
1548 Self(value)
1549 }
1550}
1551impl Platform {
1552 fn quote(&self) -> String {
1553 format!("\"{}\"", self.0.clone())
1554 }
1555}
1556#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1557pub struct PortId(pub String);
1558impl From<&str> for PortId {
1559 fn from(value: &str) -> Self {
1560 Self(value.to_string())
1561 }
1562}
1563impl From<String> for PortId {
1564 fn from(value: String) -> Self {
1565 Self(value)
1566 }
1567}
1568impl IntoID<PortId> for Port {
1569 fn into_id(
1570 self,
1571 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<PortId, DaggerError>> + Send>>
1572 {
1573 Box::pin(async move { self.id().await })
1574 }
1575}
1576impl IntoID<PortId> for PortId {
1577 fn into_id(
1578 self,
1579 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<PortId, DaggerError>> + Send>>
1580 {
1581 Box::pin(async move { Ok::<PortId, DaggerError>(self) })
1582 }
1583}
1584impl PortId {
1585 fn quote(&self) -> String {
1586 format!("\"{}\"", self.0.clone())
1587 }
1588}
1589#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1590pub struct SdkConfigId(pub String);
1591impl From<&str> for SdkConfigId {
1592 fn from(value: &str) -> Self {
1593 Self(value.to_string())
1594 }
1595}
1596impl From<String> for SdkConfigId {
1597 fn from(value: String) -> Self {
1598 Self(value)
1599 }
1600}
1601impl IntoID<SdkConfigId> for SdkConfig {
1602 fn into_id(
1603 self,
1604 ) -> std::pin::Pin<
1605 Box<dyn core::future::Future<Output = Result<SdkConfigId, DaggerError>> + Send>,
1606 > {
1607 Box::pin(async move { self.id().await })
1608 }
1609}
1610impl IntoID<SdkConfigId> for SdkConfigId {
1611 fn into_id(
1612 self,
1613 ) -> std::pin::Pin<
1614 Box<dyn core::future::Future<Output = Result<SdkConfigId, DaggerError>> + Send>,
1615 > {
1616 Box::pin(async move { Ok::<SdkConfigId, DaggerError>(self) })
1617 }
1618}
1619impl SdkConfigId {
1620 fn quote(&self) -> String {
1621 format!("\"{}\"", self.0.clone())
1622 }
1623}
1624#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1625pub struct ScalarTypeDefId(pub String);
1626impl From<&str> for ScalarTypeDefId {
1627 fn from(value: &str) -> Self {
1628 Self(value.to_string())
1629 }
1630}
1631impl From<String> for ScalarTypeDefId {
1632 fn from(value: String) -> Self {
1633 Self(value)
1634 }
1635}
1636impl IntoID<ScalarTypeDefId> for ScalarTypeDef {
1637 fn into_id(
1638 self,
1639 ) -> std::pin::Pin<
1640 Box<dyn core::future::Future<Output = Result<ScalarTypeDefId, DaggerError>> + Send>,
1641 > {
1642 Box::pin(async move { self.id().await })
1643 }
1644}
1645impl IntoID<ScalarTypeDefId> for ScalarTypeDefId {
1646 fn into_id(
1647 self,
1648 ) -> std::pin::Pin<
1649 Box<dyn core::future::Future<Output = Result<ScalarTypeDefId, DaggerError>> + Send>,
1650 > {
1651 Box::pin(async move { Ok::<ScalarTypeDefId, DaggerError>(self) })
1652 }
1653}
1654impl ScalarTypeDefId {
1655 fn quote(&self) -> String {
1656 format!("\"{}\"", self.0.clone())
1657 }
1658}
1659#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1660pub struct SearchResultId(pub String);
1661impl From<&str> for SearchResultId {
1662 fn from(value: &str) -> Self {
1663 Self(value.to_string())
1664 }
1665}
1666impl From<String> for SearchResultId {
1667 fn from(value: String) -> Self {
1668 Self(value)
1669 }
1670}
1671impl IntoID<SearchResultId> for SearchResult {
1672 fn into_id(
1673 self,
1674 ) -> std::pin::Pin<
1675 Box<dyn core::future::Future<Output = Result<SearchResultId, DaggerError>> + Send>,
1676 > {
1677 Box::pin(async move { self.id().await })
1678 }
1679}
1680impl IntoID<SearchResultId> for SearchResultId {
1681 fn into_id(
1682 self,
1683 ) -> std::pin::Pin<
1684 Box<dyn core::future::Future<Output = Result<SearchResultId, DaggerError>> + Send>,
1685 > {
1686 Box::pin(async move { Ok::<SearchResultId, DaggerError>(self) })
1687 }
1688}
1689impl SearchResultId {
1690 fn quote(&self) -> String {
1691 format!("\"{}\"", self.0.clone())
1692 }
1693}
1694#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1695pub struct SearchSubmatchId(pub String);
1696impl From<&str> for SearchSubmatchId {
1697 fn from(value: &str) -> Self {
1698 Self(value.to_string())
1699 }
1700}
1701impl From<String> for SearchSubmatchId {
1702 fn from(value: String) -> Self {
1703 Self(value)
1704 }
1705}
1706impl IntoID<SearchSubmatchId> for SearchSubmatch {
1707 fn into_id(
1708 self,
1709 ) -> std::pin::Pin<
1710 Box<dyn core::future::Future<Output = Result<SearchSubmatchId, DaggerError>> + Send>,
1711 > {
1712 Box::pin(async move { self.id().await })
1713 }
1714}
1715impl IntoID<SearchSubmatchId> for SearchSubmatchId {
1716 fn into_id(
1717 self,
1718 ) -> std::pin::Pin<
1719 Box<dyn core::future::Future<Output = Result<SearchSubmatchId, DaggerError>> + Send>,
1720 > {
1721 Box::pin(async move { Ok::<SearchSubmatchId, DaggerError>(self) })
1722 }
1723}
1724impl SearchSubmatchId {
1725 fn quote(&self) -> String {
1726 format!("\"{}\"", self.0.clone())
1727 }
1728}
1729#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1730pub struct SecretId(pub String);
1731impl From<&str> for SecretId {
1732 fn from(value: &str) -> Self {
1733 Self(value.to_string())
1734 }
1735}
1736impl From<String> for SecretId {
1737 fn from(value: String) -> Self {
1738 Self(value)
1739 }
1740}
1741impl IntoID<SecretId> for Secret {
1742 fn into_id(
1743 self,
1744 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SecretId, DaggerError>> + Send>>
1745 {
1746 Box::pin(async move { self.id().await })
1747 }
1748}
1749impl IntoID<SecretId> for SecretId {
1750 fn into_id(
1751 self,
1752 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SecretId, DaggerError>> + Send>>
1753 {
1754 Box::pin(async move { Ok::<SecretId, DaggerError>(self) })
1755 }
1756}
1757impl SecretId {
1758 fn quote(&self) -> String {
1759 format!("\"{}\"", self.0.clone())
1760 }
1761}
1762#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1763pub struct ServiceId(pub String);
1764impl From<&str> for ServiceId {
1765 fn from(value: &str) -> Self {
1766 Self(value.to_string())
1767 }
1768}
1769impl From<String> for ServiceId {
1770 fn from(value: String) -> Self {
1771 Self(value)
1772 }
1773}
1774impl IntoID<ServiceId> for Service {
1775 fn into_id(
1776 self,
1777 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ServiceId, DaggerError>> + Send>>
1778 {
1779 Box::pin(async move { self.id().await })
1780 }
1781}
1782impl IntoID<ServiceId> for ServiceId {
1783 fn into_id(
1784 self,
1785 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<ServiceId, DaggerError>> + Send>>
1786 {
1787 Box::pin(async move { Ok::<ServiceId, DaggerError>(self) })
1788 }
1789}
1790impl ServiceId {
1791 fn quote(&self) -> String {
1792 format!("\"{}\"", self.0.clone())
1793 }
1794}
1795#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1796pub struct SocketId(pub String);
1797impl From<&str> for SocketId {
1798 fn from(value: &str) -> Self {
1799 Self(value.to_string())
1800 }
1801}
1802impl From<String> for SocketId {
1803 fn from(value: String) -> Self {
1804 Self(value)
1805 }
1806}
1807impl IntoID<SocketId> for Socket {
1808 fn into_id(
1809 self,
1810 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SocketId, DaggerError>> + Send>>
1811 {
1812 Box::pin(async move { self.id().await })
1813 }
1814}
1815impl IntoID<SocketId> for SocketId {
1816 fn into_id(
1817 self,
1818 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<SocketId, DaggerError>> + Send>>
1819 {
1820 Box::pin(async move { Ok::<SocketId, DaggerError>(self) })
1821 }
1822}
1823impl SocketId {
1824 fn quote(&self) -> String {
1825 format!("\"{}\"", self.0.clone())
1826 }
1827}
1828#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1829pub struct SourceMapId(pub String);
1830impl From<&str> for SourceMapId {
1831 fn from(value: &str) -> Self {
1832 Self(value.to_string())
1833 }
1834}
1835impl From<String> for SourceMapId {
1836 fn from(value: String) -> Self {
1837 Self(value)
1838 }
1839}
1840impl IntoID<SourceMapId> for SourceMap {
1841 fn into_id(
1842 self,
1843 ) -> std::pin::Pin<
1844 Box<dyn core::future::Future<Output = Result<SourceMapId, DaggerError>> + Send>,
1845 > {
1846 Box::pin(async move { self.id().await })
1847 }
1848}
1849impl IntoID<SourceMapId> for SourceMapId {
1850 fn into_id(
1851 self,
1852 ) -> std::pin::Pin<
1853 Box<dyn core::future::Future<Output = Result<SourceMapId, DaggerError>> + Send>,
1854 > {
1855 Box::pin(async move { Ok::<SourceMapId, DaggerError>(self) })
1856 }
1857}
1858impl SourceMapId {
1859 fn quote(&self) -> String {
1860 format!("\"{}\"", self.0.clone())
1861 }
1862}
1863#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1864pub struct StatId(pub String);
1865impl From<&str> for StatId {
1866 fn from(value: &str) -> Self {
1867 Self(value.to_string())
1868 }
1869}
1870impl From<String> for StatId {
1871 fn from(value: String) -> Self {
1872 Self(value)
1873 }
1874}
1875impl IntoID<StatId> for Stat {
1876 fn into_id(
1877 self,
1878 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<StatId, DaggerError>> + Send>>
1879 {
1880 Box::pin(async move { self.id().await })
1881 }
1882}
1883impl IntoID<StatId> for StatId {
1884 fn into_id(
1885 self,
1886 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<StatId, DaggerError>> + Send>>
1887 {
1888 Box::pin(async move { Ok::<StatId, DaggerError>(self) })
1889 }
1890}
1891impl StatId {
1892 fn quote(&self) -> String {
1893 format!("\"{}\"", self.0.clone())
1894 }
1895}
1896#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1897pub struct TerminalId(pub String);
1898impl From<&str> for TerminalId {
1899 fn from(value: &str) -> Self {
1900 Self(value.to_string())
1901 }
1902}
1903impl From<String> for TerminalId {
1904 fn from(value: String) -> Self {
1905 Self(value)
1906 }
1907}
1908impl IntoID<TerminalId> for Terminal {
1909 fn into_id(
1910 self,
1911 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TerminalId, DaggerError>> + Send>>
1912 {
1913 Box::pin(async move { self.id().await })
1914 }
1915}
1916impl IntoID<TerminalId> for TerminalId {
1917 fn into_id(
1918 self,
1919 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TerminalId, DaggerError>> + Send>>
1920 {
1921 Box::pin(async move { Ok::<TerminalId, DaggerError>(self) })
1922 }
1923}
1924impl TerminalId {
1925 fn quote(&self) -> String {
1926 format!("\"{}\"", self.0.clone())
1927 }
1928}
1929#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1930pub struct TypeDefId(pub String);
1931impl From<&str> for TypeDefId {
1932 fn from(value: &str) -> Self {
1933 Self(value.to_string())
1934 }
1935}
1936impl From<String> for TypeDefId {
1937 fn from(value: String) -> Self {
1938 Self(value)
1939 }
1940}
1941impl IntoID<TypeDefId> for TypeDef {
1942 fn into_id(
1943 self,
1944 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TypeDefId, DaggerError>> + Send>>
1945 {
1946 Box::pin(async move { self.id().await })
1947 }
1948}
1949impl IntoID<TypeDefId> for TypeDefId {
1950 fn into_id(
1951 self,
1952 ) -> std::pin::Pin<Box<dyn core::future::Future<Output = Result<TypeDefId, DaggerError>> + Send>>
1953 {
1954 Box::pin(async move { Ok::<TypeDefId, DaggerError>(self) })
1955 }
1956}
1957impl TypeDefId {
1958 fn quote(&self) -> String {
1959 format!("\"{}\"", self.0.clone())
1960 }
1961}
1962#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
1963pub struct Void(pub String);
1964impl From<&str> for Void {
1965 fn from(value: &str) -> Self {
1966 Self(value.to_string())
1967 }
1968}
1969impl From<String> for Void {
1970 fn from(value: String) -> Self {
1971 Self(value)
1972 }
1973}
1974impl Void {
1975 fn quote(&self) -> String {
1976 format!("\"{}\"", self.0.clone())
1977 }
1978}
1979#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1980pub struct BuildArg {
1981 pub name: String,
1982 pub value: String,
1983}
1984#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1985pub struct PipelineLabel {
1986 pub name: String,
1987 pub value: String,
1988}
1989#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
1990pub struct PortForward {
1991 pub backend: isize,
1992 pub frontend: isize,
1993 pub protocol: NetworkProtocol,
1994}
1995#[derive(Clone)]
1996pub struct Address {
1997 pub proc: Option<Arc<DaggerSessionProc>>,
1998 pub selection: Selection,
1999 pub graphql_client: DynGraphQLClient,
2000}
2001#[derive(Builder, Debug, PartialEq)]
2002pub struct AddressDirectoryOpts<'a> {
2003 #[builder(setter(into, strip_option), default)]
2004 pub exclude: Option<Vec<&'a str>>,
2005 #[builder(setter(into, strip_option), default)]
2006 pub gitignore: Option<bool>,
2007 #[builder(setter(into, strip_option), default)]
2008 pub include: Option<Vec<&'a str>>,
2009 #[builder(setter(into, strip_option), default)]
2010 pub no_cache: Option<bool>,
2011}
2012#[derive(Builder, Debug, PartialEq)]
2013pub struct AddressFileOpts<'a> {
2014 #[builder(setter(into, strip_option), default)]
2015 pub exclude: Option<Vec<&'a str>>,
2016 #[builder(setter(into, strip_option), default)]
2017 pub gitignore: Option<bool>,
2018 #[builder(setter(into, strip_option), default)]
2019 pub include: Option<Vec<&'a str>>,
2020 #[builder(setter(into, strip_option), default)]
2021 pub no_cache: Option<bool>,
2022}
2023impl Address {
2024 pub fn container(&self) -> Container {
2026 let query = self.selection.select("container");
2027 Container {
2028 proc: self.proc.clone(),
2029 selection: query,
2030 graphql_client: self.graphql_client.clone(),
2031 }
2032 }
2033 pub fn directory(&self) -> Directory {
2039 let query = self.selection.select("directory");
2040 Directory {
2041 proc: self.proc.clone(),
2042 selection: query,
2043 graphql_client: self.graphql_client.clone(),
2044 }
2045 }
2046 pub fn directory_opts<'a>(&self, opts: AddressDirectoryOpts<'a>) -> Directory {
2052 let mut query = self.selection.select("directory");
2053 if let Some(exclude) = opts.exclude {
2054 query = query.arg("exclude", exclude);
2055 }
2056 if let Some(include) = opts.include {
2057 query = query.arg("include", include);
2058 }
2059 if let Some(gitignore) = opts.gitignore {
2060 query = query.arg("gitignore", gitignore);
2061 }
2062 if let Some(no_cache) = opts.no_cache {
2063 query = query.arg("noCache", no_cache);
2064 }
2065 Directory {
2066 proc: self.proc.clone(),
2067 selection: query,
2068 graphql_client: self.graphql_client.clone(),
2069 }
2070 }
2071 pub fn file(&self) -> File {
2077 let query = self.selection.select("file");
2078 File {
2079 proc: self.proc.clone(),
2080 selection: query,
2081 graphql_client: self.graphql_client.clone(),
2082 }
2083 }
2084 pub fn file_opts<'a>(&self, opts: AddressFileOpts<'a>) -> File {
2090 let mut query = self.selection.select("file");
2091 if let Some(exclude) = opts.exclude {
2092 query = query.arg("exclude", exclude);
2093 }
2094 if let Some(include) = opts.include {
2095 query = query.arg("include", include);
2096 }
2097 if let Some(gitignore) = opts.gitignore {
2098 query = query.arg("gitignore", gitignore);
2099 }
2100 if let Some(no_cache) = opts.no_cache {
2101 query = query.arg("noCache", no_cache);
2102 }
2103 File {
2104 proc: self.proc.clone(),
2105 selection: query,
2106 graphql_client: self.graphql_client.clone(),
2107 }
2108 }
2109 pub fn git_ref(&self) -> GitRef {
2111 let query = self.selection.select("gitRef");
2112 GitRef {
2113 proc: self.proc.clone(),
2114 selection: query,
2115 graphql_client: self.graphql_client.clone(),
2116 }
2117 }
2118 pub fn git_repository(&self) -> GitRepository {
2120 let query = self.selection.select("gitRepository");
2121 GitRepository {
2122 proc: self.proc.clone(),
2123 selection: query,
2124 graphql_client: self.graphql_client.clone(),
2125 }
2126 }
2127 pub async fn id(&self) -> Result<AddressId, DaggerError> {
2129 let query = self.selection.select("id");
2130 query.execute(self.graphql_client.clone()).await
2131 }
2132 pub fn secret(&self) -> Secret {
2134 let query = self.selection.select("secret");
2135 Secret {
2136 proc: self.proc.clone(),
2137 selection: query,
2138 graphql_client: self.graphql_client.clone(),
2139 }
2140 }
2141 pub fn service(&self) -> Service {
2143 let query = self.selection.select("service");
2144 Service {
2145 proc: self.proc.clone(),
2146 selection: query,
2147 graphql_client: self.graphql_client.clone(),
2148 }
2149 }
2150 pub fn socket(&self) -> Socket {
2152 let query = self.selection.select("socket");
2153 Socket {
2154 proc: self.proc.clone(),
2155 selection: query,
2156 graphql_client: self.graphql_client.clone(),
2157 }
2158 }
2159 pub async fn value(&self) -> Result<String, DaggerError> {
2161 let query = self.selection.select("value");
2162 query.execute(self.graphql_client.clone()).await
2163 }
2164}
2165#[derive(Clone)]
2166pub struct Binding {
2167 pub proc: Option<Arc<DaggerSessionProc>>,
2168 pub selection: Selection,
2169 pub graphql_client: DynGraphQLClient,
2170}
2171impl Binding {
2172 pub fn as_address(&self) -> Address {
2174 let query = self.selection.select("asAddress");
2175 Address {
2176 proc: self.proc.clone(),
2177 selection: query,
2178 graphql_client: self.graphql_client.clone(),
2179 }
2180 }
2181 pub fn as_cache_volume(&self) -> CacheVolume {
2183 let query = self.selection.select("asCacheVolume");
2184 CacheVolume {
2185 proc: self.proc.clone(),
2186 selection: query,
2187 graphql_client: self.graphql_client.clone(),
2188 }
2189 }
2190 pub fn as_changeset(&self) -> Changeset {
2192 let query = self.selection.select("asChangeset");
2193 Changeset {
2194 proc: self.proc.clone(),
2195 selection: query,
2196 graphql_client: self.graphql_client.clone(),
2197 }
2198 }
2199 pub fn as_check(&self) -> Check {
2201 let query = self.selection.select("asCheck");
2202 Check {
2203 proc: self.proc.clone(),
2204 selection: query,
2205 graphql_client: self.graphql_client.clone(),
2206 }
2207 }
2208 pub fn as_check_group(&self) -> CheckGroup {
2210 let query = self.selection.select("asCheckGroup");
2211 CheckGroup {
2212 proc: self.proc.clone(),
2213 selection: query,
2214 graphql_client: self.graphql_client.clone(),
2215 }
2216 }
2217 pub fn as_cloud(&self) -> Cloud {
2219 let query = self.selection.select("asCloud");
2220 Cloud {
2221 proc: self.proc.clone(),
2222 selection: query,
2223 graphql_client: self.graphql_client.clone(),
2224 }
2225 }
2226 pub fn as_container(&self) -> Container {
2228 let query = self.selection.select("asContainer");
2229 Container {
2230 proc: self.proc.clone(),
2231 selection: query,
2232 graphql_client: self.graphql_client.clone(),
2233 }
2234 }
2235 pub fn as_directory(&self) -> Directory {
2237 let query = self.selection.select("asDirectory");
2238 Directory {
2239 proc: self.proc.clone(),
2240 selection: query,
2241 graphql_client: self.graphql_client.clone(),
2242 }
2243 }
2244 pub fn as_env(&self) -> Env {
2246 let query = self.selection.select("asEnv");
2247 Env {
2248 proc: self.proc.clone(),
2249 selection: query,
2250 graphql_client: self.graphql_client.clone(),
2251 }
2252 }
2253 pub fn as_env_file(&self) -> EnvFile {
2255 let query = self.selection.select("asEnvFile");
2256 EnvFile {
2257 proc: self.proc.clone(),
2258 selection: query,
2259 graphql_client: self.graphql_client.clone(),
2260 }
2261 }
2262 pub fn as_file(&self) -> File {
2264 let query = self.selection.select("asFile");
2265 File {
2266 proc: self.proc.clone(),
2267 selection: query,
2268 graphql_client: self.graphql_client.clone(),
2269 }
2270 }
2271 pub fn as_generator(&self) -> Generator {
2273 let query = self.selection.select("asGenerator");
2274 Generator {
2275 proc: self.proc.clone(),
2276 selection: query,
2277 graphql_client: self.graphql_client.clone(),
2278 }
2279 }
2280 pub fn as_generator_group(&self) -> GeneratorGroup {
2282 let query = self.selection.select("asGeneratorGroup");
2283 GeneratorGroup {
2284 proc: self.proc.clone(),
2285 selection: query,
2286 graphql_client: self.graphql_client.clone(),
2287 }
2288 }
2289 pub fn as_git_ref(&self) -> GitRef {
2291 let query = self.selection.select("asGitRef");
2292 GitRef {
2293 proc: self.proc.clone(),
2294 selection: query,
2295 graphql_client: self.graphql_client.clone(),
2296 }
2297 }
2298 pub fn as_git_repository(&self) -> GitRepository {
2300 let query = self.selection.select("asGitRepository");
2301 GitRepository {
2302 proc: self.proc.clone(),
2303 selection: query,
2304 graphql_client: self.graphql_client.clone(),
2305 }
2306 }
2307 pub fn as_json_value(&self) -> JsonValue {
2309 let query = self.selection.select("asJSONValue");
2310 JsonValue {
2311 proc: self.proc.clone(),
2312 selection: query,
2313 graphql_client: self.graphql_client.clone(),
2314 }
2315 }
2316 pub fn as_module(&self) -> Module {
2318 let query = self.selection.select("asModule");
2319 Module {
2320 proc: self.proc.clone(),
2321 selection: query,
2322 graphql_client: self.graphql_client.clone(),
2323 }
2324 }
2325 pub fn as_module_config_client(&self) -> ModuleConfigClient {
2327 let query = self.selection.select("asModuleConfigClient");
2328 ModuleConfigClient {
2329 proc: self.proc.clone(),
2330 selection: query,
2331 graphql_client: self.graphql_client.clone(),
2332 }
2333 }
2334 pub fn as_module_source(&self) -> ModuleSource {
2336 let query = self.selection.select("asModuleSource");
2337 ModuleSource {
2338 proc: self.proc.clone(),
2339 selection: query,
2340 graphql_client: self.graphql_client.clone(),
2341 }
2342 }
2343 pub fn as_search_result(&self) -> SearchResult {
2345 let query = self.selection.select("asSearchResult");
2346 SearchResult {
2347 proc: self.proc.clone(),
2348 selection: query,
2349 graphql_client: self.graphql_client.clone(),
2350 }
2351 }
2352 pub fn as_search_submatch(&self) -> SearchSubmatch {
2354 let query = self.selection.select("asSearchSubmatch");
2355 SearchSubmatch {
2356 proc: self.proc.clone(),
2357 selection: query,
2358 graphql_client: self.graphql_client.clone(),
2359 }
2360 }
2361 pub fn as_secret(&self) -> Secret {
2363 let query = self.selection.select("asSecret");
2364 Secret {
2365 proc: self.proc.clone(),
2366 selection: query,
2367 graphql_client: self.graphql_client.clone(),
2368 }
2369 }
2370 pub fn as_service(&self) -> Service {
2372 let query = self.selection.select("asService");
2373 Service {
2374 proc: self.proc.clone(),
2375 selection: query,
2376 graphql_client: self.graphql_client.clone(),
2377 }
2378 }
2379 pub fn as_socket(&self) -> Socket {
2381 let query = self.selection.select("asSocket");
2382 Socket {
2383 proc: self.proc.clone(),
2384 selection: query,
2385 graphql_client: self.graphql_client.clone(),
2386 }
2387 }
2388 pub fn as_stat(&self) -> Stat {
2390 let query = self.selection.select("asStat");
2391 Stat {
2392 proc: self.proc.clone(),
2393 selection: query,
2394 graphql_client: self.graphql_client.clone(),
2395 }
2396 }
2397 pub async fn as_string(&self) -> Result<String, DaggerError> {
2399 let query = self.selection.select("asString");
2400 query.execute(self.graphql_client.clone()).await
2401 }
2402 pub async fn digest(&self) -> Result<String, DaggerError> {
2404 let query = self.selection.select("digest");
2405 query.execute(self.graphql_client.clone()).await
2406 }
2407 pub async fn id(&self) -> Result<BindingId, DaggerError> {
2409 let query = self.selection.select("id");
2410 query.execute(self.graphql_client.clone()).await
2411 }
2412 pub async fn is_null(&self) -> Result<bool, DaggerError> {
2414 let query = self.selection.select("isNull");
2415 query.execute(self.graphql_client.clone()).await
2416 }
2417 pub async fn name(&self) -> Result<String, DaggerError> {
2419 let query = self.selection.select("name");
2420 query.execute(self.graphql_client.clone()).await
2421 }
2422 pub async fn type_name(&self) -> Result<String, DaggerError> {
2424 let query = self.selection.select("typeName");
2425 query.execute(self.graphql_client.clone()).await
2426 }
2427}
2428#[derive(Clone)]
2429pub struct CacheVolume {
2430 pub proc: Option<Arc<DaggerSessionProc>>,
2431 pub selection: Selection,
2432 pub graphql_client: DynGraphQLClient,
2433}
2434impl CacheVolume {
2435 pub async fn id(&self) -> Result<CacheVolumeId, DaggerError> {
2437 let query = self.selection.select("id");
2438 query.execute(self.graphql_client.clone()).await
2439 }
2440}
2441#[derive(Clone)]
2442pub struct Changeset {
2443 pub proc: Option<Arc<DaggerSessionProc>>,
2444 pub selection: Selection,
2445 pub graphql_client: DynGraphQLClient,
2446}
2447#[derive(Builder, Debug, PartialEq)]
2448pub struct ChangesetWithChangesetOpts {
2449 #[builder(setter(into, strip_option), default)]
2451 pub on_conflict: Option<ChangesetMergeConflict>,
2452}
2453#[derive(Builder, Debug, PartialEq)]
2454pub struct ChangesetWithChangesetsOpts {
2455 #[builder(setter(into, strip_option), default)]
2457 pub on_conflict: Option<ChangesetsMergeConflict>,
2458}
2459impl Changeset {
2460 pub async fn added_paths(&self) -> Result<Vec<String>, DaggerError> {
2462 let query = self.selection.select("addedPaths");
2463 query.execute(self.graphql_client.clone()).await
2464 }
2465 pub fn after(&self) -> Directory {
2467 let query = self.selection.select("after");
2468 Directory {
2469 proc: self.proc.clone(),
2470 selection: query,
2471 graphql_client: self.graphql_client.clone(),
2472 }
2473 }
2474 pub fn as_patch(&self) -> File {
2476 let query = self.selection.select("asPatch");
2477 File {
2478 proc: self.proc.clone(),
2479 selection: query,
2480 graphql_client: self.graphql_client.clone(),
2481 }
2482 }
2483 pub fn before(&self) -> Directory {
2485 let query = self.selection.select("before");
2486 Directory {
2487 proc: self.proc.clone(),
2488 selection: query,
2489 graphql_client: self.graphql_client.clone(),
2490 }
2491 }
2492 pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
2498 let mut query = self.selection.select("export");
2499 query = query.arg("path", path.into());
2500 query.execute(self.graphql_client.clone()).await
2501 }
2502 pub async fn id(&self) -> Result<ChangesetId, DaggerError> {
2504 let query = self.selection.select("id");
2505 query.execute(self.graphql_client.clone()).await
2506 }
2507 pub async fn is_empty(&self) -> Result<bool, DaggerError> {
2509 let query = self.selection.select("isEmpty");
2510 query.execute(self.graphql_client.clone()).await
2511 }
2512 pub fn layer(&self) -> Directory {
2514 let query = self.selection.select("layer");
2515 Directory {
2516 proc: self.proc.clone(),
2517 selection: query,
2518 graphql_client: self.graphql_client.clone(),
2519 }
2520 }
2521 pub async fn modified_paths(&self) -> Result<Vec<String>, DaggerError> {
2523 let query = self.selection.select("modifiedPaths");
2524 query.execute(self.graphql_client.clone()).await
2525 }
2526 pub async fn removed_paths(&self) -> Result<Vec<String>, DaggerError> {
2528 let query = self.selection.select("removedPaths");
2529 query.execute(self.graphql_client.clone()).await
2530 }
2531 pub async fn sync(&self) -> Result<ChangesetId, DaggerError> {
2533 let query = self.selection.select("sync");
2534 query.execute(self.graphql_client.clone()).await
2535 }
2536 pub fn with_changeset(&self, changes: impl IntoID<ChangesetId>) -> Changeset {
2544 let mut query = self.selection.select("withChangeset");
2545 query = query.arg_lazy(
2546 "changes",
2547 Box::new(move || {
2548 let changes = changes.clone();
2549 Box::pin(async move { changes.into_id().await.unwrap().quote() })
2550 }),
2551 );
2552 Changeset {
2553 proc: self.proc.clone(),
2554 selection: query,
2555 graphql_client: self.graphql_client.clone(),
2556 }
2557 }
2558 pub fn with_changeset_opts(
2566 &self,
2567 changes: impl IntoID<ChangesetId>,
2568 opts: ChangesetWithChangesetOpts,
2569 ) -> Changeset {
2570 let mut query = self.selection.select("withChangeset");
2571 query = query.arg_lazy(
2572 "changes",
2573 Box::new(move || {
2574 let changes = changes.clone();
2575 Box::pin(async move { changes.into_id().await.unwrap().quote() })
2576 }),
2577 );
2578 if let Some(on_conflict) = opts.on_conflict {
2579 query = query.arg("onConflict", on_conflict);
2580 }
2581 Changeset {
2582 proc: self.proc.clone(),
2583 selection: query,
2584 graphql_client: self.graphql_client.clone(),
2585 }
2586 }
2587 pub fn with_changesets(&self, changes: Vec<ChangesetId>) -> Changeset {
2596 let mut query = self.selection.select("withChangesets");
2597 query = query.arg("changes", changes);
2598 Changeset {
2599 proc: self.proc.clone(),
2600 selection: query,
2601 graphql_client: self.graphql_client.clone(),
2602 }
2603 }
2604 pub fn with_changesets_opts(
2613 &self,
2614 changes: Vec<ChangesetId>,
2615 opts: ChangesetWithChangesetsOpts,
2616 ) -> Changeset {
2617 let mut query = self.selection.select("withChangesets");
2618 query = query.arg("changes", changes);
2619 if let Some(on_conflict) = opts.on_conflict {
2620 query = query.arg("onConflict", on_conflict);
2621 }
2622 Changeset {
2623 proc: self.proc.clone(),
2624 selection: query,
2625 graphql_client: self.graphql_client.clone(),
2626 }
2627 }
2628}
2629#[derive(Clone)]
2630pub struct Check {
2631 pub proc: Option<Arc<DaggerSessionProc>>,
2632 pub selection: Selection,
2633 pub graphql_client: DynGraphQLClient,
2634}
2635impl Check {
2636 pub async fn completed(&self) -> Result<bool, DaggerError> {
2638 let query = self.selection.select("completed");
2639 query.execute(self.graphql_client.clone()).await
2640 }
2641 pub async fn description(&self) -> Result<String, DaggerError> {
2643 let query = self.selection.select("description");
2644 query.execute(self.graphql_client.clone()).await
2645 }
2646 pub async fn id(&self) -> Result<CheckId, DaggerError> {
2648 let query = self.selection.select("id");
2649 query.execute(self.graphql_client.clone()).await
2650 }
2651 pub async fn name(&self) -> Result<String, DaggerError> {
2653 let query = self.selection.select("name");
2654 query.execute(self.graphql_client.clone()).await
2655 }
2656 pub async fn passed(&self) -> Result<bool, DaggerError> {
2658 let query = self.selection.select("passed");
2659 query.execute(self.graphql_client.clone()).await
2660 }
2661 pub async fn path(&self) -> Result<Vec<String>, DaggerError> {
2663 let query = self.selection.select("path");
2664 query.execute(self.graphql_client.clone()).await
2665 }
2666 pub async fn result_emoji(&self) -> Result<String, DaggerError> {
2668 let query = self.selection.select("resultEmoji");
2669 query.execute(self.graphql_client.clone()).await
2670 }
2671 pub fn run(&self) -> Check {
2673 let query = self.selection.select("run");
2674 Check {
2675 proc: self.proc.clone(),
2676 selection: query,
2677 graphql_client: self.graphql_client.clone(),
2678 }
2679 }
2680}
2681#[derive(Clone)]
2682pub struct CheckGroup {
2683 pub proc: Option<Arc<DaggerSessionProc>>,
2684 pub selection: Selection,
2685 pub graphql_client: DynGraphQLClient,
2686}
2687impl CheckGroup {
2688 pub async fn id(&self) -> Result<CheckGroupId, DaggerError> {
2690 let query = self.selection.select("id");
2691 query.execute(self.graphql_client.clone()).await
2692 }
2693 pub fn list(&self) -> Vec<Check> {
2695 let query = self.selection.select("list");
2696 vec![Check {
2697 proc: self.proc.clone(),
2698 selection: query,
2699 graphql_client: self.graphql_client.clone(),
2700 }]
2701 }
2702 pub fn report(&self) -> File {
2704 let query = self.selection.select("report");
2705 File {
2706 proc: self.proc.clone(),
2707 selection: query,
2708 graphql_client: self.graphql_client.clone(),
2709 }
2710 }
2711 pub fn run(&self) -> CheckGroup {
2713 let query = self.selection.select("run");
2714 CheckGroup {
2715 proc: self.proc.clone(),
2716 selection: query,
2717 graphql_client: self.graphql_client.clone(),
2718 }
2719 }
2720}
2721#[derive(Clone)]
2722pub struct Cloud {
2723 pub proc: Option<Arc<DaggerSessionProc>>,
2724 pub selection: Selection,
2725 pub graphql_client: DynGraphQLClient,
2726}
2727impl Cloud {
2728 pub async fn id(&self) -> Result<CloudId, DaggerError> {
2730 let query = self.selection.select("id");
2731 query.execute(self.graphql_client.clone()).await
2732 }
2733 pub async fn trace_url(&self) -> Result<String, DaggerError> {
2735 let query = self.selection.select("traceURL");
2736 query.execute(self.graphql_client.clone()).await
2737 }
2738}
2739#[derive(Clone)]
2740pub struct Container {
2741 pub proc: Option<Arc<DaggerSessionProc>>,
2742 pub selection: Selection,
2743 pub graphql_client: DynGraphQLClient,
2744}
2745#[derive(Builder, Debug, PartialEq)]
2746pub struct ContainerAsServiceOpts<'a> {
2747 #[builder(setter(into, strip_option), default)]
2750 pub args: Option<Vec<&'a str>>,
2751 #[builder(setter(into, strip_option), default)]
2753 pub expand: Option<bool>,
2754 #[builder(setter(into, strip_option), default)]
2756 pub experimental_privileged_nesting: Option<bool>,
2757 #[builder(setter(into, strip_option), default)]
2759 pub insecure_root_capabilities: Option<bool>,
2760 #[builder(setter(into, strip_option), default)]
2763 pub no_init: Option<bool>,
2764 #[builder(setter(into, strip_option), default)]
2766 pub use_entrypoint: Option<bool>,
2767}
2768#[derive(Builder, Debug, PartialEq)]
2769pub struct ContainerAsTarballOpts {
2770 #[builder(setter(into, strip_option), default)]
2773 pub forced_compression: Option<ImageLayerCompression>,
2774 #[builder(setter(into, strip_option), default)]
2777 pub media_types: Option<ImageMediaTypes>,
2778 #[builder(setter(into, strip_option), default)]
2781 pub platform_variants: Option<Vec<ContainerId>>,
2782}
2783#[derive(Builder, Debug, PartialEq)]
2784pub struct ContainerDirectoryOpts {
2785 #[builder(setter(into, strip_option), default)]
2787 pub expand: Option<bool>,
2788}
2789#[derive(Builder, Debug, PartialEq)]
2790pub struct ContainerExistsOpts {
2791 #[builder(setter(into, strip_option), default)]
2793 pub do_not_follow_symlinks: Option<bool>,
2794 #[builder(setter(into, strip_option), default)]
2796 pub expected_type: Option<ExistsType>,
2797}
2798#[derive(Builder, Debug, PartialEq)]
2799pub struct ContainerExportOpts {
2800 #[builder(setter(into, strip_option), default)]
2802 pub expand: Option<bool>,
2803 #[builder(setter(into, strip_option), default)]
2806 pub forced_compression: Option<ImageLayerCompression>,
2807 #[builder(setter(into, strip_option), default)]
2810 pub media_types: Option<ImageMediaTypes>,
2811 #[builder(setter(into, strip_option), default)]
2814 pub platform_variants: Option<Vec<ContainerId>>,
2815}
2816#[derive(Builder, Debug, PartialEq)]
2817pub struct ContainerExportImageOpts {
2818 #[builder(setter(into, strip_option), default)]
2821 pub forced_compression: Option<ImageLayerCompression>,
2822 #[builder(setter(into, strip_option), default)]
2825 pub media_types: Option<ImageMediaTypes>,
2826 #[builder(setter(into, strip_option), default)]
2829 pub platform_variants: Option<Vec<ContainerId>>,
2830}
2831#[derive(Builder, Debug, PartialEq)]
2832pub struct ContainerFileOpts {
2833 #[builder(setter(into, strip_option), default)]
2835 pub expand: Option<bool>,
2836}
2837#[derive(Builder, Debug, PartialEq)]
2838pub struct ContainerImportOpts<'a> {
2839 #[builder(setter(into, strip_option), default)]
2841 pub tag: Option<&'a str>,
2842}
2843#[derive(Builder, Debug, PartialEq)]
2844pub struct ContainerPublishOpts {
2845 #[builder(setter(into, strip_option), default)]
2848 pub forced_compression: Option<ImageLayerCompression>,
2849 #[builder(setter(into, strip_option), default)]
2852 pub media_types: Option<ImageMediaTypes>,
2853 #[builder(setter(into, strip_option), default)]
2856 pub platform_variants: Option<Vec<ContainerId>>,
2857}
2858#[derive(Builder, Debug, PartialEq)]
2859pub struct ContainerStatOpts {
2860 #[builder(setter(into, strip_option), default)]
2862 pub do_not_follow_symlinks: Option<bool>,
2863}
2864#[derive(Builder, Debug, PartialEq)]
2865pub struct ContainerTerminalOpts<'a> {
2866 #[builder(setter(into, strip_option), default)]
2868 pub cmd: Option<Vec<&'a str>>,
2869 #[builder(setter(into, strip_option), default)]
2871 pub experimental_privileged_nesting: Option<bool>,
2872 #[builder(setter(into, strip_option), default)]
2874 pub insecure_root_capabilities: Option<bool>,
2875}
2876#[derive(Builder, Debug, PartialEq)]
2877pub struct ContainerUpOpts<'a> {
2878 #[builder(setter(into, strip_option), default)]
2881 pub args: Option<Vec<&'a str>>,
2882 #[builder(setter(into, strip_option), default)]
2884 pub expand: Option<bool>,
2885 #[builder(setter(into, strip_option), default)]
2887 pub experimental_privileged_nesting: Option<bool>,
2888 #[builder(setter(into, strip_option), default)]
2890 pub insecure_root_capabilities: Option<bool>,
2891 #[builder(setter(into, strip_option), default)]
2894 pub no_init: Option<bool>,
2895 #[builder(setter(into, strip_option), default)]
2898 pub ports: Option<Vec<PortForward>>,
2899 #[builder(setter(into, strip_option), default)]
2901 pub random: Option<bool>,
2902 #[builder(setter(into, strip_option), default)]
2904 pub use_entrypoint: Option<bool>,
2905}
2906#[derive(Builder, Debug, PartialEq)]
2907pub struct ContainerWithDefaultTerminalCmdOpts {
2908 #[builder(setter(into, strip_option), default)]
2910 pub experimental_privileged_nesting: Option<bool>,
2911 #[builder(setter(into, strip_option), default)]
2913 pub insecure_root_capabilities: Option<bool>,
2914}
2915#[derive(Builder, Debug, PartialEq)]
2916pub struct ContainerWithDirectoryOpts<'a> {
2917 #[builder(setter(into, strip_option), default)]
2919 pub exclude: Option<Vec<&'a str>>,
2920 #[builder(setter(into, strip_option), default)]
2922 pub expand: Option<bool>,
2923 #[builder(setter(into, strip_option), default)]
2925 pub gitignore: Option<bool>,
2926 #[builder(setter(into, strip_option), default)]
2928 pub include: Option<Vec<&'a str>>,
2929 #[builder(setter(into, strip_option), default)]
2933 pub owner: Option<&'a str>,
2934}
2935#[derive(Builder, Debug, PartialEq)]
2936pub struct ContainerWithEntrypointOpts {
2937 #[builder(setter(into, strip_option), default)]
2939 pub keep_default_args: Option<bool>,
2940}
2941#[derive(Builder, Debug, PartialEq)]
2942pub struct ContainerWithEnvVariableOpts {
2943 #[builder(setter(into, strip_option), default)]
2945 pub expand: Option<bool>,
2946}
2947#[derive(Builder, Debug, PartialEq)]
2948pub struct ContainerWithExecOpts<'a> {
2949 #[builder(setter(into, strip_option), default)]
2951 pub expand: Option<bool>,
2952 #[builder(setter(into, strip_option), default)]
2954 pub expect: Option<ReturnType>,
2955 #[builder(setter(into, strip_option), default)]
2957 pub experimental_privileged_nesting: Option<bool>,
2958 #[builder(setter(into, strip_option), default)]
2961 pub insecure_root_capabilities: Option<bool>,
2962 #[builder(setter(into, strip_option), default)]
2965 pub no_init: Option<bool>,
2966 #[builder(setter(into, strip_option), default)]
2968 pub redirect_stderr: Option<&'a str>,
2969 #[builder(setter(into, strip_option), default)]
2971 pub redirect_stdin: Option<&'a str>,
2972 #[builder(setter(into, strip_option), default)]
2974 pub redirect_stdout: Option<&'a str>,
2975 #[builder(setter(into, strip_option), default)]
2977 pub stdin: Option<&'a str>,
2978 #[builder(setter(into, strip_option), default)]
2980 pub use_entrypoint: Option<bool>,
2981}
2982#[derive(Builder, Debug, PartialEq)]
2983pub struct ContainerWithExposedPortOpts<'a> {
2984 #[builder(setter(into, strip_option), default)]
2986 pub description: Option<&'a str>,
2987 #[builder(setter(into, strip_option), default)]
2989 pub experimental_skip_healthcheck: Option<bool>,
2990 #[builder(setter(into, strip_option), default)]
2992 pub protocol: Option<NetworkProtocol>,
2993}
2994#[derive(Builder, Debug, PartialEq)]
2995pub struct ContainerWithFileOpts<'a> {
2996 #[builder(setter(into, strip_option), default)]
2998 pub expand: Option<bool>,
2999 #[builder(setter(into, strip_option), default)]
3003 pub owner: Option<&'a str>,
3004 #[builder(setter(into, strip_option), default)]
3006 pub permissions: Option<isize>,
3007}
3008#[derive(Builder, Debug, PartialEq)]
3009pub struct ContainerWithFilesOpts<'a> {
3010 #[builder(setter(into, strip_option), default)]
3012 pub expand: Option<bool>,
3013 #[builder(setter(into, strip_option), default)]
3017 pub owner: Option<&'a str>,
3018 #[builder(setter(into, strip_option), default)]
3020 pub permissions: Option<isize>,
3021}
3022#[derive(Builder, Debug, PartialEq)]
3023pub struct ContainerWithMountedCacheOpts<'a> {
3024 #[builder(setter(into, strip_option), default)]
3026 pub expand: Option<bool>,
3027 #[builder(setter(into, strip_option), default)]
3032 pub owner: Option<&'a str>,
3033 #[builder(setter(into, strip_option), default)]
3035 pub sharing: Option<CacheSharingMode>,
3036 #[builder(setter(into, strip_option), default)]
3038 pub source: Option<DirectoryId>,
3039}
3040#[derive(Builder, Debug, PartialEq)]
3041pub struct ContainerWithMountedDirectoryOpts<'a> {
3042 #[builder(setter(into, strip_option), default)]
3044 pub expand: Option<bool>,
3045 #[builder(setter(into, strip_option), default)]
3049 pub owner: Option<&'a str>,
3050}
3051#[derive(Builder, Debug, PartialEq)]
3052pub struct ContainerWithMountedFileOpts<'a> {
3053 #[builder(setter(into, strip_option), default)]
3055 pub expand: Option<bool>,
3056 #[builder(setter(into, strip_option), default)]
3060 pub owner: Option<&'a str>,
3061}
3062#[derive(Builder, Debug, PartialEq)]
3063pub struct ContainerWithMountedSecretOpts<'a> {
3064 #[builder(setter(into, strip_option), default)]
3066 pub expand: Option<bool>,
3067 #[builder(setter(into, strip_option), default)]
3070 pub mode: Option<isize>,
3071 #[builder(setter(into, strip_option), default)]
3075 pub owner: Option<&'a str>,
3076}
3077#[derive(Builder, Debug, PartialEq)]
3078pub struct ContainerWithMountedTempOpts {
3079 #[builder(setter(into, strip_option), default)]
3081 pub expand: Option<bool>,
3082 #[builder(setter(into, strip_option), default)]
3084 pub size: Option<isize>,
3085}
3086#[derive(Builder, Debug, PartialEq)]
3087pub struct ContainerWithNewFileOpts<'a> {
3088 #[builder(setter(into, strip_option), default)]
3090 pub expand: Option<bool>,
3091 #[builder(setter(into, strip_option), default)]
3095 pub owner: Option<&'a str>,
3096 #[builder(setter(into, strip_option), default)]
3098 pub permissions: Option<isize>,
3099}
3100#[derive(Builder, Debug, PartialEq)]
3101pub struct ContainerWithSymlinkOpts {
3102 #[builder(setter(into, strip_option), default)]
3104 pub expand: Option<bool>,
3105}
3106#[derive(Builder, Debug, PartialEq)]
3107pub struct ContainerWithUnixSocketOpts<'a> {
3108 #[builder(setter(into, strip_option), default)]
3110 pub expand: Option<bool>,
3111 #[builder(setter(into, strip_option), default)]
3115 pub owner: Option<&'a str>,
3116}
3117#[derive(Builder, Debug, PartialEq)]
3118pub struct ContainerWithWorkdirOpts {
3119 #[builder(setter(into, strip_option), default)]
3121 pub expand: Option<bool>,
3122}
3123#[derive(Builder, Debug, PartialEq)]
3124pub struct ContainerWithoutDirectoryOpts {
3125 #[builder(setter(into, strip_option), default)]
3127 pub expand: Option<bool>,
3128}
3129#[derive(Builder, Debug, PartialEq)]
3130pub struct ContainerWithoutEntrypointOpts {
3131 #[builder(setter(into, strip_option), default)]
3133 pub keep_default_args: Option<bool>,
3134}
3135#[derive(Builder, Debug, PartialEq)]
3136pub struct ContainerWithoutExposedPortOpts {
3137 #[builder(setter(into, strip_option), default)]
3139 pub protocol: Option<NetworkProtocol>,
3140}
3141#[derive(Builder, Debug, PartialEq)]
3142pub struct ContainerWithoutFileOpts {
3143 #[builder(setter(into, strip_option), default)]
3145 pub expand: Option<bool>,
3146}
3147#[derive(Builder, Debug, PartialEq)]
3148pub struct ContainerWithoutFilesOpts {
3149 #[builder(setter(into, strip_option), default)]
3151 pub expand: Option<bool>,
3152}
3153#[derive(Builder, Debug, PartialEq)]
3154pub struct ContainerWithoutMountOpts {
3155 #[builder(setter(into, strip_option), default)]
3157 pub expand: Option<bool>,
3158}
3159#[derive(Builder, Debug, PartialEq)]
3160pub struct ContainerWithoutUnixSocketOpts {
3161 #[builder(setter(into, strip_option), default)]
3163 pub expand: Option<bool>,
3164}
3165impl Container {
3166 pub fn as_service(&self) -> Service {
3173 let query = self.selection.select("asService");
3174 Service {
3175 proc: self.proc.clone(),
3176 selection: query,
3177 graphql_client: self.graphql_client.clone(),
3178 }
3179 }
3180 pub fn as_service_opts<'a>(&self, opts: ContainerAsServiceOpts<'a>) -> Service {
3187 let mut query = self.selection.select("asService");
3188 if let Some(args) = opts.args {
3189 query = query.arg("args", args);
3190 }
3191 if let Some(use_entrypoint) = opts.use_entrypoint {
3192 query = query.arg("useEntrypoint", use_entrypoint);
3193 }
3194 if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3195 query = query.arg(
3196 "experimentalPrivilegedNesting",
3197 experimental_privileged_nesting,
3198 );
3199 }
3200 if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3201 query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3202 }
3203 if let Some(expand) = opts.expand {
3204 query = query.arg("expand", expand);
3205 }
3206 if let Some(no_init) = opts.no_init {
3207 query = query.arg("noInit", no_init);
3208 }
3209 Service {
3210 proc: self.proc.clone(),
3211 selection: query,
3212 graphql_client: self.graphql_client.clone(),
3213 }
3214 }
3215 pub fn as_tarball(&self) -> File {
3221 let query = self.selection.select("asTarball");
3222 File {
3223 proc: self.proc.clone(),
3224 selection: query,
3225 graphql_client: self.graphql_client.clone(),
3226 }
3227 }
3228 pub fn as_tarball_opts(&self, opts: ContainerAsTarballOpts) -> File {
3234 let mut query = self.selection.select("asTarball");
3235 if let Some(platform_variants) = opts.platform_variants {
3236 query = query.arg("platformVariants", platform_variants);
3237 }
3238 if let Some(forced_compression) = opts.forced_compression {
3239 query = query.arg("forcedCompression", forced_compression);
3240 }
3241 if let Some(media_types) = opts.media_types {
3242 query = query.arg("mediaTypes", media_types);
3243 }
3244 File {
3245 proc: self.proc.clone(),
3246 selection: query,
3247 graphql_client: self.graphql_client.clone(),
3248 }
3249 }
3250 pub async fn combined_output(&self) -> Result<String, DaggerError> {
3253 let query = self.selection.select("combinedOutput");
3254 query.execute(self.graphql_client.clone()).await
3255 }
3256 pub async fn default_args(&self) -> Result<Vec<String>, DaggerError> {
3258 let query = self.selection.select("defaultArgs");
3259 query.execute(self.graphql_client.clone()).await
3260 }
3261 pub fn directory(&self, path: impl Into<String>) -> Directory {
3269 let mut query = self.selection.select("directory");
3270 query = query.arg("path", path.into());
3271 Directory {
3272 proc: self.proc.clone(),
3273 selection: query,
3274 graphql_client: self.graphql_client.clone(),
3275 }
3276 }
3277 pub fn directory_opts(
3285 &self,
3286 path: impl Into<String>,
3287 opts: ContainerDirectoryOpts,
3288 ) -> Directory {
3289 let mut query = self.selection.select("directory");
3290 query = query.arg("path", path.into());
3291 if let Some(expand) = opts.expand {
3292 query = query.arg("expand", expand);
3293 }
3294 Directory {
3295 proc: self.proc.clone(),
3296 selection: query,
3297 graphql_client: self.graphql_client.clone(),
3298 }
3299 }
3300 pub async fn entrypoint(&self) -> Result<Vec<String>, DaggerError> {
3302 let query = self.selection.select("entrypoint");
3303 query.execute(self.graphql_client.clone()).await
3304 }
3305 pub async fn env_variable(&self, name: impl Into<String>) -> Result<String, DaggerError> {
3311 let mut query = self.selection.select("envVariable");
3312 query = query.arg("name", name.into());
3313 query.execute(self.graphql_client.clone()).await
3314 }
3315 pub fn env_variables(&self) -> Vec<EnvVariable> {
3317 let query = self.selection.select("envVariables");
3318 vec![EnvVariable {
3319 proc: self.proc.clone(),
3320 selection: query,
3321 graphql_client: self.graphql_client.clone(),
3322 }]
3323 }
3324 pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
3331 let mut query = self.selection.select("exists");
3332 query = query.arg("path", path.into());
3333 query.execute(self.graphql_client.clone()).await
3334 }
3335 pub async fn exists_opts(
3342 &self,
3343 path: impl Into<String>,
3344 opts: ContainerExistsOpts,
3345 ) -> Result<bool, DaggerError> {
3346 let mut query = self.selection.select("exists");
3347 query = query.arg("path", path.into());
3348 if let Some(expected_type) = opts.expected_type {
3349 query = query.arg("expectedType", expected_type);
3350 }
3351 if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
3352 query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
3353 }
3354 query.execute(self.graphql_client.clone()).await
3355 }
3356 pub async fn exit_code(&self) -> Result<isize, DaggerError> {
3359 let query = self.selection.select("exitCode");
3360 query.execute(self.graphql_client.clone()).await
3361 }
3362 pub fn experimental_with_all_gp_us(&self) -> Container {
3366 let query = self.selection.select("experimentalWithAllGPUs");
3367 Container {
3368 proc: self.proc.clone(),
3369 selection: query,
3370 graphql_client: self.graphql_client.clone(),
3371 }
3372 }
3373 pub fn experimental_with_gpu(&self, devices: Vec<impl Into<String>>) -> Container {
3381 let mut query = self.selection.select("experimentalWithGPU");
3382 query = query.arg(
3383 "devices",
3384 devices
3385 .into_iter()
3386 .map(|i| i.into())
3387 .collect::<Vec<String>>(),
3388 );
3389 Container {
3390 proc: self.proc.clone(),
3391 selection: query,
3392 graphql_client: self.graphql_client.clone(),
3393 }
3394 }
3395 pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
3405 let mut query = self.selection.select("export");
3406 query = query.arg("path", path.into());
3407 query.execute(self.graphql_client.clone()).await
3408 }
3409 pub async fn export_opts(
3419 &self,
3420 path: impl Into<String>,
3421 opts: ContainerExportOpts,
3422 ) -> Result<String, DaggerError> {
3423 let mut query = self.selection.select("export");
3424 query = query.arg("path", path.into());
3425 if let Some(platform_variants) = opts.platform_variants {
3426 query = query.arg("platformVariants", platform_variants);
3427 }
3428 if let Some(forced_compression) = opts.forced_compression {
3429 query = query.arg("forcedCompression", forced_compression);
3430 }
3431 if let Some(media_types) = opts.media_types {
3432 query = query.arg("mediaTypes", media_types);
3433 }
3434 if let Some(expand) = opts.expand {
3435 query = query.arg("expand", expand);
3436 }
3437 query.execute(self.graphql_client.clone()).await
3438 }
3439 pub async fn export_image(&self, name: impl Into<String>) -> Result<Void, DaggerError> {
3446 let mut query = self.selection.select("exportImage");
3447 query = query.arg("name", name.into());
3448 query.execute(self.graphql_client.clone()).await
3449 }
3450 pub async fn export_image_opts(
3457 &self,
3458 name: impl Into<String>,
3459 opts: ContainerExportImageOpts,
3460 ) -> Result<Void, DaggerError> {
3461 let mut query = self.selection.select("exportImage");
3462 query = query.arg("name", name.into());
3463 if let Some(platform_variants) = opts.platform_variants {
3464 query = query.arg("platformVariants", platform_variants);
3465 }
3466 if let Some(forced_compression) = opts.forced_compression {
3467 query = query.arg("forcedCompression", forced_compression);
3468 }
3469 if let Some(media_types) = opts.media_types {
3470 query = query.arg("mediaTypes", media_types);
3471 }
3472 query.execute(self.graphql_client.clone()).await
3473 }
3474 pub fn exposed_ports(&self) -> Vec<Port> {
3477 let query = self.selection.select("exposedPorts");
3478 vec![Port {
3479 proc: self.proc.clone(),
3480 selection: query,
3481 graphql_client: self.graphql_client.clone(),
3482 }]
3483 }
3484 pub fn file(&self, path: impl Into<String>) -> File {
3492 let mut query = self.selection.select("file");
3493 query = query.arg("path", path.into());
3494 File {
3495 proc: self.proc.clone(),
3496 selection: query,
3497 graphql_client: self.graphql_client.clone(),
3498 }
3499 }
3500 pub fn file_opts(&self, path: impl Into<String>, opts: ContainerFileOpts) -> File {
3508 let mut query = self.selection.select("file");
3509 query = query.arg("path", path.into());
3510 if let Some(expand) = opts.expand {
3511 query = query.arg("expand", expand);
3512 }
3513 File {
3514 proc: self.proc.clone(),
3515 selection: query,
3516 graphql_client: self.graphql_client.clone(),
3517 }
3518 }
3519 pub fn from(&self, address: impl Into<String>) -> Container {
3525 let mut query = self.selection.select("from");
3526 query = query.arg("address", address.into());
3527 Container {
3528 proc: self.proc.clone(),
3529 selection: query,
3530 graphql_client: self.graphql_client.clone(),
3531 }
3532 }
3533 pub async fn id(&self) -> Result<ContainerId, DaggerError> {
3535 let query = self.selection.select("id");
3536 query.execute(self.graphql_client.clone()).await
3537 }
3538 pub async fn image_ref(&self) -> Result<String, DaggerError> {
3540 let query = self.selection.select("imageRef");
3541 query.execute(self.graphql_client.clone()).await
3542 }
3543 pub fn import(&self, source: impl IntoID<FileId>) -> Container {
3550 let mut query = self.selection.select("import");
3551 query = query.arg_lazy(
3552 "source",
3553 Box::new(move || {
3554 let source = source.clone();
3555 Box::pin(async move { source.into_id().await.unwrap().quote() })
3556 }),
3557 );
3558 Container {
3559 proc: self.proc.clone(),
3560 selection: query,
3561 graphql_client: self.graphql_client.clone(),
3562 }
3563 }
3564 pub fn import_opts<'a>(
3571 &self,
3572 source: impl IntoID<FileId>,
3573 opts: ContainerImportOpts<'a>,
3574 ) -> Container {
3575 let mut query = self.selection.select("import");
3576 query = query.arg_lazy(
3577 "source",
3578 Box::new(move || {
3579 let source = source.clone();
3580 Box::pin(async move { source.into_id().await.unwrap().quote() })
3581 }),
3582 );
3583 if let Some(tag) = opts.tag {
3584 query = query.arg("tag", tag);
3585 }
3586 Container {
3587 proc: self.proc.clone(),
3588 selection: query,
3589 graphql_client: self.graphql_client.clone(),
3590 }
3591 }
3592 pub async fn label(&self, name: impl Into<String>) -> Result<String, DaggerError> {
3598 let mut query = self.selection.select("label");
3599 query = query.arg("name", name.into());
3600 query.execute(self.graphql_client.clone()).await
3601 }
3602 pub fn labels(&self) -> Vec<Label> {
3604 let query = self.selection.select("labels");
3605 vec![Label {
3606 proc: self.proc.clone(),
3607 selection: query,
3608 graphql_client: self.graphql_client.clone(),
3609 }]
3610 }
3611 pub async fn mounts(&self) -> Result<Vec<String>, DaggerError> {
3613 let query = self.selection.select("mounts");
3614 query.execute(self.graphql_client.clone()).await
3615 }
3616 pub async fn platform(&self) -> Result<Platform, DaggerError> {
3618 let query = self.selection.select("platform");
3619 query.execute(self.graphql_client.clone()).await
3620 }
3621 pub async fn publish(&self, address: impl Into<String>) -> Result<String, DaggerError> {
3631 let mut query = self.selection.select("publish");
3632 query = query.arg("address", address.into());
3633 query.execute(self.graphql_client.clone()).await
3634 }
3635 pub async fn publish_opts(
3645 &self,
3646 address: impl Into<String>,
3647 opts: ContainerPublishOpts,
3648 ) -> Result<String, DaggerError> {
3649 let mut query = self.selection.select("publish");
3650 query = query.arg("address", address.into());
3651 if let Some(platform_variants) = opts.platform_variants {
3652 query = query.arg("platformVariants", platform_variants);
3653 }
3654 if let Some(forced_compression) = opts.forced_compression {
3655 query = query.arg("forcedCompression", forced_compression);
3656 }
3657 if let Some(media_types) = opts.media_types {
3658 query = query.arg("mediaTypes", media_types);
3659 }
3660 query.execute(self.graphql_client.clone()).await
3661 }
3662 pub fn rootfs(&self) -> Directory {
3664 let query = self.selection.select("rootfs");
3665 Directory {
3666 proc: self.proc.clone(),
3667 selection: query,
3668 graphql_client: self.graphql_client.clone(),
3669 }
3670 }
3671 pub fn stat(&self, path: impl Into<String>) -> Stat {
3678 let mut query = self.selection.select("stat");
3679 query = query.arg("path", path.into());
3680 Stat {
3681 proc: self.proc.clone(),
3682 selection: query,
3683 graphql_client: self.graphql_client.clone(),
3684 }
3685 }
3686 pub fn stat_opts(&self, path: impl Into<String>, opts: ContainerStatOpts) -> Stat {
3693 let mut query = self.selection.select("stat");
3694 query = query.arg("path", path.into());
3695 if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
3696 query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
3697 }
3698 Stat {
3699 proc: self.proc.clone(),
3700 selection: query,
3701 graphql_client: self.graphql_client.clone(),
3702 }
3703 }
3704 pub async fn stderr(&self) -> Result<String, DaggerError> {
3707 let query = self.selection.select("stderr");
3708 query.execute(self.graphql_client.clone()).await
3709 }
3710 pub async fn stdout(&self) -> Result<String, DaggerError> {
3713 let query = self.selection.select("stdout");
3714 query.execute(self.graphql_client.clone()).await
3715 }
3716 pub async fn sync(&self) -> Result<ContainerId, DaggerError> {
3719 let query = self.selection.select("sync");
3720 query.execute(self.graphql_client.clone()).await
3721 }
3722 pub fn terminal(&self) -> Container {
3728 let query = self.selection.select("terminal");
3729 Container {
3730 proc: self.proc.clone(),
3731 selection: query,
3732 graphql_client: self.graphql_client.clone(),
3733 }
3734 }
3735 pub fn terminal_opts<'a>(&self, opts: ContainerTerminalOpts<'a>) -> Container {
3741 let mut query = self.selection.select("terminal");
3742 if let Some(cmd) = opts.cmd {
3743 query = query.arg("cmd", cmd);
3744 }
3745 if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3746 query = query.arg(
3747 "experimentalPrivilegedNesting",
3748 experimental_privileged_nesting,
3749 );
3750 }
3751 if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3752 query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3753 }
3754 Container {
3755 proc: self.proc.clone(),
3756 selection: query,
3757 graphql_client: self.graphql_client.clone(),
3758 }
3759 }
3760 pub async fn up(&self) -> Result<Void, DaggerError> {
3767 let query = self.selection.select("up");
3768 query.execute(self.graphql_client.clone()).await
3769 }
3770 pub async fn up_opts<'a>(&self, opts: ContainerUpOpts<'a>) -> Result<Void, DaggerError> {
3777 let mut query = self.selection.select("up");
3778 if let Some(random) = opts.random {
3779 query = query.arg("random", random);
3780 }
3781 if let Some(ports) = opts.ports {
3782 query = query.arg("ports", ports);
3783 }
3784 if let Some(args) = opts.args {
3785 query = query.arg("args", args);
3786 }
3787 if let Some(use_entrypoint) = opts.use_entrypoint {
3788 query = query.arg("useEntrypoint", use_entrypoint);
3789 }
3790 if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3791 query = query.arg(
3792 "experimentalPrivilegedNesting",
3793 experimental_privileged_nesting,
3794 );
3795 }
3796 if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3797 query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3798 }
3799 if let Some(expand) = opts.expand {
3800 query = query.arg("expand", expand);
3801 }
3802 if let Some(no_init) = opts.no_init {
3803 query = query.arg("noInit", no_init);
3804 }
3805 query.execute(self.graphql_client.clone()).await
3806 }
3807 pub async fn user(&self) -> Result<String, DaggerError> {
3809 let query = self.selection.select("user");
3810 query.execute(self.graphql_client.clone()).await
3811 }
3812 pub fn with_annotation(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
3819 let mut query = self.selection.select("withAnnotation");
3820 query = query.arg("name", name.into());
3821 query = query.arg("value", value.into());
3822 Container {
3823 proc: self.proc.clone(),
3824 selection: query,
3825 graphql_client: self.graphql_client.clone(),
3826 }
3827 }
3828 pub fn with_default_args(&self, args: Vec<impl Into<String>>) -> Container {
3834 let mut query = self.selection.select("withDefaultArgs");
3835 query = query.arg(
3836 "args",
3837 args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3838 );
3839 Container {
3840 proc: self.proc.clone(),
3841 selection: query,
3842 graphql_client: self.graphql_client.clone(),
3843 }
3844 }
3845 pub fn with_default_terminal_cmd(&self, args: Vec<impl Into<String>>) -> Container {
3852 let mut query = self.selection.select("withDefaultTerminalCmd");
3853 query = query.arg(
3854 "args",
3855 args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3856 );
3857 Container {
3858 proc: self.proc.clone(),
3859 selection: query,
3860 graphql_client: self.graphql_client.clone(),
3861 }
3862 }
3863 pub fn with_default_terminal_cmd_opts(
3870 &self,
3871 args: Vec<impl Into<String>>,
3872 opts: ContainerWithDefaultTerminalCmdOpts,
3873 ) -> Container {
3874 let mut query = self.selection.select("withDefaultTerminalCmd");
3875 query = query.arg(
3876 "args",
3877 args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3878 );
3879 if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
3880 query = query.arg(
3881 "experimentalPrivilegedNesting",
3882 experimental_privileged_nesting,
3883 );
3884 }
3885 if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
3886 query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
3887 }
3888 Container {
3889 proc: self.proc.clone(),
3890 selection: query,
3891 graphql_client: self.graphql_client.clone(),
3892 }
3893 }
3894 pub fn with_directory(
3902 &self,
3903 path: impl Into<String>,
3904 source: impl IntoID<DirectoryId>,
3905 ) -> Container {
3906 let mut query = self.selection.select("withDirectory");
3907 query = query.arg("path", path.into());
3908 query = query.arg_lazy(
3909 "source",
3910 Box::new(move || {
3911 let source = source.clone();
3912 Box::pin(async move { source.into_id().await.unwrap().quote() })
3913 }),
3914 );
3915 Container {
3916 proc: self.proc.clone(),
3917 selection: query,
3918 graphql_client: self.graphql_client.clone(),
3919 }
3920 }
3921 pub fn with_directory_opts<'a>(
3929 &self,
3930 path: impl Into<String>,
3931 source: impl IntoID<DirectoryId>,
3932 opts: ContainerWithDirectoryOpts<'a>,
3933 ) -> Container {
3934 let mut query = self.selection.select("withDirectory");
3935 query = query.arg("path", path.into());
3936 query = query.arg_lazy(
3937 "source",
3938 Box::new(move || {
3939 let source = source.clone();
3940 Box::pin(async move { source.into_id().await.unwrap().quote() })
3941 }),
3942 );
3943 if let Some(exclude) = opts.exclude {
3944 query = query.arg("exclude", exclude);
3945 }
3946 if let Some(include) = opts.include {
3947 query = query.arg("include", include);
3948 }
3949 if let Some(gitignore) = opts.gitignore {
3950 query = query.arg("gitignore", gitignore);
3951 }
3952 if let Some(owner) = opts.owner {
3953 query = query.arg("owner", owner);
3954 }
3955 if let Some(expand) = opts.expand {
3956 query = query.arg("expand", expand);
3957 }
3958 Container {
3959 proc: self.proc.clone(),
3960 selection: query,
3961 graphql_client: self.graphql_client.clone(),
3962 }
3963 }
3964 pub fn with_entrypoint(&self, args: Vec<impl Into<String>>) -> Container {
3971 let mut query = self.selection.select("withEntrypoint");
3972 query = query.arg(
3973 "args",
3974 args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3975 );
3976 Container {
3977 proc: self.proc.clone(),
3978 selection: query,
3979 graphql_client: self.graphql_client.clone(),
3980 }
3981 }
3982 pub fn with_entrypoint_opts(
3989 &self,
3990 args: Vec<impl Into<String>>,
3991 opts: ContainerWithEntrypointOpts,
3992 ) -> Container {
3993 let mut query = self.selection.select("withEntrypoint");
3994 query = query.arg(
3995 "args",
3996 args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
3997 );
3998 if let Some(keep_default_args) = opts.keep_default_args {
3999 query = query.arg("keepDefaultArgs", keep_default_args);
4000 }
4001 Container {
4002 proc: self.proc.clone(),
4003 selection: query,
4004 graphql_client: self.graphql_client.clone(),
4005 }
4006 }
4007 pub fn with_env_file_variables(&self, source: impl IntoID<EnvFileId>) -> Container {
4013 let mut query = self.selection.select("withEnvFileVariables");
4014 query = query.arg_lazy(
4015 "source",
4016 Box::new(move || {
4017 let source = source.clone();
4018 Box::pin(async move { source.into_id().await.unwrap().quote() })
4019 }),
4020 );
4021 Container {
4022 proc: self.proc.clone(),
4023 selection: query,
4024 graphql_client: self.graphql_client.clone(),
4025 }
4026 }
4027 pub fn with_env_variable(
4035 &self,
4036 name: impl Into<String>,
4037 value: impl Into<String>,
4038 ) -> Container {
4039 let mut query = self.selection.select("withEnvVariable");
4040 query = query.arg("name", name.into());
4041 query = query.arg("value", value.into());
4042 Container {
4043 proc: self.proc.clone(),
4044 selection: query,
4045 graphql_client: self.graphql_client.clone(),
4046 }
4047 }
4048 pub fn with_env_variable_opts(
4056 &self,
4057 name: impl Into<String>,
4058 value: impl Into<String>,
4059 opts: ContainerWithEnvVariableOpts,
4060 ) -> Container {
4061 let mut query = self.selection.select("withEnvVariable");
4062 query = query.arg("name", name.into());
4063 query = query.arg("value", value.into());
4064 if let Some(expand) = opts.expand {
4065 query = query.arg("expand", expand);
4066 }
4067 Container {
4068 proc: self.proc.clone(),
4069 selection: query,
4070 graphql_client: self.graphql_client.clone(),
4071 }
4072 }
4073 pub fn with_error(&self, err: impl Into<String>) -> Container {
4079 let mut query = self.selection.select("withError");
4080 query = query.arg("err", err.into());
4081 Container {
4082 proc: self.proc.clone(),
4083 selection: query,
4084 graphql_client: self.graphql_client.clone(),
4085 }
4086 }
4087 pub fn with_exec(&self, args: Vec<impl Into<String>>) -> Container {
4098 let mut query = self.selection.select("withExec");
4099 query = query.arg(
4100 "args",
4101 args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4102 );
4103 Container {
4104 proc: self.proc.clone(),
4105 selection: query,
4106 graphql_client: self.graphql_client.clone(),
4107 }
4108 }
4109 pub fn with_exec_opts<'a>(
4120 &self,
4121 args: Vec<impl Into<String>>,
4122 opts: ContainerWithExecOpts<'a>,
4123 ) -> Container {
4124 let mut query = self.selection.select("withExec");
4125 query = query.arg(
4126 "args",
4127 args.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
4128 );
4129 if let Some(use_entrypoint) = opts.use_entrypoint {
4130 query = query.arg("useEntrypoint", use_entrypoint);
4131 }
4132 if let Some(stdin) = opts.stdin {
4133 query = query.arg("stdin", stdin);
4134 }
4135 if let Some(redirect_stdin) = opts.redirect_stdin {
4136 query = query.arg("redirectStdin", redirect_stdin);
4137 }
4138 if let Some(redirect_stdout) = opts.redirect_stdout {
4139 query = query.arg("redirectStdout", redirect_stdout);
4140 }
4141 if let Some(redirect_stderr) = opts.redirect_stderr {
4142 query = query.arg("redirectStderr", redirect_stderr);
4143 }
4144 if let Some(expect) = opts.expect {
4145 query = query.arg("expect", expect);
4146 }
4147 if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
4148 query = query.arg(
4149 "experimentalPrivilegedNesting",
4150 experimental_privileged_nesting,
4151 );
4152 }
4153 if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
4154 query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
4155 }
4156 if let Some(expand) = opts.expand {
4157 query = query.arg("expand", expand);
4158 }
4159 if let Some(no_init) = opts.no_init {
4160 query = query.arg("noInit", no_init);
4161 }
4162 Container {
4163 proc: self.proc.clone(),
4164 selection: query,
4165 graphql_client: self.graphql_client.clone(),
4166 }
4167 }
4168 pub fn with_exposed_port(&self, port: isize) -> Container {
4178 let mut query = self.selection.select("withExposedPort");
4179 query = query.arg("port", port);
4180 Container {
4181 proc: self.proc.clone(),
4182 selection: query,
4183 graphql_client: self.graphql_client.clone(),
4184 }
4185 }
4186 pub fn with_exposed_port_opts<'a>(
4196 &self,
4197 port: isize,
4198 opts: ContainerWithExposedPortOpts<'a>,
4199 ) -> Container {
4200 let mut query = self.selection.select("withExposedPort");
4201 query = query.arg("port", port);
4202 if let Some(protocol) = opts.protocol {
4203 query = query.arg("protocol", protocol);
4204 }
4205 if let Some(description) = opts.description {
4206 query = query.arg("description", description);
4207 }
4208 if let Some(experimental_skip_healthcheck) = opts.experimental_skip_healthcheck {
4209 query = query.arg("experimentalSkipHealthcheck", experimental_skip_healthcheck);
4210 }
4211 Container {
4212 proc: self.proc.clone(),
4213 selection: query,
4214 graphql_client: self.graphql_client.clone(),
4215 }
4216 }
4217 pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Container {
4225 let mut query = self.selection.select("withFile");
4226 query = query.arg("path", path.into());
4227 query = query.arg_lazy(
4228 "source",
4229 Box::new(move || {
4230 let source = source.clone();
4231 Box::pin(async move { source.into_id().await.unwrap().quote() })
4232 }),
4233 );
4234 Container {
4235 proc: self.proc.clone(),
4236 selection: query,
4237 graphql_client: self.graphql_client.clone(),
4238 }
4239 }
4240 pub fn with_file_opts<'a>(
4248 &self,
4249 path: impl Into<String>,
4250 source: impl IntoID<FileId>,
4251 opts: ContainerWithFileOpts<'a>,
4252 ) -> Container {
4253 let mut query = self.selection.select("withFile");
4254 query = query.arg("path", path.into());
4255 query = query.arg_lazy(
4256 "source",
4257 Box::new(move || {
4258 let source = source.clone();
4259 Box::pin(async move { source.into_id().await.unwrap().quote() })
4260 }),
4261 );
4262 if let Some(permissions) = opts.permissions {
4263 query = query.arg("permissions", permissions);
4264 }
4265 if let Some(owner) = opts.owner {
4266 query = query.arg("owner", owner);
4267 }
4268 if let Some(expand) = opts.expand {
4269 query = query.arg("expand", expand);
4270 }
4271 Container {
4272 proc: self.proc.clone(),
4273 selection: query,
4274 graphql_client: self.graphql_client.clone(),
4275 }
4276 }
4277 pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Container {
4285 let mut query = self.selection.select("withFiles");
4286 query = query.arg("path", path.into());
4287 query = query.arg("sources", sources);
4288 Container {
4289 proc: self.proc.clone(),
4290 selection: query,
4291 graphql_client: self.graphql_client.clone(),
4292 }
4293 }
4294 pub fn with_files_opts<'a>(
4302 &self,
4303 path: impl Into<String>,
4304 sources: Vec<FileId>,
4305 opts: ContainerWithFilesOpts<'a>,
4306 ) -> Container {
4307 let mut query = self.selection.select("withFiles");
4308 query = query.arg("path", path.into());
4309 query = query.arg("sources", sources);
4310 if let Some(permissions) = opts.permissions {
4311 query = query.arg("permissions", permissions);
4312 }
4313 if let Some(owner) = opts.owner {
4314 query = query.arg("owner", owner);
4315 }
4316 if let Some(expand) = opts.expand {
4317 query = query.arg("expand", expand);
4318 }
4319 Container {
4320 proc: self.proc.clone(),
4321 selection: query,
4322 graphql_client: self.graphql_client.clone(),
4323 }
4324 }
4325 pub fn with_label(&self, name: impl Into<String>, value: impl Into<String>) -> Container {
4332 let mut query = self.selection.select("withLabel");
4333 query = query.arg("name", name.into());
4334 query = query.arg("value", value.into());
4335 Container {
4336 proc: self.proc.clone(),
4337 selection: query,
4338 graphql_client: self.graphql_client.clone(),
4339 }
4340 }
4341 pub fn with_mounted_cache(
4349 &self,
4350 path: impl Into<String>,
4351 cache: impl IntoID<CacheVolumeId>,
4352 ) -> Container {
4353 let mut query = self.selection.select("withMountedCache");
4354 query = query.arg("path", path.into());
4355 query = query.arg_lazy(
4356 "cache",
4357 Box::new(move || {
4358 let cache = cache.clone();
4359 Box::pin(async move { cache.into_id().await.unwrap().quote() })
4360 }),
4361 );
4362 Container {
4363 proc: self.proc.clone(),
4364 selection: query,
4365 graphql_client: self.graphql_client.clone(),
4366 }
4367 }
4368 pub fn with_mounted_cache_opts<'a>(
4376 &self,
4377 path: impl Into<String>,
4378 cache: impl IntoID<CacheVolumeId>,
4379 opts: ContainerWithMountedCacheOpts<'a>,
4380 ) -> Container {
4381 let mut query = self.selection.select("withMountedCache");
4382 query = query.arg("path", path.into());
4383 query = query.arg_lazy(
4384 "cache",
4385 Box::new(move || {
4386 let cache = cache.clone();
4387 Box::pin(async move { cache.into_id().await.unwrap().quote() })
4388 }),
4389 );
4390 if let Some(source) = opts.source {
4391 query = query.arg("source", source);
4392 }
4393 if let Some(sharing) = opts.sharing {
4394 query = query.arg("sharing", sharing);
4395 }
4396 if let Some(owner) = opts.owner {
4397 query = query.arg("owner", owner);
4398 }
4399 if let Some(expand) = opts.expand {
4400 query = query.arg("expand", expand);
4401 }
4402 Container {
4403 proc: self.proc.clone(),
4404 selection: query,
4405 graphql_client: self.graphql_client.clone(),
4406 }
4407 }
4408 pub fn with_mounted_directory(
4416 &self,
4417 path: impl Into<String>,
4418 source: impl IntoID<DirectoryId>,
4419 ) -> Container {
4420 let mut query = self.selection.select("withMountedDirectory");
4421 query = query.arg("path", path.into());
4422 query = query.arg_lazy(
4423 "source",
4424 Box::new(move || {
4425 let source = source.clone();
4426 Box::pin(async move { source.into_id().await.unwrap().quote() })
4427 }),
4428 );
4429 Container {
4430 proc: self.proc.clone(),
4431 selection: query,
4432 graphql_client: self.graphql_client.clone(),
4433 }
4434 }
4435 pub fn with_mounted_directory_opts<'a>(
4443 &self,
4444 path: impl Into<String>,
4445 source: impl IntoID<DirectoryId>,
4446 opts: ContainerWithMountedDirectoryOpts<'a>,
4447 ) -> Container {
4448 let mut query = self.selection.select("withMountedDirectory");
4449 query = query.arg("path", path.into());
4450 query = query.arg_lazy(
4451 "source",
4452 Box::new(move || {
4453 let source = source.clone();
4454 Box::pin(async move { source.into_id().await.unwrap().quote() })
4455 }),
4456 );
4457 if let Some(owner) = opts.owner {
4458 query = query.arg("owner", owner);
4459 }
4460 if let Some(expand) = opts.expand {
4461 query = query.arg("expand", expand);
4462 }
4463 Container {
4464 proc: self.proc.clone(),
4465 selection: query,
4466 graphql_client: self.graphql_client.clone(),
4467 }
4468 }
4469 pub fn with_mounted_file(
4477 &self,
4478 path: impl Into<String>,
4479 source: impl IntoID<FileId>,
4480 ) -> Container {
4481 let mut query = self.selection.select("withMountedFile");
4482 query = query.arg("path", path.into());
4483 query = query.arg_lazy(
4484 "source",
4485 Box::new(move || {
4486 let source = source.clone();
4487 Box::pin(async move { source.into_id().await.unwrap().quote() })
4488 }),
4489 );
4490 Container {
4491 proc: self.proc.clone(),
4492 selection: query,
4493 graphql_client: self.graphql_client.clone(),
4494 }
4495 }
4496 pub fn with_mounted_file_opts<'a>(
4504 &self,
4505 path: impl Into<String>,
4506 source: impl IntoID<FileId>,
4507 opts: ContainerWithMountedFileOpts<'a>,
4508 ) -> Container {
4509 let mut query = self.selection.select("withMountedFile");
4510 query = query.arg("path", path.into());
4511 query = query.arg_lazy(
4512 "source",
4513 Box::new(move || {
4514 let source = source.clone();
4515 Box::pin(async move { source.into_id().await.unwrap().quote() })
4516 }),
4517 );
4518 if let Some(owner) = opts.owner {
4519 query = query.arg("owner", owner);
4520 }
4521 if let Some(expand) = opts.expand {
4522 query = query.arg("expand", expand);
4523 }
4524 Container {
4525 proc: self.proc.clone(),
4526 selection: query,
4527 graphql_client: self.graphql_client.clone(),
4528 }
4529 }
4530 pub fn with_mounted_secret(
4538 &self,
4539 path: impl Into<String>,
4540 source: impl IntoID<SecretId>,
4541 ) -> Container {
4542 let mut query = self.selection.select("withMountedSecret");
4543 query = query.arg("path", path.into());
4544 query = query.arg_lazy(
4545 "source",
4546 Box::new(move || {
4547 let source = source.clone();
4548 Box::pin(async move { source.into_id().await.unwrap().quote() })
4549 }),
4550 );
4551 Container {
4552 proc: self.proc.clone(),
4553 selection: query,
4554 graphql_client: self.graphql_client.clone(),
4555 }
4556 }
4557 pub fn with_mounted_secret_opts<'a>(
4565 &self,
4566 path: impl Into<String>,
4567 source: impl IntoID<SecretId>,
4568 opts: ContainerWithMountedSecretOpts<'a>,
4569 ) -> Container {
4570 let mut query = self.selection.select("withMountedSecret");
4571 query = query.arg("path", path.into());
4572 query = query.arg_lazy(
4573 "source",
4574 Box::new(move || {
4575 let source = source.clone();
4576 Box::pin(async move { source.into_id().await.unwrap().quote() })
4577 }),
4578 );
4579 if let Some(owner) = opts.owner {
4580 query = query.arg("owner", owner);
4581 }
4582 if let Some(mode) = opts.mode {
4583 query = query.arg("mode", mode);
4584 }
4585 if let Some(expand) = opts.expand {
4586 query = query.arg("expand", expand);
4587 }
4588 Container {
4589 proc: self.proc.clone(),
4590 selection: query,
4591 graphql_client: self.graphql_client.clone(),
4592 }
4593 }
4594 pub fn with_mounted_temp(&self, path: impl Into<String>) -> Container {
4601 let mut query = self.selection.select("withMountedTemp");
4602 query = query.arg("path", path.into());
4603 Container {
4604 proc: self.proc.clone(),
4605 selection: query,
4606 graphql_client: self.graphql_client.clone(),
4607 }
4608 }
4609 pub fn with_mounted_temp_opts(
4616 &self,
4617 path: impl Into<String>,
4618 opts: ContainerWithMountedTempOpts,
4619 ) -> Container {
4620 let mut query = self.selection.select("withMountedTemp");
4621 query = query.arg("path", path.into());
4622 if let Some(size) = opts.size {
4623 query = query.arg("size", size);
4624 }
4625 if let Some(expand) = opts.expand {
4626 query = query.arg("expand", expand);
4627 }
4628 Container {
4629 proc: self.proc.clone(),
4630 selection: query,
4631 graphql_client: self.graphql_client.clone(),
4632 }
4633 }
4634 pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Container {
4642 let mut query = self.selection.select("withNewFile");
4643 query = query.arg("path", path.into());
4644 query = query.arg("contents", contents.into());
4645 Container {
4646 proc: self.proc.clone(),
4647 selection: query,
4648 graphql_client: self.graphql_client.clone(),
4649 }
4650 }
4651 pub fn with_new_file_opts<'a>(
4659 &self,
4660 path: impl Into<String>,
4661 contents: impl Into<String>,
4662 opts: ContainerWithNewFileOpts<'a>,
4663 ) -> Container {
4664 let mut query = self.selection.select("withNewFile");
4665 query = query.arg("path", path.into());
4666 query = query.arg("contents", contents.into());
4667 if let Some(permissions) = opts.permissions {
4668 query = query.arg("permissions", permissions);
4669 }
4670 if let Some(owner) = opts.owner {
4671 query = query.arg("owner", owner);
4672 }
4673 if let Some(expand) = opts.expand {
4674 query = query.arg("expand", expand);
4675 }
4676 Container {
4677 proc: self.proc.clone(),
4678 selection: query,
4679 graphql_client: self.graphql_client.clone(),
4680 }
4681 }
4682 pub fn with_registry_auth(
4690 &self,
4691 address: impl Into<String>,
4692 username: impl Into<String>,
4693 secret: impl IntoID<SecretId>,
4694 ) -> Container {
4695 let mut query = self.selection.select("withRegistryAuth");
4696 query = query.arg("address", address.into());
4697 query = query.arg("username", username.into());
4698 query = query.arg_lazy(
4699 "secret",
4700 Box::new(move || {
4701 let secret = secret.clone();
4702 Box::pin(async move { secret.into_id().await.unwrap().quote() })
4703 }),
4704 );
4705 Container {
4706 proc: self.proc.clone(),
4707 selection: query,
4708 graphql_client: self.graphql_client.clone(),
4709 }
4710 }
4711 pub fn with_rootfs(&self, directory: impl IntoID<DirectoryId>) -> Container {
4717 let mut query = self.selection.select("withRootfs");
4718 query = query.arg_lazy(
4719 "directory",
4720 Box::new(move || {
4721 let directory = directory.clone();
4722 Box::pin(async move { directory.into_id().await.unwrap().quote() })
4723 }),
4724 );
4725 Container {
4726 proc: self.proc.clone(),
4727 selection: query,
4728 graphql_client: self.graphql_client.clone(),
4729 }
4730 }
4731 pub fn with_secret_variable(
4738 &self,
4739 name: impl Into<String>,
4740 secret: impl IntoID<SecretId>,
4741 ) -> Container {
4742 let mut query = self.selection.select("withSecretVariable");
4743 query = query.arg("name", name.into());
4744 query = query.arg_lazy(
4745 "secret",
4746 Box::new(move || {
4747 let secret = secret.clone();
4748 Box::pin(async move { secret.into_id().await.unwrap().quote() })
4749 }),
4750 );
4751 Container {
4752 proc: self.proc.clone(),
4753 selection: query,
4754 graphql_client: self.graphql_client.clone(),
4755 }
4756 }
4757 pub fn with_service_binding(
4767 &self,
4768 alias: impl Into<String>,
4769 service: impl IntoID<ServiceId>,
4770 ) -> Container {
4771 let mut query = self.selection.select("withServiceBinding");
4772 query = query.arg("alias", alias.into());
4773 query = query.arg_lazy(
4774 "service",
4775 Box::new(move || {
4776 let service = service.clone();
4777 Box::pin(async move { service.into_id().await.unwrap().quote() })
4778 }),
4779 );
4780 Container {
4781 proc: self.proc.clone(),
4782 selection: query,
4783 graphql_client: self.graphql_client.clone(),
4784 }
4785 }
4786 pub fn with_symlink(
4794 &self,
4795 target: impl Into<String>,
4796 link_name: impl Into<String>,
4797 ) -> Container {
4798 let mut query = self.selection.select("withSymlink");
4799 query = query.arg("target", target.into());
4800 query = query.arg("linkName", link_name.into());
4801 Container {
4802 proc: self.proc.clone(),
4803 selection: query,
4804 graphql_client: self.graphql_client.clone(),
4805 }
4806 }
4807 pub fn with_symlink_opts(
4815 &self,
4816 target: impl Into<String>,
4817 link_name: impl Into<String>,
4818 opts: ContainerWithSymlinkOpts,
4819 ) -> Container {
4820 let mut query = self.selection.select("withSymlink");
4821 query = query.arg("target", target.into());
4822 query = query.arg("linkName", link_name.into());
4823 if let Some(expand) = opts.expand {
4824 query = query.arg("expand", expand);
4825 }
4826 Container {
4827 proc: self.proc.clone(),
4828 selection: query,
4829 graphql_client: self.graphql_client.clone(),
4830 }
4831 }
4832 pub fn with_unix_socket(
4840 &self,
4841 path: impl Into<String>,
4842 source: impl IntoID<SocketId>,
4843 ) -> Container {
4844 let mut query = self.selection.select("withUnixSocket");
4845 query = query.arg("path", path.into());
4846 query = query.arg_lazy(
4847 "source",
4848 Box::new(move || {
4849 let source = source.clone();
4850 Box::pin(async move { source.into_id().await.unwrap().quote() })
4851 }),
4852 );
4853 Container {
4854 proc: self.proc.clone(),
4855 selection: query,
4856 graphql_client: self.graphql_client.clone(),
4857 }
4858 }
4859 pub fn with_unix_socket_opts<'a>(
4867 &self,
4868 path: impl Into<String>,
4869 source: impl IntoID<SocketId>,
4870 opts: ContainerWithUnixSocketOpts<'a>,
4871 ) -> Container {
4872 let mut query = self.selection.select("withUnixSocket");
4873 query = query.arg("path", path.into());
4874 query = query.arg_lazy(
4875 "source",
4876 Box::new(move || {
4877 let source = source.clone();
4878 Box::pin(async move { source.into_id().await.unwrap().quote() })
4879 }),
4880 );
4881 if let Some(owner) = opts.owner {
4882 query = query.arg("owner", owner);
4883 }
4884 if let Some(expand) = opts.expand {
4885 query = query.arg("expand", expand);
4886 }
4887 Container {
4888 proc: self.proc.clone(),
4889 selection: query,
4890 graphql_client: self.graphql_client.clone(),
4891 }
4892 }
4893 pub fn with_user(&self, name: impl Into<String>) -> Container {
4899 let mut query = self.selection.select("withUser");
4900 query = query.arg("name", name.into());
4901 Container {
4902 proc: self.proc.clone(),
4903 selection: query,
4904 graphql_client: self.graphql_client.clone(),
4905 }
4906 }
4907 pub fn with_workdir(&self, path: impl Into<String>) -> Container {
4914 let mut query = self.selection.select("withWorkdir");
4915 query = query.arg("path", path.into());
4916 Container {
4917 proc: self.proc.clone(),
4918 selection: query,
4919 graphql_client: self.graphql_client.clone(),
4920 }
4921 }
4922 pub fn with_workdir_opts(
4929 &self,
4930 path: impl Into<String>,
4931 opts: ContainerWithWorkdirOpts,
4932 ) -> Container {
4933 let mut query = self.selection.select("withWorkdir");
4934 query = query.arg("path", path.into());
4935 if let Some(expand) = opts.expand {
4936 query = query.arg("expand", expand);
4937 }
4938 Container {
4939 proc: self.proc.clone(),
4940 selection: query,
4941 graphql_client: self.graphql_client.clone(),
4942 }
4943 }
4944 pub fn without_annotation(&self, name: impl Into<String>) -> Container {
4950 let mut query = self.selection.select("withoutAnnotation");
4951 query = query.arg("name", name.into());
4952 Container {
4953 proc: self.proc.clone(),
4954 selection: query,
4955 graphql_client: self.graphql_client.clone(),
4956 }
4957 }
4958 pub fn without_default_args(&self) -> Container {
4960 let query = self.selection.select("withoutDefaultArgs");
4961 Container {
4962 proc: self.proc.clone(),
4963 selection: query,
4964 graphql_client: self.graphql_client.clone(),
4965 }
4966 }
4967 pub fn without_directory(&self, path: impl Into<String>) -> Container {
4974 let mut query = self.selection.select("withoutDirectory");
4975 query = query.arg("path", path.into());
4976 Container {
4977 proc: self.proc.clone(),
4978 selection: query,
4979 graphql_client: self.graphql_client.clone(),
4980 }
4981 }
4982 pub fn without_directory_opts(
4989 &self,
4990 path: impl Into<String>,
4991 opts: ContainerWithoutDirectoryOpts,
4992 ) -> Container {
4993 let mut query = self.selection.select("withoutDirectory");
4994 query = query.arg("path", path.into());
4995 if let Some(expand) = opts.expand {
4996 query = query.arg("expand", expand);
4997 }
4998 Container {
4999 proc: self.proc.clone(),
5000 selection: query,
5001 graphql_client: self.graphql_client.clone(),
5002 }
5003 }
5004 pub fn without_entrypoint(&self) -> Container {
5010 let query = self.selection.select("withoutEntrypoint");
5011 Container {
5012 proc: self.proc.clone(),
5013 selection: query,
5014 graphql_client: self.graphql_client.clone(),
5015 }
5016 }
5017 pub fn without_entrypoint_opts(&self, opts: ContainerWithoutEntrypointOpts) -> Container {
5023 let mut query = self.selection.select("withoutEntrypoint");
5024 if let Some(keep_default_args) = opts.keep_default_args {
5025 query = query.arg("keepDefaultArgs", keep_default_args);
5026 }
5027 Container {
5028 proc: self.proc.clone(),
5029 selection: query,
5030 graphql_client: self.graphql_client.clone(),
5031 }
5032 }
5033 pub fn without_env_variable(&self, name: impl Into<String>) -> Container {
5039 let mut query = self.selection.select("withoutEnvVariable");
5040 query = query.arg("name", name.into());
5041 Container {
5042 proc: self.proc.clone(),
5043 selection: query,
5044 graphql_client: self.graphql_client.clone(),
5045 }
5046 }
5047 pub fn without_exposed_port(&self, port: isize) -> Container {
5054 let mut query = self.selection.select("withoutExposedPort");
5055 query = query.arg("port", port);
5056 Container {
5057 proc: self.proc.clone(),
5058 selection: query,
5059 graphql_client: self.graphql_client.clone(),
5060 }
5061 }
5062 pub fn without_exposed_port_opts(
5069 &self,
5070 port: isize,
5071 opts: ContainerWithoutExposedPortOpts,
5072 ) -> Container {
5073 let mut query = self.selection.select("withoutExposedPort");
5074 query = query.arg("port", port);
5075 if let Some(protocol) = opts.protocol {
5076 query = query.arg("protocol", protocol);
5077 }
5078 Container {
5079 proc: self.proc.clone(),
5080 selection: query,
5081 graphql_client: self.graphql_client.clone(),
5082 }
5083 }
5084 pub fn without_file(&self, path: impl Into<String>) -> Container {
5091 let mut query = self.selection.select("withoutFile");
5092 query = query.arg("path", path.into());
5093 Container {
5094 proc: self.proc.clone(),
5095 selection: query,
5096 graphql_client: self.graphql_client.clone(),
5097 }
5098 }
5099 pub fn without_file_opts(
5106 &self,
5107 path: impl Into<String>,
5108 opts: ContainerWithoutFileOpts,
5109 ) -> Container {
5110 let mut query = self.selection.select("withoutFile");
5111 query = query.arg("path", path.into());
5112 if let Some(expand) = opts.expand {
5113 query = query.arg("expand", expand);
5114 }
5115 Container {
5116 proc: self.proc.clone(),
5117 selection: query,
5118 graphql_client: self.graphql_client.clone(),
5119 }
5120 }
5121 pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Container {
5128 let mut query = self.selection.select("withoutFiles");
5129 query = query.arg(
5130 "paths",
5131 paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
5132 );
5133 Container {
5134 proc: self.proc.clone(),
5135 selection: query,
5136 graphql_client: self.graphql_client.clone(),
5137 }
5138 }
5139 pub fn without_files_opts(
5146 &self,
5147 paths: Vec<impl Into<String>>,
5148 opts: ContainerWithoutFilesOpts,
5149 ) -> Container {
5150 let mut query = self.selection.select("withoutFiles");
5151 query = query.arg(
5152 "paths",
5153 paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
5154 );
5155 if let Some(expand) = opts.expand {
5156 query = query.arg("expand", expand);
5157 }
5158 Container {
5159 proc: self.proc.clone(),
5160 selection: query,
5161 graphql_client: self.graphql_client.clone(),
5162 }
5163 }
5164 pub fn without_label(&self, name: impl Into<String>) -> Container {
5170 let mut query = self.selection.select("withoutLabel");
5171 query = query.arg("name", name.into());
5172 Container {
5173 proc: self.proc.clone(),
5174 selection: query,
5175 graphql_client: self.graphql_client.clone(),
5176 }
5177 }
5178 pub fn without_mount(&self, path: impl Into<String>) -> Container {
5185 let mut query = self.selection.select("withoutMount");
5186 query = query.arg("path", path.into());
5187 Container {
5188 proc: self.proc.clone(),
5189 selection: query,
5190 graphql_client: self.graphql_client.clone(),
5191 }
5192 }
5193 pub fn without_mount_opts(
5200 &self,
5201 path: impl Into<String>,
5202 opts: ContainerWithoutMountOpts,
5203 ) -> Container {
5204 let mut query = self.selection.select("withoutMount");
5205 query = query.arg("path", path.into());
5206 if let Some(expand) = opts.expand {
5207 query = query.arg("expand", expand);
5208 }
5209 Container {
5210 proc: self.proc.clone(),
5211 selection: query,
5212 graphql_client: self.graphql_client.clone(),
5213 }
5214 }
5215 pub fn without_registry_auth(&self, address: impl Into<String>) -> Container {
5223 let mut query = self.selection.select("withoutRegistryAuth");
5224 query = query.arg("address", address.into());
5225 Container {
5226 proc: self.proc.clone(),
5227 selection: query,
5228 graphql_client: self.graphql_client.clone(),
5229 }
5230 }
5231 pub fn without_secret_variable(&self, name: impl Into<String>) -> Container {
5237 let mut query = self.selection.select("withoutSecretVariable");
5238 query = query.arg("name", name.into());
5239 Container {
5240 proc: self.proc.clone(),
5241 selection: query,
5242 graphql_client: self.graphql_client.clone(),
5243 }
5244 }
5245 pub fn without_unix_socket(&self, path: impl Into<String>) -> Container {
5252 let mut query = self.selection.select("withoutUnixSocket");
5253 query = query.arg("path", path.into());
5254 Container {
5255 proc: self.proc.clone(),
5256 selection: query,
5257 graphql_client: self.graphql_client.clone(),
5258 }
5259 }
5260 pub fn without_unix_socket_opts(
5267 &self,
5268 path: impl Into<String>,
5269 opts: ContainerWithoutUnixSocketOpts,
5270 ) -> Container {
5271 let mut query = self.selection.select("withoutUnixSocket");
5272 query = query.arg("path", path.into());
5273 if let Some(expand) = opts.expand {
5274 query = query.arg("expand", expand);
5275 }
5276 Container {
5277 proc: self.proc.clone(),
5278 selection: query,
5279 graphql_client: self.graphql_client.clone(),
5280 }
5281 }
5282 pub fn without_user(&self) -> Container {
5285 let query = self.selection.select("withoutUser");
5286 Container {
5287 proc: self.proc.clone(),
5288 selection: query,
5289 graphql_client: self.graphql_client.clone(),
5290 }
5291 }
5292 pub fn without_workdir(&self) -> Container {
5295 let query = self.selection.select("withoutWorkdir");
5296 Container {
5297 proc: self.proc.clone(),
5298 selection: query,
5299 graphql_client: self.graphql_client.clone(),
5300 }
5301 }
5302 pub async fn workdir(&self) -> Result<String, DaggerError> {
5304 let query = self.selection.select("workdir");
5305 query.execute(self.graphql_client.clone()).await
5306 }
5307}
5308#[derive(Clone)]
5309pub struct CurrentModule {
5310 pub proc: Option<Arc<DaggerSessionProc>>,
5311 pub selection: Selection,
5312 pub graphql_client: DynGraphQLClient,
5313}
5314#[derive(Builder, Debug, PartialEq)]
5315pub struct CurrentModuleGeneratorsOpts<'a> {
5316 #[builder(setter(into, strip_option), default)]
5318 pub include: Option<Vec<&'a str>>,
5319}
5320#[derive(Builder, Debug, PartialEq)]
5321pub struct CurrentModuleWorkdirOpts<'a> {
5322 #[builder(setter(into, strip_option), default)]
5324 pub exclude: Option<Vec<&'a str>>,
5325 #[builder(setter(into, strip_option), default)]
5327 pub gitignore: Option<bool>,
5328 #[builder(setter(into, strip_option), default)]
5330 pub include: Option<Vec<&'a str>>,
5331}
5332impl CurrentModule {
5333 pub fn dependencies(&self) -> Vec<Module> {
5335 let query = self.selection.select("dependencies");
5336 vec![Module {
5337 proc: self.proc.clone(),
5338 selection: query,
5339 graphql_client: self.graphql_client.clone(),
5340 }]
5341 }
5342 pub fn generated_context_directory(&self) -> Directory {
5344 let query = self.selection.select("generatedContextDirectory");
5345 Directory {
5346 proc: self.proc.clone(),
5347 selection: query,
5348 graphql_client: self.graphql_client.clone(),
5349 }
5350 }
5351 pub fn generators(&self) -> GeneratorGroup {
5357 let query = self.selection.select("generators");
5358 GeneratorGroup {
5359 proc: self.proc.clone(),
5360 selection: query,
5361 graphql_client: self.graphql_client.clone(),
5362 }
5363 }
5364 pub fn generators_opts<'a>(&self, opts: CurrentModuleGeneratorsOpts<'a>) -> GeneratorGroup {
5370 let mut query = self.selection.select("generators");
5371 if let Some(include) = opts.include {
5372 query = query.arg("include", include);
5373 }
5374 GeneratorGroup {
5375 proc: self.proc.clone(),
5376 selection: query,
5377 graphql_client: self.graphql_client.clone(),
5378 }
5379 }
5380 pub async fn id(&self) -> Result<CurrentModuleId, DaggerError> {
5382 let query = self.selection.select("id");
5383 query.execute(self.graphql_client.clone()).await
5384 }
5385 pub async fn name(&self) -> Result<String, DaggerError> {
5387 let query = self.selection.select("name");
5388 query.execute(self.graphql_client.clone()).await
5389 }
5390 pub fn source(&self) -> Directory {
5392 let query = self.selection.select("source");
5393 Directory {
5394 proc: self.proc.clone(),
5395 selection: query,
5396 graphql_client: self.graphql_client.clone(),
5397 }
5398 }
5399 pub fn workdir(&self, path: impl Into<String>) -> Directory {
5406 let mut query = self.selection.select("workdir");
5407 query = query.arg("path", path.into());
5408 Directory {
5409 proc: self.proc.clone(),
5410 selection: query,
5411 graphql_client: self.graphql_client.clone(),
5412 }
5413 }
5414 pub fn workdir_opts<'a>(
5421 &self,
5422 path: impl Into<String>,
5423 opts: CurrentModuleWorkdirOpts<'a>,
5424 ) -> Directory {
5425 let mut query = self.selection.select("workdir");
5426 query = query.arg("path", path.into());
5427 if let Some(exclude) = opts.exclude {
5428 query = query.arg("exclude", exclude);
5429 }
5430 if let Some(include) = opts.include {
5431 query = query.arg("include", include);
5432 }
5433 if let Some(gitignore) = opts.gitignore {
5434 query = query.arg("gitignore", gitignore);
5435 }
5436 Directory {
5437 proc: self.proc.clone(),
5438 selection: query,
5439 graphql_client: self.graphql_client.clone(),
5440 }
5441 }
5442 pub fn workdir_file(&self, path: impl Into<String>) -> File {
5448 let mut query = self.selection.select("workdirFile");
5449 query = query.arg("path", path.into());
5450 File {
5451 proc: self.proc.clone(),
5452 selection: query,
5453 graphql_client: self.graphql_client.clone(),
5454 }
5455 }
5456}
5457#[derive(Clone)]
5458pub struct Directory {
5459 pub proc: Option<Arc<DaggerSessionProc>>,
5460 pub selection: Selection,
5461 pub graphql_client: DynGraphQLClient,
5462}
5463#[derive(Builder, Debug, PartialEq)]
5464pub struct DirectoryAsModuleOpts<'a> {
5465 #[builder(setter(into, strip_option), default)]
5468 pub source_root_path: Option<&'a str>,
5469}
5470#[derive(Builder, Debug, PartialEq)]
5471pub struct DirectoryAsModuleSourceOpts<'a> {
5472 #[builder(setter(into, strip_option), default)]
5475 pub source_root_path: Option<&'a str>,
5476}
5477#[derive(Builder, Debug, PartialEq)]
5478pub struct DirectoryDockerBuildOpts<'a> {
5479 #[builder(setter(into, strip_option), default)]
5481 pub build_args: Option<Vec<BuildArg>>,
5482 #[builder(setter(into, strip_option), default)]
5484 pub dockerfile: Option<&'a str>,
5485 #[builder(setter(into, strip_option), default)]
5488 pub no_init: Option<bool>,
5489 #[builder(setter(into, strip_option), default)]
5491 pub platform: Option<Platform>,
5492 #[builder(setter(into, strip_option), default)]
5495 pub secrets: Option<Vec<SecretId>>,
5496 #[builder(setter(into, strip_option), default)]
5500 pub ssh: Option<SocketId>,
5501 #[builder(setter(into, strip_option), default)]
5503 pub target: Option<&'a str>,
5504}
5505#[derive(Builder, Debug, PartialEq)]
5506pub struct DirectoryEntriesOpts<'a> {
5507 #[builder(setter(into, strip_option), default)]
5509 pub path: Option<&'a str>,
5510}
5511#[derive(Builder, Debug, PartialEq)]
5512pub struct DirectoryExistsOpts {
5513 #[builder(setter(into, strip_option), default)]
5515 pub do_not_follow_symlinks: Option<bool>,
5516 #[builder(setter(into, strip_option), default)]
5518 pub expected_type: Option<ExistsType>,
5519}
5520#[derive(Builder, Debug, PartialEq)]
5521pub struct DirectoryExportOpts {
5522 #[builder(setter(into, strip_option), default)]
5524 pub wipe: Option<bool>,
5525}
5526#[derive(Builder, Debug, PartialEq)]
5527pub struct DirectoryFilterOpts<'a> {
5528 #[builder(setter(into, strip_option), default)]
5530 pub exclude: Option<Vec<&'a str>>,
5531 #[builder(setter(into, strip_option), default)]
5533 pub gitignore: Option<bool>,
5534 #[builder(setter(into, strip_option), default)]
5536 pub include: Option<Vec<&'a str>>,
5537}
5538#[derive(Builder, Debug, PartialEq)]
5539pub struct DirectorySearchOpts<'a> {
5540 #[builder(setter(into, strip_option), default)]
5542 pub dotall: Option<bool>,
5543 #[builder(setter(into, strip_option), default)]
5545 pub files_only: Option<bool>,
5546 #[builder(setter(into, strip_option), default)]
5548 pub globs: Option<Vec<&'a str>>,
5549 #[builder(setter(into, strip_option), default)]
5551 pub insensitive: Option<bool>,
5552 #[builder(setter(into, strip_option), default)]
5554 pub limit: Option<isize>,
5555 #[builder(setter(into, strip_option), default)]
5557 pub literal: Option<bool>,
5558 #[builder(setter(into, strip_option), default)]
5560 pub multiline: Option<bool>,
5561 #[builder(setter(into, strip_option), default)]
5563 pub paths: Option<Vec<&'a str>>,
5564 #[builder(setter(into, strip_option), default)]
5566 pub skip_hidden: Option<bool>,
5567 #[builder(setter(into, strip_option), default)]
5569 pub skip_ignored: Option<bool>,
5570}
5571#[derive(Builder, Debug, PartialEq)]
5572pub struct DirectoryStatOpts {
5573 #[builder(setter(into, strip_option), default)]
5575 pub do_not_follow_symlinks: Option<bool>,
5576}
5577#[derive(Builder, Debug, PartialEq)]
5578pub struct DirectoryTerminalOpts<'a> {
5579 #[builder(setter(into, strip_option), default)]
5581 pub cmd: Option<Vec<&'a str>>,
5582 #[builder(setter(into, strip_option), default)]
5584 pub container: Option<ContainerId>,
5585 #[builder(setter(into, strip_option), default)]
5587 pub experimental_privileged_nesting: Option<bool>,
5588 #[builder(setter(into, strip_option), default)]
5590 pub insecure_root_capabilities: Option<bool>,
5591}
5592#[derive(Builder, Debug, PartialEq)]
5593pub struct DirectoryWithDirectoryOpts<'a> {
5594 #[builder(setter(into, strip_option), default)]
5596 pub exclude: Option<Vec<&'a str>>,
5597 #[builder(setter(into, strip_option), default)]
5599 pub gitignore: Option<bool>,
5600 #[builder(setter(into, strip_option), default)]
5602 pub include: Option<Vec<&'a str>>,
5603 #[builder(setter(into, strip_option), default)]
5607 pub owner: Option<&'a str>,
5608}
5609#[derive(Builder, Debug, PartialEq)]
5610pub struct DirectoryWithFileOpts<'a> {
5611 #[builder(setter(into, strip_option), default)]
5615 pub owner: Option<&'a str>,
5616 #[builder(setter(into, strip_option), default)]
5618 pub permissions: Option<isize>,
5619}
5620#[derive(Builder, Debug, PartialEq)]
5621pub struct DirectoryWithFilesOpts {
5622 #[builder(setter(into, strip_option), default)]
5624 pub permissions: Option<isize>,
5625}
5626#[derive(Builder, Debug, PartialEq)]
5627pub struct DirectoryWithNewDirectoryOpts {
5628 #[builder(setter(into, strip_option), default)]
5630 pub permissions: Option<isize>,
5631}
5632#[derive(Builder, Debug, PartialEq)]
5633pub struct DirectoryWithNewFileOpts {
5634 #[builder(setter(into, strip_option), default)]
5636 pub permissions: Option<isize>,
5637}
5638impl Directory {
5639 pub fn as_git(&self) -> GitRepository {
5641 let query = self.selection.select("asGit");
5642 GitRepository {
5643 proc: self.proc.clone(),
5644 selection: query,
5645 graphql_client: self.graphql_client.clone(),
5646 }
5647 }
5648 pub fn as_module(&self) -> Module {
5654 let query = self.selection.select("asModule");
5655 Module {
5656 proc: self.proc.clone(),
5657 selection: query,
5658 graphql_client: self.graphql_client.clone(),
5659 }
5660 }
5661 pub fn as_module_opts<'a>(&self, opts: DirectoryAsModuleOpts<'a>) -> Module {
5667 let mut query = self.selection.select("asModule");
5668 if let Some(source_root_path) = opts.source_root_path {
5669 query = query.arg("sourceRootPath", source_root_path);
5670 }
5671 Module {
5672 proc: self.proc.clone(),
5673 selection: query,
5674 graphql_client: self.graphql_client.clone(),
5675 }
5676 }
5677 pub fn as_module_source(&self) -> ModuleSource {
5683 let query = self.selection.select("asModuleSource");
5684 ModuleSource {
5685 proc: self.proc.clone(),
5686 selection: query,
5687 graphql_client: self.graphql_client.clone(),
5688 }
5689 }
5690 pub fn as_module_source_opts<'a>(&self, opts: DirectoryAsModuleSourceOpts<'a>) -> ModuleSource {
5696 let mut query = self.selection.select("asModuleSource");
5697 if let Some(source_root_path) = opts.source_root_path {
5698 query = query.arg("sourceRootPath", source_root_path);
5699 }
5700 ModuleSource {
5701 proc: self.proc.clone(),
5702 selection: query,
5703 graphql_client: self.graphql_client.clone(),
5704 }
5705 }
5706 pub fn changes(&self, from: impl IntoID<DirectoryId>) -> Changeset {
5713 let mut query = self.selection.select("changes");
5714 query = query.arg_lazy(
5715 "from",
5716 Box::new(move || {
5717 let from = from.clone();
5718 Box::pin(async move { from.into_id().await.unwrap().quote() })
5719 }),
5720 );
5721 Changeset {
5722 proc: self.proc.clone(),
5723 selection: query,
5724 graphql_client: self.graphql_client.clone(),
5725 }
5726 }
5727 pub fn chown(&self, path: impl Into<String>, owner: impl Into<String>) -> Directory {
5738 let mut query = self.selection.select("chown");
5739 query = query.arg("path", path.into());
5740 query = query.arg("owner", owner.into());
5741 Directory {
5742 proc: self.proc.clone(),
5743 selection: query,
5744 graphql_client: self.graphql_client.clone(),
5745 }
5746 }
5747 pub fn diff(&self, other: impl IntoID<DirectoryId>) -> Directory {
5753 let mut query = self.selection.select("diff");
5754 query = query.arg_lazy(
5755 "other",
5756 Box::new(move || {
5757 let other = other.clone();
5758 Box::pin(async move { other.into_id().await.unwrap().quote() })
5759 }),
5760 );
5761 Directory {
5762 proc: self.proc.clone(),
5763 selection: query,
5764 graphql_client: self.graphql_client.clone(),
5765 }
5766 }
5767 pub async fn digest(&self) -> Result<String, DaggerError> {
5769 let query = self.selection.select("digest");
5770 query.execute(self.graphql_client.clone()).await
5771 }
5772 pub fn directory(&self, path: impl Into<String>) -> Directory {
5778 let mut query = self.selection.select("directory");
5779 query = query.arg("path", path.into());
5780 Directory {
5781 proc: self.proc.clone(),
5782 selection: query,
5783 graphql_client: self.graphql_client.clone(),
5784 }
5785 }
5786 pub fn docker_build(&self) -> Container {
5792 let query = self.selection.select("dockerBuild");
5793 Container {
5794 proc: self.proc.clone(),
5795 selection: query,
5796 graphql_client: self.graphql_client.clone(),
5797 }
5798 }
5799 pub fn docker_build_opts<'a>(&self, opts: DirectoryDockerBuildOpts<'a>) -> Container {
5805 let mut query = self.selection.select("dockerBuild");
5806 if let Some(dockerfile) = opts.dockerfile {
5807 query = query.arg("dockerfile", dockerfile);
5808 }
5809 if let Some(platform) = opts.platform {
5810 query = query.arg("platform", platform);
5811 }
5812 if let Some(build_args) = opts.build_args {
5813 query = query.arg("buildArgs", build_args);
5814 }
5815 if let Some(target) = opts.target {
5816 query = query.arg("target", target);
5817 }
5818 if let Some(secrets) = opts.secrets {
5819 query = query.arg("secrets", secrets);
5820 }
5821 if let Some(no_init) = opts.no_init {
5822 query = query.arg("noInit", no_init);
5823 }
5824 if let Some(ssh) = opts.ssh {
5825 query = query.arg("ssh", ssh);
5826 }
5827 Container {
5828 proc: self.proc.clone(),
5829 selection: query,
5830 graphql_client: self.graphql_client.clone(),
5831 }
5832 }
5833 pub async fn entries(&self) -> Result<Vec<String>, DaggerError> {
5839 let query = self.selection.select("entries");
5840 query.execute(self.graphql_client.clone()).await
5841 }
5842 pub async fn entries_opts<'a>(
5848 &self,
5849 opts: DirectoryEntriesOpts<'a>,
5850 ) -> Result<Vec<String>, DaggerError> {
5851 let mut query = self.selection.select("entries");
5852 if let Some(path) = opts.path {
5853 query = query.arg("path", path);
5854 }
5855 query.execute(self.graphql_client.clone()).await
5856 }
5857 pub async fn exists(&self, path: impl Into<String>) -> Result<bool, DaggerError> {
5864 let mut query = self.selection.select("exists");
5865 query = query.arg("path", path.into());
5866 query.execute(self.graphql_client.clone()).await
5867 }
5868 pub async fn exists_opts(
5875 &self,
5876 path: impl Into<String>,
5877 opts: DirectoryExistsOpts,
5878 ) -> Result<bool, DaggerError> {
5879 let mut query = self.selection.select("exists");
5880 query = query.arg("path", path.into());
5881 if let Some(expected_type) = opts.expected_type {
5882 query = query.arg("expectedType", expected_type);
5883 }
5884 if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
5885 query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
5886 }
5887 query.execute(self.graphql_client.clone()).await
5888 }
5889 pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
5896 let mut query = self.selection.select("export");
5897 query = query.arg("path", path.into());
5898 query.execute(self.graphql_client.clone()).await
5899 }
5900 pub async fn export_opts(
5907 &self,
5908 path: impl Into<String>,
5909 opts: DirectoryExportOpts,
5910 ) -> Result<String, DaggerError> {
5911 let mut query = self.selection.select("export");
5912 query = query.arg("path", path.into());
5913 if let Some(wipe) = opts.wipe {
5914 query = query.arg("wipe", wipe);
5915 }
5916 query.execute(self.graphql_client.clone()).await
5917 }
5918 pub fn file(&self, path: impl Into<String>) -> File {
5924 let mut query = self.selection.select("file");
5925 query = query.arg("path", path.into());
5926 File {
5927 proc: self.proc.clone(),
5928 selection: query,
5929 graphql_client: self.graphql_client.clone(),
5930 }
5931 }
5932 pub fn filter(&self) -> Directory {
5938 let query = self.selection.select("filter");
5939 Directory {
5940 proc: self.proc.clone(),
5941 selection: query,
5942 graphql_client: self.graphql_client.clone(),
5943 }
5944 }
5945 pub fn filter_opts<'a>(&self, opts: DirectoryFilterOpts<'a>) -> Directory {
5951 let mut query = self.selection.select("filter");
5952 if let Some(exclude) = opts.exclude {
5953 query = query.arg("exclude", exclude);
5954 }
5955 if let Some(include) = opts.include {
5956 query = query.arg("include", include);
5957 }
5958 if let Some(gitignore) = opts.gitignore {
5959 query = query.arg("gitignore", gitignore);
5960 }
5961 Directory {
5962 proc: self.proc.clone(),
5963 selection: query,
5964 graphql_client: self.graphql_client.clone(),
5965 }
5966 }
5967 pub async fn find_up(
5974 &self,
5975 name: impl Into<String>,
5976 start: impl Into<String>,
5977 ) -> Result<String, DaggerError> {
5978 let mut query = self.selection.select("findUp");
5979 query = query.arg("name", name.into());
5980 query = query.arg("start", start.into());
5981 query.execute(self.graphql_client.clone()).await
5982 }
5983 pub async fn glob(&self, pattern: impl Into<String>) -> Result<Vec<String>, DaggerError> {
5989 let mut query = self.selection.select("glob");
5990 query = query.arg("pattern", pattern.into());
5991 query.execute(self.graphql_client.clone()).await
5992 }
5993 pub async fn id(&self) -> Result<DirectoryId, DaggerError> {
5995 let query = self.selection.select("id");
5996 query.execute(self.graphql_client.clone()).await
5997 }
5998 pub async fn name(&self) -> Result<String, DaggerError> {
6000 let query = self.selection.select("name");
6001 query.execute(self.graphql_client.clone()).await
6002 }
6003 pub fn search(&self, pattern: impl Into<String>) -> Vec<SearchResult> {
6011 let mut query = self.selection.select("search");
6012 query = query.arg("pattern", pattern.into());
6013 vec![SearchResult {
6014 proc: self.proc.clone(),
6015 selection: query,
6016 graphql_client: self.graphql_client.clone(),
6017 }]
6018 }
6019 pub fn search_opts<'a>(
6027 &self,
6028 pattern: impl Into<String>,
6029 opts: DirectorySearchOpts<'a>,
6030 ) -> Vec<SearchResult> {
6031 let mut query = self.selection.select("search");
6032 query = query.arg("pattern", pattern.into());
6033 if let Some(paths) = opts.paths {
6034 query = query.arg("paths", paths);
6035 }
6036 if let Some(globs) = opts.globs {
6037 query = query.arg("globs", globs);
6038 }
6039 if let Some(literal) = opts.literal {
6040 query = query.arg("literal", literal);
6041 }
6042 if let Some(multiline) = opts.multiline {
6043 query = query.arg("multiline", multiline);
6044 }
6045 if let Some(dotall) = opts.dotall {
6046 query = query.arg("dotall", dotall);
6047 }
6048 if let Some(insensitive) = opts.insensitive {
6049 query = query.arg("insensitive", insensitive);
6050 }
6051 if let Some(skip_ignored) = opts.skip_ignored {
6052 query = query.arg("skipIgnored", skip_ignored);
6053 }
6054 if let Some(skip_hidden) = opts.skip_hidden {
6055 query = query.arg("skipHidden", skip_hidden);
6056 }
6057 if let Some(files_only) = opts.files_only {
6058 query = query.arg("filesOnly", files_only);
6059 }
6060 if let Some(limit) = opts.limit {
6061 query = query.arg("limit", limit);
6062 }
6063 vec![SearchResult {
6064 proc: self.proc.clone(),
6065 selection: query,
6066 graphql_client: self.graphql_client.clone(),
6067 }]
6068 }
6069 pub fn stat(&self, path: impl Into<String>) -> Stat {
6076 let mut query = self.selection.select("stat");
6077 query = query.arg("path", path.into());
6078 Stat {
6079 proc: self.proc.clone(),
6080 selection: query,
6081 graphql_client: self.graphql_client.clone(),
6082 }
6083 }
6084 pub fn stat_opts(&self, path: impl Into<String>, opts: DirectoryStatOpts) -> Stat {
6091 let mut query = self.selection.select("stat");
6092 query = query.arg("path", path.into());
6093 if let Some(do_not_follow_symlinks) = opts.do_not_follow_symlinks {
6094 query = query.arg("doNotFollowSymlinks", do_not_follow_symlinks);
6095 }
6096 Stat {
6097 proc: self.proc.clone(),
6098 selection: query,
6099 graphql_client: self.graphql_client.clone(),
6100 }
6101 }
6102 pub async fn sync(&self) -> Result<DirectoryId, DaggerError> {
6104 let query = self.selection.select("sync");
6105 query.execute(self.graphql_client.clone()).await
6106 }
6107 pub fn terminal(&self) -> Directory {
6113 let query = self.selection.select("terminal");
6114 Directory {
6115 proc: self.proc.clone(),
6116 selection: query,
6117 graphql_client: self.graphql_client.clone(),
6118 }
6119 }
6120 pub fn terminal_opts<'a>(&self, opts: DirectoryTerminalOpts<'a>) -> Directory {
6126 let mut query = self.selection.select("terminal");
6127 if let Some(container) = opts.container {
6128 query = query.arg("container", container);
6129 }
6130 if let Some(cmd) = opts.cmd {
6131 query = query.arg("cmd", cmd);
6132 }
6133 if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting {
6134 query = query.arg(
6135 "experimentalPrivilegedNesting",
6136 experimental_privileged_nesting,
6137 );
6138 }
6139 if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities {
6140 query = query.arg("insecureRootCapabilities", insecure_root_capabilities);
6141 }
6142 Directory {
6143 proc: self.proc.clone(),
6144 selection: query,
6145 graphql_client: self.graphql_client.clone(),
6146 }
6147 }
6148 pub fn with_changes(&self, changes: impl IntoID<ChangesetId>) -> Directory {
6154 let mut query = self.selection.select("withChanges");
6155 query = query.arg_lazy(
6156 "changes",
6157 Box::new(move || {
6158 let changes = changes.clone();
6159 Box::pin(async move { changes.into_id().await.unwrap().quote() })
6160 }),
6161 );
6162 Directory {
6163 proc: self.proc.clone(),
6164 selection: query,
6165 graphql_client: self.graphql_client.clone(),
6166 }
6167 }
6168 pub fn with_directory(
6176 &self,
6177 path: impl Into<String>,
6178 source: impl IntoID<DirectoryId>,
6179 ) -> Directory {
6180 let mut query = self.selection.select("withDirectory");
6181 query = query.arg("path", path.into());
6182 query = query.arg_lazy(
6183 "source",
6184 Box::new(move || {
6185 let source = source.clone();
6186 Box::pin(async move { source.into_id().await.unwrap().quote() })
6187 }),
6188 );
6189 Directory {
6190 proc: self.proc.clone(),
6191 selection: query,
6192 graphql_client: self.graphql_client.clone(),
6193 }
6194 }
6195 pub fn with_directory_opts<'a>(
6203 &self,
6204 path: impl Into<String>,
6205 source: impl IntoID<DirectoryId>,
6206 opts: DirectoryWithDirectoryOpts<'a>,
6207 ) -> Directory {
6208 let mut query = self.selection.select("withDirectory");
6209 query = query.arg("path", path.into());
6210 query = query.arg_lazy(
6211 "source",
6212 Box::new(move || {
6213 let source = source.clone();
6214 Box::pin(async move { source.into_id().await.unwrap().quote() })
6215 }),
6216 );
6217 if let Some(exclude) = opts.exclude {
6218 query = query.arg("exclude", exclude);
6219 }
6220 if let Some(include) = opts.include {
6221 query = query.arg("include", include);
6222 }
6223 if let Some(gitignore) = opts.gitignore {
6224 query = query.arg("gitignore", gitignore);
6225 }
6226 if let Some(owner) = opts.owner {
6227 query = query.arg("owner", owner);
6228 }
6229 Directory {
6230 proc: self.proc.clone(),
6231 selection: query,
6232 graphql_client: self.graphql_client.clone(),
6233 }
6234 }
6235 pub fn with_error(&self, err: impl Into<String>) -> Directory {
6241 let mut query = self.selection.select("withError");
6242 query = query.arg("err", err.into());
6243 Directory {
6244 proc: self.proc.clone(),
6245 selection: query,
6246 graphql_client: self.graphql_client.clone(),
6247 }
6248 }
6249 pub fn with_file(&self, path: impl Into<String>, source: impl IntoID<FileId>) -> Directory {
6257 let mut query = self.selection.select("withFile");
6258 query = query.arg("path", path.into());
6259 query = query.arg_lazy(
6260 "source",
6261 Box::new(move || {
6262 let source = source.clone();
6263 Box::pin(async move { source.into_id().await.unwrap().quote() })
6264 }),
6265 );
6266 Directory {
6267 proc: self.proc.clone(),
6268 selection: query,
6269 graphql_client: self.graphql_client.clone(),
6270 }
6271 }
6272 pub fn with_file_opts<'a>(
6280 &self,
6281 path: impl Into<String>,
6282 source: impl IntoID<FileId>,
6283 opts: DirectoryWithFileOpts<'a>,
6284 ) -> Directory {
6285 let mut query = self.selection.select("withFile");
6286 query = query.arg("path", path.into());
6287 query = query.arg_lazy(
6288 "source",
6289 Box::new(move || {
6290 let source = source.clone();
6291 Box::pin(async move { source.into_id().await.unwrap().quote() })
6292 }),
6293 );
6294 if let Some(permissions) = opts.permissions {
6295 query = query.arg("permissions", permissions);
6296 }
6297 if let Some(owner) = opts.owner {
6298 query = query.arg("owner", owner);
6299 }
6300 Directory {
6301 proc: self.proc.clone(),
6302 selection: query,
6303 graphql_client: self.graphql_client.clone(),
6304 }
6305 }
6306 pub fn with_files(&self, path: impl Into<String>, sources: Vec<FileId>) -> Directory {
6314 let mut query = self.selection.select("withFiles");
6315 query = query.arg("path", path.into());
6316 query = query.arg("sources", sources);
6317 Directory {
6318 proc: self.proc.clone(),
6319 selection: query,
6320 graphql_client: self.graphql_client.clone(),
6321 }
6322 }
6323 pub fn with_files_opts(
6331 &self,
6332 path: impl Into<String>,
6333 sources: Vec<FileId>,
6334 opts: DirectoryWithFilesOpts,
6335 ) -> Directory {
6336 let mut query = self.selection.select("withFiles");
6337 query = query.arg("path", path.into());
6338 query = query.arg("sources", sources);
6339 if let Some(permissions) = opts.permissions {
6340 query = query.arg("permissions", permissions);
6341 }
6342 Directory {
6343 proc: self.proc.clone(),
6344 selection: query,
6345 graphql_client: self.graphql_client.clone(),
6346 }
6347 }
6348 pub fn with_new_directory(&self, path: impl Into<String>) -> Directory {
6355 let mut query = self.selection.select("withNewDirectory");
6356 query = query.arg("path", path.into());
6357 Directory {
6358 proc: self.proc.clone(),
6359 selection: query,
6360 graphql_client: self.graphql_client.clone(),
6361 }
6362 }
6363 pub fn with_new_directory_opts(
6370 &self,
6371 path: impl Into<String>,
6372 opts: DirectoryWithNewDirectoryOpts,
6373 ) -> Directory {
6374 let mut query = self.selection.select("withNewDirectory");
6375 query = query.arg("path", path.into());
6376 if let Some(permissions) = opts.permissions {
6377 query = query.arg("permissions", permissions);
6378 }
6379 Directory {
6380 proc: self.proc.clone(),
6381 selection: query,
6382 graphql_client: self.graphql_client.clone(),
6383 }
6384 }
6385 pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Directory {
6393 let mut query = self.selection.select("withNewFile");
6394 query = query.arg("path", path.into());
6395 query = query.arg("contents", contents.into());
6396 Directory {
6397 proc: self.proc.clone(),
6398 selection: query,
6399 graphql_client: self.graphql_client.clone(),
6400 }
6401 }
6402 pub fn with_new_file_opts(
6410 &self,
6411 path: impl Into<String>,
6412 contents: impl Into<String>,
6413 opts: DirectoryWithNewFileOpts,
6414 ) -> Directory {
6415 let mut query = self.selection.select("withNewFile");
6416 query = query.arg("path", path.into());
6417 query = query.arg("contents", contents.into());
6418 if let Some(permissions) = opts.permissions {
6419 query = query.arg("permissions", permissions);
6420 }
6421 Directory {
6422 proc: self.proc.clone(),
6423 selection: query,
6424 graphql_client: self.graphql_client.clone(),
6425 }
6426 }
6427 pub fn with_patch(&self, patch: impl Into<String>) -> Directory {
6433 let mut query = self.selection.select("withPatch");
6434 query = query.arg("patch", patch.into());
6435 Directory {
6436 proc: self.proc.clone(),
6437 selection: query,
6438 graphql_client: self.graphql_client.clone(),
6439 }
6440 }
6441 pub fn with_patch_file(&self, patch: impl IntoID<FileId>) -> Directory {
6447 let mut query = self.selection.select("withPatchFile");
6448 query = query.arg_lazy(
6449 "patch",
6450 Box::new(move || {
6451 let patch = patch.clone();
6452 Box::pin(async move { patch.into_id().await.unwrap().quote() })
6453 }),
6454 );
6455 Directory {
6456 proc: self.proc.clone(),
6457 selection: query,
6458 graphql_client: self.graphql_client.clone(),
6459 }
6460 }
6461 pub fn with_symlink(
6468 &self,
6469 target: impl Into<String>,
6470 link_name: impl Into<String>,
6471 ) -> Directory {
6472 let mut query = self.selection.select("withSymlink");
6473 query = query.arg("target", target.into());
6474 query = query.arg("linkName", link_name.into());
6475 Directory {
6476 proc: self.proc.clone(),
6477 selection: query,
6478 graphql_client: self.graphql_client.clone(),
6479 }
6480 }
6481 pub fn with_timestamps(&self, timestamp: isize) -> Directory {
6489 let mut query = self.selection.select("withTimestamps");
6490 query = query.arg("timestamp", timestamp);
6491 Directory {
6492 proc: self.proc.clone(),
6493 selection: query,
6494 graphql_client: self.graphql_client.clone(),
6495 }
6496 }
6497 pub fn without_directory(&self, path: impl Into<String>) -> Directory {
6503 let mut query = self.selection.select("withoutDirectory");
6504 query = query.arg("path", path.into());
6505 Directory {
6506 proc: self.proc.clone(),
6507 selection: query,
6508 graphql_client: self.graphql_client.clone(),
6509 }
6510 }
6511 pub fn without_file(&self, path: impl Into<String>) -> Directory {
6517 let mut query = self.selection.select("withoutFile");
6518 query = query.arg("path", path.into());
6519 Directory {
6520 proc: self.proc.clone(),
6521 selection: query,
6522 graphql_client: self.graphql_client.clone(),
6523 }
6524 }
6525 pub fn without_files(&self, paths: Vec<impl Into<String>>) -> Directory {
6531 let mut query = self.selection.select("withoutFiles");
6532 query = query.arg(
6533 "paths",
6534 paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
6535 );
6536 Directory {
6537 proc: self.proc.clone(),
6538 selection: query,
6539 graphql_client: self.graphql_client.clone(),
6540 }
6541 }
6542}
6543#[derive(Clone)]
6544pub struct Engine {
6545 pub proc: Option<Arc<DaggerSessionProc>>,
6546 pub selection: Selection,
6547 pub graphql_client: DynGraphQLClient,
6548}
6549impl Engine {
6550 pub async fn clients(&self) -> Result<Vec<String>, DaggerError> {
6552 let query = self.selection.select("clients");
6553 query.execute(self.graphql_client.clone()).await
6554 }
6555 pub async fn id(&self) -> Result<EngineId, DaggerError> {
6557 let query = self.selection.select("id");
6558 query.execute(self.graphql_client.clone()).await
6559 }
6560 pub fn local_cache(&self) -> EngineCache {
6562 let query = self.selection.select("localCache");
6563 EngineCache {
6564 proc: self.proc.clone(),
6565 selection: query,
6566 graphql_client: self.graphql_client.clone(),
6567 }
6568 }
6569 pub async fn name(&self) -> Result<String, DaggerError> {
6571 let query = self.selection.select("name");
6572 query.execute(self.graphql_client.clone()).await
6573 }
6574}
6575#[derive(Clone)]
6576pub struct EngineCache {
6577 pub proc: Option<Arc<DaggerSessionProc>>,
6578 pub selection: Selection,
6579 pub graphql_client: DynGraphQLClient,
6580}
6581#[derive(Builder, Debug, PartialEq)]
6582pub struct EngineCacheEntrySetOpts<'a> {
6583 #[builder(setter(into, strip_option), default)]
6584 pub key: Option<&'a str>,
6585}
6586#[derive(Builder, Debug, PartialEq)]
6587pub struct EngineCachePruneOpts {
6588 #[builder(setter(into, strip_option), default)]
6590 pub use_default_policy: Option<bool>,
6591}
6592impl EngineCache {
6593 pub fn entry_set(&self) -> EngineCacheEntrySet {
6599 let query = self.selection.select("entrySet");
6600 EngineCacheEntrySet {
6601 proc: self.proc.clone(),
6602 selection: query,
6603 graphql_client: self.graphql_client.clone(),
6604 }
6605 }
6606 pub fn entry_set_opts<'a>(&self, opts: EngineCacheEntrySetOpts<'a>) -> EngineCacheEntrySet {
6612 let mut query = self.selection.select("entrySet");
6613 if let Some(key) = opts.key {
6614 query = query.arg("key", key);
6615 }
6616 EngineCacheEntrySet {
6617 proc: self.proc.clone(),
6618 selection: query,
6619 graphql_client: self.graphql_client.clone(),
6620 }
6621 }
6622 pub async fn id(&self) -> Result<EngineCacheId, DaggerError> {
6624 let query = self.selection.select("id");
6625 query.execute(self.graphql_client.clone()).await
6626 }
6627 pub async fn max_used_space(&self) -> Result<isize, DaggerError> {
6629 let query = self.selection.select("maxUsedSpace");
6630 query.execute(self.graphql_client.clone()).await
6631 }
6632 pub async fn min_free_space(&self) -> Result<isize, DaggerError> {
6634 let query = self.selection.select("minFreeSpace");
6635 query.execute(self.graphql_client.clone()).await
6636 }
6637 pub async fn prune(&self) -> Result<Void, DaggerError> {
6643 let query = self.selection.select("prune");
6644 query.execute(self.graphql_client.clone()).await
6645 }
6646 pub async fn prune_opts(&self, opts: EngineCachePruneOpts) -> Result<Void, DaggerError> {
6652 let mut query = self.selection.select("prune");
6653 if let Some(use_default_policy) = opts.use_default_policy {
6654 query = query.arg("useDefaultPolicy", use_default_policy);
6655 }
6656 query.execute(self.graphql_client.clone()).await
6657 }
6658 pub async fn reserved_space(&self) -> Result<isize, DaggerError> {
6660 let query = self.selection.select("reservedSpace");
6661 query.execute(self.graphql_client.clone()).await
6662 }
6663 pub async fn target_space(&self) -> Result<isize, DaggerError> {
6665 let query = self.selection.select("targetSpace");
6666 query.execute(self.graphql_client.clone()).await
6667 }
6668}
6669#[derive(Clone)]
6670pub struct EngineCacheEntry {
6671 pub proc: Option<Arc<DaggerSessionProc>>,
6672 pub selection: Selection,
6673 pub graphql_client: DynGraphQLClient,
6674}
6675impl EngineCacheEntry {
6676 pub async fn actively_used(&self) -> Result<bool, DaggerError> {
6678 let query = self.selection.select("activelyUsed");
6679 query.execute(self.graphql_client.clone()).await
6680 }
6681 pub async fn created_time_unix_nano(&self) -> Result<isize, DaggerError> {
6683 let query = self.selection.select("createdTimeUnixNano");
6684 query.execute(self.graphql_client.clone()).await
6685 }
6686 pub async fn description(&self) -> Result<String, DaggerError> {
6688 let query = self.selection.select("description");
6689 query.execute(self.graphql_client.clone()).await
6690 }
6691 pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6693 let query = self.selection.select("diskSpaceBytes");
6694 query.execute(self.graphql_client.clone()).await
6695 }
6696 pub async fn id(&self) -> Result<EngineCacheEntryId, DaggerError> {
6698 let query = self.selection.select("id");
6699 query.execute(self.graphql_client.clone()).await
6700 }
6701 pub async fn most_recent_use_time_unix_nano(&self) -> Result<isize, DaggerError> {
6703 let query = self.selection.select("mostRecentUseTimeUnixNano");
6704 query.execute(self.graphql_client.clone()).await
6705 }
6706}
6707#[derive(Clone)]
6708pub struct EngineCacheEntrySet {
6709 pub proc: Option<Arc<DaggerSessionProc>>,
6710 pub selection: Selection,
6711 pub graphql_client: DynGraphQLClient,
6712}
6713impl EngineCacheEntrySet {
6714 pub async fn disk_space_bytes(&self) -> Result<isize, DaggerError> {
6716 let query = self.selection.select("diskSpaceBytes");
6717 query.execute(self.graphql_client.clone()).await
6718 }
6719 pub fn entries(&self) -> Vec<EngineCacheEntry> {
6721 let query = self.selection.select("entries");
6722 vec![EngineCacheEntry {
6723 proc: self.proc.clone(),
6724 selection: query,
6725 graphql_client: self.graphql_client.clone(),
6726 }]
6727 }
6728 pub async fn entry_count(&self) -> Result<isize, DaggerError> {
6730 let query = self.selection.select("entryCount");
6731 query.execute(self.graphql_client.clone()).await
6732 }
6733 pub async fn id(&self) -> Result<EngineCacheEntrySetId, DaggerError> {
6735 let query = self.selection.select("id");
6736 query.execute(self.graphql_client.clone()).await
6737 }
6738}
6739#[derive(Clone)]
6740pub struct EnumTypeDef {
6741 pub proc: Option<Arc<DaggerSessionProc>>,
6742 pub selection: Selection,
6743 pub graphql_client: DynGraphQLClient,
6744}
6745impl EnumTypeDef {
6746 pub async fn description(&self) -> Result<String, DaggerError> {
6748 let query = self.selection.select("description");
6749 query.execute(self.graphql_client.clone()).await
6750 }
6751 pub async fn id(&self) -> Result<EnumTypeDefId, DaggerError> {
6753 let query = self.selection.select("id");
6754 query.execute(self.graphql_client.clone()).await
6755 }
6756 pub fn members(&self) -> Vec<EnumValueTypeDef> {
6758 let query = self.selection.select("members");
6759 vec![EnumValueTypeDef {
6760 proc: self.proc.clone(),
6761 selection: query,
6762 graphql_client: self.graphql_client.clone(),
6763 }]
6764 }
6765 pub async fn name(&self) -> Result<String, DaggerError> {
6767 let query = self.selection.select("name");
6768 query.execute(self.graphql_client.clone()).await
6769 }
6770 pub fn source_map(&self) -> SourceMap {
6772 let query = self.selection.select("sourceMap");
6773 SourceMap {
6774 proc: self.proc.clone(),
6775 selection: query,
6776 graphql_client: self.graphql_client.clone(),
6777 }
6778 }
6779 pub async fn source_module_name(&self) -> Result<String, DaggerError> {
6781 let query = self.selection.select("sourceModuleName");
6782 query.execute(self.graphql_client.clone()).await
6783 }
6784 pub fn values(&self) -> Vec<EnumValueTypeDef> {
6785 let query = self.selection.select("values");
6786 vec![EnumValueTypeDef {
6787 proc: self.proc.clone(),
6788 selection: query,
6789 graphql_client: self.graphql_client.clone(),
6790 }]
6791 }
6792}
6793#[derive(Clone)]
6794pub struct EnumValueTypeDef {
6795 pub proc: Option<Arc<DaggerSessionProc>>,
6796 pub selection: Selection,
6797 pub graphql_client: DynGraphQLClient,
6798}
6799impl EnumValueTypeDef {
6800 pub async fn deprecated(&self) -> Result<String, DaggerError> {
6802 let query = self.selection.select("deprecated");
6803 query.execute(self.graphql_client.clone()).await
6804 }
6805 pub async fn description(&self) -> Result<String, DaggerError> {
6807 let query = self.selection.select("description");
6808 query.execute(self.graphql_client.clone()).await
6809 }
6810 pub async fn id(&self) -> Result<EnumValueTypeDefId, DaggerError> {
6812 let query = self.selection.select("id");
6813 query.execute(self.graphql_client.clone()).await
6814 }
6815 pub async fn name(&self) -> Result<String, DaggerError> {
6817 let query = self.selection.select("name");
6818 query.execute(self.graphql_client.clone()).await
6819 }
6820 pub fn source_map(&self) -> SourceMap {
6822 let query = self.selection.select("sourceMap");
6823 SourceMap {
6824 proc: self.proc.clone(),
6825 selection: query,
6826 graphql_client: self.graphql_client.clone(),
6827 }
6828 }
6829 pub async fn value(&self) -> Result<String, DaggerError> {
6831 let query = self.selection.select("value");
6832 query.execute(self.graphql_client.clone()).await
6833 }
6834}
6835#[derive(Clone)]
6836pub struct Env {
6837 pub proc: Option<Arc<DaggerSessionProc>>,
6838 pub selection: Selection,
6839 pub graphql_client: DynGraphQLClient,
6840}
6841#[derive(Builder, Debug, PartialEq)]
6842pub struct EnvChecksOpts<'a> {
6843 #[builder(setter(into, strip_option), default)]
6845 pub include: Option<Vec<&'a str>>,
6846}
6847impl Env {
6848 pub fn check(&self, name: impl Into<String>) -> Check {
6854 let mut query = self.selection.select("check");
6855 query = query.arg("name", name.into());
6856 Check {
6857 proc: self.proc.clone(),
6858 selection: query,
6859 graphql_client: self.graphql_client.clone(),
6860 }
6861 }
6862 pub fn checks(&self) -> CheckGroup {
6868 let query = self.selection.select("checks");
6869 CheckGroup {
6870 proc: self.proc.clone(),
6871 selection: query,
6872 graphql_client: self.graphql_client.clone(),
6873 }
6874 }
6875 pub fn checks_opts<'a>(&self, opts: EnvChecksOpts<'a>) -> CheckGroup {
6881 let mut query = self.selection.select("checks");
6882 if let Some(include) = opts.include {
6883 query = query.arg("include", include);
6884 }
6885 CheckGroup {
6886 proc: self.proc.clone(),
6887 selection: query,
6888 graphql_client: self.graphql_client.clone(),
6889 }
6890 }
6891 pub async fn id(&self) -> Result<EnvId, DaggerError> {
6893 let query = self.selection.select("id");
6894 query.execute(self.graphql_client.clone()).await
6895 }
6896 pub fn input(&self, name: impl Into<String>) -> Binding {
6898 let mut query = self.selection.select("input");
6899 query = query.arg("name", name.into());
6900 Binding {
6901 proc: self.proc.clone(),
6902 selection: query,
6903 graphql_client: self.graphql_client.clone(),
6904 }
6905 }
6906 pub fn inputs(&self) -> Vec<Binding> {
6908 let query = self.selection.select("inputs");
6909 vec![Binding {
6910 proc: self.proc.clone(),
6911 selection: query,
6912 graphql_client: self.graphql_client.clone(),
6913 }]
6914 }
6915 pub fn output(&self, name: impl Into<String>) -> Binding {
6917 let mut query = self.selection.select("output");
6918 query = query.arg("name", name.into());
6919 Binding {
6920 proc: self.proc.clone(),
6921 selection: query,
6922 graphql_client: self.graphql_client.clone(),
6923 }
6924 }
6925 pub fn outputs(&self) -> Vec<Binding> {
6927 let query = self.selection.select("outputs");
6928 vec![Binding {
6929 proc: self.proc.clone(),
6930 selection: query,
6931 graphql_client: self.graphql_client.clone(),
6932 }]
6933 }
6934 pub fn with_address_input(
6942 &self,
6943 name: impl Into<String>,
6944 value: impl IntoID<AddressId>,
6945 description: impl Into<String>,
6946 ) -> Env {
6947 let mut query = self.selection.select("withAddressInput");
6948 query = query.arg("name", name.into());
6949 query = query.arg_lazy(
6950 "value",
6951 Box::new(move || {
6952 let value = value.clone();
6953 Box::pin(async move { value.into_id().await.unwrap().quote() })
6954 }),
6955 );
6956 query = query.arg("description", description.into());
6957 Env {
6958 proc: self.proc.clone(),
6959 selection: query,
6960 graphql_client: self.graphql_client.clone(),
6961 }
6962 }
6963 pub fn with_address_output(
6970 &self,
6971 name: impl Into<String>,
6972 description: impl Into<String>,
6973 ) -> Env {
6974 let mut query = self.selection.select("withAddressOutput");
6975 query = query.arg("name", name.into());
6976 query = query.arg("description", description.into());
6977 Env {
6978 proc: self.proc.clone(),
6979 selection: query,
6980 graphql_client: self.graphql_client.clone(),
6981 }
6982 }
6983 pub fn with_cache_volume_input(
6991 &self,
6992 name: impl Into<String>,
6993 value: impl IntoID<CacheVolumeId>,
6994 description: impl Into<String>,
6995 ) -> Env {
6996 let mut query = self.selection.select("withCacheVolumeInput");
6997 query = query.arg("name", name.into());
6998 query = query.arg_lazy(
6999 "value",
7000 Box::new(move || {
7001 let value = value.clone();
7002 Box::pin(async move { value.into_id().await.unwrap().quote() })
7003 }),
7004 );
7005 query = query.arg("description", description.into());
7006 Env {
7007 proc: self.proc.clone(),
7008 selection: query,
7009 graphql_client: self.graphql_client.clone(),
7010 }
7011 }
7012 pub fn with_cache_volume_output(
7019 &self,
7020 name: impl Into<String>,
7021 description: impl Into<String>,
7022 ) -> Env {
7023 let mut query = self.selection.select("withCacheVolumeOutput");
7024 query = query.arg("name", name.into());
7025 query = query.arg("description", description.into());
7026 Env {
7027 proc: self.proc.clone(),
7028 selection: query,
7029 graphql_client: self.graphql_client.clone(),
7030 }
7031 }
7032 pub fn with_changeset_input(
7040 &self,
7041 name: impl Into<String>,
7042 value: impl IntoID<ChangesetId>,
7043 description: impl Into<String>,
7044 ) -> Env {
7045 let mut query = self.selection.select("withChangesetInput");
7046 query = query.arg("name", name.into());
7047 query = query.arg_lazy(
7048 "value",
7049 Box::new(move || {
7050 let value = value.clone();
7051 Box::pin(async move { value.into_id().await.unwrap().quote() })
7052 }),
7053 );
7054 query = query.arg("description", description.into());
7055 Env {
7056 proc: self.proc.clone(),
7057 selection: query,
7058 graphql_client: self.graphql_client.clone(),
7059 }
7060 }
7061 pub fn with_changeset_output(
7068 &self,
7069 name: impl Into<String>,
7070 description: impl Into<String>,
7071 ) -> Env {
7072 let mut query = self.selection.select("withChangesetOutput");
7073 query = query.arg("name", name.into());
7074 query = query.arg("description", description.into());
7075 Env {
7076 proc: self.proc.clone(),
7077 selection: query,
7078 graphql_client: self.graphql_client.clone(),
7079 }
7080 }
7081 pub fn with_check_group_input(
7089 &self,
7090 name: impl Into<String>,
7091 value: impl IntoID<CheckGroupId>,
7092 description: impl Into<String>,
7093 ) -> Env {
7094 let mut query = self.selection.select("withCheckGroupInput");
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 query = query.arg("description", description.into());
7104 Env {
7105 proc: self.proc.clone(),
7106 selection: query,
7107 graphql_client: self.graphql_client.clone(),
7108 }
7109 }
7110 pub fn with_check_group_output(
7117 &self,
7118 name: impl Into<String>,
7119 description: impl Into<String>,
7120 ) -> Env {
7121 let mut query = self.selection.select("withCheckGroupOutput");
7122 query = query.arg("name", name.into());
7123 query = query.arg("description", description.into());
7124 Env {
7125 proc: self.proc.clone(),
7126 selection: query,
7127 graphql_client: self.graphql_client.clone(),
7128 }
7129 }
7130 pub fn with_check_input(
7138 &self,
7139 name: impl Into<String>,
7140 value: impl IntoID<CheckId>,
7141 description: impl Into<String>,
7142 ) -> Env {
7143 let mut query = self.selection.select("withCheckInput");
7144 query = query.arg("name", name.into());
7145 query = query.arg_lazy(
7146 "value",
7147 Box::new(move || {
7148 let value = value.clone();
7149 Box::pin(async move { value.into_id().await.unwrap().quote() })
7150 }),
7151 );
7152 query = query.arg("description", description.into());
7153 Env {
7154 proc: self.proc.clone(),
7155 selection: query,
7156 graphql_client: self.graphql_client.clone(),
7157 }
7158 }
7159 pub fn with_check_output(
7166 &self,
7167 name: impl Into<String>,
7168 description: impl Into<String>,
7169 ) -> Env {
7170 let mut query = self.selection.select("withCheckOutput");
7171 query = query.arg("name", name.into());
7172 query = query.arg("description", description.into());
7173 Env {
7174 proc: self.proc.clone(),
7175 selection: query,
7176 graphql_client: self.graphql_client.clone(),
7177 }
7178 }
7179 pub fn with_cloud_input(
7187 &self,
7188 name: impl Into<String>,
7189 value: impl IntoID<CloudId>,
7190 description: impl Into<String>,
7191 ) -> Env {
7192 let mut query = self.selection.select("withCloudInput");
7193 query = query.arg("name", name.into());
7194 query = query.arg_lazy(
7195 "value",
7196 Box::new(move || {
7197 let value = value.clone();
7198 Box::pin(async move { value.into_id().await.unwrap().quote() })
7199 }),
7200 );
7201 query = query.arg("description", description.into());
7202 Env {
7203 proc: self.proc.clone(),
7204 selection: query,
7205 graphql_client: self.graphql_client.clone(),
7206 }
7207 }
7208 pub fn with_cloud_output(
7215 &self,
7216 name: impl Into<String>,
7217 description: impl Into<String>,
7218 ) -> Env {
7219 let mut query = self.selection.select("withCloudOutput");
7220 query = query.arg("name", name.into());
7221 query = query.arg("description", description.into());
7222 Env {
7223 proc: self.proc.clone(),
7224 selection: query,
7225 graphql_client: self.graphql_client.clone(),
7226 }
7227 }
7228 pub fn with_container_input(
7236 &self,
7237 name: impl Into<String>,
7238 value: impl IntoID<ContainerId>,
7239 description: impl Into<String>,
7240 ) -> Env {
7241 let mut query = self.selection.select("withContainerInput");
7242 query = query.arg("name", name.into());
7243 query = query.arg_lazy(
7244 "value",
7245 Box::new(move || {
7246 let value = value.clone();
7247 Box::pin(async move { value.into_id().await.unwrap().quote() })
7248 }),
7249 );
7250 query = query.arg("description", description.into());
7251 Env {
7252 proc: self.proc.clone(),
7253 selection: query,
7254 graphql_client: self.graphql_client.clone(),
7255 }
7256 }
7257 pub fn with_container_output(
7264 &self,
7265 name: impl Into<String>,
7266 description: impl Into<String>,
7267 ) -> Env {
7268 let mut query = self.selection.select("withContainerOutput");
7269 query = query.arg("name", name.into());
7270 query = query.arg("description", description.into());
7271 Env {
7272 proc: self.proc.clone(),
7273 selection: query,
7274 graphql_client: self.graphql_client.clone(),
7275 }
7276 }
7277 pub fn with_current_module(&self) -> Env {
7280 let query = self.selection.select("withCurrentModule");
7281 Env {
7282 proc: self.proc.clone(),
7283 selection: query,
7284 graphql_client: self.graphql_client.clone(),
7285 }
7286 }
7287 pub fn with_directory_input(
7295 &self,
7296 name: impl Into<String>,
7297 value: impl IntoID<DirectoryId>,
7298 description: impl Into<String>,
7299 ) -> Env {
7300 let mut query = self.selection.select("withDirectoryInput");
7301 query = query.arg("name", name.into());
7302 query = query.arg_lazy(
7303 "value",
7304 Box::new(move || {
7305 let value = value.clone();
7306 Box::pin(async move { value.into_id().await.unwrap().quote() })
7307 }),
7308 );
7309 query = query.arg("description", description.into());
7310 Env {
7311 proc: self.proc.clone(),
7312 selection: query,
7313 graphql_client: self.graphql_client.clone(),
7314 }
7315 }
7316 pub fn with_directory_output(
7323 &self,
7324 name: impl Into<String>,
7325 description: impl Into<String>,
7326 ) -> Env {
7327 let mut query = self.selection.select("withDirectoryOutput");
7328 query = query.arg("name", name.into());
7329 query = query.arg("description", description.into());
7330 Env {
7331 proc: self.proc.clone(),
7332 selection: query,
7333 graphql_client: self.graphql_client.clone(),
7334 }
7335 }
7336 pub fn with_env_file_input(
7344 &self,
7345 name: impl Into<String>,
7346 value: impl IntoID<EnvFileId>,
7347 description: impl Into<String>,
7348 ) -> Env {
7349 let mut query = self.selection.select("withEnvFileInput");
7350 query = query.arg("name", name.into());
7351 query = query.arg_lazy(
7352 "value",
7353 Box::new(move || {
7354 let value = value.clone();
7355 Box::pin(async move { value.into_id().await.unwrap().quote() })
7356 }),
7357 );
7358 query = query.arg("description", description.into());
7359 Env {
7360 proc: self.proc.clone(),
7361 selection: query,
7362 graphql_client: self.graphql_client.clone(),
7363 }
7364 }
7365 pub fn with_env_file_output(
7372 &self,
7373 name: impl Into<String>,
7374 description: impl Into<String>,
7375 ) -> Env {
7376 let mut query = self.selection.select("withEnvFileOutput");
7377 query = query.arg("name", name.into());
7378 query = query.arg("description", description.into());
7379 Env {
7380 proc: self.proc.clone(),
7381 selection: query,
7382 graphql_client: self.graphql_client.clone(),
7383 }
7384 }
7385 pub fn with_env_input(
7393 &self,
7394 name: impl Into<String>,
7395 value: impl IntoID<EnvId>,
7396 description: impl Into<String>,
7397 ) -> Env {
7398 let mut query = self.selection.select("withEnvInput");
7399 query = query.arg("name", name.into());
7400 query = query.arg_lazy(
7401 "value",
7402 Box::new(move || {
7403 let value = value.clone();
7404 Box::pin(async move { value.into_id().await.unwrap().quote() })
7405 }),
7406 );
7407 query = query.arg("description", description.into());
7408 Env {
7409 proc: self.proc.clone(),
7410 selection: query,
7411 graphql_client: self.graphql_client.clone(),
7412 }
7413 }
7414 pub fn with_env_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
7421 let mut query = self.selection.select("withEnvOutput");
7422 query = query.arg("name", name.into());
7423 query = query.arg("description", description.into());
7424 Env {
7425 proc: self.proc.clone(),
7426 selection: query,
7427 graphql_client: self.graphql_client.clone(),
7428 }
7429 }
7430 pub fn with_file_input(
7438 &self,
7439 name: impl Into<String>,
7440 value: impl IntoID<FileId>,
7441 description: impl Into<String>,
7442 ) -> Env {
7443 let mut query = self.selection.select("withFileInput");
7444 query = query.arg("name", name.into());
7445 query = query.arg_lazy(
7446 "value",
7447 Box::new(move || {
7448 let value = value.clone();
7449 Box::pin(async move { value.into_id().await.unwrap().quote() })
7450 }),
7451 );
7452 query = query.arg("description", description.into());
7453 Env {
7454 proc: self.proc.clone(),
7455 selection: query,
7456 graphql_client: self.graphql_client.clone(),
7457 }
7458 }
7459 pub fn with_file_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
7466 let mut query = self.selection.select("withFileOutput");
7467 query = query.arg("name", name.into());
7468 query = query.arg("description", description.into());
7469 Env {
7470 proc: self.proc.clone(),
7471 selection: query,
7472 graphql_client: self.graphql_client.clone(),
7473 }
7474 }
7475 pub fn with_generator_group_input(
7483 &self,
7484 name: impl Into<String>,
7485 value: impl IntoID<GeneratorGroupId>,
7486 description: impl Into<String>,
7487 ) -> Env {
7488 let mut query = self.selection.select("withGeneratorGroupInput");
7489 query = query.arg("name", name.into());
7490 query = query.arg_lazy(
7491 "value",
7492 Box::new(move || {
7493 let value = value.clone();
7494 Box::pin(async move { value.into_id().await.unwrap().quote() })
7495 }),
7496 );
7497 query = query.arg("description", description.into());
7498 Env {
7499 proc: self.proc.clone(),
7500 selection: query,
7501 graphql_client: self.graphql_client.clone(),
7502 }
7503 }
7504 pub fn with_generator_group_output(
7511 &self,
7512 name: impl Into<String>,
7513 description: impl Into<String>,
7514 ) -> Env {
7515 let mut query = self.selection.select("withGeneratorGroupOutput");
7516 query = query.arg("name", name.into());
7517 query = query.arg("description", description.into());
7518 Env {
7519 proc: self.proc.clone(),
7520 selection: query,
7521 graphql_client: self.graphql_client.clone(),
7522 }
7523 }
7524 pub fn with_generator_input(
7532 &self,
7533 name: impl Into<String>,
7534 value: impl IntoID<GeneratorId>,
7535 description: impl Into<String>,
7536 ) -> Env {
7537 let mut query = self.selection.select("withGeneratorInput");
7538 query = query.arg("name", name.into());
7539 query = query.arg_lazy(
7540 "value",
7541 Box::new(move || {
7542 let value = value.clone();
7543 Box::pin(async move { value.into_id().await.unwrap().quote() })
7544 }),
7545 );
7546 query = query.arg("description", description.into());
7547 Env {
7548 proc: self.proc.clone(),
7549 selection: query,
7550 graphql_client: self.graphql_client.clone(),
7551 }
7552 }
7553 pub fn with_generator_output(
7560 &self,
7561 name: impl Into<String>,
7562 description: impl Into<String>,
7563 ) -> Env {
7564 let mut query = self.selection.select("withGeneratorOutput");
7565 query = query.arg("name", name.into());
7566 query = query.arg("description", description.into());
7567 Env {
7568 proc: self.proc.clone(),
7569 selection: query,
7570 graphql_client: self.graphql_client.clone(),
7571 }
7572 }
7573 pub fn with_git_ref_input(
7581 &self,
7582 name: impl Into<String>,
7583 value: impl IntoID<GitRefId>,
7584 description: impl Into<String>,
7585 ) -> Env {
7586 let mut query = self.selection.select("withGitRefInput");
7587 query = query.arg("name", name.into());
7588 query = query.arg_lazy(
7589 "value",
7590 Box::new(move || {
7591 let value = value.clone();
7592 Box::pin(async move { value.into_id().await.unwrap().quote() })
7593 }),
7594 );
7595 query = query.arg("description", description.into());
7596 Env {
7597 proc: self.proc.clone(),
7598 selection: query,
7599 graphql_client: self.graphql_client.clone(),
7600 }
7601 }
7602 pub fn with_git_ref_output(
7609 &self,
7610 name: impl Into<String>,
7611 description: impl Into<String>,
7612 ) -> Env {
7613 let mut query = self.selection.select("withGitRefOutput");
7614 query = query.arg("name", name.into());
7615 query = query.arg("description", description.into());
7616 Env {
7617 proc: self.proc.clone(),
7618 selection: query,
7619 graphql_client: self.graphql_client.clone(),
7620 }
7621 }
7622 pub fn with_git_repository_input(
7630 &self,
7631 name: impl Into<String>,
7632 value: impl IntoID<GitRepositoryId>,
7633 description: impl Into<String>,
7634 ) -> Env {
7635 let mut query = self.selection.select("withGitRepositoryInput");
7636 query = query.arg("name", name.into());
7637 query = query.arg_lazy(
7638 "value",
7639 Box::new(move || {
7640 let value = value.clone();
7641 Box::pin(async move { value.into_id().await.unwrap().quote() })
7642 }),
7643 );
7644 query = query.arg("description", description.into());
7645 Env {
7646 proc: self.proc.clone(),
7647 selection: query,
7648 graphql_client: self.graphql_client.clone(),
7649 }
7650 }
7651 pub fn with_git_repository_output(
7658 &self,
7659 name: impl Into<String>,
7660 description: impl Into<String>,
7661 ) -> Env {
7662 let mut query = self.selection.select("withGitRepositoryOutput");
7663 query = query.arg("name", name.into());
7664 query = query.arg("description", description.into());
7665 Env {
7666 proc: self.proc.clone(),
7667 selection: query,
7668 graphql_client: self.graphql_client.clone(),
7669 }
7670 }
7671 pub fn with_json_value_input(
7679 &self,
7680 name: impl Into<String>,
7681 value: impl IntoID<JsonValueId>,
7682 description: impl Into<String>,
7683 ) -> Env {
7684 let mut query = self.selection.select("withJSONValueInput");
7685 query = query.arg("name", name.into());
7686 query = query.arg_lazy(
7687 "value",
7688 Box::new(move || {
7689 let value = value.clone();
7690 Box::pin(async move { value.into_id().await.unwrap().quote() })
7691 }),
7692 );
7693 query = query.arg("description", description.into());
7694 Env {
7695 proc: self.proc.clone(),
7696 selection: query,
7697 graphql_client: self.graphql_client.clone(),
7698 }
7699 }
7700 pub fn with_json_value_output(
7707 &self,
7708 name: impl Into<String>,
7709 description: impl Into<String>,
7710 ) -> Env {
7711 let mut query = self.selection.select("withJSONValueOutput");
7712 query = query.arg("name", name.into());
7713 query = query.arg("description", description.into());
7714 Env {
7715 proc: self.proc.clone(),
7716 selection: query,
7717 graphql_client: self.graphql_client.clone(),
7718 }
7719 }
7720 pub fn with_main_module(&self, module: impl IntoID<ModuleId>) -> Env {
7723 let mut query = self.selection.select("withMainModule");
7724 query = query.arg_lazy(
7725 "module",
7726 Box::new(move || {
7727 let module = module.clone();
7728 Box::pin(async move { module.into_id().await.unwrap().quote() })
7729 }),
7730 );
7731 Env {
7732 proc: self.proc.clone(),
7733 selection: query,
7734 graphql_client: self.graphql_client.clone(),
7735 }
7736 }
7737 pub fn with_module(&self, module: impl IntoID<ModuleId>) -> Env {
7740 let mut query = self.selection.select("withModule");
7741 query = query.arg_lazy(
7742 "module",
7743 Box::new(move || {
7744 let module = module.clone();
7745 Box::pin(async move { module.into_id().await.unwrap().quote() })
7746 }),
7747 );
7748 Env {
7749 proc: self.proc.clone(),
7750 selection: query,
7751 graphql_client: self.graphql_client.clone(),
7752 }
7753 }
7754 pub fn with_module_config_client_input(
7762 &self,
7763 name: impl Into<String>,
7764 value: impl IntoID<ModuleConfigClientId>,
7765 description: impl Into<String>,
7766 ) -> Env {
7767 let mut query = self.selection.select("withModuleConfigClientInput");
7768 query = query.arg("name", name.into());
7769 query = query.arg_lazy(
7770 "value",
7771 Box::new(move || {
7772 let value = value.clone();
7773 Box::pin(async move { value.into_id().await.unwrap().quote() })
7774 }),
7775 );
7776 query = query.arg("description", description.into());
7777 Env {
7778 proc: self.proc.clone(),
7779 selection: query,
7780 graphql_client: self.graphql_client.clone(),
7781 }
7782 }
7783 pub fn with_module_config_client_output(
7790 &self,
7791 name: impl Into<String>,
7792 description: impl Into<String>,
7793 ) -> Env {
7794 let mut query = self.selection.select("withModuleConfigClientOutput");
7795 query = query.arg("name", name.into());
7796 query = query.arg("description", description.into());
7797 Env {
7798 proc: self.proc.clone(),
7799 selection: query,
7800 graphql_client: self.graphql_client.clone(),
7801 }
7802 }
7803 pub fn with_module_input(
7811 &self,
7812 name: impl Into<String>,
7813 value: impl IntoID<ModuleId>,
7814 description: impl Into<String>,
7815 ) -> Env {
7816 let mut query = self.selection.select("withModuleInput");
7817 query = query.arg("name", name.into());
7818 query = query.arg_lazy(
7819 "value",
7820 Box::new(move || {
7821 let value = value.clone();
7822 Box::pin(async move { value.into_id().await.unwrap().quote() })
7823 }),
7824 );
7825 query = query.arg("description", description.into());
7826 Env {
7827 proc: self.proc.clone(),
7828 selection: query,
7829 graphql_client: self.graphql_client.clone(),
7830 }
7831 }
7832 pub fn with_module_output(
7839 &self,
7840 name: impl Into<String>,
7841 description: impl Into<String>,
7842 ) -> Env {
7843 let mut query = self.selection.select("withModuleOutput");
7844 query = query.arg("name", name.into());
7845 query = query.arg("description", description.into());
7846 Env {
7847 proc: self.proc.clone(),
7848 selection: query,
7849 graphql_client: self.graphql_client.clone(),
7850 }
7851 }
7852 pub fn with_module_source_input(
7860 &self,
7861 name: impl Into<String>,
7862 value: impl IntoID<ModuleSourceId>,
7863 description: impl Into<String>,
7864 ) -> Env {
7865 let mut query = self.selection.select("withModuleSourceInput");
7866 query = query.arg("name", name.into());
7867 query = query.arg_lazy(
7868 "value",
7869 Box::new(move || {
7870 let value = value.clone();
7871 Box::pin(async move { value.into_id().await.unwrap().quote() })
7872 }),
7873 );
7874 query = query.arg("description", description.into());
7875 Env {
7876 proc: self.proc.clone(),
7877 selection: query,
7878 graphql_client: self.graphql_client.clone(),
7879 }
7880 }
7881 pub fn with_module_source_output(
7888 &self,
7889 name: impl Into<String>,
7890 description: impl Into<String>,
7891 ) -> Env {
7892 let mut query = self.selection.select("withModuleSourceOutput");
7893 query = query.arg("name", name.into());
7894 query = query.arg("description", description.into());
7895 Env {
7896 proc: self.proc.clone(),
7897 selection: query,
7898 graphql_client: self.graphql_client.clone(),
7899 }
7900 }
7901 pub fn with_search_result_input(
7909 &self,
7910 name: impl Into<String>,
7911 value: impl IntoID<SearchResultId>,
7912 description: impl Into<String>,
7913 ) -> Env {
7914 let mut query = self.selection.select("withSearchResultInput");
7915 query = query.arg("name", name.into());
7916 query = query.arg_lazy(
7917 "value",
7918 Box::new(move || {
7919 let value = value.clone();
7920 Box::pin(async move { value.into_id().await.unwrap().quote() })
7921 }),
7922 );
7923 query = query.arg("description", description.into());
7924 Env {
7925 proc: self.proc.clone(),
7926 selection: query,
7927 graphql_client: self.graphql_client.clone(),
7928 }
7929 }
7930 pub fn with_search_result_output(
7937 &self,
7938 name: impl Into<String>,
7939 description: impl Into<String>,
7940 ) -> Env {
7941 let mut query = self.selection.select("withSearchResultOutput");
7942 query = query.arg("name", name.into());
7943 query = query.arg("description", description.into());
7944 Env {
7945 proc: self.proc.clone(),
7946 selection: query,
7947 graphql_client: self.graphql_client.clone(),
7948 }
7949 }
7950 pub fn with_search_submatch_input(
7958 &self,
7959 name: impl Into<String>,
7960 value: impl IntoID<SearchSubmatchId>,
7961 description: impl Into<String>,
7962 ) -> Env {
7963 let mut query = self.selection.select("withSearchSubmatchInput");
7964 query = query.arg("name", name.into());
7965 query = query.arg_lazy(
7966 "value",
7967 Box::new(move || {
7968 let value = value.clone();
7969 Box::pin(async move { value.into_id().await.unwrap().quote() })
7970 }),
7971 );
7972 query = query.arg("description", description.into());
7973 Env {
7974 proc: self.proc.clone(),
7975 selection: query,
7976 graphql_client: self.graphql_client.clone(),
7977 }
7978 }
7979 pub fn with_search_submatch_output(
7986 &self,
7987 name: impl Into<String>,
7988 description: impl Into<String>,
7989 ) -> Env {
7990 let mut query = self.selection.select("withSearchSubmatchOutput");
7991 query = query.arg("name", name.into());
7992 query = query.arg("description", description.into());
7993 Env {
7994 proc: self.proc.clone(),
7995 selection: query,
7996 graphql_client: self.graphql_client.clone(),
7997 }
7998 }
7999 pub fn with_secret_input(
8007 &self,
8008 name: impl Into<String>,
8009 value: impl IntoID<SecretId>,
8010 description: impl Into<String>,
8011 ) -> Env {
8012 let mut query = self.selection.select("withSecretInput");
8013 query = query.arg("name", name.into());
8014 query = query.arg_lazy(
8015 "value",
8016 Box::new(move || {
8017 let value = value.clone();
8018 Box::pin(async move { value.into_id().await.unwrap().quote() })
8019 }),
8020 );
8021 query = query.arg("description", description.into());
8022 Env {
8023 proc: self.proc.clone(),
8024 selection: query,
8025 graphql_client: self.graphql_client.clone(),
8026 }
8027 }
8028 pub fn with_secret_output(
8035 &self,
8036 name: impl Into<String>,
8037 description: impl Into<String>,
8038 ) -> Env {
8039 let mut query = self.selection.select("withSecretOutput");
8040 query = query.arg("name", name.into());
8041 query = query.arg("description", description.into());
8042 Env {
8043 proc: self.proc.clone(),
8044 selection: query,
8045 graphql_client: self.graphql_client.clone(),
8046 }
8047 }
8048 pub fn with_service_input(
8056 &self,
8057 name: impl Into<String>,
8058 value: impl IntoID<ServiceId>,
8059 description: impl Into<String>,
8060 ) -> Env {
8061 let mut query = self.selection.select("withServiceInput");
8062 query = query.arg("name", name.into());
8063 query = query.arg_lazy(
8064 "value",
8065 Box::new(move || {
8066 let value = value.clone();
8067 Box::pin(async move { value.into_id().await.unwrap().quote() })
8068 }),
8069 );
8070 query = query.arg("description", description.into());
8071 Env {
8072 proc: self.proc.clone(),
8073 selection: query,
8074 graphql_client: self.graphql_client.clone(),
8075 }
8076 }
8077 pub fn with_service_output(
8084 &self,
8085 name: impl Into<String>,
8086 description: impl Into<String>,
8087 ) -> Env {
8088 let mut query = self.selection.select("withServiceOutput");
8089 query = query.arg("name", name.into());
8090 query = query.arg("description", description.into());
8091 Env {
8092 proc: self.proc.clone(),
8093 selection: query,
8094 graphql_client: self.graphql_client.clone(),
8095 }
8096 }
8097 pub fn with_socket_input(
8105 &self,
8106 name: impl Into<String>,
8107 value: impl IntoID<SocketId>,
8108 description: impl Into<String>,
8109 ) -> Env {
8110 let mut query = self.selection.select("withSocketInput");
8111 query = query.arg("name", name.into());
8112 query = query.arg_lazy(
8113 "value",
8114 Box::new(move || {
8115 let value = value.clone();
8116 Box::pin(async move { value.into_id().await.unwrap().quote() })
8117 }),
8118 );
8119 query = query.arg("description", description.into());
8120 Env {
8121 proc: self.proc.clone(),
8122 selection: query,
8123 graphql_client: self.graphql_client.clone(),
8124 }
8125 }
8126 pub fn with_socket_output(
8133 &self,
8134 name: impl Into<String>,
8135 description: impl Into<String>,
8136 ) -> Env {
8137 let mut query = self.selection.select("withSocketOutput");
8138 query = query.arg("name", name.into());
8139 query = query.arg("description", description.into());
8140 Env {
8141 proc: self.proc.clone(),
8142 selection: query,
8143 graphql_client: self.graphql_client.clone(),
8144 }
8145 }
8146 pub fn with_stat_input(
8154 &self,
8155 name: impl Into<String>,
8156 value: impl IntoID<StatId>,
8157 description: impl Into<String>,
8158 ) -> Env {
8159 let mut query = self.selection.select("withStatInput");
8160 query = query.arg("name", name.into());
8161 query = query.arg_lazy(
8162 "value",
8163 Box::new(move || {
8164 let value = value.clone();
8165 Box::pin(async move { value.into_id().await.unwrap().quote() })
8166 }),
8167 );
8168 query = query.arg("description", description.into());
8169 Env {
8170 proc: self.proc.clone(),
8171 selection: query,
8172 graphql_client: self.graphql_client.clone(),
8173 }
8174 }
8175 pub fn with_stat_output(&self, name: impl Into<String>, description: impl Into<String>) -> Env {
8182 let mut query = self.selection.select("withStatOutput");
8183 query = query.arg("name", name.into());
8184 query = query.arg("description", description.into());
8185 Env {
8186 proc: self.proc.clone(),
8187 selection: query,
8188 graphql_client: self.graphql_client.clone(),
8189 }
8190 }
8191 pub fn with_string_input(
8199 &self,
8200 name: impl Into<String>,
8201 value: impl Into<String>,
8202 description: impl Into<String>,
8203 ) -> Env {
8204 let mut query = self.selection.select("withStringInput");
8205 query = query.arg("name", name.into());
8206 query = query.arg("value", value.into());
8207 query = query.arg("description", description.into());
8208 Env {
8209 proc: self.proc.clone(),
8210 selection: query,
8211 graphql_client: self.graphql_client.clone(),
8212 }
8213 }
8214 pub fn with_string_output(
8221 &self,
8222 name: impl Into<String>,
8223 description: impl Into<String>,
8224 ) -> Env {
8225 let mut query = self.selection.select("withStringOutput");
8226 query = query.arg("name", name.into());
8227 query = query.arg("description", description.into());
8228 Env {
8229 proc: self.proc.clone(),
8230 selection: query,
8231 graphql_client: self.graphql_client.clone(),
8232 }
8233 }
8234 pub fn with_workspace(&self, workspace: impl IntoID<DirectoryId>) -> Env {
8240 let mut query = self.selection.select("withWorkspace");
8241 query = query.arg_lazy(
8242 "workspace",
8243 Box::new(move || {
8244 let workspace = workspace.clone();
8245 Box::pin(async move { workspace.into_id().await.unwrap().quote() })
8246 }),
8247 );
8248 Env {
8249 proc: self.proc.clone(),
8250 selection: query,
8251 graphql_client: self.graphql_client.clone(),
8252 }
8253 }
8254 pub fn without_outputs(&self) -> Env {
8256 let query = self.selection.select("withoutOutputs");
8257 Env {
8258 proc: self.proc.clone(),
8259 selection: query,
8260 graphql_client: self.graphql_client.clone(),
8261 }
8262 }
8263 pub fn workspace(&self) -> Directory {
8264 let query = self.selection.select("workspace");
8265 Directory {
8266 proc: self.proc.clone(),
8267 selection: query,
8268 graphql_client: self.graphql_client.clone(),
8269 }
8270 }
8271}
8272#[derive(Clone)]
8273pub struct EnvFile {
8274 pub proc: Option<Arc<DaggerSessionProc>>,
8275 pub selection: Selection,
8276 pub graphql_client: DynGraphQLClient,
8277}
8278#[derive(Builder, Debug, PartialEq)]
8279pub struct EnvFileGetOpts {
8280 #[builder(setter(into, strip_option), default)]
8282 pub raw: Option<bool>,
8283}
8284#[derive(Builder, Debug, PartialEq)]
8285pub struct EnvFileVariablesOpts {
8286 #[builder(setter(into, strip_option), default)]
8288 pub raw: Option<bool>,
8289}
8290impl EnvFile {
8291 pub fn as_file(&self) -> File {
8293 let query = self.selection.select("asFile");
8294 File {
8295 proc: self.proc.clone(),
8296 selection: query,
8297 graphql_client: self.graphql_client.clone(),
8298 }
8299 }
8300 pub async fn exists(&self, name: impl Into<String>) -> Result<bool, DaggerError> {
8306 let mut query = self.selection.select("exists");
8307 query = query.arg("name", name.into());
8308 query.execute(self.graphql_client.clone()).await
8309 }
8310 pub async fn get(&self, name: impl Into<String>) -> Result<String, DaggerError> {
8317 let mut query = self.selection.select("get");
8318 query = query.arg("name", name.into());
8319 query.execute(self.graphql_client.clone()).await
8320 }
8321 pub async fn get_opts(
8328 &self,
8329 name: impl Into<String>,
8330 opts: EnvFileGetOpts,
8331 ) -> Result<String, DaggerError> {
8332 let mut query = self.selection.select("get");
8333 query = query.arg("name", name.into());
8334 if let Some(raw) = opts.raw {
8335 query = query.arg("raw", raw);
8336 }
8337 query.execute(self.graphql_client.clone()).await
8338 }
8339 pub async fn id(&self) -> Result<EnvFileId, DaggerError> {
8341 let query = self.selection.select("id");
8342 query.execute(self.graphql_client.clone()).await
8343 }
8344 pub fn namespace(&self, prefix: impl Into<String>) -> EnvFile {
8350 let mut query = self.selection.select("namespace");
8351 query = query.arg("prefix", prefix.into());
8352 EnvFile {
8353 proc: self.proc.clone(),
8354 selection: query,
8355 graphql_client: self.graphql_client.clone(),
8356 }
8357 }
8358 pub fn variables(&self) -> Vec<EnvVariable> {
8364 let query = self.selection.select("variables");
8365 vec![EnvVariable {
8366 proc: self.proc.clone(),
8367 selection: query,
8368 graphql_client: self.graphql_client.clone(),
8369 }]
8370 }
8371 pub fn variables_opts(&self, opts: EnvFileVariablesOpts) -> Vec<EnvVariable> {
8377 let mut query = self.selection.select("variables");
8378 if let Some(raw) = opts.raw {
8379 query = query.arg("raw", raw);
8380 }
8381 vec![EnvVariable {
8382 proc: self.proc.clone(),
8383 selection: query,
8384 graphql_client: self.graphql_client.clone(),
8385 }]
8386 }
8387 pub fn with_variable(&self, name: impl Into<String>, value: impl Into<String>) -> EnvFile {
8394 let mut query = self.selection.select("withVariable");
8395 query = query.arg("name", name.into());
8396 query = query.arg("value", value.into());
8397 EnvFile {
8398 proc: self.proc.clone(),
8399 selection: query,
8400 graphql_client: self.graphql_client.clone(),
8401 }
8402 }
8403 pub fn without_variable(&self, name: impl Into<String>) -> EnvFile {
8409 let mut query = self.selection.select("withoutVariable");
8410 query = query.arg("name", name.into());
8411 EnvFile {
8412 proc: self.proc.clone(),
8413 selection: query,
8414 graphql_client: self.graphql_client.clone(),
8415 }
8416 }
8417}
8418#[derive(Clone)]
8419pub struct EnvVariable {
8420 pub proc: Option<Arc<DaggerSessionProc>>,
8421 pub selection: Selection,
8422 pub graphql_client: DynGraphQLClient,
8423}
8424impl EnvVariable {
8425 pub async fn id(&self) -> Result<EnvVariableId, DaggerError> {
8427 let query = self.selection.select("id");
8428 query.execute(self.graphql_client.clone()).await
8429 }
8430 pub async fn name(&self) -> Result<String, DaggerError> {
8432 let query = self.selection.select("name");
8433 query.execute(self.graphql_client.clone()).await
8434 }
8435 pub async fn value(&self) -> Result<String, DaggerError> {
8437 let query = self.selection.select("value");
8438 query.execute(self.graphql_client.clone()).await
8439 }
8440}
8441#[derive(Clone)]
8442pub struct Error {
8443 pub proc: Option<Arc<DaggerSessionProc>>,
8444 pub selection: Selection,
8445 pub graphql_client: DynGraphQLClient,
8446}
8447impl Error {
8448 pub async fn id(&self) -> Result<ErrorId, DaggerError> {
8450 let query = self.selection.select("id");
8451 query.execute(self.graphql_client.clone()).await
8452 }
8453 pub async fn message(&self) -> Result<String, DaggerError> {
8455 let query = self.selection.select("message");
8456 query.execute(self.graphql_client.clone()).await
8457 }
8458 pub fn values(&self) -> Vec<ErrorValue> {
8460 let query = self.selection.select("values");
8461 vec![ErrorValue {
8462 proc: self.proc.clone(),
8463 selection: query,
8464 graphql_client: self.graphql_client.clone(),
8465 }]
8466 }
8467 pub fn with_value(&self, name: impl Into<String>, value: Json) -> Error {
8474 let mut query = self.selection.select("withValue");
8475 query = query.arg("name", name.into());
8476 query = query.arg("value", value);
8477 Error {
8478 proc: self.proc.clone(),
8479 selection: query,
8480 graphql_client: self.graphql_client.clone(),
8481 }
8482 }
8483}
8484#[derive(Clone)]
8485pub struct ErrorValue {
8486 pub proc: Option<Arc<DaggerSessionProc>>,
8487 pub selection: Selection,
8488 pub graphql_client: DynGraphQLClient,
8489}
8490impl ErrorValue {
8491 pub async fn id(&self) -> Result<ErrorValueId, DaggerError> {
8493 let query = self.selection.select("id");
8494 query.execute(self.graphql_client.clone()).await
8495 }
8496 pub async fn name(&self) -> Result<String, DaggerError> {
8498 let query = self.selection.select("name");
8499 query.execute(self.graphql_client.clone()).await
8500 }
8501 pub async fn value(&self) -> Result<Json, DaggerError> {
8503 let query = self.selection.select("value");
8504 query.execute(self.graphql_client.clone()).await
8505 }
8506}
8507#[derive(Clone)]
8508pub struct FieldTypeDef {
8509 pub proc: Option<Arc<DaggerSessionProc>>,
8510 pub selection: Selection,
8511 pub graphql_client: DynGraphQLClient,
8512}
8513impl FieldTypeDef {
8514 pub async fn deprecated(&self) -> Result<String, DaggerError> {
8516 let query = self.selection.select("deprecated");
8517 query.execute(self.graphql_client.clone()).await
8518 }
8519 pub async fn description(&self) -> Result<String, DaggerError> {
8521 let query = self.selection.select("description");
8522 query.execute(self.graphql_client.clone()).await
8523 }
8524 pub async fn id(&self) -> Result<FieldTypeDefId, DaggerError> {
8526 let query = self.selection.select("id");
8527 query.execute(self.graphql_client.clone()).await
8528 }
8529 pub async fn name(&self) -> Result<String, DaggerError> {
8531 let query = self.selection.select("name");
8532 query.execute(self.graphql_client.clone()).await
8533 }
8534 pub fn source_map(&self) -> SourceMap {
8536 let query = self.selection.select("sourceMap");
8537 SourceMap {
8538 proc: self.proc.clone(),
8539 selection: query,
8540 graphql_client: self.graphql_client.clone(),
8541 }
8542 }
8543 pub fn type_def(&self) -> TypeDef {
8545 let query = self.selection.select("typeDef");
8546 TypeDef {
8547 proc: self.proc.clone(),
8548 selection: query,
8549 graphql_client: self.graphql_client.clone(),
8550 }
8551 }
8552}
8553#[derive(Clone)]
8554pub struct File {
8555 pub proc: Option<Arc<DaggerSessionProc>>,
8556 pub selection: Selection,
8557 pub graphql_client: DynGraphQLClient,
8558}
8559#[derive(Builder, Debug, PartialEq)]
8560pub struct FileAsEnvFileOpts {
8561 #[builder(setter(into, strip_option), default)]
8563 pub expand: Option<bool>,
8564}
8565#[derive(Builder, Debug, PartialEq)]
8566pub struct FileContentsOpts {
8567 #[builder(setter(into, strip_option), default)]
8569 pub limit_lines: Option<isize>,
8570 #[builder(setter(into, strip_option), default)]
8572 pub offset_lines: Option<isize>,
8573}
8574#[derive(Builder, Debug, PartialEq)]
8575pub struct FileDigestOpts {
8576 #[builder(setter(into, strip_option), default)]
8578 pub exclude_metadata: Option<bool>,
8579}
8580#[derive(Builder, Debug, PartialEq)]
8581pub struct FileExportOpts {
8582 #[builder(setter(into, strip_option), default)]
8584 pub allow_parent_dir_path: Option<bool>,
8585}
8586#[derive(Builder, Debug, PartialEq)]
8587pub struct FileSearchOpts<'a> {
8588 #[builder(setter(into, strip_option), default)]
8590 pub dotall: Option<bool>,
8591 #[builder(setter(into, strip_option), default)]
8593 pub files_only: Option<bool>,
8594 #[builder(setter(into, strip_option), default)]
8595 pub globs: Option<Vec<&'a str>>,
8596 #[builder(setter(into, strip_option), default)]
8598 pub insensitive: Option<bool>,
8599 #[builder(setter(into, strip_option), default)]
8601 pub limit: Option<isize>,
8602 #[builder(setter(into, strip_option), default)]
8604 pub literal: Option<bool>,
8605 #[builder(setter(into, strip_option), default)]
8607 pub multiline: Option<bool>,
8608 #[builder(setter(into, strip_option), default)]
8609 pub paths: Option<Vec<&'a str>>,
8610 #[builder(setter(into, strip_option), default)]
8612 pub skip_hidden: Option<bool>,
8613 #[builder(setter(into, strip_option), default)]
8615 pub skip_ignored: Option<bool>,
8616}
8617#[derive(Builder, Debug, PartialEq)]
8618pub struct FileWithReplacedOpts {
8619 #[builder(setter(into, strip_option), default)]
8621 pub all: Option<bool>,
8622 #[builder(setter(into, strip_option), default)]
8624 pub first_from: Option<isize>,
8625}
8626impl File {
8627 pub fn as_env_file(&self) -> EnvFile {
8633 let query = self.selection.select("asEnvFile");
8634 EnvFile {
8635 proc: self.proc.clone(),
8636 selection: query,
8637 graphql_client: self.graphql_client.clone(),
8638 }
8639 }
8640 pub fn as_env_file_opts(&self, opts: FileAsEnvFileOpts) -> EnvFile {
8646 let mut query = self.selection.select("asEnvFile");
8647 if let Some(expand) = opts.expand {
8648 query = query.arg("expand", expand);
8649 }
8650 EnvFile {
8651 proc: self.proc.clone(),
8652 selection: query,
8653 graphql_client: self.graphql_client.clone(),
8654 }
8655 }
8656 pub fn as_json(&self) -> JsonValue {
8658 let query = self.selection.select("asJSON");
8659 JsonValue {
8660 proc: self.proc.clone(),
8661 selection: query,
8662 graphql_client: self.graphql_client.clone(),
8663 }
8664 }
8665 pub fn chown(&self, owner: impl Into<String>) -> File {
8675 let mut query = self.selection.select("chown");
8676 query = query.arg("owner", owner.into());
8677 File {
8678 proc: self.proc.clone(),
8679 selection: query,
8680 graphql_client: self.graphql_client.clone(),
8681 }
8682 }
8683 pub async fn contents(&self) -> Result<String, DaggerError> {
8689 let query = self.selection.select("contents");
8690 query.execute(self.graphql_client.clone()).await
8691 }
8692 pub async fn contents_opts(&self, opts: FileContentsOpts) -> Result<String, DaggerError> {
8698 let mut query = self.selection.select("contents");
8699 if let Some(offset_lines) = opts.offset_lines {
8700 query = query.arg("offsetLines", offset_lines);
8701 }
8702 if let Some(limit_lines) = opts.limit_lines {
8703 query = query.arg("limitLines", limit_lines);
8704 }
8705 query.execute(self.graphql_client.clone()).await
8706 }
8707 pub async fn digest(&self) -> Result<String, DaggerError> {
8713 let query = self.selection.select("digest");
8714 query.execute(self.graphql_client.clone()).await
8715 }
8716 pub async fn digest_opts(&self, opts: FileDigestOpts) -> Result<String, DaggerError> {
8722 let mut query = self.selection.select("digest");
8723 if let Some(exclude_metadata) = opts.exclude_metadata {
8724 query = query.arg("excludeMetadata", exclude_metadata);
8725 }
8726 query.execute(self.graphql_client.clone()).await
8727 }
8728 pub async fn export(&self, path: impl Into<String>) -> Result<String, DaggerError> {
8735 let mut query = self.selection.select("export");
8736 query = query.arg("path", path.into());
8737 query.execute(self.graphql_client.clone()).await
8738 }
8739 pub async fn export_opts(
8746 &self,
8747 path: impl Into<String>,
8748 opts: FileExportOpts,
8749 ) -> Result<String, DaggerError> {
8750 let mut query = self.selection.select("export");
8751 query = query.arg("path", path.into());
8752 if let Some(allow_parent_dir_path) = opts.allow_parent_dir_path {
8753 query = query.arg("allowParentDirPath", allow_parent_dir_path);
8754 }
8755 query.execute(self.graphql_client.clone()).await
8756 }
8757 pub async fn id(&self) -> Result<FileId, DaggerError> {
8759 let query = self.selection.select("id");
8760 query.execute(self.graphql_client.clone()).await
8761 }
8762 pub async fn name(&self) -> Result<String, DaggerError> {
8764 let query = self.selection.select("name");
8765 query.execute(self.graphql_client.clone()).await
8766 }
8767 pub fn search(&self, pattern: impl Into<String>) -> Vec<SearchResult> {
8775 let mut query = self.selection.select("search");
8776 query = query.arg("pattern", pattern.into());
8777 vec![SearchResult {
8778 proc: self.proc.clone(),
8779 selection: query,
8780 graphql_client: self.graphql_client.clone(),
8781 }]
8782 }
8783 pub fn search_opts<'a>(
8791 &self,
8792 pattern: impl Into<String>,
8793 opts: FileSearchOpts<'a>,
8794 ) -> Vec<SearchResult> {
8795 let mut query = self.selection.select("search");
8796 query = query.arg("pattern", pattern.into());
8797 if let Some(literal) = opts.literal {
8798 query = query.arg("literal", literal);
8799 }
8800 if let Some(multiline) = opts.multiline {
8801 query = query.arg("multiline", multiline);
8802 }
8803 if let Some(dotall) = opts.dotall {
8804 query = query.arg("dotall", dotall);
8805 }
8806 if let Some(insensitive) = opts.insensitive {
8807 query = query.arg("insensitive", insensitive);
8808 }
8809 if let Some(skip_ignored) = opts.skip_ignored {
8810 query = query.arg("skipIgnored", skip_ignored);
8811 }
8812 if let Some(skip_hidden) = opts.skip_hidden {
8813 query = query.arg("skipHidden", skip_hidden);
8814 }
8815 if let Some(files_only) = opts.files_only {
8816 query = query.arg("filesOnly", files_only);
8817 }
8818 if let Some(limit) = opts.limit {
8819 query = query.arg("limit", limit);
8820 }
8821 if let Some(paths) = opts.paths {
8822 query = query.arg("paths", paths);
8823 }
8824 if let Some(globs) = opts.globs {
8825 query = query.arg("globs", globs);
8826 }
8827 vec![SearchResult {
8828 proc: self.proc.clone(),
8829 selection: query,
8830 graphql_client: self.graphql_client.clone(),
8831 }]
8832 }
8833 pub async fn size(&self) -> Result<isize, DaggerError> {
8835 let query = self.selection.select("size");
8836 query.execute(self.graphql_client.clone()).await
8837 }
8838 pub fn stat(&self) -> Stat {
8840 let query = self.selection.select("stat");
8841 Stat {
8842 proc: self.proc.clone(),
8843 selection: query,
8844 graphql_client: self.graphql_client.clone(),
8845 }
8846 }
8847 pub async fn sync(&self) -> Result<FileId, DaggerError> {
8849 let query = self.selection.select("sync");
8850 query.execute(self.graphql_client.clone()).await
8851 }
8852 pub fn with_name(&self, name: impl Into<String>) -> File {
8858 let mut query = self.selection.select("withName");
8859 query = query.arg("name", name.into());
8860 File {
8861 proc: self.proc.clone(),
8862 selection: query,
8863 graphql_client: self.graphql_client.clone(),
8864 }
8865 }
8866 pub fn with_replaced(&self, search: impl Into<String>, replacement: impl Into<String>) -> File {
8878 let mut query = self.selection.select("withReplaced");
8879 query = query.arg("search", search.into());
8880 query = query.arg("replacement", replacement.into());
8881 File {
8882 proc: self.proc.clone(),
8883 selection: query,
8884 graphql_client: self.graphql_client.clone(),
8885 }
8886 }
8887 pub fn with_replaced_opts(
8899 &self,
8900 search: impl Into<String>,
8901 replacement: impl Into<String>,
8902 opts: FileWithReplacedOpts,
8903 ) -> File {
8904 let mut query = self.selection.select("withReplaced");
8905 query = query.arg("search", search.into());
8906 query = query.arg("replacement", replacement.into());
8907 if let Some(all) = opts.all {
8908 query = query.arg("all", all);
8909 }
8910 if let Some(first_from) = opts.first_from {
8911 query = query.arg("firstFrom", first_from);
8912 }
8913 File {
8914 proc: self.proc.clone(),
8915 selection: query,
8916 graphql_client: self.graphql_client.clone(),
8917 }
8918 }
8919 pub fn with_timestamps(&self, timestamp: isize) -> File {
8927 let mut query = self.selection.select("withTimestamps");
8928 query = query.arg("timestamp", timestamp);
8929 File {
8930 proc: self.proc.clone(),
8931 selection: query,
8932 graphql_client: self.graphql_client.clone(),
8933 }
8934 }
8935}
8936#[derive(Clone)]
8937pub struct Function {
8938 pub proc: Option<Arc<DaggerSessionProc>>,
8939 pub selection: Selection,
8940 pub graphql_client: DynGraphQLClient,
8941}
8942#[derive(Builder, Debug, PartialEq)]
8943pub struct FunctionWithArgOpts<'a> {
8944 #[builder(setter(into, strip_option), default)]
8945 pub default_address: Option<&'a str>,
8946 #[builder(setter(into, strip_option), default)]
8948 pub default_path: Option<&'a str>,
8949 #[builder(setter(into, strip_option), default)]
8951 pub default_value: Option<Json>,
8952 #[builder(setter(into, strip_option), default)]
8954 pub deprecated: Option<&'a str>,
8955 #[builder(setter(into, strip_option), default)]
8957 pub description: Option<&'a str>,
8958 #[builder(setter(into, strip_option), default)]
8960 pub ignore: Option<Vec<&'a str>>,
8961 #[builder(setter(into, strip_option), default)]
8963 pub source_map: Option<SourceMapId>,
8964}
8965#[derive(Builder, Debug, PartialEq)]
8966pub struct FunctionWithCachePolicyOpts<'a> {
8967 #[builder(setter(into, strip_option), default)]
8969 pub time_to_live: Option<&'a str>,
8970}
8971#[derive(Builder, Debug, PartialEq)]
8972pub struct FunctionWithDeprecatedOpts<'a> {
8973 #[builder(setter(into, strip_option), default)]
8975 pub reason: Option<&'a str>,
8976}
8977impl Function {
8978 pub fn args(&self) -> Vec<FunctionArg> {
8980 let query = self.selection.select("args");
8981 vec![FunctionArg {
8982 proc: self.proc.clone(),
8983 selection: query,
8984 graphql_client: self.graphql_client.clone(),
8985 }]
8986 }
8987 pub async fn deprecated(&self) -> Result<String, DaggerError> {
8989 let query = self.selection.select("deprecated");
8990 query.execute(self.graphql_client.clone()).await
8991 }
8992 pub async fn description(&self) -> Result<String, DaggerError> {
8994 let query = self.selection.select("description");
8995 query.execute(self.graphql_client.clone()).await
8996 }
8997 pub async fn id(&self) -> Result<FunctionId, DaggerError> {
8999 let query = self.selection.select("id");
9000 query.execute(self.graphql_client.clone()).await
9001 }
9002 pub async fn name(&self) -> Result<String, DaggerError> {
9004 let query = self.selection.select("name");
9005 query.execute(self.graphql_client.clone()).await
9006 }
9007 pub fn return_type(&self) -> TypeDef {
9009 let query = self.selection.select("returnType");
9010 TypeDef {
9011 proc: self.proc.clone(),
9012 selection: query,
9013 graphql_client: self.graphql_client.clone(),
9014 }
9015 }
9016 pub fn source_map(&self) -> SourceMap {
9018 let query = self.selection.select("sourceMap");
9019 SourceMap {
9020 proc: self.proc.clone(),
9021 selection: query,
9022 graphql_client: self.graphql_client.clone(),
9023 }
9024 }
9025 pub fn with_arg(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> Function {
9033 let mut query = self.selection.select("withArg");
9034 query = query.arg("name", name.into());
9035 query = query.arg_lazy(
9036 "typeDef",
9037 Box::new(move || {
9038 let type_def = type_def.clone();
9039 Box::pin(async move { type_def.into_id().await.unwrap().quote() })
9040 }),
9041 );
9042 Function {
9043 proc: self.proc.clone(),
9044 selection: query,
9045 graphql_client: self.graphql_client.clone(),
9046 }
9047 }
9048 pub fn with_arg_opts<'a>(
9056 &self,
9057 name: impl Into<String>,
9058 type_def: impl IntoID<TypeDefId>,
9059 opts: FunctionWithArgOpts<'a>,
9060 ) -> Function {
9061 let mut query = self.selection.select("withArg");
9062 query = query.arg("name", name.into());
9063 query = query.arg_lazy(
9064 "typeDef",
9065 Box::new(move || {
9066 let type_def = type_def.clone();
9067 Box::pin(async move { type_def.into_id().await.unwrap().quote() })
9068 }),
9069 );
9070 if let Some(description) = opts.description {
9071 query = query.arg("description", description);
9072 }
9073 if let Some(default_value) = opts.default_value {
9074 query = query.arg("defaultValue", default_value);
9075 }
9076 if let Some(default_path) = opts.default_path {
9077 query = query.arg("defaultPath", default_path);
9078 }
9079 if let Some(ignore) = opts.ignore {
9080 query = query.arg("ignore", ignore);
9081 }
9082 if let Some(source_map) = opts.source_map {
9083 query = query.arg("sourceMap", source_map);
9084 }
9085 if let Some(deprecated) = opts.deprecated {
9086 query = query.arg("deprecated", deprecated);
9087 }
9088 if let Some(default_address) = opts.default_address {
9089 query = query.arg("defaultAddress", default_address);
9090 }
9091 Function {
9092 proc: self.proc.clone(),
9093 selection: query,
9094 graphql_client: self.graphql_client.clone(),
9095 }
9096 }
9097 pub fn with_cache_policy(&self, policy: FunctionCachePolicy) -> Function {
9104 let mut query = self.selection.select("withCachePolicy");
9105 query = query.arg("policy", policy);
9106 Function {
9107 proc: self.proc.clone(),
9108 selection: query,
9109 graphql_client: self.graphql_client.clone(),
9110 }
9111 }
9112 pub fn with_cache_policy_opts<'a>(
9119 &self,
9120 policy: FunctionCachePolicy,
9121 opts: FunctionWithCachePolicyOpts<'a>,
9122 ) -> Function {
9123 let mut query = self.selection.select("withCachePolicy");
9124 query = query.arg("policy", policy);
9125 if let Some(time_to_live) = opts.time_to_live {
9126 query = query.arg("timeToLive", time_to_live);
9127 }
9128 Function {
9129 proc: self.proc.clone(),
9130 selection: query,
9131 graphql_client: self.graphql_client.clone(),
9132 }
9133 }
9134 pub fn with_check(&self) -> Function {
9136 let query = self.selection.select("withCheck");
9137 Function {
9138 proc: self.proc.clone(),
9139 selection: query,
9140 graphql_client: self.graphql_client.clone(),
9141 }
9142 }
9143 pub fn with_deprecated(&self) -> Function {
9149 let query = self.selection.select("withDeprecated");
9150 Function {
9151 proc: self.proc.clone(),
9152 selection: query,
9153 graphql_client: self.graphql_client.clone(),
9154 }
9155 }
9156 pub fn with_deprecated_opts<'a>(&self, opts: FunctionWithDeprecatedOpts<'a>) -> Function {
9162 let mut query = self.selection.select("withDeprecated");
9163 if let Some(reason) = opts.reason {
9164 query = query.arg("reason", reason);
9165 }
9166 Function {
9167 proc: self.proc.clone(),
9168 selection: query,
9169 graphql_client: self.graphql_client.clone(),
9170 }
9171 }
9172 pub fn with_description(&self, description: impl Into<String>) -> Function {
9178 let mut query = self.selection.select("withDescription");
9179 query = query.arg("description", description.into());
9180 Function {
9181 proc: self.proc.clone(),
9182 selection: query,
9183 graphql_client: self.graphql_client.clone(),
9184 }
9185 }
9186 pub fn with_generator(&self) -> Function {
9188 let query = self.selection.select("withGenerator");
9189 Function {
9190 proc: self.proc.clone(),
9191 selection: query,
9192 graphql_client: self.graphql_client.clone(),
9193 }
9194 }
9195 pub fn with_source_map(&self, source_map: impl IntoID<SourceMapId>) -> Function {
9201 let mut query = self.selection.select("withSourceMap");
9202 query = query.arg_lazy(
9203 "sourceMap",
9204 Box::new(move || {
9205 let source_map = source_map.clone();
9206 Box::pin(async move { source_map.into_id().await.unwrap().quote() })
9207 }),
9208 );
9209 Function {
9210 proc: self.proc.clone(),
9211 selection: query,
9212 graphql_client: self.graphql_client.clone(),
9213 }
9214 }
9215}
9216#[derive(Clone)]
9217pub struct FunctionArg {
9218 pub proc: Option<Arc<DaggerSessionProc>>,
9219 pub selection: Selection,
9220 pub graphql_client: DynGraphQLClient,
9221}
9222impl FunctionArg {
9223 pub async fn default_address(&self) -> Result<String, DaggerError> {
9225 let query = self.selection.select("defaultAddress");
9226 query.execute(self.graphql_client.clone()).await
9227 }
9228 pub async fn default_path(&self) -> Result<String, DaggerError> {
9230 let query = self.selection.select("defaultPath");
9231 query.execute(self.graphql_client.clone()).await
9232 }
9233 pub async fn default_value(&self) -> Result<Json, DaggerError> {
9235 let query = self.selection.select("defaultValue");
9236 query.execute(self.graphql_client.clone()).await
9237 }
9238 pub async fn deprecated(&self) -> Result<String, DaggerError> {
9240 let query = self.selection.select("deprecated");
9241 query.execute(self.graphql_client.clone()).await
9242 }
9243 pub async fn description(&self) -> Result<String, DaggerError> {
9245 let query = self.selection.select("description");
9246 query.execute(self.graphql_client.clone()).await
9247 }
9248 pub async fn id(&self) -> Result<FunctionArgId, DaggerError> {
9250 let query = self.selection.select("id");
9251 query.execute(self.graphql_client.clone()).await
9252 }
9253 pub async fn ignore(&self) -> Result<Vec<String>, DaggerError> {
9255 let query = self.selection.select("ignore");
9256 query.execute(self.graphql_client.clone()).await
9257 }
9258 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 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 pub fn type_def(&self) -> TypeDef {
9274 let query = self.selection.select("typeDef");
9275 TypeDef {
9276 proc: self.proc.clone(),
9277 selection: query,
9278 graphql_client: self.graphql_client.clone(),
9279 }
9280 }
9281}
9282#[derive(Clone)]
9283pub struct FunctionCall {
9284 pub proc: Option<Arc<DaggerSessionProc>>,
9285 pub selection: Selection,
9286 pub graphql_client: DynGraphQLClient,
9287}
9288impl FunctionCall {
9289 pub async fn id(&self) -> Result<FunctionCallId, DaggerError> {
9291 let query = self.selection.select("id");
9292 query.execute(self.graphql_client.clone()).await
9293 }
9294 pub fn input_args(&self) -> Vec<FunctionCallArgValue> {
9296 let query = self.selection.select("inputArgs");
9297 vec![FunctionCallArgValue {
9298 proc: self.proc.clone(),
9299 selection: query,
9300 graphql_client: self.graphql_client.clone(),
9301 }]
9302 }
9303 pub async fn name(&self) -> Result<String, DaggerError> {
9305 let query = self.selection.select("name");
9306 query.execute(self.graphql_client.clone()).await
9307 }
9308 pub async fn parent(&self) -> Result<Json, DaggerError> {
9310 let query = self.selection.select("parent");
9311 query.execute(self.graphql_client.clone()).await
9312 }
9313 pub async fn parent_name(&self) -> Result<String, DaggerError> {
9315 let query = self.selection.select("parentName");
9316 query.execute(self.graphql_client.clone()).await
9317 }
9318 pub async fn return_error(&self, error: impl IntoID<ErrorId>) -> Result<Void, DaggerError> {
9324 let mut query = self.selection.select("returnError");
9325 query = query.arg_lazy(
9326 "error",
9327 Box::new(move || {
9328 let error = error.clone();
9329 Box::pin(async move { error.into_id().await.unwrap().quote() })
9330 }),
9331 );
9332 query.execute(self.graphql_client.clone()).await
9333 }
9334 pub async fn return_value(&self, value: Json) -> Result<Void, DaggerError> {
9340 let mut query = self.selection.select("returnValue");
9341 query = query.arg("value", value);
9342 query.execute(self.graphql_client.clone()).await
9343 }
9344}
9345#[derive(Clone)]
9346pub struct FunctionCallArgValue {
9347 pub proc: Option<Arc<DaggerSessionProc>>,
9348 pub selection: Selection,
9349 pub graphql_client: DynGraphQLClient,
9350}
9351impl FunctionCallArgValue {
9352 pub async fn id(&self) -> Result<FunctionCallArgValueId, DaggerError> {
9354 let query = self.selection.select("id");
9355 query.execute(self.graphql_client.clone()).await
9356 }
9357 pub async fn name(&self) -> Result<String, DaggerError> {
9359 let query = self.selection.select("name");
9360 query.execute(self.graphql_client.clone()).await
9361 }
9362 pub async fn value(&self) -> Result<Json, DaggerError> {
9364 let query = self.selection.select("value");
9365 query.execute(self.graphql_client.clone()).await
9366 }
9367}
9368#[derive(Clone)]
9369pub struct GeneratedCode {
9370 pub proc: Option<Arc<DaggerSessionProc>>,
9371 pub selection: Selection,
9372 pub graphql_client: DynGraphQLClient,
9373}
9374impl GeneratedCode {
9375 pub fn code(&self) -> Directory {
9377 let query = self.selection.select("code");
9378 Directory {
9379 proc: self.proc.clone(),
9380 selection: query,
9381 graphql_client: self.graphql_client.clone(),
9382 }
9383 }
9384 pub async fn id(&self) -> Result<GeneratedCodeId, DaggerError> {
9386 let query = self.selection.select("id");
9387 query.execute(self.graphql_client.clone()).await
9388 }
9389 pub async fn vcs_generated_paths(&self) -> Result<Vec<String>, DaggerError> {
9391 let query = self.selection.select("vcsGeneratedPaths");
9392 query.execute(self.graphql_client.clone()).await
9393 }
9394 pub async fn vcs_ignored_paths(&self) -> Result<Vec<String>, DaggerError> {
9396 let query = self.selection.select("vcsIgnoredPaths");
9397 query.execute(self.graphql_client.clone()).await
9398 }
9399 pub fn with_vcs_generated_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
9401 let mut query = self.selection.select("withVCSGeneratedPaths");
9402 query = query.arg(
9403 "paths",
9404 paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9405 );
9406 GeneratedCode {
9407 proc: self.proc.clone(),
9408 selection: query,
9409 graphql_client: self.graphql_client.clone(),
9410 }
9411 }
9412 pub fn with_vcs_ignored_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode {
9414 let mut query = self.selection.select("withVCSIgnoredPaths");
9415 query = query.arg(
9416 "paths",
9417 paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
9418 );
9419 GeneratedCode {
9420 proc: self.proc.clone(),
9421 selection: query,
9422 graphql_client: self.graphql_client.clone(),
9423 }
9424 }
9425}
9426#[derive(Clone)]
9427pub struct Generator {
9428 pub proc: Option<Arc<DaggerSessionProc>>,
9429 pub selection: Selection,
9430 pub graphql_client: DynGraphQLClient,
9431}
9432impl Generator {
9433 pub fn changes(&self) -> Changeset {
9435 let query = self.selection.select("changes");
9436 Changeset {
9437 proc: self.proc.clone(),
9438 selection: query,
9439 graphql_client: self.graphql_client.clone(),
9440 }
9441 }
9442 pub async fn completed(&self) -> Result<bool, DaggerError> {
9444 let query = self.selection.select("completed");
9445 query.execute(self.graphql_client.clone()).await
9446 }
9447 pub async fn description(&self) -> Result<String, DaggerError> {
9449 let query = self.selection.select("description");
9450 query.execute(self.graphql_client.clone()).await
9451 }
9452 pub async fn id(&self) -> Result<GeneratorId, DaggerError> {
9454 let query = self.selection.select("id");
9455 query.execute(self.graphql_client.clone()).await
9456 }
9457 pub async fn is_empty(&self) -> Result<bool, DaggerError> {
9459 let query = self.selection.select("isEmpty");
9460 query.execute(self.graphql_client.clone()).await
9461 }
9462 pub async fn name(&self) -> Result<String, DaggerError> {
9464 let query = self.selection.select("name");
9465 query.execute(self.graphql_client.clone()).await
9466 }
9467 pub fn run(&self) -> Generator {
9469 let query = self.selection.select("run");
9470 Generator {
9471 proc: self.proc.clone(),
9472 selection: query,
9473 graphql_client: self.graphql_client.clone(),
9474 }
9475 }
9476}
9477#[derive(Clone)]
9478pub struct GeneratorGroup {
9479 pub proc: Option<Arc<DaggerSessionProc>>,
9480 pub selection: Selection,
9481 pub graphql_client: DynGraphQLClient,
9482}
9483#[derive(Builder, Debug, PartialEq)]
9484pub struct GeneratorGroupChangesOpts {
9485 #[builder(setter(into, strip_option), default)]
9487 pub on_conflict: Option<ChangesetsMergeConflict>,
9488}
9489impl GeneratorGroup {
9490 pub fn changes(&self) -> Changeset {
9498 let query = self.selection.select("changes");
9499 Changeset {
9500 proc: self.proc.clone(),
9501 selection: query,
9502 graphql_client: self.graphql_client.clone(),
9503 }
9504 }
9505 pub fn changes_opts(&self, opts: GeneratorGroupChangesOpts) -> Changeset {
9513 let mut query = self.selection.select("changes");
9514 if let Some(on_conflict) = opts.on_conflict {
9515 query = query.arg("onConflict", on_conflict);
9516 }
9517 Changeset {
9518 proc: self.proc.clone(),
9519 selection: query,
9520 graphql_client: self.graphql_client.clone(),
9521 }
9522 }
9523 pub async fn id(&self) -> Result<GeneratorGroupId, DaggerError> {
9525 let query = self.selection.select("id");
9526 query.execute(self.graphql_client.clone()).await
9527 }
9528 pub async fn is_empty(&self) -> Result<bool, DaggerError> {
9530 let query = self.selection.select("isEmpty");
9531 query.execute(self.graphql_client.clone()).await
9532 }
9533 pub fn list(&self) -> Vec<Generator> {
9535 let query = self.selection.select("list");
9536 vec![Generator {
9537 proc: self.proc.clone(),
9538 selection: query,
9539 graphql_client: self.graphql_client.clone(),
9540 }]
9541 }
9542 pub fn run(&self) -> GeneratorGroup {
9544 let query = self.selection.select("run");
9545 GeneratorGroup {
9546 proc: self.proc.clone(),
9547 selection: query,
9548 graphql_client: self.graphql_client.clone(),
9549 }
9550 }
9551}
9552#[derive(Clone)]
9553pub struct GitRef {
9554 pub proc: Option<Arc<DaggerSessionProc>>,
9555 pub selection: Selection,
9556 pub graphql_client: DynGraphQLClient,
9557}
9558#[derive(Builder, Debug, PartialEq)]
9559pub struct GitRefTreeOpts {
9560 #[builder(setter(into, strip_option), default)]
9562 pub depth: Option<isize>,
9563 #[builder(setter(into, strip_option), default)]
9565 pub discard_git_dir: Option<bool>,
9566}
9567impl GitRef {
9568 pub async fn commit(&self) -> Result<String, DaggerError> {
9570 let query = self.selection.select("commit");
9571 query.execute(self.graphql_client.clone()).await
9572 }
9573 pub fn common_ancestor(&self, other: impl IntoID<GitRefId>) -> GitRef {
9579 let mut query = self.selection.select("commonAncestor");
9580 query = query.arg_lazy(
9581 "other",
9582 Box::new(move || {
9583 let other = other.clone();
9584 Box::pin(async move { other.into_id().await.unwrap().quote() })
9585 }),
9586 );
9587 GitRef {
9588 proc: self.proc.clone(),
9589 selection: query,
9590 graphql_client: self.graphql_client.clone(),
9591 }
9592 }
9593 pub async fn id(&self) -> Result<GitRefId, DaggerError> {
9595 let query = self.selection.select("id");
9596 query.execute(self.graphql_client.clone()).await
9597 }
9598 pub async fn r#ref(&self) -> Result<String, DaggerError> {
9600 let query = self.selection.select("ref");
9601 query.execute(self.graphql_client.clone()).await
9602 }
9603 pub fn tree(&self) -> Directory {
9609 let query = self.selection.select("tree");
9610 Directory {
9611 proc: self.proc.clone(),
9612 selection: query,
9613 graphql_client: self.graphql_client.clone(),
9614 }
9615 }
9616 pub fn tree_opts(&self, opts: GitRefTreeOpts) -> Directory {
9622 let mut query = self.selection.select("tree");
9623 if let Some(discard_git_dir) = opts.discard_git_dir {
9624 query = query.arg("discardGitDir", discard_git_dir);
9625 }
9626 if let Some(depth) = opts.depth {
9627 query = query.arg("depth", depth);
9628 }
9629 Directory {
9630 proc: self.proc.clone(),
9631 selection: query,
9632 graphql_client: self.graphql_client.clone(),
9633 }
9634 }
9635}
9636#[derive(Clone)]
9637pub struct GitRepository {
9638 pub proc: Option<Arc<DaggerSessionProc>>,
9639 pub selection: Selection,
9640 pub graphql_client: DynGraphQLClient,
9641}
9642#[derive(Builder, Debug, PartialEq)]
9643pub struct GitRepositoryBranchesOpts<'a> {
9644 #[builder(setter(into, strip_option), default)]
9646 pub patterns: Option<Vec<&'a str>>,
9647}
9648#[derive(Builder, Debug, PartialEq)]
9649pub struct GitRepositoryTagsOpts<'a> {
9650 #[builder(setter(into, strip_option), default)]
9652 pub patterns: Option<Vec<&'a str>>,
9653}
9654impl GitRepository {
9655 pub fn branch(&self, name: impl Into<String>) -> GitRef {
9661 let mut query = self.selection.select("branch");
9662 query = query.arg("name", name.into());
9663 GitRef {
9664 proc: self.proc.clone(),
9665 selection: query,
9666 graphql_client: self.graphql_client.clone(),
9667 }
9668 }
9669 pub async fn branches(&self) -> Result<Vec<String>, DaggerError> {
9675 let query = self.selection.select("branches");
9676 query.execute(self.graphql_client.clone()).await
9677 }
9678 pub async fn branches_opts<'a>(
9684 &self,
9685 opts: GitRepositoryBranchesOpts<'a>,
9686 ) -> Result<Vec<String>, DaggerError> {
9687 let mut query = self.selection.select("branches");
9688 if let Some(patterns) = opts.patterns {
9689 query = query.arg("patterns", patterns);
9690 }
9691 query.execute(self.graphql_client.clone()).await
9692 }
9693 pub fn commit(&self, id: impl Into<String>) -> GitRef {
9699 let mut query = self.selection.select("commit");
9700 query = query.arg("id", id.into());
9701 GitRef {
9702 proc: self.proc.clone(),
9703 selection: query,
9704 graphql_client: self.graphql_client.clone(),
9705 }
9706 }
9707 pub fn head(&self) -> GitRef {
9709 let query = self.selection.select("head");
9710 GitRef {
9711 proc: self.proc.clone(),
9712 selection: query,
9713 graphql_client: self.graphql_client.clone(),
9714 }
9715 }
9716 pub async fn id(&self) -> Result<GitRepositoryId, DaggerError> {
9718 let query = self.selection.select("id");
9719 query.execute(self.graphql_client.clone()).await
9720 }
9721 pub fn latest_version(&self) -> GitRef {
9723 let query = self.selection.select("latestVersion");
9724 GitRef {
9725 proc: self.proc.clone(),
9726 selection: query,
9727 graphql_client: self.graphql_client.clone(),
9728 }
9729 }
9730 pub fn r#ref(&self, name: impl Into<String>) -> GitRef {
9736 let mut query = self.selection.select("ref");
9737 query = query.arg("name", name.into());
9738 GitRef {
9739 proc: self.proc.clone(),
9740 selection: query,
9741 graphql_client: self.graphql_client.clone(),
9742 }
9743 }
9744 pub fn tag(&self, name: impl Into<String>) -> GitRef {
9750 let mut query = self.selection.select("tag");
9751 query = query.arg("name", name.into());
9752 GitRef {
9753 proc: self.proc.clone(),
9754 selection: query,
9755 graphql_client: self.graphql_client.clone(),
9756 }
9757 }
9758 pub async fn tags(&self) -> Result<Vec<String>, DaggerError> {
9764 let query = self.selection.select("tags");
9765 query.execute(self.graphql_client.clone()).await
9766 }
9767 pub async fn tags_opts<'a>(
9773 &self,
9774 opts: GitRepositoryTagsOpts<'a>,
9775 ) -> Result<Vec<String>, DaggerError> {
9776 let mut query = self.selection.select("tags");
9777 if let Some(patterns) = opts.patterns {
9778 query = query.arg("patterns", patterns);
9779 }
9780 query.execute(self.graphql_client.clone()).await
9781 }
9782 pub fn uncommitted(&self) -> Changeset {
9784 let query = self.selection.select("uncommitted");
9785 Changeset {
9786 proc: self.proc.clone(),
9787 selection: query,
9788 graphql_client: self.graphql_client.clone(),
9789 }
9790 }
9791 pub async fn url(&self) -> Result<String, DaggerError> {
9793 let query = self.selection.select("url");
9794 query.execute(self.graphql_client.clone()).await
9795 }
9796}
9797#[derive(Clone)]
9798pub struct Host {
9799 pub proc: Option<Arc<DaggerSessionProc>>,
9800 pub selection: Selection,
9801 pub graphql_client: DynGraphQLClient,
9802}
9803#[derive(Builder, Debug, PartialEq)]
9804pub struct HostDirectoryOpts<'a> {
9805 #[builder(setter(into, strip_option), default)]
9807 pub exclude: Option<Vec<&'a str>>,
9808 #[builder(setter(into, strip_option), default)]
9810 pub gitignore: Option<bool>,
9811 #[builder(setter(into, strip_option), default)]
9813 pub include: Option<Vec<&'a str>>,
9814 #[builder(setter(into, strip_option), default)]
9816 pub no_cache: Option<bool>,
9817}
9818#[derive(Builder, Debug, PartialEq)]
9819pub struct HostFileOpts {
9820 #[builder(setter(into, strip_option), default)]
9822 pub no_cache: Option<bool>,
9823}
9824#[derive(Builder, Debug, PartialEq)]
9825pub struct HostFindUpOpts {
9826 #[builder(setter(into, strip_option), default)]
9827 pub no_cache: Option<bool>,
9828}
9829#[derive(Builder, Debug, PartialEq)]
9830pub struct HostServiceOpts<'a> {
9831 #[builder(setter(into, strip_option), default)]
9833 pub host: Option<&'a str>,
9834}
9835#[derive(Builder, Debug, PartialEq)]
9836pub struct HostTunnelOpts {
9837 #[builder(setter(into, strip_option), default)]
9840 pub native: Option<bool>,
9841 #[builder(setter(into, strip_option), default)]
9846 pub ports: Option<Vec<PortForward>>,
9847}
9848impl Host {
9849 pub fn container_image(&self, name: impl Into<String>) -> Container {
9855 let mut query = self.selection.select("containerImage");
9856 query = query.arg("name", name.into());
9857 Container {
9858 proc: self.proc.clone(),
9859 selection: query,
9860 graphql_client: self.graphql_client.clone(),
9861 }
9862 }
9863 pub fn directory(&self, path: impl Into<String>) -> Directory {
9870 let mut query = self.selection.select("directory");
9871 query = query.arg("path", path.into());
9872 Directory {
9873 proc: self.proc.clone(),
9874 selection: query,
9875 graphql_client: self.graphql_client.clone(),
9876 }
9877 }
9878 pub fn directory_opts<'a>(
9885 &self,
9886 path: impl Into<String>,
9887 opts: HostDirectoryOpts<'a>,
9888 ) -> Directory {
9889 let mut query = self.selection.select("directory");
9890 query = query.arg("path", path.into());
9891 if let Some(exclude) = opts.exclude {
9892 query = query.arg("exclude", exclude);
9893 }
9894 if let Some(include) = opts.include {
9895 query = query.arg("include", include);
9896 }
9897 if let Some(no_cache) = opts.no_cache {
9898 query = query.arg("noCache", no_cache);
9899 }
9900 if let Some(gitignore) = opts.gitignore {
9901 query = query.arg("gitignore", gitignore);
9902 }
9903 Directory {
9904 proc: self.proc.clone(),
9905 selection: query,
9906 graphql_client: self.graphql_client.clone(),
9907 }
9908 }
9909 pub fn file(&self, path: impl Into<String>) -> File {
9916 let mut query = self.selection.select("file");
9917 query = query.arg("path", path.into());
9918 File {
9919 proc: self.proc.clone(),
9920 selection: query,
9921 graphql_client: self.graphql_client.clone(),
9922 }
9923 }
9924 pub fn file_opts(&self, path: impl Into<String>, opts: HostFileOpts) -> File {
9931 let mut query = self.selection.select("file");
9932 query = query.arg("path", path.into());
9933 if let Some(no_cache) = opts.no_cache {
9934 query = query.arg("noCache", no_cache);
9935 }
9936 File {
9937 proc: self.proc.clone(),
9938 selection: query,
9939 graphql_client: self.graphql_client.clone(),
9940 }
9941 }
9942 pub async fn find_up(&self, name: impl Into<String>) -> Result<String, DaggerError> {
9949 let mut query = self.selection.select("findUp");
9950 query = query.arg("name", name.into());
9951 query.execute(self.graphql_client.clone()).await
9952 }
9953 pub async fn find_up_opts(
9960 &self,
9961 name: impl Into<String>,
9962 opts: HostFindUpOpts,
9963 ) -> Result<String, DaggerError> {
9964 let mut query = self.selection.select("findUp");
9965 query = query.arg("name", name.into());
9966 if let Some(no_cache) = opts.no_cache {
9967 query = query.arg("noCache", no_cache);
9968 }
9969 query.execute(self.graphql_client.clone()).await
9970 }
9971 pub async fn id(&self) -> Result<HostId, DaggerError> {
9973 let query = self.selection.select("id");
9974 query.execute(self.graphql_client.clone()).await
9975 }
9976 pub fn service(&self, ports: Vec<PortForward>) -> Service {
9987 let mut query = self.selection.select("service");
9988 query = query.arg("ports", ports);
9989 Service {
9990 proc: self.proc.clone(),
9991 selection: query,
9992 graphql_client: self.graphql_client.clone(),
9993 }
9994 }
9995 pub fn service_opts<'a>(&self, ports: Vec<PortForward>, opts: HostServiceOpts<'a>) -> Service {
10006 let mut query = self.selection.select("service");
10007 query = query.arg("ports", ports);
10008 if let Some(host) = opts.host {
10009 query = query.arg("host", host);
10010 }
10011 Service {
10012 proc: self.proc.clone(),
10013 selection: query,
10014 graphql_client: self.graphql_client.clone(),
10015 }
10016 }
10017 pub fn tunnel(&self, service: impl IntoID<ServiceId>) -> Service {
10024 let mut query = self.selection.select("tunnel");
10025 query = query.arg_lazy(
10026 "service",
10027 Box::new(move || {
10028 let service = service.clone();
10029 Box::pin(async move { service.into_id().await.unwrap().quote() })
10030 }),
10031 );
10032 Service {
10033 proc: self.proc.clone(),
10034 selection: query,
10035 graphql_client: self.graphql_client.clone(),
10036 }
10037 }
10038 pub fn tunnel_opts(&self, service: impl IntoID<ServiceId>, opts: HostTunnelOpts) -> Service {
10045 let mut query = self.selection.select("tunnel");
10046 query = query.arg_lazy(
10047 "service",
10048 Box::new(move || {
10049 let service = service.clone();
10050 Box::pin(async move { service.into_id().await.unwrap().quote() })
10051 }),
10052 );
10053 if let Some(native) = opts.native {
10054 query = query.arg("native", native);
10055 }
10056 if let Some(ports) = opts.ports {
10057 query = query.arg("ports", ports);
10058 }
10059 Service {
10060 proc: self.proc.clone(),
10061 selection: query,
10062 graphql_client: self.graphql_client.clone(),
10063 }
10064 }
10065 pub fn unix_socket(&self, path: impl Into<String>) -> Socket {
10071 let mut query = self.selection.select("unixSocket");
10072 query = query.arg("path", path.into());
10073 Socket {
10074 proc: self.proc.clone(),
10075 selection: query,
10076 graphql_client: self.graphql_client.clone(),
10077 }
10078 }
10079}
10080#[derive(Clone)]
10081pub struct InputTypeDef {
10082 pub proc: Option<Arc<DaggerSessionProc>>,
10083 pub selection: Selection,
10084 pub graphql_client: DynGraphQLClient,
10085}
10086impl InputTypeDef {
10087 pub fn fields(&self) -> Vec<FieldTypeDef> {
10089 let query = self.selection.select("fields");
10090 vec![FieldTypeDef {
10091 proc: self.proc.clone(),
10092 selection: query,
10093 graphql_client: self.graphql_client.clone(),
10094 }]
10095 }
10096 pub async fn id(&self) -> Result<InputTypeDefId, DaggerError> {
10098 let query = self.selection.select("id");
10099 query.execute(self.graphql_client.clone()).await
10100 }
10101 pub async fn name(&self) -> Result<String, DaggerError> {
10103 let query = self.selection.select("name");
10104 query.execute(self.graphql_client.clone()).await
10105 }
10106}
10107#[derive(Clone)]
10108pub struct InterfaceTypeDef {
10109 pub proc: Option<Arc<DaggerSessionProc>>,
10110 pub selection: Selection,
10111 pub graphql_client: DynGraphQLClient,
10112}
10113impl InterfaceTypeDef {
10114 pub async fn description(&self) -> Result<String, DaggerError> {
10116 let query = self.selection.select("description");
10117 query.execute(self.graphql_client.clone()).await
10118 }
10119 pub fn functions(&self) -> Vec<Function> {
10121 let query = self.selection.select("functions");
10122 vec![Function {
10123 proc: self.proc.clone(),
10124 selection: query,
10125 graphql_client: self.graphql_client.clone(),
10126 }]
10127 }
10128 pub async fn id(&self) -> Result<InterfaceTypeDefId, DaggerError> {
10130 let query = self.selection.select("id");
10131 query.execute(self.graphql_client.clone()).await
10132 }
10133 pub async fn name(&self) -> Result<String, DaggerError> {
10135 let query = self.selection.select("name");
10136 query.execute(self.graphql_client.clone()).await
10137 }
10138 pub fn source_map(&self) -> SourceMap {
10140 let query = self.selection.select("sourceMap");
10141 SourceMap {
10142 proc: self.proc.clone(),
10143 selection: query,
10144 graphql_client: self.graphql_client.clone(),
10145 }
10146 }
10147 pub async fn source_module_name(&self) -> Result<String, DaggerError> {
10149 let query = self.selection.select("sourceModuleName");
10150 query.execute(self.graphql_client.clone()).await
10151 }
10152}
10153#[derive(Clone)]
10154pub struct JsonValue {
10155 pub proc: Option<Arc<DaggerSessionProc>>,
10156 pub selection: Selection,
10157 pub graphql_client: DynGraphQLClient,
10158}
10159#[derive(Builder, Debug, PartialEq)]
10160pub struct JsonValueContentsOpts<'a> {
10161 #[builder(setter(into, strip_option), default)]
10163 pub indent: Option<&'a str>,
10164 #[builder(setter(into, strip_option), default)]
10166 pub pretty: Option<bool>,
10167}
10168impl JsonValue {
10169 pub fn as_array(&self) -> Vec<JsonValue> {
10171 let query = self.selection.select("asArray");
10172 vec![JsonValue {
10173 proc: self.proc.clone(),
10174 selection: query,
10175 graphql_client: self.graphql_client.clone(),
10176 }]
10177 }
10178 pub async fn as_boolean(&self) -> Result<bool, DaggerError> {
10180 let query = self.selection.select("asBoolean");
10181 query.execute(self.graphql_client.clone()).await
10182 }
10183 pub async fn as_integer(&self) -> Result<isize, DaggerError> {
10185 let query = self.selection.select("asInteger");
10186 query.execute(self.graphql_client.clone()).await
10187 }
10188 pub async fn as_string(&self) -> Result<String, DaggerError> {
10190 let query = self.selection.select("asString");
10191 query.execute(self.graphql_client.clone()).await
10192 }
10193 pub async fn contents(&self) -> Result<Json, DaggerError> {
10199 let query = self.selection.select("contents");
10200 query.execute(self.graphql_client.clone()).await
10201 }
10202 pub async fn contents_opts<'a>(
10208 &self,
10209 opts: JsonValueContentsOpts<'a>,
10210 ) -> Result<Json, DaggerError> {
10211 let mut query = self.selection.select("contents");
10212 if let Some(pretty) = opts.pretty {
10213 query = query.arg("pretty", pretty);
10214 }
10215 if let Some(indent) = opts.indent {
10216 query = query.arg("indent", indent);
10217 }
10218 query.execute(self.graphql_client.clone()).await
10219 }
10220 pub fn field(&self, path: Vec<impl Into<String>>) -> JsonValue {
10226 let mut query = self.selection.select("field");
10227 query = query.arg(
10228 "path",
10229 path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
10230 );
10231 JsonValue {
10232 proc: self.proc.clone(),
10233 selection: query,
10234 graphql_client: self.graphql_client.clone(),
10235 }
10236 }
10237 pub async fn fields(&self) -> Result<Vec<String>, DaggerError> {
10239 let query = self.selection.select("fields");
10240 query.execute(self.graphql_client.clone()).await
10241 }
10242 pub async fn id(&self) -> Result<JsonValueId, DaggerError> {
10244 let query = self.selection.select("id");
10245 query.execute(self.graphql_client.clone()).await
10246 }
10247 pub fn new_boolean(&self, value: bool) -> JsonValue {
10253 let mut query = self.selection.select("newBoolean");
10254 query = query.arg("value", value);
10255 JsonValue {
10256 proc: self.proc.clone(),
10257 selection: query,
10258 graphql_client: self.graphql_client.clone(),
10259 }
10260 }
10261 pub fn new_integer(&self, value: isize) -> JsonValue {
10267 let mut query = self.selection.select("newInteger");
10268 query = query.arg("value", value);
10269 JsonValue {
10270 proc: self.proc.clone(),
10271 selection: query,
10272 graphql_client: self.graphql_client.clone(),
10273 }
10274 }
10275 pub fn new_string(&self, value: impl Into<String>) -> JsonValue {
10281 let mut query = self.selection.select("newString");
10282 query = query.arg("value", value.into());
10283 JsonValue {
10284 proc: self.proc.clone(),
10285 selection: query,
10286 graphql_client: self.graphql_client.clone(),
10287 }
10288 }
10289 pub fn with_contents(&self, contents: Json) -> JsonValue {
10295 let mut query = self.selection.select("withContents");
10296 query = query.arg("contents", contents);
10297 JsonValue {
10298 proc: self.proc.clone(),
10299 selection: query,
10300 graphql_client: self.graphql_client.clone(),
10301 }
10302 }
10303 pub fn with_field(
10310 &self,
10311 path: Vec<impl Into<String>>,
10312 value: impl IntoID<JsonValueId>,
10313 ) -> JsonValue {
10314 let mut query = self.selection.select("withField");
10315 query = query.arg(
10316 "path",
10317 path.into_iter().map(|i| i.into()).collect::<Vec<String>>(),
10318 );
10319 query = query.arg_lazy(
10320 "value",
10321 Box::new(move || {
10322 let value = value.clone();
10323 Box::pin(async move { value.into_id().await.unwrap().quote() })
10324 }),
10325 );
10326 JsonValue {
10327 proc: self.proc.clone(),
10328 selection: query,
10329 graphql_client: self.graphql_client.clone(),
10330 }
10331 }
10332}
10333#[derive(Clone)]
10334pub struct Llm {
10335 pub proc: Option<Arc<DaggerSessionProc>>,
10336 pub selection: Selection,
10337 pub graphql_client: DynGraphQLClient,
10338}
10339impl Llm {
10340 pub fn attempt(&self, number: isize) -> Llm {
10342 let mut query = self.selection.select("attempt");
10343 query = query.arg("number", number);
10344 Llm {
10345 proc: self.proc.clone(),
10346 selection: query,
10347 graphql_client: self.graphql_client.clone(),
10348 }
10349 }
10350 pub fn bind_result(&self, name: impl Into<String>) -> Binding {
10352 let mut query = self.selection.select("bindResult");
10353 query = query.arg("name", name.into());
10354 Binding {
10355 proc: self.proc.clone(),
10356 selection: query,
10357 graphql_client: self.graphql_client.clone(),
10358 }
10359 }
10360 pub fn env(&self) -> Env {
10362 let query = self.selection.select("env");
10363 Env {
10364 proc: self.proc.clone(),
10365 selection: query,
10366 graphql_client: self.graphql_client.clone(),
10367 }
10368 }
10369 pub async fn has_prompt(&self) -> Result<bool, DaggerError> {
10371 let query = self.selection.select("hasPrompt");
10372 query.execute(self.graphql_client.clone()).await
10373 }
10374 pub async fn history(&self) -> Result<Vec<String>, DaggerError> {
10376 let query = self.selection.select("history");
10377 query.execute(self.graphql_client.clone()).await
10378 }
10379 pub async fn history_json(&self) -> Result<Json, DaggerError> {
10381 let query = self.selection.select("historyJSON");
10382 query.execute(self.graphql_client.clone()).await
10383 }
10384 pub async fn id(&self) -> Result<Llmid, DaggerError> {
10386 let query = self.selection.select("id");
10387 query.execute(self.graphql_client.clone()).await
10388 }
10389 pub async fn last_reply(&self) -> Result<String, DaggerError> {
10391 let query = self.selection.select("lastReply");
10392 query.execute(self.graphql_client.clone()).await
10393 }
10394 pub fn r#loop(&self) -> Llm {
10396 let query = self.selection.select("loop");
10397 Llm {
10398 proc: self.proc.clone(),
10399 selection: query,
10400 graphql_client: self.graphql_client.clone(),
10401 }
10402 }
10403 pub async fn model(&self) -> Result<String, DaggerError> {
10405 let query = self.selection.select("model");
10406 query.execute(self.graphql_client.clone()).await
10407 }
10408 pub async fn provider(&self) -> Result<String, DaggerError> {
10410 let query = self.selection.select("provider");
10411 query.execute(self.graphql_client.clone()).await
10412 }
10413 pub async fn step(&self) -> Result<Llmid, DaggerError> {
10415 let query = self.selection.select("step");
10416 query.execute(self.graphql_client.clone()).await
10417 }
10418 pub async fn sync(&self) -> Result<Llmid, DaggerError> {
10420 let query = self.selection.select("sync");
10421 query.execute(self.graphql_client.clone()).await
10422 }
10423 pub fn token_usage(&self) -> LlmTokenUsage {
10425 let query = self.selection.select("tokenUsage");
10426 LlmTokenUsage {
10427 proc: self.proc.clone(),
10428 selection: query,
10429 graphql_client: self.graphql_client.clone(),
10430 }
10431 }
10432 pub async fn tools(&self) -> Result<String, DaggerError> {
10434 let query = self.selection.select("tools");
10435 query.execute(self.graphql_client.clone()).await
10436 }
10437 pub fn with_blocked_function(
10446 &self,
10447 type_name: impl Into<String>,
10448 function: impl Into<String>,
10449 ) -> Llm {
10450 let mut query = self.selection.select("withBlockedFunction");
10451 query = query.arg("typeName", type_name.into());
10452 query = query.arg("function", function.into());
10453 Llm {
10454 proc: self.proc.clone(),
10455 selection: query,
10456 graphql_client: self.graphql_client.clone(),
10457 }
10458 }
10459 pub fn with_env(&self, env: impl IntoID<EnvId>) -> Llm {
10461 let mut query = self.selection.select("withEnv");
10462 query = query.arg_lazy(
10463 "env",
10464 Box::new(move || {
10465 let env = env.clone();
10466 Box::pin(async move { env.into_id().await.unwrap().quote() })
10467 }),
10468 );
10469 Llm {
10470 proc: self.proc.clone(),
10471 selection: query,
10472 graphql_client: self.graphql_client.clone(),
10473 }
10474 }
10475 pub fn with_mcp_server(&self, name: impl Into<String>, service: impl IntoID<ServiceId>) -> Llm {
10482 let mut query = self.selection.select("withMCPServer");
10483 query = query.arg("name", name.into());
10484 query = query.arg_lazy(
10485 "service",
10486 Box::new(move || {
10487 let service = service.clone();
10488 Box::pin(async move { service.into_id().await.unwrap().quote() })
10489 }),
10490 );
10491 Llm {
10492 proc: self.proc.clone(),
10493 selection: query,
10494 graphql_client: self.graphql_client.clone(),
10495 }
10496 }
10497 pub fn with_model(&self, model: impl Into<String>) -> Llm {
10503 let mut query = self.selection.select("withModel");
10504 query = query.arg("model", model.into());
10505 Llm {
10506 proc: self.proc.clone(),
10507 selection: query,
10508 graphql_client: self.graphql_client.clone(),
10509 }
10510 }
10511 pub fn with_prompt(&self, prompt: impl Into<String>) -> Llm {
10517 let mut query = self.selection.select("withPrompt");
10518 query = query.arg("prompt", prompt.into());
10519 Llm {
10520 proc: self.proc.clone(),
10521 selection: query,
10522 graphql_client: self.graphql_client.clone(),
10523 }
10524 }
10525 pub fn with_prompt_file(&self, file: impl IntoID<FileId>) -> Llm {
10531 let mut query = self.selection.select("withPromptFile");
10532 query = query.arg_lazy(
10533 "file",
10534 Box::new(move || {
10535 let file = file.clone();
10536 Box::pin(async move { file.into_id().await.unwrap().quote() })
10537 }),
10538 );
10539 Llm {
10540 proc: self.proc.clone(),
10541 selection: query,
10542 graphql_client: self.graphql_client.clone(),
10543 }
10544 }
10545 pub fn with_static_tools(&self) -> Llm {
10547 let query = self.selection.select("withStaticTools");
10548 Llm {
10549 proc: self.proc.clone(),
10550 selection: query,
10551 graphql_client: self.graphql_client.clone(),
10552 }
10553 }
10554 pub fn with_system_prompt(&self, prompt: impl Into<String>) -> Llm {
10560 let mut query = self.selection.select("withSystemPrompt");
10561 query = query.arg("prompt", prompt.into());
10562 Llm {
10563 proc: self.proc.clone(),
10564 selection: query,
10565 graphql_client: self.graphql_client.clone(),
10566 }
10567 }
10568 pub fn without_default_system_prompt(&self) -> Llm {
10570 let query = self.selection.select("withoutDefaultSystemPrompt");
10571 Llm {
10572 proc: self.proc.clone(),
10573 selection: query,
10574 graphql_client: self.graphql_client.clone(),
10575 }
10576 }
10577 pub fn without_message_history(&self) -> Llm {
10579 let query = self.selection.select("withoutMessageHistory");
10580 Llm {
10581 proc: self.proc.clone(),
10582 selection: query,
10583 graphql_client: self.graphql_client.clone(),
10584 }
10585 }
10586 pub fn without_system_prompts(&self) -> Llm {
10588 let query = self.selection.select("withoutSystemPrompts");
10589 Llm {
10590 proc: self.proc.clone(),
10591 selection: query,
10592 graphql_client: self.graphql_client.clone(),
10593 }
10594 }
10595}
10596#[derive(Clone)]
10597pub struct LlmTokenUsage {
10598 pub proc: Option<Arc<DaggerSessionProc>>,
10599 pub selection: Selection,
10600 pub graphql_client: DynGraphQLClient,
10601}
10602impl LlmTokenUsage {
10603 pub async fn cached_token_reads(&self) -> Result<isize, DaggerError> {
10604 let query = self.selection.select("cachedTokenReads");
10605 query.execute(self.graphql_client.clone()).await
10606 }
10607 pub async fn cached_token_writes(&self) -> Result<isize, DaggerError> {
10608 let query = self.selection.select("cachedTokenWrites");
10609 query.execute(self.graphql_client.clone()).await
10610 }
10611 pub async fn id(&self) -> Result<LlmTokenUsageId, DaggerError> {
10613 let query = self.selection.select("id");
10614 query.execute(self.graphql_client.clone()).await
10615 }
10616 pub async fn input_tokens(&self) -> Result<isize, DaggerError> {
10617 let query = self.selection.select("inputTokens");
10618 query.execute(self.graphql_client.clone()).await
10619 }
10620 pub async fn output_tokens(&self) -> Result<isize, DaggerError> {
10621 let query = self.selection.select("outputTokens");
10622 query.execute(self.graphql_client.clone()).await
10623 }
10624 pub async fn total_tokens(&self) -> Result<isize, DaggerError> {
10625 let query = self.selection.select("totalTokens");
10626 query.execute(self.graphql_client.clone()).await
10627 }
10628}
10629#[derive(Clone)]
10630pub struct Label {
10631 pub proc: Option<Arc<DaggerSessionProc>>,
10632 pub selection: Selection,
10633 pub graphql_client: DynGraphQLClient,
10634}
10635impl Label {
10636 pub async fn id(&self) -> Result<LabelId, DaggerError> {
10638 let query = self.selection.select("id");
10639 query.execute(self.graphql_client.clone()).await
10640 }
10641 pub async fn name(&self) -> Result<String, DaggerError> {
10643 let query = self.selection.select("name");
10644 query.execute(self.graphql_client.clone()).await
10645 }
10646 pub async fn value(&self) -> Result<String, DaggerError> {
10648 let query = self.selection.select("value");
10649 query.execute(self.graphql_client.clone()).await
10650 }
10651}
10652#[derive(Clone)]
10653pub struct ListTypeDef {
10654 pub proc: Option<Arc<DaggerSessionProc>>,
10655 pub selection: Selection,
10656 pub graphql_client: DynGraphQLClient,
10657}
10658impl ListTypeDef {
10659 pub fn element_type_def(&self) -> TypeDef {
10661 let query = self.selection.select("elementTypeDef");
10662 TypeDef {
10663 proc: self.proc.clone(),
10664 selection: query,
10665 graphql_client: self.graphql_client.clone(),
10666 }
10667 }
10668 pub async fn id(&self) -> Result<ListTypeDefId, DaggerError> {
10670 let query = self.selection.select("id");
10671 query.execute(self.graphql_client.clone()).await
10672 }
10673}
10674#[derive(Clone)]
10675pub struct Module {
10676 pub proc: Option<Arc<DaggerSessionProc>>,
10677 pub selection: Selection,
10678 pub graphql_client: DynGraphQLClient,
10679}
10680#[derive(Builder, Debug, PartialEq)]
10681pub struct ModuleChecksOpts<'a> {
10682 #[builder(setter(into, strip_option), default)]
10684 pub include: Option<Vec<&'a str>>,
10685}
10686#[derive(Builder, Debug, PartialEq)]
10687pub struct ModuleGeneratorsOpts<'a> {
10688 #[builder(setter(into, strip_option), default)]
10690 pub include: Option<Vec<&'a str>>,
10691}
10692#[derive(Builder, Debug, PartialEq)]
10693pub struct ModuleServeOpts {
10694 #[builder(setter(into, strip_option), default)]
10696 pub include_dependencies: Option<bool>,
10697}
10698impl Module {
10699 pub fn check(&self, name: impl Into<String>) -> Check {
10705 let mut query = self.selection.select("check");
10706 query = query.arg("name", name.into());
10707 Check {
10708 proc: self.proc.clone(),
10709 selection: query,
10710 graphql_client: self.graphql_client.clone(),
10711 }
10712 }
10713 pub fn checks(&self) -> CheckGroup {
10719 let query = self.selection.select("checks");
10720 CheckGroup {
10721 proc: self.proc.clone(),
10722 selection: query,
10723 graphql_client: self.graphql_client.clone(),
10724 }
10725 }
10726 pub fn checks_opts<'a>(&self, opts: ModuleChecksOpts<'a>) -> CheckGroup {
10732 let mut query = self.selection.select("checks");
10733 if let Some(include) = opts.include {
10734 query = query.arg("include", include);
10735 }
10736 CheckGroup {
10737 proc: self.proc.clone(),
10738 selection: query,
10739 graphql_client: self.graphql_client.clone(),
10740 }
10741 }
10742 pub fn dependencies(&self) -> Vec<Module> {
10744 let query = self.selection.select("dependencies");
10745 vec![Module {
10746 proc: self.proc.clone(),
10747 selection: query,
10748 graphql_client: self.graphql_client.clone(),
10749 }]
10750 }
10751 pub async fn description(&self) -> Result<String, DaggerError> {
10753 let query = self.selection.select("description");
10754 query.execute(self.graphql_client.clone()).await
10755 }
10756 pub fn enums(&self) -> Vec<TypeDef> {
10758 let query = self.selection.select("enums");
10759 vec![TypeDef {
10760 proc: self.proc.clone(),
10761 selection: query,
10762 graphql_client: self.graphql_client.clone(),
10763 }]
10764 }
10765 pub fn generated_context_directory(&self) -> Directory {
10767 let query = self.selection.select("generatedContextDirectory");
10768 Directory {
10769 proc: self.proc.clone(),
10770 selection: query,
10771 graphql_client: self.graphql_client.clone(),
10772 }
10773 }
10774 pub fn generator(&self, name: impl Into<String>) -> Generator {
10780 let mut query = self.selection.select("generator");
10781 query = query.arg("name", name.into());
10782 Generator {
10783 proc: self.proc.clone(),
10784 selection: query,
10785 graphql_client: self.graphql_client.clone(),
10786 }
10787 }
10788 pub fn generators(&self) -> GeneratorGroup {
10794 let query = self.selection.select("generators");
10795 GeneratorGroup {
10796 proc: self.proc.clone(),
10797 selection: query,
10798 graphql_client: self.graphql_client.clone(),
10799 }
10800 }
10801 pub fn generators_opts<'a>(&self, opts: ModuleGeneratorsOpts<'a>) -> GeneratorGroup {
10807 let mut query = self.selection.select("generators");
10808 if let Some(include) = opts.include {
10809 query = query.arg("include", include);
10810 }
10811 GeneratorGroup {
10812 proc: self.proc.clone(),
10813 selection: query,
10814 graphql_client: self.graphql_client.clone(),
10815 }
10816 }
10817 pub async fn id(&self) -> Result<ModuleId, DaggerError> {
10819 let query = self.selection.select("id");
10820 query.execute(self.graphql_client.clone()).await
10821 }
10822 pub fn interfaces(&self) -> Vec<TypeDef> {
10824 let query = self.selection.select("interfaces");
10825 vec![TypeDef {
10826 proc: self.proc.clone(),
10827 selection: query,
10828 graphql_client: self.graphql_client.clone(),
10829 }]
10830 }
10831 pub fn introspection_schema_json(&self) -> File {
10835 let query = self.selection.select("introspectionSchemaJSON");
10836 File {
10837 proc: self.proc.clone(),
10838 selection: query,
10839 graphql_client: self.graphql_client.clone(),
10840 }
10841 }
10842 pub async fn name(&self) -> Result<String, DaggerError> {
10844 let query = self.selection.select("name");
10845 query.execute(self.graphql_client.clone()).await
10846 }
10847 pub fn objects(&self) -> Vec<TypeDef> {
10849 let query = self.selection.select("objects");
10850 vec![TypeDef {
10851 proc: self.proc.clone(),
10852 selection: query,
10853 graphql_client: self.graphql_client.clone(),
10854 }]
10855 }
10856 pub fn runtime(&self) -> Container {
10858 let query = self.selection.select("runtime");
10859 Container {
10860 proc: self.proc.clone(),
10861 selection: query,
10862 graphql_client: self.graphql_client.clone(),
10863 }
10864 }
10865 pub fn sdk(&self) -> SdkConfig {
10867 let query = self.selection.select("sdk");
10868 SdkConfig {
10869 proc: self.proc.clone(),
10870 selection: query,
10871 graphql_client: self.graphql_client.clone(),
10872 }
10873 }
10874 pub async fn serve(&self) -> Result<Void, DaggerError> {
10881 let query = self.selection.select("serve");
10882 query.execute(self.graphql_client.clone()).await
10883 }
10884 pub async fn serve_opts(&self, opts: ModuleServeOpts) -> Result<Void, DaggerError> {
10891 let mut query = self.selection.select("serve");
10892 if let Some(include_dependencies) = opts.include_dependencies {
10893 query = query.arg("includeDependencies", include_dependencies);
10894 }
10895 query.execute(self.graphql_client.clone()).await
10896 }
10897 pub fn source(&self) -> ModuleSource {
10899 let query = self.selection.select("source");
10900 ModuleSource {
10901 proc: self.proc.clone(),
10902 selection: query,
10903 graphql_client: self.graphql_client.clone(),
10904 }
10905 }
10906 pub async fn sync(&self) -> Result<ModuleId, DaggerError> {
10908 let query = self.selection.select("sync");
10909 query.execute(self.graphql_client.clone()).await
10910 }
10911 pub fn user_defaults(&self) -> EnvFile {
10913 let query = self.selection.select("userDefaults");
10914 EnvFile {
10915 proc: self.proc.clone(),
10916 selection: query,
10917 graphql_client: self.graphql_client.clone(),
10918 }
10919 }
10920 pub fn with_description(&self, description: impl Into<String>) -> Module {
10926 let mut query = self.selection.select("withDescription");
10927 query = query.arg("description", description.into());
10928 Module {
10929 proc: self.proc.clone(),
10930 selection: query,
10931 graphql_client: self.graphql_client.clone(),
10932 }
10933 }
10934 pub fn with_enum(&self, r#enum: impl IntoID<TypeDefId>) -> Module {
10936 let mut query = self.selection.select("withEnum");
10937 query = query.arg_lazy(
10938 "enum",
10939 Box::new(move || {
10940 let r#enum = r#enum.clone();
10941 Box::pin(async move { r#enum.into_id().await.unwrap().quote() })
10942 }),
10943 );
10944 Module {
10945 proc: self.proc.clone(),
10946 selection: query,
10947 graphql_client: self.graphql_client.clone(),
10948 }
10949 }
10950 pub fn with_interface(&self, iface: impl IntoID<TypeDefId>) -> Module {
10952 let mut query = self.selection.select("withInterface");
10953 query = query.arg_lazy(
10954 "iface",
10955 Box::new(move || {
10956 let iface = iface.clone();
10957 Box::pin(async move { iface.into_id().await.unwrap().quote() })
10958 }),
10959 );
10960 Module {
10961 proc: self.proc.clone(),
10962 selection: query,
10963 graphql_client: self.graphql_client.clone(),
10964 }
10965 }
10966 pub fn with_object(&self, object: impl IntoID<TypeDefId>) -> Module {
10968 let mut query = self.selection.select("withObject");
10969 query = query.arg_lazy(
10970 "object",
10971 Box::new(move || {
10972 let object = object.clone();
10973 Box::pin(async move { object.into_id().await.unwrap().quote() })
10974 }),
10975 );
10976 Module {
10977 proc: self.proc.clone(),
10978 selection: query,
10979 graphql_client: self.graphql_client.clone(),
10980 }
10981 }
10982}
10983#[derive(Clone)]
10984pub struct ModuleConfigClient {
10985 pub proc: Option<Arc<DaggerSessionProc>>,
10986 pub selection: Selection,
10987 pub graphql_client: DynGraphQLClient,
10988}
10989impl ModuleConfigClient {
10990 pub async fn directory(&self) -> Result<String, DaggerError> {
10992 let query = self.selection.select("directory");
10993 query.execute(self.graphql_client.clone()).await
10994 }
10995 pub async fn generator(&self) -> Result<String, DaggerError> {
10997 let query = self.selection.select("generator");
10998 query.execute(self.graphql_client.clone()).await
10999 }
11000 pub async fn id(&self) -> Result<ModuleConfigClientId, DaggerError> {
11002 let query = self.selection.select("id");
11003 query.execute(self.graphql_client.clone()).await
11004 }
11005}
11006#[derive(Clone)]
11007pub struct ModuleSource {
11008 pub proc: Option<Arc<DaggerSessionProc>>,
11009 pub selection: Selection,
11010 pub graphql_client: DynGraphQLClient,
11011}
11012impl ModuleSource {
11013 pub fn as_module(&self) -> Module {
11015 let query = self.selection.select("asModule");
11016 Module {
11017 proc: self.proc.clone(),
11018 selection: query,
11019 graphql_client: self.graphql_client.clone(),
11020 }
11021 }
11022 pub async fn as_string(&self) -> Result<String, DaggerError> {
11024 let query = self.selection.select("asString");
11025 query.execute(self.graphql_client.clone()).await
11026 }
11027 pub fn blueprint(&self) -> ModuleSource {
11029 let query = self.selection.select("blueprint");
11030 ModuleSource {
11031 proc: self.proc.clone(),
11032 selection: query,
11033 graphql_client: self.graphql_client.clone(),
11034 }
11035 }
11036 pub async fn clone_ref(&self) -> Result<String, DaggerError> {
11038 let query = self.selection.select("cloneRef");
11039 query.execute(self.graphql_client.clone()).await
11040 }
11041 pub async fn commit(&self) -> Result<String, DaggerError> {
11043 let query = self.selection.select("commit");
11044 query.execute(self.graphql_client.clone()).await
11045 }
11046 pub fn config_clients(&self) -> Vec<ModuleConfigClient> {
11048 let query = self.selection.select("configClients");
11049 vec![ModuleConfigClient {
11050 proc: self.proc.clone(),
11051 selection: query,
11052 graphql_client: self.graphql_client.clone(),
11053 }]
11054 }
11055 pub async fn config_exists(&self) -> Result<bool, DaggerError> {
11057 let query = self.selection.select("configExists");
11058 query.execute(self.graphql_client.clone()).await
11059 }
11060 pub fn context_directory(&self) -> Directory {
11062 let query = self.selection.select("contextDirectory");
11063 Directory {
11064 proc: self.proc.clone(),
11065 selection: query,
11066 graphql_client: self.graphql_client.clone(),
11067 }
11068 }
11069 pub fn dependencies(&self) -> Vec<ModuleSource> {
11071 let query = self.selection.select("dependencies");
11072 vec![ModuleSource {
11073 proc: self.proc.clone(),
11074 selection: query,
11075 graphql_client: self.graphql_client.clone(),
11076 }]
11077 }
11078 pub async fn digest(&self) -> Result<String, DaggerError> {
11080 let query = self.selection.select("digest");
11081 query.execute(self.graphql_client.clone()).await
11082 }
11083 pub fn directory(&self, path: impl Into<String>) -> Directory {
11089 let mut query = self.selection.select("directory");
11090 query = query.arg("path", path.into());
11091 Directory {
11092 proc: self.proc.clone(),
11093 selection: query,
11094 graphql_client: self.graphql_client.clone(),
11095 }
11096 }
11097 pub async fn engine_version(&self) -> Result<String, DaggerError> {
11099 let query = self.selection.select("engineVersion");
11100 query.execute(self.graphql_client.clone()).await
11101 }
11102 pub fn generated_context_directory(&self) -> Directory {
11104 let query = self.selection.select("generatedContextDirectory");
11105 Directory {
11106 proc: self.proc.clone(),
11107 selection: query,
11108 graphql_client: self.graphql_client.clone(),
11109 }
11110 }
11111 pub async fn html_repo_url(&self) -> Result<String, DaggerError> {
11113 let query = self.selection.select("htmlRepoURL");
11114 query.execute(self.graphql_client.clone()).await
11115 }
11116 pub async fn html_url(&self) -> Result<String, DaggerError> {
11118 let query = self.selection.select("htmlURL");
11119 query.execute(self.graphql_client.clone()).await
11120 }
11121 pub async fn id(&self) -> Result<ModuleSourceId, DaggerError> {
11123 let query = self.selection.select("id");
11124 query.execute(self.graphql_client.clone()).await
11125 }
11126 pub fn introspection_schema_json(&self) -> File {
11130 let query = self.selection.select("introspectionSchemaJSON");
11131 File {
11132 proc: self.proc.clone(),
11133 selection: query,
11134 graphql_client: self.graphql_client.clone(),
11135 }
11136 }
11137 pub async fn kind(&self) -> Result<ModuleSourceKind, DaggerError> {
11139 let query = self.selection.select("kind");
11140 query.execute(self.graphql_client.clone()).await
11141 }
11142 pub async fn local_context_directory_path(&self) -> Result<String, DaggerError> {
11144 let query = self.selection.select("localContextDirectoryPath");
11145 query.execute(self.graphql_client.clone()).await
11146 }
11147 pub async fn module_name(&self) -> Result<String, DaggerError> {
11149 let query = self.selection.select("moduleName");
11150 query.execute(self.graphql_client.clone()).await
11151 }
11152 pub async fn module_original_name(&self) -> Result<String, DaggerError> {
11154 let query = self.selection.select("moduleOriginalName");
11155 query.execute(self.graphql_client.clone()).await
11156 }
11157 pub async fn original_subpath(&self) -> Result<String, DaggerError> {
11159 let query = self.selection.select("originalSubpath");
11160 query.execute(self.graphql_client.clone()).await
11161 }
11162 pub async fn pin(&self) -> Result<String, DaggerError> {
11164 let query = self.selection.select("pin");
11165 query.execute(self.graphql_client.clone()).await
11166 }
11167 pub async fn repo_root_path(&self) -> Result<String, DaggerError> {
11169 let query = self.selection.select("repoRootPath");
11170 query.execute(self.graphql_client.clone()).await
11171 }
11172 pub fn sdk(&self) -> SdkConfig {
11174 let query = self.selection.select("sdk");
11175 SdkConfig {
11176 proc: self.proc.clone(),
11177 selection: query,
11178 graphql_client: self.graphql_client.clone(),
11179 }
11180 }
11181 pub async fn source_root_subpath(&self) -> Result<String, DaggerError> {
11183 let query = self.selection.select("sourceRootSubpath");
11184 query.execute(self.graphql_client.clone()).await
11185 }
11186 pub async fn source_subpath(&self) -> Result<String, DaggerError> {
11188 let query = self.selection.select("sourceSubpath");
11189 query.execute(self.graphql_client.clone()).await
11190 }
11191 pub async fn sync(&self) -> Result<ModuleSourceId, DaggerError> {
11193 let query = self.selection.select("sync");
11194 query.execute(self.graphql_client.clone()).await
11195 }
11196 pub fn toolchains(&self) -> Vec<ModuleSource> {
11198 let query = self.selection.select("toolchains");
11199 vec![ModuleSource {
11200 proc: self.proc.clone(),
11201 selection: query,
11202 graphql_client: self.graphql_client.clone(),
11203 }]
11204 }
11205 pub fn user_defaults(&self) -> EnvFile {
11207 let query = self.selection.select("userDefaults");
11208 EnvFile {
11209 proc: self.proc.clone(),
11210 selection: query,
11211 graphql_client: self.graphql_client.clone(),
11212 }
11213 }
11214 pub async fn version(&self) -> Result<String, DaggerError> {
11216 let query = self.selection.select("version");
11217 query.execute(self.graphql_client.clone()).await
11218 }
11219 pub fn with_blueprint(&self, blueprint: impl IntoID<ModuleSourceId>) -> ModuleSource {
11225 let mut query = self.selection.select("withBlueprint");
11226 query = query.arg_lazy(
11227 "blueprint",
11228 Box::new(move || {
11229 let blueprint = blueprint.clone();
11230 Box::pin(async move { blueprint.into_id().await.unwrap().quote() })
11231 }),
11232 );
11233 ModuleSource {
11234 proc: self.proc.clone(),
11235 selection: query,
11236 graphql_client: self.graphql_client.clone(),
11237 }
11238 }
11239 pub fn with_client(
11246 &self,
11247 generator: impl Into<String>,
11248 output_dir: impl Into<String>,
11249 ) -> ModuleSource {
11250 let mut query = self.selection.select("withClient");
11251 query = query.arg("generator", generator.into());
11252 query = query.arg("outputDir", output_dir.into());
11253 ModuleSource {
11254 proc: self.proc.clone(),
11255 selection: query,
11256 graphql_client: self.graphql_client.clone(),
11257 }
11258 }
11259 pub fn with_dependencies(&self, dependencies: Vec<ModuleSourceId>) -> ModuleSource {
11265 let mut query = self.selection.select("withDependencies");
11266 query = query.arg("dependencies", dependencies);
11267 ModuleSource {
11268 proc: self.proc.clone(),
11269 selection: query,
11270 graphql_client: self.graphql_client.clone(),
11271 }
11272 }
11273 pub fn with_engine_version(&self, version: impl Into<String>) -> ModuleSource {
11279 let mut query = self.selection.select("withEngineVersion");
11280 query = query.arg("version", version.into());
11281 ModuleSource {
11282 proc: self.proc.clone(),
11283 selection: query,
11284 graphql_client: self.graphql_client.clone(),
11285 }
11286 }
11287 pub fn with_experimental_features(
11293 &self,
11294 features: Vec<ModuleSourceExperimentalFeature>,
11295 ) -> ModuleSource {
11296 let mut query = self.selection.select("withExperimentalFeatures");
11297 query = query.arg("features", features);
11298 ModuleSource {
11299 proc: self.proc.clone(),
11300 selection: query,
11301 graphql_client: self.graphql_client.clone(),
11302 }
11303 }
11304 pub fn with_includes(&self, patterns: Vec<impl Into<String>>) -> ModuleSource {
11310 let mut query = self.selection.select("withIncludes");
11311 query = query.arg(
11312 "patterns",
11313 patterns
11314 .into_iter()
11315 .map(|i| i.into())
11316 .collect::<Vec<String>>(),
11317 );
11318 ModuleSource {
11319 proc: self.proc.clone(),
11320 selection: query,
11321 graphql_client: self.graphql_client.clone(),
11322 }
11323 }
11324 pub fn with_name(&self, name: impl Into<String>) -> ModuleSource {
11330 let mut query = self.selection.select("withName");
11331 query = query.arg("name", name.into());
11332 ModuleSource {
11333 proc: self.proc.clone(),
11334 selection: query,
11335 graphql_client: self.graphql_client.clone(),
11336 }
11337 }
11338 pub fn with_sdk(&self, source: impl Into<String>) -> ModuleSource {
11344 let mut query = self.selection.select("withSDK");
11345 query = query.arg("source", source.into());
11346 ModuleSource {
11347 proc: self.proc.clone(),
11348 selection: query,
11349 graphql_client: self.graphql_client.clone(),
11350 }
11351 }
11352 pub fn with_source_subpath(&self, path: impl Into<String>) -> ModuleSource {
11358 let mut query = self.selection.select("withSourceSubpath");
11359 query = query.arg("path", path.into());
11360 ModuleSource {
11361 proc: self.proc.clone(),
11362 selection: query,
11363 graphql_client: self.graphql_client.clone(),
11364 }
11365 }
11366 pub fn with_toolchains(&self, toolchains: Vec<ModuleSourceId>) -> ModuleSource {
11372 let mut query = self.selection.select("withToolchains");
11373 query = query.arg("toolchains", toolchains);
11374 ModuleSource {
11375 proc: self.proc.clone(),
11376 selection: query,
11377 graphql_client: self.graphql_client.clone(),
11378 }
11379 }
11380 pub fn with_update_blueprint(&self) -> ModuleSource {
11382 let query = self.selection.select("withUpdateBlueprint");
11383 ModuleSource {
11384 proc: self.proc.clone(),
11385 selection: query,
11386 graphql_client: self.graphql_client.clone(),
11387 }
11388 }
11389 pub fn with_update_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
11395 let mut query = self.selection.select("withUpdateDependencies");
11396 query = query.arg(
11397 "dependencies",
11398 dependencies
11399 .into_iter()
11400 .map(|i| i.into())
11401 .collect::<Vec<String>>(),
11402 );
11403 ModuleSource {
11404 proc: self.proc.clone(),
11405 selection: query,
11406 graphql_client: self.graphql_client.clone(),
11407 }
11408 }
11409 pub fn with_update_toolchains(&self, toolchains: Vec<impl Into<String>>) -> ModuleSource {
11415 let mut query = self.selection.select("withUpdateToolchains");
11416 query = query.arg(
11417 "toolchains",
11418 toolchains
11419 .into_iter()
11420 .map(|i| i.into())
11421 .collect::<Vec<String>>(),
11422 );
11423 ModuleSource {
11424 proc: self.proc.clone(),
11425 selection: query,
11426 graphql_client: self.graphql_client.clone(),
11427 }
11428 }
11429 pub fn with_updated_clients(&self, clients: Vec<impl Into<String>>) -> ModuleSource {
11435 let mut query = self.selection.select("withUpdatedClients");
11436 query = query.arg(
11437 "clients",
11438 clients
11439 .into_iter()
11440 .map(|i| i.into())
11441 .collect::<Vec<String>>(),
11442 );
11443 ModuleSource {
11444 proc: self.proc.clone(),
11445 selection: query,
11446 graphql_client: self.graphql_client.clone(),
11447 }
11448 }
11449 pub fn without_blueprint(&self) -> ModuleSource {
11451 let query = self.selection.select("withoutBlueprint");
11452 ModuleSource {
11453 proc: self.proc.clone(),
11454 selection: query,
11455 graphql_client: self.graphql_client.clone(),
11456 }
11457 }
11458 pub fn without_client(&self, path: impl Into<String>) -> ModuleSource {
11464 let mut query = self.selection.select("withoutClient");
11465 query = query.arg("path", path.into());
11466 ModuleSource {
11467 proc: self.proc.clone(),
11468 selection: query,
11469 graphql_client: self.graphql_client.clone(),
11470 }
11471 }
11472 pub fn without_dependencies(&self, dependencies: Vec<impl Into<String>>) -> ModuleSource {
11478 let mut query = self.selection.select("withoutDependencies");
11479 query = query.arg(
11480 "dependencies",
11481 dependencies
11482 .into_iter()
11483 .map(|i| i.into())
11484 .collect::<Vec<String>>(),
11485 );
11486 ModuleSource {
11487 proc: self.proc.clone(),
11488 selection: query,
11489 graphql_client: self.graphql_client.clone(),
11490 }
11491 }
11492 pub fn without_experimental_features(
11498 &self,
11499 features: Vec<ModuleSourceExperimentalFeature>,
11500 ) -> ModuleSource {
11501 let mut query = self.selection.select("withoutExperimentalFeatures");
11502 query = query.arg("features", features);
11503 ModuleSource {
11504 proc: self.proc.clone(),
11505 selection: query,
11506 graphql_client: self.graphql_client.clone(),
11507 }
11508 }
11509 pub fn without_toolchains(&self, toolchains: Vec<impl Into<String>>) -> ModuleSource {
11515 let mut query = self.selection.select("withoutToolchains");
11516 query = query.arg(
11517 "toolchains",
11518 toolchains
11519 .into_iter()
11520 .map(|i| i.into())
11521 .collect::<Vec<String>>(),
11522 );
11523 ModuleSource {
11524 proc: self.proc.clone(),
11525 selection: query,
11526 graphql_client: self.graphql_client.clone(),
11527 }
11528 }
11529}
11530#[derive(Clone)]
11531pub struct ObjectTypeDef {
11532 pub proc: Option<Arc<DaggerSessionProc>>,
11533 pub selection: Selection,
11534 pub graphql_client: DynGraphQLClient,
11535}
11536impl ObjectTypeDef {
11537 pub fn constructor(&self) -> Function {
11539 let query = self.selection.select("constructor");
11540 Function {
11541 proc: self.proc.clone(),
11542 selection: query,
11543 graphql_client: self.graphql_client.clone(),
11544 }
11545 }
11546 pub async fn deprecated(&self) -> Result<String, DaggerError> {
11548 let query = self.selection.select("deprecated");
11549 query.execute(self.graphql_client.clone()).await
11550 }
11551 pub async fn description(&self) -> Result<String, DaggerError> {
11553 let query = self.selection.select("description");
11554 query.execute(self.graphql_client.clone()).await
11555 }
11556 pub fn fields(&self) -> Vec<FieldTypeDef> {
11558 let query = self.selection.select("fields");
11559 vec![FieldTypeDef {
11560 proc: self.proc.clone(),
11561 selection: query,
11562 graphql_client: self.graphql_client.clone(),
11563 }]
11564 }
11565 pub fn functions(&self) -> Vec<Function> {
11567 let query = self.selection.select("functions");
11568 vec![Function {
11569 proc: self.proc.clone(),
11570 selection: query,
11571 graphql_client: self.graphql_client.clone(),
11572 }]
11573 }
11574 pub async fn id(&self) -> Result<ObjectTypeDefId, DaggerError> {
11576 let query = self.selection.select("id");
11577 query.execute(self.graphql_client.clone()).await
11578 }
11579 pub async fn name(&self) -> Result<String, DaggerError> {
11581 let query = self.selection.select("name");
11582 query.execute(self.graphql_client.clone()).await
11583 }
11584 pub fn source_map(&self) -> SourceMap {
11586 let query = self.selection.select("sourceMap");
11587 SourceMap {
11588 proc: self.proc.clone(),
11589 selection: query,
11590 graphql_client: self.graphql_client.clone(),
11591 }
11592 }
11593 pub async fn source_module_name(&self) -> Result<String, DaggerError> {
11595 let query = self.selection.select("sourceModuleName");
11596 query.execute(self.graphql_client.clone()).await
11597 }
11598}
11599#[derive(Clone)]
11600pub struct Port {
11601 pub proc: Option<Arc<DaggerSessionProc>>,
11602 pub selection: Selection,
11603 pub graphql_client: DynGraphQLClient,
11604}
11605impl Port {
11606 pub async fn description(&self) -> Result<String, DaggerError> {
11608 let query = self.selection.select("description");
11609 query.execute(self.graphql_client.clone()).await
11610 }
11611 pub async fn experimental_skip_healthcheck(&self) -> Result<bool, DaggerError> {
11613 let query = self.selection.select("experimentalSkipHealthcheck");
11614 query.execute(self.graphql_client.clone()).await
11615 }
11616 pub async fn id(&self) -> Result<PortId, DaggerError> {
11618 let query = self.selection.select("id");
11619 query.execute(self.graphql_client.clone()).await
11620 }
11621 pub async fn port(&self) -> Result<isize, DaggerError> {
11623 let query = self.selection.select("port");
11624 query.execute(self.graphql_client.clone()).await
11625 }
11626 pub async fn protocol(&self) -> Result<NetworkProtocol, DaggerError> {
11628 let query = self.selection.select("protocol");
11629 query.execute(self.graphql_client.clone()).await
11630 }
11631}
11632#[derive(Clone)]
11633pub struct Query {
11634 pub proc: Option<Arc<DaggerSessionProc>>,
11635 pub selection: Selection,
11636 pub graphql_client: DynGraphQLClient,
11637}
11638#[derive(Builder, Debug, PartialEq)]
11639pub struct QueryContainerOpts {
11640 #[builder(setter(into, strip_option), default)]
11642 pub platform: Option<Platform>,
11643}
11644#[derive(Builder, Debug, PartialEq)]
11645pub struct QueryEnvOpts {
11646 #[builder(setter(into, strip_option), default)]
11648 pub privileged: Option<bool>,
11649 #[builder(setter(into, strip_option), default)]
11651 pub writable: Option<bool>,
11652}
11653#[derive(Builder, Debug, PartialEq)]
11654pub struct QueryEnvFileOpts {
11655 #[builder(setter(into, strip_option), default)]
11657 pub expand: Option<bool>,
11658}
11659#[derive(Builder, Debug, PartialEq)]
11660pub struct QueryFileOpts {
11661 #[builder(setter(into, strip_option), default)]
11663 pub permissions: Option<isize>,
11664}
11665#[derive(Builder, Debug, PartialEq)]
11666pub struct QueryGitOpts<'a> {
11667 #[builder(setter(into, strip_option), default)]
11669 pub experimental_service_host: Option<ServiceId>,
11670 #[builder(setter(into, strip_option), default)]
11672 pub http_auth_header: Option<SecretId>,
11673 #[builder(setter(into, strip_option), default)]
11675 pub http_auth_token: Option<SecretId>,
11676 #[builder(setter(into, strip_option), default)]
11678 pub http_auth_username: Option<&'a str>,
11679 #[builder(setter(into, strip_option), default)]
11681 pub keep_git_dir: Option<bool>,
11682 #[builder(setter(into, strip_option), default)]
11684 pub ssh_auth_socket: Option<SocketId>,
11685 #[builder(setter(into, strip_option), default)]
11687 pub ssh_known_hosts: Option<&'a str>,
11688}
11689#[derive(Builder, Debug, PartialEq)]
11690pub struct QueryHttpOpts<'a> {
11691 #[builder(setter(into, strip_option), default)]
11693 pub auth_header: Option<SecretId>,
11694 #[builder(setter(into, strip_option), default)]
11696 pub experimental_service_host: Option<ServiceId>,
11697 #[builder(setter(into, strip_option), default)]
11699 pub name: Option<&'a str>,
11700 #[builder(setter(into, strip_option), default)]
11702 pub permissions: Option<isize>,
11703}
11704#[derive(Builder, Debug, PartialEq)]
11705pub struct QueryLlmOpts<'a> {
11706 #[builder(setter(into, strip_option), default)]
11708 pub max_api_calls: Option<isize>,
11709 #[builder(setter(into, strip_option), default)]
11711 pub model: Option<&'a str>,
11712}
11713#[derive(Builder, Debug, PartialEq)]
11714pub struct QueryModuleSourceOpts<'a> {
11715 #[builder(setter(into, strip_option), default)]
11717 pub allow_not_exists: Option<bool>,
11718 #[builder(setter(into, strip_option), default)]
11720 pub disable_find_up: Option<bool>,
11721 #[builder(setter(into, strip_option), default)]
11723 pub ref_pin: Option<&'a str>,
11724 #[builder(setter(into, strip_option), default)]
11726 pub require_kind: Option<ModuleSourceKind>,
11727}
11728#[derive(Builder, Debug, PartialEq)]
11729pub struct QuerySecretOpts<'a> {
11730 #[builder(setter(into, strip_option), default)]
11734 pub cache_key: Option<&'a str>,
11735}
11736impl Query {
11737 pub fn address(&self, value: impl Into<String>) -> Address {
11739 let mut query = self.selection.select("address");
11740 query = query.arg("value", value.into());
11741 Address {
11742 proc: self.proc.clone(),
11743 selection: query,
11744 graphql_client: self.graphql_client.clone(),
11745 }
11746 }
11747 pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume {
11753 let mut query = self.selection.select("cacheVolume");
11754 query = query.arg("key", key.into());
11755 CacheVolume {
11756 proc: self.proc.clone(),
11757 selection: query,
11758 graphql_client: self.graphql_client.clone(),
11759 }
11760 }
11761 pub fn cloud(&self) -> Cloud {
11763 let query = self.selection.select("cloud");
11764 Cloud {
11765 proc: self.proc.clone(),
11766 selection: query,
11767 graphql_client: self.graphql_client.clone(),
11768 }
11769 }
11770 pub fn container(&self) -> Container {
11777 let query = self.selection.select("container");
11778 Container {
11779 proc: self.proc.clone(),
11780 selection: query,
11781 graphql_client: self.graphql_client.clone(),
11782 }
11783 }
11784 pub fn container_opts(&self, opts: QueryContainerOpts) -> Container {
11791 let mut query = self.selection.select("container");
11792 if let Some(platform) = opts.platform {
11793 query = query.arg("platform", platform);
11794 }
11795 Container {
11796 proc: self.proc.clone(),
11797 selection: query,
11798 graphql_client: self.graphql_client.clone(),
11799 }
11800 }
11801 pub fn current_env(&self) -> Env {
11805 let query = self.selection.select("currentEnv");
11806 Env {
11807 proc: self.proc.clone(),
11808 selection: query,
11809 graphql_client: self.graphql_client.clone(),
11810 }
11811 }
11812 pub fn current_function_call(&self) -> FunctionCall {
11815 let query = self.selection.select("currentFunctionCall");
11816 FunctionCall {
11817 proc: self.proc.clone(),
11818 selection: query,
11819 graphql_client: self.graphql_client.clone(),
11820 }
11821 }
11822 pub fn current_module(&self) -> CurrentModule {
11824 let query = self.selection.select("currentModule");
11825 CurrentModule {
11826 proc: self.proc.clone(),
11827 selection: query,
11828 graphql_client: self.graphql_client.clone(),
11829 }
11830 }
11831 pub fn current_type_defs(&self) -> Vec<TypeDef> {
11833 let query = self.selection.select("currentTypeDefs");
11834 vec![TypeDef {
11835 proc: self.proc.clone(),
11836 selection: query,
11837 graphql_client: self.graphql_client.clone(),
11838 }]
11839 }
11840 pub async fn default_platform(&self) -> Result<Platform, DaggerError> {
11842 let query = self.selection.select("defaultPlatform");
11843 query.execute(self.graphql_client.clone()).await
11844 }
11845 pub fn directory(&self) -> Directory {
11847 let query = self.selection.select("directory");
11848 Directory {
11849 proc: self.proc.clone(),
11850 selection: query,
11851 graphql_client: self.graphql_client.clone(),
11852 }
11853 }
11854 pub fn engine(&self) -> Engine {
11856 let query = self.selection.select("engine");
11857 Engine {
11858 proc: self.proc.clone(),
11859 selection: query,
11860 graphql_client: self.graphql_client.clone(),
11861 }
11862 }
11863 pub fn env(&self) -> Env {
11869 let query = self.selection.select("env");
11870 Env {
11871 proc: self.proc.clone(),
11872 selection: query,
11873 graphql_client: self.graphql_client.clone(),
11874 }
11875 }
11876 pub fn env_opts(&self, opts: QueryEnvOpts) -> Env {
11882 let mut query = self.selection.select("env");
11883 if let Some(privileged) = opts.privileged {
11884 query = query.arg("privileged", privileged);
11885 }
11886 if let Some(writable) = opts.writable {
11887 query = query.arg("writable", writable);
11888 }
11889 Env {
11890 proc: self.proc.clone(),
11891 selection: query,
11892 graphql_client: self.graphql_client.clone(),
11893 }
11894 }
11895 pub fn env_file(&self) -> EnvFile {
11901 let query = self.selection.select("envFile");
11902 EnvFile {
11903 proc: self.proc.clone(),
11904 selection: query,
11905 graphql_client: self.graphql_client.clone(),
11906 }
11907 }
11908 pub fn env_file_opts(&self, opts: QueryEnvFileOpts) -> EnvFile {
11914 let mut query = self.selection.select("envFile");
11915 if let Some(expand) = opts.expand {
11916 query = query.arg("expand", expand);
11917 }
11918 EnvFile {
11919 proc: self.proc.clone(),
11920 selection: query,
11921 graphql_client: self.graphql_client.clone(),
11922 }
11923 }
11924 pub fn error(&self, message: impl Into<String>) -> Error {
11930 let mut query = self.selection.select("error");
11931 query = query.arg("message", message.into());
11932 Error {
11933 proc: self.proc.clone(),
11934 selection: query,
11935 graphql_client: self.graphql_client.clone(),
11936 }
11937 }
11938 pub fn file(&self, name: impl Into<String>, contents: impl Into<String>) -> File {
11946 let mut query = self.selection.select("file");
11947 query = query.arg("name", name.into());
11948 query = query.arg("contents", contents.into());
11949 File {
11950 proc: self.proc.clone(),
11951 selection: query,
11952 graphql_client: self.graphql_client.clone(),
11953 }
11954 }
11955 pub fn file_opts(
11963 &self,
11964 name: impl Into<String>,
11965 contents: impl Into<String>,
11966 opts: QueryFileOpts,
11967 ) -> File {
11968 let mut query = self.selection.select("file");
11969 query = query.arg("name", name.into());
11970 query = query.arg("contents", contents.into());
11971 if let Some(permissions) = opts.permissions {
11972 query = query.arg("permissions", permissions);
11973 }
11974 File {
11975 proc: self.proc.clone(),
11976 selection: query,
11977 graphql_client: self.graphql_client.clone(),
11978 }
11979 }
11980 pub fn function(
11987 &self,
11988 name: impl Into<String>,
11989 return_type: impl IntoID<TypeDefId>,
11990 ) -> Function {
11991 let mut query = self.selection.select("function");
11992 query = query.arg("name", name.into());
11993 query = query.arg_lazy(
11994 "returnType",
11995 Box::new(move || {
11996 let return_type = return_type.clone();
11997 Box::pin(async move { return_type.into_id().await.unwrap().quote() })
11998 }),
11999 );
12000 Function {
12001 proc: self.proc.clone(),
12002 selection: query,
12003 graphql_client: self.graphql_client.clone(),
12004 }
12005 }
12006 pub fn generated_code(&self, code: impl IntoID<DirectoryId>) -> GeneratedCode {
12008 let mut query = self.selection.select("generatedCode");
12009 query = query.arg_lazy(
12010 "code",
12011 Box::new(move || {
12012 let code = code.clone();
12013 Box::pin(async move { code.into_id().await.unwrap().quote() })
12014 }),
12015 );
12016 GeneratedCode {
12017 proc: self.proc.clone(),
12018 selection: query,
12019 graphql_client: self.graphql_client.clone(),
12020 }
12021 }
12022 pub fn git(&self, url: impl Into<String>) -> GitRepository {
12033 let mut query = self.selection.select("git");
12034 query = query.arg("url", url.into());
12035 GitRepository {
12036 proc: self.proc.clone(),
12037 selection: query,
12038 graphql_client: self.graphql_client.clone(),
12039 }
12040 }
12041 pub fn git_opts<'a>(&self, url: impl Into<String>, opts: QueryGitOpts<'a>) -> GitRepository {
12052 let mut query = self.selection.select("git");
12053 query = query.arg("url", url.into());
12054 if let Some(keep_git_dir) = opts.keep_git_dir {
12055 query = query.arg("keepGitDir", keep_git_dir);
12056 }
12057 if let Some(ssh_known_hosts) = opts.ssh_known_hosts {
12058 query = query.arg("sshKnownHosts", ssh_known_hosts);
12059 }
12060 if let Some(ssh_auth_socket) = opts.ssh_auth_socket {
12061 query = query.arg("sshAuthSocket", ssh_auth_socket);
12062 }
12063 if let Some(http_auth_username) = opts.http_auth_username {
12064 query = query.arg("httpAuthUsername", http_auth_username);
12065 }
12066 if let Some(http_auth_token) = opts.http_auth_token {
12067 query = query.arg("httpAuthToken", http_auth_token);
12068 }
12069 if let Some(http_auth_header) = opts.http_auth_header {
12070 query = query.arg("httpAuthHeader", http_auth_header);
12071 }
12072 if let Some(experimental_service_host) = opts.experimental_service_host {
12073 query = query.arg("experimentalServiceHost", experimental_service_host);
12074 }
12075 GitRepository {
12076 proc: self.proc.clone(),
12077 selection: query,
12078 graphql_client: self.graphql_client.clone(),
12079 }
12080 }
12081 pub fn host(&self) -> Host {
12083 let query = self.selection.select("host");
12084 Host {
12085 proc: self.proc.clone(),
12086 selection: query,
12087 graphql_client: self.graphql_client.clone(),
12088 }
12089 }
12090 pub fn http(&self, url: impl Into<String>) -> File {
12097 let mut query = self.selection.select("http");
12098 query = query.arg("url", url.into());
12099 File {
12100 proc: self.proc.clone(),
12101 selection: query,
12102 graphql_client: self.graphql_client.clone(),
12103 }
12104 }
12105 pub fn http_opts<'a>(&self, url: impl Into<String>, opts: QueryHttpOpts<'a>) -> File {
12112 let mut query = self.selection.select("http");
12113 query = query.arg("url", url.into());
12114 if let Some(name) = opts.name {
12115 query = query.arg("name", name);
12116 }
12117 if let Some(permissions) = opts.permissions {
12118 query = query.arg("permissions", permissions);
12119 }
12120 if let Some(auth_header) = opts.auth_header {
12121 query = query.arg("authHeader", auth_header);
12122 }
12123 if let Some(experimental_service_host) = opts.experimental_service_host {
12124 query = query.arg("experimentalServiceHost", experimental_service_host);
12125 }
12126 File {
12127 proc: self.proc.clone(),
12128 selection: query,
12129 graphql_client: self.graphql_client.clone(),
12130 }
12131 }
12132 pub fn json(&self) -> JsonValue {
12134 let query = self.selection.select("json");
12135 JsonValue {
12136 proc: self.proc.clone(),
12137 selection: query,
12138 graphql_client: self.graphql_client.clone(),
12139 }
12140 }
12141 pub fn llm(&self) -> Llm {
12147 let query = self.selection.select("llm");
12148 Llm {
12149 proc: self.proc.clone(),
12150 selection: query,
12151 graphql_client: self.graphql_client.clone(),
12152 }
12153 }
12154 pub fn llm_opts<'a>(&self, opts: QueryLlmOpts<'a>) -> Llm {
12160 let mut query = self.selection.select("llm");
12161 if let Some(model) = opts.model {
12162 query = query.arg("model", model);
12163 }
12164 if let Some(max_api_calls) = opts.max_api_calls {
12165 query = query.arg("maxAPICalls", max_api_calls);
12166 }
12167 Llm {
12168 proc: self.proc.clone(),
12169 selection: query,
12170 graphql_client: self.graphql_client.clone(),
12171 }
12172 }
12173 pub fn load_address_from_id(&self, id: impl IntoID<AddressId>) -> Address {
12175 let mut query = self.selection.select("loadAddressFromID");
12176 query = query.arg_lazy(
12177 "id",
12178 Box::new(move || {
12179 let id = id.clone();
12180 Box::pin(async move { id.into_id().await.unwrap().quote() })
12181 }),
12182 );
12183 Address {
12184 proc: self.proc.clone(),
12185 selection: query,
12186 graphql_client: self.graphql_client.clone(),
12187 }
12188 }
12189 pub fn load_binding_from_id(&self, id: impl IntoID<BindingId>) -> Binding {
12191 let mut query = self.selection.select("loadBindingFromID");
12192 query = query.arg_lazy(
12193 "id",
12194 Box::new(move || {
12195 let id = id.clone();
12196 Box::pin(async move { id.into_id().await.unwrap().quote() })
12197 }),
12198 );
12199 Binding {
12200 proc: self.proc.clone(),
12201 selection: query,
12202 graphql_client: self.graphql_client.clone(),
12203 }
12204 }
12205 pub fn load_cache_volume_from_id(&self, id: impl IntoID<CacheVolumeId>) -> CacheVolume {
12207 let mut query = self.selection.select("loadCacheVolumeFromID");
12208 query = query.arg_lazy(
12209 "id",
12210 Box::new(move || {
12211 let id = id.clone();
12212 Box::pin(async move { id.into_id().await.unwrap().quote() })
12213 }),
12214 );
12215 CacheVolume {
12216 proc: self.proc.clone(),
12217 selection: query,
12218 graphql_client: self.graphql_client.clone(),
12219 }
12220 }
12221 pub fn load_changeset_from_id(&self, id: impl IntoID<ChangesetId>) -> Changeset {
12223 let mut query = self.selection.select("loadChangesetFromID");
12224 query = query.arg_lazy(
12225 "id",
12226 Box::new(move || {
12227 let id = id.clone();
12228 Box::pin(async move { id.into_id().await.unwrap().quote() })
12229 }),
12230 );
12231 Changeset {
12232 proc: self.proc.clone(),
12233 selection: query,
12234 graphql_client: self.graphql_client.clone(),
12235 }
12236 }
12237 pub fn load_check_from_id(&self, id: impl IntoID<CheckId>) -> Check {
12239 let mut query = self.selection.select("loadCheckFromID");
12240 query = query.arg_lazy(
12241 "id",
12242 Box::new(move || {
12243 let id = id.clone();
12244 Box::pin(async move { id.into_id().await.unwrap().quote() })
12245 }),
12246 );
12247 Check {
12248 proc: self.proc.clone(),
12249 selection: query,
12250 graphql_client: self.graphql_client.clone(),
12251 }
12252 }
12253 pub fn load_check_group_from_id(&self, id: impl IntoID<CheckGroupId>) -> CheckGroup {
12255 let mut query = self.selection.select("loadCheckGroupFromID");
12256 query = query.arg_lazy(
12257 "id",
12258 Box::new(move || {
12259 let id = id.clone();
12260 Box::pin(async move { id.into_id().await.unwrap().quote() })
12261 }),
12262 );
12263 CheckGroup {
12264 proc: self.proc.clone(),
12265 selection: query,
12266 graphql_client: self.graphql_client.clone(),
12267 }
12268 }
12269 pub fn load_cloud_from_id(&self, id: impl IntoID<CloudId>) -> Cloud {
12271 let mut query = self.selection.select("loadCloudFromID");
12272 query = query.arg_lazy(
12273 "id",
12274 Box::new(move || {
12275 let id = id.clone();
12276 Box::pin(async move { id.into_id().await.unwrap().quote() })
12277 }),
12278 );
12279 Cloud {
12280 proc: self.proc.clone(),
12281 selection: query,
12282 graphql_client: self.graphql_client.clone(),
12283 }
12284 }
12285 pub fn load_container_from_id(&self, id: impl IntoID<ContainerId>) -> Container {
12287 let mut query = self.selection.select("loadContainerFromID");
12288 query = query.arg_lazy(
12289 "id",
12290 Box::new(move || {
12291 let id = id.clone();
12292 Box::pin(async move { id.into_id().await.unwrap().quote() })
12293 }),
12294 );
12295 Container {
12296 proc: self.proc.clone(),
12297 selection: query,
12298 graphql_client: self.graphql_client.clone(),
12299 }
12300 }
12301 pub fn load_current_module_from_id(&self, id: impl IntoID<CurrentModuleId>) -> CurrentModule {
12303 let mut query = self.selection.select("loadCurrentModuleFromID");
12304 query = query.arg_lazy(
12305 "id",
12306 Box::new(move || {
12307 let id = id.clone();
12308 Box::pin(async move { id.into_id().await.unwrap().quote() })
12309 }),
12310 );
12311 CurrentModule {
12312 proc: self.proc.clone(),
12313 selection: query,
12314 graphql_client: self.graphql_client.clone(),
12315 }
12316 }
12317 pub fn load_directory_from_id(&self, id: impl IntoID<DirectoryId>) -> Directory {
12319 let mut query = self.selection.select("loadDirectoryFromID");
12320 query = query.arg_lazy(
12321 "id",
12322 Box::new(move || {
12323 let id = id.clone();
12324 Box::pin(async move { id.into_id().await.unwrap().quote() })
12325 }),
12326 );
12327 Directory {
12328 proc: self.proc.clone(),
12329 selection: query,
12330 graphql_client: self.graphql_client.clone(),
12331 }
12332 }
12333 pub fn load_engine_cache_entry_from_id(
12335 &self,
12336 id: impl IntoID<EngineCacheEntryId>,
12337 ) -> EngineCacheEntry {
12338 let mut query = self.selection.select("loadEngineCacheEntryFromID");
12339 query = query.arg_lazy(
12340 "id",
12341 Box::new(move || {
12342 let id = id.clone();
12343 Box::pin(async move { id.into_id().await.unwrap().quote() })
12344 }),
12345 );
12346 EngineCacheEntry {
12347 proc: self.proc.clone(),
12348 selection: query,
12349 graphql_client: self.graphql_client.clone(),
12350 }
12351 }
12352 pub fn load_engine_cache_entry_set_from_id(
12354 &self,
12355 id: impl IntoID<EngineCacheEntrySetId>,
12356 ) -> EngineCacheEntrySet {
12357 let mut query = self.selection.select("loadEngineCacheEntrySetFromID");
12358 query = query.arg_lazy(
12359 "id",
12360 Box::new(move || {
12361 let id = id.clone();
12362 Box::pin(async move { id.into_id().await.unwrap().quote() })
12363 }),
12364 );
12365 EngineCacheEntrySet {
12366 proc: self.proc.clone(),
12367 selection: query,
12368 graphql_client: self.graphql_client.clone(),
12369 }
12370 }
12371 pub fn load_engine_cache_from_id(&self, id: impl IntoID<EngineCacheId>) -> EngineCache {
12373 let mut query = self.selection.select("loadEngineCacheFromID");
12374 query = query.arg_lazy(
12375 "id",
12376 Box::new(move || {
12377 let id = id.clone();
12378 Box::pin(async move { id.into_id().await.unwrap().quote() })
12379 }),
12380 );
12381 EngineCache {
12382 proc: self.proc.clone(),
12383 selection: query,
12384 graphql_client: self.graphql_client.clone(),
12385 }
12386 }
12387 pub fn load_engine_from_id(&self, id: impl IntoID<EngineId>) -> Engine {
12389 let mut query = self.selection.select("loadEngineFromID");
12390 query = query.arg_lazy(
12391 "id",
12392 Box::new(move || {
12393 let id = id.clone();
12394 Box::pin(async move { id.into_id().await.unwrap().quote() })
12395 }),
12396 );
12397 Engine {
12398 proc: self.proc.clone(),
12399 selection: query,
12400 graphql_client: self.graphql_client.clone(),
12401 }
12402 }
12403 pub fn load_enum_type_def_from_id(&self, id: impl IntoID<EnumTypeDefId>) -> EnumTypeDef {
12405 let mut query = self.selection.select("loadEnumTypeDefFromID");
12406 query = query.arg_lazy(
12407 "id",
12408 Box::new(move || {
12409 let id = id.clone();
12410 Box::pin(async move { id.into_id().await.unwrap().quote() })
12411 }),
12412 );
12413 EnumTypeDef {
12414 proc: self.proc.clone(),
12415 selection: query,
12416 graphql_client: self.graphql_client.clone(),
12417 }
12418 }
12419 pub fn load_enum_value_type_def_from_id(
12421 &self,
12422 id: impl IntoID<EnumValueTypeDefId>,
12423 ) -> EnumValueTypeDef {
12424 let mut query = self.selection.select("loadEnumValueTypeDefFromID");
12425 query = query.arg_lazy(
12426 "id",
12427 Box::new(move || {
12428 let id = id.clone();
12429 Box::pin(async move { id.into_id().await.unwrap().quote() })
12430 }),
12431 );
12432 EnumValueTypeDef {
12433 proc: self.proc.clone(),
12434 selection: query,
12435 graphql_client: self.graphql_client.clone(),
12436 }
12437 }
12438 pub fn load_env_file_from_id(&self, id: impl IntoID<EnvFileId>) -> EnvFile {
12440 let mut query = self.selection.select("loadEnvFileFromID");
12441 query = query.arg_lazy(
12442 "id",
12443 Box::new(move || {
12444 let id = id.clone();
12445 Box::pin(async move { id.into_id().await.unwrap().quote() })
12446 }),
12447 );
12448 EnvFile {
12449 proc: self.proc.clone(),
12450 selection: query,
12451 graphql_client: self.graphql_client.clone(),
12452 }
12453 }
12454 pub fn load_env_from_id(&self, id: impl IntoID<EnvId>) -> Env {
12456 let mut query = self.selection.select("loadEnvFromID");
12457 query = query.arg_lazy(
12458 "id",
12459 Box::new(move || {
12460 let id = id.clone();
12461 Box::pin(async move { id.into_id().await.unwrap().quote() })
12462 }),
12463 );
12464 Env {
12465 proc: self.proc.clone(),
12466 selection: query,
12467 graphql_client: self.graphql_client.clone(),
12468 }
12469 }
12470 pub fn load_env_variable_from_id(&self, id: impl IntoID<EnvVariableId>) -> EnvVariable {
12472 let mut query = self.selection.select("loadEnvVariableFromID");
12473 query = query.arg_lazy(
12474 "id",
12475 Box::new(move || {
12476 let id = id.clone();
12477 Box::pin(async move { id.into_id().await.unwrap().quote() })
12478 }),
12479 );
12480 EnvVariable {
12481 proc: self.proc.clone(),
12482 selection: query,
12483 graphql_client: self.graphql_client.clone(),
12484 }
12485 }
12486 pub fn load_error_from_id(&self, id: impl IntoID<ErrorId>) -> Error {
12488 let mut query = self.selection.select("loadErrorFromID");
12489 query = query.arg_lazy(
12490 "id",
12491 Box::new(move || {
12492 let id = id.clone();
12493 Box::pin(async move { id.into_id().await.unwrap().quote() })
12494 }),
12495 );
12496 Error {
12497 proc: self.proc.clone(),
12498 selection: query,
12499 graphql_client: self.graphql_client.clone(),
12500 }
12501 }
12502 pub fn load_error_value_from_id(&self, id: impl IntoID<ErrorValueId>) -> ErrorValue {
12504 let mut query = self.selection.select("loadErrorValueFromID");
12505 query = query.arg_lazy(
12506 "id",
12507 Box::new(move || {
12508 let id = id.clone();
12509 Box::pin(async move { id.into_id().await.unwrap().quote() })
12510 }),
12511 );
12512 ErrorValue {
12513 proc: self.proc.clone(),
12514 selection: query,
12515 graphql_client: self.graphql_client.clone(),
12516 }
12517 }
12518 pub fn load_field_type_def_from_id(&self, id: impl IntoID<FieldTypeDefId>) -> FieldTypeDef {
12520 let mut query = self.selection.select("loadFieldTypeDefFromID");
12521 query = query.arg_lazy(
12522 "id",
12523 Box::new(move || {
12524 let id = id.clone();
12525 Box::pin(async move { id.into_id().await.unwrap().quote() })
12526 }),
12527 );
12528 FieldTypeDef {
12529 proc: self.proc.clone(),
12530 selection: query,
12531 graphql_client: self.graphql_client.clone(),
12532 }
12533 }
12534 pub fn load_file_from_id(&self, id: impl IntoID<FileId>) -> File {
12536 let mut query = self.selection.select("loadFileFromID");
12537 query = query.arg_lazy(
12538 "id",
12539 Box::new(move || {
12540 let id = id.clone();
12541 Box::pin(async move { id.into_id().await.unwrap().quote() })
12542 }),
12543 );
12544 File {
12545 proc: self.proc.clone(),
12546 selection: query,
12547 graphql_client: self.graphql_client.clone(),
12548 }
12549 }
12550 pub fn load_function_arg_from_id(&self, id: impl IntoID<FunctionArgId>) -> FunctionArg {
12552 let mut query = self.selection.select("loadFunctionArgFromID");
12553 query = query.arg_lazy(
12554 "id",
12555 Box::new(move || {
12556 let id = id.clone();
12557 Box::pin(async move { id.into_id().await.unwrap().quote() })
12558 }),
12559 );
12560 FunctionArg {
12561 proc: self.proc.clone(),
12562 selection: query,
12563 graphql_client: self.graphql_client.clone(),
12564 }
12565 }
12566 pub fn load_function_call_arg_value_from_id(
12568 &self,
12569 id: impl IntoID<FunctionCallArgValueId>,
12570 ) -> FunctionCallArgValue {
12571 let mut query = self.selection.select("loadFunctionCallArgValueFromID");
12572 query = query.arg_lazy(
12573 "id",
12574 Box::new(move || {
12575 let id = id.clone();
12576 Box::pin(async move { id.into_id().await.unwrap().quote() })
12577 }),
12578 );
12579 FunctionCallArgValue {
12580 proc: self.proc.clone(),
12581 selection: query,
12582 graphql_client: self.graphql_client.clone(),
12583 }
12584 }
12585 pub fn load_function_call_from_id(&self, id: impl IntoID<FunctionCallId>) -> FunctionCall {
12587 let mut query = self.selection.select("loadFunctionCallFromID");
12588 query = query.arg_lazy(
12589 "id",
12590 Box::new(move || {
12591 let id = id.clone();
12592 Box::pin(async move { id.into_id().await.unwrap().quote() })
12593 }),
12594 );
12595 FunctionCall {
12596 proc: self.proc.clone(),
12597 selection: query,
12598 graphql_client: self.graphql_client.clone(),
12599 }
12600 }
12601 pub fn load_function_from_id(&self, id: impl IntoID<FunctionId>) -> Function {
12603 let mut query = self.selection.select("loadFunctionFromID");
12604 query = query.arg_lazy(
12605 "id",
12606 Box::new(move || {
12607 let id = id.clone();
12608 Box::pin(async move { id.into_id().await.unwrap().quote() })
12609 }),
12610 );
12611 Function {
12612 proc: self.proc.clone(),
12613 selection: query,
12614 graphql_client: self.graphql_client.clone(),
12615 }
12616 }
12617 pub fn load_generated_code_from_id(&self, id: impl IntoID<GeneratedCodeId>) -> GeneratedCode {
12619 let mut query = self.selection.select("loadGeneratedCodeFromID");
12620 query = query.arg_lazy(
12621 "id",
12622 Box::new(move || {
12623 let id = id.clone();
12624 Box::pin(async move { id.into_id().await.unwrap().quote() })
12625 }),
12626 );
12627 GeneratedCode {
12628 proc: self.proc.clone(),
12629 selection: query,
12630 graphql_client: self.graphql_client.clone(),
12631 }
12632 }
12633 pub fn load_generator_from_id(&self, id: impl IntoID<GeneratorId>) -> Generator {
12635 let mut query = self.selection.select("loadGeneratorFromID");
12636 query = query.arg_lazy(
12637 "id",
12638 Box::new(move || {
12639 let id = id.clone();
12640 Box::pin(async move { id.into_id().await.unwrap().quote() })
12641 }),
12642 );
12643 Generator {
12644 proc: self.proc.clone(),
12645 selection: query,
12646 graphql_client: self.graphql_client.clone(),
12647 }
12648 }
12649 pub fn load_generator_group_from_id(
12651 &self,
12652 id: impl IntoID<GeneratorGroupId>,
12653 ) -> GeneratorGroup {
12654 let mut query = self.selection.select("loadGeneratorGroupFromID");
12655 query = query.arg_lazy(
12656 "id",
12657 Box::new(move || {
12658 let id = id.clone();
12659 Box::pin(async move { id.into_id().await.unwrap().quote() })
12660 }),
12661 );
12662 GeneratorGroup {
12663 proc: self.proc.clone(),
12664 selection: query,
12665 graphql_client: self.graphql_client.clone(),
12666 }
12667 }
12668 pub fn load_git_ref_from_id(&self, id: impl IntoID<GitRefId>) -> GitRef {
12670 let mut query = self.selection.select("loadGitRefFromID");
12671 query = query.arg_lazy(
12672 "id",
12673 Box::new(move || {
12674 let id = id.clone();
12675 Box::pin(async move { id.into_id().await.unwrap().quote() })
12676 }),
12677 );
12678 GitRef {
12679 proc: self.proc.clone(),
12680 selection: query,
12681 graphql_client: self.graphql_client.clone(),
12682 }
12683 }
12684 pub fn load_git_repository_from_id(&self, id: impl IntoID<GitRepositoryId>) -> GitRepository {
12686 let mut query = self.selection.select("loadGitRepositoryFromID");
12687 query = query.arg_lazy(
12688 "id",
12689 Box::new(move || {
12690 let id = id.clone();
12691 Box::pin(async move { id.into_id().await.unwrap().quote() })
12692 }),
12693 );
12694 GitRepository {
12695 proc: self.proc.clone(),
12696 selection: query,
12697 graphql_client: self.graphql_client.clone(),
12698 }
12699 }
12700 pub fn load_host_from_id(&self, id: impl IntoID<HostId>) -> Host {
12702 let mut query = self.selection.select("loadHostFromID");
12703 query = query.arg_lazy(
12704 "id",
12705 Box::new(move || {
12706 let id = id.clone();
12707 Box::pin(async move { id.into_id().await.unwrap().quote() })
12708 }),
12709 );
12710 Host {
12711 proc: self.proc.clone(),
12712 selection: query,
12713 graphql_client: self.graphql_client.clone(),
12714 }
12715 }
12716 pub fn load_input_type_def_from_id(&self, id: impl IntoID<InputTypeDefId>) -> InputTypeDef {
12718 let mut query = self.selection.select("loadInputTypeDefFromID");
12719 query = query.arg_lazy(
12720 "id",
12721 Box::new(move || {
12722 let id = id.clone();
12723 Box::pin(async move { id.into_id().await.unwrap().quote() })
12724 }),
12725 );
12726 InputTypeDef {
12727 proc: self.proc.clone(),
12728 selection: query,
12729 graphql_client: self.graphql_client.clone(),
12730 }
12731 }
12732 pub fn load_interface_type_def_from_id(
12734 &self,
12735 id: impl IntoID<InterfaceTypeDefId>,
12736 ) -> InterfaceTypeDef {
12737 let mut query = self.selection.select("loadInterfaceTypeDefFromID");
12738 query = query.arg_lazy(
12739 "id",
12740 Box::new(move || {
12741 let id = id.clone();
12742 Box::pin(async move { id.into_id().await.unwrap().quote() })
12743 }),
12744 );
12745 InterfaceTypeDef {
12746 proc: self.proc.clone(),
12747 selection: query,
12748 graphql_client: self.graphql_client.clone(),
12749 }
12750 }
12751 pub fn load_json_value_from_id(&self, id: impl IntoID<JsonValueId>) -> JsonValue {
12753 let mut query = self.selection.select("loadJSONValueFromID");
12754 query = query.arg_lazy(
12755 "id",
12756 Box::new(move || {
12757 let id = id.clone();
12758 Box::pin(async move { id.into_id().await.unwrap().quote() })
12759 }),
12760 );
12761 JsonValue {
12762 proc: self.proc.clone(),
12763 selection: query,
12764 graphql_client: self.graphql_client.clone(),
12765 }
12766 }
12767 pub fn load_llm_from_id(&self, id: impl IntoID<Llmid>) -> Llm {
12769 let mut query = self.selection.select("loadLLMFromID");
12770 query = query.arg_lazy(
12771 "id",
12772 Box::new(move || {
12773 let id = id.clone();
12774 Box::pin(async move { id.into_id().await.unwrap().quote() })
12775 }),
12776 );
12777 Llm {
12778 proc: self.proc.clone(),
12779 selection: query,
12780 graphql_client: self.graphql_client.clone(),
12781 }
12782 }
12783 pub fn load_llm_token_usage_from_id(&self, id: impl IntoID<LlmTokenUsageId>) -> LlmTokenUsage {
12785 let mut query = self.selection.select("loadLLMTokenUsageFromID");
12786 query = query.arg_lazy(
12787 "id",
12788 Box::new(move || {
12789 let id = id.clone();
12790 Box::pin(async move { id.into_id().await.unwrap().quote() })
12791 }),
12792 );
12793 LlmTokenUsage {
12794 proc: self.proc.clone(),
12795 selection: query,
12796 graphql_client: self.graphql_client.clone(),
12797 }
12798 }
12799 pub fn load_label_from_id(&self, id: impl IntoID<LabelId>) -> Label {
12801 let mut query = self.selection.select("loadLabelFromID");
12802 query = query.arg_lazy(
12803 "id",
12804 Box::new(move || {
12805 let id = id.clone();
12806 Box::pin(async move { id.into_id().await.unwrap().quote() })
12807 }),
12808 );
12809 Label {
12810 proc: self.proc.clone(),
12811 selection: query,
12812 graphql_client: self.graphql_client.clone(),
12813 }
12814 }
12815 pub fn load_list_type_def_from_id(&self, id: impl IntoID<ListTypeDefId>) -> ListTypeDef {
12817 let mut query = self.selection.select("loadListTypeDefFromID");
12818 query = query.arg_lazy(
12819 "id",
12820 Box::new(move || {
12821 let id = id.clone();
12822 Box::pin(async move { id.into_id().await.unwrap().quote() })
12823 }),
12824 );
12825 ListTypeDef {
12826 proc: self.proc.clone(),
12827 selection: query,
12828 graphql_client: self.graphql_client.clone(),
12829 }
12830 }
12831 pub fn load_module_config_client_from_id(
12833 &self,
12834 id: impl IntoID<ModuleConfigClientId>,
12835 ) -> ModuleConfigClient {
12836 let mut query = self.selection.select("loadModuleConfigClientFromID");
12837 query = query.arg_lazy(
12838 "id",
12839 Box::new(move || {
12840 let id = id.clone();
12841 Box::pin(async move { id.into_id().await.unwrap().quote() })
12842 }),
12843 );
12844 ModuleConfigClient {
12845 proc: self.proc.clone(),
12846 selection: query,
12847 graphql_client: self.graphql_client.clone(),
12848 }
12849 }
12850 pub fn load_module_from_id(&self, id: impl IntoID<ModuleId>) -> Module {
12852 let mut query = self.selection.select("loadModuleFromID");
12853 query = query.arg_lazy(
12854 "id",
12855 Box::new(move || {
12856 let id = id.clone();
12857 Box::pin(async move { id.into_id().await.unwrap().quote() })
12858 }),
12859 );
12860 Module {
12861 proc: self.proc.clone(),
12862 selection: query,
12863 graphql_client: self.graphql_client.clone(),
12864 }
12865 }
12866 pub fn load_module_source_from_id(&self, id: impl IntoID<ModuleSourceId>) -> ModuleSource {
12868 let mut query = self.selection.select("loadModuleSourceFromID");
12869 query = query.arg_lazy(
12870 "id",
12871 Box::new(move || {
12872 let id = id.clone();
12873 Box::pin(async move { id.into_id().await.unwrap().quote() })
12874 }),
12875 );
12876 ModuleSource {
12877 proc: self.proc.clone(),
12878 selection: query,
12879 graphql_client: self.graphql_client.clone(),
12880 }
12881 }
12882 pub fn load_object_type_def_from_id(&self, id: impl IntoID<ObjectTypeDefId>) -> ObjectTypeDef {
12884 let mut query = self.selection.select("loadObjectTypeDefFromID");
12885 query = query.arg_lazy(
12886 "id",
12887 Box::new(move || {
12888 let id = id.clone();
12889 Box::pin(async move { id.into_id().await.unwrap().quote() })
12890 }),
12891 );
12892 ObjectTypeDef {
12893 proc: self.proc.clone(),
12894 selection: query,
12895 graphql_client: self.graphql_client.clone(),
12896 }
12897 }
12898 pub fn load_port_from_id(&self, id: impl IntoID<PortId>) -> Port {
12900 let mut query = self.selection.select("loadPortFromID");
12901 query = query.arg_lazy(
12902 "id",
12903 Box::new(move || {
12904 let id = id.clone();
12905 Box::pin(async move { id.into_id().await.unwrap().quote() })
12906 }),
12907 );
12908 Port {
12909 proc: self.proc.clone(),
12910 selection: query,
12911 graphql_client: self.graphql_client.clone(),
12912 }
12913 }
12914 pub fn load_sdk_config_from_id(&self, id: impl IntoID<SdkConfigId>) -> SdkConfig {
12916 let mut query = self.selection.select("loadSDKConfigFromID");
12917 query = query.arg_lazy(
12918 "id",
12919 Box::new(move || {
12920 let id = id.clone();
12921 Box::pin(async move { id.into_id().await.unwrap().quote() })
12922 }),
12923 );
12924 SdkConfig {
12925 proc: self.proc.clone(),
12926 selection: query,
12927 graphql_client: self.graphql_client.clone(),
12928 }
12929 }
12930 pub fn load_scalar_type_def_from_id(&self, id: impl IntoID<ScalarTypeDefId>) -> ScalarTypeDef {
12932 let mut query = self.selection.select("loadScalarTypeDefFromID");
12933 query = query.arg_lazy(
12934 "id",
12935 Box::new(move || {
12936 let id = id.clone();
12937 Box::pin(async move { id.into_id().await.unwrap().quote() })
12938 }),
12939 );
12940 ScalarTypeDef {
12941 proc: self.proc.clone(),
12942 selection: query,
12943 graphql_client: self.graphql_client.clone(),
12944 }
12945 }
12946 pub fn load_search_result_from_id(&self, id: impl IntoID<SearchResultId>) -> SearchResult {
12948 let mut query = self.selection.select("loadSearchResultFromID");
12949 query = query.arg_lazy(
12950 "id",
12951 Box::new(move || {
12952 let id = id.clone();
12953 Box::pin(async move { id.into_id().await.unwrap().quote() })
12954 }),
12955 );
12956 SearchResult {
12957 proc: self.proc.clone(),
12958 selection: query,
12959 graphql_client: self.graphql_client.clone(),
12960 }
12961 }
12962 pub fn load_search_submatch_from_id(
12964 &self,
12965 id: impl IntoID<SearchSubmatchId>,
12966 ) -> SearchSubmatch {
12967 let mut query = self.selection.select("loadSearchSubmatchFromID");
12968 query = query.arg_lazy(
12969 "id",
12970 Box::new(move || {
12971 let id = id.clone();
12972 Box::pin(async move { id.into_id().await.unwrap().quote() })
12973 }),
12974 );
12975 SearchSubmatch {
12976 proc: self.proc.clone(),
12977 selection: query,
12978 graphql_client: self.graphql_client.clone(),
12979 }
12980 }
12981 pub fn load_secret_from_id(&self, id: impl IntoID<SecretId>) -> Secret {
12983 let mut query = self.selection.select("loadSecretFromID");
12984 query = query.arg_lazy(
12985 "id",
12986 Box::new(move || {
12987 let id = id.clone();
12988 Box::pin(async move { id.into_id().await.unwrap().quote() })
12989 }),
12990 );
12991 Secret {
12992 proc: self.proc.clone(),
12993 selection: query,
12994 graphql_client: self.graphql_client.clone(),
12995 }
12996 }
12997 pub fn load_service_from_id(&self, id: impl IntoID<ServiceId>) -> Service {
12999 let mut query = self.selection.select("loadServiceFromID");
13000 query = query.arg_lazy(
13001 "id",
13002 Box::new(move || {
13003 let id = id.clone();
13004 Box::pin(async move { id.into_id().await.unwrap().quote() })
13005 }),
13006 );
13007 Service {
13008 proc: self.proc.clone(),
13009 selection: query,
13010 graphql_client: self.graphql_client.clone(),
13011 }
13012 }
13013 pub fn load_socket_from_id(&self, id: impl IntoID<SocketId>) -> Socket {
13015 let mut query = self.selection.select("loadSocketFromID");
13016 query = query.arg_lazy(
13017 "id",
13018 Box::new(move || {
13019 let id = id.clone();
13020 Box::pin(async move { id.into_id().await.unwrap().quote() })
13021 }),
13022 );
13023 Socket {
13024 proc: self.proc.clone(),
13025 selection: query,
13026 graphql_client: self.graphql_client.clone(),
13027 }
13028 }
13029 pub fn load_source_map_from_id(&self, id: impl IntoID<SourceMapId>) -> SourceMap {
13031 let mut query = self.selection.select("loadSourceMapFromID");
13032 query = query.arg_lazy(
13033 "id",
13034 Box::new(move || {
13035 let id = id.clone();
13036 Box::pin(async move { id.into_id().await.unwrap().quote() })
13037 }),
13038 );
13039 SourceMap {
13040 proc: self.proc.clone(),
13041 selection: query,
13042 graphql_client: self.graphql_client.clone(),
13043 }
13044 }
13045 pub fn load_stat_from_id(&self, id: impl IntoID<StatId>) -> Stat {
13047 let mut query = self.selection.select("loadStatFromID");
13048 query = query.arg_lazy(
13049 "id",
13050 Box::new(move || {
13051 let id = id.clone();
13052 Box::pin(async move { id.into_id().await.unwrap().quote() })
13053 }),
13054 );
13055 Stat {
13056 proc: self.proc.clone(),
13057 selection: query,
13058 graphql_client: self.graphql_client.clone(),
13059 }
13060 }
13061 pub fn load_terminal_from_id(&self, id: impl IntoID<TerminalId>) -> Terminal {
13063 let mut query = self.selection.select("loadTerminalFromID");
13064 query = query.arg_lazy(
13065 "id",
13066 Box::new(move || {
13067 let id = id.clone();
13068 Box::pin(async move { id.into_id().await.unwrap().quote() })
13069 }),
13070 );
13071 Terminal {
13072 proc: self.proc.clone(),
13073 selection: query,
13074 graphql_client: self.graphql_client.clone(),
13075 }
13076 }
13077 pub fn load_type_def_from_id(&self, id: impl IntoID<TypeDefId>) -> TypeDef {
13079 let mut query = self.selection.select("loadTypeDefFromID");
13080 query = query.arg_lazy(
13081 "id",
13082 Box::new(move || {
13083 let id = id.clone();
13084 Box::pin(async move { id.into_id().await.unwrap().quote() })
13085 }),
13086 );
13087 TypeDef {
13088 proc: self.proc.clone(),
13089 selection: query,
13090 graphql_client: self.graphql_client.clone(),
13091 }
13092 }
13093 pub fn module(&self) -> Module {
13095 let query = self.selection.select("module");
13096 Module {
13097 proc: self.proc.clone(),
13098 selection: query,
13099 graphql_client: self.graphql_client.clone(),
13100 }
13101 }
13102 pub fn module_source(&self, ref_string: impl Into<String>) -> ModuleSource {
13109 let mut query = self.selection.select("moduleSource");
13110 query = query.arg("refString", ref_string.into());
13111 ModuleSource {
13112 proc: self.proc.clone(),
13113 selection: query,
13114 graphql_client: self.graphql_client.clone(),
13115 }
13116 }
13117 pub fn module_source_opts<'a>(
13124 &self,
13125 ref_string: impl Into<String>,
13126 opts: QueryModuleSourceOpts<'a>,
13127 ) -> ModuleSource {
13128 let mut query = self.selection.select("moduleSource");
13129 query = query.arg("refString", ref_string.into());
13130 if let Some(ref_pin) = opts.ref_pin {
13131 query = query.arg("refPin", ref_pin);
13132 }
13133 if let Some(disable_find_up) = opts.disable_find_up {
13134 query = query.arg("disableFindUp", disable_find_up);
13135 }
13136 if let Some(allow_not_exists) = opts.allow_not_exists {
13137 query = query.arg("allowNotExists", allow_not_exists);
13138 }
13139 if let Some(require_kind) = opts.require_kind {
13140 query = query.arg("requireKind", require_kind);
13141 }
13142 ModuleSource {
13143 proc: self.proc.clone(),
13144 selection: query,
13145 graphql_client: self.graphql_client.clone(),
13146 }
13147 }
13148 pub fn secret(&self, uri: impl Into<String>) -> Secret {
13155 let mut query = self.selection.select("secret");
13156 query = query.arg("uri", uri.into());
13157 Secret {
13158 proc: self.proc.clone(),
13159 selection: query,
13160 graphql_client: self.graphql_client.clone(),
13161 }
13162 }
13163 pub fn secret_opts<'a>(&self, uri: impl Into<String>, opts: QuerySecretOpts<'a>) -> Secret {
13170 let mut query = self.selection.select("secret");
13171 query = query.arg("uri", uri.into());
13172 if let Some(cache_key) = opts.cache_key {
13173 query = query.arg("cacheKey", cache_key);
13174 }
13175 Secret {
13176 proc: self.proc.clone(),
13177 selection: query,
13178 graphql_client: self.graphql_client.clone(),
13179 }
13180 }
13181 pub fn set_secret(&self, name: impl Into<String>, plaintext: impl Into<String>) -> Secret {
13189 let mut query = self.selection.select("setSecret");
13190 query = query.arg("name", name.into());
13191 query = query.arg("plaintext", plaintext.into());
13192 Secret {
13193 proc: self.proc.clone(),
13194 selection: query,
13195 graphql_client: self.graphql_client.clone(),
13196 }
13197 }
13198 pub fn source_map(&self, filename: impl Into<String>, line: isize, column: isize) -> SourceMap {
13206 let mut query = self.selection.select("sourceMap");
13207 query = query.arg("filename", filename.into());
13208 query = query.arg("line", line);
13209 query = query.arg("column", column);
13210 SourceMap {
13211 proc: self.proc.clone(),
13212 selection: query,
13213 graphql_client: self.graphql_client.clone(),
13214 }
13215 }
13216 pub fn type_def(&self) -> TypeDef {
13218 let query = self.selection.select("typeDef");
13219 TypeDef {
13220 proc: self.proc.clone(),
13221 selection: query,
13222 graphql_client: self.graphql_client.clone(),
13223 }
13224 }
13225 pub async fn version(&self) -> Result<String, DaggerError> {
13227 let query = self.selection.select("version");
13228 query.execute(self.graphql_client.clone()).await
13229 }
13230}
13231#[derive(Clone)]
13232pub struct SdkConfig {
13233 pub proc: Option<Arc<DaggerSessionProc>>,
13234 pub selection: Selection,
13235 pub graphql_client: DynGraphQLClient,
13236}
13237impl SdkConfig {
13238 pub async fn debug(&self) -> Result<bool, DaggerError> {
13240 let query = self.selection.select("debug");
13241 query.execute(self.graphql_client.clone()).await
13242 }
13243 pub async fn id(&self) -> Result<SdkConfigId, DaggerError> {
13245 let query = self.selection.select("id");
13246 query.execute(self.graphql_client.clone()).await
13247 }
13248 pub async fn source(&self) -> Result<String, DaggerError> {
13250 let query = self.selection.select("source");
13251 query.execute(self.graphql_client.clone()).await
13252 }
13253}
13254#[derive(Clone)]
13255pub struct ScalarTypeDef {
13256 pub proc: Option<Arc<DaggerSessionProc>>,
13257 pub selection: Selection,
13258 pub graphql_client: DynGraphQLClient,
13259}
13260impl ScalarTypeDef {
13261 pub async fn description(&self) -> Result<String, DaggerError> {
13263 let query = self.selection.select("description");
13264 query.execute(self.graphql_client.clone()).await
13265 }
13266 pub async fn id(&self) -> Result<ScalarTypeDefId, DaggerError> {
13268 let query = self.selection.select("id");
13269 query.execute(self.graphql_client.clone()).await
13270 }
13271 pub async fn name(&self) -> Result<String, DaggerError> {
13273 let query = self.selection.select("name");
13274 query.execute(self.graphql_client.clone()).await
13275 }
13276 pub async fn source_module_name(&self) -> Result<String, DaggerError> {
13278 let query = self.selection.select("sourceModuleName");
13279 query.execute(self.graphql_client.clone()).await
13280 }
13281}
13282#[derive(Clone)]
13283pub struct SearchResult {
13284 pub proc: Option<Arc<DaggerSessionProc>>,
13285 pub selection: Selection,
13286 pub graphql_client: DynGraphQLClient,
13287}
13288impl SearchResult {
13289 pub async fn absolute_offset(&self) -> Result<isize, DaggerError> {
13291 let query = self.selection.select("absoluteOffset");
13292 query.execute(self.graphql_client.clone()).await
13293 }
13294 pub async fn file_path(&self) -> Result<String, DaggerError> {
13296 let query = self.selection.select("filePath");
13297 query.execute(self.graphql_client.clone()).await
13298 }
13299 pub async fn id(&self) -> Result<SearchResultId, DaggerError> {
13301 let query = self.selection.select("id");
13302 query.execute(self.graphql_client.clone()).await
13303 }
13304 pub async fn line_number(&self) -> Result<isize, DaggerError> {
13306 let query = self.selection.select("lineNumber");
13307 query.execute(self.graphql_client.clone()).await
13308 }
13309 pub async fn matched_lines(&self) -> Result<String, DaggerError> {
13311 let query = self.selection.select("matchedLines");
13312 query.execute(self.graphql_client.clone()).await
13313 }
13314 pub fn submatches(&self) -> Vec<SearchSubmatch> {
13316 let query = self.selection.select("submatches");
13317 vec![SearchSubmatch {
13318 proc: self.proc.clone(),
13319 selection: query,
13320 graphql_client: self.graphql_client.clone(),
13321 }]
13322 }
13323}
13324#[derive(Clone)]
13325pub struct SearchSubmatch {
13326 pub proc: Option<Arc<DaggerSessionProc>>,
13327 pub selection: Selection,
13328 pub graphql_client: DynGraphQLClient,
13329}
13330impl SearchSubmatch {
13331 pub async fn end(&self) -> Result<isize, DaggerError> {
13333 let query = self.selection.select("end");
13334 query.execute(self.graphql_client.clone()).await
13335 }
13336 pub async fn id(&self) -> Result<SearchSubmatchId, DaggerError> {
13338 let query = self.selection.select("id");
13339 query.execute(self.graphql_client.clone()).await
13340 }
13341 pub async fn start(&self) -> Result<isize, DaggerError> {
13343 let query = self.selection.select("start");
13344 query.execute(self.graphql_client.clone()).await
13345 }
13346 pub async fn text(&self) -> Result<String, DaggerError> {
13348 let query = self.selection.select("text");
13349 query.execute(self.graphql_client.clone()).await
13350 }
13351}
13352#[derive(Clone)]
13353pub struct Secret {
13354 pub proc: Option<Arc<DaggerSessionProc>>,
13355 pub selection: Selection,
13356 pub graphql_client: DynGraphQLClient,
13357}
13358impl Secret {
13359 pub async fn id(&self) -> Result<SecretId, DaggerError> {
13361 let query = self.selection.select("id");
13362 query.execute(self.graphql_client.clone()).await
13363 }
13364 pub async fn name(&self) -> Result<String, DaggerError> {
13366 let query = self.selection.select("name");
13367 query.execute(self.graphql_client.clone()).await
13368 }
13369 pub async fn plaintext(&self) -> Result<String, DaggerError> {
13371 let query = self.selection.select("plaintext");
13372 query.execute(self.graphql_client.clone()).await
13373 }
13374 pub async fn uri(&self) -> Result<String, DaggerError> {
13376 let query = self.selection.select("uri");
13377 query.execute(self.graphql_client.clone()).await
13378 }
13379}
13380#[derive(Clone)]
13381pub struct Service {
13382 pub proc: Option<Arc<DaggerSessionProc>>,
13383 pub selection: Selection,
13384 pub graphql_client: DynGraphQLClient,
13385}
13386#[derive(Builder, Debug, PartialEq)]
13387pub struct ServiceEndpointOpts<'a> {
13388 #[builder(setter(into, strip_option), default)]
13390 pub port: Option<isize>,
13391 #[builder(setter(into, strip_option), default)]
13393 pub scheme: Option<&'a str>,
13394}
13395#[derive(Builder, Debug, PartialEq)]
13396pub struct ServiceStopOpts {
13397 #[builder(setter(into, strip_option), default)]
13399 pub kill: Option<bool>,
13400}
13401#[derive(Builder, Debug, PartialEq)]
13402pub struct ServiceTerminalOpts<'a> {
13403 #[builder(setter(into, strip_option), default)]
13404 pub cmd: Option<Vec<&'a str>>,
13405}
13406#[derive(Builder, Debug, PartialEq)]
13407pub struct ServiceUpOpts {
13408 #[builder(setter(into, strip_option), default)]
13411 pub ports: Option<Vec<PortForward>>,
13412 #[builder(setter(into, strip_option), default)]
13414 pub random: Option<bool>,
13415}
13416impl Service {
13417 pub async fn endpoint(&self) -> Result<String, DaggerError> {
13425 let query = self.selection.select("endpoint");
13426 query.execute(self.graphql_client.clone()).await
13427 }
13428 pub async fn endpoint_opts<'a>(
13436 &self,
13437 opts: ServiceEndpointOpts<'a>,
13438 ) -> Result<String, DaggerError> {
13439 let mut query = self.selection.select("endpoint");
13440 if let Some(port) = opts.port {
13441 query = query.arg("port", port);
13442 }
13443 if let Some(scheme) = opts.scheme {
13444 query = query.arg("scheme", scheme);
13445 }
13446 query.execute(self.graphql_client.clone()).await
13447 }
13448 pub async fn hostname(&self) -> Result<String, DaggerError> {
13450 let query = self.selection.select("hostname");
13451 query.execute(self.graphql_client.clone()).await
13452 }
13453 pub async fn id(&self) -> Result<ServiceId, DaggerError> {
13455 let query = self.selection.select("id");
13456 query.execute(self.graphql_client.clone()).await
13457 }
13458 pub fn ports(&self) -> Vec<Port> {
13460 let query = self.selection.select("ports");
13461 vec![Port {
13462 proc: self.proc.clone(),
13463 selection: query,
13464 graphql_client: self.graphql_client.clone(),
13465 }]
13466 }
13467 pub async fn start(&self) -> Result<ServiceId, DaggerError> {
13470 let query = self.selection.select("start");
13471 query.execute(self.graphql_client.clone()).await
13472 }
13473 pub async fn stop(&self) -> Result<ServiceId, DaggerError> {
13479 let query = self.selection.select("stop");
13480 query.execute(self.graphql_client.clone()).await
13481 }
13482 pub async fn stop_opts(&self, opts: ServiceStopOpts) -> Result<ServiceId, DaggerError> {
13488 let mut query = self.selection.select("stop");
13489 if let Some(kill) = opts.kill {
13490 query = query.arg("kill", kill);
13491 }
13492 query.execute(self.graphql_client.clone()).await
13493 }
13494 pub async fn sync(&self) -> Result<ServiceId, DaggerError> {
13496 let query = self.selection.select("sync");
13497 query.execute(self.graphql_client.clone()).await
13498 }
13499 pub fn terminal(&self) -> Service {
13504 let query = self.selection.select("terminal");
13505 Service {
13506 proc: self.proc.clone(),
13507 selection: query,
13508 graphql_client: self.graphql_client.clone(),
13509 }
13510 }
13511 pub fn terminal_opts<'a>(&self, opts: ServiceTerminalOpts<'a>) -> Service {
13516 let mut query = self.selection.select("terminal");
13517 if let Some(cmd) = opts.cmd {
13518 query = query.arg("cmd", cmd);
13519 }
13520 Service {
13521 proc: self.proc.clone(),
13522 selection: query,
13523 graphql_client: self.graphql_client.clone(),
13524 }
13525 }
13526 pub async fn up(&self) -> Result<Void, DaggerError> {
13532 let query = self.selection.select("up");
13533 query.execute(self.graphql_client.clone()).await
13534 }
13535 pub async fn up_opts(&self, opts: ServiceUpOpts) -> Result<Void, DaggerError> {
13541 let mut query = self.selection.select("up");
13542 if let Some(ports) = opts.ports {
13543 query = query.arg("ports", ports);
13544 }
13545 if let Some(random) = opts.random {
13546 query = query.arg("random", random);
13547 }
13548 query.execute(self.graphql_client.clone()).await
13549 }
13550 pub fn with_hostname(&self, hostname: impl Into<String>) -> Service {
13556 let mut query = self.selection.select("withHostname");
13557 query = query.arg("hostname", hostname.into());
13558 Service {
13559 proc: self.proc.clone(),
13560 selection: query,
13561 graphql_client: self.graphql_client.clone(),
13562 }
13563 }
13564}
13565#[derive(Clone)]
13566pub struct Socket {
13567 pub proc: Option<Arc<DaggerSessionProc>>,
13568 pub selection: Selection,
13569 pub graphql_client: DynGraphQLClient,
13570}
13571impl Socket {
13572 pub async fn id(&self) -> Result<SocketId, DaggerError> {
13574 let query = self.selection.select("id");
13575 query.execute(self.graphql_client.clone()).await
13576 }
13577}
13578#[derive(Clone)]
13579pub struct SourceMap {
13580 pub proc: Option<Arc<DaggerSessionProc>>,
13581 pub selection: Selection,
13582 pub graphql_client: DynGraphQLClient,
13583}
13584impl SourceMap {
13585 pub async fn column(&self) -> Result<isize, DaggerError> {
13587 let query = self.selection.select("column");
13588 query.execute(self.graphql_client.clone()).await
13589 }
13590 pub async fn filename(&self) -> Result<String, DaggerError> {
13592 let query = self.selection.select("filename");
13593 query.execute(self.graphql_client.clone()).await
13594 }
13595 pub async fn id(&self) -> Result<SourceMapId, DaggerError> {
13597 let query = self.selection.select("id");
13598 query.execute(self.graphql_client.clone()).await
13599 }
13600 pub async fn line(&self) -> Result<isize, DaggerError> {
13602 let query = self.selection.select("line");
13603 query.execute(self.graphql_client.clone()).await
13604 }
13605 pub async fn module(&self) -> Result<String, DaggerError> {
13607 let query = self.selection.select("module");
13608 query.execute(self.graphql_client.clone()).await
13609 }
13610 pub async fn url(&self) -> Result<String, DaggerError> {
13612 let query = self.selection.select("url");
13613 query.execute(self.graphql_client.clone()).await
13614 }
13615}
13616#[derive(Clone)]
13617pub struct Stat {
13618 pub proc: Option<Arc<DaggerSessionProc>>,
13619 pub selection: Selection,
13620 pub graphql_client: DynGraphQLClient,
13621}
13622impl Stat {
13623 pub async fn file_type(&self) -> Result<FileType, DaggerError> {
13625 let query = self.selection.select("fileType");
13626 query.execute(self.graphql_client.clone()).await
13627 }
13628 pub async fn id(&self) -> Result<StatId, DaggerError> {
13630 let query = self.selection.select("id");
13631 query.execute(self.graphql_client.clone()).await
13632 }
13633 pub async fn name(&self) -> Result<String, DaggerError> {
13635 let query = self.selection.select("name");
13636 query.execute(self.graphql_client.clone()).await
13637 }
13638 pub async fn permissions(&self) -> Result<isize, DaggerError> {
13640 let query = self.selection.select("permissions");
13641 query.execute(self.graphql_client.clone()).await
13642 }
13643 pub async fn size(&self) -> Result<isize, DaggerError> {
13645 let query = self.selection.select("size");
13646 query.execute(self.graphql_client.clone()).await
13647 }
13648}
13649#[derive(Clone)]
13650pub struct Terminal {
13651 pub proc: Option<Arc<DaggerSessionProc>>,
13652 pub selection: Selection,
13653 pub graphql_client: DynGraphQLClient,
13654}
13655impl Terminal {
13656 pub async fn id(&self) -> Result<TerminalId, DaggerError> {
13658 let query = self.selection.select("id");
13659 query.execute(self.graphql_client.clone()).await
13660 }
13661 pub async fn sync(&self) -> Result<TerminalId, DaggerError> {
13664 let query = self.selection.select("sync");
13665 query.execute(self.graphql_client.clone()).await
13666 }
13667}
13668#[derive(Clone)]
13669pub struct TypeDef {
13670 pub proc: Option<Arc<DaggerSessionProc>>,
13671 pub selection: Selection,
13672 pub graphql_client: DynGraphQLClient,
13673}
13674#[derive(Builder, Debug, PartialEq)]
13675pub struct TypeDefWithEnumOpts<'a> {
13676 #[builder(setter(into, strip_option), default)]
13678 pub description: Option<&'a str>,
13679 #[builder(setter(into, strip_option), default)]
13681 pub source_map: Option<SourceMapId>,
13682}
13683#[derive(Builder, Debug, PartialEq)]
13684pub struct TypeDefWithEnumMemberOpts<'a> {
13685 #[builder(setter(into, strip_option), default)]
13687 pub deprecated: Option<&'a str>,
13688 #[builder(setter(into, strip_option), default)]
13690 pub description: Option<&'a str>,
13691 #[builder(setter(into, strip_option), default)]
13693 pub source_map: Option<SourceMapId>,
13694 #[builder(setter(into, strip_option), default)]
13696 pub value: Option<&'a str>,
13697}
13698#[derive(Builder, Debug, PartialEq)]
13699pub struct TypeDefWithEnumValueOpts<'a> {
13700 #[builder(setter(into, strip_option), default)]
13702 pub deprecated: Option<&'a str>,
13703 #[builder(setter(into, strip_option), default)]
13705 pub description: Option<&'a str>,
13706 #[builder(setter(into, strip_option), default)]
13708 pub source_map: Option<SourceMapId>,
13709}
13710#[derive(Builder, Debug, PartialEq)]
13711pub struct TypeDefWithFieldOpts<'a> {
13712 #[builder(setter(into, strip_option), default)]
13714 pub deprecated: Option<&'a str>,
13715 #[builder(setter(into, strip_option), default)]
13717 pub description: Option<&'a str>,
13718 #[builder(setter(into, strip_option), default)]
13720 pub source_map: Option<SourceMapId>,
13721}
13722#[derive(Builder, Debug, PartialEq)]
13723pub struct TypeDefWithInterfaceOpts<'a> {
13724 #[builder(setter(into, strip_option), default)]
13725 pub description: Option<&'a str>,
13726 #[builder(setter(into, strip_option), default)]
13727 pub source_map: Option<SourceMapId>,
13728}
13729#[derive(Builder, Debug, PartialEq)]
13730pub struct TypeDefWithObjectOpts<'a> {
13731 #[builder(setter(into, strip_option), default)]
13732 pub deprecated: Option<&'a str>,
13733 #[builder(setter(into, strip_option), default)]
13734 pub description: Option<&'a str>,
13735 #[builder(setter(into, strip_option), default)]
13736 pub source_map: Option<SourceMapId>,
13737}
13738#[derive(Builder, Debug, PartialEq)]
13739pub struct TypeDefWithScalarOpts<'a> {
13740 #[builder(setter(into, strip_option), default)]
13741 pub description: Option<&'a str>,
13742}
13743impl TypeDef {
13744 pub fn as_enum(&self) -> EnumTypeDef {
13746 let query = self.selection.select("asEnum");
13747 EnumTypeDef {
13748 proc: self.proc.clone(),
13749 selection: query,
13750 graphql_client: self.graphql_client.clone(),
13751 }
13752 }
13753 pub fn as_input(&self) -> InputTypeDef {
13755 let query = self.selection.select("asInput");
13756 InputTypeDef {
13757 proc: self.proc.clone(),
13758 selection: query,
13759 graphql_client: self.graphql_client.clone(),
13760 }
13761 }
13762 pub fn as_interface(&self) -> InterfaceTypeDef {
13764 let query = self.selection.select("asInterface");
13765 InterfaceTypeDef {
13766 proc: self.proc.clone(),
13767 selection: query,
13768 graphql_client: self.graphql_client.clone(),
13769 }
13770 }
13771 pub fn as_list(&self) -> ListTypeDef {
13773 let query = self.selection.select("asList");
13774 ListTypeDef {
13775 proc: self.proc.clone(),
13776 selection: query,
13777 graphql_client: self.graphql_client.clone(),
13778 }
13779 }
13780 pub fn as_object(&self) -> ObjectTypeDef {
13782 let query = self.selection.select("asObject");
13783 ObjectTypeDef {
13784 proc: self.proc.clone(),
13785 selection: query,
13786 graphql_client: self.graphql_client.clone(),
13787 }
13788 }
13789 pub fn as_scalar(&self) -> ScalarTypeDef {
13791 let query = self.selection.select("asScalar");
13792 ScalarTypeDef {
13793 proc: self.proc.clone(),
13794 selection: query,
13795 graphql_client: self.graphql_client.clone(),
13796 }
13797 }
13798 pub async fn id(&self) -> Result<TypeDefId, DaggerError> {
13800 let query = self.selection.select("id");
13801 query.execute(self.graphql_client.clone()).await
13802 }
13803 pub async fn kind(&self) -> Result<TypeDefKind, DaggerError> {
13805 let query = self.selection.select("kind");
13806 query.execute(self.graphql_client.clone()).await
13807 }
13808 pub async fn optional(&self) -> Result<bool, DaggerError> {
13810 let query = self.selection.select("optional");
13811 query.execute(self.graphql_client.clone()).await
13812 }
13813 pub fn with_constructor(&self, function: impl IntoID<FunctionId>) -> TypeDef {
13815 let mut query = self.selection.select("withConstructor");
13816 query = query.arg_lazy(
13817 "function",
13818 Box::new(move || {
13819 let function = function.clone();
13820 Box::pin(async move { function.into_id().await.unwrap().quote() })
13821 }),
13822 );
13823 TypeDef {
13824 proc: self.proc.clone(),
13825 selection: query,
13826 graphql_client: self.graphql_client.clone(),
13827 }
13828 }
13829 pub fn with_enum(&self, name: impl Into<String>) -> TypeDef {
13837 let mut query = self.selection.select("withEnum");
13838 query = query.arg("name", name.into());
13839 TypeDef {
13840 proc: self.proc.clone(),
13841 selection: query,
13842 graphql_client: self.graphql_client.clone(),
13843 }
13844 }
13845 pub fn with_enum_opts<'a>(
13853 &self,
13854 name: impl Into<String>,
13855 opts: TypeDefWithEnumOpts<'a>,
13856 ) -> TypeDef {
13857 let mut query = self.selection.select("withEnum");
13858 query = query.arg("name", name.into());
13859 if let Some(description) = opts.description {
13860 query = query.arg("description", description);
13861 }
13862 if let Some(source_map) = opts.source_map {
13863 query = query.arg("sourceMap", source_map);
13864 }
13865 TypeDef {
13866 proc: self.proc.clone(),
13867 selection: query,
13868 graphql_client: self.graphql_client.clone(),
13869 }
13870 }
13871 pub fn with_enum_member(&self, name: impl Into<String>) -> TypeDef {
13878 let mut query = self.selection.select("withEnumMember");
13879 query = query.arg("name", name.into());
13880 TypeDef {
13881 proc: self.proc.clone(),
13882 selection: query,
13883 graphql_client: self.graphql_client.clone(),
13884 }
13885 }
13886 pub fn with_enum_member_opts<'a>(
13893 &self,
13894 name: impl Into<String>,
13895 opts: TypeDefWithEnumMemberOpts<'a>,
13896 ) -> TypeDef {
13897 let mut query = self.selection.select("withEnumMember");
13898 query = query.arg("name", name.into());
13899 if let Some(value) = opts.value {
13900 query = query.arg("value", value);
13901 }
13902 if let Some(description) = opts.description {
13903 query = query.arg("description", description);
13904 }
13905 if let Some(source_map) = opts.source_map {
13906 query = query.arg("sourceMap", source_map);
13907 }
13908 if let Some(deprecated) = opts.deprecated {
13909 query = query.arg("deprecated", deprecated);
13910 }
13911 TypeDef {
13912 proc: self.proc.clone(),
13913 selection: query,
13914 graphql_client: self.graphql_client.clone(),
13915 }
13916 }
13917 pub fn with_enum_value(&self, value: impl Into<String>) -> TypeDef {
13924 let mut query = self.selection.select("withEnumValue");
13925 query = query.arg("value", value.into());
13926 TypeDef {
13927 proc: self.proc.clone(),
13928 selection: query,
13929 graphql_client: self.graphql_client.clone(),
13930 }
13931 }
13932 pub fn with_enum_value_opts<'a>(
13939 &self,
13940 value: impl Into<String>,
13941 opts: TypeDefWithEnumValueOpts<'a>,
13942 ) -> TypeDef {
13943 let mut query = self.selection.select("withEnumValue");
13944 query = query.arg("value", value.into());
13945 if let Some(description) = opts.description {
13946 query = query.arg("description", description);
13947 }
13948 if let Some(source_map) = opts.source_map {
13949 query = query.arg("sourceMap", source_map);
13950 }
13951 if let Some(deprecated) = opts.deprecated {
13952 query = query.arg("deprecated", deprecated);
13953 }
13954 TypeDef {
13955 proc: self.proc.clone(),
13956 selection: query,
13957 graphql_client: self.graphql_client.clone(),
13958 }
13959 }
13960 pub fn with_field(&self, name: impl Into<String>, type_def: impl IntoID<TypeDefId>) -> TypeDef {
13968 let mut query = self.selection.select("withField");
13969 query = query.arg("name", name.into());
13970 query = query.arg_lazy(
13971 "typeDef",
13972 Box::new(move || {
13973 let type_def = type_def.clone();
13974 Box::pin(async move { type_def.into_id().await.unwrap().quote() })
13975 }),
13976 );
13977 TypeDef {
13978 proc: self.proc.clone(),
13979 selection: query,
13980 graphql_client: self.graphql_client.clone(),
13981 }
13982 }
13983 pub fn with_field_opts<'a>(
13991 &self,
13992 name: impl Into<String>,
13993 type_def: impl IntoID<TypeDefId>,
13994 opts: TypeDefWithFieldOpts<'a>,
13995 ) -> TypeDef {
13996 let mut query = self.selection.select("withField");
13997 query = query.arg("name", name.into());
13998 query = query.arg_lazy(
13999 "typeDef",
14000 Box::new(move || {
14001 let type_def = type_def.clone();
14002 Box::pin(async move { type_def.into_id().await.unwrap().quote() })
14003 }),
14004 );
14005 if let Some(description) = opts.description {
14006 query = query.arg("description", description);
14007 }
14008 if let Some(source_map) = opts.source_map {
14009 query = query.arg("sourceMap", source_map);
14010 }
14011 if let Some(deprecated) = opts.deprecated {
14012 query = query.arg("deprecated", deprecated);
14013 }
14014 TypeDef {
14015 proc: self.proc.clone(),
14016 selection: query,
14017 graphql_client: self.graphql_client.clone(),
14018 }
14019 }
14020 pub fn with_function(&self, function: impl IntoID<FunctionId>) -> TypeDef {
14022 let mut query = self.selection.select("withFunction");
14023 query = query.arg_lazy(
14024 "function",
14025 Box::new(move || {
14026 let function = function.clone();
14027 Box::pin(async move { function.into_id().await.unwrap().quote() })
14028 }),
14029 );
14030 TypeDef {
14031 proc: self.proc.clone(),
14032 selection: query,
14033 graphql_client: self.graphql_client.clone(),
14034 }
14035 }
14036 pub fn with_interface(&self, name: impl Into<String>) -> TypeDef {
14042 let mut query = self.selection.select("withInterface");
14043 query = query.arg("name", name.into());
14044 TypeDef {
14045 proc: self.proc.clone(),
14046 selection: query,
14047 graphql_client: self.graphql_client.clone(),
14048 }
14049 }
14050 pub fn with_interface_opts<'a>(
14056 &self,
14057 name: impl Into<String>,
14058 opts: TypeDefWithInterfaceOpts<'a>,
14059 ) -> TypeDef {
14060 let mut query = self.selection.select("withInterface");
14061 query = query.arg("name", name.into());
14062 if let Some(description) = opts.description {
14063 query = query.arg("description", description);
14064 }
14065 if let Some(source_map) = opts.source_map {
14066 query = query.arg("sourceMap", source_map);
14067 }
14068 TypeDef {
14069 proc: self.proc.clone(),
14070 selection: query,
14071 graphql_client: self.graphql_client.clone(),
14072 }
14073 }
14074 pub fn with_kind(&self, kind: TypeDefKind) -> TypeDef {
14076 let mut query = self.selection.select("withKind");
14077 query = query.arg("kind", kind);
14078 TypeDef {
14079 proc: self.proc.clone(),
14080 selection: query,
14081 graphql_client: self.graphql_client.clone(),
14082 }
14083 }
14084 pub fn with_list_of(&self, element_type: impl IntoID<TypeDefId>) -> TypeDef {
14086 let mut query = self.selection.select("withListOf");
14087 query = query.arg_lazy(
14088 "elementType",
14089 Box::new(move || {
14090 let element_type = element_type.clone();
14091 Box::pin(async move { element_type.into_id().await.unwrap().quote() })
14092 }),
14093 );
14094 TypeDef {
14095 proc: self.proc.clone(),
14096 selection: query,
14097 graphql_client: self.graphql_client.clone(),
14098 }
14099 }
14100 pub fn with_object(&self, name: impl Into<String>) -> TypeDef {
14107 let mut query = self.selection.select("withObject");
14108 query = query.arg("name", name.into());
14109 TypeDef {
14110 proc: self.proc.clone(),
14111 selection: query,
14112 graphql_client: self.graphql_client.clone(),
14113 }
14114 }
14115 pub fn with_object_opts<'a>(
14122 &self,
14123 name: impl Into<String>,
14124 opts: TypeDefWithObjectOpts<'a>,
14125 ) -> TypeDef {
14126 let mut query = self.selection.select("withObject");
14127 query = query.arg("name", name.into());
14128 if let Some(description) = opts.description {
14129 query = query.arg("description", description);
14130 }
14131 if let Some(source_map) = opts.source_map {
14132 query = query.arg("sourceMap", source_map);
14133 }
14134 if let Some(deprecated) = opts.deprecated {
14135 query = query.arg("deprecated", deprecated);
14136 }
14137 TypeDef {
14138 proc: self.proc.clone(),
14139 selection: query,
14140 graphql_client: self.graphql_client.clone(),
14141 }
14142 }
14143 pub fn with_optional(&self, optional: bool) -> TypeDef {
14145 let mut query = self.selection.select("withOptional");
14146 query = query.arg("optional", optional);
14147 TypeDef {
14148 proc: self.proc.clone(),
14149 selection: query,
14150 graphql_client: self.graphql_client.clone(),
14151 }
14152 }
14153 pub fn with_scalar(&self, name: impl Into<String>) -> TypeDef {
14159 let mut query = self.selection.select("withScalar");
14160 query = query.arg("name", name.into());
14161 TypeDef {
14162 proc: self.proc.clone(),
14163 selection: query,
14164 graphql_client: self.graphql_client.clone(),
14165 }
14166 }
14167 pub fn with_scalar_opts<'a>(
14173 &self,
14174 name: impl Into<String>,
14175 opts: TypeDefWithScalarOpts<'a>,
14176 ) -> TypeDef {
14177 let mut query = self.selection.select("withScalar");
14178 query = query.arg("name", name.into());
14179 if let Some(description) = opts.description {
14180 query = query.arg("description", description);
14181 }
14182 TypeDef {
14183 proc: self.proc.clone(),
14184 selection: query,
14185 graphql_client: self.graphql_client.clone(),
14186 }
14187 }
14188}
14189#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14190pub enum CacheSharingMode {
14191 #[serde(rename = "LOCKED")]
14192 Locked,
14193 #[serde(rename = "PRIVATE")]
14194 Private,
14195 #[serde(rename = "SHARED")]
14196 Shared,
14197}
14198#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14199pub enum ChangesetMergeConflict {
14200 #[serde(rename = "FAIL")]
14201 Fail,
14202 #[serde(rename = "FAIL_EARLY")]
14203 FailEarly,
14204 #[serde(rename = "LEAVE_CONFLICT_MARKERS")]
14205 LeaveConflictMarkers,
14206 #[serde(rename = "PREFER_OURS")]
14207 PreferOurs,
14208 #[serde(rename = "PREFER_THEIRS")]
14209 PreferTheirs,
14210}
14211#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14212pub enum ChangesetsMergeConflict {
14213 #[serde(rename = "FAIL")]
14214 Fail,
14215 #[serde(rename = "FAIL_EARLY")]
14216 FailEarly,
14217}
14218#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14219pub enum ExistsType {
14220 #[serde(rename = "DIRECTORY_TYPE")]
14221 DirectoryType,
14222 #[serde(rename = "REGULAR_TYPE")]
14223 RegularType,
14224 #[serde(rename = "SYMLINK_TYPE")]
14225 SymlinkType,
14226}
14227#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14228pub enum FileType {
14229 #[serde(rename = "DIRECTORY")]
14230 Directory,
14231 #[serde(rename = "DIRECTORY_TYPE")]
14232 DirectoryType,
14233 #[serde(rename = "REGULAR")]
14234 Regular,
14235 #[serde(rename = "REGULAR_TYPE")]
14236 RegularType,
14237 #[serde(rename = "SYMLINK")]
14238 Symlink,
14239 #[serde(rename = "SYMLINK_TYPE")]
14240 SymlinkType,
14241 #[serde(rename = "UNKNOWN")]
14242 Unknown,
14243}
14244#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14245pub enum FunctionCachePolicy {
14246 #[serde(rename = "Default")]
14247 Default,
14248 #[serde(rename = "Never")]
14249 Never,
14250 #[serde(rename = "PerSession")]
14251 PerSession,
14252}
14253#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14254pub enum ImageLayerCompression {
14255 #[serde(rename = "EStarGZ")]
14256 EStarGz,
14257 #[serde(rename = "ESTARGZ")]
14258 Estargz,
14259 #[serde(rename = "Gzip")]
14260 Gzip,
14261 #[serde(rename = "Uncompressed")]
14262 Uncompressed,
14263 #[serde(rename = "Zstd")]
14264 Zstd,
14265}
14266#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14267pub enum ImageMediaTypes {
14268 #[serde(rename = "DOCKER")]
14269 Docker,
14270 #[serde(rename = "DockerMediaTypes")]
14271 DockerMediaTypes,
14272 #[serde(rename = "OCI")]
14273 Oci,
14274 #[serde(rename = "OCIMediaTypes")]
14275 OciMediaTypes,
14276}
14277#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14278pub enum ModuleSourceExperimentalFeature {
14279 #[serde(rename = "SELF_CALLS")]
14280 SelfCalls,
14281}
14282#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14283pub enum ModuleSourceKind {
14284 #[serde(rename = "DIR")]
14285 Dir,
14286 #[serde(rename = "DIR_SOURCE")]
14287 DirSource,
14288 #[serde(rename = "GIT")]
14289 Git,
14290 #[serde(rename = "GIT_SOURCE")]
14291 GitSource,
14292 #[serde(rename = "LOCAL")]
14293 Local,
14294 #[serde(rename = "LOCAL_SOURCE")]
14295 LocalSource,
14296}
14297#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14298pub enum NetworkProtocol {
14299 #[serde(rename = "TCP")]
14300 Tcp,
14301 #[serde(rename = "UDP")]
14302 Udp,
14303}
14304#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14305pub enum ReturnType {
14306 #[serde(rename = "ANY")]
14307 Any,
14308 #[serde(rename = "FAILURE")]
14309 Failure,
14310 #[serde(rename = "SUCCESS")]
14311 Success,
14312}
14313#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
14314pub enum TypeDefKind {
14315 #[serde(rename = "BOOLEAN")]
14316 Boolean,
14317 #[serde(rename = "BOOLEAN_KIND")]
14318 BooleanKind,
14319 #[serde(rename = "ENUM")]
14320 Enum,
14321 #[serde(rename = "ENUM_KIND")]
14322 EnumKind,
14323 #[serde(rename = "FLOAT")]
14324 Float,
14325 #[serde(rename = "FLOAT_KIND")]
14326 FloatKind,
14327 #[serde(rename = "INPUT")]
14328 Input,
14329 #[serde(rename = "INPUT_KIND")]
14330 InputKind,
14331 #[serde(rename = "INTEGER")]
14332 Integer,
14333 #[serde(rename = "INTEGER_KIND")]
14334 IntegerKind,
14335 #[serde(rename = "INTERFACE")]
14336 Interface,
14337 #[serde(rename = "INTERFACE_KIND")]
14338 InterfaceKind,
14339 #[serde(rename = "LIST")]
14340 List,
14341 #[serde(rename = "LIST_KIND")]
14342 ListKind,
14343 #[serde(rename = "OBJECT")]
14344 Object,
14345 #[serde(rename = "OBJECT_KIND")]
14346 ObjectKind,
14347 #[serde(rename = "SCALAR")]
14348 Scalar,
14349 #[serde(rename = "SCALAR_KIND")]
14350 ScalarKind,
14351 #[serde(rename = "STRING")]
14352 String,
14353 #[serde(rename = "STRING_KIND")]
14354 StringKind,
14355 #[serde(rename = "VOID")]
14356 Void,
14357 #[serde(rename = "VOID_KIND")]
14358 VoidKind,
14359}