1use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::proto;
23use rusoto_core::request::HttpResponse;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27
28impl FraudDetectorClient {
29 fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30 let mut request =
31 SignedRequest::new(http_method, "frauddetector", &self.region, request_uri);
32
33 request.set_content_type("application/x-amz-json-1.1".to_owned());
34
35 request
36 }
37
38 async fn sign_and_dispatch<E>(
39 &self,
40 request: SignedRequest,
41 from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
42 ) -> Result<HttpResponse, RusotoError<E>> {
43 let mut response = self.client.sign_and_dispatch(request).await?;
44 if !response.status.is_success() {
45 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
46 return Err(from_response(response));
47 }
48
49 Ok(response)
50 }
51}
52
53use serde_json;
54#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
56#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
57pub struct FraudDetectorBatchCreateVariableError {
58 #[serde(rename = "code")]
60 #[serde(skip_serializing_if = "Option::is_none")]
61 pub code: Option<i64>,
62 #[serde(rename = "message")]
64 #[serde(skip_serializing_if = "Option::is_none")]
65 pub message: Option<String>,
66 #[serde(rename = "name")]
68 #[serde(skip_serializing_if = "Option::is_none")]
69 pub name: Option<String>,
70}
71
72#[derive(Clone, Debug, Default, PartialEq, Serialize)]
73#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
74pub struct BatchCreateVariableRequest {
75 #[serde(rename = "variableEntries")]
77 pub variable_entries: Vec<VariableEntry>,
78}
79
80#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
81#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
82pub struct BatchCreateVariableResult {
83 #[serde(rename = "errors")]
85 #[serde(skip_serializing_if = "Option::is_none")]
86 pub errors: Option<Vec<FraudDetectorBatchCreateVariableError>>,
87}
88
89#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
91#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
92pub struct FraudDetectorBatchGetVariableError {
93 #[serde(rename = "code")]
95 #[serde(skip_serializing_if = "Option::is_none")]
96 pub code: Option<i64>,
97 #[serde(rename = "message")]
99 #[serde(skip_serializing_if = "Option::is_none")]
100 pub message: Option<String>,
101 #[serde(rename = "name")]
103 #[serde(skip_serializing_if = "Option::is_none")]
104 pub name: Option<String>,
105}
106
107#[derive(Clone, Debug, Default, PartialEq, Serialize)]
108#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
109pub struct BatchGetVariableRequest {
110 #[serde(rename = "names")]
112 pub names: Vec<String>,
113}
114
115#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
116#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
117pub struct BatchGetVariableResult {
118 #[serde(rename = "errors")]
120 #[serde(skip_serializing_if = "Option::is_none")]
121 pub errors: Option<Vec<FraudDetectorBatchGetVariableError>>,
122 #[serde(rename = "variables")]
124 #[serde(skip_serializing_if = "Option::is_none")]
125 pub variables: Option<Vec<Variable>>,
126}
127
128#[derive(Clone, Debug, Default, PartialEq, Serialize)]
129#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
130pub struct CreateDetectorVersionRequest {
131 #[serde(rename = "description")]
133 #[serde(skip_serializing_if = "Option::is_none")]
134 pub description: Option<String>,
135 #[serde(rename = "detectorId")]
137 pub detector_id: String,
138 #[serde(rename = "externalModelEndpoints")]
140 #[serde(skip_serializing_if = "Option::is_none")]
141 pub external_model_endpoints: Option<Vec<String>>,
142 #[serde(rename = "modelVersions")]
144 #[serde(skip_serializing_if = "Option::is_none")]
145 pub model_versions: Option<Vec<ModelVersion>>,
146 #[serde(rename = "ruleExecutionMode")]
148 #[serde(skip_serializing_if = "Option::is_none")]
149 pub rule_execution_mode: Option<String>,
150 #[serde(rename = "rules")]
152 pub rules: Vec<Rule>,
153}
154
155#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
156#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
157pub struct CreateDetectorVersionResult {
158 #[serde(rename = "detectorId")]
160 #[serde(skip_serializing_if = "Option::is_none")]
161 pub detector_id: Option<String>,
162 #[serde(rename = "detectorVersionId")]
164 #[serde(skip_serializing_if = "Option::is_none")]
165 pub detector_version_id: Option<String>,
166 #[serde(rename = "status")]
168 #[serde(skip_serializing_if = "Option::is_none")]
169 pub status: Option<String>,
170}
171
172#[derive(Clone, Debug, Default, PartialEq, Serialize)]
173#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
174pub struct CreateModelVersionRequest {
175 #[serde(rename = "description")]
177 #[serde(skip_serializing_if = "Option::is_none")]
178 pub description: Option<String>,
179 #[serde(rename = "modelId")]
181 pub model_id: String,
182 #[serde(rename = "modelType")]
184 pub model_type: String,
185}
186
187#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
188#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
189pub struct CreateModelVersionResult {
190 #[serde(rename = "modelId")]
192 #[serde(skip_serializing_if = "Option::is_none")]
193 pub model_id: Option<String>,
194 #[serde(rename = "modelType")]
196 #[serde(skip_serializing_if = "Option::is_none")]
197 pub model_type: Option<String>,
198 #[serde(rename = "modelVersionNumber")]
200 #[serde(skip_serializing_if = "Option::is_none")]
201 pub model_version_number: Option<String>,
202 #[serde(rename = "status")]
204 #[serde(skip_serializing_if = "Option::is_none")]
205 pub status: Option<String>,
206}
207
208#[derive(Clone, Debug, Default, PartialEq, Serialize)]
209#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
210pub struct CreateRuleRequest {
211 #[serde(rename = "description")]
213 #[serde(skip_serializing_if = "Option::is_none")]
214 pub description: Option<String>,
215 #[serde(rename = "detectorId")]
217 pub detector_id: String,
218 #[serde(rename = "expression")]
220 pub expression: String,
221 #[serde(rename = "language")]
223 pub language: String,
224 #[serde(rename = "outcomes")]
226 pub outcomes: Vec<String>,
227 #[serde(rename = "ruleId")]
229 pub rule_id: String,
230}
231
232#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
233#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
234pub struct CreateRuleResult {
235 #[serde(rename = "rule")]
237 #[serde(skip_serializing_if = "Option::is_none")]
238 pub rule: Option<Rule>,
239}
240
241#[derive(Clone, Debug, Default, PartialEq, Serialize)]
242#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
243pub struct CreateVariableRequest {
244 #[serde(rename = "dataSource")]
246 pub data_source: String,
247 #[serde(rename = "dataType")]
249 pub data_type: String,
250 #[serde(rename = "defaultValue")]
252 pub default_value: String,
253 #[serde(rename = "description")]
255 #[serde(skip_serializing_if = "Option::is_none")]
256 pub description: Option<String>,
257 #[serde(rename = "name")]
259 pub name: String,
260 #[serde(rename = "variableType")]
262 #[serde(skip_serializing_if = "Option::is_none")]
263 pub variable_type: Option<String>,
264}
265
266#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
267#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
268pub struct CreateVariableResult {}
269
270#[derive(Clone, Debug, Default, PartialEq, Serialize)]
271#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
272pub struct DeleteDetectorRequest {
273 #[serde(rename = "detectorId")]
275 pub detector_id: String,
276}
277
278#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
279#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
280pub struct DeleteDetectorResult {}
281
282#[derive(Clone, Debug, Default, PartialEq, Serialize)]
283#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
284pub struct DeleteDetectorVersionRequest {
285 #[serde(rename = "detectorId")]
287 pub detector_id: String,
288 #[serde(rename = "detectorVersionId")]
290 pub detector_version_id: String,
291}
292
293#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
294#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
295pub struct DeleteDetectorVersionResult {}
296
297#[derive(Clone, Debug, Default, PartialEq, Serialize)]
298#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
299pub struct DeleteEventRequest {
300 #[serde(rename = "eventId")]
302 pub event_id: String,
303}
304
305#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
306#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
307pub struct DeleteEventResult {}
308
309#[derive(Clone, Debug, Default, PartialEq, Serialize)]
310#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
311pub struct DeleteRuleVersionRequest {
312 #[serde(rename = "detectorId")]
314 pub detector_id: String,
315 #[serde(rename = "ruleId")]
317 pub rule_id: String,
318 #[serde(rename = "ruleVersion")]
320 pub rule_version: String,
321}
322
323#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
324#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
325pub struct DeleteRuleVersionResult {}
326
327#[derive(Clone, Debug, Default, PartialEq, Serialize)]
328#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
329pub struct DescribeDetectorRequest {
330 #[serde(rename = "detectorId")]
332 pub detector_id: String,
333 #[serde(rename = "maxResults")]
335 #[serde(skip_serializing_if = "Option::is_none")]
336 pub max_results: Option<i64>,
337 #[serde(rename = "nextToken")]
339 #[serde(skip_serializing_if = "Option::is_none")]
340 pub next_token: Option<String>,
341}
342
343#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
344#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
345pub struct DescribeDetectorResult {
346 #[serde(rename = "detectorId")]
348 #[serde(skip_serializing_if = "Option::is_none")]
349 pub detector_id: Option<String>,
350 #[serde(rename = "detectorVersionSummaries")]
352 #[serde(skip_serializing_if = "Option::is_none")]
353 pub detector_version_summaries: Option<Vec<DetectorVersionSummary>>,
354 #[serde(rename = "nextToken")]
356 #[serde(skip_serializing_if = "Option::is_none")]
357 pub next_token: Option<String>,
358}
359
360#[derive(Clone, Debug, Default, PartialEq, Serialize)]
361#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
362pub struct DescribeModelVersionsRequest {
363 #[serde(rename = "maxResults")]
365 #[serde(skip_serializing_if = "Option::is_none")]
366 pub max_results: Option<i64>,
367 #[serde(rename = "modelId")]
369 #[serde(skip_serializing_if = "Option::is_none")]
370 pub model_id: Option<String>,
371 #[serde(rename = "modelType")]
373 #[serde(skip_serializing_if = "Option::is_none")]
374 pub model_type: Option<String>,
375 #[serde(rename = "modelVersionNumber")]
377 #[serde(skip_serializing_if = "Option::is_none")]
378 pub model_version_number: Option<String>,
379 #[serde(rename = "nextToken")]
381 #[serde(skip_serializing_if = "Option::is_none")]
382 pub next_token: Option<String>,
383}
384
385#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
386#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
387pub struct DescribeModelVersionsResult {
388 #[serde(rename = "modelVersionDetails")]
390 #[serde(skip_serializing_if = "Option::is_none")]
391 pub model_version_details: Option<Vec<ModelVersionDetail>>,
392 #[serde(rename = "nextToken")]
394 #[serde(skip_serializing_if = "Option::is_none")]
395 pub next_token: Option<String>,
396}
397
398#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
400#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
401pub struct Detector {
402 #[serde(rename = "createdTime")]
404 #[serde(skip_serializing_if = "Option::is_none")]
405 pub created_time: Option<String>,
406 #[serde(rename = "description")]
408 #[serde(skip_serializing_if = "Option::is_none")]
409 pub description: Option<String>,
410 #[serde(rename = "detectorId")]
412 #[serde(skip_serializing_if = "Option::is_none")]
413 pub detector_id: Option<String>,
414 #[serde(rename = "lastUpdatedTime")]
416 #[serde(skip_serializing_if = "Option::is_none")]
417 pub last_updated_time: Option<String>,
418}
419
420#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
422#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
423pub struct DetectorVersionSummary {
424 #[serde(rename = "description")]
426 #[serde(skip_serializing_if = "Option::is_none")]
427 pub description: Option<String>,
428 #[serde(rename = "detectorVersionId")]
430 #[serde(skip_serializing_if = "Option::is_none")]
431 pub detector_version_id: Option<String>,
432 #[serde(rename = "lastUpdatedTime")]
434 #[serde(skip_serializing_if = "Option::is_none")]
435 pub last_updated_time: Option<String>,
436 #[serde(rename = "status")]
438 #[serde(skip_serializing_if = "Option::is_none")]
439 pub status: Option<String>,
440}
441
442#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
444#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
445pub struct ExternalModel {
446 #[serde(rename = "createdTime")]
448 #[serde(skip_serializing_if = "Option::is_none")]
449 pub created_time: Option<String>,
450 #[serde(rename = "inputConfiguration")]
452 #[serde(skip_serializing_if = "Option::is_none")]
453 pub input_configuration: Option<ModelInputConfiguration>,
454 #[serde(rename = "lastUpdatedTime")]
456 #[serde(skip_serializing_if = "Option::is_none")]
457 pub last_updated_time: Option<String>,
458 #[serde(rename = "modelEndpoint")]
460 #[serde(skip_serializing_if = "Option::is_none")]
461 pub model_endpoint: Option<String>,
462 #[serde(rename = "modelEndpointStatus")]
464 #[serde(skip_serializing_if = "Option::is_none")]
465 pub model_endpoint_status: Option<String>,
466 #[serde(rename = "modelSource")]
468 #[serde(skip_serializing_if = "Option::is_none")]
469 pub model_source: Option<String>,
470 #[serde(rename = "outputConfiguration")]
472 #[serde(skip_serializing_if = "Option::is_none")]
473 pub output_configuration: Option<ModelOutputConfiguration>,
474 #[serde(rename = "role")]
476 #[serde(skip_serializing_if = "Option::is_none")]
477 pub role: Option<Role>,
478}
479
480#[derive(Clone, Debug, Default, PartialEq, Serialize)]
481#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
482pub struct GetDetectorVersionRequest {
483 #[serde(rename = "detectorId")]
485 pub detector_id: String,
486 #[serde(rename = "detectorVersionId")]
488 pub detector_version_id: String,
489}
490
491#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
492#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
493pub struct GetDetectorVersionResult {
494 #[serde(rename = "createdTime")]
496 #[serde(skip_serializing_if = "Option::is_none")]
497 pub created_time: Option<String>,
498 #[serde(rename = "description")]
500 #[serde(skip_serializing_if = "Option::is_none")]
501 pub description: Option<String>,
502 #[serde(rename = "detectorId")]
504 #[serde(skip_serializing_if = "Option::is_none")]
505 pub detector_id: Option<String>,
506 #[serde(rename = "detectorVersionId")]
508 #[serde(skip_serializing_if = "Option::is_none")]
509 pub detector_version_id: Option<String>,
510 #[serde(rename = "externalModelEndpoints")]
512 #[serde(skip_serializing_if = "Option::is_none")]
513 pub external_model_endpoints: Option<Vec<String>>,
514 #[serde(rename = "lastUpdatedTime")]
516 #[serde(skip_serializing_if = "Option::is_none")]
517 pub last_updated_time: Option<String>,
518 #[serde(rename = "modelVersions")]
520 #[serde(skip_serializing_if = "Option::is_none")]
521 pub model_versions: Option<Vec<ModelVersion>>,
522 #[serde(rename = "ruleExecutionMode")]
524 #[serde(skip_serializing_if = "Option::is_none")]
525 pub rule_execution_mode: Option<String>,
526 #[serde(rename = "rules")]
528 #[serde(skip_serializing_if = "Option::is_none")]
529 pub rules: Option<Vec<Rule>>,
530 #[serde(rename = "status")]
532 #[serde(skip_serializing_if = "Option::is_none")]
533 pub status: Option<String>,
534}
535
536#[derive(Clone, Debug, Default, PartialEq, Serialize)]
537#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
538pub struct GetDetectorsRequest {
539 #[serde(rename = "detectorId")]
541 #[serde(skip_serializing_if = "Option::is_none")]
542 pub detector_id: Option<String>,
543 #[serde(rename = "maxResults")]
545 #[serde(skip_serializing_if = "Option::is_none")]
546 pub max_results: Option<i64>,
547 #[serde(rename = "nextToken")]
549 #[serde(skip_serializing_if = "Option::is_none")]
550 pub next_token: Option<String>,
551}
552
553#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
554#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
555pub struct GetDetectorsResult {
556 #[serde(rename = "detectors")]
558 #[serde(skip_serializing_if = "Option::is_none")]
559 pub detectors: Option<Vec<Detector>>,
560 #[serde(rename = "nextToken")]
562 #[serde(skip_serializing_if = "Option::is_none")]
563 pub next_token: Option<String>,
564}
565
566#[derive(Clone, Debug, Default, PartialEq, Serialize)]
567#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
568pub struct GetExternalModelsRequest {
569 #[serde(rename = "maxResults")]
571 #[serde(skip_serializing_if = "Option::is_none")]
572 pub max_results: Option<i64>,
573 #[serde(rename = "modelEndpoint")]
575 #[serde(skip_serializing_if = "Option::is_none")]
576 pub model_endpoint: Option<String>,
577 #[serde(rename = "nextToken")]
579 #[serde(skip_serializing_if = "Option::is_none")]
580 pub next_token: Option<String>,
581}
582
583#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
584#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
585pub struct GetExternalModelsResult {
586 #[serde(rename = "externalModels")]
588 #[serde(skip_serializing_if = "Option::is_none")]
589 pub external_models: Option<Vec<ExternalModel>>,
590 #[serde(rename = "nextToken")]
592 #[serde(skip_serializing_if = "Option::is_none")]
593 pub next_token: Option<String>,
594}
595
596#[derive(Clone, Debug, Default, PartialEq, Serialize)]
597#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
598pub struct GetModelVersionRequest {
599 #[serde(rename = "modelId")]
601 pub model_id: String,
602 #[serde(rename = "modelType")]
604 pub model_type: String,
605 #[serde(rename = "modelVersionNumber")]
607 pub model_version_number: String,
608}
609
610#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
611#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
612pub struct GetModelVersionResult {
613 #[serde(rename = "description")]
615 #[serde(skip_serializing_if = "Option::is_none")]
616 pub description: Option<String>,
617 #[serde(rename = "modelId")]
619 #[serde(skip_serializing_if = "Option::is_none")]
620 pub model_id: Option<String>,
621 #[serde(rename = "modelType")]
623 #[serde(skip_serializing_if = "Option::is_none")]
624 pub model_type: Option<String>,
625 #[serde(rename = "modelVersionNumber")]
627 #[serde(skip_serializing_if = "Option::is_none")]
628 pub model_version_number: Option<String>,
629 #[serde(rename = "status")]
631 #[serde(skip_serializing_if = "Option::is_none")]
632 pub status: Option<String>,
633}
634
635#[derive(Clone, Debug, Default, PartialEq, Serialize)]
636#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
637pub struct GetModelsRequest {
638 #[serde(rename = "maxResults")]
640 #[serde(skip_serializing_if = "Option::is_none")]
641 pub max_results: Option<i64>,
642 #[serde(rename = "modelId")]
644 #[serde(skip_serializing_if = "Option::is_none")]
645 pub model_id: Option<String>,
646 #[serde(rename = "modelType")]
648 #[serde(skip_serializing_if = "Option::is_none")]
649 pub model_type: Option<String>,
650 #[serde(rename = "nextToken")]
652 #[serde(skip_serializing_if = "Option::is_none")]
653 pub next_token: Option<String>,
654}
655
656#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
657#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
658pub struct GetModelsResult {
659 #[serde(rename = "models")]
661 #[serde(skip_serializing_if = "Option::is_none")]
662 pub models: Option<Vec<Model>>,
663 #[serde(rename = "nextToken")]
665 #[serde(skip_serializing_if = "Option::is_none")]
666 pub next_token: Option<String>,
667}
668
669#[derive(Clone, Debug, Default, PartialEq, Serialize)]
670#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
671pub struct GetOutcomesRequest {
672 #[serde(rename = "maxResults")]
674 #[serde(skip_serializing_if = "Option::is_none")]
675 pub max_results: Option<i64>,
676 #[serde(rename = "name")]
678 #[serde(skip_serializing_if = "Option::is_none")]
679 pub name: Option<String>,
680 #[serde(rename = "nextToken")]
682 #[serde(skip_serializing_if = "Option::is_none")]
683 pub next_token: Option<String>,
684}
685
686#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
687#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
688pub struct GetOutcomesResult {
689 #[serde(rename = "nextToken")]
691 #[serde(skip_serializing_if = "Option::is_none")]
692 pub next_token: Option<String>,
693 #[serde(rename = "outcomes")]
695 #[serde(skip_serializing_if = "Option::is_none")]
696 pub outcomes: Option<Vec<Outcome>>,
697}
698
699#[derive(Clone, Debug, Default, PartialEq, Serialize)]
700#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
701pub struct GetPredictionRequest {
702 #[serde(rename = "detectorId")]
704 pub detector_id: String,
705 #[serde(rename = "detectorVersionId")]
707 #[serde(skip_serializing_if = "Option::is_none")]
708 pub detector_version_id: Option<String>,
709 #[serde(rename = "eventAttributes")]
711 #[serde(skip_serializing_if = "Option::is_none")]
712 pub event_attributes: Option<::std::collections::HashMap<String, String>>,
713 #[serde(rename = "eventId")]
715 pub event_id: String,
716 #[serde(rename = "externalModelEndpointDataBlobs")]
718 #[serde(skip_serializing_if = "Option::is_none")]
719 pub external_model_endpoint_data_blobs:
720 Option<::std::collections::HashMap<String, ModelEndpointDataBlob>>,
721}
722
723#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
724#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
725pub struct GetPredictionResult {
726 #[serde(rename = "modelScores")]
728 #[serde(skip_serializing_if = "Option::is_none")]
729 pub model_scores: Option<Vec<ModelScores>>,
730 #[serde(rename = "outcomes")]
732 #[serde(skip_serializing_if = "Option::is_none")]
733 pub outcomes: Option<Vec<String>>,
734 #[serde(rename = "ruleResults")]
736 #[serde(skip_serializing_if = "Option::is_none")]
737 pub rule_results: Option<Vec<RuleResult>>,
738}
739
740#[derive(Clone, Debug, Default, PartialEq, Serialize)]
741#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
742pub struct GetRulesRequest {
743 #[serde(rename = "detectorId")]
745 pub detector_id: String,
746 #[serde(rename = "maxResults")]
748 #[serde(skip_serializing_if = "Option::is_none")]
749 pub max_results: Option<i64>,
750 #[serde(rename = "nextToken")]
752 #[serde(skip_serializing_if = "Option::is_none")]
753 pub next_token: Option<String>,
754 #[serde(rename = "ruleId")]
756 #[serde(skip_serializing_if = "Option::is_none")]
757 pub rule_id: Option<String>,
758 #[serde(rename = "ruleVersion")]
760 #[serde(skip_serializing_if = "Option::is_none")]
761 pub rule_version: Option<String>,
762}
763
764#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
765#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
766pub struct GetRulesResult {
767 #[serde(rename = "nextToken")]
769 #[serde(skip_serializing_if = "Option::is_none")]
770 pub next_token: Option<String>,
771 #[serde(rename = "ruleDetails")]
773 #[serde(skip_serializing_if = "Option::is_none")]
774 pub rule_details: Option<Vec<RuleDetail>>,
775}
776
777#[derive(Clone, Debug, Default, PartialEq, Serialize)]
778#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
779pub struct GetVariablesRequest {
780 #[serde(rename = "maxResults")]
782 #[serde(skip_serializing_if = "Option::is_none")]
783 pub max_results: Option<i64>,
784 #[serde(rename = "name")]
786 #[serde(skip_serializing_if = "Option::is_none")]
787 pub name: Option<String>,
788 #[serde(rename = "nextToken")]
790 #[serde(skip_serializing_if = "Option::is_none")]
791 pub next_token: Option<String>,
792}
793
794#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
795#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
796pub struct GetVariablesResult {
797 #[serde(rename = "nextToken")]
799 #[serde(skip_serializing_if = "Option::is_none")]
800 pub next_token: Option<String>,
801 #[serde(rename = "variables")]
803 #[serde(skip_serializing_if = "Option::is_none")]
804 pub variables: Option<Vec<Variable>>,
805}
806
807#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
809pub struct LabelSchema {
810 #[serde(rename = "labelKey")]
812 pub label_key: String,
813 #[serde(rename = "labelMapper")]
815 pub label_mapper: ::std::collections::HashMap<String, Vec<String>>,
816}
817
818#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
820#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
821pub struct Model {
822 #[serde(rename = "createdTime")]
824 #[serde(skip_serializing_if = "Option::is_none")]
825 pub created_time: Option<String>,
826 #[serde(rename = "description")]
828 #[serde(skip_serializing_if = "Option::is_none")]
829 pub description: Option<String>,
830 #[serde(rename = "labelSchema")]
832 #[serde(skip_serializing_if = "Option::is_none")]
833 pub label_schema: Option<LabelSchema>,
834 #[serde(rename = "lastUpdatedTime")]
836 #[serde(skip_serializing_if = "Option::is_none")]
837 pub last_updated_time: Option<String>,
838 #[serde(rename = "modelId")]
840 #[serde(skip_serializing_if = "Option::is_none")]
841 pub model_id: Option<String>,
842 #[serde(rename = "modelType")]
844 #[serde(skip_serializing_if = "Option::is_none")]
845 pub model_type: Option<String>,
846 #[serde(rename = "modelVariables")]
848 #[serde(skip_serializing_if = "Option::is_none")]
849 pub model_variables: Option<Vec<ModelVariable>>,
850 #[serde(rename = "trainingDataSource")]
852 #[serde(skip_serializing_if = "Option::is_none")]
853 pub training_data_source: Option<TrainingDataSource>,
854}
855
856#[derive(Clone, Debug, Default, PartialEq, Serialize)]
858#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
859pub struct ModelEndpointDataBlob {
860 #[serde(rename = "byteBuffer")]
862 #[serde(
863 deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
864 serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
865 default
866 )]
867 #[serde(skip_serializing_if = "Option::is_none")]
868 pub byte_buffer: Option<bytes::Bytes>,
869 #[serde(rename = "contentType")]
871 #[serde(skip_serializing_if = "Option::is_none")]
872 pub content_type: Option<String>,
873}
874
875#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
877pub struct ModelInputConfiguration {
878 #[serde(rename = "csvInputTemplate")]
880 #[serde(skip_serializing_if = "Option::is_none")]
881 pub csv_input_template: Option<String>,
882 #[serde(rename = "format")]
884 #[serde(skip_serializing_if = "Option::is_none")]
885 pub format: Option<String>,
886 #[serde(rename = "isOpaque")]
888 pub is_opaque: bool,
889 #[serde(rename = "jsonInputTemplate")]
891 #[serde(skip_serializing_if = "Option::is_none")]
892 pub json_input_template: Option<String>,
893}
894
895#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
897pub struct ModelOutputConfiguration {
898 #[serde(rename = "csvIndexToVariableMap")]
900 #[serde(skip_serializing_if = "Option::is_none")]
901 pub csv_index_to_variable_map: Option<::std::collections::HashMap<String, String>>,
902 #[serde(rename = "format")]
904 pub format: String,
905 #[serde(rename = "jsonKeyToVariableMap")]
907 #[serde(skip_serializing_if = "Option::is_none")]
908 pub json_key_to_variable_map: Option<::std::collections::HashMap<String, String>>,
909}
910
911#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
913#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
914pub struct ModelScores {
915 #[serde(rename = "modelVersion")]
917 #[serde(skip_serializing_if = "Option::is_none")]
918 pub model_version: Option<ModelVersion>,
919 #[serde(rename = "scores")]
921 #[serde(skip_serializing_if = "Option::is_none")]
922 pub scores: Option<::std::collections::HashMap<String, f32>>,
923}
924
925#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
927pub struct ModelVariable {
928 #[serde(rename = "index")]
930 #[serde(skip_serializing_if = "Option::is_none")]
931 pub index: Option<i64>,
932 #[serde(rename = "name")]
934 pub name: String,
935}
936
937#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
939pub struct ModelVersion {
940 #[serde(rename = "modelId")]
942 pub model_id: String,
943 #[serde(rename = "modelType")]
945 pub model_type: String,
946 #[serde(rename = "modelVersionNumber")]
948 pub model_version_number: String,
949}
950
951#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
953#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
954pub struct ModelVersionDetail {
955 #[serde(rename = "createdTime")]
957 #[serde(skip_serializing_if = "Option::is_none")]
958 pub created_time: Option<String>,
959 #[serde(rename = "description")]
961 #[serde(skip_serializing_if = "Option::is_none")]
962 pub description: Option<String>,
963 #[serde(rename = "labelSchema")]
965 #[serde(skip_serializing_if = "Option::is_none")]
966 pub label_schema: Option<LabelSchema>,
967 #[serde(rename = "lastUpdatedTime")]
969 #[serde(skip_serializing_if = "Option::is_none")]
970 pub last_updated_time: Option<String>,
971 #[serde(rename = "modelId")]
973 #[serde(skip_serializing_if = "Option::is_none")]
974 pub model_id: Option<String>,
975 #[serde(rename = "modelType")]
977 #[serde(skip_serializing_if = "Option::is_none")]
978 pub model_type: Option<String>,
979 #[serde(rename = "modelVariables")]
981 #[serde(skip_serializing_if = "Option::is_none")]
982 pub model_variables: Option<Vec<ModelVariable>>,
983 #[serde(rename = "modelVersionNumber")]
985 #[serde(skip_serializing_if = "Option::is_none")]
986 pub model_version_number: Option<String>,
987 #[serde(rename = "status")]
989 #[serde(skip_serializing_if = "Option::is_none")]
990 pub status: Option<String>,
991 #[serde(rename = "trainingDataSource")]
993 #[serde(skip_serializing_if = "Option::is_none")]
994 pub training_data_source: Option<TrainingDataSource>,
995 #[serde(rename = "trainingMetrics")]
997 #[serde(skip_serializing_if = "Option::is_none")]
998 pub training_metrics: Option<::std::collections::HashMap<String, String>>,
999 #[serde(rename = "validationMetrics")]
1001 #[serde(skip_serializing_if = "Option::is_none")]
1002 pub validation_metrics: Option<::std::collections::HashMap<String, String>>,
1003}
1004
1005#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1007#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1008pub struct Outcome {
1009 #[serde(rename = "createdTime")]
1011 #[serde(skip_serializing_if = "Option::is_none")]
1012 pub created_time: Option<String>,
1013 #[serde(rename = "description")]
1015 #[serde(skip_serializing_if = "Option::is_none")]
1016 pub description: Option<String>,
1017 #[serde(rename = "lastUpdatedTime")]
1019 #[serde(skip_serializing_if = "Option::is_none")]
1020 pub last_updated_time: Option<String>,
1021 #[serde(rename = "name")]
1023 #[serde(skip_serializing_if = "Option::is_none")]
1024 pub name: Option<String>,
1025}
1026
1027#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1028#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1029pub struct PutDetectorRequest {
1030 #[serde(rename = "description")]
1032 #[serde(skip_serializing_if = "Option::is_none")]
1033 pub description: Option<String>,
1034 #[serde(rename = "detectorId")]
1036 pub detector_id: String,
1037}
1038
1039#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1040#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1041pub struct PutDetectorResult {}
1042
1043#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1044#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1045pub struct PutExternalModelRequest {
1046 #[serde(rename = "inputConfiguration")]
1048 pub input_configuration: ModelInputConfiguration,
1049 #[serde(rename = "modelEndpoint")]
1051 pub model_endpoint: String,
1052 #[serde(rename = "modelEndpointStatus")]
1054 pub model_endpoint_status: String,
1055 #[serde(rename = "modelSource")]
1057 pub model_source: String,
1058 #[serde(rename = "outputConfiguration")]
1060 pub output_configuration: ModelOutputConfiguration,
1061 #[serde(rename = "role")]
1063 pub role: Role,
1064}
1065
1066#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1067#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1068pub struct PutExternalModelResult {}
1069
1070#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1071#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1072pub struct PutModelRequest {
1073 #[serde(rename = "description")]
1075 #[serde(skip_serializing_if = "Option::is_none")]
1076 pub description: Option<String>,
1077 #[serde(rename = "labelSchema")]
1079 pub label_schema: LabelSchema,
1080 #[serde(rename = "modelId")]
1082 pub model_id: String,
1083 #[serde(rename = "modelType")]
1085 pub model_type: String,
1086 #[serde(rename = "modelVariables")]
1088 pub model_variables: Vec<ModelVariable>,
1089 #[serde(rename = "trainingDataSource")]
1091 pub training_data_source: TrainingDataSource,
1092}
1093
1094#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1095#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1096pub struct PutModelResult {}
1097
1098#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1099#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1100pub struct PutOutcomeRequest {
1101 #[serde(rename = "description")]
1103 #[serde(skip_serializing_if = "Option::is_none")]
1104 pub description: Option<String>,
1105 #[serde(rename = "name")]
1107 pub name: String,
1108}
1109
1110#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1111#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1112pub struct PutOutcomeResult {}
1113
1114#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1116pub struct Role {
1117 #[serde(rename = "arn")]
1119 pub arn: String,
1120 #[serde(rename = "name")]
1122 pub name: String,
1123}
1124
1125#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1127pub struct Rule {
1128 #[serde(rename = "detectorId")]
1130 pub detector_id: String,
1131 #[serde(rename = "ruleId")]
1133 pub rule_id: String,
1134 #[serde(rename = "ruleVersion")]
1136 pub rule_version: String,
1137}
1138
1139#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1141#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1142pub struct RuleDetail {
1143 #[serde(rename = "createdTime")]
1145 #[serde(skip_serializing_if = "Option::is_none")]
1146 pub created_time: Option<String>,
1147 #[serde(rename = "description")]
1149 #[serde(skip_serializing_if = "Option::is_none")]
1150 pub description: Option<String>,
1151 #[serde(rename = "detectorId")]
1153 #[serde(skip_serializing_if = "Option::is_none")]
1154 pub detector_id: Option<String>,
1155 #[serde(rename = "expression")]
1157 #[serde(skip_serializing_if = "Option::is_none")]
1158 pub expression: Option<String>,
1159 #[serde(rename = "language")]
1161 #[serde(skip_serializing_if = "Option::is_none")]
1162 pub language: Option<String>,
1163 #[serde(rename = "lastUpdatedTime")]
1165 #[serde(skip_serializing_if = "Option::is_none")]
1166 pub last_updated_time: Option<String>,
1167 #[serde(rename = "outcomes")]
1169 #[serde(skip_serializing_if = "Option::is_none")]
1170 pub outcomes: Option<Vec<String>>,
1171 #[serde(rename = "ruleId")]
1173 #[serde(skip_serializing_if = "Option::is_none")]
1174 pub rule_id: Option<String>,
1175 #[serde(rename = "ruleVersion")]
1177 #[serde(skip_serializing_if = "Option::is_none")]
1178 pub rule_version: Option<String>,
1179}
1180
1181#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1183#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1184pub struct RuleResult {
1185 #[serde(rename = "outcomes")]
1187 #[serde(skip_serializing_if = "Option::is_none")]
1188 pub outcomes: Option<Vec<String>>,
1189 #[serde(rename = "ruleId")]
1191 #[serde(skip_serializing_if = "Option::is_none")]
1192 pub rule_id: Option<String>,
1193}
1194
1195#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1197pub struct TrainingDataSource {
1198 #[serde(rename = "dataAccessRoleArn")]
1200 pub data_access_role_arn: String,
1201 #[serde(rename = "dataLocation")]
1203 pub data_location: String,
1204}
1205
1206#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1207#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1208pub struct UpdateDetectorVersionMetadataRequest {
1209 #[serde(rename = "description")]
1211 pub description: String,
1212 #[serde(rename = "detectorId")]
1214 pub detector_id: String,
1215 #[serde(rename = "detectorVersionId")]
1217 pub detector_version_id: String,
1218}
1219
1220#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1221#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1222pub struct UpdateDetectorVersionMetadataResult {}
1223
1224#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1225#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1226pub struct UpdateDetectorVersionRequest {
1227 #[serde(rename = "description")]
1229 #[serde(skip_serializing_if = "Option::is_none")]
1230 pub description: Option<String>,
1231 #[serde(rename = "detectorId")]
1233 pub detector_id: String,
1234 #[serde(rename = "detectorVersionId")]
1236 pub detector_version_id: String,
1237 #[serde(rename = "externalModelEndpoints")]
1239 pub external_model_endpoints: Vec<String>,
1240 #[serde(rename = "modelVersions")]
1242 #[serde(skip_serializing_if = "Option::is_none")]
1243 pub model_versions: Option<Vec<ModelVersion>>,
1244 #[serde(rename = "ruleExecutionMode")]
1246 #[serde(skip_serializing_if = "Option::is_none")]
1247 pub rule_execution_mode: Option<String>,
1248 #[serde(rename = "rules")]
1250 pub rules: Vec<Rule>,
1251}
1252
1253#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1254#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1255pub struct UpdateDetectorVersionResult {}
1256
1257#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1258#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1259pub struct UpdateDetectorVersionStatusRequest {
1260 #[serde(rename = "detectorId")]
1262 pub detector_id: String,
1263 #[serde(rename = "detectorVersionId")]
1265 pub detector_version_id: String,
1266 #[serde(rename = "status")]
1268 pub status: String,
1269}
1270
1271#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1272#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1273pub struct UpdateDetectorVersionStatusResult {}
1274
1275#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1276#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1277pub struct UpdateModelVersionRequest {
1278 #[serde(rename = "description")]
1280 pub description: String,
1281 #[serde(rename = "modelId")]
1283 pub model_id: String,
1284 #[serde(rename = "modelType")]
1286 pub model_type: String,
1287 #[serde(rename = "modelVersionNumber")]
1289 pub model_version_number: String,
1290 #[serde(rename = "status")]
1292 pub status: String,
1293}
1294
1295#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1296#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1297pub struct UpdateModelVersionResult {}
1298
1299#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1300#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1301pub struct UpdateRuleMetadataRequest {
1302 #[serde(rename = "description")]
1304 pub description: String,
1305 #[serde(rename = "rule")]
1307 pub rule: Rule,
1308}
1309
1310#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1311#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1312pub struct UpdateRuleMetadataResult {}
1313
1314#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1315#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1316pub struct UpdateRuleVersionRequest {
1317 #[serde(rename = "description")]
1319 #[serde(skip_serializing_if = "Option::is_none")]
1320 pub description: Option<String>,
1321 #[serde(rename = "expression")]
1323 pub expression: String,
1324 #[serde(rename = "language")]
1326 pub language: String,
1327 #[serde(rename = "outcomes")]
1329 pub outcomes: Vec<String>,
1330 #[serde(rename = "rule")]
1332 pub rule: Rule,
1333}
1334
1335#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1336#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1337pub struct UpdateRuleVersionResult {
1338 #[serde(rename = "rule")]
1340 #[serde(skip_serializing_if = "Option::is_none")]
1341 pub rule: Option<Rule>,
1342}
1343
1344#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1345#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1346pub struct UpdateVariableRequest {
1347 #[serde(rename = "defaultValue")]
1349 #[serde(skip_serializing_if = "Option::is_none")]
1350 pub default_value: Option<String>,
1351 #[serde(rename = "description")]
1353 #[serde(skip_serializing_if = "Option::is_none")]
1354 pub description: Option<String>,
1355 #[serde(rename = "name")]
1357 pub name: String,
1358 #[serde(rename = "variableType")]
1360 #[serde(skip_serializing_if = "Option::is_none")]
1361 pub variable_type: Option<String>,
1362}
1363
1364#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1365#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1366pub struct UpdateVariableResult {}
1367
1368#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1370#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1371pub struct Variable {
1372 #[serde(rename = "createdTime")]
1374 #[serde(skip_serializing_if = "Option::is_none")]
1375 pub created_time: Option<String>,
1376 #[serde(rename = "dataSource")]
1378 #[serde(skip_serializing_if = "Option::is_none")]
1379 pub data_source: Option<String>,
1380 #[serde(rename = "dataType")]
1382 #[serde(skip_serializing_if = "Option::is_none")]
1383 pub data_type: Option<String>,
1384 #[serde(rename = "defaultValue")]
1386 #[serde(skip_serializing_if = "Option::is_none")]
1387 pub default_value: Option<String>,
1388 #[serde(rename = "description")]
1390 #[serde(skip_serializing_if = "Option::is_none")]
1391 pub description: Option<String>,
1392 #[serde(rename = "lastUpdatedTime")]
1394 #[serde(skip_serializing_if = "Option::is_none")]
1395 pub last_updated_time: Option<String>,
1396 #[serde(rename = "name")]
1398 #[serde(skip_serializing_if = "Option::is_none")]
1399 pub name: Option<String>,
1400 #[serde(rename = "variableType")]
1402 #[serde(skip_serializing_if = "Option::is_none")]
1403 pub variable_type: Option<String>,
1404}
1405
1406#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1408#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1409pub struct VariableEntry {
1410 #[serde(rename = "dataSource")]
1412 #[serde(skip_serializing_if = "Option::is_none")]
1413 pub data_source: Option<String>,
1414 #[serde(rename = "dataType")]
1416 #[serde(skip_serializing_if = "Option::is_none")]
1417 pub data_type: Option<String>,
1418 #[serde(rename = "defaultValue")]
1420 #[serde(skip_serializing_if = "Option::is_none")]
1421 pub default_value: Option<String>,
1422 #[serde(rename = "description")]
1424 #[serde(skip_serializing_if = "Option::is_none")]
1425 pub description: Option<String>,
1426 #[serde(rename = "name")]
1428 #[serde(skip_serializing_if = "Option::is_none")]
1429 pub name: Option<String>,
1430 #[serde(rename = "variableType")]
1432 #[serde(skip_serializing_if = "Option::is_none")]
1433 pub variable_type: Option<String>,
1434}
1435
1436#[derive(Debug, PartialEq)]
1438pub enum BatchCreateVariableError {
1439 InternalServer(String),
1441 Throttling(String),
1443}
1444
1445impl BatchCreateVariableError {
1446 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchCreateVariableError> {
1447 if let Some(err) = proto::json::Error::parse(&res) {
1448 match err.typ.as_str() {
1449 "InternalServerException" => {
1450 return RusotoError::Service(BatchCreateVariableError::InternalServer(err.msg))
1451 }
1452 "ThrottlingException" => {
1453 return RusotoError::Service(BatchCreateVariableError::Throttling(err.msg))
1454 }
1455 "ValidationException" => return RusotoError::Validation(err.msg),
1456 _ => {}
1457 }
1458 }
1459 RusotoError::Unknown(res)
1460 }
1461}
1462impl fmt::Display for BatchCreateVariableError {
1463 #[allow(unused_variables)]
1464 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1465 match *self {
1466 BatchCreateVariableError::InternalServer(ref cause) => write!(f, "{}", cause),
1467 BatchCreateVariableError::Throttling(ref cause) => write!(f, "{}", cause),
1468 }
1469 }
1470}
1471impl Error for BatchCreateVariableError {}
1472#[derive(Debug, PartialEq)]
1474pub enum BatchGetVariableError {
1475 InternalServer(String),
1477 Throttling(String),
1479}
1480
1481impl BatchGetVariableError {
1482 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchGetVariableError> {
1483 if let Some(err) = proto::json::Error::parse(&res) {
1484 match err.typ.as_str() {
1485 "InternalServerException" => {
1486 return RusotoError::Service(BatchGetVariableError::InternalServer(err.msg))
1487 }
1488 "ThrottlingException" => {
1489 return RusotoError::Service(BatchGetVariableError::Throttling(err.msg))
1490 }
1491 "ValidationException" => return RusotoError::Validation(err.msg),
1492 _ => {}
1493 }
1494 }
1495 RusotoError::Unknown(res)
1496 }
1497}
1498impl fmt::Display for BatchGetVariableError {
1499 #[allow(unused_variables)]
1500 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1501 match *self {
1502 BatchGetVariableError::InternalServer(ref cause) => write!(f, "{}", cause),
1503 BatchGetVariableError::Throttling(ref cause) => write!(f, "{}", cause),
1504 }
1505 }
1506}
1507impl Error for BatchGetVariableError {}
1508#[derive(Debug, PartialEq)]
1510pub enum CreateDetectorVersionError {
1511 InternalServer(String),
1513 ResourceNotFound(String),
1515 Throttling(String),
1517}
1518
1519impl CreateDetectorVersionError {
1520 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDetectorVersionError> {
1521 if let Some(err) = proto::json::Error::parse(&res) {
1522 match err.typ.as_str() {
1523 "InternalServerException" => {
1524 return RusotoError::Service(CreateDetectorVersionError::InternalServer(
1525 err.msg,
1526 ))
1527 }
1528 "ResourceNotFoundException" => {
1529 return RusotoError::Service(CreateDetectorVersionError::ResourceNotFound(
1530 err.msg,
1531 ))
1532 }
1533 "ThrottlingException" => {
1534 return RusotoError::Service(CreateDetectorVersionError::Throttling(err.msg))
1535 }
1536 "ValidationException" => return RusotoError::Validation(err.msg),
1537 _ => {}
1538 }
1539 }
1540 RusotoError::Unknown(res)
1541 }
1542}
1543impl fmt::Display for CreateDetectorVersionError {
1544 #[allow(unused_variables)]
1545 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1546 match *self {
1547 CreateDetectorVersionError::InternalServer(ref cause) => write!(f, "{}", cause),
1548 CreateDetectorVersionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1549 CreateDetectorVersionError::Throttling(ref cause) => write!(f, "{}", cause),
1550 }
1551 }
1552}
1553impl Error for CreateDetectorVersionError {}
1554#[derive(Debug, PartialEq)]
1556pub enum CreateModelVersionError {
1557 InternalServer(String),
1559 ResourceNotFound(String),
1561 Throttling(String),
1563}
1564
1565impl CreateModelVersionError {
1566 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateModelVersionError> {
1567 if let Some(err) = proto::json::Error::parse(&res) {
1568 match err.typ.as_str() {
1569 "InternalServerException" => {
1570 return RusotoError::Service(CreateModelVersionError::InternalServer(err.msg))
1571 }
1572 "ResourceNotFoundException" => {
1573 return RusotoError::Service(CreateModelVersionError::ResourceNotFound(err.msg))
1574 }
1575 "ThrottlingException" => {
1576 return RusotoError::Service(CreateModelVersionError::Throttling(err.msg))
1577 }
1578 "ValidationException" => return RusotoError::Validation(err.msg),
1579 _ => {}
1580 }
1581 }
1582 RusotoError::Unknown(res)
1583 }
1584}
1585impl fmt::Display for CreateModelVersionError {
1586 #[allow(unused_variables)]
1587 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1588 match *self {
1589 CreateModelVersionError::InternalServer(ref cause) => write!(f, "{}", cause),
1590 CreateModelVersionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1591 CreateModelVersionError::Throttling(ref cause) => write!(f, "{}", cause),
1592 }
1593 }
1594}
1595impl Error for CreateModelVersionError {}
1596#[derive(Debug, PartialEq)]
1598pub enum CreateRuleError {
1599 InternalServer(String),
1601 Throttling(String),
1603}
1604
1605impl CreateRuleError {
1606 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRuleError> {
1607 if let Some(err) = proto::json::Error::parse(&res) {
1608 match err.typ.as_str() {
1609 "InternalServerException" => {
1610 return RusotoError::Service(CreateRuleError::InternalServer(err.msg))
1611 }
1612 "ThrottlingException" => {
1613 return RusotoError::Service(CreateRuleError::Throttling(err.msg))
1614 }
1615 "ValidationException" => return RusotoError::Validation(err.msg),
1616 _ => {}
1617 }
1618 }
1619 RusotoError::Unknown(res)
1620 }
1621}
1622impl fmt::Display for CreateRuleError {
1623 #[allow(unused_variables)]
1624 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1625 match *self {
1626 CreateRuleError::InternalServer(ref cause) => write!(f, "{}", cause),
1627 CreateRuleError::Throttling(ref cause) => write!(f, "{}", cause),
1628 }
1629 }
1630}
1631impl Error for CreateRuleError {}
1632#[derive(Debug, PartialEq)]
1634pub enum CreateVariableError {
1635 InternalServer(String),
1637 Throttling(String),
1639}
1640
1641impl CreateVariableError {
1642 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateVariableError> {
1643 if let Some(err) = proto::json::Error::parse(&res) {
1644 match err.typ.as_str() {
1645 "InternalServerException" => {
1646 return RusotoError::Service(CreateVariableError::InternalServer(err.msg))
1647 }
1648 "ThrottlingException" => {
1649 return RusotoError::Service(CreateVariableError::Throttling(err.msg))
1650 }
1651 "ValidationException" => return RusotoError::Validation(err.msg),
1652 _ => {}
1653 }
1654 }
1655 RusotoError::Unknown(res)
1656 }
1657}
1658impl fmt::Display for CreateVariableError {
1659 #[allow(unused_variables)]
1660 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1661 match *self {
1662 CreateVariableError::InternalServer(ref cause) => write!(f, "{}", cause),
1663 CreateVariableError::Throttling(ref cause) => write!(f, "{}", cause),
1664 }
1665 }
1666}
1667impl Error for CreateVariableError {}
1668#[derive(Debug, PartialEq)]
1670pub enum DeleteDetectorError {
1671 Conflict(String),
1673 InternalServer(String),
1675 Throttling(String),
1677}
1678
1679impl DeleteDetectorError {
1680 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDetectorError> {
1681 if let Some(err) = proto::json::Error::parse(&res) {
1682 match err.typ.as_str() {
1683 "ConflictException" => {
1684 return RusotoError::Service(DeleteDetectorError::Conflict(err.msg))
1685 }
1686 "InternalServerException" => {
1687 return RusotoError::Service(DeleteDetectorError::InternalServer(err.msg))
1688 }
1689 "ThrottlingException" => {
1690 return RusotoError::Service(DeleteDetectorError::Throttling(err.msg))
1691 }
1692 "ValidationException" => return RusotoError::Validation(err.msg),
1693 _ => {}
1694 }
1695 }
1696 RusotoError::Unknown(res)
1697 }
1698}
1699impl fmt::Display for DeleteDetectorError {
1700 #[allow(unused_variables)]
1701 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1702 match *self {
1703 DeleteDetectorError::Conflict(ref cause) => write!(f, "{}", cause),
1704 DeleteDetectorError::InternalServer(ref cause) => write!(f, "{}", cause),
1705 DeleteDetectorError::Throttling(ref cause) => write!(f, "{}", cause),
1706 }
1707 }
1708}
1709impl Error for DeleteDetectorError {}
1710#[derive(Debug, PartialEq)]
1712pub enum DeleteDetectorVersionError {
1713 Conflict(String),
1715 InternalServer(String),
1717 ResourceNotFound(String),
1719 Throttling(String),
1721}
1722
1723impl DeleteDetectorVersionError {
1724 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDetectorVersionError> {
1725 if let Some(err) = proto::json::Error::parse(&res) {
1726 match err.typ.as_str() {
1727 "ConflictException" => {
1728 return RusotoError::Service(DeleteDetectorVersionError::Conflict(err.msg))
1729 }
1730 "InternalServerException" => {
1731 return RusotoError::Service(DeleteDetectorVersionError::InternalServer(
1732 err.msg,
1733 ))
1734 }
1735 "ResourceNotFoundException" => {
1736 return RusotoError::Service(DeleteDetectorVersionError::ResourceNotFound(
1737 err.msg,
1738 ))
1739 }
1740 "ThrottlingException" => {
1741 return RusotoError::Service(DeleteDetectorVersionError::Throttling(err.msg))
1742 }
1743 "ValidationException" => return RusotoError::Validation(err.msg),
1744 _ => {}
1745 }
1746 }
1747 RusotoError::Unknown(res)
1748 }
1749}
1750impl fmt::Display for DeleteDetectorVersionError {
1751 #[allow(unused_variables)]
1752 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1753 match *self {
1754 DeleteDetectorVersionError::Conflict(ref cause) => write!(f, "{}", cause),
1755 DeleteDetectorVersionError::InternalServer(ref cause) => write!(f, "{}", cause),
1756 DeleteDetectorVersionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1757 DeleteDetectorVersionError::Throttling(ref cause) => write!(f, "{}", cause),
1758 }
1759 }
1760}
1761impl Error for DeleteDetectorVersionError {}
1762#[derive(Debug, PartialEq)]
1764pub enum DeleteEventError {
1765 InternalServer(String),
1767 Throttling(String),
1769}
1770
1771impl DeleteEventError {
1772 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteEventError> {
1773 if let Some(err) = proto::json::Error::parse(&res) {
1774 match err.typ.as_str() {
1775 "InternalServerException" => {
1776 return RusotoError::Service(DeleteEventError::InternalServer(err.msg))
1777 }
1778 "ThrottlingException" => {
1779 return RusotoError::Service(DeleteEventError::Throttling(err.msg))
1780 }
1781 "ValidationException" => return RusotoError::Validation(err.msg),
1782 _ => {}
1783 }
1784 }
1785 RusotoError::Unknown(res)
1786 }
1787}
1788impl fmt::Display for DeleteEventError {
1789 #[allow(unused_variables)]
1790 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1791 match *self {
1792 DeleteEventError::InternalServer(ref cause) => write!(f, "{}", cause),
1793 DeleteEventError::Throttling(ref cause) => write!(f, "{}", cause),
1794 }
1795 }
1796}
1797impl Error for DeleteEventError {}
1798#[derive(Debug, PartialEq)]
1800pub enum DeleteRuleVersionError {
1801 Conflict(String),
1803 InternalServer(String),
1805 Throttling(String),
1807}
1808
1809impl DeleteRuleVersionError {
1810 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRuleVersionError> {
1811 if let Some(err) = proto::json::Error::parse(&res) {
1812 match err.typ.as_str() {
1813 "ConflictException" => {
1814 return RusotoError::Service(DeleteRuleVersionError::Conflict(err.msg))
1815 }
1816 "InternalServerException" => {
1817 return RusotoError::Service(DeleteRuleVersionError::InternalServer(err.msg))
1818 }
1819 "ThrottlingException" => {
1820 return RusotoError::Service(DeleteRuleVersionError::Throttling(err.msg))
1821 }
1822 "ValidationException" => return RusotoError::Validation(err.msg),
1823 _ => {}
1824 }
1825 }
1826 RusotoError::Unknown(res)
1827 }
1828}
1829impl fmt::Display for DeleteRuleVersionError {
1830 #[allow(unused_variables)]
1831 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1832 match *self {
1833 DeleteRuleVersionError::Conflict(ref cause) => write!(f, "{}", cause),
1834 DeleteRuleVersionError::InternalServer(ref cause) => write!(f, "{}", cause),
1835 DeleteRuleVersionError::Throttling(ref cause) => write!(f, "{}", cause),
1836 }
1837 }
1838}
1839impl Error for DeleteRuleVersionError {}
1840#[derive(Debug, PartialEq)]
1842pub enum DescribeDetectorError {
1843 InternalServer(String),
1845 ResourceNotFound(String),
1847 Throttling(String),
1849}
1850
1851impl DescribeDetectorError {
1852 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDetectorError> {
1853 if let Some(err) = proto::json::Error::parse(&res) {
1854 match err.typ.as_str() {
1855 "InternalServerException" => {
1856 return RusotoError::Service(DescribeDetectorError::InternalServer(err.msg))
1857 }
1858 "ResourceNotFoundException" => {
1859 return RusotoError::Service(DescribeDetectorError::ResourceNotFound(err.msg))
1860 }
1861 "ThrottlingException" => {
1862 return RusotoError::Service(DescribeDetectorError::Throttling(err.msg))
1863 }
1864 "ValidationException" => return RusotoError::Validation(err.msg),
1865 _ => {}
1866 }
1867 }
1868 RusotoError::Unknown(res)
1869 }
1870}
1871impl fmt::Display for DescribeDetectorError {
1872 #[allow(unused_variables)]
1873 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1874 match *self {
1875 DescribeDetectorError::InternalServer(ref cause) => write!(f, "{}", cause),
1876 DescribeDetectorError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1877 DescribeDetectorError::Throttling(ref cause) => write!(f, "{}", cause),
1878 }
1879 }
1880}
1881impl Error for DescribeDetectorError {}
1882#[derive(Debug, PartialEq)]
1884pub enum DescribeModelVersionsError {
1885 InternalServer(String),
1887 ResourceNotFound(String),
1889 Throttling(String),
1891}
1892
1893impl DescribeModelVersionsError {
1894 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeModelVersionsError> {
1895 if let Some(err) = proto::json::Error::parse(&res) {
1896 match err.typ.as_str() {
1897 "InternalServerException" => {
1898 return RusotoError::Service(DescribeModelVersionsError::InternalServer(
1899 err.msg,
1900 ))
1901 }
1902 "ResourceNotFoundException" => {
1903 return RusotoError::Service(DescribeModelVersionsError::ResourceNotFound(
1904 err.msg,
1905 ))
1906 }
1907 "ThrottlingException" => {
1908 return RusotoError::Service(DescribeModelVersionsError::Throttling(err.msg))
1909 }
1910 "ValidationException" => return RusotoError::Validation(err.msg),
1911 _ => {}
1912 }
1913 }
1914 RusotoError::Unknown(res)
1915 }
1916}
1917impl fmt::Display for DescribeModelVersionsError {
1918 #[allow(unused_variables)]
1919 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1920 match *self {
1921 DescribeModelVersionsError::InternalServer(ref cause) => write!(f, "{}", cause),
1922 DescribeModelVersionsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1923 DescribeModelVersionsError::Throttling(ref cause) => write!(f, "{}", cause),
1924 }
1925 }
1926}
1927impl Error for DescribeModelVersionsError {}
1928#[derive(Debug, PartialEq)]
1930pub enum GetDetectorVersionError {
1931 InternalServer(String),
1933 ResourceNotFound(String),
1935 Throttling(String),
1937}
1938
1939impl GetDetectorVersionError {
1940 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDetectorVersionError> {
1941 if let Some(err) = proto::json::Error::parse(&res) {
1942 match err.typ.as_str() {
1943 "InternalServerException" => {
1944 return RusotoError::Service(GetDetectorVersionError::InternalServer(err.msg))
1945 }
1946 "ResourceNotFoundException" => {
1947 return RusotoError::Service(GetDetectorVersionError::ResourceNotFound(err.msg))
1948 }
1949 "ThrottlingException" => {
1950 return RusotoError::Service(GetDetectorVersionError::Throttling(err.msg))
1951 }
1952 "ValidationException" => return RusotoError::Validation(err.msg),
1953 _ => {}
1954 }
1955 }
1956 RusotoError::Unknown(res)
1957 }
1958}
1959impl fmt::Display for GetDetectorVersionError {
1960 #[allow(unused_variables)]
1961 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1962 match *self {
1963 GetDetectorVersionError::InternalServer(ref cause) => write!(f, "{}", cause),
1964 GetDetectorVersionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1965 GetDetectorVersionError::Throttling(ref cause) => write!(f, "{}", cause),
1966 }
1967 }
1968}
1969impl Error for GetDetectorVersionError {}
1970#[derive(Debug, PartialEq)]
1972pub enum GetDetectorsError {
1973 InternalServer(String),
1975 ResourceNotFound(String),
1977 Throttling(String),
1979}
1980
1981impl GetDetectorsError {
1982 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDetectorsError> {
1983 if let Some(err) = proto::json::Error::parse(&res) {
1984 match err.typ.as_str() {
1985 "InternalServerException" => {
1986 return RusotoError::Service(GetDetectorsError::InternalServer(err.msg))
1987 }
1988 "ResourceNotFoundException" => {
1989 return RusotoError::Service(GetDetectorsError::ResourceNotFound(err.msg))
1990 }
1991 "ThrottlingException" => {
1992 return RusotoError::Service(GetDetectorsError::Throttling(err.msg))
1993 }
1994 "ValidationException" => return RusotoError::Validation(err.msg),
1995 _ => {}
1996 }
1997 }
1998 RusotoError::Unknown(res)
1999 }
2000}
2001impl fmt::Display for GetDetectorsError {
2002 #[allow(unused_variables)]
2003 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2004 match *self {
2005 GetDetectorsError::InternalServer(ref cause) => write!(f, "{}", cause),
2006 GetDetectorsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2007 GetDetectorsError::Throttling(ref cause) => write!(f, "{}", cause),
2008 }
2009 }
2010}
2011impl Error for GetDetectorsError {}
2012#[derive(Debug, PartialEq)]
2014pub enum GetExternalModelsError {
2015 InternalServer(String),
2017 ResourceNotFound(String),
2019 Throttling(String),
2021}
2022
2023impl GetExternalModelsError {
2024 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetExternalModelsError> {
2025 if let Some(err) = proto::json::Error::parse(&res) {
2026 match err.typ.as_str() {
2027 "InternalServerException" => {
2028 return RusotoError::Service(GetExternalModelsError::InternalServer(err.msg))
2029 }
2030 "ResourceNotFoundException" => {
2031 return RusotoError::Service(GetExternalModelsError::ResourceNotFound(err.msg))
2032 }
2033 "ThrottlingException" => {
2034 return RusotoError::Service(GetExternalModelsError::Throttling(err.msg))
2035 }
2036 "ValidationException" => return RusotoError::Validation(err.msg),
2037 _ => {}
2038 }
2039 }
2040 RusotoError::Unknown(res)
2041 }
2042}
2043impl fmt::Display for GetExternalModelsError {
2044 #[allow(unused_variables)]
2045 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2046 match *self {
2047 GetExternalModelsError::InternalServer(ref cause) => write!(f, "{}", cause),
2048 GetExternalModelsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2049 GetExternalModelsError::Throttling(ref cause) => write!(f, "{}", cause),
2050 }
2051 }
2052}
2053impl Error for GetExternalModelsError {}
2054#[derive(Debug, PartialEq)]
2056pub enum GetModelVersionError {
2057 InternalServer(String),
2059 ResourceNotFound(String),
2061 Throttling(String),
2063}
2064
2065impl GetModelVersionError {
2066 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetModelVersionError> {
2067 if let Some(err) = proto::json::Error::parse(&res) {
2068 match err.typ.as_str() {
2069 "InternalServerException" => {
2070 return RusotoError::Service(GetModelVersionError::InternalServer(err.msg))
2071 }
2072 "ResourceNotFoundException" => {
2073 return RusotoError::Service(GetModelVersionError::ResourceNotFound(err.msg))
2074 }
2075 "ThrottlingException" => {
2076 return RusotoError::Service(GetModelVersionError::Throttling(err.msg))
2077 }
2078 "ValidationException" => return RusotoError::Validation(err.msg),
2079 _ => {}
2080 }
2081 }
2082 RusotoError::Unknown(res)
2083 }
2084}
2085impl fmt::Display for GetModelVersionError {
2086 #[allow(unused_variables)]
2087 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2088 match *self {
2089 GetModelVersionError::InternalServer(ref cause) => write!(f, "{}", cause),
2090 GetModelVersionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2091 GetModelVersionError::Throttling(ref cause) => write!(f, "{}", cause),
2092 }
2093 }
2094}
2095impl Error for GetModelVersionError {}
2096#[derive(Debug, PartialEq)]
2098pub enum GetModelsError {
2099 InternalServer(String),
2101 ResourceNotFound(String),
2103 Throttling(String),
2105}
2106
2107impl GetModelsError {
2108 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetModelsError> {
2109 if let Some(err) = proto::json::Error::parse(&res) {
2110 match err.typ.as_str() {
2111 "InternalServerException" => {
2112 return RusotoError::Service(GetModelsError::InternalServer(err.msg))
2113 }
2114 "ResourceNotFoundException" => {
2115 return RusotoError::Service(GetModelsError::ResourceNotFound(err.msg))
2116 }
2117 "ThrottlingException" => {
2118 return RusotoError::Service(GetModelsError::Throttling(err.msg))
2119 }
2120 "ValidationException" => return RusotoError::Validation(err.msg),
2121 _ => {}
2122 }
2123 }
2124 RusotoError::Unknown(res)
2125 }
2126}
2127impl fmt::Display for GetModelsError {
2128 #[allow(unused_variables)]
2129 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2130 match *self {
2131 GetModelsError::InternalServer(ref cause) => write!(f, "{}", cause),
2132 GetModelsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2133 GetModelsError::Throttling(ref cause) => write!(f, "{}", cause),
2134 }
2135 }
2136}
2137impl Error for GetModelsError {}
2138#[derive(Debug, PartialEq)]
2140pub enum GetOutcomesError {
2141 InternalServer(String),
2143 ResourceNotFound(String),
2145 Throttling(String),
2147}
2148
2149impl GetOutcomesError {
2150 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetOutcomesError> {
2151 if let Some(err) = proto::json::Error::parse(&res) {
2152 match err.typ.as_str() {
2153 "InternalServerException" => {
2154 return RusotoError::Service(GetOutcomesError::InternalServer(err.msg))
2155 }
2156 "ResourceNotFoundException" => {
2157 return RusotoError::Service(GetOutcomesError::ResourceNotFound(err.msg))
2158 }
2159 "ThrottlingException" => {
2160 return RusotoError::Service(GetOutcomesError::Throttling(err.msg))
2161 }
2162 "ValidationException" => return RusotoError::Validation(err.msg),
2163 _ => {}
2164 }
2165 }
2166 RusotoError::Unknown(res)
2167 }
2168}
2169impl fmt::Display for GetOutcomesError {
2170 #[allow(unused_variables)]
2171 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2172 match *self {
2173 GetOutcomesError::InternalServer(ref cause) => write!(f, "{}", cause),
2174 GetOutcomesError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2175 GetOutcomesError::Throttling(ref cause) => write!(f, "{}", cause),
2176 }
2177 }
2178}
2179impl Error for GetOutcomesError {}
2180#[derive(Debug, PartialEq)]
2182pub enum GetPredictionError {
2183 InternalServer(String),
2185 ResourceNotFound(String),
2187 Throttling(String),
2189}
2190
2191impl GetPredictionError {
2192 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPredictionError> {
2193 if let Some(err) = proto::json::Error::parse(&res) {
2194 match err.typ.as_str() {
2195 "InternalServerException" => {
2196 return RusotoError::Service(GetPredictionError::InternalServer(err.msg))
2197 }
2198 "ResourceNotFoundException" => {
2199 return RusotoError::Service(GetPredictionError::ResourceNotFound(err.msg))
2200 }
2201 "ThrottlingException" => {
2202 return RusotoError::Service(GetPredictionError::Throttling(err.msg))
2203 }
2204 "ValidationException" => return RusotoError::Validation(err.msg),
2205 _ => {}
2206 }
2207 }
2208 RusotoError::Unknown(res)
2209 }
2210}
2211impl fmt::Display for GetPredictionError {
2212 #[allow(unused_variables)]
2213 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2214 match *self {
2215 GetPredictionError::InternalServer(ref cause) => write!(f, "{}", cause),
2216 GetPredictionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2217 GetPredictionError::Throttling(ref cause) => write!(f, "{}", cause),
2218 }
2219 }
2220}
2221impl Error for GetPredictionError {}
2222#[derive(Debug, PartialEq)]
2224pub enum GetRulesError {
2225 InternalServer(String),
2227 ResourceNotFound(String),
2229 Throttling(String),
2231}
2232
2233impl GetRulesError {
2234 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRulesError> {
2235 if let Some(err) = proto::json::Error::parse(&res) {
2236 match err.typ.as_str() {
2237 "InternalServerException" => {
2238 return RusotoError::Service(GetRulesError::InternalServer(err.msg))
2239 }
2240 "ResourceNotFoundException" => {
2241 return RusotoError::Service(GetRulesError::ResourceNotFound(err.msg))
2242 }
2243 "ThrottlingException" => {
2244 return RusotoError::Service(GetRulesError::Throttling(err.msg))
2245 }
2246 "ValidationException" => return RusotoError::Validation(err.msg),
2247 _ => {}
2248 }
2249 }
2250 RusotoError::Unknown(res)
2251 }
2252}
2253impl fmt::Display for GetRulesError {
2254 #[allow(unused_variables)]
2255 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2256 match *self {
2257 GetRulesError::InternalServer(ref cause) => write!(f, "{}", cause),
2258 GetRulesError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2259 GetRulesError::Throttling(ref cause) => write!(f, "{}", cause),
2260 }
2261 }
2262}
2263impl Error for GetRulesError {}
2264#[derive(Debug, PartialEq)]
2266pub enum GetVariablesError {
2267 InternalServer(String),
2269 ResourceNotFound(String),
2271 Throttling(String),
2273}
2274
2275impl GetVariablesError {
2276 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetVariablesError> {
2277 if let Some(err) = proto::json::Error::parse(&res) {
2278 match err.typ.as_str() {
2279 "InternalServerException" => {
2280 return RusotoError::Service(GetVariablesError::InternalServer(err.msg))
2281 }
2282 "ResourceNotFoundException" => {
2283 return RusotoError::Service(GetVariablesError::ResourceNotFound(err.msg))
2284 }
2285 "ThrottlingException" => {
2286 return RusotoError::Service(GetVariablesError::Throttling(err.msg))
2287 }
2288 "ValidationException" => return RusotoError::Validation(err.msg),
2289 _ => {}
2290 }
2291 }
2292 RusotoError::Unknown(res)
2293 }
2294}
2295impl fmt::Display for GetVariablesError {
2296 #[allow(unused_variables)]
2297 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2298 match *self {
2299 GetVariablesError::InternalServer(ref cause) => write!(f, "{}", cause),
2300 GetVariablesError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2301 GetVariablesError::Throttling(ref cause) => write!(f, "{}", cause),
2302 }
2303 }
2304}
2305impl Error for GetVariablesError {}
2306#[derive(Debug, PartialEq)]
2308pub enum PutDetectorError {
2309 InternalServer(String),
2311 Throttling(String),
2313}
2314
2315impl PutDetectorError {
2316 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutDetectorError> {
2317 if let Some(err) = proto::json::Error::parse(&res) {
2318 match err.typ.as_str() {
2319 "InternalServerException" => {
2320 return RusotoError::Service(PutDetectorError::InternalServer(err.msg))
2321 }
2322 "ThrottlingException" => {
2323 return RusotoError::Service(PutDetectorError::Throttling(err.msg))
2324 }
2325 "ValidationException" => return RusotoError::Validation(err.msg),
2326 _ => {}
2327 }
2328 }
2329 RusotoError::Unknown(res)
2330 }
2331}
2332impl fmt::Display for PutDetectorError {
2333 #[allow(unused_variables)]
2334 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2335 match *self {
2336 PutDetectorError::InternalServer(ref cause) => write!(f, "{}", cause),
2337 PutDetectorError::Throttling(ref cause) => write!(f, "{}", cause),
2338 }
2339 }
2340}
2341impl Error for PutDetectorError {}
2342#[derive(Debug, PartialEq)]
2344pub enum PutExternalModelError {
2345 InternalServer(String),
2347 Throttling(String),
2349}
2350
2351impl PutExternalModelError {
2352 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutExternalModelError> {
2353 if let Some(err) = proto::json::Error::parse(&res) {
2354 match err.typ.as_str() {
2355 "InternalServerException" => {
2356 return RusotoError::Service(PutExternalModelError::InternalServer(err.msg))
2357 }
2358 "ThrottlingException" => {
2359 return RusotoError::Service(PutExternalModelError::Throttling(err.msg))
2360 }
2361 "ValidationException" => return RusotoError::Validation(err.msg),
2362 _ => {}
2363 }
2364 }
2365 RusotoError::Unknown(res)
2366 }
2367}
2368impl fmt::Display for PutExternalModelError {
2369 #[allow(unused_variables)]
2370 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2371 match *self {
2372 PutExternalModelError::InternalServer(ref cause) => write!(f, "{}", cause),
2373 PutExternalModelError::Throttling(ref cause) => write!(f, "{}", cause),
2374 }
2375 }
2376}
2377impl Error for PutExternalModelError {}
2378#[derive(Debug, PartialEq)]
2380pub enum PutModelError {
2381 InternalServer(String),
2383 Throttling(String),
2385}
2386
2387impl PutModelError {
2388 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutModelError> {
2389 if let Some(err) = proto::json::Error::parse(&res) {
2390 match err.typ.as_str() {
2391 "InternalServerException" => {
2392 return RusotoError::Service(PutModelError::InternalServer(err.msg))
2393 }
2394 "ThrottlingException" => {
2395 return RusotoError::Service(PutModelError::Throttling(err.msg))
2396 }
2397 "ValidationException" => return RusotoError::Validation(err.msg),
2398 _ => {}
2399 }
2400 }
2401 RusotoError::Unknown(res)
2402 }
2403}
2404impl fmt::Display for PutModelError {
2405 #[allow(unused_variables)]
2406 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2407 match *self {
2408 PutModelError::InternalServer(ref cause) => write!(f, "{}", cause),
2409 PutModelError::Throttling(ref cause) => write!(f, "{}", cause),
2410 }
2411 }
2412}
2413impl Error for PutModelError {}
2414#[derive(Debug, PartialEq)]
2416pub enum PutOutcomeError {
2417 InternalServer(String),
2419 Throttling(String),
2421}
2422
2423impl PutOutcomeError {
2424 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutOutcomeError> {
2425 if let Some(err) = proto::json::Error::parse(&res) {
2426 match err.typ.as_str() {
2427 "InternalServerException" => {
2428 return RusotoError::Service(PutOutcomeError::InternalServer(err.msg))
2429 }
2430 "ThrottlingException" => {
2431 return RusotoError::Service(PutOutcomeError::Throttling(err.msg))
2432 }
2433 "ValidationException" => return RusotoError::Validation(err.msg),
2434 _ => {}
2435 }
2436 }
2437 RusotoError::Unknown(res)
2438 }
2439}
2440impl fmt::Display for PutOutcomeError {
2441 #[allow(unused_variables)]
2442 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2443 match *self {
2444 PutOutcomeError::InternalServer(ref cause) => write!(f, "{}", cause),
2445 PutOutcomeError::Throttling(ref cause) => write!(f, "{}", cause),
2446 }
2447 }
2448}
2449impl Error for PutOutcomeError {}
2450#[derive(Debug, PartialEq)]
2452pub enum UpdateDetectorVersionError {
2453 InternalServer(String),
2455 ResourceNotFound(String),
2457 Throttling(String),
2459}
2460
2461impl UpdateDetectorVersionError {
2462 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDetectorVersionError> {
2463 if let Some(err) = proto::json::Error::parse(&res) {
2464 match err.typ.as_str() {
2465 "InternalServerException" => {
2466 return RusotoError::Service(UpdateDetectorVersionError::InternalServer(
2467 err.msg,
2468 ))
2469 }
2470 "ResourceNotFoundException" => {
2471 return RusotoError::Service(UpdateDetectorVersionError::ResourceNotFound(
2472 err.msg,
2473 ))
2474 }
2475 "ThrottlingException" => {
2476 return RusotoError::Service(UpdateDetectorVersionError::Throttling(err.msg))
2477 }
2478 "ValidationException" => return RusotoError::Validation(err.msg),
2479 _ => {}
2480 }
2481 }
2482 RusotoError::Unknown(res)
2483 }
2484}
2485impl fmt::Display for UpdateDetectorVersionError {
2486 #[allow(unused_variables)]
2487 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2488 match *self {
2489 UpdateDetectorVersionError::InternalServer(ref cause) => write!(f, "{}", cause),
2490 UpdateDetectorVersionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2491 UpdateDetectorVersionError::Throttling(ref cause) => write!(f, "{}", cause),
2492 }
2493 }
2494}
2495impl Error for UpdateDetectorVersionError {}
2496#[derive(Debug, PartialEq)]
2498pub enum UpdateDetectorVersionMetadataError {
2499 InternalServer(String),
2501 Throttling(String),
2503}
2504
2505impl UpdateDetectorVersionMetadataError {
2506 pub fn from_response(
2507 res: BufferedHttpResponse,
2508 ) -> RusotoError<UpdateDetectorVersionMetadataError> {
2509 if let Some(err) = proto::json::Error::parse(&res) {
2510 match err.typ.as_str() {
2511 "InternalServerException" => {
2512 return RusotoError::Service(
2513 UpdateDetectorVersionMetadataError::InternalServer(err.msg),
2514 )
2515 }
2516 "ThrottlingException" => {
2517 return RusotoError::Service(UpdateDetectorVersionMetadataError::Throttling(
2518 err.msg,
2519 ))
2520 }
2521 "ValidationException" => return RusotoError::Validation(err.msg),
2522 _ => {}
2523 }
2524 }
2525 RusotoError::Unknown(res)
2526 }
2527}
2528impl fmt::Display for UpdateDetectorVersionMetadataError {
2529 #[allow(unused_variables)]
2530 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2531 match *self {
2532 UpdateDetectorVersionMetadataError::InternalServer(ref cause) => write!(f, "{}", cause),
2533 UpdateDetectorVersionMetadataError::Throttling(ref cause) => write!(f, "{}", cause),
2534 }
2535 }
2536}
2537impl Error for UpdateDetectorVersionMetadataError {}
2538#[derive(Debug, PartialEq)]
2540pub enum UpdateDetectorVersionStatusError {
2541 InternalServer(String),
2543 ResourceNotFound(String),
2545 Throttling(String),
2547}
2548
2549impl UpdateDetectorVersionStatusError {
2550 pub fn from_response(
2551 res: BufferedHttpResponse,
2552 ) -> RusotoError<UpdateDetectorVersionStatusError> {
2553 if let Some(err) = proto::json::Error::parse(&res) {
2554 match err.typ.as_str() {
2555 "InternalServerException" => {
2556 return RusotoError::Service(UpdateDetectorVersionStatusError::InternalServer(
2557 err.msg,
2558 ))
2559 }
2560 "ResourceNotFoundException" => {
2561 return RusotoError::Service(
2562 UpdateDetectorVersionStatusError::ResourceNotFound(err.msg),
2563 )
2564 }
2565 "ThrottlingException" => {
2566 return RusotoError::Service(UpdateDetectorVersionStatusError::Throttling(
2567 err.msg,
2568 ))
2569 }
2570 "ValidationException" => return RusotoError::Validation(err.msg),
2571 _ => {}
2572 }
2573 }
2574 RusotoError::Unknown(res)
2575 }
2576}
2577impl fmt::Display for UpdateDetectorVersionStatusError {
2578 #[allow(unused_variables)]
2579 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2580 match *self {
2581 UpdateDetectorVersionStatusError::InternalServer(ref cause) => write!(f, "{}", cause),
2582 UpdateDetectorVersionStatusError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2583 UpdateDetectorVersionStatusError::Throttling(ref cause) => write!(f, "{}", cause),
2584 }
2585 }
2586}
2587impl Error for UpdateDetectorVersionStatusError {}
2588#[derive(Debug, PartialEq)]
2590pub enum UpdateModelVersionError {
2591 InternalServer(String),
2593 ResourceNotFound(String),
2595 Throttling(String),
2597}
2598
2599impl UpdateModelVersionError {
2600 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateModelVersionError> {
2601 if let Some(err) = proto::json::Error::parse(&res) {
2602 match err.typ.as_str() {
2603 "InternalServerException" => {
2604 return RusotoError::Service(UpdateModelVersionError::InternalServer(err.msg))
2605 }
2606 "ResourceNotFoundException" => {
2607 return RusotoError::Service(UpdateModelVersionError::ResourceNotFound(err.msg))
2608 }
2609 "ThrottlingException" => {
2610 return RusotoError::Service(UpdateModelVersionError::Throttling(err.msg))
2611 }
2612 "ValidationException" => return RusotoError::Validation(err.msg),
2613 _ => {}
2614 }
2615 }
2616 RusotoError::Unknown(res)
2617 }
2618}
2619impl fmt::Display for UpdateModelVersionError {
2620 #[allow(unused_variables)]
2621 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2622 match *self {
2623 UpdateModelVersionError::InternalServer(ref cause) => write!(f, "{}", cause),
2624 UpdateModelVersionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2625 UpdateModelVersionError::Throttling(ref cause) => write!(f, "{}", cause),
2626 }
2627 }
2628}
2629impl Error for UpdateModelVersionError {}
2630#[derive(Debug, PartialEq)]
2632pub enum UpdateRuleMetadataError {
2633 InternalServer(String),
2635 ResourceNotFound(String),
2637 Throttling(String),
2639}
2640
2641impl UpdateRuleMetadataError {
2642 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRuleMetadataError> {
2643 if let Some(err) = proto::json::Error::parse(&res) {
2644 match err.typ.as_str() {
2645 "InternalServerException" => {
2646 return RusotoError::Service(UpdateRuleMetadataError::InternalServer(err.msg))
2647 }
2648 "ResourceNotFoundException" => {
2649 return RusotoError::Service(UpdateRuleMetadataError::ResourceNotFound(err.msg))
2650 }
2651 "ThrottlingException" => {
2652 return RusotoError::Service(UpdateRuleMetadataError::Throttling(err.msg))
2653 }
2654 "ValidationException" => return RusotoError::Validation(err.msg),
2655 _ => {}
2656 }
2657 }
2658 RusotoError::Unknown(res)
2659 }
2660}
2661impl fmt::Display for UpdateRuleMetadataError {
2662 #[allow(unused_variables)]
2663 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2664 match *self {
2665 UpdateRuleMetadataError::InternalServer(ref cause) => write!(f, "{}", cause),
2666 UpdateRuleMetadataError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2667 UpdateRuleMetadataError::Throttling(ref cause) => write!(f, "{}", cause),
2668 }
2669 }
2670}
2671impl Error for UpdateRuleMetadataError {}
2672#[derive(Debug, PartialEq)]
2674pub enum UpdateRuleVersionError {
2675 InternalServer(String),
2677 ResourceNotFound(String),
2679 Throttling(String),
2681}
2682
2683impl UpdateRuleVersionError {
2684 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRuleVersionError> {
2685 if let Some(err) = proto::json::Error::parse(&res) {
2686 match err.typ.as_str() {
2687 "InternalServerException" => {
2688 return RusotoError::Service(UpdateRuleVersionError::InternalServer(err.msg))
2689 }
2690 "ResourceNotFoundException" => {
2691 return RusotoError::Service(UpdateRuleVersionError::ResourceNotFound(err.msg))
2692 }
2693 "ThrottlingException" => {
2694 return RusotoError::Service(UpdateRuleVersionError::Throttling(err.msg))
2695 }
2696 "ValidationException" => return RusotoError::Validation(err.msg),
2697 _ => {}
2698 }
2699 }
2700 RusotoError::Unknown(res)
2701 }
2702}
2703impl fmt::Display for UpdateRuleVersionError {
2704 #[allow(unused_variables)]
2705 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2706 match *self {
2707 UpdateRuleVersionError::InternalServer(ref cause) => write!(f, "{}", cause),
2708 UpdateRuleVersionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2709 UpdateRuleVersionError::Throttling(ref cause) => write!(f, "{}", cause),
2710 }
2711 }
2712}
2713impl Error for UpdateRuleVersionError {}
2714#[derive(Debug, PartialEq)]
2716pub enum UpdateVariableError {
2717 InternalServer(String),
2719 ResourceNotFound(String),
2721 Throttling(String),
2723}
2724
2725impl UpdateVariableError {
2726 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateVariableError> {
2727 if let Some(err) = proto::json::Error::parse(&res) {
2728 match err.typ.as_str() {
2729 "InternalServerException" => {
2730 return RusotoError::Service(UpdateVariableError::InternalServer(err.msg))
2731 }
2732 "ResourceNotFoundException" => {
2733 return RusotoError::Service(UpdateVariableError::ResourceNotFound(err.msg))
2734 }
2735 "ThrottlingException" => {
2736 return RusotoError::Service(UpdateVariableError::Throttling(err.msg))
2737 }
2738 "ValidationException" => return RusotoError::Validation(err.msg),
2739 _ => {}
2740 }
2741 }
2742 RusotoError::Unknown(res)
2743 }
2744}
2745impl fmt::Display for UpdateVariableError {
2746 #[allow(unused_variables)]
2747 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2748 match *self {
2749 UpdateVariableError::InternalServer(ref cause) => write!(f, "{}", cause),
2750 UpdateVariableError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2751 UpdateVariableError::Throttling(ref cause) => write!(f, "{}", cause),
2752 }
2753 }
2754}
2755impl Error for UpdateVariableError {}
2756#[async_trait]
2758pub trait FraudDetector {
2759 async fn batch_create_variable(
2761 &self,
2762 input: BatchCreateVariableRequest,
2763 ) -> Result<BatchCreateVariableResult, RusotoError<BatchCreateVariableError>>;
2764
2765 async fn batch_get_variable(
2767 &self,
2768 input: BatchGetVariableRequest,
2769 ) -> Result<BatchGetVariableResult, RusotoError<BatchGetVariableError>>;
2770
2771 async fn create_detector_version(
2773 &self,
2774 input: CreateDetectorVersionRequest,
2775 ) -> Result<CreateDetectorVersionResult, RusotoError<CreateDetectorVersionError>>;
2776
2777 async fn create_model_version(
2779 &self,
2780 input: CreateModelVersionRequest,
2781 ) -> Result<CreateModelVersionResult, RusotoError<CreateModelVersionError>>;
2782
2783 async fn create_rule(
2785 &self,
2786 input: CreateRuleRequest,
2787 ) -> Result<CreateRuleResult, RusotoError<CreateRuleError>>;
2788
2789 async fn create_variable(
2791 &self,
2792 input: CreateVariableRequest,
2793 ) -> Result<CreateVariableResult, RusotoError<CreateVariableError>>;
2794
2795 async fn delete_detector(
2797 &self,
2798 input: DeleteDetectorRequest,
2799 ) -> Result<DeleteDetectorResult, RusotoError<DeleteDetectorError>>;
2800
2801 async fn delete_detector_version(
2803 &self,
2804 input: DeleteDetectorVersionRequest,
2805 ) -> Result<DeleteDetectorVersionResult, RusotoError<DeleteDetectorVersionError>>;
2806
2807 async fn delete_event(
2809 &self,
2810 input: DeleteEventRequest,
2811 ) -> Result<DeleteEventResult, RusotoError<DeleteEventError>>;
2812
2813 async fn delete_rule_version(
2815 &self,
2816 input: DeleteRuleVersionRequest,
2817 ) -> Result<DeleteRuleVersionResult, RusotoError<DeleteRuleVersionError>>;
2818
2819 async fn describe_detector(
2821 &self,
2822 input: DescribeDetectorRequest,
2823 ) -> Result<DescribeDetectorResult, RusotoError<DescribeDetectorError>>;
2824
2825 async fn describe_model_versions(
2827 &self,
2828 input: DescribeModelVersionsRequest,
2829 ) -> Result<DescribeModelVersionsResult, RusotoError<DescribeModelVersionsError>>;
2830
2831 async fn get_detector_version(
2833 &self,
2834 input: GetDetectorVersionRequest,
2835 ) -> Result<GetDetectorVersionResult, RusotoError<GetDetectorVersionError>>;
2836
2837 async fn get_detectors(
2839 &self,
2840 input: GetDetectorsRequest,
2841 ) -> Result<GetDetectorsResult, RusotoError<GetDetectorsError>>;
2842
2843 async fn get_external_models(
2845 &self,
2846 input: GetExternalModelsRequest,
2847 ) -> Result<GetExternalModelsResult, RusotoError<GetExternalModelsError>>;
2848
2849 async fn get_model_version(
2851 &self,
2852 input: GetModelVersionRequest,
2853 ) -> Result<GetModelVersionResult, RusotoError<GetModelVersionError>>;
2854
2855 async fn get_models(
2857 &self,
2858 input: GetModelsRequest,
2859 ) -> Result<GetModelsResult, RusotoError<GetModelsError>>;
2860
2861 async fn get_outcomes(
2863 &self,
2864 input: GetOutcomesRequest,
2865 ) -> Result<GetOutcomesResult, RusotoError<GetOutcomesError>>;
2866
2867 async fn get_prediction(
2869 &self,
2870 input: GetPredictionRequest,
2871 ) -> Result<GetPredictionResult, RusotoError<GetPredictionError>>;
2872
2873 async fn get_rules(
2875 &self,
2876 input: GetRulesRequest,
2877 ) -> Result<GetRulesResult, RusotoError<GetRulesError>>;
2878
2879 async fn get_variables(
2881 &self,
2882 input: GetVariablesRequest,
2883 ) -> Result<GetVariablesResult, RusotoError<GetVariablesError>>;
2884
2885 async fn put_detector(
2887 &self,
2888 input: PutDetectorRequest,
2889 ) -> Result<PutDetectorResult, RusotoError<PutDetectorError>>;
2890
2891 async fn put_external_model(
2893 &self,
2894 input: PutExternalModelRequest,
2895 ) -> Result<PutExternalModelResult, RusotoError<PutExternalModelError>>;
2896
2897 async fn put_model(
2899 &self,
2900 input: PutModelRequest,
2901 ) -> Result<PutModelResult, RusotoError<PutModelError>>;
2902
2903 async fn put_outcome(
2905 &self,
2906 input: PutOutcomeRequest,
2907 ) -> Result<PutOutcomeResult, RusotoError<PutOutcomeError>>;
2908
2909 async fn update_detector_version(
2911 &self,
2912 input: UpdateDetectorVersionRequest,
2913 ) -> Result<UpdateDetectorVersionResult, RusotoError<UpdateDetectorVersionError>>;
2914
2915 async fn update_detector_version_metadata(
2917 &self,
2918 input: UpdateDetectorVersionMetadataRequest,
2919 ) -> Result<UpdateDetectorVersionMetadataResult, RusotoError<UpdateDetectorVersionMetadataError>>;
2920
2921 async fn update_detector_version_status(
2923 &self,
2924 input: UpdateDetectorVersionStatusRequest,
2925 ) -> Result<UpdateDetectorVersionStatusResult, RusotoError<UpdateDetectorVersionStatusError>>;
2926
2927 async fn update_model_version(
2929 &self,
2930 input: UpdateModelVersionRequest,
2931 ) -> Result<UpdateModelVersionResult, RusotoError<UpdateModelVersionError>>;
2932
2933 async fn update_rule_metadata(
2935 &self,
2936 input: UpdateRuleMetadataRequest,
2937 ) -> Result<UpdateRuleMetadataResult, RusotoError<UpdateRuleMetadataError>>;
2938
2939 async fn update_rule_version(
2941 &self,
2942 input: UpdateRuleVersionRequest,
2943 ) -> Result<UpdateRuleVersionResult, RusotoError<UpdateRuleVersionError>>;
2944
2945 async fn update_variable(
2947 &self,
2948 input: UpdateVariableRequest,
2949 ) -> Result<UpdateVariableResult, RusotoError<UpdateVariableError>>;
2950}
2951#[derive(Clone)]
2953pub struct FraudDetectorClient {
2954 client: Client,
2955 region: region::Region,
2956}
2957
2958impl FraudDetectorClient {
2959 pub fn new(region: region::Region) -> FraudDetectorClient {
2963 FraudDetectorClient {
2964 client: Client::shared(),
2965 region,
2966 }
2967 }
2968
2969 pub fn new_with<P, D>(
2970 request_dispatcher: D,
2971 credentials_provider: P,
2972 region: region::Region,
2973 ) -> FraudDetectorClient
2974 where
2975 P: ProvideAwsCredentials + Send + Sync + 'static,
2976 D: DispatchSignedRequest + Send + Sync + 'static,
2977 {
2978 FraudDetectorClient {
2979 client: Client::new_with(credentials_provider, request_dispatcher),
2980 region,
2981 }
2982 }
2983
2984 pub fn new_with_client(client: Client, region: region::Region) -> FraudDetectorClient {
2985 FraudDetectorClient { client, region }
2986 }
2987}
2988
2989#[async_trait]
2990impl FraudDetector for FraudDetectorClient {
2991 async fn batch_create_variable(
2993 &self,
2994 input: BatchCreateVariableRequest,
2995 ) -> Result<BatchCreateVariableResult, RusotoError<BatchCreateVariableError>> {
2996 let mut request = self.new_signed_request("POST", "/");
2997 request.add_header(
2998 "x-amz-target",
2999 "AWSHawksNestServiceFacade.BatchCreateVariable",
3000 );
3001 let encoded = serde_json::to_string(&input).unwrap();
3002 request.set_payload(Some(encoded));
3003
3004 let response = self
3005 .sign_and_dispatch(request, BatchCreateVariableError::from_response)
3006 .await?;
3007 let mut response = response;
3008 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3009 proto::json::ResponsePayload::new(&response).deserialize::<BatchCreateVariableResult, _>()
3010 }
3011
3012 async fn batch_get_variable(
3014 &self,
3015 input: BatchGetVariableRequest,
3016 ) -> Result<BatchGetVariableResult, RusotoError<BatchGetVariableError>> {
3017 let mut request = self.new_signed_request("POST", "/");
3018 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.BatchGetVariable");
3019 let encoded = serde_json::to_string(&input).unwrap();
3020 request.set_payload(Some(encoded));
3021
3022 let response = self
3023 .sign_and_dispatch(request, BatchGetVariableError::from_response)
3024 .await?;
3025 let mut response = response;
3026 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3027 proto::json::ResponsePayload::new(&response).deserialize::<BatchGetVariableResult, _>()
3028 }
3029
3030 async fn create_detector_version(
3032 &self,
3033 input: CreateDetectorVersionRequest,
3034 ) -> Result<CreateDetectorVersionResult, RusotoError<CreateDetectorVersionError>> {
3035 let mut request = self.new_signed_request("POST", "/");
3036 request.add_header(
3037 "x-amz-target",
3038 "AWSHawksNestServiceFacade.CreateDetectorVersion",
3039 );
3040 let encoded = serde_json::to_string(&input).unwrap();
3041 request.set_payload(Some(encoded));
3042
3043 let response = self
3044 .sign_and_dispatch(request, CreateDetectorVersionError::from_response)
3045 .await?;
3046 let mut response = response;
3047 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3048 proto::json::ResponsePayload::new(&response).deserialize::<CreateDetectorVersionResult, _>()
3049 }
3050
3051 async fn create_model_version(
3053 &self,
3054 input: CreateModelVersionRequest,
3055 ) -> Result<CreateModelVersionResult, RusotoError<CreateModelVersionError>> {
3056 let mut request = self.new_signed_request("POST", "/");
3057 request.add_header(
3058 "x-amz-target",
3059 "AWSHawksNestServiceFacade.CreateModelVersion",
3060 );
3061 let encoded = serde_json::to_string(&input).unwrap();
3062 request.set_payload(Some(encoded));
3063
3064 let response = self
3065 .sign_and_dispatch(request, CreateModelVersionError::from_response)
3066 .await?;
3067 let mut response = response;
3068 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3069 proto::json::ResponsePayload::new(&response).deserialize::<CreateModelVersionResult, _>()
3070 }
3071
3072 async fn create_rule(
3074 &self,
3075 input: CreateRuleRequest,
3076 ) -> Result<CreateRuleResult, RusotoError<CreateRuleError>> {
3077 let mut request = self.new_signed_request("POST", "/");
3078 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.CreateRule");
3079 let encoded = serde_json::to_string(&input).unwrap();
3080 request.set_payload(Some(encoded));
3081
3082 let response = self
3083 .sign_and_dispatch(request, CreateRuleError::from_response)
3084 .await?;
3085 let mut response = response;
3086 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3087 proto::json::ResponsePayload::new(&response).deserialize::<CreateRuleResult, _>()
3088 }
3089
3090 async fn create_variable(
3092 &self,
3093 input: CreateVariableRequest,
3094 ) -> Result<CreateVariableResult, RusotoError<CreateVariableError>> {
3095 let mut request = self.new_signed_request("POST", "/");
3096 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.CreateVariable");
3097 let encoded = serde_json::to_string(&input).unwrap();
3098 request.set_payload(Some(encoded));
3099
3100 let response = self
3101 .sign_and_dispatch(request, CreateVariableError::from_response)
3102 .await?;
3103 let mut response = response;
3104 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3105 proto::json::ResponsePayload::new(&response).deserialize::<CreateVariableResult, _>()
3106 }
3107
3108 async fn delete_detector(
3110 &self,
3111 input: DeleteDetectorRequest,
3112 ) -> Result<DeleteDetectorResult, RusotoError<DeleteDetectorError>> {
3113 let mut request = self.new_signed_request("POST", "/");
3114 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.DeleteDetector");
3115 let encoded = serde_json::to_string(&input).unwrap();
3116 request.set_payload(Some(encoded));
3117
3118 let response = self
3119 .sign_and_dispatch(request, DeleteDetectorError::from_response)
3120 .await?;
3121 let mut response = response;
3122 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3123 proto::json::ResponsePayload::new(&response).deserialize::<DeleteDetectorResult, _>()
3124 }
3125
3126 async fn delete_detector_version(
3128 &self,
3129 input: DeleteDetectorVersionRequest,
3130 ) -> Result<DeleteDetectorVersionResult, RusotoError<DeleteDetectorVersionError>> {
3131 let mut request = self.new_signed_request("POST", "/");
3132 request.add_header(
3133 "x-amz-target",
3134 "AWSHawksNestServiceFacade.DeleteDetectorVersion",
3135 );
3136 let encoded = serde_json::to_string(&input).unwrap();
3137 request.set_payload(Some(encoded));
3138
3139 let response = self
3140 .sign_and_dispatch(request, DeleteDetectorVersionError::from_response)
3141 .await?;
3142 let mut response = response;
3143 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3144 proto::json::ResponsePayload::new(&response).deserialize::<DeleteDetectorVersionResult, _>()
3145 }
3146
3147 async fn delete_event(
3149 &self,
3150 input: DeleteEventRequest,
3151 ) -> Result<DeleteEventResult, RusotoError<DeleteEventError>> {
3152 let mut request = self.new_signed_request("POST", "/");
3153 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.DeleteEvent");
3154 let encoded = serde_json::to_string(&input).unwrap();
3155 request.set_payload(Some(encoded));
3156
3157 let response = self
3158 .sign_and_dispatch(request, DeleteEventError::from_response)
3159 .await?;
3160 let mut response = response;
3161 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3162 proto::json::ResponsePayload::new(&response).deserialize::<DeleteEventResult, _>()
3163 }
3164
3165 async fn delete_rule_version(
3167 &self,
3168 input: DeleteRuleVersionRequest,
3169 ) -> Result<DeleteRuleVersionResult, RusotoError<DeleteRuleVersionError>> {
3170 let mut request = self.new_signed_request("POST", "/");
3171 request.add_header(
3172 "x-amz-target",
3173 "AWSHawksNestServiceFacade.DeleteRuleVersion",
3174 );
3175 let encoded = serde_json::to_string(&input).unwrap();
3176 request.set_payload(Some(encoded));
3177
3178 let response = self
3179 .sign_and_dispatch(request, DeleteRuleVersionError::from_response)
3180 .await?;
3181 let mut response = response;
3182 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3183 proto::json::ResponsePayload::new(&response).deserialize::<DeleteRuleVersionResult, _>()
3184 }
3185
3186 async fn describe_detector(
3188 &self,
3189 input: DescribeDetectorRequest,
3190 ) -> Result<DescribeDetectorResult, RusotoError<DescribeDetectorError>> {
3191 let mut request = self.new_signed_request("POST", "/");
3192 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.DescribeDetector");
3193 let encoded = serde_json::to_string(&input).unwrap();
3194 request.set_payload(Some(encoded));
3195
3196 let response = self
3197 .sign_and_dispatch(request, DescribeDetectorError::from_response)
3198 .await?;
3199 let mut response = response;
3200 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3201 proto::json::ResponsePayload::new(&response).deserialize::<DescribeDetectorResult, _>()
3202 }
3203
3204 async fn describe_model_versions(
3206 &self,
3207 input: DescribeModelVersionsRequest,
3208 ) -> Result<DescribeModelVersionsResult, RusotoError<DescribeModelVersionsError>> {
3209 let mut request = self.new_signed_request("POST", "/");
3210 request.add_header(
3211 "x-amz-target",
3212 "AWSHawksNestServiceFacade.DescribeModelVersions",
3213 );
3214 let encoded = serde_json::to_string(&input).unwrap();
3215 request.set_payload(Some(encoded));
3216
3217 let response = self
3218 .sign_and_dispatch(request, DescribeModelVersionsError::from_response)
3219 .await?;
3220 let mut response = response;
3221 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3222 proto::json::ResponsePayload::new(&response).deserialize::<DescribeModelVersionsResult, _>()
3223 }
3224
3225 async fn get_detector_version(
3227 &self,
3228 input: GetDetectorVersionRequest,
3229 ) -> Result<GetDetectorVersionResult, RusotoError<GetDetectorVersionError>> {
3230 let mut request = self.new_signed_request("POST", "/");
3231 request.add_header(
3232 "x-amz-target",
3233 "AWSHawksNestServiceFacade.GetDetectorVersion",
3234 );
3235 let encoded = serde_json::to_string(&input).unwrap();
3236 request.set_payload(Some(encoded));
3237
3238 let response = self
3239 .sign_and_dispatch(request, GetDetectorVersionError::from_response)
3240 .await?;
3241 let mut response = response;
3242 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3243 proto::json::ResponsePayload::new(&response).deserialize::<GetDetectorVersionResult, _>()
3244 }
3245
3246 async fn get_detectors(
3248 &self,
3249 input: GetDetectorsRequest,
3250 ) -> Result<GetDetectorsResult, RusotoError<GetDetectorsError>> {
3251 let mut request = self.new_signed_request("POST", "/");
3252 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.GetDetectors");
3253 let encoded = serde_json::to_string(&input).unwrap();
3254 request.set_payload(Some(encoded));
3255
3256 let response = self
3257 .sign_and_dispatch(request, GetDetectorsError::from_response)
3258 .await?;
3259 let mut response = response;
3260 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3261 proto::json::ResponsePayload::new(&response).deserialize::<GetDetectorsResult, _>()
3262 }
3263
3264 async fn get_external_models(
3266 &self,
3267 input: GetExternalModelsRequest,
3268 ) -> Result<GetExternalModelsResult, RusotoError<GetExternalModelsError>> {
3269 let mut request = self.new_signed_request("POST", "/");
3270 request.add_header(
3271 "x-amz-target",
3272 "AWSHawksNestServiceFacade.GetExternalModels",
3273 );
3274 let encoded = serde_json::to_string(&input).unwrap();
3275 request.set_payload(Some(encoded));
3276
3277 let response = self
3278 .sign_and_dispatch(request, GetExternalModelsError::from_response)
3279 .await?;
3280 let mut response = response;
3281 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3282 proto::json::ResponsePayload::new(&response).deserialize::<GetExternalModelsResult, _>()
3283 }
3284
3285 async fn get_model_version(
3287 &self,
3288 input: GetModelVersionRequest,
3289 ) -> Result<GetModelVersionResult, RusotoError<GetModelVersionError>> {
3290 let mut request = self.new_signed_request("POST", "/");
3291 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.GetModelVersion");
3292 let encoded = serde_json::to_string(&input).unwrap();
3293 request.set_payload(Some(encoded));
3294
3295 let response = self
3296 .sign_and_dispatch(request, GetModelVersionError::from_response)
3297 .await?;
3298 let mut response = response;
3299 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3300 proto::json::ResponsePayload::new(&response).deserialize::<GetModelVersionResult, _>()
3301 }
3302
3303 async fn get_models(
3305 &self,
3306 input: GetModelsRequest,
3307 ) -> Result<GetModelsResult, RusotoError<GetModelsError>> {
3308 let mut request = self.new_signed_request("POST", "/");
3309 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.GetModels");
3310 let encoded = serde_json::to_string(&input).unwrap();
3311 request.set_payload(Some(encoded));
3312
3313 let response = self
3314 .sign_and_dispatch(request, GetModelsError::from_response)
3315 .await?;
3316 let mut response = response;
3317 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3318 proto::json::ResponsePayload::new(&response).deserialize::<GetModelsResult, _>()
3319 }
3320
3321 async fn get_outcomes(
3323 &self,
3324 input: GetOutcomesRequest,
3325 ) -> Result<GetOutcomesResult, RusotoError<GetOutcomesError>> {
3326 let mut request = self.new_signed_request("POST", "/");
3327 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.GetOutcomes");
3328 let encoded = serde_json::to_string(&input).unwrap();
3329 request.set_payload(Some(encoded));
3330
3331 let response = self
3332 .sign_and_dispatch(request, GetOutcomesError::from_response)
3333 .await?;
3334 let mut response = response;
3335 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3336 proto::json::ResponsePayload::new(&response).deserialize::<GetOutcomesResult, _>()
3337 }
3338
3339 async fn get_prediction(
3341 &self,
3342 input: GetPredictionRequest,
3343 ) -> Result<GetPredictionResult, RusotoError<GetPredictionError>> {
3344 let mut request = self.new_signed_request("POST", "/");
3345 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.GetPrediction");
3346 let encoded = serde_json::to_string(&input).unwrap();
3347 request.set_payload(Some(encoded));
3348
3349 let response = self
3350 .sign_and_dispatch(request, GetPredictionError::from_response)
3351 .await?;
3352 let mut response = response;
3353 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3354 proto::json::ResponsePayload::new(&response).deserialize::<GetPredictionResult, _>()
3355 }
3356
3357 async fn get_rules(
3359 &self,
3360 input: GetRulesRequest,
3361 ) -> Result<GetRulesResult, RusotoError<GetRulesError>> {
3362 let mut request = self.new_signed_request("POST", "/");
3363 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.GetRules");
3364 let encoded = serde_json::to_string(&input).unwrap();
3365 request.set_payload(Some(encoded));
3366
3367 let response = self
3368 .sign_and_dispatch(request, GetRulesError::from_response)
3369 .await?;
3370 let mut response = response;
3371 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3372 proto::json::ResponsePayload::new(&response).deserialize::<GetRulesResult, _>()
3373 }
3374
3375 async fn get_variables(
3377 &self,
3378 input: GetVariablesRequest,
3379 ) -> Result<GetVariablesResult, RusotoError<GetVariablesError>> {
3380 let mut request = self.new_signed_request("POST", "/");
3381 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.GetVariables");
3382 let encoded = serde_json::to_string(&input).unwrap();
3383 request.set_payload(Some(encoded));
3384
3385 let response = self
3386 .sign_and_dispatch(request, GetVariablesError::from_response)
3387 .await?;
3388 let mut response = response;
3389 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3390 proto::json::ResponsePayload::new(&response).deserialize::<GetVariablesResult, _>()
3391 }
3392
3393 async fn put_detector(
3395 &self,
3396 input: PutDetectorRequest,
3397 ) -> Result<PutDetectorResult, RusotoError<PutDetectorError>> {
3398 let mut request = self.new_signed_request("POST", "/");
3399 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.PutDetector");
3400 let encoded = serde_json::to_string(&input).unwrap();
3401 request.set_payload(Some(encoded));
3402
3403 let response = self
3404 .sign_and_dispatch(request, PutDetectorError::from_response)
3405 .await?;
3406 let mut response = response;
3407 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3408 proto::json::ResponsePayload::new(&response).deserialize::<PutDetectorResult, _>()
3409 }
3410
3411 async fn put_external_model(
3413 &self,
3414 input: PutExternalModelRequest,
3415 ) -> Result<PutExternalModelResult, RusotoError<PutExternalModelError>> {
3416 let mut request = self.new_signed_request("POST", "/");
3417 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.PutExternalModel");
3418 let encoded = serde_json::to_string(&input).unwrap();
3419 request.set_payload(Some(encoded));
3420
3421 let response = self
3422 .sign_and_dispatch(request, PutExternalModelError::from_response)
3423 .await?;
3424 let mut response = response;
3425 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3426 proto::json::ResponsePayload::new(&response).deserialize::<PutExternalModelResult, _>()
3427 }
3428
3429 async fn put_model(
3431 &self,
3432 input: PutModelRequest,
3433 ) -> Result<PutModelResult, RusotoError<PutModelError>> {
3434 let mut request = self.new_signed_request("POST", "/");
3435 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.PutModel");
3436 let encoded = serde_json::to_string(&input).unwrap();
3437 request.set_payload(Some(encoded));
3438
3439 let response = self
3440 .sign_and_dispatch(request, PutModelError::from_response)
3441 .await?;
3442 let mut response = response;
3443 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3444 proto::json::ResponsePayload::new(&response).deserialize::<PutModelResult, _>()
3445 }
3446
3447 async fn put_outcome(
3449 &self,
3450 input: PutOutcomeRequest,
3451 ) -> Result<PutOutcomeResult, RusotoError<PutOutcomeError>> {
3452 let mut request = self.new_signed_request("POST", "/");
3453 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.PutOutcome");
3454 let encoded = serde_json::to_string(&input).unwrap();
3455 request.set_payload(Some(encoded));
3456
3457 let response = self
3458 .sign_and_dispatch(request, PutOutcomeError::from_response)
3459 .await?;
3460 let mut response = response;
3461 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3462 proto::json::ResponsePayload::new(&response).deserialize::<PutOutcomeResult, _>()
3463 }
3464
3465 async fn update_detector_version(
3467 &self,
3468 input: UpdateDetectorVersionRequest,
3469 ) -> Result<UpdateDetectorVersionResult, RusotoError<UpdateDetectorVersionError>> {
3470 let mut request = self.new_signed_request("POST", "/");
3471 request.add_header(
3472 "x-amz-target",
3473 "AWSHawksNestServiceFacade.UpdateDetectorVersion",
3474 );
3475 let encoded = serde_json::to_string(&input).unwrap();
3476 request.set_payload(Some(encoded));
3477
3478 let response = self
3479 .sign_and_dispatch(request, UpdateDetectorVersionError::from_response)
3480 .await?;
3481 let mut response = response;
3482 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3483 proto::json::ResponsePayload::new(&response).deserialize::<UpdateDetectorVersionResult, _>()
3484 }
3485
3486 async fn update_detector_version_metadata(
3488 &self,
3489 input: UpdateDetectorVersionMetadataRequest,
3490 ) -> Result<UpdateDetectorVersionMetadataResult, RusotoError<UpdateDetectorVersionMetadataError>>
3491 {
3492 let mut request = self.new_signed_request("POST", "/");
3493 request.add_header(
3494 "x-amz-target",
3495 "AWSHawksNestServiceFacade.UpdateDetectorVersionMetadata",
3496 );
3497 let encoded = serde_json::to_string(&input).unwrap();
3498 request.set_payload(Some(encoded));
3499
3500 let response = self
3501 .sign_and_dispatch(request, UpdateDetectorVersionMetadataError::from_response)
3502 .await?;
3503 let mut response = response;
3504 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3505 proto::json::ResponsePayload::new(&response)
3506 .deserialize::<UpdateDetectorVersionMetadataResult, _>()
3507 }
3508
3509 async fn update_detector_version_status(
3511 &self,
3512 input: UpdateDetectorVersionStatusRequest,
3513 ) -> Result<UpdateDetectorVersionStatusResult, RusotoError<UpdateDetectorVersionStatusError>>
3514 {
3515 let mut request = self.new_signed_request("POST", "/");
3516 request.add_header(
3517 "x-amz-target",
3518 "AWSHawksNestServiceFacade.UpdateDetectorVersionStatus",
3519 );
3520 let encoded = serde_json::to_string(&input).unwrap();
3521 request.set_payload(Some(encoded));
3522
3523 let response = self
3524 .sign_and_dispatch(request, UpdateDetectorVersionStatusError::from_response)
3525 .await?;
3526 let mut response = response;
3527 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3528 proto::json::ResponsePayload::new(&response)
3529 .deserialize::<UpdateDetectorVersionStatusResult, _>()
3530 }
3531
3532 async fn update_model_version(
3534 &self,
3535 input: UpdateModelVersionRequest,
3536 ) -> Result<UpdateModelVersionResult, RusotoError<UpdateModelVersionError>> {
3537 let mut request = self.new_signed_request("POST", "/");
3538 request.add_header(
3539 "x-amz-target",
3540 "AWSHawksNestServiceFacade.UpdateModelVersion",
3541 );
3542 let encoded = serde_json::to_string(&input).unwrap();
3543 request.set_payload(Some(encoded));
3544
3545 let response = self
3546 .sign_and_dispatch(request, UpdateModelVersionError::from_response)
3547 .await?;
3548 let mut response = response;
3549 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3550 proto::json::ResponsePayload::new(&response).deserialize::<UpdateModelVersionResult, _>()
3551 }
3552
3553 async fn update_rule_metadata(
3555 &self,
3556 input: UpdateRuleMetadataRequest,
3557 ) -> Result<UpdateRuleMetadataResult, RusotoError<UpdateRuleMetadataError>> {
3558 let mut request = self.new_signed_request("POST", "/");
3559 request.add_header(
3560 "x-amz-target",
3561 "AWSHawksNestServiceFacade.UpdateRuleMetadata",
3562 );
3563 let encoded = serde_json::to_string(&input).unwrap();
3564 request.set_payload(Some(encoded));
3565
3566 let response = self
3567 .sign_and_dispatch(request, UpdateRuleMetadataError::from_response)
3568 .await?;
3569 let mut response = response;
3570 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3571 proto::json::ResponsePayload::new(&response).deserialize::<UpdateRuleMetadataResult, _>()
3572 }
3573
3574 async fn update_rule_version(
3576 &self,
3577 input: UpdateRuleVersionRequest,
3578 ) -> Result<UpdateRuleVersionResult, RusotoError<UpdateRuleVersionError>> {
3579 let mut request = self.new_signed_request("POST", "/");
3580 request.add_header(
3581 "x-amz-target",
3582 "AWSHawksNestServiceFacade.UpdateRuleVersion",
3583 );
3584 let encoded = serde_json::to_string(&input).unwrap();
3585 request.set_payload(Some(encoded));
3586
3587 let response = self
3588 .sign_and_dispatch(request, UpdateRuleVersionError::from_response)
3589 .await?;
3590 let mut response = response;
3591 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3592 proto::json::ResponsePayload::new(&response).deserialize::<UpdateRuleVersionResult, _>()
3593 }
3594
3595 async fn update_variable(
3597 &self,
3598 input: UpdateVariableRequest,
3599 ) -> Result<UpdateVariableResult, RusotoError<UpdateVariableError>> {
3600 let mut request = self.new_signed_request("POST", "/");
3601 request.add_header("x-amz-target", "AWSHawksNestServiceFacade.UpdateVariable");
3602 let encoded = serde_json::to_string(&input).unwrap();
3603 request.set_payload(Some(encoded));
3604
3605 let response = self
3606 .sign_and_dispatch(request, UpdateVariableError::from_response)
3607 .await?;
3608 let mut response = response;
3609 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3610 proto::json::ResponsePayload::new(&response).deserialize::<UpdateVariableResult, _>()
3611 }
3612}