1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package types
4
5// Provides the error of the batch create variable API.
6type BatchCreateVariableError struct {
7
8	// The error code.
9	Code int32
10
11	// The error message.
12	Message *string
13
14	// The name.
15	Name *string
16}
17
18// Provides the error of the batch get variable API.
19type BatchGetVariableError struct {
20
21	// The error code.
22	Code int32
23
24	// The error message.
25	Message *string
26
27	// The error name.
28	Name *string
29}
30
31// The batch prediction details.
32type BatchPrediction struct {
33
34	// The ARN of batch prediction job.
35	Arn *string
36
37	// Timestamp of when the batch prediction job comleted.
38	CompletionTime *string
39
40	// The name of the detector.
41	DetectorName *string
42
43	// The detector version.
44	DetectorVersion *string
45
46	// The name of the event type.
47	EventTypeName *string
48
49	// The reason a batch prediction job failed.
50	FailureReason *string
51
52	// The ARN of the IAM role to use for this job request.
53	IamRoleArn *string
54
55	// The Amazon S3 location of your training file.
56	InputPath *string
57
58	// The job ID for the batch prediction.
59	JobId *string
60
61	// Timestamp of most recent heartbeat indicating the batch prediction job was
62	// making progress.
63	LastHeartbeatTime *string
64
65	// The Amazon S3 location of your output file.
66	OutputPath *string
67
68	// The number of records processed by the batch prediction job.
69	ProcessedRecordsCount *int32
70
71	// Timestamp of when the batch prediction job started.
72	StartTime *string
73
74	// The batch prediction status.
75	Status AsyncJobStatus
76
77	// The total number of records in the batch prediction job.
78	TotalRecordsCount *int32
79}
80
81// The model training validation messages.
82type DataValidationMetrics struct {
83
84	// The field-specific model training validation messages.
85	FieldLevelMessages []FieldValidationMessage
86
87	// The file-specific model training validation messages.
88	FileLevelMessages []FileValidationMessage
89}
90
91// The detector.
92type Detector struct {
93
94	// The detector ARN.
95	Arn *string
96
97	// Timestamp of when the detector was created.
98	CreatedTime *string
99
100	// The detector description.
101	Description *string
102
103	// The detector ID.
104	DetectorId *string
105
106	// The name of the event type.
107	EventTypeName *string
108
109	// Timestamp of when the detector was last updated.
110	LastUpdatedTime *string
111}
112
113// The summary of the detector version.
114type DetectorVersionSummary struct {
115
116	// The detector version description.
117	Description *string
118
119	// The detector version ID.
120	DetectorVersionId *string
121
122	// Timestamp of when the detector version was last updated.
123	LastUpdatedTime *string
124
125	// The detector version status.
126	Status DetectorVersionStatus
127}
128
129// The entity details.
130type Entity struct {
131
132	// The entity ID. If you do not know the entityId, you can pass unknown, which is
133	// areserved string literal.
134	//
135	// This member is required.
136	EntityId *string
137
138	// The entity type.
139	//
140	// This member is required.
141	EntityType *string
142}
143
144// The entity type details.
145type EntityType struct {
146
147	// The entity type ARN.
148	Arn *string
149
150	// Timestamp of when the entity type was created.
151	CreatedTime *string
152
153	// The entity type description.
154	Description *string
155
156	// Timestamp of when the entity type was last updated.
157	LastUpdatedTime *string
158
159	// The entity type name.
160	Name *string
161}
162
163// The event type details.
164type EventType struct {
165
166	// The entity type ARN.
167	Arn *string
168
169	// Timestamp of when the event type was created.
170	CreatedTime *string
171
172	// The event type description.
173	Description *string
174
175	// The event type entity types.
176	EntityTypes []string
177
178	// The event type event variables.
179	EventVariables []string
180
181	// The event type labels.
182	Labels []string
183
184	// Timestamp of when the event type was last updated.
185	LastUpdatedTime *string
186
187	// The event type name.
188	Name *string
189}
190
191// Details for the external events data used for model version training.
192type ExternalEventsDetail struct {
193
194	// The ARN of the role that provides Amazon Fraud Detector access to the data
195	// location.
196	//
197	// This member is required.
198	DataAccessRoleArn *string
199
200	// The Amazon S3 bucket location for the data.
201	//
202	// This member is required.
203	DataLocation *string
204}
205
206// The Amazon SageMaker model.
207type ExternalModel struct {
208
209	// The model ARN.
210	Arn *string
211
212	// Timestamp of when the model was last created.
213	CreatedTime *string
214
215	// The input configuration.
216	InputConfiguration *ModelInputConfiguration
217
218	// The role used to invoke the model.
219	InvokeModelEndpointRoleArn *string
220
221	// Timestamp of when the model was last updated.
222	LastUpdatedTime *string
223
224	// The Amazon SageMaker model endpoints.
225	ModelEndpoint *string
226
227	// The Amazon Fraud Detector status for the external model endpoint
228	ModelEndpointStatus ModelEndpointStatus
229
230	// The source of the model.
231	ModelSource ModelSource
232
233	// The output configuration.
234	OutputConfiguration *ModelOutputConfiguration
235}
236
237// The message details.
238type FieldValidationMessage struct {
239
240	// The message content.
241	Content *string
242
243	// The field name.
244	FieldName *string
245
246	// The message ID.
247	Identifier *string
248
249	// The message title.
250	Title *string
251
252	// The message type.
253	Type *string
254}
255
256// The message details.
257type FileValidationMessage struct {
258
259	// The message content.
260	Content *string
261
262	// The message title.
263	Title *string
264
265	// The message type.
266	Type *string
267}
268
269// The KMS key details.
270type KMSKey struct {
271
272	// The encryption key ARN.
273	KmsEncryptionKeyArn *string
274}
275
276// The label details.
277type Label struct {
278
279	// The label ARN.
280	Arn *string
281
282	// Timestamp of when the event type was created.
283	CreatedTime *string
284
285	// The label description.
286	Description *string
287
288	// Timestamp of when the label was last updated.
289	LastUpdatedTime *string
290
291	// The label name.
292	Name *string
293}
294
295// The label schema.
296type LabelSchema struct {
297
298	// The label mapper maps the Amazon Fraud Detector supported model classification
299	// labels (FRAUD, LEGIT) to the appropriate event type labels. For example, if
300	// "FRAUD" and "LEGIT" are Amazon Fraud Detector supported labels, this mapper
301	// could be: {"FRAUD" => ["0"], "LEGIT" => ["1"]} or {"FRAUD" => ["false"], "LEGIT"
302	// => ["true"]} or {"FRAUD" => ["fraud", "abuse"], "LEGIT" => ["legit", "safe"]}.
303	// The value part of the mapper is a list, because you may have multiple label
304	// variants from your event type for a single Amazon Fraud Detector label.
305	//
306	// This member is required.
307	LabelMapper map[string][]string
308}
309
310// Model performance metrics data points.
311type MetricDataPoint struct {
312
313	// The false positive rate. This is the percentage of total legitimate events that
314	// are incorrectly predicted as fraud.
315	Fpr *float32
316
317	// The percentage of fraud events correctly predicted as fraudulent as compared to
318	// all events predicted as fraudulent.
319	Precision *float32
320
321	// The model threshold that specifies an acceptable fraud capture rate. For
322	// example, a threshold of 500 means any model score 500 or above is labeled as
323	// fraud.
324	Threshold *float32
325
326	// The true positive rate. This is the percentage of total fraud the model detects.
327	// Also known as capture rate.
328	Tpr *float32
329}
330
331// The model.
332type Model struct {
333
334	// The ARN of the model.
335	Arn *string
336
337	// Timestamp of when the model was created.
338	CreatedTime *string
339
340	// The model description.
341	Description *string
342
343	// The name of the event type.
344	EventTypeName *string
345
346	// Timestamp of last time the model was updated.
347	LastUpdatedTime *string
348
349	// The model ID.
350	ModelId *string
351
352	// The model type.
353	ModelType ModelTypeEnum
354}
355
356// A pre-formed Amazon SageMaker model input you can include if your detector
357// version includes an imported Amazon SageMaker model endpoint with pass-through
358// input configuration.
359type ModelEndpointDataBlob struct {
360
361	// The byte buffer of the Amazon SageMaker model endpoint input data blob.
362	ByteBuffer []byte
363
364	// The content type of the Amazon SageMaker model endpoint input data blob.
365	ContentType *string
366}
367
368// The Amazon SageMaker model input configuration.
369type ModelInputConfiguration struct {
370
371	// The event variables.
372	//
373	// This member is required.
374	UseEventVariables *bool
375
376	// Template for constructing the CSV input-data sent to SageMaker. At
377	// event-evaluation, the placeholders for variable-names in the template will be
378	// replaced with the variable values before being sent to SageMaker.
379	CsvInputTemplate *string
380
381	// The event type name.
382	EventTypeName *string
383
384	// The format of the model input configuration. The format differs depending on if
385	// it is passed through to SageMaker or constructed by Amazon Fraud Detector.
386	Format ModelInputDataFormat
387
388	// Template for constructing the JSON input-data sent to SageMaker. At
389	// event-evaluation, the placeholders for variable names in the template will be
390	// replaced with the variable values before being sent to SageMaker.
391	JsonInputTemplate *string
392}
393
394// Provides the Amazon Sagemaker model output configuration.
395type ModelOutputConfiguration struct {
396
397	// The format of the model output configuration.
398	//
399	// This member is required.
400	Format ModelOutputDataFormat
401
402	// A map of CSV index values in the SageMaker response to the Amazon Fraud Detector
403	// variables.
404	CsvIndexToVariableMap map[string]string
405
406	// A map of JSON keys in response from SageMaker to the Amazon Fraud Detector
407	// variables.
408	JsonKeyToVariableMap map[string]string
409}
410
411// The fraud prediction scores.
412type ModelScores struct {
413
414	// The model version.
415	ModelVersion *ModelVersion
416
417	// The model's fraud prediction scores.
418	Scores map[string]float32
419}
420
421// The model version.
422type ModelVersion struct {
423
424	// The model ID.
425	//
426	// This member is required.
427	ModelId *string
428
429	// The model type.
430	//
431	// This member is required.
432	ModelType ModelTypeEnum
433
434	// The model version number.
435	//
436	// This member is required.
437	ModelVersionNumber *string
438
439	// The model version ARN.
440	Arn *string
441}
442
443// The details of the model version.
444type ModelVersionDetail struct {
445
446	// The model version ARN.
447	Arn *string
448
449	// The timestamp when the model was created.
450	CreatedTime *string
451
452	// The event details.
453	ExternalEventsDetail *ExternalEventsDetail
454
455	// The timestamp when the model was last updated.
456	LastUpdatedTime *string
457
458	// The model ID.
459	ModelId *string
460
461	// The model type.
462	ModelType ModelTypeEnum
463
464	// The model version number.
465	ModelVersionNumber *string
466
467	// The status of the model version.
468	Status *string
469
470	// The training data schema.
471	TrainingDataSchema *TrainingDataSchema
472
473	// The model version training data source.
474	TrainingDataSource TrainingDataSourceEnum
475
476	// The training results.
477	TrainingResult *TrainingResult
478}
479
480// The outcome.
481type Outcome struct {
482
483	// The outcome ARN.
484	Arn *string
485
486	// The timestamp when the outcome was created.
487	CreatedTime *string
488
489	// The outcome description.
490	Description *string
491
492	// The timestamp when the outcome was last updated.
493	LastUpdatedTime *string
494
495	// The outcome name.
496	Name *string
497}
498
499// A rule.
500type Rule struct {
501
502	// The detector for which the rule is associated.
503	//
504	// This member is required.
505	DetectorId *string
506
507	// The rule ID.
508	//
509	// This member is required.
510	RuleId *string
511
512	// The rule version.
513	//
514	// This member is required.
515	RuleVersion *string
516}
517
518// The details of the rule.
519type RuleDetail struct {
520
521	// The rule ARN.
522	Arn *string
523
524	// The timestamp of when the rule was created.
525	CreatedTime *string
526
527	// The rule description.
528	Description *string
529
530	// The detector for which the rule is associated.
531	DetectorId *string
532
533	// The rule expression.
534	Expression *string
535
536	// The rule language.
537	Language Language
538
539	// Timestamp of the last time the rule was updated.
540	LastUpdatedTime *string
541
542	// The rule outcomes.
543	Outcomes []string
544
545	// The rule ID.
546	RuleId *string
547
548	// The rule version.
549	RuleVersion *string
550}
551
552// The rule results.
553type RuleResult struct {
554
555	// The outcomes of the matched rule, based on the rule execution mode.
556	Outcomes []string
557
558	// The rule ID that was matched, based on the rule execution mode.
559	RuleId *string
560}
561
562// A key and value pair.
563type Tag struct {
564
565	// A tag key.
566	//
567	// This member is required.
568	Key *string
569
570	// A value assigned to a tag key.
571	//
572	// This member is required.
573	Value *string
574}
575
576// The training data schema.
577type TrainingDataSchema struct {
578
579	// The label schema.
580	//
581	// This member is required.
582	LabelSchema *LabelSchema
583
584	// The training data schema variables.
585	//
586	// This member is required.
587	ModelVariables []string
588}
589
590// The training metric details.
591type TrainingMetrics struct {
592
593	// The area under the curve. This summarizes true positive rate (TPR) and false
594	// positive rate (FPR) across all possible model score thresholds. A model with no
595	// predictive power has an AUC of 0.5, whereas a perfect model has a score of 1.0.
596	Auc *float32
597
598	// The data points details.
599	MetricDataPoints []MetricDataPoint
600}
601
602// The training result details.
603type TrainingResult struct {
604
605	// The validation metrics.
606	DataValidationMetrics *DataValidationMetrics
607
608	// The training metric details.
609	TrainingMetrics *TrainingMetrics
610}
611
612// The variable.
613type Variable struct {
614
615	// The ARN of the variable.
616	Arn *string
617
618	// The time when the variable was created.
619	CreatedTime *string
620
621	// The data source of the variable.
622	DataSource DataSource
623
624	// The data type of the variable. For more information see Variable types
625	// (https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types).
626	DataType DataType
627
628	// The default value of the variable.
629	DefaultValue *string
630
631	// The description of the variable.
632	Description *string
633
634	// The time when variable was last updated.
635	LastUpdatedTime *string
636
637	// The name of the variable.
638	Name *string
639
640	// The variable type of the variable. Valid Values: AUTH_CODE | AVS |
641	// BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY |
642	// BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN |
643	// CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL |
644	// FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER |
645	// PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 |
646	// SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE |
647	// SHIPPING_STATE | SHIPPING_ZIP | USERAGENT
648	VariableType *string
649}
650
651// A variable in the list of variables for the batch create variable request.
652type VariableEntry struct {
653
654	// The data source of the variable.
655	DataSource *string
656
657	// The data type of the variable.
658	DataType *string
659
660	// The default value of the variable.
661	DefaultValue *string
662
663	// The description of the variable.
664	Description *string
665
666	// The name of the variable.
667	Name *string
668
669	// The type of the variable. For more information see Variable types
670	// (https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types).
671	// Valid Values: AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 |
672	// BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE |
673	// BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS |
674	// FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID |
675	// PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 |
676	// SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME |
677	// SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT
678	VariableType *string
679}
680