forked from newrelic/newrelic-client-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tutone.yml
1133 lines (1059 loc) · 37 KB
/
.tutone.yml
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
---
# Log level for running tutone
# Default: info
log_level: debug
# Cache for storing a GraphQL schema
cache:
# Default: schema.json
schema_file: schema.json
# GraphQL endpoint to query for schema
# Required
endpoint: https://api.newrelic.com/graphql
# How to authenticate to the API
auth:
# Header set with the API key for authentication
# Default: Api-Key
header: Api-Key
# Environment variable to get the API key from
# Default: TUTONE_API_KEY
api_key_env_var: NEW_RELIC_API_KEY
packages:
- name: synthetics
path: pkg/synthetics
import_path: github.com/newrelic/newrelic-client-go/pkg/synthetics
generators:
- typegen
- nerdgraphclient
imports:
- github.com/newrelic/newrelic-client-go/pkg/nrtime
queries:
- path: ["actor", "account", "synthetics"]
endpoints:
- name: "script"
max_query_field_depth: 1
- name: "steps"
max_query_field_depth: 1
mutations:
- name: syntheticsCreateSecureCredential
max_query_field_depth: 2
- name: syntheticsDeleteSecureCredential
max_query_field_depth: 2
- name: syntheticsUpdateSecureCredential
max_query_field_depth: 2
- name: syntheticsCreateScriptApiMonitor
max_query_field_depth: 2
- name: syntheticsUpdateScriptApiMonitor
max_query_field_depth: 2
- name: syntheticsCreateScriptBrowserMonitor
max_query_field_depth: 2
- name: syntheticsUpdateScriptBrowserMonitor
max_query_field_depth: 2
- name: syntheticsCreateSimpleBrowserMonitor
max_query_field_depth: 2
- name: syntheticsUpdateSimpleBrowserMonitor
max_query_field_depth: 2
- name: syntheticsCreateSimpleMonitor
max_query_field_depth: 2
- name: syntheticsUpdateSimpleMonitor
max_query_field_depth: 2
- name: syntheticsCreateBrokenLinksMonitor
max_query_field_depth: 2
- name: syntheticsUpdateBrokenLinksMonitor
max_query_field_depth: 2
- name: syntheticsCreateCertCheckMonitor
max_query_field_depth: 2
- name: syntheticsUpdateCertCheckMonitor
max_query_field_depth: 2
- name: syntheticsCreateStepMonitor
max_query_field_depth: 2
- name: syntheticsUpdateStepMonitor
max_query_field_depth: 2
- name: syntheticsDeleteMonitor
max_query_field_depth: 2
- name: syntheticsCreatePrivateLocation
max_query_field_depth: 2
- name: syntheticsDeletePrivateLocation
max_query_field_depth: 2
- name: syntheticsUpdatePrivateLocation
max_query_field_depth: 2
- name: syntheticsPurgePrivateLocationQueue
max_query_field_depth: 2
types:
- name: EpochMilliseconds
field_type_override: nrtime.EpochMilliseconds
skip_type_create: true
# This must be a string, as where ID is used the type is a string...
- name: ID
field_type_override: string
skip_type_create: true
- name: common
path: pkg/common
import_path: github.com/newrelic/newrelic-client-go/pkg/common
generators:
- typegen
types:
- name: EntityGUID
field_type_override: string
- name: accounts
path: pkg/accounts
import_path: github.com/newrelic/newrelic-client-go/pkg/accounts
generators:
- typegen
imports:
- github.com/newrelic/newrelic-client-go/pkg/nrtime
types:
- name: AccountOutline
- name: AccountReference
- name: RegionScope
#
# Types that we should auto-detect are in another package someday
#
- name: EpochMilliseconds
field_type_override: nrtime.EpochMilliseconds
skip_type_create: true
- name: TimeWindowInput
field_type_override: nrtime.TimeWindowInput
skip_type_create: true
- name: alerts
path: pkg/alerts
import_path: github.com/newrelic/newrelic-client-go/pkg/alerts
generators:
- typegen
imports:
- github.com/newrelic/newrelic-client-go/pkg/apiaccess
types:
- name: AlertsMutingRuleConditionInput
- name: AlertsMutingRuleInput
- name: AlertsMutingRuleScheduleInput
- name: AlertsNrqlConditionTermsOperator
- name: AlertsPoliciesSearchCriteriaInput
- name: AlertsPoliciesSearchResultSet
- name: AlertsPolicy
- name: AlertsPolicyInput
- name: AlertsPolicyUpdateInput
- name: ID
field_type_override: string
skip_type_create: true
#
# Types that we should auto-detect are in another package someday
#
- name: NaiveDateTime
field_type_override: nrtime.NaiveDateTime
skip_type_create: true
- name: apiaccess
path: pkg/apiaccess
import_path: github.com/newrelic/newrelic-client-go/pkg/apiaccess
generators:
- typegen
imports:
- github.com/newrelic/newrelic-client-go/pkg/accounts
types:
- name: ApiAccessActorStitchedFields
- name: ApiAccessCreateIngestKeyInput
- name: ApiAccessCreateInput
- name: ApiAccessCreateKeyResponse
- name: ApiAccessCreateUserKeyInput
- name: ApiAccessDeleteInput
- name: ApiAccessDeleteKeyResponse
- name: ApiAccessIngestKeyErrorType
- name: ApiAccessIngestKeyType
- name: ApiAccessKey # gql interface
- name: APIAccessKeyError
interface_methods:
- "GetError() error"
- name: ApiAccessKeySearchQuery
- name: ApiAccessKeySearchResult
- name: ApiAccessKeySearchScope
- name: ApiAccessKeyType
- name: ApiAccessUpdateIngestKeyInput
- name: ApiAccessUpdateInput
- name: ApiAccessUpdateKeyResponse
- name: ApiAccessUpdateUserKeyInput
- name: ApiAccessUserKeyErrorType
# This must be a string, as where ID is used the type is a string...
- name: ID
field_type_override: string
skip_type_create: true
#
# Types that we should auto-detect are in another package someday
#
- name: AccountReference
field_type_override: accounts.AccountReference
skip_type_create: true
- name: UserReference
field_type_override: users.UserReference
skip_type_create: true
- name: cloud
path: pkg/cloud
imports:
- github.com/newrelic/newrelic-client-go/pkg/nrtime
- encoding/json
- fmt
generators:
- typegen
- nerdgraphclient
queries:
- path: ["actor", "cloud"]
endpoints:
- name: linkedAccounts
max_query_field_depth: 2
include_arguments:
- "provider"
argument_type_overrides:
- accountId: "Int!"
- path: ["actor", "account", "cloud"]
endpoints:
- name: "linkedAccount"
max_query_field_depth: 2
include_arguments:
- "id"
argument_type_overrides:
- accountId: "Int!"
- id: "Int!"
mutations:
- name: cloudConfigureIntegration
max_query_field_depth: 1
- name: cloudDisableIntegration
max_query_field_depth: 1
- name: cloudLinkAccount
max_query_field_depth: 1
argument_type_overrides:
accountId: "Int!"
accounts: "CloudLinkCloudAccountsInput!"
- name: cloudRenameAccount
max_query_field_depth: 1
argument_type_overrides:
accountId: "Int!"
accounts: "[CloudRenameAccountsInput!]!"
- name: cloudUnlinkAccount
max_query_field_depth: 1
argument_type_overrides:
accountId: "Int!"
accounts: "[CloudUnlinkAccountsInput!]!"
types:
#
# Types that we should auto-detect are in another package someday
#
- name: EpochSeconds
field_type_override: nrtime.EpochSeconds
skip_type_create: true
- name: EpochMilliseconds
field_type_override: nrtime.EpochMilliseconds
skip_type_create: true
- name: dashboards
path: pkg/dashboards
import_path: github.com/newrelic/newrelic-client-go/pkg/dashboards
generators:
- typegen
- nerdgraphclient
imports:
- github.com/newrelic/newrelic-client-go/pkg/common
- github.com/newrelic/newrelic-client-go/pkg/entities
- github.com/newrelic/newrelic-client-go/pkg/nrdb
mutations:
- name: dashboardCreate
max_query_field_depth: 10
# These fields are currently not returned correctly and error
# out, so we'll filter them off 6/14/2021 JT
exclude_fields:
- goldenMetrics
- goldenTags
- name: dashboardDelete
max_query_field_depth: 10
- name: dashboardUpdate
max_query_field_depth: 10
# These fields are currently not returned correctly and error
# out, so we'll filter them off 6/14/2021 JT
exclude_fields:
- goldenMetrics
- goldenTags
types:
# This must be a string, as where ID is used the type is a string...
- name: ID
field_type_override: string
skip_type_create: true
- name: EntityGuid
field_type_override: common.EntityGUID
skip_type_create: true
# These need to be pointers within DashboardWidgetConfigurationInput, so
# they can be nullable
- name: DashboardAreaWidgetConfigurationInput
field_type_override: "*DashboardAreaWidgetConfigurationInput"
- name: DashboardBarWidgetConfigurationInput
field_type_override: "*DashboardBarWidgetConfigurationInput"
- name: DashboardBillboardWidgetConfigurationInput
field_type_override: "*DashboardBillboardWidgetConfigurationInput"
- name: DashboardLineWidgetConfigurationInput
field_type_override: "*DashboardLineWidgetConfigurationInput"
- name: DashboardMarkdownWidgetConfigurationInput
field_type_override: "*DashboardMarkdownWidgetConfigurationInput"
- name: DashboardPieWidgetConfigurationInput
field_type_override: "*DashboardPieWidgetConfigurationInput"
- name: DashboardTableWidgetConfigurationInput
field_type_override: "*DashboardTableWidgetConfigurationInput"
# Override this in type_overrides.go
- name: DashboardBillboardWidgetThresholdInput
skip_type_create: true
#
# Types that we should auto-detect are in another package someday
#
- name: DashboardAlertSeverity
field_type_override: entities.DashboardAlertSeverity
skip_type_create: true
- name: DashboardEntity
field_type_override: entities.DashboardEntity
skip_type_create: true
- name: DashboardEntityOutline
field_type_override: entities.DashboardEntityOutline
skip_type_create: true
- name: DashboardOwnerInfo
field_type_override: entities.DashboardOwnerInfo
skip_type_create: true
- name: DashboardPage
field_type_override: entities.DashboardPage
skip_type_create: true
- name: DashboardPermissions
field_type_override: entities.DashboardPermissions
skip_type_create: true
- name: DashboardWidget
field_type_override: entities.DashboardWidget
skip_type_create: true
- name: DashboardWidgetRawConfiguration
field_type_override: entities.DashboardWidgetRawConfiguration
skip_type_create: true
- name: DateTime
field_type_override: nrtime.DateTime
skip_type_create: true
- name: Entity
field_type_override: entities.Entity
skip_type_create: true
- name: EntityGuid
field_type_override: common.EntityGUID
skip_type_create: true
- name: EntityOutline
field_type_override: entities.EntityOutline
skip_type_create: true
- name: EntityResult
field_type_override: entities.EntityResult
skip_type_create: true
- name: EpochMilliseconds
field_type_override: nrtime.EpochMilliseconds
skip_type_create: true
- name: GenericEntityOutline
field_type_override: entities.GenericEntityOutline
skip_type_create: true
- name: Milliseconds
field_type_override: nrtime.Milliseconds
skip_type_create: true
- name: Nrql
field_type_override: nrdb.NRQL
skip_type_create: true
- name: edge
path: pkg/edge
import_path: github.com/newrelic/newrelic-client-go/pkg/edge
generators:
- typegen
types:
- name: EdgeAccountStitchedFields
- name: EdgeAgentEndpointDetail
- name: EdgeCreateTraceObserverInput
- name: EdgeCreateTraceObserverResponse
- name: EdgeCreateTraceObserverResponseError
- name: EdgeCreateTraceObserverResponseErrorType
- name: EdgeCreateTraceObserverResponses
- name: EdgeDeleteTraceObserverInput
- name: EdgeDeleteTraceObserverResponse
- name: EdgeDeleteTraceObserverResponseError
- name: EdgeDeleteTraceObserverResponseErrorType
- name: EdgeDeleteTraceObserverResponses
- name: EdgeEndpoint
- name: EdgeEndpointStatus
- name: EdgeEndpointType
- name: EdgeHttpsEndpointDetail
- name: EdgeProviderRegion
- name: EdgeTraceObserver
- name: EdgeTraceObserverResponse
- name: EdgeTraceObserverResponseError
- name: EdgeTraceObserverResponseErrorType
- name: EdgeTraceObserverStatus
- name: EdgeTracing
- name: entities
path: pkg/entities
import_path: github.com/newrelic/newrelic-client-go/pkg/entities
generators:
- typegen
- nerdgraphclient
imports:
- github.com/newrelic/newrelic-client-go/pkg/accounts
- github.com/newrelic/newrelic-client-go/pkg/ai
- github.com/newrelic/newrelic-client-go/pkg/common
- github.com/newrelic/newrelic-client-go/pkg/nrdb
- github.com/newrelic/newrelic-client-go/pkg/nrtime
- github.com/newrelic/newrelic-client-go/pkg/users
queries:
- path: ["actor"]
endpoints:
- name: entities
max_query_field_depth: 2
exclude_fields:
- slug
- name: entity
max_query_field_depth: 2
exclude_fields:
- slug
- name: entitySearch
max_query_field_depth: 2
exclude_fields:
- slug
include_arguments:
- "queryBuilder"
mutations:
- name: taggingAddTagsToEntity
max_query_field_depth: 1
- name: taggingDeleteTagFromEntity
max_query_field_depth: 1
- name: taggingDeleteTagValuesFromEntity
max_query_field_depth: 1
- name: taggingReplaceTagsOnEntity
max_query_field_depth: 1
types:
# Overrides for types this package owns
- name: AttributeMap
create_as: "map[string]interface{}"
# This must be a string, as where ID is used the type is a string...
- name: ID
field_type_override: string
skip_type_create: true
- name: EntityGuid
field_type_override: common.EntityGUID
skip_type_create: true
- name: DashboardWidgetRawConfiguration
create_as: "[]byte"
# Types this package owns
- name: EntityRelationship
- name: EntityRelationshipFilter
- name: EntityRelationshipNode
- name: EntityRelationshipType
- name: EntitySearch
- name: EntitySearchCounts
- name: EntitySearchCountsFacet
- name: EntitySearchOptions
- name: EntitySearchQueryBuilder
- name: EntitySearchResult
- name: EntitySearchSortCriteria
- name: EntitySearchTypes
- name: EntityTag
- name: EntityTagValueWithMetadata
- name: EntityTagWithMetadata
- name: EntityType
# List of entities
- name: Entity
interface_methods:
- "GetAccountID() int"
- "GetDomain() string"
- "GetGUID() common.EntityGUID"
- "GetName() string"
- "GetTags() []EntityTag"
- "GetType() string"
- "GetServiceLevel() ServiceLevelDefinition"
- name: AlertableEntity
generate_struct_getters: true
- name: ApmApplicationEntity
generate_struct_getters: true
- name: ApmBrowserApplicationEntity
generate_struct_getters: true
- name: ApmDatabaseInstanceEntity
generate_struct_getters: true
- name: ApmExternalServiceEntity
generate_struct_getters: true
- name: BrowserApplicationEntity
generate_struct_getters: true
- name: CollectionEntity
generate_struct_getters: true
- name: DashboardEntity
generate_struct_getters: true
- name: ExternalEntity
generate_struct_getters: true
- name: GenericEntity
generate_struct_getters: true
- name: GenericInfrastructureEntity
generate_struct_getters: true
- name: InfrastructureAwsLambdaFunctionEntity
generate_struct_getters: true
- name: InfrastructureHostEntity
generate_struct_getters: true
- name: InfrastructureIntegrationEntity
generate_struct_getters: true
- name: MobileApplicationEntity
generate_struct_getters: true
- name: SecureCredentialEntity
generate_struct_getters: true
- name: SyntheticMonitorEntity
generate_struct_getters: true
- name: ThirdPartyServiceEntity
generate_struct_getters: true
- name: UnavailableEntity
generate_struct_getters: true
- name: WorkloadEntity
generate_struct_getters: true
# New Entity types
- name: ApmAgentInstrumentedServiceEntity
generate_struct_getters: true
- name: GenericServiceEntity
generate_struct_getters: true
- name: ServiceEntity
generate_struct_getters: true
# End new Entity types
# Entity Outlines contain the summary of an Entity's data
- name: EntityOutline
interface_methods:
- "GetAccountID() int"
- "GetDomain() string"
- "GetGUID() common.EntityGUID"
- "GetName() string"
- "GetType() string"
# Start new EntityOutline types
- name: ApmAgentInstrumentedServiceEntityOutline
generate_struct_getters: true
- name: GenericServiceEntityOutline
generate_struct_getters: true
- name: ServiceEntityOutline
generate_struct_getters: true
- name: GenericServiceEntityOutline
generate_struct_getters: true
# End new EntityOutline types
- name: AlertableEntityOutline
generate_struct_getters: true
- name: ApmApplicationEntityOutline
generate_struct_getters: true
- name: ApmBrowserApplicationEntityOutline
generate_struct_getters: true
- name: ApmDatabaseInstanceEntityOutline
generate_struct_getters: true
- name: ApmExternalServiceEntityOutline
generate_struct_getters: true
- name: BrowserApplicationEntityOutline
generate_struct_getters: true
- name: CollectionEntityOutline
generate_struct_getters: true
- name: DashboardEntityOutline
generate_struct_getters: true
- name: ExternalEntityOutline
generate_struct_getters: true
- name: GenericEntityOutline
generate_struct_getters: true
- name: GenericInfrastructureEntityOutline
generate_struct_getters: true
- name: InfrastructureAwsLambdaFunctionEntityOutline
generate_struct_getters: true
- name: InfrastructureHostEntityOutline
generate_struct_getters: true
- name: InfrastructureIntegrationEntityOutline
generate_struct_getters: true
- name: MobileApplicationEntityOutline
generate_struct_getters: true
- name: SecureCredentialEntityOutline
generate_struct_getters: true
- name: SyntheticMonitorEntityOutline
generate_struct_getters: true
- name: ThirdPartyServiceEntityOutline
generate_struct_getters: true
- name: UnavailableEntityOutline
generate_struct_getters: true
- name: WorkloadEntityOutline
generate_struct_getters: true
#
# Types that our other packages define
# TODO: Fix tutone to figure this out for us
#
# accounts imports
- name: AccountOutline
field_type_override: accounts.AccountOutline
skip_type_create: true
- name: AccountReference
field_type_override: accounts.AccountReference
skip_type_create: true
# nrtime imports
- name: DateTime
field_type_override: nrtime.DateTime
skip_type_create: true
- name: EpochSeconds
field_type_override: nrtime.EpochSeconds
skip_type_create: true
- name: EpochMilliseconds
field_type_override: "*nrtime.EpochMilliseconds"
skip_type_create: true
- name: Minutes
field_type_override: nrtime.Minutes
skip_type_create: true
- name: Seconds
field_type_override: nrtime.Seconds
skip_type_create: true
# nrdb imports
- name: EventDefinition
field_type_override: nrdb.EventDefinition
skip_type_create: true
- name: NrdbMetadataTimeWindow
field_type_override: nrdb.NRDBMetadataTimeWindow
skip_type_create: true
- name: NrdbResult
field_type_override: nrdb.NRDBResult
skip_type_create: true
- name: NrdbResultContainer
field_type_override: nrdb.NRDBResultContainer
skip_type_create: true
- name: Nrql
field_type_override: nrdb.NRQL
skip_type_create: true
- name: NrqlHistoricalQuery
field_type_override: nrdb.NrqlHistoricalQuery
skip_type_create: true
- name: NrqlFacetSuggestion
field_type_override: nrdb.NRQLFacetSuggestion
skip_type_create: true
- name: SuggestedNrqlQuery
field_type_override: nrdb.SuggestedNRQLQuery
skip_type_create: true
- name: SuggestedAnomalyBasedNRQLQuery
field_type_override: nrdb.SuggestedAnomalyBasedNRQLQuery
skip_type_create: true
- name: SuggestedHistoryBasedNRQLQuery
field_type_override: nrdb.SuggestedHistoryBasedNRQLQuery
skip_type_create: true
- name: SuggestedNRQLQueryAnomaly
field_type_override: nrdb.SuggestedNRQLQueryAnomaly
skip_type_create: true
- name: ServiceLevelIndicator
field_type_override: servicelevel.ServiceLevelIndicator
skip_type_create: true
# users imports
- name: UserReference
field_type_override: users.UserReference
skip_type_create: true
- name: eventstometrics
path: pkg/eventstometrics
import_path: github.com/newrelic/newrelic-client-go/pkg/eventstometrics
generators:
- typegen
imports:
- github.com/newrelic/newrelic-client-go/pkg/nrtime
types:
- name: EventsToMetricsAccountStitchedFields
- name: EventsToMetricsCreateRuleFailure
- name: EventsToMetricsCreateRuleInput
- name: EventsToMetricsCreateRuleResult
- name: EventsToMetricsCreateRuleSubmission
- name: EventsToMetricsDeleteRuleFailure
- name: EventsToMetricsDeleteRuleInput
- name: EventsToMetricsDeleteRuleResult
- name: EventsToMetricsDeleteRuleSubmission
- name: EventsToMetricsErrorReason
- name: EventsToMetricsListRuleResult
- name: EventsToMetricsRule
- name: EventsToMetricsUpdateRuleFailure
- name: EventsToMetricsUpdateRuleInput
- name: EventsToMetricsUpdateRuleResult
- name: EventsToMetricsUpdateRuleSubmission
- name: ID
field_type_override: string
skip_type_create: true
#
# Types that we should auto-detect are in another package someday
#
- name: DateTime
field_type_override: nrtime.DateTime
skip_type_create: true
- name: installevents
path: pkg/installevents
import_path: github.com/newrelic/newrelic-client-go/pkg/installevents
generators:
- typegen
- nerdgraphclient
imports:
- github.com/newrelic/newrelic-client-go/pkg/common
- github.com/newrelic/newrelic-client-go/pkg/entities
- github.com/newrelic/newrelic-client-go/pkg/nrtime
types:
- name: Timestamp
field_type_override: nrtime.DateTime
skip_type_create: true
- name: ValidationDurationMilliseconds
field_type_override: nrtime.EpochMilliseconds
skip_type_create: true
- name: EpochMilliseconds
field_type_override: int64
skip_type_create: true
- name: EpochSeconds
field_type_override: nrtime.EpochSeconds
skip_type_create: true
- name: EntityGuid
field_type_override: common.EntityGUID
skip_type_create: true
- name: SemVer
field_type_override: string
skip_type_create: true
- name: ID
field_type_override: string
skip_type_create: true
- name: InstallationRawMetadata
field_type_override: map[string]interface{}
skip_type_create: true
mutations:
- name: installationCreateRecipeEvent
max_query_field_depth: 1
- name: installationCreateInstallStatus
max_query_field_depth: 1
- name: nerdstorage
path: pkg/nerdstorage
import_path: github.com/newrelic/newrelic-client-go/pkg/nerdstorage
generators:
- typegen
types:
- name: NerdStorageCollectionMember
- name: NerdStorageDocument
- name: NerdStorageEntityScope
- name: NerdStorageScope
- name: NerdStorageScopeInput
- name: notifications
path: pkg/notifications
import_path: github.com/newrelic/newrelic-client-go/pkg/notifications
generators:
- typegen
- nerdgraphclient
imports:
- github.com/newrelic/newrelic-client-go/pkg/nrtime
queries:
- path: [ "actor", "account", "aiNotifications" ]
endpoints:
- name: destinations
max_query_field_depth: 4
- name: channels
max_query_field_depth: 4
mutations:
- name: aiNotificationsCreateDestination
max_query_field_depth: 3
- name: aiNotificationsUpdateDestination
max_query_field_depth: 3
- name: aiNotificationsDeleteDestination
max_query_field_depth: 3
- name: aiNotificationsCreateChannel
max_query_field_depth: 3
- name: aiNotificationsUpdateChannel
max_query_field_depth: 3
- name: aiNotificationsDeleteChannel
max_query_field_depth: 3
types:
- name: AiNotificationsDestinationSorter
- name: AiNotificationsDestinationFilter
field_type_override: "ai.AiNotificationsDestinationFilter"
- name: AiNotificationsChannelFilter
field_type_override: "ai.AiNotificationsChannelFilter"
- name: AiNotificationsChannelSorter
- name: AiNotificationsAuthType
- name: AiNotificationsDestination
- name: AiNotificationsCredentialsInput
field_type_override: "*AiNotificationsCredentialsInput"
- name: AiNotificationsAuth
field_type_override: "ai.AiNotificationsAuth"
- name: AiNotificationsError
field_type_override: "ai.AiNotificationsError"
- name: ID
field_type_override: string
skip_type_create: true
# nrtime imports
- name: DateTime
field_type_override: nrtime.DateTime
skip_type_create: true
- name: nrdb
path: pkg/nrdb
import_path: github.com/newrelic/newrelic-client-go/pkg/nrdb
generators:
- typegen
imports:
- github.com/newrelic/newrelic-client-go/pkg/nrtime
types:
- name: Nrql
create_as: string
- name: NRDBMetadataTimeWindow
- name: NRDBResult
create_as: map[string]interface{}
- name: NrqlHistoricalQuery
- name: SuggestedNRQLQuery
- name: NrdbResultContainer
- name: EventDefinition
#
# Types that we should auto-detect are in another package someday
#
- name: EpochSeconds
field_type_override: nrtime.EpochSeconds
skip_type_create: true
- name: EpochMilliseconds
field_type_override: nrtime.EpochMilliseconds
skip_type_create: true
- name: TimeWindowInput
field_type_override: nrtime.TimeWindowInput
skip_type_create: true
- name: nrqldroprules
path: pkg/nrqldroprules
import_path: github.com/newrelic/newrelic-client-go/pkg/nrqldroprules
generators:
- typegen
- nerdgraphclient
imports:
- github.com/newrelic/newrelic-client-go/pkg/nrdb
- github.com/newrelic/newrelic-client-go/pkg/nrtime
queries:
- path: ["actor", "account", "nrqlDropRules"]
endpoints:
- name: "list"
max_query_field_depth: 2
mutations:
- name: nrqlDropRulesCreate
max_query_field_depth: 1
- name: nrqlDropRulesDelete
max_query_field_depth: 1
types:
- name: NRQLDropRulesAccountStitchedFields
- name: NrqlDropRulesAction
- name: NrqlDropRulesCreateDropRuleFailure
- name: NrqlDropRulesCreateDropRuleInput
- name: NrqlDropRulesCreateDropRuleResult
- name: NrqlDropRulesCreateDropRuleSubmission
- name: NrqlDropRulesDeleteDropRuleFailure
- name: NrqlDropRulesDeleteDropRuleResult
- name: NrqlDropRulesDeleteDropRuleSubmission
- name: NrqlDropRulesDropRule
- name: NrqlDropRulesDropRule
- name: NrqlDropRulesError
- name: NrqlDropRulesErrorReason
- name: NrqlDropRulesListDropRulesResult
# All of the IDs are created as ints, yet this unused type is being created.
- name: ID
field_type_override: string
skip_type_create: true
#
# Types that we should auto-detect are in another package someday
#
- name: DateTime
field_type_override: nrtime.DateTime
skip_type_create: true
# TODO: This doesn't appear to be working for THIS package, but does for others
- name: NRQL
field_type_override: nrdb.NRQL
skip_type_create: true
- name: nrtime
path: pkg/nrtime
import_path: github.com/newrelic/newrelic-client-go/pkg/nrtime
generators:
- typegen
imports:
- github.com/newrelic/newrelic-client-go/internal/serialization
types:
- name: DateTime
create_as: string
- name: EpochMilliseconds
create_as: serialization.EpochTime
- name: EpochSeconds
create_as: serialization.EpochTime
- name: Milliseconds
create_as: int
- name: Minutes
create_as: int
- name: NaiveDateTime
create_as: string
- name: Seconds
create_as: string
- name: TimeWindowInput
- name: users
path: pkg/users
import_path: github.com/newrelic/newrelic-client-go/pkg/users
generators:
- typegen
- nerdgraphclient
queries:
- path: ["actor"]
endpoints:
- name: user
max_query_field_depth: 2
types:
- name: User
- name: UserReference
- name: workflows
path: pkg/workflows
import_path: github.com/newrelic/newrelic-client-go/pkg/workflows
generators:
- typegen
- nerdgraphclient
imports:
- github.com/newrelic/newrelic-client-go/pkg/nrtime
queries:
- path: [ "actor", "account", "aiWorkflows" ]
endpoints:
- name: workflows
max_query_field_depth: 4
mutations:
- name: aiWorkflowsCreateWorkflow
max_query_field_depth: 3
- name: aiWorkflowsUpdateWorkflow
max_query_field_depth: 3
- name: aiWorkflowsDeleteWorkflow
max_query_field_depth: 3
types:
- name: AiWorkflowsFilters
field_type_override: "ai.AiWorkflowsFilters"
- name: AiWorkflowsConfiguration
field_type_override: "ai.AiWorkflowsConfiguration"
- name: AiWorkflowsUpdateEnrichmentsInput
field_type_override: "*AiWorkflowsUpdateEnrichmentsInput"
- name: AiWorkflowsEnrichmentsInput
field_type_override: "*AiWorkflowsEnrichmentsInput"
- name: ID
field_type_override: string
skip_type_create: true
# nrtime imports
- name: DateTime
field_type_override: nrtime.DateTime
skip_type_create: true
- name: workloads
path: pkg/workloads
import_path: github.com/newrelic/newrelic-client-go/pkg/workloads
generators:
- typegen
- nerdgraphclient
imports:
- github.com/newrelic/newrelic-client-go/pkg/accounts
- github.com/newrelic/newrelic-client-go/pkg/common
- github.com/newrelic/newrelic-client-go/pkg/entities
- github.com/newrelic/newrelic-client-go/pkg/nrtime
- github.com/newrelic/newrelic-client-go/pkg/users
mutations:
- name: workloadCreate
max_query_field_depth: 6
- name: workloadDelete
max_query_field_depth: 6