@@ -35,7 +35,7 @@ func NewPCAPOwnershipService(opts ...option.RequestOption) (r *PCAPOwnershipServ
35
35
}
36
36
37
37
// Adds an AWS or GCP bucket to use with full packet captures.
38
- func (r * PCAPOwnershipService ) New (ctx context.Context , params PCAPOwnershipNewParams , opts ... option.RequestOption ) (res * Ownership , err error ) {
38
+ func (r * PCAPOwnershipService ) New (ctx context.Context , params PCAPOwnershipNewParams , opts ... option.RequestOption ) (res * PCAPOwnershipNewResponse , err error ) {
39
39
var env PCAPOwnershipNewResponseEnvelope
40
40
opts = append (r .Options [:], opts ... )
41
41
if params .AccountID .Value == "" {
@@ -69,7 +69,7 @@ func (r *PCAPOwnershipService) Delete(ctx context.Context, ownershipID string, b
69
69
}
70
70
71
71
// List all buckets configured for use with PCAPs API.
72
- func (r * PCAPOwnershipService ) Get (ctx context.Context , query PCAPOwnershipGetParams , opts ... option.RequestOption ) (res * []Ownership , err error ) {
72
+ func (r * PCAPOwnershipService ) Get (ctx context.Context , query PCAPOwnershipGetParams , opts ... option.RequestOption ) (res * []PCAPOwnershipGetResponse , err error ) {
73
73
var env PCAPOwnershipGetResponseEnvelope
74
74
opts = append (r .Options [:], opts ... )
75
75
if query .AccountID .Value == "" {
@@ -86,7 +86,7 @@ func (r *PCAPOwnershipService) Get(ctx context.Context, query PCAPOwnershipGetPa
86
86
}
87
87
88
88
// Validates buckets added to the packet captures API.
89
- func (r * PCAPOwnershipService ) Validate (ctx context.Context , params PCAPOwnershipValidateParams , opts ... option.RequestOption ) (res * Ownership , err error ) {
89
+ func (r * PCAPOwnershipService ) Validate (ctx context.Context , params PCAPOwnershipValidateParams , opts ... option.RequestOption ) (res * PCAPOwnershipValidateResponse , err error ) {
90
90
var env PCAPOwnershipValidateResponseEnvelope
91
91
opts = append (r .Options [:], opts ... )
92
92
if params .AccountID .Value == "" {
@@ -102,24 +102,25 @@ func (r *PCAPOwnershipService) Validate(ctx context.Context, params PCAPOwnershi
102
102
return
103
103
}
104
104
105
- type Ownership struct {
105
+ type PCAPOwnershipNewResponse struct {
106
106
// The bucket ID associated with the packet captures API.
107
107
ID string `json:"id,required"`
108
108
// The full URI for the bucket. This field only applies to `full` packet captures.
109
109
DestinationConf string `json:"destination_conf,required"`
110
110
// The ownership challenge filename stored in the bucket.
111
111
Filename string `json:"filename,required"`
112
112
// The status of the ownership challenge. Can be pending, success or failed.
113
- Status OwnershipStatus `json:"status,required"`
113
+ Status PCAPOwnershipNewResponseStatus `json:"status,required"`
114
114
// The RFC 3339 timestamp when the bucket was added to packet captures API.
115
115
Submitted string `json:"submitted,required"`
116
116
// The RFC 3339 timestamp when the bucket was validated.
117
- Validated string `json:"validated"`
118
- JSON ownershipJSON `json:"-"`
117
+ Validated string `json:"validated"`
118
+ JSON pcapOwnershipNewResponseJSON `json:"-"`
119
119
}
120
120
121
- // ownershipJSON contains the JSON metadata for the struct [Ownership]
122
- type ownershipJSON struct {
121
+ // pcapOwnershipNewResponseJSON contains the JSON metadata for the struct
122
+ // [PCAPOwnershipNewResponse]
123
+ type pcapOwnershipNewResponseJSON struct {
123
124
ID apijson.Field
124
125
DestinationConf apijson.Field
125
126
Filename apijson.Field
@@ -130,26 +131,134 @@ type ownershipJSON struct {
130
131
ExtraFields map [string ]apijson.Field
131
132
}
132
133
133
- func (r * Ownership ) UnmarshalJSON (data []byte ) (err error ) {
134
+ func (r * PCAPOwnershipNewResponse ) UnmarshalJSON (data []byte ) (err error ) {
134
135
return apijson .UnmarshalRoot (data , r )
135
136
}
136
137
137
- func (r ownershipJSON ) RawJSON () string {
138
+ func (r pcapOwnershipNewResponseJSON ) RawJSON () string {
138
139
return r .raw
139
140
}
140
141
141
142
// The status of the ownership challenge. Can be pending, success or failed.
142
- type OwnershipStatus string
143
+ type PCAPOwnershipNewResponseStatus string
143
144
144
145
const (
145
- OwnershipStatusPending OwnershipStatus = "pending"
146
- OwnershipStatusSuccess OwnershipStatus = "success"
147
- OwnershipStatusFailed OwnershipStatus = "failed"
146
+ PCAPOwnershipNewResponseStatusPending PCAPOwnershipNewResponseStatus = "pending"
147
+ PCAPOwnershipNewResponseStatusSuccess PCAPOwnershipNewResponseStatus = "success"
148
+ PCAPOwnershipNewResponseStatusFailed PCAPOwnershipNewResponseStatus = "failed"
148
149
)
149
150
150
- func (r OwnershipStatus ) IsKnown () bool {
151
+ func (r PCAPOwnershipNewResponseStatus ) IsKnown () bool {
151
152
switch r {
152
- case OwnershipStatusPending , OwnershipStatusSuccess , OwnershipStatusFailed :
153
+ case PCAPOwnershipNewResponseStatusPending , PCAPOwnershipNewResponseStatusSuccess , PCAPOwnershipNewResponseStatusFailed :
154
+ return true
155
+ }
156
+ return false
157
+ }
158
+
159
+ type PCAPOwnershipGetResponse struct {
160
+ // The bucket ID associated with the packet captures API.
161
+ ID string `json:"id,required"`
162
+ // The full URI for the bucket. This field only applies to `full` packet captures.
163
+ DestinationConf string `json:"destination_conf,required"`
164
+ // The ownership challenge filename stored in the bucket.
165
+ Filename string `json:"filename,required"`
166
+ // The status of the ownership challenge. Can be pending, success or failed.
167
+ Status PCAPOwnershipGetResponseStatus `json:"status,required"`
168
+ // The RFC 3339 timestamp when the bucket was added to packet captures API.
169
+ Submitted string `json:"submitted,required"`
170
+ // The RFC 3339 timestamp when the bucket was validated.
171
+ Validated string `json:"validated"`
172
+ JSON pcapOwnershipGetResponseJSON `json:"-"`
173
+ }
174
+
175
+ // pcapOwnershipGetResponseJSON contains the JSON metadata for the struct
176
+ // [PCAPOwnershipGetResponse]
177
+ type pcapOwnershipGetResponseJSON struct {
178
+ ID apijson.Field
179
+ DestinationConf apijson.Field
180
+ Filename apijson.Field
181
+ Status apijson.Field
182
+ Submitted apijson.Field
183
+ Validated apijson.Field
184
+ raw string
185
+ ExtraFields map [string ]apijson.Field
186
+ }
187
+
188
+ func (r * PCAPOwnershipGetResponse ) UnmarshalJSON (data []byte ) (err error ) {
189
+ return apijson .UnmarshalRoot (data , r )
190
+ }
191
+
192
+ func (r pcapOwnershipGetResponseJSON ) RawJSON () string {
193
+ return r .raw
194
+ }
195
+
196
+ // The status of the ownership challenge. Can be pending, success or failed.
197
+ type PCAPOwnershipGetResponseStatus string
198
+
199
+ const (
200
+ PCAPOwnershipGetResponseStatusPending PCAPOwnershipGetResponseStatus = "pending"
201
+ PCAPOwnershipGetResponseStatusSuccess PCAPOwnershipGetResponseStatus = "success"
202
+ PCAPOwnershipGetResponseStatusFailed PCAPOwnershipGetResponseStatus = "failed"
203
+ )
204
+
205
+ func (r PCAPOwnershipGetResponseStatus ) IsKnown () bool {
206
+ switch r {
207
+ case PCAPOwnershipGetResponseStatusPending , PCAPOwnershipGetResponseStatusSuccess , PCAPOwnershipGetResponseStatusFailed :
208
+ return true
209
+ }
210
+ return false
211
+ }
212
+
213
+ type PCAPOwnershipValidateResponse struct {
214
+ // The bucket ID associated with the packet captures API.
215
+ ID string `json:"id,required"`
216
+ // The full URI for the bucket. This field only applies to `full` packet captures.
217
+ DestinationConf string `json:"destination_conf,required"`
218
+ // The ownership challenge filename stored in the bucket.
219
+ Filename string `json:"filename,required"`
220
+ // The status of the ownership challenge. Can be pending, success or failed.
221
+ Status PCAPOwnershipValidateResponseStatus `json:"status,required"`
222
+ // The RFC 3339 timestamp when the bucket was added to packet captures API.
223
+ Submitted string `json:"submitted,required"`
224
+ // The RFC 3339 timestamp when the bucket was validated.
225
+ Validated string `json:"validated"`
226
+ JSON pcapOwnershipValidateResponseJSON `json:"-"`
227
+ }
228
+
229
+ // pcapOwnershipValidateResponseJSON contains the JSON metadata for the struct
230
+ // [PCAPOwnershipValidateResponse]
231
+ type pcapOwnershipValidateResponseJSON struct {
232
+ ID apijson.Field
233
+ DestinationConf apijson.Field
234
+ Filename apijson.Field
235
+ Status apijson.Field
236
+ Submitted apijson.Field
237
+ Validated apijson.Field
238
+ raw string
239
+ ExtraFields map [string ]apijson.Field
240
+ }
241
+
242
+ func (r * PCAPOwnershipValidateResponse ) UnmarshalJSON (data []byte ) (err error ) {
243
+ return apijson .UnmarshalRoot (data , r )
244
+ }
245
+
246
+ func (r pcapOwnershipValidateResponseJSON ) RawJSON () string {
247
+ return r .raw
248
+ }
249
+
250
+ // The status of the ownership challenge. Can be pending, success or failed.
251
+ type PCAPOwnershipValidateResponseStatus string
252
+
253
+ const (
254
+ PCAPOwnershipValidateResponseStatusPending PCAPOwnershipValidateResponseStatus = "pending"
255
+ PCAPOwnershipValidateResponseStatusSuccess PCAPOwnershipValidateResponseStatus = "success"
256
+ PCAPOwnershipValidateResponseStatusFailed PCAPOwnershipValidateResponseStatus = "failed"
257
+ )
258
+
259
+ func (r PCAPOwnershipValidateResponseStatus ) IsKnown () bool {
260
+ switch r {
261
+ case PCAPOwnershipValidateResponseStatusPending , PCAPOwnershipValidateResponseStatusSuccess , PCAPOwnershipValidateResponseStatusFailed :
153
262
return true
154
263
}
155
264
return false
@@ -167,9 +276,9 @@ func (r PCAPOwnershipNewParams) MarshalJSON() (data []byte, err error) {
167
276
}
168
277
169
278
type PCAPOwnershipNewResponseEnvelope struct {
170
- Errors []shared.ResponseInfo `json:"errors,required"`
171
- Messages []shared.ResponseInfo `json:"messages,required"`
172
- Result Ownership `json:"result,required"`
279
+ Errors []shared.ResponseInfo `json:"errors,required"`
280
+ Messages []shared.ResponseInfo `json:"messages,required"`
281
+ Result PCAPOwnershipNewResponse `json:"result,required"`
173
282
// Whether the API call was successful
174
283
Success PCAPOwnershipNewResponseEnvelopeSuccess `json:"success,required"`
175
284
JSON pcapOwnershipNewResponseEnvelopeJSON `json:"-"`
@@ -220,9 +329,9 @@ type PCAPOwnershipGetParams struct {
220
329
}
221
330
222
331
type PCAPOwnershipGetResponseEnvelope struct {
223
- Errors []shared.ResponseInfo `json:"errors,required"`
224
- Messages []shared.ResponseInfo `json:"messages,required"`
225
- Result []Ownership `json:"result,required,nullable"`
332
+ Errors []shared.ResponseInfo `json:"errors,required"`
333
+ Messages []shared.ResponseInfo `json:"messages,required"`
334
+ Result []PCAPOwnershipGetResponse `json:"result,required,nullable"`
226
335
// Whether the API call was successful
227
336
Success PCAPOwnershipGetResponseEnvelopeSuccess `json:"success,required"`
228
337
ResultInfo PCAPOwnershipGetResponseEnvelopeResultInfo `json:"result_info"`
@@ -309,9 +418,9 @@ func (r PCAPOwnershipValidateParams) MarshalJSON() (data []byte, err error) {
309
418
}
310
419
311
420
type PCAPOwnershipValidateResponseEnvelope struct {
312
- Errors []shared.ResponseInfo `json:"errors,required"`
313
- Messages []shared.ResponseInfo `json:"messages,required"`
314
- Result Ownership `json:"result,required"`
421
+ Errors []shared.ResponseInfo `json:"errors,required"`
422
+ Messages []shared.ResponseInfo `json:"messages,required"`
423
+ Result PCAPOwnershipValidateResponse `json:"result,required"`
315
424
// Whether the API call was successful
316
425
Success PCAPOwnershipValidateResponseEnvelopeSuccess `json:"success,required"`
317
426
JSON pcapOwnershipValidateResponseEnvelopeJSON `json:"-"`
0 commit comments