-
Notifications
You must be signed in to change notification settings - Fork 223
/
generated.go
4302 lines (3495 loc) · 148 KB
/
generated.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
package gql
import (
"context"
"encoding/json"
"fmt"
"time"
"github.com/Khan/genqlient/graphql"
)
// AddOnData includes the GraphQL fields of AddOn requested by the fragment AddOnData.
type AddOnData struct {
Id string `json:"id"`
// The service name according to the provider
Name string `json:"name"`
// Region where the primary instance is deployed
PrimaryRegion string `json:"primaryRegion"`
// Status of the add-on
Status string `json:"status"`
// Optional error message when `status` is `error`
ErrorMessage string `json:"errorMessage"`
// Add-on metadata
Metadata interface{} `json:"metadata"`
// Add-on options
Options interface{} `json:"options"`
}
// GetId returns AddOnData.Id, and is useful for accessing the field via an interface.
func (v *AddOnData) GetId() string { return v.Id }
// GetName returns AddOnData.Name, and is useful for accessing the field via an interface.
func (v *AddOnData) GetName() string { return v.Name }
// GetPrimaryRegion returns AddOnData.PrimaryRegion, and is useful for accessing the field via an interface.
func (v *AddOnData) GetPrimaryRegion() string { return v.PrimaryRegion }
// GetStatus returns AddOnData.Status, and is useful for accessing the field via an interface.
func (v *AddOnData) GetStatus() string { return v.Status }
// GetErrorMessage returns AddOnData.ErrorMessage, and is useful for accessing the field via an interface.
func (v *AddOnData) GetErrorMessage() string { return v.ErrorMessage }
// GetMetadata returns AddOnData.Metadata, and is useful for accessing the field via an interface.
func (v *AddOnData) GetMetadata() interface{} { return v.Metadata }
// GetOptions returns AddOnData.Options, and is useful for accessing the field via an interface.
func (v *AddOnData) GetOptions() interface{} { return v.Options }
type AddOnType string
const (
// An Arcjet site
AddOnTypeArcjet AddOnType = "arcjet"
// An Enveloop project
AddOnTypeEnveloop AddOnType = "enveloop"
// A Kubernetes cluster
AddOnTypeKubernetes AddOnType = "kubernetes"
// An Upstash Redis database
AddOnTypeRedis AddOnType = "redis"
// A Sentry project endpoint
AddOnTypeSentry AddOnType = "sentry"
// A Supabase database
AddOnTypeSupabase AddOnType = "supabase"
// A Tigris Data bucket
AddOnTypeTigris AddOnType = "tigris"
// An Upstash Kafka cluster
AddOnTypeUpstashKafka AddOnType = "upstash_kafka"
// An Upstash Redis database
AddOnTypeUpstashRedis AddOnType = "upstash_redis"
// An Upstash Vector cluster
AddOnTypeUpstashVector AddOnType = "upstash_vector"
// A Wafris firewall
AddOnTypeWafris AddOnType = "wafris"
)
// AgentGetInstancesApp includes the requested fields of the GraphQL type App.
type AgentGetInstancesApp struct {
// Organization that owns this app
Organization AgentGetInstancesAppOrganization `json:"organization"`
// Unique application ID
Id string `json:"id"`
// The unique application name
Name string `json:"name"`
Allocations []AgentGetInstancesAppAllocationsAllocation `json:"allocations"`
Machines AgentGetInstancesAppMachinesMachineConnection `json:"machines"`
}
// GetOrganization returns AgentGetInstancesApp.Organization, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesApp) GetOrganization() AgentGetInstancesAppOrganization {
return v.Organization
}
// GetId returns AgentGetInstancesApp.Id, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesApp) GetId() string { return v.Id }
// GetName returns AgentGetInstancesApp.Name, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesApp) GetName() string { return v.Name }
// GetAllocations returns AgentGetInstancesApp.Allocations, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesApp) GetAllocations() []AgentGetInstancesAppAllocationsAllocation {
return v.Allocations
}
// GetMachines returns AgentGetInstancesApp.Machines, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesApp) GetMachines() AgentGetInstancesAppMachinesMachineConnection {
return v.Machines
}
// AgentGetInstancesAppAllocationsAllocation includes the requested fields of the GraphQL type Allocation.
type AgentGetInstancesAppAllocationsAllocation struct {
// Unique ID for this instance
Id string `json:"id"`
// Region this allocation is running in
Region string `json:"region"`
// Private IPv6 address for this instance
PrivateIP string `json:"privateIP"`
}
// GetId returns AgentGetInstancesAppAllocationsAllocation.Id, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppAllocationsAllocation) GetId() string { return v.Id }
// GetRegion returns AgentGetInstancesAppAllocationsAllocation.Region, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppAllocationsAllocation) GetRegion() string { return v.Region }
// GetPrivateIP returns AgentGetInstancesAppAllocationsAllocation.PrivateIP, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppAllocationsAllocation) GetPrivateIP() string { return v.PrivateIP }
// AgentGetInstancesAppMachinesMachineConnection includes the requested fields of the GraphQL type MachineConnection.
// The GraphQL type's documentation follows.
//
// The connection type for Machine.
type AgentGetInstancesAppMachinesMachineConnection struct {
// A list of nodes.
Nodes []AgentGetInstancesAppMachinesMachineConnectionNodesMachine `json:"nodes"`
}
// GetNodes returns AgentGetInstancesAppMachinesMachineConnection.Nodes, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppMachinesMachineConnection) GetNodes() []AgentGetInstancesAppMachinesMachineConnectionNodesMachine {
return v.Nodes
}
// AgentGetInstancesAppMachinesMachineConnectionNodesMachine includes the requested fields of the GraphQL type Machine.
type AgentGetInstancesAppMachinesMachineConnectionNodesMachine struct {
State string `json:"state"`
Id string `json:"id"`
Region string `json:"region"`
Ips AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnection `json:"ips"`
}
// GetState returns AgentGetInstancesAppMachinesMachineConnectionNodesMachine.State, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppMachinesMachineConnectionNodesMachine) GetState() string { return v.State }
// GetId returns AgentGetInstancesAppMachinesMachineConnectionNodesMachine.Id, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppMachinesMachineConnectionNodesMachine) GetId() string { return v.Id }
// GetRegion returns AgentGetInstancesAppMachinesMachineConnectionNodesMachine.Region, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppMachinesMachineConnectionNodesMachine) GetRegion() string {
return v.Region
}
// GetIps returns AgentGetInstancesAppMachinesMachineConnectionNodesMachine.Ips, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppMachinesMachineConnectionNodesMachine) GetIps() AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnection {
return v.Ips
}
// AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnection includes the requested fields of the GraphQL type MachineIPConnection.
// The GraphQL type's documentation follows.
//
// The connection type for MachineIP.
type AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnection struct {
// A list of nodes.
Nodes []AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnectionNodesMachineIP `json:"nodes"`
}
// GetNodes returns AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnection.Nodes, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnection) GetNodes() []AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnectionNodesMachineIP {
return v.Nodes
}
// AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnectionNodesMachineIP includes the requested fields of the GraphQL type MachineIP.
type AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnectionNodesMachineIP struct {
Kind string `json:"kind"`
Family string `json:"family"`
Ip string `json:"ip"`
}
// GetKind returns AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnectionNodesMachineIP.Kind, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnectionNodesMachineIP) GetKind() string {
return v.Kind
}
// GetFamily returns AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnectionNodesMachineIP.Family, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnectionNodesMachineIP) GetFamily() string {
return v.Family
}
// GetIp returns AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnectionNodesMachineIP.Ip, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppMachinesMachineConnectionNodesMachineIpsMachineIPConnectionNodesMachineIP) GetIp() string {
return v.Ip
}
// AgentGetInstancesAppOrganization includes the requested fields of the GraphQL type Organization.
type AgentGetInstancesAppOrganization struct {
// Unique organization slug
Slug string `json:"slug"`
}
// GetSlug returns AgentGetInstancesAppOrganization.Slug, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesAppOrganization) GetSlug() string { return v.Slug }
// AgentGetInstancesResponse is returned by AgentGetInstances on success.
type AgentGetInstancesResponse struct {
// Find an app by name
App AgentGetInstancesApp `json:"app"`
}
// GetApp returns AgentGetInstancesResponse.App, and is useful for accessing the field via an interface.
func (v *AgentGetInstancesResponse) GetApp() AgentGetInstancesApp { return v.App }
// AgreedToProviderTosResponse is returned by AgreedToProviderTos on success.
type AgreedToProviderTosResponse struct {
Viewer AgreedToProviderTosViewerPrincipal `json:"-"`
}
// GetViewer returns AgreedToProviderTosResponse.Viewer, and is useful for accessing the field via an interface.
func (v *AgreedToProviderTosResponse) GetViewer() AgreedToProviderTosViewerPrincipal { return v.Viewer }
func (v *AgreedToProviderTosResponse) UnmarshalJSON(b []byte) error {
if string(b) == "null" {
return nil
}
var firstPass struct {
*AgreedToProviderTosResponse
Viewer json.RawMessage `json:"viewer"`
graphql.NoUnmarshalJSON
}
firstPass.AgreedToProviderTosResponse = v
err := json.Unmarshal(b, &firstPass)
if err != nil {
return err
}
{
dst := &v.Viewer
src := firstPass.Viewer
if len(src) != 0 && string(src) != "null" {
err = __unmarshalAgreedToProviderTosViewerPrincipal(
src, dst)
if err != nil {
return fmt.Errorf(
"unable to unmarshal AgreedToProviderTosResponse.Viewer: %w", err)
}
}
}
return nil
}
type __premarshalAgreedToProviderTosResponse struct {
Viewer json.RawMessage `json:"viewer"`
}
func (v *AgreedToProviderTosResponse) MarshalJSON() ([]byte, error) {
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
return json.Marshal(premarshaled)
}
func (v *AgreedToProviderTosResponse) __premarshalJSON() (*__premarshalAgreedToProviderTosResponse, error) {
var retval __premarshalAgreedToProviderTosResponse
{
dst := &retval.Viewer
src := v.Viewer
var err error
*dst, err = __marshalAgreedToProviderTosViewerPrincipal(
&src)
if err != nil {
return nil, fmt.Errorf(
"unable to marshal AgreedToProviderTosResponse.Viewer: %w", err)
}
}
return &retval, nil
}
// AgreedToProviderTosViewerMacaroon includes the requested fields of the GraphQL type Macaroon.
type AgreedToProviderTosViewerMacaroon struct {
Typename string `json:"__typename"`
}
// GetTypename returns AgreedToProviderTosViewerMacaroon.Typename, and is useful for accessing the field via an interface.
func (v *AgreedToProviderTosViewerMacaroon) GetTypename() string { return v.Typename }
// AgreedToProviderTosViewerPrincipal includes the requested fields of the GraphQL interface Principal.
//
// AgreedToProviderTosViewerPrincipal is implemented by the following types:
// AgreedToProviderTosViewerMacaroon
// AgreedToProviderTosViewerUser
type AgreedToProviderTosViewerPrincipal interface {
implementsGraphQLInterfaceAgreedToProviderTosViewerPrincipal()
// GetTypename returns the receiver's concrete GraphQL type-name (see interface doc for possible values).
GetTypename() string
}
func (v *AgreedToProviderTosViewerMacaroon) implementsGraphQLInterfaceAgreedToProviderTosViewerPrincipal() {
}
func (v *AgreedToProviderTosViewerUser) implementsGraphQLInterfaceAgreedToProviderTosViewerPrincipal() {
}
func __unmarshalAgreedToProviderTosViewerPrincipal(b []byte, v *AgreedToProviderTosViewerPrincipal) error {
if string(b) == "null" {
return nil
}
var tn struct {
TypeName string `json:"__typename"`
}
err := json.Unmarshal(b, &tn)
if err != nil {
return err
}
switch tn.TypeName {
case "Macaroon":
*v = new(AgreedToProviderTosViewerMacaroon)
return json.Unmarshal(b, *v)
case "User":
*v = new(AgreedToProviderTosViewerUser)
return json.Unmarshal(b, *v)
case "":
return fmt.Errorf(
"response was missing Principal.__typename")
default:
return fmt.Errorf(
`unexpected concrete type for AgreedToProviderTosViewerPrincipal: "%v"`, tn.TypeName)
}
}
func __marshalAgreedToProviderTosViewerPrincipal(v *AgreedToProviderTosViewerPrincipal) ([]byte, error) {
var typename string
switch v := (*v).(type) {
case *AgreedToProviderTosViewerMacaroon:
typename = "Macaroon"
result := struct {
TypeName string `json:"__typename"`
*AgreedToProviderTosViewerMacaroon
}{typename, v}
return json.Marshal(result)
case *AgreedToProviderTosViewerUser:
typename = "User"
result := struct {
TypeName string `json:"__typename"`
*AgreedToProviderTosViewerUser
}{typename, v}
return json.Marshal(result)
case nil:
return []byte("null"), nil
default:
return nil, fmt.Errorf(
`unexpected concrete type for AgreedToProviderTosViewerPrincipal: "%T"`, v)
}
}
// AgreedToProviderTosViewerUser includes the requested fields of the GraphQL type User.
type AgreedToProviderTosViewerUser struct {
Typename string `json:"__typename"`
// Check if the organization has agreed to the extension provider terms of service
AgreedToProviderTos bool `json:"agreedToProviderTos"`
}
// GetTypename returns AgreedToProviderTosViewerUser.Typename, and is useful for accessing the field via an interface.
func (v *AgreedToProviderTosViewerUser) GetTypename() string { return v.Typename }
// GetAgreedToProviderTos returns AgreedToProviderTosViewerUser.AgreedToProviderTos, and is useful for accessing the field via an interface.
func (v *AgreedToProviderTosViewerUser) GetAgreedToProviderTos() bool { return v.AgreedToProviderTos }
// AllAppsOrganization includes the requested fields of the GraphQL type Organization.
type AllAppsOrganization struct {
Apps AllAppsOrganizationAppsAppConnection `json:"apps"`
}
// GetApps returns AllAppsOrganization.Apps, and is useful for accessing the field via an interface.
func (v *AllAppsOrganization) GetApps() AllAppsOrganizationAppsAppConnection { return v.Apps }
// AllAppsOrganizationAppsAppConnection includes the requested fields of the GraphQL type AppConnection.
// The GraphQL type's documentation follows.
//
// The connection type for App.
type AllAppsOrganizationAppsAppConnection struct {
// A list of nodes.
Nodes []AllAppsOrganizationAppsAppConnectionNodesApp `json:"nodes"`
}
// GetNodes returns AllAppsOrganizationAppsAppConnection.Nodes, and is useful for accessing the field via an interface.
func (v *AllAppsOrganizationAppsAppConnection) GetNodes() []AllAppsOrganizationAppsAppConnectionNodesApp {
return v.Nodes
}
// AllAppsOrganizationAppsAppConnectionNodesApp includes the requested fields of the GraphQL type App.
type AllAppsOrganizationAppsAppConnectionNodesApp struct {
// Unique application ID
Id string `json:"id"`
CreatedAt time.Time `json:"createdAt"`
}
// GetId returns AllAppsOrganizationAppsAppConnectionNodesApp.Id, and is useful for accessing the field via an interface.
func (v *AllAppsOrganizationAppsAppConnectionNodesApp) GetId() string { return v.Id }
// GetCreatedAt returns AllAppsOrganizationAppsAppConnectionNodesApp.CreatedAt, and is useful for accessing the field via an interface.
func (v *AllAppsOrganizationAppsAppConnectionNodesApp) GetCreatedAt() time.Time { return v.CreatedAt }
// AllAppsResponse is returned by AllApps on success.
type AllAppsResponse struct {
// Find an organization by ID
Organization AllAppsOrganization `json:"organization"`
}
// GetOrganization returns AllAppsResponse.Organization, and is useful for accessing the field via an interface.
func (v *AllAppsResponse) GetOrganization() AllAppsOrganization { return v.Organization }
// AppData includes the GraphQL fields of App requested by the fragment AppData.
type AppData struct {
// Unique application ID
Id string `json:"id"`
// The unique application name
Name string `json:"name"`
Deployed bool `json:"deployed"`
// Fly platform version
PlatformVersion PlatformVersionEnum `json:"platformVersion"`
// Secrets set on the application
Secrets []AppDataSecretsSecret `json:"secrets"`
// Organization that owns this app
Organization AppDataOrganization `json:"organization"`
}
// GetId returns AppData.Id, and is useful for accessing the field via an interface.
func (v *AppData) GetId() string { return v.Id }
// GetName returns AppData.Name, and is useful for accessing the field via an interface.
func (v *AppData) GetName() string { return v.Name }
// GetDeployed returns AppData.Deployed, and is useful for accessing the field via an interface.
func (v *AppData) GetDeployed() bool { return v.Deployed }
// GetPlatformVersion returns AppData.PlatformVersion, and is useful for accessing the field via an interface.
func (v *AppData) GetPlatformVersion() PlatformVersionEnum { return v.PlatformVersion }
// GetSecrets returns AppData.Secrets, and is useful for accessing the field via an interface.
func (v *AppData) GetSecrets() []AppDataSecretsSecret { return v.Secrets }
// GetOrganization returns AppData.Organization, and is useful for accessing the field via an interface.
func (v *AppData) GetOrganization() AppDataOrganization { return v.Organization }
// AppDataOrganization includes the requested fields of the GraphQL type Organization.
type AppDataOrganization struct {
OrganizationData `json:"-"`
}
// GetId returns AppDataOrganization.Id, and is useful for accessing the field via an interface.
func (v *AppDataOrganization) GetId() string { return v.OrganizationData.Id }
// GetSlug returns AppDataOrganization.Slug, and is useful for accessing the field via an interface.
func (v *AppDataOrganization) GetSlug() string { return v.OrganizationData.Slug }
// GetRawSlug returns AppDataOrganization.RawSlug, and is useful for accessing the field via an interface.
func (v *AppDataOrganization) GetRawSlug() string { return v.OrganizationData.RawSlug }
// GetPaidPlan returns AppDataOrganization.PaidPlan, and is useful for accessing the field via an interface.
func (v *AppDataOrganization) GetPaidPlan() bool { return v.OrganizationData.PaidPlan }
// GetAddOnSsoLink returns AppDataOrganization.AddOnSsoLink, and is useful for accessing the field via an interface.
func (v *AppDataOrganization) GetAddOnSsoLink() string { return v.OrganizationData.AddOnSsoLink }
// GetProvisionsBetaExtensions returns AppDataOrganization.ProvisionsBetaExtensions, and is useful for accessing the field via an interface.
func (v *AppDataOrganization) GetProvisionsBetaExtensions() bool {
return v.OrganizationData.ProvisionsBetaExtensions
}
func (v *AppDataOrganization) UnmarshalJSON(b []byte) error {
if string(b) == "null" {
return nil
}
var firstPass struct {
*AppDataOrganization
graphql.NoUnmarshalJSON
}
firstPass.AppDataOrganization = v
err := json.Unmarshal(b, &firstPass)
if err != nil {
return err
}
err = json.Unmarshal(
b, &v.OrganizationData)
if err != nil {
return err
}
return nil
}
type __premarshalAppDataOrganization struct {
Id string `json:"id"`
Slug string `json:"slug"`
RawSlug string `json:"rawSlug"`
PaidPlan bool `json:"paidPlan"`
AddOnSsoLink string `json:"addOnSsoLink"`
ProvisionsBetaExtensions bool `json:"provisionsBetaExtensions"`
}
func (v *AppDataOrganization) MarshalJSON() ([]byte, error) {
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
return json.Marshal(premarshaled)
}
func (v *AppDataOrganization) __premarshalJSON() (*__premarshalAppDataOrganization, error) {
var retval __premarshalAppDataOrganization
retval.Id = v.OrganizationData.Id
retval.Slug = v.OrganizationData.Slug
retval.RawSlug = v.OrganizationData.RawSlug
retval.PaidPlan = v.OrganizationData.PaidPlan
retval.AddOnSsoLink = v.OrganizationData.AddOnSsoLink
retval.ProvisionsBetaExtensions = v.OrganizationData.ProvisionsBetaExtensions
return &retval, nil
}
// AppDataSecretsSecret includes the requested fields of the GraphQL type Secret.
type AppDataSecretsSecret struct {
// The name of the secret
Name string `json:"name"`
}
// GetName returns AppDataSecretsSecret.Name, and is useful for accessing the field via an interface.
func (v *AppDataSecretsSecret) GetName() string { return v.Name }
// CreateAddOnCreateAddOnCreateAddOnPayload includes the requested fields of the GraphQL type CreateAddOnPayload.
// The GraphQL type's documentation follows.
//
// Autogenerated return type of CreateAddOn.
type CreateAddOnCreateAddOnCreateAddOnPayload struct {
AddOn CreateAddOnCreateAddOnCreateAddOnPayloadAddOn `json:"addOn"`
}
// GetAddOn returns CreateAddOnCreateAddOnCreateAddOnPayload.AddOn, and is useful for accessing the field via an interface.
func (v *CreateAddOnCreateAddOnCreateAddOnPayload) GetAddOn() CreateAddOnCreateAddOnCreateAddOnPayloadAddOn {
return v.AddOn
}
// CreateAddOnCreateAddOnCreateAddOnPayloadAddOn includes the requested fields of the GraphQL type AddOn.
type CreateAddOnCreateAddOnCreateAddOnPayloadAddOn struct {
// The service name according to the provider
Name string `json:"name"`
// Public URL for this service
PublicUrl string `json:"publicUrl"`
// Single sign-on link to the add-on dashboard
SsoLink string `json:"ssoLink"`
// Environment variables for the add-on
Environment interface{} `json:"environment"`
// Region where the primary instance is deployed
PrimaryRegion string `json:"primaryRegion"`
}
// GetName returns CreateAddOnCreateAddOnCreateAddOnPayloadAddOn.Name, and is useful for accessing the field via an interface.
func (v *CreateAddOnCreateAddOnCreateAddOnPayloadAddOn) GetName() string { return v.Name }
// GetPublicUrl returns CreateAddOnCreateAddOnCreateAddOnPayloadAddOn.PublicUrl, and is useful for accessing the field via an interface.
func (v *CreateAddOnCreateAddOnCreateAddOnPayloadAddOn) GetPublicUrl() string { return v.PublicUrl }
// GetSsoLink returns CreateAddOnCreateAddOnCreateAddOnPayloadAddOn.SsoLink, and is useful for accessing the field via an interface.
func (v *CreateAddOnCreateAddOnCreateAddOnPayloadAddOn) GetSsoLink() string { return v.SsoLink }
// GetEnvironment returns CreateAddOnCreateAddOnCreateAddOnPayloadAddOn.Environment, and is useful for accessing the field via an interface.
func (v *CreateAddOnCreateAddOnCreateAddOnPayloadAddOn) GetEnvironment() interface{} {
return v.Environment
}
// GetPrimaryRegion returns CreateAddOnCreateAddOnCreateAddOnPayloadAddOn.PrimaryRegion, and is useful for accessing the field via an interface.
func (v *CreateAddOnCreateAddOnCreateAddOnPayloadAddOn) GetPrimaryRegion() string {
return v.PrimaryRegion
}
// Autogenerated input type of CreateAddOn
type CreateAddOnInput struct {
// An optional application ID to attach the add-on to after provisioning
AppId string `json:"appId"`
// A unique identifier for the client performing the mutation.
ClientMutationId string `json:"clientMutationId"`
// An optional name for the add-on
Name string `json:"name"`
// Options specific to the add-on
Options interface{} `json:"options"`
// The organization which owns the add-on
OrganizationId string `json:"organizationId"`
// A provider organization plan to set along with provisioning
OrganizationPlanId string `json:"organizationPlanId"`
// The add-on plan ID
PlanId string `json:"planId"`
// Desired primary region for the add-on
PrimaryRegion string `json:"primaryRegion"`
// Desired regions to place replicas in
ReadRegions []string `json:"readRegions"`
// The add-on type to provision
Type AddOnType `json:"type"`
}
// GetAppId returns CreateAddOnInput.AppId, and is useful for accessing the field via an interface.
func (v *CreateAddOnInput) GetAppId() string { return v.AppId }
// GetClientMutationId returns CreateAddOnInput.ClientMutationId, and is useful for accessing the field via an interface.
func (v *CreateAddOnInput) GetClientMutationId() string { return v.ClientMutationId }
// GetName returns CreateAddOnInput.Name, and is useful for accessing the field via an interface.
func (v *CreateAddOnInput) GetName() string { return v.Name }
// GetOptions returns CreateAddOnInput.Options, and is useful for accessing the field via an interface.
func (v *CreateAddOnInput) GetOptions() interface{} { return v.Options }
// GetOrganizationId returns CreateAddOnInput.OrganizationId, and is useful for accessing the field via an interface.
func (v *CreateAddOnInput) GetOrganizationId() string { return v.OrganizationId }
// GetOrganizationPlanId returns CreateAddOnInput.OrganizationPlanId, and is useful for accessing the field via an interface.
func (v *CreateAddOnInput) GetOrganizationPlanId() string { return v.OrganizationPlanId }
// GetPlanId returns CreateAddOnInput.PlanId, and is useful for accessing the field via an interface.
func (v *CreateAddOnInput) GetPlanId() string { return v.PlanId }
// GetPrimaryRegion returns CreateAddOnInput.PrimaryRegion, and is useful for accessing the field via an interface.
func (v *CreateAddOnInput) GetPrimaryRegion() string { return v.PrimaryRegion }
// GetReadRegions returns CreateAddOnInput.ReadRegions, and is useful for accessing the field via an interface.
func (v *CreateAddOnInput) GetReadRegions() []string { return v.ReadRegions }
// GetType returns CreateAddOnInput.Type, and is useful for accessing the field via an interface.
func (v *CreateAddOnInput) GetType() AddOnType { return v.Type }
// CreateAddOnResponse is returned by CreateAddOn on success.
type CreateAddOnResponse struct {
CreateAddOn CreateAddOnCreateAddOnCreateAddOnPayload `json:"createAddOn"`
}
// GetCreateAddOn returns CreateAddOnResponse.CreateAddOn, and is useful for accessing the field via an interface.
func (v *CreateAddOnResponse) GetCreateAddOn() CreateAddOnCreateAddOnCreateAddOnPayload {
return v.CreateAddOn
}
// CreateAppCreateAppCreateAppPayload includes the requested fields of the GraphQL type CreateAppPayload.
// The GraphQL type's documentation follows.
//
// Autogenerated return type of CreateApp.
type CreateAppCreateAppCreateAppPayload struct {
App CreateAppCreateAppCreateAppPayloadApp `json:"app"`
}
// GetApp returns CreateAppCreateAppCreateAppPayload.App, and is useful for accessing the field via an interface.
func (v *CreateAppCreateAppCreateAppPayload) GetApp() CreateAppCreateAppCreateAppPayloadApp {
return v.App
}
// CreateAppCreateAppCreateAppPayloadApp includes the requested fields of the GraphQL type App.
type CreateAppCreateAppCreateAppPayloadApp struct {
AppData `json:"-"`
Config CreateAppCreateAppCreateAppPayloadAppConfig `json:"config"`
Regions []CreateAppCreateAppCreateAppPayloadAppRegionsRegion `json:"regions"`
}
// GetConfig returns CreateAppCreateAppCreateAppPayloadApp.Config, and is useful for accessing the field via an interface.
func (v *CreateAppCreateAppCreateAppPayloadApp) GetConfig() CreateAppCreateAppCreateAppPayloadAppConfig {
return v.Config
}
// GetRegions returns CreateAppCreateAppCreateAppPayloadApp.Regions, and is useful for accessing the field via an interface.
func (v *CreateAppCreateAppCreateAppPayloadApp) GetRegions() []CreateAppCreateAppCreateAppPayloadAppRegionsRegion {
return v.Regions
}
// GetId returns CreateAppCreateAppCreateAppPayloadApp.Id, and is useful for accessing the field via an interface.
func (v *CreateAppCreateAppCreateAppPayloadApp) GetId() string { return v.AppData.Id }
// GetName returns CreateAppCreateAppCreateAppPayloadApp.Name, and is useful for accessing the field via an interface.
func (v *CreateAppCreateAppCreateAppPayloadApp) GetName() string { return v.AppData.Name }
// GetDeployed returns CreateAppCreateAppCreateAppPayloadApp.Deployed, and is useful for accessing the field via an interface.
func (v *CreateAppCreateAppCreateAppPayloadApp) GetDeployed() bool { return v.AppData.Deployed }
// GetPlatformVersion returns CreateAppCreateAppCreateAppPayloadApp.PlatformVersion, and is useful for accessing the field via an interface.
func (v *CreateAppCreateAppCreateAppPayloadApp) GetPlatformVersion() PlatformVersionEnum {
return v.AppData.PlatformVersion
}
// GetSecrets returns CreateAppCreateAppCreateAppPayloadApp.Secrets, and is useful for accessing the field via an interface.
func (v *CreateAppCreateAppCreateAppPayloadApp) GetSecrets() []AppDataSecretsSecret {
return v.AppData.Secrets
}
// GetOrganization returns CreateAppCreateAppCreateAppPayloadApp.Organization, and is useful for accessing the field via an interface.
func (v *CreateAppCreateAppCreateAppPayloadApp) GetOrganization() AppDataOrganization {
return v.AppData.Organization
}
func (v *CreateAppCreateAppCreateAppPayloadApp) UnmarshalJSON(b []byte) error {
if string(b) == "null" {
return nil
}
var firstPass struct {
*CreateAppCreateAppCreateAppPayloadApp
graphql.NoUnmarshalJSON
}
firstPass.CreateAppCreateAppCreateAppPayloadApp = v
err := json.Unmarshal(b, &firstPass)
if err != nil {
return err
}
err = json.Unmarshal(
b, &v.AppData)
if err != nil {
return err
}
return nil
}
type __premarshalCreateAppCreateAppCreateAppPayloadApp struct {
Config CreateAppCreateAppCreateAppPayloadAppConfig `json:"config"`
Regions []CreateAppCreateAppCreateAppPayloadAppRegionsRegion `json:"regions"`
Id string `json:"id"`
Name string `json:"name"`
Deployed bool `json:"deployed"`
PlatformVersion PlatformVersionEnum `json:"platformVersion"`
Secrets []AppDataSecretsSecret `json:"secrets"`
Organization AppDataOrganization `json:"organization"`
}
func (v *CreateAppCreateAppCreateAppPayloadApp) MarshalJSON() ([]byte, error) {
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
return json.Marshal(premarshaled)
}
func (v *CreateAppCreateAppCreateAppPayloadApp) __premarshalJSON() (*__premarshalCreateAppCreateAppCreateAppPayloadApp, error) {
var retval __premarshalCreateAppCreateAppCreateAppPayloadApp
retval.Config = v.Config
retval.Regions = v.Regions
retval.Id = v.AppData.Id
retval.Name = v.AppData.Name
retval.Deployed = v.AppData.Deployed
retval.PlatformVersion = v.AppData.PlatformVersion
retval.Secrets = v.AppData.Secrets
retval.Organization = v.AppData.Organization
return &retval, nil
}
// CreateAppCreateAppCreateAppPayloadAppConfig includes the requested fields of the GraphQL type AppConfig.
type CreateAppCreateAppCreateAppPayloadAppConfig struct {
Definition interface{} `json:"definition"`
}
// GetDefinition returns CreateAppCreateAppCreateAppPayloadAppConfig.Definition, and is useful for accessing the field via an interface.
func (v *CreateAppCreateAppCreateAppPayloadAppConfig) GetDefinition() interface{} {
return v.Definition
}
// CreateAppCreateAppCreateAppPayloadAppRegionsRegion includes the requested fields of the GraphQL type Region.
type CreateAppCreateAppCreateAppPayloadAppRegionsRegion struct {
// The name of this region
Name string `json:"name"`
// The IATA airport code for this region
Code string `json:"code"`
}
// GetName returns CreateAppCreateAppCreateAppPayloadAppRegionsRegion.Name, and is useful for accessing the field via an interface.
func (v *CreateAppCreateAppCreateAppPayloadAppRegionsRegion) GetName() string { return v.Name }
// GetCode returns CreateAppCreateAppCreateAppPayloadAppRegionsRegion.Code, and is useful for accessing the field via an interface.
func (v *CreateAppCreateAppCreateAppPayloadAppRegionsRegion) GetCode() string { return v.Code }
// Autogenerated input type of CreateApp
type CreateAppInput struct {
AppRoleId string `json:"appRoleId"`
// A unique identifier for the client performing the mutation.
ClientMutationId string `json:"clientMutationId"`
EnableSubdomains bool `json:"enableSubdomains"`
Heroku bool `json:"heroku"`
Machines bool `json:"machines"`
// The name of the new application. Defaults to a random name.
Name string `json:"name"`
Network string `json:"network"`
// The node ID of the organization
OrganizationId string `json:"organizationId"`
PreferredRegion string `json:"preferredRegion"`
// The application runtime
Runtime RuntimeType `json:"runtime"`
}
// GetAppRoleId returns CreateAppInput.AppRoleId, and is useful for accessing the field via an interface.
func (v *CreateAppInput) GetAppRoleId() string { return v.AppRoleId }
// GetClientMutationId returns CreateAppInput.ClientMutationId, and is useful for accessing the field via an interface.
func (v *CreateAppInput) GetClientMutationId() string { return v.ClientMutationId }
// GetEnableSubdomains returns CreateAppInput.EnableSubdomains, and is useful for accessing the field via an interface.
func (v *CreateAppInput) GetEnableSubdomains() bool { return v.EnableSubdomains }
// GetHeroku returns CreateAppInput.Heroku, and is useful for accessing the field via an interface.
func (v *CreateAppInput) GetHeroku() bool { return v.Heroku }
// GetMachines returns CreateAppInput.Machines, and is useful for accessing the field via an interface.
func (v *CreateAppInput) GetMachines() bool { return v.Machines }
// GetName returns CreateAppInput.Name, and is useful for accessing the field via an interface.
func (v *CreateAppInput) GetName() string { return v.Name }
// GetNetwork returns CreateAppInput.Network, and is useful for accessing the field via an interface.
func (v *CreateAppInput) GetNetwork() string { return v.Network }
// GetOrganizationId returns CreateAppInput.OrganizationId, and is useful for accessing the field via an interface.
func (v *CreateAppInput) GetOrganizationId() string { return v.OrganizationId }
// GetPreferredRegion returns CreateAppInput.PreferredRegion, and is useful for accessing the field via an interface.
func (v *CreateAppInput) GetPreferredRegion() string { return v.PreferredRegion }
// GetRuntime returns CreateAppInput.Runtime, and is useful for accessing the field via an interface.
func (v *CreateAppInput) GetRuntime() RuntimeType { return v.Runtime }
// CreateAppResponse is returned by CreateApp on success.
type CreateAppResponse struct {
CreateApp CreateAppCreateAppCreateAppPayload `json:"createApp"`
}
// GetCreateApp returns CreateAppResponse.CreateApp, and is useful for accessing the field via an interface.
func (v *CreateAppResponse) GetCreateApp() CreateAppCreateAppCreateAppPayload { return v.CreateApp }
// CreateExtensionCreateAddOnCreateAddOnPayload includes the requested fields of the GraphQL type CreateAddOnPayload.
// The GraphQL type's documentation follows.
//
// Autogenerated return type of CreateAddOn.
type CreateExtensionCreateAddOnCreateAddOnPayload struct {
AddOn CreateExtensionCreateAddOnCreateAddOnPayloadAddOn `json:"addOn"`
}
// GetAddOn returns CreateExtensionCreateAddOnCreateAddOnPayload.AddOn, and is useful for accessing the field via an interface.
func (v *CreateExtensionCreateAddOnCreateAddOnPayload) GetAddOn() CreateExtensionCreateAddOnCreateAddOnPayloadAddOn {
return v.AddOn
}
// CreateExtensionCreateAddOnCreateAddOnPayloadAddOn includes the requested fields of the GraphQL type AddOn.
type CreateExtensionCreateAddOnCreateAddOnPayloadAddOn struct {
ExtensionData `json:"-"`
}
// GetName returns CreateExtensionCreateAddOnCreateAddOnPayloadAddOn.Name, and is useful for accessing the field via an interface.
func (v *CreateExtensionCreateAddOnCreateAddOnPayloadAddOn) GetName() string {
return v.ExtensionData.Name
}
// GetSsoLink returns CreateExtensionCreateAddOnCreateAddOnPayloadAddOn.SsoLink, and is useful for accessing the field via an interface.
func (v *CreateExtensionCreateAddOnCreateAddOnPayloadAddOn) GetSsoLink() string {
return v.ExtensionData.SsoLink
}
// GetEnvironment returns CreateExtensionCreateAddOnCreateAddOnPayloadAddOn.Environment, and is useful for accessing the field via an interface.
func (v *CreateExtensionCreateAddOnCreateAddOnPayloadAddOn) GetEnvironment() interface{} {
return v.ExtensionData.Environment
}
// GetPrimaryRegion returns CreateExtensionCreateAddOnCreateAddOnPayloadAddOn.PrimaryRegion, and is useful for accessing the field via an interface.
func (v *CreateExtensionCreateAddOnCreateAddOnPayloadAddOn) GetPrimaryRegion() string {
return v.ExtensionData.PrimaryRegion
}
func (v *CreateExtensionCreateAddOnCreateAddOnPayloadAddOn) UnmarshalJSON(b []byte) error {
if string(b) == "null" {
return nil
}
var firstPass struct {
*CreateExtensionCreateAddOnCreateAddOnPayloadAddOn
graphql.NoUnmarshalJSON
}
firstPass.CreateExtensionCreateAddOnCreateAddOnPayloadAddOn = v
err := json.Unmarshal(b, &firstPass)
if err != nil {
return err
}
err = json.Unmarshal(
b, &v.ExtensionData)
if err != nil {
return err
}
return nil
}
type __premarshalCreateExtensionCreateAddOnCreateAddOnPayloadAddOn struct {
Name string `json:"name"`
SsoLink string `json:"ssoLink"`
Environment interface{} `json:"environment"`
PrimaryRegion string `json:"primaryRegion"`
}
func (v *CreateExtensionCreateAddOnCreateAddOnPayloadAddOn) MarshalJSON() ([]byte, error) {
premarshaled, err := v.__premarshalJSON()
if err != nil {
return nil, err
}
return json.Marshal(premarshaled)
}
func (v *CreateExtensionCreateAddOnCreateAddOnPayloadAddOn) __premarshalJSON() (*__premarshalCreateExtensionCreateAddOnCreateAddOnPayloadAddOn, error) {
var retval __premarshalCreateExtensionCreateAddOnCreateAddOnPayloadAddOn
retval.Name = v.ExtensionData.Name
retval.SsoLink = v.ExtensionData.SsoLink
retval.Environment = v.ExtensionData.Environment
retval.PrimaryRegion = v.ExtensionData.PrimaryRegion
return &retval, nil
}
// CreateExtensionResponse is returned by CreateExtension on success.
type CreateExtensionResponse struct {
CreateAddOn CreateExtensionCreateAddOnCreateAddOnPayload `json:"createAddOn"`
}
// GetCreateAddOn returns CreateExtensionResponse.CreateAddOn, and is useful for accessing the field via an interface.
func (v *CreateExtensionResponse) GetCreateAddOn() CreateExtensionCreateAddOnCreateAddOnPayload {
return v.CreateAddOn
}
// CreateLimitedAccessTokenCreateLimitedAccessTokenCreateLimitedAccessTokenPayload includes the requested fields of the GraphQL type CreateLimitedAccessTokenPayload.
// The GraphQL type's documentation follows.
//
// Autogenerated return type of CreateLimitedAccessToken.
type CreateLimitedAccessTokenCreateLimitedAccessTokenCreateLimitedAccessTokenPayload struct {
LimitedAccessToken CreateLimitedAccessTokenCreateLimitedAccessTokenCreateLimitedAccessTokenPayloadLimitedAccessToken `json:"limitedAccessToken"`
}
// GetLimitedAccessToken returns CreateLimitedAccessTokenCreateLimitedAccessTokenCreateLimitedAccessTokenPayload.LimitedAccessToken, and is useful for accessing the field via an interface.
func (v *CreateLimitedAccessTokenCreateLimitedAccessTokenCreateLimitedAccessTokenPayload) GetLimitedAccessToken() CreateLimitedAccessTokenCreateLimitedAccessTokenCreateLimitedAccessTokenPayloadLimitedAccessToken {
return v.LimitedAccessToken
}
// CreateLimitedAccessTokenCreateLimitedAccessTokenCreateLimitedAccessTokenPayloadLimitedAccessToken includes the requested fields of the GraphQL type LimitedAccessToken.
type CreateLimitedAccessTokenCreateLimitedAccessTokenCreateLimitedAccessTokenPayloadLimitedAccessToken struct {
TokenHeader string `json:"tokenHeader"`
}
// GetTokenHeader returns CreateLimitedAccessTokenCreateLimitedAccessTokenCreateLimitedAccessTokenPayloadLimitedAccessToken.TokenHeader, and is useful for accessing the field via an interface.
func (v *CreateLimitedAccessTokenCreateLimitedAccessTokenCreateLimitedAccessTokenPayloadLimitedAccessToken) GetTokenHeader() string {
return v.TokenHeader
}
// CreateLimitedAccessTokenResponse is returned by CreateLimitedAccessToken on success.
type CreateLimitedAccessTokenResponse struct {
CreateLimitedAccessToken CreateLimitedAccessTokenCreateLimitedAccessTokenCreateLimitedAccessTokenPayload `json:"createLimitedAccessToken"`
}
// GetCreateLimitedAccessToken returns CreateLimitedAccessTokenResponse.CreateLimitedAccessToken, and is useful for accessing the field via an interface.
func (v *CreateLimitedAccessTokenResponse) GetCreateLimitedAccessToken() CreateLimitedAccessTokenCreateLimitedAccessTokenCreateLimitedAccessTokenPayload {
return v.CreateLimitedAccessToken
}