-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmodel.go
179 lines (157 loc) · 6.9 KB
/
model.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
package blueprint
import (
"github.com/hashicorp/terraform-plugin-framework/types"
)
type WebhookChangelogDestinationModel struct {
Url types.String `tfsdk:"url"`
Agent types.Bool `tfsdk:"agent"`
}
type TeamInheritanceModel struct {
Path types.String `tfsdk:"path"`
}
type SpecAuthenticationModel struct {
AuthorizationUrl types.String `tfsdk:"authorization_url"`
TokenUrl types.String `tfsdk:"token_url"`
ClientId types.String `tfsdk:"client_id"`
}
type StringPropModel struct {
Title types.String `tfsdk:"title"`
Icon types.String `tfsdk:"icon"`
Description types.String `tfsdk:"description"`
Default types.String `tfsdk:"default"`
Required types.Bool `tfsdk:"required"`
Format types.String `tfsdk:"format"`
MaxLength types.Int64 `tfsdk:"max_length"`
MinLength types.Int64 `tfsdk:"min_length"`
Pattern types.String `tfsdk:"pattern"`
Enum types.List `tfsdk:"enum"`
EnumColors types.Map `tfsdk:"enum_colors"`
Spec types.String `tfsdk:"spec"`
SpecAuthentication *SpecAuthenticationModel `tfsdk:"spec_authentication"`
}
type NumberPropModel struct {
Title types.String `tfsdk:"title"`
Icon types.String `tfsdk:"icon"`
Description types.String `tfsdk:"description"`
Default types.Float64 `tfsdk:"default"`
Required types.Bool `tfsdk:"required"`
Maximum types.Float64 `tfsdk:"maximum"`
Minimum types.Float64 `tfsdk:"minimum"`
Enum types.List `tfsdk:"enum"`
EnumColors types.Map `tfsdk:"enum_colors"`
}
type BooleanPropModel struct {
Title types.String `tfsdk:"title"`
Icon types.String `tfsdk:"icon"`
Description types.String `tfsdk:"description"`
Default types.Bool `tfsdk:"default"`
Required types.Bool `tfsdk:"required"`
}
type StringItems struct {
Format types.String `tfsdk:"format"`
Default types.List `tfsdk:"default"`
}
type NumberItems struct {
Default types.List `tfsdk:"default"`
}
type BooleanItems struct {
Default types.List `tfsdk:"default"`
}
type ObjectItems struct {
Default types.List `tfsdk:"default"`
}
type ArrayPropModel struct {
Title types.String `tfsdk:"title"`
Icon types.String `tfsdk:"icon"`
Description types.String `tfsdk:"description"`
MaxItems types.Int64 `tfsdk:"max_items"`
MinItems types.Int64 `tfsdk:"min_items"`
Required types.Bool `tfsdk:"required"`
StringItems *StringItems `tfsdk:"string_items"`
NumberItems *NumberItems `tfsdk:"number_items"`
BooleanItems *BooleanItems `tfsdk:"boolean_items"`
ObjectItems *ObjectItems `tfsdk:"object_items"`
}
type ObjectPropModel struct {
Title types.String `tfsdk:"title"`
Icon types.String `tfsdk:"icon"`
Description types.String `tfsdk:"description"`
Required types.Bool `tfsdk:"required"`
Default types.String `tfsdk:"default"`
Spec types.String `tfsdk:"spec"`
}
type PropertiesModel struct {
StringProps map[string]StringPropModel `tfsdk:"string_props"`
NumberProps map[string]NumberPropModel `tfsdk:"number_props"`
BooleanProps map[string]BooleanPropModel `tfsdk:"boolean_props"`
ArrayProps map[string]ArrayPropModel `tfsdk:"array_props"`
ObjectProps map[string]ObjectPropModel `tfsdk:"object_props"`
}
type RelationModel struct {
Target types.String `tfsdk:"target"`
Title types.String `tfsdk:"title"`
Description types.String `tfsdk:"description"`
Required types.Bool `tfsdk:"required"`
Many types.Bool `tfsdk:"many"`
}
type MirrorPropertyModel struct {
Title types.String `tfsdk:"title"`
Path types.String `tfsdk:"path"`
}
type CalculationPropertyModel struct {
Calculation types.String `tfsdk:"calculation"`
Title types.String `tfsdk:"title"`
Format types.String `tfsdk:"format"`
Icon types.String `tfsdk:"icon"`
Description types.String `tfsdk:"description"`
Type types.String `tfsdk:"type"`
Colorized types.Bool `tfsdk:"colorized"`
Colors types.Map `tfsdk:"colors"`
}
type AverageEntitiesModel struct {
AverageOf types.String `tfsdk:"average_of"`
MeasureTimeBy types.String `tfsdk:"measure_time_by"`
}
type AverageByProperty struct {
MeasureTimeBy types.String `tfsdk:"measure_time_by"`
AverageOf types.String `tfsdk:"average_of"`
Property types.String `tfsdk:"property"`
}
type AggregateByPropertyModel struct {
Func types.String `tfsdk:"func"`
Property types.String `tfsdk:"property"`
}
type AggregationMethodsModel struct {
CountEntities types.Bool `tfsdk:"count_entities"`
AverageEntities *AverageEntitiesModel `tfsdk:"average_entities"`
AverageByProperty *AverageByProperty `tfsdk:"average_by_property"`
AggregateByProperty *AggregateByPropertyModel `tfsdk:"aggregate_by_property"`
}
type AggregationPropertyModel struct {
Title types.String `tfsdk:"title"`
Icon types.String `tfsdk:"icon"`
Description types.String `tfsdk:"description"`
Target types.String `tfsdk:"target"`
Method *AggregationMethodsModel `tfsdk:"method"`
Query types.String `tfsdk:"query"`
}
type BlueprintModel struct {
ID types.String `tfsdk:"id"`
Identifier types.String `tfsdk:"identifier"`
Title types.String `tfsdk:"title"`
Icon types.String `tfsdk:"icon"`
Description types.String `tfsdk:"description"`
CreatedAt types.String `tfsdk:"created_at"`
CreatedBy types.String `tfsdk:"created_by"`
UpdatedAt types.String `tfsdk:"updated_at"`
UpdatedBy types.String `tfsdk:"updated_by"`
KafkaChangelogDestination types.Object `tfsdk:"kafka_changelog_destination"`
WebhookChangelogDestination *WebhookChangelogDestinationModel `tfsdk:"webhook_changelog_destination"`
TeamInheritance *TeamInheritanceModel `tfsdk:"team_inheritance"`
Properties *PropertiesModel `tfsdk:"properties"`
Relations map[string]RelationModel `tfsdk:"relations"`
MirrorProperties map[string]MirrorPropertyModel `tfsdk:"mirror_properties"`
CalculationProperties map[string]CalculationPropertyModel `tfsdk:"calculation_properties"`
ForceDeleteEntities types.Bool `tfsdk:"force_delete_entities"`
CreateCatalogPage types.Bool `tfsdk:"create_catalog_page"`
}