-
Notifications
You must be signed in to change notification settings - Fork 2
/
types.gen.go
215 lines (177 loc) · 6.59 KB
/
types.gen.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
// Package validator provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/deepmap/oapi-codegen version v1.8.3 DO NOT EDIT.
package validator
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
// Defines values for FeatureConfigKind.
const (
FeatureConfigKindBoolean FeatureConfigKind = "boolean"
FeatureConfigKindInt FeatureConfigKind = "int"
FeatureConfigKindJson FeatureConfigKind = "json"
FeatureConfigKindString FeatureConfigKind = "string"
)
// Defines values for FeatureState.
const (
FeatureStateOff FeatureState = "off"
FeatureStateOn FeatureState = "on"
)
// AuthenticationRequest defines model for AuthenticationRequest.
type AuthenticationRequest struct {
ApiKey string `json:"apiKey"`
Target *struct {
Anonymous *bool `json:"anonymous,omitempty"`
Attributes *map[string]interface{} `json:"attributes,omitempty"`
Identifier string `json:"identifier"`
Name *string `json:"name,omitempty"`
} `json:"target,omitempty"`
}
// AuthenticationResponse defines model for AuthenticationResponse.
type AuthenticationResponse struct {
AuthToken string `json:"authToken"`
}
// Clause defines model for Clause.
type Clause struct {
Attribute string `json:"attribute"`
Id string `json:"id"`
Negate bool `json:"negate"`
Op string `json:"op"`
Values []string `json:"values"`
}
// Distribution defines model for Distribution.
type Distribution struct {
BucketBy string `json:"bucketBy"`
Variations []WeightedVariation `json:"variations"`
}
// Error defines model for Error.
type Error struct {
Code string `json:"code"`
Message string `json:"message"`
}
// Evaluation defines model for Evaluation.
type Evaluation struct {
Flag string `json:"flag"`
Identifier *string `json:"identifier,omitempty"`
Kind string `json:"kind"`
Value string `json:"value"`
}
// Evaluations defines model for Evaluations.
type Evaluations []Evaluation
// FeatureConfig defines model for FeatureConfig.
type FeatureConfig struct {
DefaultServe Serve `json:"defaultServe"`
Environment string `json:"environment"`
Feature string `json:"feature"`
Kind FeatureConfigKind `json:"kind"`
OffVariation string `json:"offVariation"`
Prerequisites *[]Prerequisite `json:"prerequisites,omitempty"`
Project string `json:"project"`
Rules *[]ServingRule `json:"rules,omitempty"`
State FeatureState `json:"state"`
VariationToTargetMap *[]VariationMap `json:"variationToTargetMap,omitempty"`
Variations []Variation `json:"variations"`
Version *int64 `json:"version,omitempty"`
}
// FeatureConfigKind defines model for FeatureConfig.Kind.
type FeatureConfigKind string
// FeatureState defines model for FeatureState.
type FeatureState string
// Pagination defines model for Pagination.
type Pagination struct {
ItemCount int `json:"itemCount"`
PageCount int `json:"pageCount"`
PageIndex int `json:"pageIndex"`
PageSize int `json:"pageSize"`
Version *int `json:"version,omitempty"`
}
// Prerequisite defines model for Prerequisite.
type Prerequisite struct {
Feature string `json:"feature"`
Variations []string `json:"variations"`
}
// Segment defines model for Segment.
type Segment struct {
CreatedAt *int64 `json:"createdAt,omitempty"`
Environment *string `json:"environment,omitempty"`
Excluded *[]Target `json:"excluded,omitempty"`
// Unique identifier for the segment.
Identifier string `json:"identifier"`
Included *[]Target `json:"included,omitempty"`
ModifiedAt *int64 `json:"modifiedAt,omitempty"`
// Name of the segment.
Name string `json:"name"`
// An array of rules that can cause a user to be included in this segment.
Rules *[]Clause `json:"rules,omitempty"`
Tags *[]Tag `json:"tags,omitempty"`
Version *int64 `json:"version,omitempty"`
}
// Serve defines model for Serve.
type Serve struct {
Distribution *Distribution `json:"distribution,omitempty"`
Variation *string `json:"variation,omitempty"`
}
// ServingRule defines model for ServingRule.
type ServingRule struct {
Clauses []Clause `json:"clauses"`
Priority int `json:"priority"`
RuleId string `json:"ruleId"`
Serve Serve `json:"serve"`
}
// A name and value pair.
type Tag struct {
Name string `json:"name"`
Value *string `json:"value,omitempty"`
}
// Target defines model for Target.
type Target struct {
Account string `json:"account"`
Anonymous *bool `json:"anonymous,omitempty"`
Attributes *map[string]interface{} `json:"attributes,omitempty"`
CreatedAt *int64 `json:"createdAt,omitempty"`
Environment string `json:"environment"`
Identifier string `json:"identifier"`
Name string `json:"name"`
Org string `json:"org"`
Project string `json:"project"`
Segments *[]Segment `json:"segments,omitempty"`
}
// TargetMap defines model for TargetMap.
type TargetMap struct {
Identifier *string `json:"identifier,omitempty"`
Name string `json:"name"`
}
// Variation defines model for Variation.
type Variation struct {
Description *string `json:"description,omitempty"`
Identifier string `json:"identifier"`
Name *string `json:"name,omitempty"`
Value string `json:"value"`
}
// VariationMap defines model for VariationMap.
type VariationMap struct {
TargetSegments *[]string `json:"targetSegments,omitempty"`
Targets *[]TargetMap `json:"targets,omitempty"`
Variation string `json:"variation"`
}
// WeightedVariation defines model for WeightedVariation.
type WeightedVariation struct {
Variation string `json:"variation"`
Weight int `json:"weight"`
}
// InternalServerError defines model for InternalServerError.
type InternalServerError Error
// NotFound defines model for NotFound.
type NotFound Error
// Unauthenticated defines model for Unauthenticated.
type Unauthenticated Error
// Unauthorized defines model for Unauthorized.
type Unauthorized Error
// AuthenticateJSONBody defines parameters for Authenticate.
type AuthenticateJSONBody AuthenticationRequest
// StreamParams defines parameters for Stream.
type StreamParams struct {
APIKey string `json:"API-Key"`
}
// AuthenticateJSONRequestBody defines body for Authenticate for application/json ContentType.
type AuthenticateJSONRequestBody AuthenticateJSONBody