1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package ses 4 5import ( 6 "bytes" 7 "context" 8 "encoding/xml" 9 "fmt" 10 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 11 awsxml "github.com/aws/aws-sdk-go-v2/aws/protocol/xml" 12 "github.com/aws/aws-sdk-go-v2/service/ses/types" 13 smithy "github.com/aws/smithy-go" 14 smithyxml "github.com/aws/smithy-go/encoding/xml" 15 smithyio "github.com/aws/smithy-go/io" 16 "github.com/aws/smithy-go/middleware" 17 "github.com/aws/smithy-go/ptr" 18 smithytime "github.com/aws/smithy-go/time" 19 smithyhttp "github.com/aws/smithy-go/transport/http" 20 "io" 21 "io/ioutil" 22 "strconv" 23 "strings" 24) 25 26type awsAwsquery_deserializeOpCloneReceiptRuleSet struct { 27} 28 29func (*awsAwsquery_deserializeOpCloneReceiptRuleSet) ID() string { 30 return "OperationDeserializer" 31} 32 33func (m *awsAwsquery_deserializeOpCloneReceiptRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 34 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 35) { 36 out, metadata, err = next.HandleDeserialize(ctx, in) 37 if err != nil { 38 return out, metadata, err 39 } 40 41 response, ok := out.RawResponse.(*smithyhttp.Response) 42 if !ok { 43 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 44 } 45 46 if response.StatusCode < 200 || response.StatusCode >= 300 { 47 return out, metadata, awsAwsquery_deserializeOpErrorCloneReceiptRuleSet(response, &metadata) 48 } 49 output := &CloneReceiptRuleSetOutput{} 50 out.Result = output 51 52 var buff [1024]byte 53 ringBuffer := smithyio.NewRingBuffer(buff[:]) 54 body := io.TeeReader(response.Body, ringBuffer) 55 rootDecoder := xml.NewDecoder(body) 56 t, err := smithyxml.FetchRootElement(rootDecoder) 57 if err == io.EOF { 58 return out, metadata, nil 59 } 60 if err != nil { 61 var snapshot bytes.Buffer 62 io.Copy(&snapshot, ringBuffer) 63 return out, metadata, &smithy.DeserializationError{ 64 Err: fmt.Errorf("failed to decode response body, %w", err), 65 Snapshot: snapshot.Bytes(), 66 } 67 } 68 69 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 70 t, err = decoder.GetElement("CloneReceiptRuleSetResult") 71 if err != nil { 72 var snapshot bytes.Buffer 73 io.Copy(&snapshot, ringBuffer) 74 err = &smithy.DeserializationError{ 75 Err: fmt.Errorf("failed to decode response body, %w", err), 76 Snapshot: snapshot.Bytes(), 77 } 78 return out, metadata, err 79 } 80 81 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 82 err = awsAwsquery_deserializeOpDocumentCloneReceiptRuleSetOutput(&output, decoder) 83 if err != nil { 84 var snapshot bytes.Buffer 85 io.Copy(&snapshot, ringBuffer) 86 err = &smithy.DeserializationError{ 87 Err: fmt.Errorf("failed to decode response body, %w", err), 88 Snapshot: snapshot.Bytes(), 89 } 90 return out, metadata, err 91 } 92 93 return out, metadata, err 94} 95 96func awsAwsquery_deserializeOpErrorCloneReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 97 var errorBuffer bytes.Buffer 98 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 99 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 100 } 101 errorBody := bytes.NewReader(errorBuffer.Bytes()) 102 103 errorCode := "UnknownError" 104 errorMessage := errorCode 105 106 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 107 if err != nil { 108 return err 109 } 110 if reqID := errorComponents.RequestID; len(reqID) != 0 { 111 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 112 } 113 if len(errorComponents.Code) != 0 { 114 errorCode = errorComponents.Code 115 } 116 if len(errorComponents.Message) != 0 { 117 errorMessage = errorComponents.Message 118 } 119 errorBody.Seek(0, io.SeekStart) 120 switch { 121 case strings.EqualFold("AlreadyExistsException", errorCode): 122 return awsAwsquery_deserializeErrorAlreadyExistsException(response, errorBody) 123 124 case strings.EqualFold("LimitExceededException", errorCode): 125 return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) 126 127 case strings.EqualFold("RuleSetDoesNotExistException", errorCode): 128 return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody) 129 130 default: 131 genericError := &smithy.GenericAPIError{ 132 Code: errorCode, 133 Message: errorMessage, 134 } 135 return genericError 136 137 } 138} 139 140type awsAwsquery_deserializeOpCreateConfigurationSet struct { 141} 142 143func (*awsAwsquery_deserializeOpCreateConfigurationSet) ID() string { 144 return "OperationDeserializer" 145} 146 147func (m *awsAwsquery_deserializeOpCreateConfigurationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 148 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 149) { 150 out, metadata, err = next.HandleDeserialize(ctx, in) 151 if err != nil { 152 return out, metadata, err 153 } 154 155 response, ok := out.RawResponse.(*smithyhttp.Response) 156 if !ok { 157 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 158 } 159 160 if response.StatusCode < 200 || response.StatusCode >= 300 { 161 return out, metadata, awsAwsquery_deserializeOpErrorCreateConfigurationSet(response, &metadata) 162 } 163 output := &CreateConfigurationSetOutput{} 164 out.Result = output 165 166 var buff [1024]byte 167 ringBuffer := smithyio.NewRingBuffer(buff[:]) 168 body := io.TeeReader(response.Body, ringBuffer) 169 rootDecoder := xml.NewDecoder(body) 170 t, err := smithyxml.FetchRootElement(rootDecoder) 171 if err == io.EOF { 172 return out, metadata, nil 173 } 174 if err != nil { 175 var snapshot bytes.Buffer 176 io.Copy(&snapshot, ringBuffer) 177 return out, metadata, &smithy.DeserializationError{ 178 Err: fmt.Errorf("failed to decode response body, %w", err), 179 Snapshot: snapshot.Bytes(), 180 } 181 } 182 183 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 184 t, err = decoder.GetElement("CreateConfigurationSetResult") 185 if err != nil { 186 var snapshot bytes.Buffer 187 io.Copy(&snapshot, ringBuffer) 188 err = &smithy.DeserializationError{ 189 Err: fmt.Errorf("failed to decode response body, %w", err), 190 Snapshot: snapshot.Bytes(), 191 } 192 return out, metadata, err 193 } 194 195 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 196 err = awsAwsquery_deserializeOpDocumentCreateConfigurationSetOutput(&output, decoder) 197 if err != nil { 198 var snapshot bytes.Buffer 199 io.Copy(&snapshot, ringBuffer) 200 err = &smithy.DeserializationError{ 201 Err: fmt.Errorf("failed to decode response body, %w", err), 202 Snapshot: snapshot.Bytes(), 203 } 204 return out, metadata, err 205 } 206 207 return out, metadata, err 208} 209 210func awsAwsquery_deserializeOpErrorCreateConfigurationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 211 var errorBuffer bytes.Buffer 212 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 213 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 214 } 215 errorBody := bytes.NewReader(errorBuffer.Bytes()) 216 217 errorCode := "UnknownError" 218 errorMessage := errorCode 219 220 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 221 if err != nil { 222 return err 223 } 224 if reqID := errorComponents.RequestID; len(reqID) != 0 { 225 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 226 } 227 if len(errorComponents.Code) != 0 { 228 errorCode = errorComponents.Code 229 } 230 if len(errorComponents.Message) != 0 { 231 errorMessage = errorComponents.Message 232 } 233 errorBody.Seek(0, io.SeekStart) 234 switch { 235 case strings.EqualFold("ConfigurationSetAlreadyExistsException", errorCode): 236 return awsAwsquery_deserializeErrorConfigurationSetAlreadyExistsException(response, errorBody) 237 238 case strings.EqualFold("InvalidConfigurationSetException", errorCode): 239 return awsAwsquery_deserializeErrorInvalidConfigurationSetException(response, errorBody) 240 241 case strings.EqualFold("LimitExceededException", errorCode): 242 return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) 243 244 default: 245 genericError := &smithy.GenericAPIError{ 246 Code: errorCode, 247 Message: errorMessage, 248 } 249 return genericError 250 251 } 252} 253 254type awsAwsquery_deserializeOpCreateConfigurationSetEventDestination struct { 255} 256 257func (*awsAwsquery_deserializeOpCreateConfigurationSetEventDestination) ID() string { 258 return "OperationDeserializer" 259} 260 261func (m *awsAwsquery_deserializeOpCreateConfigurationSetEventDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 262 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 263) { 264 out, metadata, err = next.HandleDeserialize(ctx, in) 265 if err != nil { 266 return out, metadata, err 267 } 268 269 response, ok := out.RawResponse.(*smithyhttp.Response) 270 if !ok { 271 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 272 } 273 274 if response.StatusCode < 200 || response.StatusCode >= 300 { 275 return out, metadata, awsAwsquery_deserializeOpErrorCreateConfigurationSetEventDestination(response, &metadata) 276 } 277 output := &CreateConfigurationSetEventDestinationOutput{} 278 out.Result = output 279 280 var buff [1024]byte 281 ringBuffer := smithyio.NewRingBuffer(buff[:]) 282 body := io.TeeReader(response.Body, ringBuffer) 283 rootDecoder := xml.NewDecoder(body) 284 t, err := smithyxml.FetchRootElement(rootDecoder) 285 if err == io.EOF { 286 return out, metadata, nil 287 } 288 if err != nil { 289 var snapshot bytes.Buffer 290 io.Copy(&snapshot, ringBuffer) 291 return out, metadata, &smithy.DeserializationError{ 292 Err: fmt.Errorf("failed to decode response body, %w", err), 293 Snapshot: snapshot.Bytes(), 294 } 295 } 296 297 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 298 t, err = decoder.GetElement("CreateConfigurationSetEventDestinationResult") 299 if err != nil { 300 var snapshot bytes.Buffer 301 io.Copy(&snapshot, ringBuffer) 302 err = &smithy.DeserializationError{ 303 Err: fmt.Errorf("failed to decode response body, %w", err), 304 Snapshot: snapshot.Bytes(), 305 } 306 return out, metadata, err 307 } 308 309 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 310 err = awsAwsquery_deserializeOpDocumentCreateConfigurationSetEventDestinationOutput(&output, decoder) 311 if err != nil { 312 var snapshot bytes.Buffer 313 io.Copy(&snapshot, ringBuffer) 314 err = &smithy.DeserializationError{ 315 Err: fmt.Errorf("failed to decode response body, %w", err), 316 Snapshot: snapshot.Bytes(), 317 } 318 return out, metadata, err 319 } 320 321 return out, metadata, err 322} 323 324func awsAwsquery_deserializeOpErrorCreateConfigurationSetEventDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { 325 var errorBuffer bytes.Buffer 326 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 327 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 328 } 329 errorBody := bytes.NewReader(errorBuffer.Bytes()) 330 331 errorCode := "UnknownError" 332 errorMessage := errorCode 333 334 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 335 if err != nil { 336 return err 337 } 338 if reqID := errorComponents.RequestID; len(reqID) != 0 { 339 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 340 } 341 if len(errorComponents.Code) != 0 { 342 errorCode = errorComponents.Code 343 } 344 if len(errorComponents.Message) != 0 { 345 errorMessage = errorComponents.Message 346 } 347 errorBody.Seek(0, io.SeekStart) 348 switch { 349 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 350 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 351 352 case strings.EqualFold("EventDestinationAlreadyExistsException", errorCode): 353 return awsAwsquery_deserializeErrorEventDestinationAlreadyExistsException(response, errorBody) 354 355 case strings.EqualFold("InvalidCloudWatchDestinationException", errorCode): 356 return awsAwsquery_deserializeErrorInvalidCloudWatchDestinationException(response, errorBody) 357 358 case strings.EqualFold("InvalidFirehoseDestinationException", errorCode): 359 return awsAwsquery_deserializeErrorInvalidFirehoseDestinationException(response, errorBody) 360 361 case strings.EqualFold("InvalidSNSDestinationException", errorCode): 362 return awsAwsquery_deserializeErrorInvalidSNSDestinationException(response, errorBody) 363 364 case strings.EqualFold("LimitExceededException", errorCode): 365 return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) 366 367 default: 368 genericError := &smithy.GenericAPIError{ 369 Code: errorCode, 370 Message: errorMessage, 371 } 372 return genericError 373 374 } 375} 376 377type awsAwsquery_deserializeOpCreateConfigurationSetTrackingOptions struct { 378} 379 380func (*awsAwsquery_deserializeOpCreateConfigurationSetTrackingOptions) ID() string { 381 return "OperationDeserializer" 382} 383 384func (m *awsAwsquery_deserializeOpCreateConfigurationSetTrackingOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 385 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 386) { 387 out, metadata, err = next.HandleDeserialize(ctx, in) 388 if err != nil { 389 return out, metadata, err 390 } 391 392 response, ok := out.RawResponse.(*smithyhttp.Response) 393 if !ok { 394 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 395 } 396 397 if response.StatusCode < 200 || response.StatusCode >= 300 { 398 return out, metadata, awsAwsquery_deserializeOpErrorCreateConfigurationSetTrackingOptions(response, &metadata) 399 } 400 output := &CreateConfigurationSetTrackingOptionsOutput{} 401 out.Result = output 402 403 var buff [1024]byte 404 ringBuffer := smithyio.NewRingBuffer(buff[:]) 405 body := io.TeeReader(response.Body, ringBuffer) 406 rootDecoder := xml.NewDecoder(body) 407 t, err := smithyxml.FetchRootElement(rootDecoder) 408 if err == io.EOF { 409 return out, metadata, nil 410 } 411 if err != nil { 412 var snapshot bytes.Buffer 413 io.Copy(&snapshot, ringBuffer) 414 return out, metadata, &smithy.DeserializationError{ 415 Err: fmt.Errorf("failed to decode response body, %w", err), 416 Snapshot: snapshot.Bytes(), 417 } 418 } 419 420 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 421 t, err = decoder.GetElement("CreateConfigurationSetTrackingOptionsResult") 422 if err != nil { 423 var snapshot bytes.Buffer 424 io.Copy(&snapshot, ringBuffer) 425 err = &smithy.DeserializationError{ 426 Err: fmt.Errorf("failed to decode response body, %w", err), 427 Snapshot: snapshot.Bytes(), 428 } 429 return out, metadata, err 430 } 431 432 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 433 err = awsAwsquery_deserializeOpDocumentCreateConfigurationSetTrackingOptionsOutput(&output, decoder) 434 if err != nil { 435 var snapshot bytes.Buffer 436 io.Copy(&snapshot, ringBuffer) 437 err = &smithy.DeserializationError{ 438 Err: fmt.Errorf("failed to decode response body, %w", err), 439 Snapshot: snapshot.Bytes(), 440 } 441 return out, metadata, err 442 } 443 444 return out, metadata, err 445} 446 447func awsAwsquery_deserializeOpErrorCreateConfigurationSetTrackingOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { 448 var errorBuffer bytes.Buffer 449 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 450 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 451 } 452 errorBody := bytes.NewReader(errorBuffer.Bytes()) 453 454 errorCode := "UnknownError" 455 errorMessage := errorCode 456 457 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 458 if err != nil { 459 return err 460 } 461 if reqID := errorComponents.RequestID; len(reqID) != 0 { 462 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 463 } 464 if len(errorComponents.Code) != 0 { 465 errorCode = errorComponents.Code 466 } 467 if len(errorComponents.Message) != 0 { 468 errorMessage = errorComponents.Message 469 } 470 errorBody.Seek(0, io.SeekStart) 471 switch { 472 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 473 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 474 475 case strings.EqualFold("InvalidTrackingOptionsException", errorCode): 476 return awsAwsquery_deserializeErrorInvalidTrackingOptionsException(response, errorBody) 477 478 case strings.EqualFold("TrackingOptionsAlreadyExistsException", errorCode): 479 return awsAwsquery_deserializeErrorTrackingOptionsAlreadyExistsException(response, errorBody) 480 481 default: 482 genericError := &smithy.GenericAPIError{ 483 Code: errorCode, 484 Message: errorMessage, 485 } 486 return genericError 487 488 } 489} 490 491type awsAwsquery_deserializeOpCreateCustomVerificationEmailTemplate struct { 492} 493 494func (*awsAwsquery_deserializeOpCreateCustomVerificationEmailTemplate) ID() string { 495 return "OperationDeserializer" 496} 497 498func (m *awsAwsquery_deserializeOpCreateCustomVerificationEmailTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 499 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 500) { 501 out, metadata, err = next.HandleDeserialize(ctx, in) 502 if err != nil { 503 return out, metadata, err 504 } 505 506 response, ok := out.RawResponse.(*smithyhttp.Response) 507 if !ok { 508 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 509 } 510 511 if response.StatusCode < 200 || response.StatusCode >= 300 { 512 return out, metadata, awsAwsquery_deserializeOpErrorCreateCustomVerificationEmailTemplate(response, &metadata) 513 } 514 output := &CreateCustomVerificationEmailTemplateOutput{} 515 out.Result = output 516 517 if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { 518 return out, metadata, &smithy.DeserializationError{ 519 Err: fmt.Errorf("failed to discard response body, %w", err), 520 } 521 } 522 523 return out, metadata, err 524} 525 526func awsAwsquery_deserializeOpErrorCreateCustomVerificationEmailTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { 527 var errorBuffer bytes.Buffer 528 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 529 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 530 } 531 errorBody := bytes.NewReader(errorBuffer.Bytes()) 532 533 errorCode := "UnknownError" 534 errorMessage := errorCode 535 536 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 537 if err != nil { 538 return err 539 } 540 if reqID := errorComponents.RequestID; len(reqID) != 0 { 541 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 542 } 543 if len(errorComponents.Code) != 0 { 544 errorCode = errorComponents.Code 545 } 546 if len(errorComponents.Message) != 0 { 547 errorMessage = errorComponents.Message 548 } 549 errorBody.Seek(0, io.SeekStart) 550 switch { 551 case strings.EqualFold("CustomVerificationEmailInvalidContentException", errorCode): 552 return awsAwsquery_deserializeErrorCustomVerificationEmailInvalidContentException(response, errorBody) 553 554 case strings.EqualFold("CustomVerificationEmailTemplateAlreadyExistsException", errorCode): 555 return awsAwsquery_deserializeErrorCustomVerificationEmailTemplateAlreadyExistsException(response, errorBody) 556 557 case strings.EqualFold("FromEmailAddressNotVerifiedException", errorCode): 558 return awsAwsquery_deserializeErrorFromEmailAddressNotVerifiedException(response, errorBody) 559 560 case strings.EqualFold("LimitExceededException", errorCode): 561 return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) 562 563 default: 564 genericError := &smithy.GenericAPIError{ 565 Code: errorCode, 566 Message: errorMessage, 567 } 568 return genericError 569 570 } 571} 572 573type awsAwsquery_deserializeOpCreateReceiptFilter struct { 574} 575 576func (*awsAwsquery_deserializeOpCreateReceiptFilter) ID() string { 577 return "OperationDeserializer" 578} 579 580func (m *awsAwsquery_deserializeOpCreateReceiptFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 581 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 582) { 583 out, metadata, err = next.HandleDeserialize(ctx, in) 584 if err != nil { 585 return out, metadata, err 586 } 587 588 response, ok := out.RawResponse.(*smithyhttp.Response) 589 if !ok { 590 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 591 } 592 593 if response.StatusCode < 200 || response.StatusCode >= 300 { 594 return out, metadata, awsAwsquery_deserializeOpErrorCreateReceiptFilter(response, &metadata) 595 } 596 output := &CreateReceiptFilterOutput{} 597 out.Result = output 598 599 var buff [1024]byte 600 ringBuffer := smithyio.NewRingBuffer(buff[:]) 601 body := io.TeeReader(response.Body, ringBuffer) 602 rootDecoder := xml.NewDecoder(body) 603 t, err := smithyxml.FetchRootElement(rootDecoder) 604 if err == io.EOF { 605 return out, metadata, nil 606 } 607 if err != nil { 608 var snapshot bytes.Buffer 609 io.Copy(&snapshot, ringBuffer) 610 return out, metadata, &smithy.DeserializationError{ 611 Err: fmt.Errorf("failed to decode response body, %w", err), 612 Snapshot: snapshot.Bytes(), 613 } 614 } 615 616 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 617 t, err = decoder.GetElement("CreateReceiptFilterResult") 618 if err != nil { 619 var snapshot bytes.Buffer 620 io.Copy(&snapshot, ringBuffer) 621 err = &smithy.DeserializationError{ 622 Err: fmt.Errorf("failed to decode response body, %w", err), 623 Snapshot: snapshot.Bytes(), 624 } 625 return out, metadata, err 626 } 627 628 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 629 err = awsAwsquery_deserializeOpDocumentCreateReceiptFilterOutput(&output, decoder) 630 if err != nil { 631 var snapshot bytes.Buffer 632 io.Copy(&snapshot, ringBuffer) 633 err = &smithy.DeserializationError{ 634 Err: fmt.Errorf("failed to decode response body, %w", err), 635 Snapshot: snapshot.Bytes(), 636 } 637 return out, metadata, err 638 } 639 640 return out, metadata, err 641} 642 643func awsAwsquery_deserializeOpErrorCreateReceiptFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { 644 var errorBuffer bytes.Buffer 645 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 646 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 647 } 648 errorBody := bytes.NewReader(errorBuffer.Bytes()) 649 650 errorCode := "UnknownError" 651 errorMessage := errorCode 652 653 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 654 if err != nil { 655 return err 656 } 657 if reqID := errorComponents.RequestID; len(reqID) != 0 { 658 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 659 } 660 if len(errorComponents.Code) != 0 { 661 errorCode = errorComponents.Code 662 } 663 if len(errorComponents.Message) != 0 { 664 errorMessage = errorComponents.Message 665 } 666 errorBody.Seek(0, io.SeekStart) 667 switch { 668 case strings.EqualFold("AlreadyExistsException", errorCode): 669 return awsAwsquery_deserializeErrorAlreadyExistsException(response, errorBody) 670 671 case strings.EqualFold("LimitExceededException", errorCode): 672 return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) 673 674 default: 675 genericError := &smithy.GenericAPIError{ 676 Code: errorCode, 677 Message: errorMessage, 678 } 679 return genericError 680 681 } 682} 683 684type awsAwsquery_deserializeOpCreateReceiptRule struct { 685} 686 687func (*awsAwsquery_deserializeOpCreateReceiptRule) ID() string { 688 return "OperationDeserializer" 689} 690 691func (m *awsAwsquery_deserializeOpCreateReceiptRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 692 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 693) { 694 out, metadata, err = next.HandleDeserialize(ctx, in) 695 if err != nil { 696 return out, metadata, err 697 } 698 699 response, ok := out.RawResponse.(*smithyhttp.Response) 700 if !ok { 701 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 702 } 703 704 if response.StatusCode < 200 || response.StatusCode >= 300 { 705 return out, metadata, awsAwsquery_deserializeOpErrorCreateReceiptRule(response, &metadata) 706 } 707 output := &CreateReceiptRuleOutput{} 708 out.Result = output 709 710 var buff [1024]byte 711 ringBuffer := smithyio.NewRingBuffer(buff[:]) 712 body := io.TeeReader(response.Body, ringBuffer) 713 rootDecoder := xml.NewDecoder(body) 714 t, err := smithyxml.FetchRootElement(rootDecoder) 715 if err == io.EOF { 716 return out, metadata, nil 717 } 718 if err != nil { 719 var snapshot bytes.Buffer 720 io.Copy(&snapshot, ringBuffer) 721 return out, metadata, &smithy.DeserializationError{ 722 Err: fmt.Errorf("failed to decode response body, %w", err), 723 Snapshot: snapshot.Bytes(), 724 } 725 } 726 727 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 728 t, err = decoder.GetElement("CreateReceiptRuleResult") 729 if err != nil { 730 var snapshot bytes.Buffer 731 io.Copy(&snapshot, ringBuffer) 732 err = &smithy.DeserializationError{ 733 Err: fmt.Errorf("failed to decode response body, %w", err), 734 Snapshot: snapshot.Bytes(), 735 } 736 return out, metadata, err 737 } 738 739 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 740 err = awsAwsquery_deserializeOpDocumentCreateReceiptRuleOutput(&output, decoder) 741 if err != nil { 742 var snapshot bytes.Buffer 743 io.Copy(&snapshot, ringBuffer) 744 err = &smithy.DeserializationError{ 745 Err: fmt.Errorf("failed to decode response body, %w", err), 746 Snapshot: snapshot.Bytes(), 747 } 748 return out, metadata, err 749 } 750 751 return out, metadata, err 752} 753 754func awsAwsquery_deserializeOpErrorCreateReceiptRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { 755 var errorBuffer bytes.Buffer 756 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 757 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 758 } 759 errorBody := bytes.NewReader(errorBuffer.Bytes()) 760 761 errorCode := "UnknownError" 762 errorMessage := errorCode 763 764 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 765 if err != nil { 766 return err 767 } 768 if reqID := errorComponents.RequestID; len(reqID) != 0 { 769 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 770 } 771 if len(errorComponents.Code) != 0 { 772 errorCode = errorComponents.Code 773 } 774 if len(errorComponents.Message) != 0 { 775 errorMessage = errorComponents.Message 776 } 777 errorBody.Seek(0, io.SeekStart) 778 switch { 779 case strings.EqualFold("AlreadyExistsException", errorCode): 780 return awsAwsquery_deserializeErrorAlreadyExistsException(response, errorBody) 781 782 case strings.EqualFold("InvalidLambdaFunctionException", errorCode): 783 return awsAwsquery_deserializeErrorInvalidLambdaFunctionException(response, errorBody) 784 785 case strings.EqualFold("InvalidS3ConfigurationException", errorCode): 786 return awsAwsquery_deserializeErrorInvalidS3ConfigurationException(response, errorBody) 787 788 case strings.EqualFold("InvalidSnsTopicException", errorCode): 789 return awsAwsquery_deserializeErrorInvalidSnsTopicException(response, errorBody) 790 791 case strings.EqualFold("LimitExceededException", errorCode): 792 return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) 793 794 case strings.EqualFold("RuleDoesNotExistException", errorCode): 795 return awsAwsquery_deserializeErrorRuleDoesNotExistException(response, errorBody) 796 797 case strings.EqualFold("RuleSetDoesNotExistException", errorCode): 798 return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody) 799 800 default: 801 genericError := &smithy.GenericAPIError{ 802 Code: errorCode, 803 Message: errorMessage, 804 } 805 return genericError 806 807 } 808} 809 810type awsAwsquery_deserializeOpCreateReceiptRuleSet struct { 811} 812 813func (*awsAwsquery_deserializeOpCreateReceiptRuleSet) ID() string { 814 return "OperationDeserializer" 815} 816 817func (m *awsAwsquery_deserializeOpCreateReceiptRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 818 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 819) { 820 out, metadata, err = next.HandleDeserialize(ctx, in) 821 if err != nil { 822 return out, metadata, err 823 } 824 825 response, ok := out.RawResponse.(*smithyhttp.Response) 826 if !ok { 827 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 828 } 829 830 if response.StatusCode < 200 || response.StatusCode >= 300 { 831 return out, metadata, awsAwsquery_deserializeOpErrorCreateReceiptRuleSet(response, &metadata) 832 } 833 output := &CreateReceiptRuleSetOutput{} 834 out.Result = output 835 836 var buff [1024]byte 837 ringBuffer := smithyio.NewRingBuffer(buff[:]) 838 body := io.TeeReader(response.Body, ringBuffer) 839 rootDecoder := xml.NewDecoder(body) 840 t, err := smithyxml.FetchRootElement(rootDecoder) 841 if err == io.EOF { 842 return out, metadata, nil 843 } 844 if err != nil { 845 var snapshot bytes.Buffer 846 io.Copy(&snapshot, ringBuffer) 847 return out, metadata, &smithy.DeserializationError{ 848 Err: fmt.Errorf("failed to decode response body, %w", err), 849 Snapshot: snapshot.Bytes(), 850 } 851 } 852 853 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 854 t, err = decoder.GetElement("CreateReceiptRuleSetResult") 855 if err != nil { 856 var snapshot bytes.Buffer 857 io.Copy(&snapshot, ringBuffer) 858 err = &smithy.DeserializationError{ 859 Err: fmt.Errorf("failed to decode response body, %w", err), 860 Snapshot: snapshot.Bytes(), 861 } 862 return out, metadata, err 863 } 864 865 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 866 err = awsAwsquery_deserializeOpDocumentCreateReceiptRuleSetOutput(&output, decoder) 867 if err != nil { 868 var snapshot bytes.Buffer 869 io.Copy(&snapshot, ringBuffer) 870 err = &smithy.DeserializationError{ 871 Err: fmt.Errorf("failed to decode response body, %w", err), 872 Snapshot: snapshot.Bytes(), 873 } 874 return out, metadata, err 875 } 876 877 return out, metadata, err 878} 879 880func awsAwsquery_deserializeOpErrorCreateReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 881 var errorBuffer bytes.Buffer 882 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 883 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 884 } 885 errorBody := bytes.NewReader(errorBuffer.Bytes()) 886 887 errorCode := "UnknownError" 888 errorMessage := errorCode 889 890 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 891 if err != nil { 892 return err 893 } 894 if reqID := errorComponents.RequestID; len(reqID) != 0 { 895 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 896 } 897 if len(errorComponents.Code) != 0 { 898 errorCode = errorComponents.Code 899 } 900 if len(errorComponents.Message) != 0 { 901 errorMessage = errorComponents.Message 902 } 903 errorBody.Seek(0, io.SeekStart) 904 switch { 905 case strings.EqualFold("AlreadyExistsException", errorCode): 906 return awsAwsquery_deserializeErrorAlreadyExistsException(response, errorBody) 907 908 case strings.EqualFold("LimitExceededException", errorCode): 909 return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) 910 911 default: 912 genericError := &smithy.GenericAPIError{ 913 Code: errorCode, 914 Message: errorMessage, 915 } 916 return genericError 917 918 } 919} 920 921type awsAwsquery_deserializeOpCreateTemplate struct { 922} 923 924func (*awsAwsquery_deserializeOpCreateTemplate) ID() string { 925 return "OperationDeserializer" 926} 927 928func (m *awsAwsquery_deserializeOpCreateTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 929 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 930) { 931 out, metadata, err = next.HandleDeserialize(ctx, in) 932 if err != nil { 933 return out, metadata, err 934 } 935 936 response, ok := out.RawResponse.(*smithyhttp.Response) 937 if !ok { 938 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 939 } 940 941 if response.StatusCode < 200 || response.StatusCode >= 300 { 942 return out, metadata, awsAwsquery_deserializeOpErrorCreateTemplate(response, &metadata) 943 } 944 output := &CreateTemplateOutput{} 945 out.Result = output 946 947 var buff [1024]byte 948 ringBuffer := smithyio.NewRingBuffer(buff[:]) 949 body := io.TeeReader(response.Body, ringBuffer) 950 rootDecoder := xml.NewDecoder(body) 951 t, err := smithyxml.FetchRootElement(rootDecoder) 952 if err == io.EOF { 953 return out, metadata, nil 954 } 955 if err != nil { 956 var snapshot bytes.Buffer 957 io.Copy(&snapshot, ringBuffer) 958 return out, metadata, &smithy.DeserializationError{ 959 Err: fmt.Errorf("failed to decode response body, %w", err), 960 Snapshot: snapshot.Bytes(), 961 } 962 } 963 964 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 965 t, err = decoder.GetElement("CreateTemplateResult") 966 if err != nil { 967 var snapshot bytes.Buffer 968 io.Copy(&snapshot, ringBuffer) 969 err = &smithy.DeserializationError{ 970 Err: fmt.Errorf("failed to decode response body, %w", err), 971 Snapshot: snapshot.Bytes(), 972 } 973 return out, metadata, err 974 } 975 976 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 977 err = awsAwsquery_deserializeOpDocumentCreateTemplateOutput(&output, decoder) 978 if err != nil { 979 var snapshot bytes.Buffer 980 io.Copy(&snapshot, ringBuffer) 981 err = &smithy.DeserializationError{ 982 Err: fmt.Errorf("failed to decode response body, %w", err), 983 Snapshot: snapshot.Bytes(), 984 } 985 return out, metadata, err 986 } 987 988 return out, metadata, err 989} 990 991func awsAwsquery_deserializeOpErrorCreateTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { 992 var errorBuffer bytes.Buffer 993 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 994 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 995 } 996 errorBody := bytes.NewReader(errorBuffer.Bytes()) 997 998 errorCode := "UnknownError" 999 errorMessage := errorCode 1000 1001 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1002 if err != nil { 1003 return err 1004 } 1005 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1006 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1007 } 1008 if len(errorComponents.Code) != 0 { 1009 errorCode = errorComponents.Code 1010 } 1011 if len(errorComponents.Message) != 0 { 1012 errorMessage = errorComponents.Message 1013 } 1014 errorBody.Seek(0, io.SeekStart) 1015 switch { 1016 case strings.EqualFold("AlreadyExistsException", errorCode): 1017 return awsAwsquery_deserializeErrorAlreadyExistsException(response, errorBody) 1018 1019 case strings.EqualFold("InvalidTemplateException", errorCode): 1020 return awsAwsquery_deserializeErrorInvalidTemplateException(response, errorBody) 1021 1022 case strings.EqualFold("LimitExceededException", errorCode): 1023 return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) 1024 1025 default: 1026 genericError := &smithy.GenericAPIError{ 1027 Code: errorCode, 1028 Message: errorMessage, 1029 } 1030 return genericError 1031 1032 } 1033} 1034 1035type awsAwsquery_deserializeOpDeleteConfigurationSet struct { 1036} 1037 1038func (*awsAwsquery_deserializeOpDeleteConfigurationSet) ID() string { 1039 return "OperationDeserializer" 1040} 1041 1042func (m *awsAwsquery_deserializeOpDeleteConfigurationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1043 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1044) { 1045 out, metadata, err = next.HandleDeserialize(ctx, in) 1046 if err != nil { 1047 return out, metadata, err 1048 } 1049 1050 response, ok := out.RawResponse.(*smithyhttp.Response) 1051 if !ok { 1052 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1053 } 1054 1055 if response.StatusCode < 200 || response.StatusCode >= 300 { 1056 return out, metadata, awsAwsquery_deserializeOpErrorDeleteConfigurationSet(response, &metadata) 1057 } 1058 output := &DeleteConfigurationSetOutput{} 1059 out.Result = output 1060 1061 var buff [1024]byte 1062 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1063 body := io.TeeReader(response.Body, ringBuffer) 1064 rootDecoder := xml.NewDecoder(body) 1065 t, err := smithyxml.FetchRootElement(rootDecoder) 1066 if err == io.EOF { 1067 return out, metadata, nil 1068 } 1069 if err != nil { 1070 var snapshot bytes.Buffer 1071 io.Copy(&snapshot, ringBuffer) 1072 return out, metadata, &smithy.DeserializationError{ 1073 Err: fmt.Errorf("failed to decode response body, %w", err), 1074 Snapshot: snapshot.Bytes(), 1075 } 1076 } 1077 1078 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1079 t, err = decoder.GetElement("DeleteConfigurationSetResult") 1080 if err != nil { 1081 var snapshot bytes.Buffer 1082 io.Copy(&snapshot, ringBuffer) 1083 err = &smithy.DeserializationError{ 1084 Err: fmt.Errorf("failed to decode response body, %w", err), 1085 Snapshot: snapshot.Bytes(), 1086 } 1087 return out, metadata, err 1088 } 1089 1090 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1091 err = awsAwsquery_deserializeOpDocumentDeleteConfigurationSetOutput(&output, decoder) 1092 if err != nil { 1093 var snapshot bytes.Buffer 1094 io.Copy(&snapshot, ringBuffer) 1095 err = &smithy.DeserializationError{ 1096 Err: fmt.Errorf("failed to decode response body, %w", err), 1097 Snapshot: snapshot.Bytes(), 1098 } 1099 return out, metadata, err 1100 } 1101 1102 return out, metadata, err 1103} 1104 1105func awsAwsquery_deserializeOpErrorDeleteConfigurationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1106 var errorBuffer bytes.Buffer 1107 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1108 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1109 } 1110 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1111 1112 errorCode := "UnknownError" 1113 errorMessage := errorCode 1114 1115 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1116 if err != nil { 1117 return err 1118 } 1119 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1120 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1121 } 1122 if len(errorComponents.Code) != 0 { 1123 errorCode = errorComponents.Code 1124 } 1125 if len(errorComponents.Message) != 0 { 1126 errorMessage = errorComponents.Message 1127 } 1128 errorBody.Seek(0, io.SeekStart) 1129 switch { 1130 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 1131 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 1132 1133 default: 1134 genericError := &smithy.GenericAPIError{ 1135 Code: errorCode, 1136 Message: errorMessage, 1137 } 1138 return genericError 1139 1140 } 1141} 1142 1143type awsAwsquery_deserializeOpDeleteConfigurationSetEventDestination struct { 1144} 1145 1146func (*awsAwsquery_deserializeOpDeleteConfigurationSetEventDestination) ID() string { 1147 return "OperationDeserializer" 1148} 1149 1150func (m *awsAwsquery_deserializeOpDeleteConfigurationSetEventDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1151 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1152) { 1153 out, metadata, err = next.HandleDeserialize(ctx, in) 1154 if err != nil { 1155 return out, metadata, err 1156 } 1157 1158 response, ok := out.RawResponse.(*smithyhttp.Response) 1159 if !ok { 1160 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1161 } 1162 1163 if response.StatusCode < 200 || response.StatusCode >= 300 { 1164 return out, metadata, awsAwsquery_deserializeOpErrorDeleteConfigurationSetEventDestination(response, &metadata) 1165 } 1166 output := &DeleteConfigurationSetEventDestinationOutput{} 1167 out.Result = output 1168 1169 var buff [1024]byte 1170 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1171 body := io.TeeReader(response.Body, ringBuffer) 1172 rootDecoder := xml.NewDecoder(body) 1173 t, err := smithyxml.FetchRootElement(rootDecoder) 1174 if err == io.EOF { 1175 return out, metadata, nil 1176 } 1177 if err != nil { 1178 var snapshot bytes.Buffer 1179 io.Copy(&snapshot, ringBuffer) 1180 return out, metadata, &smithy.DeserializationError{ 1181 Err: fmt.Errorf("failed to decode response body, %w", err), 1182 Snapshot: snapshot.Bytes(), 1183 } 1184 } 1185 1186 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1187 t, err = decoder.GetElement("DeleteConfigurationSetEventDestinationResult") 1188 if err != nil { 1189 var snapshot bytes.Buffer 1190 io.Copy(&snapshot, ringBuffer) 1191 err = &smithy.DeserializationError{ 1192 Err: fmt.Errorf("failed to decode response body, %w", err), 1193 Snapshot: snapshot.Bytes(), 1194 } 1195 return out, metadata, err 1196 } 1197 1198 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1199 err = awsAwsquery_deserializeOpDocumentDeleteConfigurationSetEventDestinationOutput(&output, decoder) 1200 if err != nil { 1201 var snapshot bytes.Buffer 1202 io.Copy(&snapshot, ringBuffer) 1203 err = &smithy.DeserializationError{ 1204 Err: fmt.Errorf("failed to decode response body, %w", err), 1205 Snapshot: snapshot.Bytes(), 1206 } 1207 return out, metadata, err 1208 } 1209 1210 return out, metadata, err 1211} 1212 1213func awsAwsquery_deserializeOpErrorDeleteConfigurationSetEventDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1214 var errorBuffer bytes.Buffer 1215 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1216 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1217 } 1218 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1219 1220 errorCode := "UnknownError" 1221 errorMessage := errorCode 1222 1223 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1224 if err != nil { 1225 return err 1226 } 1227 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1228 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1229 } 1230 if len(errorComponents.Code) != 0 { 1231 errorCode = errorComponents.Code 1232 } 1233 if len(errorComponents.Message) != 0 { 1234 errorMessage = errorComponents.Message 1235 } 1236 errorBody.Seek(0, io.SeekStart) 1237 switch { 1238 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 1239 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 1240 1241 case strings.EqualFold("EventDestinationDoesNotExistException", errorCode): 1242 return awsAwsquery_deserializeErrorEventDestinationDoesNotExistException(response, errorBody) 1243 1244 default: 1245 genericError := &smithy.GenericAPIError{ 1246 Code: errorCode, 1247 Message: errorMessage, 1248 } 1249 return genericError 1250 1251 } 1252} 1253 1254type awsAwsquery_deserializeOpDeleteConfigurationSetTrackingOptions struct { 1255} 1256 1257func (*awsAwsquery_deserializeOpDeleteConfigurationSetTrackingOptions) ID() string { 1258 return "OperationDeserializer" 1259} 1260 1261func (m *awsAwsquery_deserializeOpDeleteConfigurationSetTrackingOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1262 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1263) { 1264 out, metadata, err = next.HandleDeserialize(ctx, in) 1265 if err != nil { 1266 return out, metadata, err 1267 } 1268 1269 response, ok := out.RawResponse.(*smithyhttp.Response) 1270 if !ok { 1271 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1272 } 1273 1274 if response.StatusCode < 200 || response.StatusCode >= 300 { 1275 return out, metadata, awsAwsquery_deserializeOpErrorDeleteConfigurationSetTrackingOptions(response, &metadata) 1276 } 1277 output := &DeleteConfigurationSetTrackingOptionsOutput{} 1278 out.Result = output 1279 1280 var buff [1024]byte 1281 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1282 body := io.TeeReader(response.Body, ringBuffer) 1283 rootDecoder := xml.NewDecoder(body) 1284 t, err := smithyxml.FetchRootElement(rootDecoder) 1285 if err == io.EOF { 1286 return out, metadata, nil 1287 } 1288 if err != nil { 1289 var snapshot bytes.Buffer 1290 io.Copy(&snapshot, ringBuffer) 1291 return out, metadata, &smithy.DeserializationError{ 1292 Err: fmt.Errorf("failed to decode response body, %w", err), 1293 Snapshot: snapshot.Bytes(), 1294 } 1295 } 1296 1297 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1298 t, err = decoder.GetElement("DeleteConfigurationSetTrackingOptionsResult") 1299 if err != nil { 1300 var snapshot bytes.Buffer 1301 io.Copy(&snapshot, ringBuffer) 1302 err = &smithy.DeserializationError{ 1303 Err: fmt.Errorf("failed to decode response body, %w", err), 1304 Snapshot: snapshot.Bytes(), 1305 } 1306 return out, metadata, err 1307 } 1308 1309 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1310 err = awsAwsquery_deserializeOpDocumentDeleteConfigurationSetTrackingOptionsOutput(&output, decoder) 1311 if err != nil { 1312 var snapshot bytes.Buffer 1313 io.Copy(&snapshot, ringBuffer) 1314 err = &smithy.DeserializationError{ 1315 Err: fmt.Errorf("failed to decode response body, %w", err), 1316 Snapshot: snapshot.Bytes(), 1317 } 1318 return out, metadata, err 1319 } 1320 1321 return out, metadata, err 1322} 1323 1324func awsAwsquery_deserializeOpErrorDeleteConfigurationSetTrackingOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1325 var errorBuffer bytes.Buffer 1326 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1327 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1328 } 1329 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1330 1331 errorCode := "UnknownError" 1332 errorMessage := errorCode 1333 1334 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1335 if err != nil { 1336 return err 1337 } 1338 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1339 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1340 } 1341 if len(errorComponents.Code) != 0 { 1342 errorCode = errorComponents.Code 1343 } 1344 if len(errorComponents.Message) != 0 { 1345 errorMessage = errorComponents.Message 1346 } 1347 errorBody.Seek(0, io.SeekStart) 1348 switch { 1349 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 1350 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 1351 1352 case strings.EqualFold("TrackingOptionsDoesNotExistException", errorCode): 1353 return awsAwsquery_deserializeErrorTrackingOptionsDoesNotExistException(response, errorBody) 1354 1355 default: 1356 genericError := &smithy.GenericAPIError{ 1357 Code: errorCode, 1358 Message: errorMessage, 1359 } 1360 return genericError 1361 1362 } 1363} 1364 1365type awsAwsquery_deserializeOpDeleteCustomVerificationEmailTemplate struct { 1366} 1367 1368func (*awsAwsquery_deserializeOpDeleteCustomVerificationEmailTemplate) ID() string { 1369 return "OperationDeserializer" 1370} 1371 1372func (m *awsAwsquery_deserializeOpDeleteCustomVerificationEmailTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1373 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1374) { 1375 out, metadata, err = next.HandleDeserialize(ctx, in) 1376 if err != nil { 1377 return out, metadata, err 1378 } 1379 1380 response, ok := out.RawResponse.(*smithyhttp.Response) 1381 if !ok { 1382 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1383 } 1384 1385 if response.StatusCode < 200 || response.StatusCode >= 300 { 1386 return out, metadata, awsAwsquery_deserializeOpErrorDeleteCustomVerificationEmailTemplate(response, &metadata) 1387 } 1388 output := &DeleteCustomVerificationEmailTemplateOutput{} 1389 out.Result = output 1390 1391 if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { 1392 return out, metadata, &smithy.DeserializationError{ 1393 Err: fmt.Errorf("failed to discard response body, %w", err), 1394 } 1395 } 1396 1397 return out, metadata, err 1398} 1399 1400func awsAwsquery_deserializeOpErrorDeleteCustomVerificationEmailTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1401 var errorBuffer bytes.Buffer 1402 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1403 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1404 } 1405 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1406 1407 errorCode := "UnknownError" 1408 errorMessage := errorCode 1409 1410 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1411 if err != nil { 1412 return err 1413 } 1414 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1415 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1416 } 1417 if len(errorComponents.Code) != 0 { 1418 errorCode = errorComponents.Code 1419 } 1420 if len(errorComponents.Message) != 0 { 1421 errorMessage = errorComponents.Message 1422 } 1423 errorBody.Seek(0, io.SeekStart) 1424 switch { 1425 default: 1426 genericError := &smithy.GenericAPIError{ 1427 Code: errorCode, 1428 Message: errorMessage, 1429 } 1430 return genericError 1431 1432 } 1433} 1434 1435type awsAwsquery_deserializeOpDeleteIdentity struct { 1436} 1437 1438func (*awsAwsquery_deserializeOpDeleteIdentity) ID() string { 1439 return "OperationDeserializer" 1440} 1441 1442func (m *awsAwsquery_deserializeOpDeleteIdentity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1443 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1444) { 1445 out, metadata, err = next.HandleDeserialize(ctx, in) 1446 if err != nil { 1447 return out, metadata, err 1448 } 1449 1450 response, ok := out.RawResponse.(*smithyhttp.Response) 1451 if !ok { 1452 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1453 } 1454 1455 if response.StatusCode < 200 || response.StatusCode >= 300 { 1456 return out, metadata, awsAwsquery_deserializeOpErrorDeleteIdentity(response, &metadata) 1457 } 1458 output := &DeleteIdentityOutput{} 1459 out.Result = output 1460 1461 var buff [1024]byte 1462 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1463 body := io.TeeReader(response.Body, ringBuffer) 1464 rootDecoder := xml.NewDecoder(body) 1465 t, err := smithyxml.FetchRootElement(rootDecoder) 1466 if err == io.EOF { 1467 return out, metadata, nil 1468 } 1469 if err != nil { 1470 var snapshot bytes.Buffer 1471 io.Copy(&snapshot, ringBuffer) 1472 return out, metadata, &smithy.DeserializationError{ 1473 Err: fmt.Errorf("failed to decode response body, %w", err), 1474 Snapshot: snapshot.Bytes(), 1475 } 1476 } 1477 1478 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1479 t, err = decoder.GetElement("DeleteIdentityResult") 1480 if err != nil { 1481 var snapshot bytes.Buffer 1482 io.Copy(&snapshot, ringBuffer) 1483 err = &smithy.DeserializationError{ 1484 Err: fmt.Errorf("failed to decode response body, %w", err), 1485 Snapshot: snapshot.Bytes(), 1486 } 1487 return out, metadata, err 1488 } 1489 1490 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1491 err = awsAwsquery_deserializeOpDocumentDeleteIdentityOutput(&output, decoder) 1492 if err != nil { 1493 var snapshot bytes.Buffer 1494 io.Copy(&snapshot, ringBuffer) 1495 err = &smithy.DeserializationError{ 1496 Err: fmt.Errorf("failed to decode response body, %w", err), 1497 Snapshot: snapshot.Bytes(), 1498 } 1499 return out, metadata, err 1500 } 1501 1502 return out, metadata, err 1503} 1504 1505func awsAwsquery_deserializeOpErrorDeleteIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1506 var errorBuffer bytes.Buffer 1507 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1508 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1509 } 1510 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1511 1512 errorCode := "UnknownError" 1513 errorMessage := errorCode 1514 1515 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1516 if err != nil { 1517 return err 1518 } 1519 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1520 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1521 } 1522 if len(errorComponents.Code) != 0 { 1523 errorCode = errorComponents.Code 1524 } 1525 if len(errorComponents.Message) != 0 { 1526 errorMessage = errorComponents.Message 1527 } 1528 errorBody.Seek(0, io.SeekStart) 1529 switch { 1530 default: 1531 genericError := &smithy.GenericAPIError{ 1532 Code: errorCode, 1533 Message: errorMessage, 1534 } 1535 return genericError 1536 1537 } 1538} 1539 1540type awsAwsquery_deserializeOpDeleteIdentityPolicy struct { 1541} 1542 1543func (*awsAwsquery_deserializeOpDeleteIdentityPolicy) ID() string { 1544 return "OperationDeserializer" 1545} 1546 1547func (m *awsAwsquery_deserializeOpDeleteIdentityPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1548 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1549) { 1550 out, metadata, err = next.HandleDeserialize(ctx, in) 1551 if err != nil { 1552 return out, metadata, err 1553 } 1554 1555 response, ok := out.RawResponse.(*smithyhttp.Response) 1556 if !ok { 1557 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1558 } 1559 1560 if response.StatusCode < 200 || response.StatusCode >= 300 { 1561 return out, metadata, awsAwsquery_deserializeOpErrorDeleteIdentityPolicy(response, &metadata) 1562 } 1563 output := &DeleteIdentityPolicyOutput{} 1564 out.Result = output 1565 1566 var buff [1024]byte 1567 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1568 body := io.TeeReader(response.Body, ringBuffer) 1569 rootDecoder := xml.NewDecoder(body) 1570 t, err := smithyxml.FetchRootElement(rootDecoder) 1571 if err == io.EOF { 1572 return out, metadata, nil 1573 } 1574 if err != nil { 1575 var snapshot bytes.Buffer 1576 io.Copy(&snapshot, ringBuffer) 1577 return out, metadata, &smithy.DeserializationError{ 1578 Err: fmt.Errorf("failed to decode response body, %w", err), 1579 Snapshot: snapshot.Bytes(), 1580 } 1581 } 1582 1583 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1584 t, err = decoder.GetElement("DeleteIdentityPolicyResult") 1585 if err != nil { 1586 var snapshot bytes.Buffer 1587 io.Copy(&snapshot, ringBuffer) 1588 err = &smithy.DeserializationError{ 1589 Err: fmt.Errorf("failed to decode response body, %w", err), 1590 Snapshot: snapshot.Bytes(), 1591 } 1592 return out, metadata, err 1593 } 1594 1595 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1596 err = awsAwsquery_deserializeOpDocumentDeleteIdentityPolicyOutput(&output, decoder) 1597 if err != nil { 1598 var snapshot bytes.Buffer 1599 io.Copy(&snapshot, ringBuffer) 1600 err = &smithy.DeserializationError{ 1601 Err: fmt.Errorf("failed to decode response body, %w", err), 1602 Snapshot: snapshot.Bytes(), 1603 } 1604 return out, metadata, err 1605 } 1606 1607 return out, metadata, err 1608} 1609 1610func awsAwsquery_deserializeOpErrorDeleteIdentityPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1611 var errorBuffer bytes.Buffer 1612 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1613 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1614 } 1615 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1616 1617 errorCode := "UnknownError" 1618 errorMessage := errorCode 1619 1620 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1621 if err != nil { 1622 return err 1623 } 1624 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1625 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1626 } 1627 if len(errorComponents.Code) != 0 { 1628 errorCode = errorComponents.Code 1629 } 1630 if len(errorComponents.Message) != 0 { 1631 errorMessage = errorComponents.Message 1632 } 1633 errorBody.Seek(0, io.SeekStart) 1634 switch { 1635 default: 1636 genericError := &smithy.GenericAPIError{ 1637 Code: errorCode, 1638 Message: errorMessage, 1639 } 1640 return genericError 1641 1642 } 1643} 1644 1645type awsAwsquery_deserializeOpDeleteReceiptFilter struct { 1646} 1647 1648func (*awsAwsquery_deserializeOpDeleteReceiptFilter) ID() string { 1649 return "OperationDeserializer" 1650} 1651 1652func (m *awsAwsquery_deserializeOpDeleteReceiptFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1653 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1654) { 1655 out, metadata, err = next.HandleDeserialize(ctx, in) 1656 if err != nil { 1657 return out, metadata, err 1658 } 1659 1660 response, ok := out.RawResponse.(*smithyhttp.Response) 1661 if !ok { 1662 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1663 } 1664 1665 if response.StatusCode < 200 || response.StatusCode >= 300 { 1666 return out, metadata, awsAwsquery_deserializeOpErrorDeleteReceiptFilter(response, &metadata) 1667 } 1668 output := &DeleteReceiptFilterOutput{} 1669 out.Result = output 1670 1671 var buff [1024]byte 1672 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1673 body := io.TeeReader(response.Body, ringBuffer) 1674 rootDecoder := xml.NewDecoder(body) 1675 t, err := smithyxml.FetchRootElement(rootDecoder) 1676 if err == io.EOF { 1677 return out, metadata, nil 1678 } 1679 if err != nil { 1680 var snapshot bytes.Buffer 1681 io.Copy(&snapshot, ringBuffer) 1682 return out, metadata, &smithy.DeserializationError{ 1683 Err: fmt.Errorf("failed to decode response body, %w", err), 1684 Snapshot: snapshot.Bytes(), 1685 } 1686 } 1687 1688 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1689 t, err = decoder.GetElement("DeleteReceiptFilterResult") 1690 if err != nil { 1691 var snapshot bytes.Buffer 1692 io.Copy(&snapshot, ringBuffer) 1693 err = &smithy.DeserializationError{ 1694 Err: fmt.Errorf("failed to decode response body, %w", err), 1695 Snapshot: snapshot.Bytes(), 1696 } 1697 return out, metadata, err 1698 } 1699 1700 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1701 err = awsAwsquery_deserializeOpDocumentDeleteReceiptFilterOutput(&output, decoder) 1702 if err != nil { 1703 var snapshot bytes.Buffer 1704 io.Copy(&snapshot, ringBuffer) 1705 err = &smithy.DeserializationError{ 1706 Err: fmt.Errorf("failed to decode response body, %w", err), 1707 Snapshot: snapshot.Bytes(), 1708 } 1709 return out, metadata, err 1710 } 1711 1712 return out, metadata, err 1713} 1714 1715func awsAwsquery_deserializeOpErrorDeleteReceiptFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1716 var errorBuffer bytes.Buffer 1717 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1718 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1719 } 1720 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1721 1722 errorCode := "UnknownError" 1723 errorMessage := errorCode 1724 1725 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1726 if err != nil { 1727 return err 1728 } 1729 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1730 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1731 } 1732 if len(errorComponents.Code) != 0 { 1733 errorCode = errorComponents.Code 1734 } 1735 if len(errorComponents.Message) != 0 { 1736 errorMessage = errorComponents.Message 1737 } 1738 errorBody.Seek(0, io.SeekStart) 1739 switch { 1740 default: 1741 genericError := &smithy.GenericAPIError{ 1742 Code: errorCode, 1743 Message: errorMessage, 1744 } 1745 return genericError 1746 1747 } 1748} 1749 1750type awsAwsquery_deserializeOpDeleteReceiptRule struct { 1751} 1752 1753func (*awsAwsquery_deserializeOpDeleteReceiptRule) ID() string { 1754 return "OperationDeserializer" 1755} 1756 1757func (m *awsAwsquery_deserializeOpDeleteReceiptRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1758 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1759) { 1760 out, metadata, err = next.HandleDeserialize(ctx, in) 1761 if err != nil { 1762 return out, metadata, err 1763 } 1764 1765 response, ok := out.RawResponse.(*smithyhttp.Response) 1766 if !ok { 1767 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1768 } 1769 1770 if response.StatusCode < 200 || response.StatusCode >= 300 { 1771 return out, metadata, awsAwsquery_deserializeOpErrorDeleteReceiptRule(response, &metadata) 1772 } 1773 output := &DeleteReceiptRuleOutput{} 1774 out.Result = output 1775 1776 var buff [1024]byte 1777 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1778 body := io.TeeReader(response.Body, ringBuffer) 1779 rootDecoder := xml.NewDecoder(body) 1780 t, err := smithyxml.FetchRootElement(rootDecoder) 1781 if err == io.EOF { 1782 return out, metadata, nil 1783 } 1784 if err != nil { 1785 var snapshot bytes.Buffer 1786 io.Copy(&snapshot, ringBuffer) 1787 return out, metadata, &smithy.DeserializationError{ 1788 Err: fmt.Errorf("failed to decode response body, %w", err), 1789 Snapshot: snapshot.Bytes(), 1790 } 1791 } 1792 1793 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1794 t, err = decoder.GetElement("DeleteReceiptRuleResult") 1795 if err != nil { 1796 var snapshot bytes.Buffer 1797 io.Copy(&snapshot, ringBuffer) 1798 err = &smithy.DeserializationError{ 1799 Err: fmt.Errorf("failed to decode response body, %w", err), 1800 Snapshot: snapshot.Bytes(), 1801 } 1802 return out, metadata, err 1803 } 1804 1805 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1806 err = awsAwsquery_deserializeOpDocumentDeleteReceiptRuleOutput(&output, decoder) 1807 if err != nil { 1808 var snapshot bytes.Buffer 1809 io.Copy(&snapshot, ringBuffer) 1810 err = &smithy.DeserializationError{ 1811 Err: fmt.Errorf("failed to decode response body, %w", err), 1812 Snapshot: snapshot.Bytes(), 1813 } 1814 return out, metadata, err 1815 } 1816 1817 return out, metadata, err 1818} 1819 1820func awsAwsquery_deserializeOpErrorDeleteReceiptRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1821 var errorBuffer bytes.Buffer 1822 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1823 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1824 } 1825 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1826 1827 errorCode := "UnknownError" 1828 errorMessage := errorCode 1829 1830 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1831 if err != nil { 1832 return err 1833 } 1834 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1835 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1836 } 1837 if len(errorComponents.Code) != 0 { 1838 errorCode = errorComponents.Code 1839 } 1840 if len(errorComponents.Message) != 0 { 1841 errorMessage = errorComponents.Message 1842 } 1843 errorBody.Seek(0, io.SeekStart) 1844 switch { 1845 case strings.EqualFold("RuleSetDoesNotExistException", errorCode): 1846 return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody) 1847 1848 default: 1849 genericError := &smithy.GenericAPIError{ 1850 Code: errorCode, 1851 Message: errorMessage, 1852 } 1853 return genericError 1854 1855 } 1856} 1857 1858type awsAwsquery_deserializeOpDeleteReceiptRuleSet struct { 1859} 1860 1861func (*awsAwsquery_deserializeOpDeleteReceiptRuleSet) ID() string { 1862 return "OperationDeserializer" 1863} 1864 1865func (m *awsAwsquery_deserializeOpDeleteReceiptRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1866 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1867) { 1868 out, metadata, err = next.HandleDeserialize(ctx, in) 1869 if err != nil { 1870 return out, metadata, err 1871 } 1872 1873 response, ok := out.RawResponse.(*smithyhttp.Response) 1874 if !ok { 1875 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1876 } 1877 1878 if response.StatusCode < 200 || response.StatusCode >= 300 { 1879 return out, metadata, awsAwsquery_deserializeOpErrorDeleteReceiptRuleSet(response, &metadata) 1880 } 1881 output := &DeleteReceiptRuleSetOutput{} 1882 out.Result = output 1883 1884 var buff [1024]byte 1885 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1886 body := io.TeeReader(response.Body, ringBuffer) 1887 rootDecoder := xml.NewDecoder(body) 1888 t, err := smithyxml.FetchRootElement(rootDecoder) 1889 if err == io.EOF { 1890 return out, metadata, nil 1891 } 1892 if err != nil { 1893 var snapshot bytes.Buffer 1894 io.Copy(&snapshot, ringBuffer) 1895 return out, metadata, &smithy.DeserializationError{ 1896 Err: fmt.Errorf("failed to decode response body, %w", err), 1897 Snapshot: snapshot.Bytes(), 1898 } 1899 } 1900 1901 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1902 t, err = decoder.GetElement("DeleteReceiptRuleSetResult") 1903 if err != nil { 1904 var snapshot bytes.Buffer 1905 io.Copy(&snapshot, ringBuffer) 1906 err = &smithy.DeserializationError{ 1907 Err: fmt.Errorf("failed to decode response body, %w", err), 1908 Snapshot: snapshot.Bytes(), 1909 } 1910 return out, metadata, err 1911 } 1912 1913 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1914 err = awsAwsquery_deserializeOpDocumentDeleteReceiptRuleSetOutput(&output, decoder) 1915 if err != nil { 1916 var snapshot bytes.Buffer 1917 io.Copy(&snapshot, ringBuffer) 1918 err = &smithy.DeserializationError{ 1919 Err: fmt.Errorf("failed to decode response body, %w", err), 1920 Snapshot: snapshot.Bytes(), 1921 } 1922 return out, metadata, err 1923 } 1924 1925 return out, metadata, err 1926} 1927 1928func awsAwsquery_deserializeOpErrorDeleteReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1929 var errorBuffer bytes.Buffer 1930 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1931 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1932 } 1933 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1934 1935 errorCode := "UnknownError" 1936 errorMessage := errorCode 1937 1938 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1939 if err != nil { 1940 return err 1941 } 1942 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1943 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1944 } 1945 if len(errorComponents.Code) != 0 { 1946 errorCode = errorComponents.Code 1947 } 1948 if len(errorComponents.Message) != 0 { 1949 errorMessage = errorComponents.Message 1950 } 1951 errorBody.Seek(0, io.SeekStart) 1952 switch { 1953 case strings.EqualFold("CannotDeleteException", errorCode): 1954 return awsAwsquery_deserializeErrorCannotDeleteException(response, errorBody) 1955 1956 default: 1957 genericError := &smithy.GenericAPIError{ 1958 Code: errorCode, 1959 Message: errorMessage, 1960 } 1961 return genericError 1962 1963 } 1964} 1965 1966type awsAwsquery_deserializeOpDeleteTemplate struct { 1967} 1968 1969func (*awsAwsquery_deserializeOpDeleteTemplate) ID() string { 1970 return "OperationDeserializer" 1971} 1972 1973func (m *awsAwsquery_deserializeOpDeleteTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1974 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1975) { 1976 out, metadata, err = next.HandleDeserialize(ctx, in) 1977 if err != nil { 1978 return out, metadata, err 1979 } 1980 1981 response, ok := out.RawResponse.(*smithyhttp.Response) 1982 if !ok { 1983 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1984 } 1985 1986 if response.StatusCode < 200 || response.StatusCode >= 300 { 1987 return out, metadata, awsAwsquery_deserializeOpErrorDeleteTemplate(response, &metadata) 1988 } 1989 output := &DeleteTemplateOutput{} 1990 out.Result = output 1991 1992 var buff [1024]byte 1993 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1994 body := io.TeeReader(response.Body, ringBuffer) 1995 rootDecoder := xml.NewDecoder(body) 1996 t, err := smithyxml.FetchRootElement(rootDecoder) 1997 if err == io.EOF { 1998 return out, metadata, nil 1999 } 2000 if err != nil { 2001 var snapshot bytes.Buffer 2002 io.Copy(&snapshot, ringBuffer) 2003 return out, metadata, &smithy.DeserializationError{ 2004 Err: fmt.Errorf("failed to decode response body, %w", err), 2005 Snapshot: snapshot.Bytes(), 2006 } 2007 } 2008 2009 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2010 t, err = decoder.GetElement("DeleteTemplateResult") 2011 if err != nil { 2012 var snapshot bytes.Buffer 2013 io.Copy(&snapshot, ringBuffer) 2014 err = &smithy.DeserializationError{ 2015 Err: fmt.Errorf("failed to decode response body, %w", err), 2016 Snapshot: snapshot.Bytes(), 2017 } 2018 return out, metadata, err 2019 } 2020 2021 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2022 err = awsAwsquery_deserializeOpDocumentDeleteTemplateOutput(&output, decoder) 2023 if err != nil { 2024 var snapshot bytes.Buffer 2025 io.Copy(&snapshot, ringBuffer) 2026 err = &smithy.DeserializationError{ 2027 Err: fmt.Errorf("failed to decode response body, %w", err), 2028 Snapshot: snapshot.Bytes(), 2029 } 2030 return out, metadata, err 2031 } 2032 2033 return out, metadata, err 2034} 2035 2036func awsAwsquery_deserializeOpErrorDeleteTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2037 var errorBuffer bytes.Buffer 2038 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2039 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2040 } 2041 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2042 2043 errorCode := "UnknownError" 2044 errorMessage := errorCode 2045 2046 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2047 if err != nil { 2048 return err 2049 } 2050 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2051 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2052 } 2053 if len(errorComponents.Code) != 0 { 2054 errorCode = errorComponents.Code 2055 } 2056 if len(errorComponents.Message) != 0 { 2057 errorMessage = errorComponents.Message 2058 } 2059 errorBody.Seek(0, io.SeekStart) 2060 switch { 2061 default: 2062 genericError := &smithy.GenericAPIError{ 2063 Code: errorCode, 2064 Message: errorMessage, 2065 } 2066 return genericError 2067 2068 } 2069} 2070 2071type awsAwsquery_deserializeOpDeleteVerifiedEmailAddress struct { 2072} 2073 2074func (*awsAwsquery_deserializeOpDeleteVerifiedEmailAddress) ID() string { 2075 return "OperationDeserializer" 2076} 2077 2078func (m *awsAwsquery_deserializeOpDeleteVerifiedEmailAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2079 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2080) { 2081 out, metadata, err = next.HandleDeserialize(ctx, in) 2082 if err != nil { 2083 return out, metadata, err 2084 } 2085 2086 response, ok := out.RawResponse.(*smithyhttp.Response) 2087 if !ok { 2088 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2089 } 2090 2091 if response.StatusCode < 200 || response.StatusCode >= 300 { 2092 return out, metadata, awsAwsquery_deserializeOpErrorDeleteVerifiedEmailAddress(response, &metadata) 2093 } 2094 output := &DeleteVerifiedEmailAddressOutput{} 2095 out.Result = output 2096 2097 if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { 2098 return out, metadata, &smithy.DeserializationError{ 2099 Err: fmt.Errorf("failed to discard response body, %w", err), 2100 } 2101 } 2102 2103 return out, metadata, err 2104} 2105 2106func awsAwsquery_deserializeOpErrorDeleteVerifiedEmailAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2107 var errorBuffer bytes.Buffer 2108 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2109 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2110 } 2111 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2112 2113 errorCode := "UnknownError" 2114 errorMessage := errorCode 2115 2116 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2117 if err != nil { 2118 return err 2119 } 2120 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2121 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2122 } 2123 if len(errorComponents.Code) != 0 { 2124 errorCode = errorComponents.Code 2125 } 2126 if len(errorComponents.Message) != 0 { 2127 errorMessage = errorComponents.Message 2128 } 2129 errorBody.Seek(0, io.SeekStart) 2130 switch { 2131 default: 2132 genericError := &smithy.GenericAPIError{ 2133 Code: errorCode, 2134 Message: errorMessage, 2135 } 2136 return genericError 2137 2138 } 2139} 2140 2141type awsAwsquery_deserializeOpDescribeActiveReceiptRuleSet struct { 2142} 2143 2144func (*awsAwsquery_deserializeOpDescribeActiveReceiptRuleSet) ID() string { 2145 return "OperationDeserializer" 2146} 2147 2148func (m *awsAwsquery_deserializeOpDescribeActiveReceiptRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2149 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2150) { 2151 out, metadata, err = next.HandleDeserialize(ctx, in) 2152 if err != nil { 2153 return out, metadata, err 2154 } 2155 2156 response, ok := out.RawResponse.(*smithyhttp.Response) 2157 if !ok { 2158 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2159 } 2160 2161 if response.StatusCode < 200 || response.StatusCode >= 300 { 2162 return out, metadata, awsAwsquery_deserializeOpErrorDescribeActiveReceiptRuleSet(response, &metadata) 2163 } 2164 output := &DescribeActiveReceiptRuleSetOutput{} 2165 out.Result = output 2166 2167 var buff [1024]byte 2168 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2169 body := io.TeeReader(response.Body, ringBuffer) 2170 rootDecoder := xml.NewDecoder(body) 2171 t, err := smithyxml.FetchRootElement(rootDecoder) 2172 if err == io.EOF { 2173 return out, metadata, nil 2174 } 2175 if err != nil { 2176 var snapshot bytes.Buffer 2177 io.Copy(&snapshot, ringBuffer) 2178 return out, metadata, &smithy.DeserializationError{ 2179 Err: fmt.Errorf("failed to decode response body, %w", err), 2180 Snapshot: snapshot.Bytes(), 2181 } 2182 } 2183 2184 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2185 t, err = decoder.GetElement("DescribeActiveReceiptRuleSetResult") 2186 if err != nil { 2187 var snapshot bytes.Buffer 2188 io.Copy(&snapshot, ringBuffer) 2189 err = &smithy.DeserializationError{ 2190 Err: fmt.Errorf("failed to decode response body, %w", err), 2191 Snapshot: snapshot.Bytes(), 2192 } 2193 return out, metadata, err 2194 } 2195 2196 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2197 err = awsAwsquery_deserializeOpDocumentDescribeActiveReceiptRuleSetOutput(&output, decoder) 2198 if err != nil { 2199 var snapshot bytes.Buffer 2200 io.Copy(&snapshot, ringBuffer) 2201 err = &smithy.DeserializationError{ 2202 Err: fmt.Errorf("failed to decode response body, %w", err), 2203 Snapshot: snapshot.Bytes(), 2204 } 2205 return out, metadata, err 2206 } 2207 2208 return out, metadata, err 2209} 2210 2211func awsAwsquery_deserializeOpErrorDescribeActiveReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2212 var errorBuffer bytes.Buffer 2213 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2214 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2215 } 2216 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2217 2218 errorCode := "UnknownError" 2219 errorMessage := errorCode 2220 2221 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2222 if err != nil { 2223 return err 2224 } 2225 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2226 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2227 } 2228 if len(errorComponents.Code) != 0 { 2229 errorCode = errorComponents.Code 2230 } 2231 if len(errorComponents.Message) != 0 { 2232 errorMessage = errorComponents.Message 2233 } 2234 errorBody.Seek(0, io.SeekStart) 2235 switch { 2236 default: 2237 genericError := &smithy.GenericAPIError{ 2238 Code: errorCode, 2239 Message: errorMessage, 2240 } 2241 return genericError 2242 2243 } 2244} 2245 2246type awsAwsquery_deserializeOpDescribeConfigurationSet struct { 2247} 2248 2249func (*awsAwsquery_deserializeOpDescribeConfigurationSet) ID() string { 2250 return "OperationDeserializer" 2251} 2252 2253func (m *awsAwsquery_deserializeOpDescribeConfigurationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2254 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2255) { 2256 out, metadata, err = next.HandleDeserialize(ctx, in) 2257 if err != nil { 2258 return out, metadata, err 2259 } 2260 2261 response, ok := out.RawResponse.(*smithyhttp.Response) 2262 if !ok { 2263 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2264 } 2265 2266 if response.StatusCode < 200 || response.StatusCode >= 300 { 2267 return out, metadata, awsAwsquery_deserializeOpErrorDescribeConfigurationSet(response, &metadata) 2268 } 2269 output := &DescribeConfigurationSetOutput{} 2270 out.Result = output 2271 2272 var buff [1024]byte 2273 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2274 body := io.TeeReader(response.Body, ringBuffer) 2275 rootDecoder := xml.NewDecoder(body) 2276 t, err := smithyxml.FetchRootElement(rootDecoder) 2277 if err == io.EOF { 2278 return out, metadata, nil 2279 } 2280 if err != nil { 2281 var snapshot bytes.Buffer 2282 io.Copy(&snapshot, ringBuffer) 2283 return out, metadata, &smithy.DeserializationError{ 2284 Err: fmt.Errorf("failed to decode response body, %w", err), 2285 Snapshot: snapshot.Bytes(), 2286 } 2287 } 2288 2289 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2290 t, err = decoder.GetElement("DescribeConfigurationSetResult") 2291 if err != nil { 2292 var snapshot bytes.Buffer 2293 io.Copy(&snapshot, ringBuffer) 2294 err = &smithy.DeserializationError{ 2295 Err: fmt.Errorf("failed to decode response body, %w", err), 2296 Snapshot: snapshot.Bytes(), 2297 } 2298 return out, metadata, err 2299 } 2300 2301 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2302 err = awsAwsquery_deserializeOpDocumentDescribeConfigurationSetOutput(&output, decoder) 2303 if err != nil { 2304 var snapshot bytes.Buffer 2305 io.Copy(&snapshot, ringBuffer) 2306 err = &smithy.DeserializationError{ 2307 Err: fmt.Errorf("failed to decode response body, %w", err), 2308 Snapshot: snapshot.Bytes(), 2309 } 2310 return out, metadata, err 2311 } 2312 2313 return out, metadata, err 2314} 2315 2316func awsAwsquery_deserializeOpErrorDescribeConfigurationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2317 var errorBuffer bytes.Buffer 2318 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2319 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2320 } 2321 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2322 2323 errorCode := "UnknownError" 2324 errorMessage := errorCode 2325 2326 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2327 if err != nil { 2328 return err 2329 } 2330 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2331 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2332 } 2333 if len(errorComponents.Code) != 0 { 2334 errorCode = errorComponents.Code 2335 } 2336 if len(errorComponents.Message) != 0 { 2337 errorMessage = errorComponents.Message 2338 } 2339 errorBody.Seek(0, io.SeekStart) 2340 switch { 2341 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 2342 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 2343 2344 default: 2345 genericError := &smithy.GenericAPIError{ 2346 Code: errorCode, 2347 Message: errorMessage, 2348 } 2349 return genericError 2350 2351 } 2352} 2353 2354type awsAwsquery_deserializeOpDescribeReceiptRule struct { 2355} 2356 2357func (*awsAwsquery_deserializeOpDescribeReceiptRule) ID() string { 2358 return "OperationDeserializer" 2359} 2360 2361func (m *awsAwsquery_deserializeOpDescribeReceiptRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2362 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2363) { 2364 out, metadata, err = next.HandleDeserialize(ctx, in) 2365 if err != nil { 2366 return out, metadata, err 2367 } 2368 2369 response, ok := out.RawResponse.(*smithyhttp.Response) 2370 if !ok { 2371 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2372 } 2373 2374 if response.StatusCode < 200 || response.StatusCode >= 300 { 2375 return out, metadata, awsAwsquery_deserializeOpErrorDescribeReceiptRule(response, &metadata) 2376 } 2377 output := &DescribeReceiptRuleOutput{} 2378 out.Result = output 2379 2380 var buff [1024]byte 2381 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2382 body := io.TeeReader(response.Body, ringBuffer) 2383 rootDecoder := xml.NewDecoder(body) 2384 t, err := smithyxml.FetchRootElement(rootDecoder) 2385 if err == io.EOF { 2386 return out, metadata, nil 2387 } 2388 if err != nil { 2389 var snapshot bytes.Buffer 2390 io.Copy(&snapshot, ringBuffer) 2391 return out, metadata, &smithy.DeserializationError{ 2392 Err: fmt.Errorf("failed to decode response body, %w", err), 2393 Snapshot: snapshot.Bytes(), 2394 } 2395 } 2396 2397 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2398 t, err = decoder.GetElement("DescribeReceiptRuleResult") 2399 if err != nil { 2400 var snapshot bytes.Buffer 2401 io.Copy(&snapshot, ringBuffer) 2402 err = &smithy.DeserializationError{ 2403 Err: fmt.Errorf("failed to decode response body, %w", err), 2404 Snapshot: snapshot.Bytes(), 2405 } 2406 return out, metadata, err 2407 } 2408 2409 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2410 err = awsAwsquery_deserializeOpDocumentDescribeReceiptRuleOutput(&output, decoder) 2411 if err != nil { 2412 var snapshot bytes.Buffer 2413 io.Copy(&snapshot, ringBuffer) 2414 err = &smithy.DeserializationError{ 2415 Err: fmt.Errorf("failed to decode response body, %w", err), 2416 Snapshot: snapshot.Bytes(), 2417 } 2418 return out, metadata, err 2419 } 2420 2421 return out, metadata, err 2422} 2423 2424func awsAwsquery_deserializeOpErrorDescribeReceiptRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2425 var errorBuffer bytes.Buffer 2426 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2427 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2428 } 2429 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2430 2431 errorCode := "UnknownError" 2432 errorMessage := errorCode 2433 2434 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2435 if err != nil { 2436 return err 2437 } 2438 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2439 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2440 } 2441 if len(errorComponents.Code) != 0 { 2442 errorCode = errorComponents.Code 2443 } 2444 if len(errorComponents.Message) != 0 { 2445 errorMessage = errorComponents.Message 2446 } 2447 errorBody.Seek(0, io.SeekStart) 2448 switch { 2449 case strings.EqualFold("RuleDoesNotExistException", errorCode): 2450 return awsAwsquery_deserializeErrorRuleDoesNotExistException(response, errorBody) 2451 2452 case strings.EqualFold("RuleSetDoesNotExistException", errorCode): 2453 return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody) 2454 2455 default: 2456 genericError := &smithy.GenericAPIError{ 2457 Code: errorCode, 2458 Message: errorMessage, 2459 } 2460 return genericError 2461 2462 } 2463} 2464 2465type awsAwsquery_deserializeOpDescribeReceiptRuleSet struct { 2466} 2467 2468func (*awsAwsquery_deserializeOpDescribeReceiptRuleSet) ID() string { 2469 return "OperationDeserializer" 2470} 2471 2472func (m *awsAwsquery_deserializeOpDescribeReceiptRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2473 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2474) { 2475 out, metadata, err = next.HandleDeserialize(ctx, in) 2476 if err != nil { 2477 return out, metadata, err 2478 } 2479 2480 response, ok := out.RawResponse.(*smithyhttp.Response) 2481 if !ok { 2482 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2483 } 2484 2485 if response.StatusCode < 200 || response.StatusCode >= 300 { 2486 return out, metadata, awsAwsquery_deserializeOpErrorDescribeReceiptRuleSet(response, &metadata) 2487 } 2488 output := &DescribeReceiptRuleSetOutput{} 2489 out.Result = output 2490 2491 var buff [1024]byte 2492 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2493 body := io.TeeReader(response.Body, ringBuffer) 2494 rootDecoder := xml.NewDecoder(body) 2495 t, err := smithyxml.FetchRootElement(rootDecoder) 2496 if err == io.EOF { 2497 return out, metadata, nil 2498 } 2499 if err != nil { 2500 var snapshot bytes.Buffer 2501 io.Copy(&snapshot, ringBuffer) 2502 return out, metadata, &smithy.DeserializationError{ 2503 Err: fmt.Errorf("failed to decode response body, %w", err), 2504 Snapshot: snapshot.Bytes(), 2505 } 2506 } 2507 2508 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2509 t, err = decoder.GetElement("DescribeReceiptRuleSetResult") 2510 if err != nil { 2511 var snapshot bytes.Buffer 2512 io.Copy(&snapshot, ringBuffer) 2513 err = &smithy.DeserializationError{ 2514 Err: fmt.Errorf("failed to decode response body, %w", err), 2515 Snapshot: snapshot.Bytes(), 2516 } 2517 return out, metadata, err 2518 } 2519 2520 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2521 err = awsAwsquery_deserializeOpDocumentDescribeReceiptRuleSetOutput(&output, decoder) 2522 if err != nil { 2523 var snapshot bytes.Buffer 2524 io.Copy(&snapshot, ringBuffer) 2525 err = &smithy.DeserializationError{ 2526 Err: fmt.Errorf("failed to decode response body, %w", err), 2527 Snapshot: snapshot.Bytes(), 2528 } 2529 return out, metadata, err 2530 } 2531 2532 return out, metadata, err 2533} 2534 2535func awsAwsquery_deserializeOpErrorDescribeReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2536 var errorBuffer bytes.Buffer 2537 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2538 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2539 } 2540 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2541 2542 errorCode := "UnknownError" 2543 errorMessage := errorCode 2544 2545 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2546 if err != nil { 2547 return err 2548 } 2549 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2550 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2551 } 2552 if len(errorComponents.Code) != 0 { 2553 errorCode = errorComponents.Code 2554 } 2555 if len(errorComponents.Message) != 0 { 2556 errorMessage = errorComponents.Message 2557 } 2558 errorBody.Seek(0, io.SeekStart) 2559 switch { 2560 case strings.EqualFold("RuleSetDoesNotExistException", errorCode): 2561 return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody) 2562 2563 default: 2564 genericError := &smithy.GenericAPIError{ 2565 Code: errorCode, 2566 Message: errorMessage, 2567 } 2568 return genericError 2569 2570 } 2571} 2572 2573type awsAwsquery_deserializeOpGetAccountSendingEnabled struct { 2574} 2575 2576func (*awsAwsquery_deserializeOpGetAccountSendingEnabled) ID() string { 2577 return "OperationDeserializer" 2578} 2579 2580func (m *awsAwsquery_deserializeOpGetAccountSendingEnabled) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2581 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2582) { 2583 out, metadata, err = next.HandleDeserialize(ctx, in) 2584 if err != nil { 2585 return out, metadata, err 2586 } 2587 2588 response, ok := out.RawResponse.(*smithyhttp.Response) 2589 if !ok { 2590 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2591 } 2592 2593 if response.StatusCode < 200 || response.StatusCode >= 300 { 2594 return out, metadata, awsAwsquery_deserializeOpErrorGetAccountSendingEnabled(response, &metadata) 2595 } 2596 output := &GetAccountSendingEnabledOutput{} 2597 out.Result = output 2598 2599 var buff [1024]byte 2600 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2601 body := io.TeeReader(response.Body, ringBuffer) 2602 rootDecoder := xml.NewDecoder(body) 2603 t, err := smithyxml.FetchRootElement(rootDecoder) 2604 if err == io.EOF { 2605 return out, metadata, nil 2606 } 2607 if err != nil { 2608 var snapshot bytes.Buffer 2609 io.Copy(&snapshot, ringBuffer) 2610 return out, metadata, &smithy.DeserializationError{ 2611 Err: fmt.Errorf("failed to decode response body, %w", err), 2612 Snapshot: snapshot.Bytes(), 2613 } 2614 } 2615 2616 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2617 t, err = decoder.GetElement("GetAccountSendingEnabledResult") 2618 if err != nil { 2619 var snapshot bytes.Buffer 2620 io.Copy(&snapshot, ringBuffer) 2621 err = &smithy.DeserializationError{ 2622 Err: fmt.Errorf("failed to decode response body, %w", err), 2623 Snapshot: snapshot.Bytes(), 2624 } 2625 return out, metadata, err 2626 } 2627 2628 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2629 err = awsAwsquery_deserializeOpDocumentGetAccountSendingEnabledOutput(&output, decoder) 2630 if err != nil { 2631 var snapshot bytes.Buffer 2632 io.Copy(&snapshot, ringBuffer) 2633 err = &smithy.DeserializationError{ 2634 Err: fmt.Errorf("failed to decode response body, %w", err), 2635 Snapshot: snapshot.Bytes(), 2636 } 2637 return out, metadata, err 2638 } 2639 2640 return out, metadata, err 2641} 2642 2643func awsAwsquery_deserializeOpErrorGetAccountSendingEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2644 var errorBuffer bytes.Buffer 2645 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2646 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2647 } 2648 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2649 2650 errorCode := "UnknownError" 2651 errorMessage := errorCode 2652 2653 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2654 if err != nil { 2655 return err 2656 } 2657 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2658 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2659 } 2660 if len(errorComponents.Code) != 0 { 2661 errorCode = errorComponents.Code 2662 } 2663 if len(errorComponents.Message) != 0 { 2664 errorMessage = errorComponents.Message 2665 } 2666 errorBody.Seek(0, io.SeekStart) 2667 switch { 2668 default: 2669 genericError := &smithy.GenericAPIError{ 2670 Code: errorCode, 2671 Message: errorMessage, 2672 } 2673 return genericError 2674 2675 } 2676} 2677 2678type awsAwsquery_deserializeOpGetCustomVerificationEmailTemplate struct { 2679} 2680 2681func (*awsAwsquery_deserializeOpGetCustomVerificationEmailTemplate) ID() string { 2682 return "OperationDeserializer" 2683} 2684 2685func (m *awsAwsquery_deserializeOpGetCustomVerificationEmailTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2686 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2687) { 2688 out, metadata, err = next.HandleDeserialize(ctx, in) 2689 if err != nil { 2690 return out, metadata, err 2691 } 2692 2693 response, ok := out.RawResponse.(*smithyhttp.Response) 2694 if !ok { 2695 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2696 } 2697 2698 if response.StatusCode < 200 || response.StatusCode >= 300 { 2699 return out, metadata, awsAwsquery_deserializeOpErrorGetCustomVerificationEmailTemplate(response, &metadata) 2700 } 2701 output := &GetCustomVerificationEmailTemplateOutput{} 2702 out.Result = output 2703 2704 var buff [1024]byte 2705 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2706 body := io.TeeReader(response.Body, ringBuffer) 2707 rootDecoder := xml.NewDecoder(body) 2708 t, err := smithyxml.FetchRootElement(rootDecoder) 2709 if err == io.EOF { 2710 return out, metadata, nil 2711 } 2712 if err != nil { 2713 var snapshot bytes.Buffer 2714 io.Copy(&snapshot, ringBuffer) 2715 return out, metadata, &smithy.DeserializationError{ 2716 Err: fmt.Errorf("failed to decode response body, %w", err), 2717 Snapshot: snapshot.Bytes(), 2718 } 2719 } 2720 2721 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2722 t, err = decoder.GetElement("GetCustomVerificationEmailTemplateResult") 2723 if err != nil { 2724 var snapshot bytes.Buffer 2725 io.Copy(&snapshot, ringBuffer) 2726 err = &smithy.DeserializationError{ 2727 Err: fmt.Errorf("failed to decode response body, %w", err), 2728 Snapshot: snapshot.Bytes(), 2729 } 2730 return out, metadata, err 2731 } 2732 2733 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2734 err = awsAwsquery_deserializeOpDocumentGetCustomVerificationEmailTemplateOutput(&output, decoder) 2735 if err != nil { 2736 var snapshot bytes.Buffer 2737 io.Copy(&snapshot, ringBuffer) 2738 err = &smithy.DeserializationError{ 2739 Err: fmt.Errorf("failed to decode response body, %w", err), 2740 Snapshot: snapshot.Bytes(), 2741 } 2742 return out, metadata, err 2743 } 2744 2745 return out, metadata, err 2746} 2747 2748func awsAwsquery_deserializeOpErrorGetCustomVerificationEmailTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2749 var errorBuffer bytes.Buffer 2750 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2751 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2752 } 2753 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2754 2755 errorCode := "UnknownError" 2756 errorMessage := errorCode 2757 2758 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2759 if err != nil { 2760 return err 2761 } 2762 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2763 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2764 } 2765 if len(errorComponents.Code) != 0 { 2766 errorCode = errorComponents.Code 2767 } 2768 if len(errorComponents.Message) != 0 { 2769 errorMessage = errorComponents.Message 2770 } 2771 errorBody.Seek(0, io.SeekStart) 2772 switch { 2773 case strings.EqualFold("CustomVerificationEmailTemplateDoesNotExistException", errorCode): 2774 return awsAwsquery_deserializeErrorCustomVerificationEmailTemplateDoesNotExistException(response, errorBody) 2775 2776 default: 2777 genericError := &smithy.GenericAPIError{ 2778 Code: errorCode, 2779 Message: errorMessage, 2780 } 2781 return genericError 2782 2783 } 2784} 2785 2786type awsAwsquery_deserializeOpGetIdentityDkimAttributes struct { 2787} 2788 2789func (*awsAwsquery_deserializeOpGetIdentityDkimAttributes) ID() string { 2790 return "OperationDeserializer" 2791} 2792 2793func (m *awsAwsquery_deserializeOpGetIdentityDkimAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2794 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2795) { 2796 out, metadata, err = next.HandleDeserialize(ctx, in) 2797 if err != nil { 2798 return out, metadata, err 2799 } 2800 2801 response, ok := out.RawResponse.(*smithyhttp.Response) 2802 if !ok { 2803 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2804 } 2805 2806 if response.StatusCode < 200 || response.StatusCode >= 300 { 2807 return out, metadata, awsAwsquery_deserializeOpErrorGetIdentityDkimAttributes(response, &metadata) 2808 } 2809 output := &GetIdentityDkimAttributesOutput{} 2810 out.Result = output 2811 2812 var buff [1024]byte 2813 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2814 body := io.TeeReader(response.Body, ringBuffer) 2815 rootDecoder := xml.NewDecoder(body) 2816 t, err := smithyxml.FetchRootElement(rootDecoder) 2817 if err == io.EOF { 2818 return out, metadata, nil 2819 } 2820 if err != nil { 2821 var snapshot bytes.Buffer 2822 io.Copy(&snapshot, ringBuffer) 2823 return out, metadata, &smithy.DeserializationError{ 2824 Err: fmt.Errorf("failed to decode response body, %w", err), 2825 Snapshot: snapshot.Bytes(), 2826 } 2827 } 2828 2829 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2830 t, err = decoder.GetElement("GetIdentityDkimAttributesResult") 2831 if err != nil { 2832 var snapshot bytes.Buffer 2833 io.Copy(&snapshot, ringBuffer) 2834 err = &smithy.DeserializationError{ 2835 Err: fmt.Errorf("failed to decode response body, %w", err), 2836 Snapshot: snapshot.Bytes(), 2837 } 2838 return out, metadata, err 2839 } 2840 2841 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2842 err = awsAwsquery_deserializeOpDocumentGetIdentityDkimAttributesOutput(&output, decoder) 2843 if err != nil { 2844 var snapshot bytes.Buffer 2845 io.Copy(&snapshot, ringBuffer) 2846 err = &smithy.DeserializationError{ 2847 Err: fmt.Errorf("failed to decode response body, %w", err), 2848 Snapshot: snapshot.Bytes(), 2849 } 2850 return out, metadata, err 2851 } 2852 2853 return out, metadata, err 2854} 2855 2856func awsAwsquery_deserializeOpErrorGetIdentityDkimAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2857 var errorBuffer bytes.Buffer 2858 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2859 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2860 } 2861 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2862 2863 errorCode := "UnknownError" 2864 errorMessage := errorCode 2865 2866 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2867 if err != nil { 2868 return err 2869 } 2870 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2871 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2872 } 2873 if len(errorComponents.Code) != 0 { 2874 errorCode = errorComponents.Code 2875 } 2876 if len(errorComponents.Message) != 0 { 2877 errorMessage = errorComponents.Message 2878 } 2879 errorBody.Seek(0, io.SeekStart) 2880 switch { 2881 default: 2882 genericError := &smithy.GenericAPIError{ 2883 Code: errorCode, 2884 Message: errorMessage, 2885 } 2886 return genericError 2887 2888 } 2889} 2890 2891type awsAwsquery_deserializeOpGetIdentityMailFromDomainAttributes struct { 2892} 2893 2894func (*awsAwsquery_deserializeOpGetIdentityMailFromDomainAttributes) ID() string { 2895 return "OperationDeserializer" 2896} 2897 2898func (m *awsAwsquery_deserializeOpGetIdentityMailFromDomainAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2899 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2900) { 2901 out, metadata, err = next.HandleDeserialize(ctx, in) 2902 if err != nil { 2903 return out, metadata, err 2904 } 2905 2906 response, ok := out.RawResponse.(*smithyhttp.Response) 2907 if !ok { 2908 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2909 } 2910 2911 if response.StatusCode < 200 || response.StatusCode >= 300 { 2912 return out, metadata, awsAwsquery_deserializeOpErrorGetIdentityMailFromDomainAttributes(response, &metadata) 2913 } 2914 output := &GetIdentityMailFromDomainAttributesOutput{} 2915 out.Result = output 2916 2917 var buff [1024]byte 2918 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2919 body := io.TeeReader(response.Body, ringBuffer) 2920 rootDecoder := xml.NewDecoder(body) 2921 t, err := smithyxml.FetchRootElement(rootDecoder) 2922 if err == io.EOF { 2923 return out, metadata, nil 2924 } 2925 if err != nil { 2926 var snapshot bytes.Buffer 2927 io.Copy(&snapshot, ringBuffer) 2928 return out, metadata, &smithy.DeserializationError{ 2929 Err: fmt.Errorf("failed to decode response body, %w", err), 2930 Snapshot: snapshot.Bytes(), 2931 } 2932 } 2933 2934 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2935 t, err = decoder.GetElement("GetIdentityMailFromDomainAttributesResult") 2936 if err != nil { 2937 var snapshot bytes.Buffer 2938 io.Copy(&snapshot, ringBuffer) 2939 err = &smithy.DeserializationError{ 2940 Err: fmt.Errorf("failed to decode response body, %w", err), 2941 Snapshot: snapshot.Bytes(), 2942 } 2943 return out, metadata, err 2944 } 2945 2946 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2947 err = awsAwsquery_deserializeOpDocumentGetIdentityMailFromDomainAttributesOutput(&output, decoder) 2948 if err != nil { 2949 var snapshot bytes.Buffer 2950 io.Copy(&snapshot, ringBuffer) 2951 err = &smithy.DeserializationError{ 2952 Err: fmt.Errorf("failed to decode response body, %w", err), 2953 Snapshot: snapshot.Bytes(), 2954 } 2955 return out, metadata, err 2956 } 2957 2958 return out, metadata, err 2959} 2960 2961func awsAwsquery_deserializeOpErrorGetIdentityMailFromDomainAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2962 var errorBuffer bytes.Buffer 2963 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2964 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2965 } 2966 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2967 2968 errorCode := "UnknownError" 2969 errorMessage := errorCode 2970 2971 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2972 if err != nil { 2973 return err 2974 } 2975 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2976 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2977 } 2978 if len(errorComponents.Code) != 0 { 2979 errorCode = errorComponents.Code 2980 } 2981 if len(errorComponents.Message) != 0 { 2982 errorMessage = errorComponents.Message 2983 } 2984 errorBody.Seek(0, io.SeekStart) 2985 switch { 2986 default: 2987 genericError := &smithy.GenericAPIError{ 2988 Code: errorCode, 2989 Message: errorMessage, 2990 } 2991 return genericError 2992 2993 } 2994} 2995 2996type awsAwsquery_deserializeOpGetIdentityNotificationAttributes struct { 2997} 2998 2999func (*awsAwsquery_deserializeOpGetIdentityNotificationAttributes) ID() string { 3000 return "OperationDeserializer" 3001} 3002 3003func (m *awsAwsquery_deserializeOpGetIdentityNotificationAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3004 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3005) { 3006 out, metadata, err = next.HandleDeserialize(ctx, in) 3007 if err != nil { 3008 return out, metadata, err 3009 } 3010 3011 response, ok := out.RawResponse.(*smithyhttp.Response) 3012 if !ok { 3013 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3014 } 3015 3016 if response.StatusCode < 200 || response.StatusCode >= 300 { 3017 return out, metadata, awsAwsquery_deserializeOpErrorGetIdentityNotificationAttributes(response, &metadata) 3018 } 3019 output := &GetIdentityNotificationAttributesOutput{} 3020 out.Result = output 3021 3022 var buff [1024]byte 3023 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3024 body := io.TeeReader(response.Body, ringBuffer) 3025 rootDecoder := xml.NewDecoder(body) 3026 t, err := smithyxml.FetchRootElement(rootDecoder) 3027 if err == io.EOF { 3028 return out, metadata, nil 3029 } 3030 if err != nil { 3031 var snapshot bytes.Buffer 3032 io.Copy(&snapshot, ringBuffer) 3033 return out, metadata, &smithy.DeserializationError{ 3034 Err: fmt.Errorf("failed to decode response body, %w", err), 3035 Snapshot: snapshot.Bytes(), 3036 } 3037 } 3038 3039 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3040 t, err = decoder.GetElement("GetIdentityNotificationAttributesResult") 3041 if err != nil { 3042 var snapshot bytes.Buffer 3043 io.Copy(&snapshot, ringBuffer) 3044 err = &smithy.DeserializationError{ 3045 Err: fmt.Errorf("failed to decode response body, %w", err), 3046 Snapshot: snapshot.Bytes(), 3047 } 3048 return out, metadata, err 3049 } 3050 3051 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3052 err = awsAwsquery_deserializeOpDocumentGetIdentityNotificationAttributesOutput(&output, decoder) 3053 if err != nil { 3054 var snapshot bytes.Buffer 3055 io.Copy(&snapshot, ringBuffer) 3056 err = &smithy.DeserializationError{ 3057 Err: fmt.Errorf("failed to decode response body, %w", err), 3058 Snapshot: snapshot.Bytes(), 3059 } 3060 return out, metadata, err 3061 } 3062 3063 return out, metadata, err 3064} 3065 3066func awsAwsquery_deserializeOpErrorGetIdentityNotificationAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3067 var errorBuffer bytes.Buffer 3068 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3069 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3070 } 3071 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3072 3073 errorCode := "UnknownError" 3074 errorMessage := errorCode 3075 3076 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3077 if err != nil { 3078 return err 3079 } 3080 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3081 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3082 } 3083 if len(errorComponents.Code) != 0 { 3084 errorCode = errorComponents.Code 3085 } 3086 if len(errorComponents.Message) != 0 { 3087 errorMessage = errorComponents.Message 3088 } 3089 errorBody.Seek(0, io.SeekStart) 3090 switch { 3091 default: 3092 genericError := &smithy.GenericAPIError{ 3093 Code: errorCode, 3094 Message: errorMessage, 3095 } 3096 return genericError 3097 3098 } 3099} 3100 3101type awsAwsquery_deserializeOpGetIdentityPolicies struct { 3102} 3103 3104func (*awsAwsquery_deserializeOpGetIdentityPolicies) ID() string { 3105 return "OperationDeserializer" 3106} 3107 3108func (m *awsAwsquery_deserializeOpGetIdentityPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3109 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3110) { 3111 out, metadata, err = next.HandleDeserialize(ctx, in) 3112 if err != nil { 3113 return out, metadata, err 3114 } 3115 3116 response, ok := out.RawResponse.(*smithyhttp.Response) 3117 if !ok { 3118 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3119 } 3120 3121 if response.StatusCode < 200 || response.StatusCode >= 300 { 3122 return out, metadata, awsAwsquery_deserializeOpErrorGetIdentityPolicies(response, &metadata) 3123 } 3124 output := &GetIdentityPoliciesOutput{} 3125 out.Result = output 3126 3127 var buff [1024]byte 3128 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3129 body := io.TeeReader(response.Body, ringBuffer) 3130 rootDecoder := xml.NewDecoder(body) 3131 t, err := smithyxml.FetchRootElement(rootDecoder) 3132 if err == io.EOF { 3133 return out, metadata, nil 3134 } 3135 if err != nil { 3136 var snapshot bytes.Buffer 3137 io.Copy(&snapshot, ringBuffer) 3138 return out, metadata, &smithy.DeserializationError{ 3139 Err: fmt.Errorf("failed to decode response body, %w", err), 3140 Snapshot: snapshot.Bytes(), 3141 } 3142 } 3143 3144 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3145 t, err = decoder.GetElement("GetIdentityPoliciesResult") 3146 if err != nil { 3147 var snapshot bytes.Buffer 3148 io.Copy(&snapshot, ringBuffer) 3149 err = &smithy.DeserializationError{ 3150 Err: fmt.Errorf("failed to decode response body, %w", err), 3151 Snapshot: snapshot.Bytes(), 3152 } 3153 return out, metadata, err 3154 } 3155 3156 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3157 err = awsAwsquery_deserializeOpDocumentGetIdentityPoliciesOutput(&output, decoder) 3158 if err != nil { 3159 var snapshot bytes.Buffer 3160 io.Copy(&snapshot, ringBuffer) 3161 err = &smithy.DeserializationError{ 3162 Err: fmt.Errorf("failed to decode response body, %w", err), 3163 Snapshot: snapshot.Bytes(), 3164 } 3165 return out, metadata, err 3166 } 3167 3168 return out, metadata, err 3169} 3170 3171func awsAwsquery_deserializeOpErrorGetIdentityPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3172 var errorBuffer bytes.Buffer 3173 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3174 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3175 } 3176 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3177 3178 errorCode := "UnknownError" 3179 errorMessage := errorCode 3180 3181 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3182 if err != nil { 3183 return err 3184 } 3185 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3186 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3187 } 3188 if len(errorComponents.Code) != 0 { 3189 errorCode = errorComponents.Code 3190 } 3191 if len(errorComponents.Message) != 0 { 3192 errorMessage = errorComponents.Message 3193 } 3194 errorBody.Seek(0, io.SeekStart) 3195 switch { 3196 default: 3197 genericError := &smithy.GenericAPIError{ 3198 Code: errorCode, 3199 Message: errorMessage, 3200 } 3201 return genericError 3202 3203 } 3204} 3205 3206type awsAwsquery_deserializeOpGetIdentityVerificationAttributes struct { 3207} 3208 3209func (*awsAwsquery_deserializeOpGetIdentityVerificationAttributes) ID() string { 3210 return "OperationDeserializer" 3211} 3212 3213func (m *awsAwsquery_deserializeOpGetIdentityVerificationAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3214 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3215) { 3216 out, metadata, err = next.HandleDeserialize(ctx, in) 3217 if err != nil { 3218 return out, metadata, err 3219 } 3220 3221 response, ok := out.RawResponse.(*smithyhttp.Response) 3222 if !ok { 3223 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3224 } 3225 3226 if response.StatusCode < 200 || response.StatusCode >= 300 { 3227 return out, metadata, awsAwsquery_deserializeOpErrorGetIdentityVerificationAttributes(response, &metadata) 3228 } 3229 output := &GetIdentityVerificationAttributesOutput{} 3230 out.Result = output 3231 3232 var buff [1024]byte 3233 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3234 body := io.TeeReader(response.Body, ringBuffer) 3235 rootDecoder := xml.NewDecoder(body) 3236 t, err := smithyxml.FetchRootElement(rootDecoder) 3237 if err == io.EOF { 3238 return out, metadata, nil 3239 } 3240 if err != nil { 3241 var snapshot bytes.Buffer 3242 io.Copy(&snapshot, ringBuffer) 3243 return out, metadata, &smithy.DeserializationError{ 3244 Err: fmt.Errorf("failed to decode response body, %w", err), 3245 Snapshot: snapshot.Bytes(), 3246 } 3247 } 3248 3249 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3250 t, err = decoder.GetElement("GetIdentityVerificationAttributesResult") 3251 if err != nil { 3252 var snapshot bytes.Buffer 3253 io.Copy(&snapshot, ringBuffer) 3254 err = &smithy.DeserializationError{ 3255 Err: fmt.Errorf("failed to decode response body, %w", err), 3256 Snapshot: snapshot.Bytes(), 3257 } 3258 return out, metadata, err 3259 } 3260 3261 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3262 err = awsAwsquery_deserializeOpDocumentGetIdentityVerificationAttributesOutput(&output, decoder) 3263 if err != nil { 3264 var snapshot bytes.Buffer 3265 io.Copy(&snapshot, ringBuffer) 3266 err = &smithy.DeserializationError{ 3267 Err: fmt.Errorf("failed to decode response body, %w", err), 3268 Snapshot: snapshot.Bytes(), 3269 } 3270 return out, metadata, err 3271 } 3272 3273 return out, metadata, err 3274} 3275 3276func awsAwsquery_deserializeOpErrorGetIdentityVerificationAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3277 var errorBuffer bytes.Buffer 3278 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3279 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3280 } 3281 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3282 3283 errorCode := "UnknownError" 3284 errorMessage := errorCode 3285 3286 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3287 if err != nil { 3288 return err 3289 } 3290 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3291 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3292 } 3293 if len(errorComponents.Code) != 0 { 3294 errorCode = errorComponents.Code 3295 } 3296 if len(errorComponents.Message) != 0 { 3297 errorMessage = errorComponents.Message 3298 } 3299 errorBody.Seek(0, io.SeekStart) 3300 switch { 3301 default: 3302 genericError := &smithy.GenericAPIError{ 3303 Code: errorCode, 3304 Message: errorMessage, 3305 } 3306 return genericError 3307 3308 } 3309} 3310 3311type awsAwsquery_deserializeOpGetSendQuota struct { 3312} 3313 3314func (*awsAwsquery_deserializeOpGetSendQuota) ID() string { 3315 return "OperationDeserializer" 3316} 3317 3318func (m *awsAwsquery_deserializeOpGetSendQuota) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3319 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3320) { 3321 out, metadata, err = next.HandleDeserialize(ctx, in) 3322 if err != nil { 3323 return out, metadata, err 3324 } 3325 3326 response, ok := out.RawResponse.(*smithyhttp.Response) 3327 if !ok { 3328 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3329 } 3330 3331 if response.StatusCode < 200 || response.StatusCode >= 300 { 3332 return out, metadata, awsAwsquery_deserializeOpErrorGetSendQuota(response, &metadata) 3333 } 3334 output := &GetSendQuotaOutput{} 3335 out.Result = output 3336 3337 var buff [1024]byte 3338 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3339 body := io.TeeReader(response.Body, ringBuffer) 3340 rootDecoder := xml.NewDecoder(body) 3341 t, err := smithyxml.FetchRootElement(rootDecoder) 3342 if err == io.EOF { 3343 return out, metadata, nil 3344 } 3345 if err != nil { 3346 var snapshot bytes.Buffer 3347 io.Copy(&snapshot, ringBuffer) 3348 return out, metadata, &smithy.DeserializationError{ 3349 Err: fmt.Errorf("failed to decode response body, %w", err), 3350 Snapshot: snapshot.Bytes(), 3351 } 3352 } 3353 3354 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3355 t, err = decoder.GetElement("GetSendQuotaResult") 3356 if err != nil { 3357 var snapshot bytes.Buffer 3358 io.Copy(&snapshot, ringBuffer) 3359 err = &smithy.DeserializationError{ 3360 Err: fmt.Errorf("failed to decode response body, %w", err), 3361 Snapshot: snapshot.Bytes(), 3362 } 3363 return out, metadata, err 3364 } 3365 3366 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3367 err = awsAwsquery_deserializeOpDocumentGetSendQuotaOutput(&output, decoder) 3368 if err != nil { 3369 var snapshot bytes.Buffer 3370 io.Copy(&snapshot, ringBuffer) 3371 err = &smithy.DeserializationError{ 3372 Err: fmt.Errorf("failed to decode response body, %w", err), 3373 Snapshot: snapshot.Bytes(), 3374 } 3375 return out, metadata, err 3376 } 3377 3378 return out, metadata, err 3379} 3380 3381func awsAwsquery_deserializeOpErrorGetSendQuota(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3382 var errorBuffer bytes.Buffer 3383 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3384 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3385 } 3386 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3387 3388 errorCode := "UnknownError" 3389 errorMessage := errorCode 3390 3391 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3392 if err != nil { 3393 return err 3394 } 3395 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3396 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3397 } 3398 if len(errorComponents.Code) != 0 { 3399 errorCode = errorComponents.Code 3400 } 3401 if len(errorComponents.Message) != 0 { 3402 errorMessage = errorComponents.Message 3403 } 3404 errorBody.Seek(0, io.SeekStart) 3405 switch { 3406 default: 3407 genericError := &smithy.GenericAPIError{ 3408 Code: errorCode, 3409 Message: errorMessage, 3410 } 3411 return genericError 3412 3413 } 3414} 3415 3416type awsAwsquery_deserializeOpGetSendStatistics struct { 3417} 3418 3419func (*awsAwsquery_deserializeOpGetSendStatistics) ID() string { 3420 return "OperationDeserializer" 3421} 3422 3423func (m *awsAwsquery_deserializeOpGetSendStatistics) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3424 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3425) { 3426 out, metadata, err = next.HandleDeserialize(ctx, in) 3427 if err != nil { 3428 return out, metadata, err 3429 } 3430 3431 response, ok := out.RawResponse.(*smithyhttp.Response) 3432 if !ok { 3433 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3434 } 3435 3436 if response.StatusCode < 200 || response.StatusCode >= 300 { 3437 return out, metadata, awsAwsquery_deserializeOpErrorGetSendStatistics(response, &metadata) 3438 } 3439 output := &GetSendStatisticsOutput{} 3440 out.Result = output 3441 3442 var buff [1024]byte 3443 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3444 body := io.TeeReader(response.Body, ringBuffer) 3445 rootDecoder := xml.NewDecoder(body) 3446 t, err := smithyxml.FetchRootElement(rootDecoder) 3447 if err == io.EOF { 3448 return out, metadata, nil 3449 } 3450 if err != nil { 3451 var snapshot bytes.Buffer 3452 io.Copy(&snapshot, ringBuffer) 3453 return out, metadata, &smithy.DeserializationError{ 3454 Err: fmt.Errorf("failed to decode response body, %w", err), 3455 Snapshot: snapshot.Bytes(), 3456 } 3457 } 3458 3459 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3460 t, err = decoder.GetElement("GetSendStatisticsResult") 3461 if err != nil { 3462 var snapshot bytes.Buffer 3463 io.Copy(&snapshot, ringBuffer) 3464 err = &smithy.DeserializationError{ 3465 Err: fmt.Errorf("failed to decode response body, %w", err), 3466 Snapshot: snapshot.Bytes(), 3467 } 3468 return out, metadata, err 3469 } 3470 3471 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3472 err = awsAwsquery_deserializeOpDocumentGetSendStatisticsOutput(&output, decoder) 3473 if err != nil { 3474 var snapshot bytes.Buffer 3475 io.Copy(&snapshot, ringBuffer) 3476 err = &smithy.DeserializationError{ 3477 Err: fmt.Errorf("failed to decode response body, %w", err), 3478 Snapshot: snapshot.Bytes(), 3479 } 3480 return out, metadata, err 3481 } 3482 3483 return out, metadata, err 3484} 3485 3486func awsAwsquery_deserializeOpErrorGetSendStatistics(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3487 var errorBuffer bytes.Buffer 3488 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3489 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3490 } 3491 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3492 3493 errorCode := "UnknownError" 3494 errorMessage := errorCode 3495 3496 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3497 if err != nil { 3498 return err 3499 } 3500 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3501 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3502 } 3503 if len(errorComponents.Code) != 0 { 3504 errorCode = errorComponents.Code 3505 } 3506 if len(errorComponents.Message) != 0 { 3507 errorMessage = errorComponents.Message 3508 } 3509 errorBody.Seek(0, io.SeekStart) 3510 switch { 3511 default: 3512 genericError := &smithy.GenericAPIError{ 3513 Code: errorCode, 3514 Message: errorMessage, 3515 } 3516 return genericError 3517 3518 } 3519} 3520 3521type awsAwsquery_deserializeOpGetTemplate struct { 3522} 3523 3524func (*awsAwsquery_deserializeOpGetTemplate) ID() string { 3525 return "OperationDeserializer" 3526} 3527 3528func (m *awsAwsquery_deserializeOpGetTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3529 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3530) { 3531 out, metadata, err = next.HandleDeserialize(ctx, in) 3532 if err != nil { 3533 return out, metadata, err 3534 } 3535 3536 response, ok := out.RawResponse.(*smithyhttp.Response) 3537 if !ok { 3538 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3539 } 3540 3541 if response.StatusCode < 200 || response.StatusCode >= 300 { 3542 return out, metadata, awsAwsquery_deserializeOpErrorGetTemplate(response, &metadata) 3543 } 3544 output := &GetTemplateOutput{} 3545 out.Result = output 3546 3547 var buff [1024]byte 3548 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3549 body := io.TeeReader(response.Body, ringBuffer) 3550 rootDecoder := xml.NewDecoder(body) 3551 t, err := smithyxml.FetchRootElement(rootDecoder) 3552 if err == io.EOF { 3553 return out, metadata, nil 3554 } 3555 if err != nil { 3556 var snapshot bytes.Buffer 3557 io.Copy(&snapshot, ringBuffer) 3558 return out, metadata, &smithy.DeserializationError{ 3559 Err: fmt.Errorf("failed to decode response body, %w", err), 3560 Snapshot: snapshot.Bytes(), 3561 } 3562 } 3563 3564 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3565 t, err = decoder.GetElement("GetTemplateResult") 3566 if err != nil { 3567 var snapshot bytes.Buffer 3568 io.Copy(&snapshot, ringBuffer) 3569 err = &smithy.DeserializationError{ 3570 Err: fmt.Errorf("failed to decode response body, %w", err), 3571 Snapshot: snapshot.Bytes(), 3572 } 3573 return out, metadata, err 3574 } 3575 3576 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3577 err = awsAwsquery_deserializeOpDocumentGetTemplateOutput(&output, decoder) 3578 if err != nil { 3579 var snapshot bytes.Buffer 3580 io.Copy(&snapshot, ringBuffer) 3581 err = &smithy.DeserializationError{ 3582 Err: fmt.Errorf("failed to decode response body, %w", err), 3583 Snapshot: snapshot.Bytes(), 3584 } 3585 return out, metadata, err 3586 } 3587 3588 return out, metadata, err 3589} 3590 3591func awsAwsquery_deserializeOpErrorGetTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3592 var errorBuffer bytes.Buffer 3593 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3594 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3595 } 3596 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3597 3598 errorCode := "UnknownError" 3599 errorMessage := errorCode 3600 3601 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3602 if err != nil { 3603 return err 3604 } 3605 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3606 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3607 } 3608 if len(errorComponents.Code) != 0 { 3609 errorCode = errorComponents.Code 3610 } 3611 if len(errorComponents.Message) != 0 { 3612 errorMessage = errorComponents.Message 3613 } 3614 errorBody.Seek(0, io.SeekStart) 3615 switch { 3616 case strings.EqualFold("TemplateDoesNotExistException", errorCode): 3617 return awsAwsquery_deserializeErrorTemplateDoesNotExistException(response, errorBody) 3618 3619 default: 3620 genericError := &smithy.GenericAPIError{ 3621 Code: errorCode, 3622 Message: errorMessage, 3623 } 3624 return genericError 3625 3626 } 3627} 3628 3629type awsAwsquery_deserializeOpListConfigurationSets struct { 3630} 3631 3632func (*awsAwsquery_deserializeOpListConfigurationSets) ID() string { 3633 return "OperationDeserializer" 3634} 3635 3636func (m *awsAwsquery_deserializeOpListConfigurationSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3637 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3638) { 3639 out, metadata, err = next.HandleDeserialize(ctx, in) 3640 if err != nil { 3641 return out, metadata, err 3642 } 3643 3644 response, ok := out.RawResponse.(*smithyhttp.Response) 3645 if !ok { 3646 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3647 } 3648 3649 if response.StatusCode < 200 || response.StatusCode >= 300 { 3650 return out, metadata, awsAwsquery_deserializeOpErrorListConfigurationSets(response, &metadata) 3651 } 3652 output := &ListConfigurationSetsOutput{} 3653 out.Result = output 3654 3655 var buff [1024]byte 3656 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3657 body := io.TeeReader(response.Body, ringBuffer) 3658 rootDecoder := xml.NewDecoder(body) 3659 t, err := smithyxml.FetchRootElement(rootDecoder) 3660 if err == io.EOF { 3661 return out, metadata, nil 3662 } 3663 if err != nil { 3664 var snapshot bytes.Buffer 3665 io.Copy(&snapshot, ringBuffer) 3666 return out, metadata, &smithy.DeserializationError{ 3667 Err: fmt.Errorf("failed to decode response body, %w", err), 3668 Snapshot: snapshot.Bytes(), 3669 } 3670 } 3671 3672 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3673 t, err = decoder.GetElement("ListConfigurationSetsResult") 3674 if err != nil { 3675 var snapshot bytes.Buffer 3676 io.Copy(&snapshot, ringBuffer) 3677 err = &smithy.DeserializationError{ 3678 Err: fmt.Errorf("failed to decode response body, %w", err), 3679 Snapshot: snapshot.Bytes(), 3680 } 3681 return out, metadata, err 3682 } 3683 3684 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3685 err = awsAwsquery_deserializeOpDocumentListConfigurationSetsOutput(&output, decoder) 3686 if err != nil { 3687 var snapshot bytes.Buffer 3688 io.Copy(&snapshot, ringBuffer) 3689 err = &smithy.DeserializationError{ 3690 Err: fmt.Errorf("failed to decode response body, %w", err), 3691 Snapshot: snapshot.Bytes(), 3692 } 3693 return out, metadata, err 3694 } 3695 3696 return out, metadata, err 3697} 3698 3699func awsAwsquery_deserializeOpErrorListConfigurationSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3700 var errorBuffer bytes.Buffer 3701 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3702 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3703 } 3704 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3705 3706 errorCode := "UnknownError" 3707 errorMessage := errorCode 3708 3709 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3710 if err != nil { 3711 return err 3712 } 3713 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3714 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3715 } 3716 if len(errorComponents.Code) != 0 { 3717 errorCode = errorComponents.Code 3718 } 3719 if len(errorComponents.Message) != 0 { 3720 errorMessage = errorComponents.Message 3721 } 3722 errorBody.Seek(0, io.SeekStart) 3723 switch { 3724 default: 3725 genericError := &smithy.GenericAPIError{ 3726 Code: errorCode, 3727 Message: errorMessage, 3728 } 3729 return genericError 3730 3731 } 3732} 3733 3734type awsAwsquery_deserializeOpListCustomVerificationEmailTemplates struct { 3735} 3736 3737func (*awsAwsquery_deserializeOpListCustomVerificationEmailTemplates) ID() string { 3738 return "OperationDeserializer" 3739} 3740 3741func (m *awsAwsquery_deserializeOpListCustomVerificationEmailTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3742 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3743) { 3744 out, metadata, err = next.HandleDeserialize(ctx, in) 3745 if err != nil { 3746 return out, metadata, err 3747 } 3748 3749 response, ok := out.RawResponse.(*smithyhttp.Response) 3750 if !ok { 3751 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3752 } 3753 3754 if response.StatusCode < 200 || response.StatusCode >= 300 { 3755 return out, metadata, awsAwsquery_deserializeOpErrorListCustomVerificationEmailTemplates(response, &metadata) 3756 } 3757 output := &ListCustomVerificationEmailTemplatesOutput{} 3758 out.Result = output 3759 3760 var buff [1024]byte 3761 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3762 body := io.TeeReader(response.Body, ringBuffer) 3763 rootDecoder := xml.NewDecoder(body) 3764 t, err := smithyxml.FetchRootElement(rootDecoder) 3765 if err == io.EOF { 3766 return out, metadata, nil 3767 } 3768 if err != nil { 3769 var snapshot bytes.Buffer 3770 io.Copy(&snapshot, ringBuffer) 3771 return out, metadata, &smithy.DeserializationError{ 3772 Err: fmt.Errorf("failed to decode response body, %w", err), 3773 Snapshot: snapshot.Bytes(), 3774 } 3775 } 3776 3777 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3778 t, err = decoder.GetElement("ListCustomVerificationEmailTemplatesResult") 3779 if err != nil { 3780 var snapshot bytes.Buffer 3781 io.Copy(&snapshot, ringBuffer) 3782 err = &smithy.DeserializationError{ 3783 Err: fmt.Errorf("failed to decode response body, %w", err), 3784 Snapshot: snapshot.Bytes(), 3785 } 3786 return out, metadata, err 3787 } 3788 3789 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3790 err = awsAwsquery_deserializeOpDocumentListCustomVerificationEmailTemplatesOutput(&output, decoder) 3791 if err != nil { 3792 var snapshot bytes.Buffer 3793 io.Copy(&snapshot, ringBuffer) 3794 err = &smithy.DeserializationError{ 3795 Err: fmt.Errorf("failed to decode response body, %w", err), 3796 Snapshot: snapshot.Bytes(), 3797 } 3798 return out, metadata, err 3799 } 3800 3801 return out, metadata, err 3802} 3803 3804func awsAwsquery_deserializeOpErrorListCustomVerificationEmailTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3805 var errorBuffer bytes.Buffer 3806 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3807 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3808 } 3809 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3810 3811 errorCode := "UnknownError" 3812 errorMessage := errorCode 3813 3814 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3815 if err != nil { 3816 return err 3817 } 3818 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3819 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3820 } 3821 if len(errorComponents.Code) != 0 { 3822 errorCode = errorComponents.Code 3823 } 3824 if len(errorComponents.Message) != 0 { 3825 errorMessage = errorComponents.Message 3826 } 3827 errorBody.Seek(0, io.SeekStart) 3828 switch { 3829 default: 3830 genericError := &smithy.GenericAPIError{ 3831 Code: errorCode, 3832 Message: errorMessage, 3833 } 3834 return genericError 3835 3836 } 3837} 3838 3839type awsAwsquery_deserializeOpListIdentities struct { 3840} 3841 3842func (*awsAwsquery_deserializeOpListIdentities) ID() string { 3843 return "OperationDeserializer" 3844} 3845 3846func (m *awsAwsquery_deserializeOpListIdentities) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3847 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3848) { 3849 out, metadata, err = next.HandleDeserialize(ctx, in) 3850 if err != nil { 3851 return out, metadata, err 3852 } 3853 3854 response, ok := out.RawResponse.(*smithyhttp.Response) 3855 if !ok { 3856 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3857 } 3858 3859 if response.StatusCode < 200 || response.StatusCode >= 300 { 3860 return out, metadata, awsAwsquery_deserializeOpErrorListIdentities(response, &metadata) 3861 } 3862 output := &ListIdentitiesOutput{} 3863 out.Result = output 3864 3865 var buff [1024]byte 3866 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3867 body := io.TeeReader(response.Body, ringBuffer) 3868 rootDecoder := xml.NewDecoder(body) 3869 t, err := smithyxml.FetchRootElement(rootDecoder) 3870 if err == io.EOF { 3871 return out, metadata, nil 3872 } 3873 if err != nil { 3874 var snapshot bytes.Buffer 3875 io.Copy(&snapshot, ringBuffer) 3876 return out, metadata, &smithy.DeserializationError{ 3877 Err: fmt.Errorf("failed to decode response body, %w", err), 3878 Snapshot: snapshot.Bytes(), 3879 } 3880 } 3881 3882 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3883 t, err = decoder.GetElement("ListIdentitiesResult") 3884 if err != nil { 3885 var snapshot bytes.Buffer 3886 io.Copy(&snapshot, ringBuffer) 3887 err = &smithy.DeserializationError{ 3888 Err: fmt.Errorf("failed to decode response body, %w", err), 3889 Snapshot: snapshot.Bytes(), 3890 } 3891 return out, metadata, err 3892 } 3893 3894 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3895 err = awsAwsquery_deserializeOpDocumentListIdentitiesOutput(&output, decoder) 3896 if err != nil { 3897 var snapshot bytes.Buffer 3898 io.Copy(&snapshot, ringBuffer) 3899 err = &smithy.DeserializationError{ 3900 Err: fmt.Errorf("failed to decode response body, %w", err), 3901 Snapshot: snapshot.Bytes(), 3902 } 3903 return out, metadata, err 3904 } 3905 3906 return out, metadata, err 3907} 3908 3909func awsAwsquery_deserializeOpErrorListIdentities(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3910 var errorBuffer bytes.Buffer 3911 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3912 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3913 } 3914 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3915 3916 errorCode := "UnknownError" 3917 errorMessage := errorCode 3918 3919 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3920 if err != nil { 3921 return err 3922 } 3923 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3924 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3925 } 3926 if len(errorComponents.Code) != 0 { 3927 errorCode = errorComponents.Code 3928 } 3929 if len(errorComponents.Message) != 0 { 3930 errorMessage = errorComponents.Message 3931 } 3932 errorBody.Seek(0, io.SeekStart) 3933 switch { 3934 default: 3935 genericError := &smithy.GenericAPIError{ 3936 Code: errorCode, 3937 Message: errorMessage, 3938 } 3939 return genericError 3940 3941 } 3942} 3943 3944type awsAwsquery_deserializeOpListIdentityPolicies struct { 3945} 3946 3947func (*awsAwsquery_deserializeOpListIdentityPolicies) ID() string { 3948 return "OperationDeserializer" 3949} 3950 3951func (m *awsAwsquery_deserializeOpListIdentityPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3952 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3953) { 3954 out, metadata, err = next.HandleDeserialize(ctx, in) 3955 if err != nil { 3956 return out, metadata, err 3957 } 3958 3959 response, ok := out.RawResponse.(*smithyhttp.Response) 3960 if !ok { 3961 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3962 } 3963 3964 if response.StatusCode < 200 || response.StatusCode >= 300 { 3965 return out, metadata, awsAwsquery_deserializeOpErrorListIdentityPolicies(response, &metadata) 3966 } 3967 output := &ListIdentityPoliciesOutput{} 3968 out.Result = output 3969 3970 var buff [1024]byte 3971 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3972 body := io.TeeReader(response.Body, ringBuffer) 3973 rootDecoder := xml.NewDecoder(body) 3974 t, err := smithyxml.FetchRootElement(rootDecoder) 3975 if err == io.EOF { 3976 return out, metadata, nil 3977 } 3978 if err != nil { 3979 var snapshot bytes.Buffer 3980 io.Copy(&snapshot, ringBuffer) 3981 return out, metadata, &smithy.DeserializationError{ 3982 Err: fmt.Errorf("failed to decode response body, %w", err), 3983 Snapshot: snapshot.Bytes(), 3984 } 3985 } 3986 3987 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3988 t, err = decoder.GetElement("ListIdentityPoliciesResult") 3989 if err != nil { 3990 var snapshot bytes.Buffer 3991 io.Copy(&snapshot, ringBuffer) 3992 err = &smithy.DeserializationError{ 3993 Err: fmt.Errorf("failed to decode response body, %w", err), 3994 Snapshot: snapshot.Bytes(), 3995 } 3996 return out, metadata, err 3997 } 3998 3999 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4000 err = awsAwsquery_deserializeOpDocumentListIdentityPoliciesOutput(&output, decoder) 4001 if err != nil { 4002 var snapshot bytes.Buffer 4003 io.Copy(&snapshot, ringBuffer) 4004 err = &smithy.DeserializationError{ 4005 Err: fmt.Errorf("failed to decode response body, %w", err), 4006 Snapshot: snapshot.Bytes(), 4007 } 4008 return out, metadata, err 4009 } 4010 4011 return out, metadata, err 4012} 4013 4014func awsAwsquery_deserializeOpErrorListIdentityPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4015 var errorBuffer bytes.Buffer 4016 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4017 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4018 } 4019 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4020 4021 errorCode := "UnknownError" 4022 errorMessage := errorCode 4023 4024 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4025 if err != nil { 4026 return err 4027 } 4028 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4029 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4030 } 4031 if len(errorComponents.Code) != 0 { 4032 errorCode = errorComponents.Code 4033 } 4034 if len(errorComponents.Message) != 0 { 4035 errorMessage = errorComponents.Message 4036 } 4037 errorBody.Seek(0, io.SeekStart) 4038 switch { 4039 default: 4040 genericError := &smithy.GenericAPIError{ 4041 Code: errorCode, 4042 Message: errorMessage, 4043 } 4044 return genericError 4045 4046 } 4047} 4048 4049type awsAwsquery_deserializeOpListReceiptFilters struct { 4050} 4051 4052func (*awsAwsquery_deserializeOpListReceiptFilters) ID() string { 4053 return "OperationDeserializer" 4054} 4055 4056func (m *awsAwsquery_deserializeOpListReceiptFilters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4057 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4058) { 4059 out, metadata, err = next.HandleDeserialize(ctx, in) 4060 if err != nil { 4061 return out, metadata, err 4062 } 4063 4064 response, ok := out.RawResponse.(*smithyhttp.Response) 4065 if !ok { 4066 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4067 } 4068 4069 if response.StatusCode < 200 || response.StatusCode >= 300 { 4070 return out, metadata, awsAwsquery_deserializeOpErrorListReceiptFilters(response, &metadata) 4071 } 4072 output := &ListReceiptFiltersOutput{} 4073 out.Result = output 4074 4075 var buff [1024]byte 4076 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4077 body := io.TeeReader(response.Body, ringBuffer) 4078 rootDecoder := xml.NewDecoder(body) 4079 t, err := smithyxml.FetchRootElement(rootDecoder) 4080 if err == io.EOF { 4081 return out, metadata, nil 4082 } 4083 if err != nil { 4084 var snapshot bytes.Buffer 4085 io.Copy(&snapshot, ringBuffer) 4086 return out, metadata, &smithy.DeserializationError{ 4087 Err: fmt.Errorf("failed to decode response body, %w", err), 4088 Snapshot: snapshot.Bytes(), 4089 } 4090 } 4091 4092 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4093 t, err = decoder.GetElement("ListReceiptFiltersResult") 4094 if err != nil { 4095 var snapshot bytes.Buffer 4096 io.Copy(&snapshot, ringBuffer) 4097 err = &smithy.DeserializationError{ 4098 Err: fmt.Errorf("failed to decode response body, %w", err), 4099 Snapshot: snapshot.Bytes(), 4100 } 4101 return out, metadata, err 4102 } 4103 4104 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4105 err = awsAwsquery_deserializeOpDocumentListReceiptFiltersOutput(&output, decoder) 4106 if err != nil { 4107 var snapshot bytes.Buffer 4108 io.Copy(&snapshot, ringBuffer) 4109 err = &smithy.DeserializationError{ 4110 Err: fmt.Errorf("failed to decode response body, %w", err), 4111 Snapshot: snapshot.Bytes(), 4112 } 4113 return out, metadata, err 4114 } 4115 4116 return out, metadata, err 4117} 4118 4119func awsAwsquery_deserializeOpErrorListReceiptFilters(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4120 var errorBuffer bytes.Buffer 4121 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4122 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4123 } 4124 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4125 4126 errorCode := "UnknownError" 4127 errorMessage := errorCode 4128 4129 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4130 if err != nil { 4131 return err 4132 } 4133 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4134 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4135 } 4136 if len(errorComponents.Code) != 0 { 4137 errorCode = errorComponents.Code 4138 } 4139 if len(errorComponents.Message) != 0 { 4140 errorMessage = errorComponents.Message 4141 } 4142 errorBody.Seek(0, io.SeekStart) 4143 switch { 4144 default: 4145 genericError := &smithy.GenericAPIError{ 4146 Code: errorCode, 4147 Message: errorMessage, 4148 } 4149 return genericError 4150 4151 } 4152} 4153 4154type awsAwsquery_deserializeOpListReceiptRuleSets struct { 4155} 4156 4157func (*awsAwsquery_deserializeOpListReceiptRuleSets) ID() string { 4158 return "OperationDeserializer" 4159} 4160 4161func (m *awsAwsquery_deserializeOpListReceiptRuleSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4162 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4163) { 4164 out, metadata, err = next.HandleDeserialize(ctx, in) 4165 if err != nil { 4166 return out, metadata, err 4167 } 4168 4169 response, ok := out.RawResponse.(*smithyhttp.Response) 4170 if !ok { 4171 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4172 } 4173 4174 if response.StatusCode < 200 || response.StatusCode >= 300 { 4175 return out, metadata, awsAwsquery_deserializeOpErrorListReceiptRuleSets(response, &metadata) 4176 } 4177 output := &ListReceiptRuleSetsOutput{} 4178 out.Result = output 4179 4180 var buff [1024]byte 4181 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4182 body := io.TeeReader(response.Body, ringBuffer) 4183 rootDecoder := xml.NewDecoder(body) 4184 t, err := smithyxml.FetchRootElement(rootDecoder) 4185 if err == io.EOF { 4186 return out, metadata, nil 4187 } 4188 if err != nil { 4189 var snapshot bytes.Buffer 4190 io.Copy(&snapshot, ringBuffer) 4191 return out, metadata, &smithy.DeserializationError{ 4192 Err: fmt.Errorf("failed to decode response body, %w", err), 4193 Snapshot: snapshot.Bytes(), 4194 } 4195 } 4196 4197 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4198 t, err = decoder.GetElement("ListReceiptRuleSetsResult") 4199 if err != nil { 4200 var snapshot bytes.Buffer 4201 io.Copy(&snapshot, ringBuffer) 4202 err = &smithy.DeserializationError{ 4203 Err: fmt.Errorf("failed to decode response body, %w", err), 4204 Snapshot: snapshot.Bytes(), 4205 } 4206 return out, metadata, err 4207 } 4208 4209 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4210 err = awsAwsquery_deserializeOpDocumentListReceiptRuleSetsOutput(&output, decoder) 4211 if err != nil { 4212 var snapshot bytes.Buffer 4213 io.Copy(&snapshot, ringBuffer) 4214 err = &smithy.DeserializationError{ 4215 Err: fmt.Errorf("failed to decode response body, %w", err), 4216 Snapshot: snapshot.Bytes(), 4217 } 4218 return out, metadata, err 4219 } 4220 4221 return out, metadata, err 4222} 4223 4224func awsAwsquery_deserializeOpErrorListReceiptRuleSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4225 var errorBuffer bytes.Buffer 4226 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4227 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4228 } 4229 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4230 4231 errorCode := "UnknownError" 4232 errorMessage := errorCode 4233 4234 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4235 if err != nil { 4236 return err 4237 } 4238 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4239 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4240 } 4241 if len(errorComponents.Code) != 0 { 4242 errorCode = errorComponents.Code 4243 } 4244 if len(errorComponents.Message) != 0 { 4245 errorMessage = errorComponents.Message 4246 } 4247 errorBody.Seek(0, io.SeekStart) 4248 switch { 4249 default: 4250 genericError := &smithy.GenericAPIError{ 4251 Code: errorCode, 4252 Message: errorMessage, 4253 } 4254 return genericError 4255 4256 } 4257} 4258 4259type awsAwsquery_deserializeOpListTemplates struct { 4260} 4261 4262func (*awsAwsquery_deserializeOpListTemplates) ID() string { 4263 return "OperationDeserializer" 4264} 4265 4266func (m *awsAwsquery_deserializeOpListTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4267 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4268) { 4269 out, metadata, err = next.HandleDeserialize(ctx, in) 4270 if err != nil { 4271 return out, metadata, err 4272 } 4273 4274 response, ok := out.RawResponse.(*smithyhttp.Response) 4275 if !ok { 4276 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4277 } 4278 4279 if response.StatusCode < 200 || response.StatusCode >= 300 { 4280 return out, metadata, awsAwsquery_deserializeOpErrorListTemplates(response, &metadata) 4281 } 4282 output := &ListTemplatesOutput{} 4283 out.Result = output 4284 4285 var buff [1024]byte 4286 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4287 body := io.TeeReader(response.Body, ringBuffer) 4288 rootDecoder := xml.NewDecoder(body) 4289 t, err := smithyxml.FetchRootElement(rootDecoder) 4290 if err == io.EOF { 4291 return out, metadata, nil 4292 } 4293 if err != nil { 4294 var snapshot bytes.Buffer 4295 io.Copy(&snapshot, ringBuffer) 4296 return out, metadata, &smithy.DeserializationError{ 4297 Err: fmt.Errorf("failed to decode response body, %w", err), 4298 Snapshot: snapshot.Bytes(), 4299 } 4300 } 4301 4302 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4303 t, err = decoder.GetElement("ListTemplatesResult") 4304 if err != nil { 4305 var snapshot bytes.Buffer 4306 io.Copy(&snapshot, ringBuffer) 4307 err = &smithy.DeserializationError{ 4308 Err: fmt.Errorf("failed to decode response body, %w", err), 4309 Snapshot: snapshot.Bytes(), 4310 } 4311 return out, metadata, err 4312 } 4313 4314 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4315 err = awsAwsquery_deserializeOpDocumentListTemplatesOutput(&output, decoder) 4316 if err != nil { 4317 var snapshot bytes.Buffer 4318 io.Copy(&snapshot, ringBuffer) 4319 err = &smithy.DeserializationError{ 4320 Err: fmt.Errorf("failed to decode response body, %w", err), 4321 Snapshot: snapshot.Bytes(), 4322 } 4323 return out, metadata, err 4324 } 4325 4326 return out, metadata, err 4327} 4328 4329func awsAwsquery_deserializeOpErrorListTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4330 var errorBuffer bytes.Buffer 4331 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4332 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4333 } 4334 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4335 4336 errorCode := "UnknownError" 4337 errorMessage := errorCode 4338 4339 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4340 if err != nil { 4341 return err 4342 } 4343 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4344 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4345 } 4346 if len(errorComponents.Code) != 0 { 4347 errorCode = errorComponents.Code 4348 } 4349 if len(errorComponents.Message) != 0 { 4350 errorMessage = errorComponents.Message 4351 } 4352 errorBody.Seek(0, io.SeekStart) 4353 switch { 4354 default: 4355 genericError := &smithy.GenericAPIError{ 4356 Code: errorCode, 4357 Message: errorMessage, 4358 } 4359 return genericError 4360 4361 } 4362} 4363 4364type awsAwsquery_deserializeOpListVerifiedEmailAddresses struct { 4365} 4366 4367func (*awsAwsquery_deserializeOpListVerifiedEmailAddresses) ID() string { 4368 return "OperationDeserializer" 4369} 4370 4371func (m *awsAwsquery_deserializeOpListVerifiedEmailAddresses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4372 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4373) { 4374 out, metadata, err = next.HandleDeserialize(ctx, in) 4375 if err != nil { 4376 return out, metadata, err 4377 } 4378 4379 response, ok := out.RawResponse.(*smithyhttp.Response) 4380 if !ok { 4381 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4382 } 4383 4384 if response.StatusCode < 200 || response.StatusCode >= 300 { 4385 return out, metadata, awsAwsquery_deserializeOpErrorListVerifiedEmailAddresses(response, &metadata) 4386 } 4387 output := &ListVerifiedEmailAddressesOutput{} 4388 out.Result = output 4389 4390 var buff [1024]byte 4391 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4392 body := io.TeeReader(response.Body, ringBuffer) 4393 rootDecoder := xml.NewDecoder(body) 4394 t, err := smithyxml.FetchRootElement(rootDecoder) 4395 if err == io.EOF { 4396 return out, metadata, nil 4397 } 4398 if err != nil { 4399 var snapshot bytes.Buffer 4400 io.Copy(&snapshot, ringBuffer) 4401 return out, metadata, &smithy.DeserializationError{ 4402 Err: fmt.Errorf("failed to decode response body, %w", err), 4403 Snapshot: snapshot.Bytes(), 4404 } 4405 } 4406 4407 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4408 t, err = decoder.GetElement("ListVerifiedEmailAddressesResult") 4409 if err != nil { 4410 var snapshot bytes.Buffer 4411 io.Copy(&snapshot, ringBuffer) 4412 err = &smithy.DeserializationError{ 4413 Err: fmt.Errorf("failed to decode response body, %w", err), 4414 Snapshot: snapshot.Bytes(), 4415 } 4416 return out, metadata, err 4417 } 4418 4419 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4420 err = awsAwsquery_deserializeOpDocumentListVerifiedEmailAddressesOutput(&output, decoder) 4421 if err != nil { 4422 var snapshot bytes.Buffer 4423 io.Copy(&snapshot, ringBuffer) 4424 err = &smithy.DeserializationError{ 4425 Err: fmt.Errorf("failed to decode response body, %w", err), 4426 Snapshot: snapshot.Bytes(), 4427 } 4428 return out, metadata, err 4429 } 4430 4431 return out, metadata, err 4432} 4433 4434func awsAwsquery_deserializeOpErrorListVerifiedEmailAddresses(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4435 var errorBuffer bytes.Buffer 4436 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4437 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4438 } 4439 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4440 4441 errorCode := "UnknownError" 4442 errorMessage := errorCode 4443 4444 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4445 if err != nil { 4446 return err 4447 } 4448 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4449 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4450 } 4451 if len(errorComponents.Code) != 0 { 4452 errorCode = errorComponents.Code 4453 } 4454 if len(errorComponents.Message) != 0 { 4455 errorMessage = errorComponents.Message 4456 } 4457 errorBody.Seek(0, io.SeekStart) 4458 switch { 4459 default: 4460 genericError := &smithy.GenericAPIError{ 4461 Code: errorCode, 4462 Message: errorMessage, 4463 } 4464 return genericError 4465 4466 } 4467} 4468 4469type awsAwsquery_deserializeOpPutConfigurationSetDeliveryOptions struct { 4470} 4471 4472func (*awsAwsquery_deserializeOpPutConfigurationSetDeliveryOptions) ID() string { 4473 return "OperationDeserializer" 4474} 4475 4476func (m *awsAwsquery_deserializeOpPutConfigurationSetDeliveryOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4477 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4478) { 4479 out, metadata, err = next.HandleDeserialize(ctx, in) 4480 if err != nil { 4481 return out, metadata, err 4482 } 4483 4484 response, ok := out.RawResponse.(*smithyhttp.Response) 4485 if !ok { 4486 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4487 } 4488 4489 if response.StatusCode < 200 || response.StatusCode >= 300 { 4490 return out, metadata, awsAwsquery_deserializeOpErrorPutConfigurationSetDeliveryOptions(response, &metadata) 4491 } 4492 output := &PutConfigurationSetDeliveryOptionsOutput{} 4493 out.Result = output 4494 4495 var buff [1024]byte 4496 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4497 body := io.TeeReader(response.Body, ringBuffer) 4498 rootDecoder := xml.NewDecoder(body) 4499 t, err := smithyxml.FetchRootElement(rootDecoder) 4500 if err == io.EOF { 4501 return out, metadata, nil 4502 } 4503 if err != nil { 4504 var snapshot bytes.Buffer 4505 io.Copy(&snapshot, ringBuffer) 4506 return out, metadata, &smithy.DeserializationError{ 4507 Err: fmt.Errorf("failed to decode response body, %w", err), 4508 Snapshot: snapshot.Bytes(), 4509 } 4510 } 4511 4512 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4513 t, err = decoder.GetElement("PutConfigurationSetDeliveryOptionsResult") 4514 if err != nil { 4515 var snapshot bytes.Buffer 4516 io.Copy(&snapshot, ringBuffer) 4517 err = &smithy.DeserializationError{ 4518 Err: fmt.Errorf("failed to decode response body, %w", err), 4519 Snapshot: snapshot.Bytes(), 4520 } 4521 return out, metadata, err 4522 } 4523 4524 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4525 err = awsAwsquery_deserializeOpDocumentPutConfigurationSetDeliveryOptionsOutput(&output, decoder) 4526 if err != nil { 4527 var snapshot bytes.Buffer 4528 io.Copy(&snapshot, ringBuffer) 4529 err = &smithy.DeserializationError{ 4530 Err: fmt.Errorf("failed to decode response body, %w", err), 4531 Snapshot: snapshot.Bytes(), 4532 } 4533 return out, metadata, err 4534 } 4535 4536 return out, metadata, err 4537} 4538 4539func awsAwsquery_deserializeOpErrorPutConfigurationSetDeliveryOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4540 var errorBuffer bytes.Buffer 4541 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4542 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4543 } 4544 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4545 4546 errorCode := "UnknownError" 4547 errorMessage := errorCode 4548 4549 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4550 if err != nil { 4551 return err 4552 } 4553 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4554 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4555 } 4556 if len(errorComponents.Code) != 0 { 4557 errorCode = errorComponents.Code 4558 } 4559 if len(errorComponents.Message) != 0 { 4560 errorMessage = errorComponents.Message 4561 } 4562 errorBody.Seek(0, io.SeekStart) 4563 switch { 4564 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 4565 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 4566 4567 case strings.EqualFold("InvalidDeliveryOptionsException", errorCode): 4568 return awsAwsquery_deserializeErrorInvalidDeliveryOptionsException(response, errorBody) 4569 4570 default: 4571 genericError := &smithy.GenericAPIError{ 4572 Code: errorCode, 4573 Message: errorMessage, 4574 } 4575 return genericError 4576 4577 } 4578} 4579 4580type awsAwsquery_deserializeOpPutIdentityPolicy struct { 4581} 4582 4583func (*awsAwsquery_deserializeOpPutIdentityPolicy) ID() string { 4584 return "OperationDeserializer" 4585} 4586 4587func (m *awsAwsquery_deserializeOpPutIdentityPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4588 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4589) { 4590 out, metadata, err = next.HandleDeserialize(ctx, in) 4591 if err != nil { 4592 return out, metadata, err 4593 } 4594 4595 response, ok := out.RawResponse.(*smithyhttp.Response) 4596 if !ok { 4597 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4598 } 4599 4600 if response.StatusCode < 200 || response.StatusCode >= 300 { 4601 return out, metadata, awsAwsquery_deserializeOpErrorPutIdentityPolicy(response, &metadata) 4602 } 4603 output := &PutIdentityPolicyOutput{} 4604 out.Result = output 4605 4606 var buff [1024]byte 4607 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4608 body := io.TeeReader(response.Body, ringBuffer) 4609 rootDecoder := xml.NewDecoder(body) 4610 t, err := smithyxml.FetchRootElement(rootDecoder) 4611 if err == io.EOF { 4612 return out, metadata, nil 4613 } 4614 if err != nil { 4615 var snapshot bytes.Buffer 4616 io.Copy(&snapshot, ringBuffer) 4617 return out, metadata, &smithy.DeserializationError{ 4618 Err: fmt.Errorf("failed to decode response body, %w", err), 4619 Snapshot: snapshot.Bytes(), 4620 } 4621 } 4622 4623 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4624 t, err = decoder.GetElement("PutIdentityPolicyResult") 4625 if err != nil { 4626 var snapshot bytes.Buffer 4627 io.Copy(&snapshot, ringBuffer) 4628 err = &smithy.DeserializationError{ 4629 Err: fmt.Errorf("failed to decode response body, %w", err), 4630 Snapshot: snapshot.Bytes(), 4631 } 4632 return out, metadata, err 4633 } 4634 4635 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4636 err = awsAwsquery_deserializeOpDocumentPutIdentityPolicyOutput(&output, decoder) 4637 if err != nil { 4638 var snapshot bytes.Buffer 4639 io.Copy(&snapshot, ringBuffer) 4640 err = &smithy.DeserializationError{ 4641 Err: fmt.Errorf("failed to decode response body, %w", err), 4642 Snapshot: snapshot.Bytes(), 4643 } 4644 return out, metadata, err 4645 } 4646 4647 return out, metadata, err 4648} 4649 4650func awsAwsquery_deserializeOpErrorPutIdentityPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4651 var errorBuffer bytes.Buffer 4652 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4653 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4654 } 4655 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4656 4657 errorCode := "UnknownError" 4658 errorMessage := errorCode 4659 4660 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4661 if err != nil { 4662 return err 4663 } 4664 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4665 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4666 } 4667 if len(errorComponents.Code) != 0 { 4668 errorCode = errorComponents.Code 4669 } 4670 if len(errorComponents.Message) != 0 { 4671 errorMessage = errorComponents.Message 4672 } 4673 errorBody.Seek(0, io.SeekStart) 4674 switch { 4675 case strings.EqualFold("InvalidPolicyException", errorCode): 4676 return awsAwsquery_deserializeErrorInvalidPolicyException(response, errorBody) 4677 4678 default: 4679 genericError := &smithy.GenericAPIError{ 4680 Code: errorCode, 4681 Message: errorMessage, 4682 } 4683 return genericError 4684 4685 } 4686} 4687 4688type awsAwsquery_deserializeOpReorderReceiptRuleSet struct { 4689} 4690 4691func (*awsAwsquery_deserializeOpReorderReceiptRuleSet) ID() string { 4692 return "OperationDeserializer" 4693} 4694 4695func (m *awsAwsquery_deserializeOpReorderReceiptRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4696 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4697) { 4698 out, metadata, err = next.HandleDeserialize(ctx, in) 4699 if err != nil { 4700 return out, metadata, err 4701 } 4702 4703 response, ok := out.RawResponse.(*smithyhttp.Response) 4704 if !ok { 4705 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4706 } 4707 4708 if response.StatusCode < 200 || response.StatusCode >= 300 { 4709 return out, metadata, awsAwsquery_deserializeOpErrorReorderReceiptRuleSet(response, &metadata) 4710 } 4711 output := &ReorderReceiptRuleSetOutput{} 4712 out.Result = output 4713 4714 var buff [1024]byte 4715 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4716 body := io.TeeReader(response.Body, ringBuffer) 4717 rootDecoder := xml.NewDecoder(body) 4718 t, err := smithyxml.FetchRootElement(rootDecoder) 4719 if err == io.EOF { 4720 return out, metadata, nil 4721 } 4722 if err != nil { 4723 var snapshot bytes.Buffer 4724 io.Copy(&snapshot, ringBuffer) 4725 return out, metadata, &smithy.DeserializationError{ 4726 Err: fmt.Errorf("failed to decode response body, %w", err), 4727 Snapshot: snapshot.Bytes(), 4728 } 4729 } 4730 4731 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4732 t, err = decoder.GetElement("ReorderReceiptRuleSetResult") 4733 if err != nil { 4734 var snapshot bytes.Buffer 4735 io.Copy(&snapshot, ringBuffer) 4736 err = &smithy.DeserializationError{ 4737 Err: fmt.Errorf("failed to decode response body, %w", err), 4738 Snapshot: snapshot.Bytes(), 4739 } 4740 return out, metadata, err 4741 } 4742 4743 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4744 err = awsAwsquery_deserializeOpDocumentReorderReceiptRuleSetOutput(&output, decoder) 4745 if err != nil { 4746 var snapshot bytes.Buffer 4747 io.Copy(&snapshot, ringBuffer) 4748 err = &smithy.DeserializationError{ 4749 Err: fmt.Errorf("failed to decode response body, %w", err), 4750 Snapshot: snapshot.Bytes(), 4751 } 4752 return out, metadata, err 4753 } 4754 4755 return out, metadata, err 4756} 4757 4758func awsAwsquery_deserializeOpErrorReorderReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4759 var errorBuffer bytes.Buffer 4760 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4761 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4762 } 4763 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4764 4765 errorCode := "UnknownError" 4766 errorMessage := errorCode 4767 4768 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4769 if err != nil { 4770 return err 4771 } 4772 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4773 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4774 } 4775 if len(errorComponents.Code) != 0 { 4776 errorCode = errorComponents.Code 4777 } 4778 if len(errorComponents.Message) != 0 { 4779 errorMessage = errorComponents.Message 4780 } 4781 errorBody.Seek(0, io.SeekStart) 4782 switch { 4783 case strings.EqualFold("RuleDoesNotExistException", errorCode): 4784 return awsAwsquery_deserializeErrorRuleDoesNotExistException(response, errorBody) 4785 4786 case strings.EqualFold("RuleSetDoesNotExistException", errorCode): 4787 return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody) 4788 4789 default: 4790 genericError := &smithy.GenericAPIError{ 4791 Code: errorCode, 4792 Message: errorMessage, 4793 } 4794 return genericError 4795 4796 } 4797} 4798 4799type awsAwsquery_deserializeOpSendBounce struct { 4800} 4801 4802func (*awsAwsquery_deserializeOpSendBounce) ID() string { 4803 return "OperationDeserializer" 4804} 4805 4806func (m *awsAwsquery_deserializeOpSendBounce) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4807 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4808) { 4809 out, metadata, err = next.HandleDeserialize(ctx, in) 4810 if err != nil { 4811 return out, metadata, err 4812 } 4813 4814 response, ok := out.RawResponse.(*smithyhttp.Response) 4815 if !ok { 4816 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4817 } 4818 4819 if response.StatusCode < 200 || response.StatusCode >= 300 { 4820 return out, metadata, awsAwsquery_deserializeOpErrorSendBounce(response, &metadata) 4821 } 4822 output := &SendBounceOutput{} 4823 out.Result = output 4824 4825 var buff [1024]byte 4826 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4827 body := io.TeeReader(response.Body, ringBuffer) 4828 rootDecoder := xml.NewDecoder(body) 4829 t, err := smithyxml.FetchRootElement(rootDecoder) 4830 if err == io.EOF { 4831 return out, metadata, nil 4832 } 4833 if err != nil { 4834 var snapshot bytes.Buffer 4835 io.Copy(&snapshot, ringBuffer) 4836 return out, metadata, &smithy.DeserializationError{ 4837 Err: fmt.Errorf("failed to decode response body, %w", err), 4838 Snapshot: snapshot.Bytes(), 4839 } 4840 } 4841 4842 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4843 t, err = decoder.GetElement("SendBounceResult") 4844 if err != nil { 4845 var snapshot bytes.Buffer 4846 io.Copy(&snapshot, ringBuffer) 4847 err = &smithy.DeserializationError{ 4848 Err: fmt.Errorf("failed to decode response body, %w", err), 4849 Snapshot: snapshot.Bytes(), 4850 } 4851 return out, metadata, err 4852 } 4853 4854 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4855 err = awsAwsquery_deserializeOpDocumentSendBounceOutput(&output, decoder) 4856 if err != nil { 4857 var snapshot bytes.Buffer 4858 io.Copy(&snapshot, ringBuffer) 4859 err = &smithy.DeserializationError{ 4860 Err: fmt.Errorf("failed to decode response body, %w", err), 4861 Snapshot: snapshot.Bytes(), 4862 } 4863 return out, metadata, err 4864 } 4865 4866 return out, metadata, err 4867} 4868 4869func awsAwsquery_deserializeOpErrorSendBounce(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4870 var errorBuffer bytes.Buffer 4871 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4872 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4873 } 4874 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4875 4876 errorCode := "UnknownError" 4877 errorMessage := errorCode 4878 4879 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4880 if err != nil { 4881 return err 4882 } 4883 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4884 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4885 } 4886 if len(errorComponents.Code) != 0 { 4887 errorCode = errorComponents.Code 4888 } 4889 if len(errorComponents.Message) != 0 { 4890 errorMessage = errorComponents.Message 4891 } 4892 errorBody.Seek(0, io.SeekStart) 4893 switch { 4894 case strings.EqualFold("MessageRejected", errorCode): 4895 return awsAwsquery_deserializeErrorMessageRejected(response, errorBody) 4896 4897 default: 4898 genericError := &smithy.GenericAPIError{ 4899 Code: errorCode, 4900 Message: errorMessage, 4901 } 4902 return genericError 4903 4904 } 4905} 4906 4907type awsAwsquery_deserializeOpSendBulkTemplatedEmail struct { 4908} 4909 4910func (*awsAwsquery_deserializeOpSendBulkTemplatedEmail) ID() string { 4911 return "OperationDeserializer" 4912} 4913 4914func (m *awsAwsquery_deserializeOpSendBulkTemplatedEmail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4915 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4916) { 4917 out, metadata, err = next.HandleDeserialize(ctx, in) 4918 if err != nil { 4919 return out, metadata, err 4920 } 4921 4922 response, ok := out.RawResponse.(*smithyhttp.Response) 4923 if !ok { 4924 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4925 } 4926 4927 if response.StatusCode < 200 || response.StatusCode >= 300 { 4928 return out, metadata, awsAwsquery_deserializeOpErrorSendBulkTemplatedEmail(response, &metadata) 4929 } 4930 output := &SendBulkTemplatedEmailOutput{} 4931 out.Result = output 4932 4933 var buff [1024]byte 4934 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4935 body := io.TeeReader(response.Body, ringBuffer) 4936 rootDecoder := xml.NewDecoder(body) 4937 t, err := smithyxml.FetchRootElement(rootDecoder) 4938 if err == io.EOF { 4939 return out, metadata, nil 4940 } 4941 if err != nil { 4942 var snapshot bytes.Buffer 4943 io.Copy(&snapshot, ringBuffer) 4944 return out, metadata, &smithy.DeserializationError{ 4945 Err: fmt.Errorf("failed to decode response body, %w", err), 4946 Snapshot: snapshot.Bytes(), 4947 } 4948 } 4949 4950 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4951 t, err = decoder.GetElement("SendBulkTemplatedEmailResult") 4952 if err != nil { 4953 var snapshot bytes.Buffer 4954 io.Copy(&snapshot, ringBuffer) 4955 err = &smithy.DeserializationError{ 4956 Err: fmt.Errorf("failed to decode response body, %w", err), 4957 Snapshot: snapshot.Bytes(), 4958 } 4959 return out, metadata, err 4960 } 4961 4962 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4963 err = awsAwsquery_deserializeOpDocumentSendBulkTemplatedEmailOutput(&output, decoder) 4964 if err != nil { 4965 var snapshot bytes.Buffer 4966 io.Copy(&snapshot, ringBuffer) 4967 err = &smithy.DeserializationError{ 4968 Err: fmt.Errorf("failed to decode response body, %w", err), 4969 Snapshot: snapshot.Bytes(), 4970 } 4971 return out, metadata, err 4972 } 4973 4974 return out, metadata, err 4975} 4976 4977func awsAwsquery_deserializeOpErrorSendBulkTemplatedEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4978 var errorBuffer bytes.Buffer 4979 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4980 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4981 } 4982 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4983 4984 errorCode := "UnknownError" 4985 errorMessage := errorCode 4986 4987 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4988 if err != nil { 4989 return err 4990 } 4991 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4992 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4993 } 4994 if len(errorComponents.Code) != 0 { 4995 errorCode = errorComponents.Code 4996 } 4997 if len(errorComponents.Message) != 0 { 4998 errorMessage = errorComponents.Message 4999 } 5000 errorBody.Seek(0, io.SeekStart) 5001 switch { 5002 case strings.EqualFold("AccountSendingPausedException", errorCode): 5003 return awsAwsquery_deserializeErrorAccountSendingPausedException(response, errorBody) 5004 5005 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 5006 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 5007 5008 case strings.EqualFold("ConfigurationSetSendingPausedException", errorCode): 5009 return awsAwsquery_deserializeErrorConfigurationSetSendingPausedException(response, errorBody) 5010 5011 case strings.EqualFold("MailFromDomainNotVerifiedException", errorCode): 5012 return awsAwsquery_deserializeErrorMailFromDomainNotVerifiedException(response, errorBody) 5013 5014 case strings.EqualFold("MessageRejected", errorCode): 5015 return awsAwsquery_deserializeErrorMessageRejected(response, errorBody) 5016 5017 case strings.EqualFold("TemplateDoesNotExistException", errorCode): 5018 return awsAwsquery_deserializeErrorTemplateDoesNotExistException(response, errorBody) 5019 5020 default: 5021 genericError := &smithy.GenericAPIError{ 5022 Code: errorCode, 5023 Message: errorMessage, 5024 } 5025 return genericError 5026 5027 } 5028} 5029 5030type awsAwsquery_deserializeOpSendCustomVerificationEmail struct { 5031} 5032 5033func (*awsAwsquery_deserializeOpSendCustomVerificationEmail) ID() string { 5034 return "OperationDeserializer" 5035} 5036 5037func (m *awsAwsquery_deserializeOpSendCustomVerificationEmail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5038 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5039) { 5040 out, metadata, err = next.HandleDeserialize(ctx, in) 5041 if err != nil { 5042 return out, metadata, err 5043 } 5044 5045 response, ok := out.RawResponse.(*smithyhttp.Response) 5046 if !ok { 5047 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5048 } 5049 5050 if response.StatusCode < 200 || response.StatusCode >= 300 { 5051 return out, metadata, awsAwsquery_deserializeOpErrorSendCustomVerificationEmail(response, &metadata) 5052 } 5053 output := &SendCustomVerificationEmailOutput{} 5054 out.Result = output 5055 5056 var buff [1024]byte 5057 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5058 body := io.TeeReader(response.Body, ringBuffer) 5059 rootDecoder := xml.NewDecoder(body) 5060 t, err := smithyxml.FetchRootElement(rootDecoder) 5061 if err == io.EOF { 5062 return out, metadata, nil 5063 } 5064 if err != nil { 5065 var snapshot bytes.Buffer 5066 io.Copy(&snapshot, ringBuffer) 5067 return out, metadata, &smithy.DeserializationError{ 5068 Err: fmt.Errorf("failed to decode response body, %w", err), 5069 Snapshot: snapshot.Bytes(), 5070 } 5071 } 5072 5073 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5074 t, err = decoder.GetElement("SendCustomVerificationEmailResult") 5075 if err != nil { 5076 var snapshot bytes.Buffer 5077 io.Copy(&snapshot, ringBuffer) 5078 err = &smithy.DeserializationError{ 5079 Err: fmt.Errorf("failed to decode response body, %w", err), 5080 Snapshot: snapshot.Bytes(), 5081 } 5082 return out, metadata, err 5083 } 5084 5085 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5086 err = awsAwsquery_deserializeOpDocumentSendCustomVerificationEmailOutput(&output, decoder) 5087 if err != nil { 5088 var snapshot bytes.Buffer 5089 io.Copy(&snapshot, ringBuffer) 5090 err = &smithy.DeserializationError{ 5091 Err: fmt.Errorf("failed to decode response body, %w", err), 5092 Snapshot: snapshot.Bytes(), 5093 } 5094 return out, metadata, err 5095 } 5096 5097 return out, metadata, err 5098} 5099 5100func awsAwsquery_deserializeOpErrorSendCustomVerificationEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5101 var errorBuffer bytes.Buffer 5102 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5103 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5104 } 5105 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5106 5107 errorCode := "UnknownError" 5108 errorMessage := errorCode 5109 5110 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5111 if err != nil { 5112 return err 5113 } 5114 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5115 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5116 } 5117 if len(errorComponents.Code) != 0 { 5118 errorCode = errorComponents.Code 5119 } 5120 if len(errorComponents.Message) != 0 { 5121 errorMessage = errorComponents.Message 5122 } 5123 errorBody.Seek(0, io.SeekStart) 5124 switch { 5125 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 5126 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 5127 5128 case strings.EqualFold("CustomVerificationEmailTemplateDoesNotExistException", errorCode): 5129 return awsAwsquery_deserializeErrorCustomVerificationEmailTemplateDoesNotExistException(response, errorBody) 5130 5131 case strings.EqualFold("FromEmailAddressNotVerifiedException", errorCode): 5132 return awsAwsquery_deserializeErrorFromEmailAddressNotVerifiedException(response, errorBody) 5133 5134 case strings.EqualFold("MessageRejected", errorCode): 5135 return awsAwsquery_deserializeErrorMessageRejected(response, errorBody) 5136 5137 case strings.EqualFold("ProductionAccessNotGrantedException", errorCode): 5138 return awsAwsquery_deserializeErrorProductionAccessNotGrantedException(response, errorBody) 5139 5140 default: 5141 genericError := &smithy.GenericAPIError{ 5142 Code: errorCode, 5143 Message: errorMessage, 5144 } 5145 return genericError 5146 5147 } 5148} 5149 5150type awsAwsquery_deserializeOpSendEmail struct { 5151} 5152 5153func (*awsAwsquery_deserializeOpSendEmail) ID() string { 5154 return "OperationDeserializer" 5155} 5156 5157func (m *awsAwsquery_deserializeOpSendEmail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5158 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5159) { 5160 out, metadata, err = next.HandleDeserialize(ctx, in) 5161 if err != nil { 5162 return out, metadata, err 5163 } 5164 5165 response, ok := out.RawResponse.(*smithyhttp.Response) 5166 if !ok { 5167 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5168 } 5169 5170 if response.StatusCode < 200 || response.StatusCode >= 300 { 5171 return out, metadata, awsAwsquery_deserializeOpErrorSendEmail(response, &metadata) 5172 } 5173 output := &SendEmailOutput{} 5174 out.Result = output 5175 5176 var buff [1024]byte 5177 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5178 body := io.TeeReader(response.Body, ringBuffer) 5179 rootDecoder := xml.NewDecoder(body) 5180 t, err := smithyxml.FetchRootElement(rootDecoder) 5181 if err == io.EOF { 5182 return out, metadata, nil 5183 } 5184 if err != nil { 5185 var snapshot bytes.Buffer 5186 io.Copy(&snapshot, ringBuffer) 5187 return out, metadata, &smithy.DeserializationError{ 5188 Err: fmt.Errorf("failed to decode response body, %w", err), 5189 Snapshot: snapshot.Bytes(), 5190 } 5191 } 5192 5193 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5194 t, err = decoder.GetElement("SendEmailResult") 5195 if err != nil { 5196 var snapshot bytes.Buffer 5197 io.Copy(&snapshot, ringBuffer) 5198 err = &smithy.DeserializationError{ 5199 Err: fmt.Errorf("failed to decode response body, %w", err), 5200 Snapshot: snapshot.Bytes(), 5201 } 5202 return out, metadata, err 5203 } 5204 5205 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5206 err = awsAwsquery_deserializeOpDocumentSendEmailOutput(&output, decoder) 5207 if err != nil { 5208 var snapshot bytes.Buffer 5209 io.Copy(&snapshot, ringBuffer) 5210 err = &smithy.DeserializationError{ 5211 Err: fmt.Errorf("failed to decode response body, %w", err), 5212 Snapshot: snapshot.Bytes(), 5213 } 5214 return out, metadata, err 5215 } 5216 5217 return out, metadata, err 5218} 5219 5220func awsAwsquery_deserializeOpErrorSendEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5221 var errorBuffer bytes.Buffer 5222 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5223 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5224 } 5225 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5226 5227 errorCode := "UnknownError" 5228 errorMessage := errorCode 5229 5230 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5231 if err != nil { 5232 return err 5233 } 5234 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5235 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5236 } 5237 if len(errorComponents.Code) != 0 { 5238 errorCode = errorComponents.Code 5239 } 5240 if len(errorComponents.Message) != 0 { 5241 errorMessage = errorComponents.Message 5242 } 5243 errorBody.Seek(0, io.SeekStart) 5244 switch { 5245 case strings.EqualFold("AccountSendingPausedException", errorCode): 5246 return awsAwsquery_deserializeErrorAccountSendingPausedException(response, errorBody) 5247 5248 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 5249 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 5250 5251 case strings.EqualFold("ConfigurationSetSendingPausedException", errorCode): 5252 return awsAwsquery_deserializeErrorConfigurationSetSendingPausedException(response, errorBody) 5253 5254 case strings.EqualFold("MailFromDomainNotVerifiedException", errorCode): 5255 return awsAwsquery_deserializeErrorMailFromDomainNotVerifiedException(response, errorBody) 5256 5257 case strings.EqualFold("MessageRejected", errorCode): 5258 return awsAwsquery_deserializeErrorMessageRejected(response, errorBody) 5259 5260 default: 5261 genericError := &smithy.GenericAPIError{ 5262 Code: errorCode, 5263 Message: errorMessage, 5264 } 5265 return genericError 5266 5267 } 5268} 5269 5270type awsAwsquery_deserializeOpSendRawEmail struct { 5271} 5272 5273func (*awsAwsquery_deserializeOpSendRawEmail) ID() string { 5274 return "OperationDeserializer" 5275} 5276 5277func (m *awsAwsquery_deserializeOpSendRawEmail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5278 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5279) { 5280 out, metadata, err = next.HandleDeserialize(ctx, in) 5281 if err != nil { 5282 return out, metadata, err 5283 } 5284 5285 response, ok := out.RawResponse.(*smithyhttp.Response) 5286 if !ok { 5287 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5288 } 5289 5290 if response.StatusCode < 200 || response.StatusCode >= 300 { 5291 return out, metadata, awsAwsquery_deserializeOpErrorSendRawEmail(response, &metadata) 5292 } 5293 output := &SendRawEmailOutput{} 5294 out.Result = output 5295 5296 var buff [1024]byte 5297 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5298 body := io.TeeReader(response.Body, ringBuffer) 5299 rootDecoder := xml.NewDecoder(body) 5300 t, err := smithyxml.FetchRootElement(rootDecoder) 5301 if err == io.EOF { 5302 return out, metadata, nil 5303 } 5304 if err != nil { 5305 var snapshot bytes.Buffer 5306 io.Copy(&snapshot, ringBuffer) 5307 return out, metadata, &smithy.DeserializationError{ 5308 Err: fmt.Errorf("failed to decode response body, %w", err), 5309 Snapshot: snapshot.Bytes(), 5310 } 5311 } 5312 5313 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5314 t, err = decoder.GetElement("SendRawEmailResult") 5315 if err != nil { 5316 var snapshot bytes.Buffer 5317 io.Copy(&snapshot, ringBuffer) 5318 err = &smithy.DeserializationError{ 5319 Err: fmt.Errorf("failed to decode response body, %w", err), 5320 Snapshot: snapshot.Bytes(), 5321 } 5322 return out, metadata, err 5323 } 5324 5325 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5326 err = awsAwsquery_deserializeOpDocumentSendRawEmailOutput(&output, decoder) 5327 if err != nil { 5328 var snapshot bytes.Buffer 5329 io.Copy(&snapshot, ringBuffer) 5330 err = &smithy.DeserializationError{ 5331 Err: fmt.Errorf("failed to decode response body, %w", err), 5332 Snapshot: snapshot.Bytes(), 5333 } 5334 return out, metadata, err 5335 } 5336 5337 return out, metadata, err 5338} 5339 5340func awsAwsquery_deserializeOpErrorSendRawEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5341 var errorBuffer bytes.Buffer 5342 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5343 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5344 } 5345 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5346 5347 errorCode := "UnknownError" 5348 errorMessage := errorCode 5349 5350 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5351 if err != nil { 5352 return err 5353 } 5354 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5355 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5356 } 5357 if len(errorComponents.Code) != 0 { 5358 errorCode = errorComponents.Code 5359 } 5360 if len(errorComponents.Message) != 0 { 5361 errorMessage = errorComponents.Message 5362 } 5363 errorBody.Seek(0, io.SeekStart) 5364 switch { 5365 case strings.EqualFold("AccountSendingPausedException", errorCode): 5366 return awsAwsquery_deserializeErrorAccountSendingPausedException(response, errorBody) 5367 5368 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 5369 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 5370 5371 case strings.EqualFold("ConfigurationSetSendingPausedException", errorCode): 5372 return awsAwsquery_deserializeErrorConfigurationSetSendingPausedException(response, errorBody) 5373 5374 case strings.EqualFold("MailFromDomainNotVerifiedException", errorCode): 5375 return awsAwsquery_deserializeErrorMailFromDomainNotVerifiedException(response, errorBody) 5376 5377 case strings.EqualFold("MessageRejected", errorCode): 5378 return awsAwsquery_deserializeErrorMessageRejected(response, errorBody) 5379 5380 default: 5381 genericError := &smithy.GenericAPIError{ 5382 Code: errorCode, 5383 Message: errorMessage, 5384 } 5385 return genericError 5386 5387 } 5388} 5389 5390type awsAwsquery_deserializeOpSendTemplatedEmail struct { 5391} 5392 5393func (*awsAwsquery_deserializeOpSendTemplatedEmail) ID() string { 5394 return "OperationDeserializer" 5395} 5396 5397func (m *awsAwsquery_deserializeOpSendTemplatedEmail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5398 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5399) { 5400 out, metadata, err = next.HandleDeserialize(ctx, in) 5401 if err != nil { 5402 return out, metadata, err 5403 } 5404 5405 response, ok := out.RawResponse.(*smithyhttp.Response) 5406 if !ok { 5407 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5408 } 5409 5410 if response.StatusCode < 200 || response.StatusCode >= 300 { 5411 return out, metadata, awsAwsquery_deserializeOpErrorSendTemplatedEmail(response, &metadata) 5412 } 5413 output := &SendTemplatedEmailOutput{} 5414 out.Result = output 5415 5416 var buff [1024]byte 5417 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5418 body := io.TeeReader(response.Body, ringBuffer) 5419 rootDecoder := xml.NewDecoder(body) 5420 t, err := smithyxml.FetchRootElement(rootDecoder) 5421 if err == io.EOF { 5422 return out, metadata, nil 5423 } 5424 if err != nil { 5425 var snapshot bytes.Buffer 5426 io.Copy(&snapshot, ringBuffer) 5427 return out, metadata, &smithy.DeserializationError{ 5428 Err: fmt.Errorf("failed to decode response body, %w", err), 5429 Snapshot: snapshot.Bytes(), 5430 } 5431 } 5432 5433 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5434 t, err = decoder.GetElement("SendTemplatedEmailResult") 5435 if err != nil { 5436 var snapshot bytes.Buffer 5437 io.Copy(&snapshot, ringBuffer) 5438 err = &smithy.DeserializationError{ 5439 Err: fmt.Errorf("failed to decode response body, %w", err), 5440 Snapshot: snapshot.Bytes(), 5441 } 5442 return out, metadata, err 5443 } 5444 5445 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5446 err = awsAwsquery_deserializeOpDocumentSendTemplatedEmailOutput(&output, decoder) 5447 if err != nil { 5448 var snapshot bytes.Buffer 5449 io.Copy(&snapshot, ringBuffer) 5450 err = &smithy.DeserializationError{ 5451 Err: fmt.Errorf("failed to decode response body, %w", err), 5452 Snapshot: snapshot.Bytes(), 5453 } 5454 return out, metadata, err 5455 } 5456 5457 return out, metadata, err 5458} 5459 5460func awsAwsquery_deserializeOpErrorSendTemplatedEmail(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5461 var errorBuffer bytes.Buffer 5462 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5463 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5464 } 5465 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5466 5467 errorCode := "UnknownError" 5468 errorMessage := errorCode 5469 5470 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5471 if err != nil { 5472 return err 5473 } 5474 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5475 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5476 } 5477 if len(errorComponents.Code) != 0 { 5478 errorCode = errorComponents.Code 5479 } 5480 if len(errorComponents.Message) != 0 { 5481 errorMessage = errorComponents.Message 5482 } 5483 errorBody.Seek(0, io.SeekStart) 5484 switch { 5485 case strings.EqualFold("AccountSendingPausedException", errorCode): 5486 return awsAwsquery_deserializeErrorAccountSendingPausedException(response, errorBody) 5487 5488 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 5489 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 5490 5491 case strings.EqualFold("ConfigurationSetSendingPausedException", errorCode): 5492 return awsAwsquery_deserializeErrorConfigurationSetSendingPausedException(response, errorBody) 5493 5494 case strings.EqualFold("MailFromDomainNotVerifiedException", errorCode): 5495 return awsAwsquery_deserializeErrorMailFromDomainNotVerifiedException(response, errorBody) 5496 5497 case strings.EqualFold("MessageRejected", errorCode): 5498 return awsAwsquery_deserializeErrorMessageRejected(response, errorBody) 5499 5500 case strings.EqualFold("TemplateDoesNotExistException", errorCode): 5501 return awsAwsquery_deserializeErrorTemplateDoesNotExistException(response, errorBody) 5502 5503 default: 5504 genericError := &smithy.GenericAPIError{ 5505 Code: errorCode, 5506 Message: errorMessage, 5507 } 5508 return genericError 5509 5510 } 5511} 5512 5513type awsAwsquery_deserializeOpSetActiveReceiptRuleSet struct { 5514} 5515 5516func (*awsAwsquery_deserializeOpSetActiveReceiptRuleSet) ID() string { 5517 return "OperationDeserializer" 5518} 5519 5520func (m *awsAwsquery_deserializeOpSetActiveReceiptRuleSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5521 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5522) { 5523 out, metadata, err = next.HandleDeserialize(ctx, in) 5524 if err != nil { 5525 return out, metadata, err 5526 } 5527 5528 response, ok := out.RawResponse.(*smithyhttp.Response) 5529 if !ok { 5530 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5531 } 5532 5533 if response.StatusCode < 200 || response.StatusCode >= 300 { 5534 return out, metadata, awsAwsquery_deserializeOpErrorSetActiveReceiptRuleSet(response, &metadata) 5535 } 5536 output := &SetActiveReceiptRuleSetOutput{} 5537 out.Result = output 5538 5539 var buff [1024]byte 5540 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5541 body := io.TeeReader(response.Body, ringBuffer) 5542 rootDecoder := xml.NewDecoder(body) 5543 t, err := smithyxml.FetchRootElement(rootDecoder) 5544 if err == io.EOF { 5545 return out, metadata, nil 5546 } 5547 if err != nil { 5548 var snapshot bytes.Buffer 5549 io.Copy(&snapshot, ringBuffer) 5550 return out, metadata, &smithy.DeserializationError{ 5551 Err: fmt.Errorf("failed to decode response body, %w", err), 5552 Snapshot: snapshot.Bytes(), 5553 } 5554 } 5555 5556 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5557 t, err = decoder.GetElement("SetActiveReceiptRuleSetResult") 5558 if err != nil { 5559 var snapshot bytes.Buffer 5560 io.Copy(&snapshot, ringBuffer) 5561 err = &smithy.DeserializationError{ 5562 Err: fmt.Errorf("failed to decode response body, %w", err), 5563 Snapshot: snapshot.Bytes(), 5564 } 5565 return out, metadata, err 5566 } 5567 5568 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5569 err = awsAwsquery_deserializeOpDocumentSetActiveReceiptRuleSetOutput(&output, decoder) 5570 if err != nil { 5571 var snapshot bytes.Buffer 5572 io.Copy(&snapshot, ringBuffer) 5573 err = &smithy.DeserializationError{ 5574 Err: fmt.Errorf("failed to decode response body, %w", err), 5575 Snapshot: snapshot.Bytes(), 5576 } 5577 return out, metadata, err 5578 } 5579 5580 return out, metadata, err 5581} 5582 5583func awsAwsquery_deserializeOpErrorSetActiveReceiptRuleSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5584 var errorBuffer bytes.Buffer 5585 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5586 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5587 } 5588 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5589 5590 errorCode := "UnknownError" 5591 errorMessage := errorCode 5592 5593 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5594 if err != nil { 5595 return err 5596 } 5597 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5598 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5599 } 5600 if len(errorComponents.Code) != 0 { 5601 errorCode = errorComponents.Code 5602 } 5603 if len(errorComponents.Message) != 0 { 5604 errorMessage = errorComponents.Message 5605 } 5606 errorBody.Seek(0, io.SeekStart) 5607 switch { 5608 case strings.EqualFold("RuleSetDoesNotExistException", errorCode): 5609 return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody) 5610 5611 default: 5612 genericError := &smithy.GenericAPIError{ 5613 Code: errorCode, 5614 Message: errorMessage, 5615 } 5616 return genericError 5617 5618 } 5619} 5620 5621type awsAwsquery_deserializeOpSetIdentityDkimEnabled struct { 5622} 5623 5624func (*awsAwsquery_deserializeOpSetIdentityDkimEnabled) ID() string { 5625 return "OperationDeserializer" 5626} 5627 5628func (m *awsAwsquery_deserializeOpSetIdentityDkimEnabled) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5629 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5630) { 5631 out, metadata, err = next.HandleDeserialize(ctx, in) 5632 if err != nil { 5633 return out, metadata, err 5634 } 5635 5636 response, ok := out.RawResponse.(*smithyhttp.Response) 5637 if !ok { 5638 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5639 } 5640 5641 if response.StatusCode < 200 || response.StatusCode >= 300 { 5642 return out, metadata, awsAwsquery_deserializeOpErrorSetIdentityDkimEnabled(response, &metadata) 5643 } 5644 output := &SetIdentityDkimEnabledOutput{} 5645 out.Result = output 5646 5647 var buff [1024]byte 5648 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5649 body := io.TeeReader(response.Body, ringBuffer) 5650 rootDecoder := xml.NewDecoder(body) 5651 t, err := smithyxml.FetchRootElement(rootDecoder) 5652 if err == io.EOF { 5653 return out, metadata, nil 5654 } 5655 if err != nil { 5656 var snapshot bytes.Buffer 5657 io.Copy(&snapshot, ringBuffer) 5658 return out, metadata, &smithy.DeserializationError{ 5659 Err: fmt.Errorf("failed to decode response body, %w", err), 5660 Snapshot: snapshot.Bytes(), 5661 } 5662 } 5663 5664 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5665 t, err = decoder.GetElement("SetIdentityDkimEnabledResult") 5666 if err != nil { 5667 var snapshot bytes.Buffer 5668 io.Copy(&snapshot, ringBuffer) 5669 err = &smithy.DeserializationError{ 5670 Err: fmt.Errorf("failed to decode response body, %w", err), 5671 Snapshot: snapshot.Bytes(), 5672 } 5673 return out, metadata, err 5674 } 5675 5676 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5677 err = awsAwsquery_deserializeOpDocumentSetIdentityDkimEnabledOutput(&output, decoder) 5678 if err != nil { 5679 var snapshot bytes.Buffer 5680 io.Copy(&snapshot, ringBuffer) 5681 err = &smithy.DeserializationError{ 5682 Err: fmt.Errorf("failed to decode response body, %w", err), 5683 Snapshot: snapshot.Bytes(), 5684 } 5685 return out, metadata, err 5686 } 5687 5688 return out, metadata, err 5689} 5690 5691func awsAwsquery_deserializeOpErrorSetIdentityDkimEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5692 var errorBuffer bytes.Buffer 5693 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5694 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5695 } 5696 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5697 5698 errorCode := "UnknownError" 5699 errorMessage := errorCode 5700 5701 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5702 if err != nil { 5703 return err 5704 } 5705 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5706 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5707 } 5708 if len(errorComponents.Code) != 0 { 5709 errorCode = errorComponents.Code 5710 } 5711 if len(errorComponents.Message) != 0 { 5712 errorMessage = errorComponents.Message 5713 } 5714 errorBody.Seek(0, io.SeekStart) 5715 switch { 5716 default: 5717 genericError := &smithy.GenericAPIError{ 5718 Code: errorCode, 5719 Message: errorMessage, 5720 } 5721 return genericError 5722 5723 } 5724} 5725 5726type awsAwsquery_deserializeOpSetIdentityFeedbackForwardingEnabled struct { 5727} 5728 5729func (*awsAwsquery_deserializeOpSetIdentityFeedbackForwardingEnabled) ID() string { 5730 return "OperationDeserializer" 5731} 5732 5733func (m *awsAwsquery_deserializeOpSetIdentityFeedbackForwardingEnabled) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5734 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5735) { 5736 out, metadata, err = next.HandleDeserialize(ctx, in) 5737 if err != nil { 5738 return out, metadata, err 5739 } 5740 5741 response, ok := out.RawResponse.(*smithyhttp.Response) 5742 if !ok { 5743 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5744 } 5745 5746 if response.StatusCode < 200 || response.StatusCode >= 300 { 5747 return out, metadata, awsAwsquery_deserializeOpErrorSetIdentityFeedbackForwardingEnabled(response, &metadata) 5748 } 5749 output := &SetIdentityFeedbackForwardingEnabledOutput{} 5750 out.Result = output 5751 5752 var buff [1024]byte 5753 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5754 body := io.TeeReader(response.Body, ringBuffer) 5755 rootDecoder := xml.NewDecoder(body) 5756 t, err := smithyxml.FetchRootElement(rootDecoder) 5757 if err == io.EOF { 5758 return out, metadata, nil 5759 } 5760 if err != nil { 5761 var snapshot bytes.Buffer 5762 io.Copy(&snapshot, ringBuffer) 5763 return out, metadata, &smithy.DeserializationError{ 5764 Err: fmt.Errorf("failed to decode response body, %w", err), 5765 Snapshot: snapshot.Bytes(), 5766 } 5767 } 5768 5769 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5770 t, err = decoder.GetElement("SetIdentityFeedbackForwardingEnabledResult") 5771 if err != nil { 5772 var snapshot bytes.Buffer 5773 io.Copy(&snapshot, ringBuffer) 5774 err = &smithy.DeserializationError{ 5775 Err: fmt.Errorf("failed to decode response body, %w", err), 5776 Snapshot: snapshot.Bytes(), 5777 } 5778 return out, metadata, err 5779 } 5780 5781 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5782 err = awsAwsquery_deserializeOpDocumentSetIdentityFeedbackForwardingEnabledOutput(&output, decoder) 5783 if err != nil { 5784 var snapshot bytes.Buffer 5785 io.Copy(&snapshot, ringBuffer) 5786 err = &smithy.DeserializationError{ 5787 Err: fmt.Errorf("failed to decode response body, %w", err), 5788 Snapshot: snapshot.Bytes(), 5789 } 5790 return out, metadata, err 5791 } 5792 5793 return out, metadata, err 5794} 5795 5796func awsAwsquery_deserializeOpErrorSetIdentityFeedbackForwardingEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5797 var errorBuffer bytes.Buffer 5798 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5799 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5800 } 5801 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5802 5803 errorCode := "UnknownError" 5804 errorMessage := errorCode 5805 5806 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5807 if err != nil { 5808 return err 5809 } 5810 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5811 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5812 } 5813 if len(errorComponents.Code) != 0 { 5814 errorCode = errorComponents.Code 5815 } 5816 if len(errorComponents.Message) != 0 { 5817 errorMessage = errorComponents.Message 5818 } 5819 errorBody.Seek(0, io.SeekStart) 5820 switch { 5821 default: 5822 genericError := &smithy.GenericAPIError{ 5823 Code: errorCode, 5824 Message: errorMessage, 5825 } 5826 return genericError 5827 5828 } 5829} 5830 5831type awsAwsquery_deserializeOpSetIdentityHeadersInNotificationsEnabled struct { 5832} 5833 5834func (*awsAwsquery_deserializeOpSetIdentityHeadersInNotificationsEnabled) ID() string { 5835 return "OperationDeserializer" 5836} 5837 5838func (m *awsAwsquery_deserializeOpSetIdentityHeadersInNotificationsEnabled) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5839 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5840) { 5841 out, metadata, err = next.HandleDeserialize(ctx, in) 5842 if err != nil { 5843 return out, metadata, err 5844 } 5845 5846 response, ok := out.RawResponse.(*smithyhttp.Response) 5847 if !ok { 5848 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5849 } 5850 5851 if response.StatusCode < 200 || response.StatusCode >= 300 { 5852 return out, metadata, awsAwsquery_deserializeOpErrorSetIdentityHeadersInNotificationsEnabled(response, &metadata) 5853 } 5854 output := &SetIdentityHeadersInNotificationsEnabledOutput{} 5855 out.Result = output 5856 5857 var buff [1024]byte 5858 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5859 body := io.TeeReader(response.Body, ringBuffer) 5860 rootDecoder := xml.NewDecoder(body) 5861 t, err := smithyxml.FetchRootElement(rootDecoder) 5862 if err == io.EOF { 5863 return out, metadata, nil 5864 } 5865 if err != nil { 5866 var snapshot bytes.Buffer 5867 io.Copy(&snapshot, ringBuffer) 5868 return out, metadata, &smithy.DeserializationError{ 5869 Err: fmt.Errorf("failed to decode response body, %w", err), 5870 Snapshot: snapshot.Bytes(), 5871 } 5872 } 5873 5874 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5875 t, err = decoder.GetElement("SetIdentityHeadersInNotificationsEnabledResult") 5876 if err != nil { 5877 var snapshot bytes.Buffer 5878 io.Copy(&snapshot, ringBuffer) 5879 err = &smithy.DeserializationError{ 5880 Err: fmt.Errorf("failed to decode response body, %w", err), 5881 Snapshot: snapshot.Bytes(), 5882 } 5883 return out, metadata, err 5884 } 5885 5886 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5887 err = awsAwsquery_deserializeOpDocumentSetIdentityHeadersInNotificationsEnabledOutput(&output, decoder) 5888 if err != nil { 5889 var snapshot bytes.Buffer 5890 io.Copy(&snapshot, ringBuffer) 5891 err = &smithy.DeserializationError{ 5892 Err: fmt.Errorf("failed to decode response body, %w", err), 5893 Snapshot: snapshot.Bytes(), 5894 } 5895 return out, metadata, err 5896 } 5897 5898 return out, metadata, err 5899} 5900 5901func awsAwsquery_deserializeOpErrorSetIdentityHeadersInNotificationsEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5902 var errorBuffer bytes.Buffer 5903 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5904 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5905 } 5906 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5907 5908 errorCode := "UnknownError" 5909 errorMessage := errorCode 5910 5911 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5912 if err != nil { 5913 return err 5914 } 5915 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5916 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5917 } 5918 if len(errorComponents.Code) != 0 { 5919 errorCode = errorComponents.Code 5920 } 5921 if len(errorComponents.Message) != 0 { 5922 errorMessage = errorComponents.Message 5923 } 5924 errorBody.Seek(0, io.SeekStart) 5925 switch { 5926 default: 5927 genericError := &smithy.GenericAPIError{ 5928 Code: errorCode, 5929 Message: errorMessage, 5930 } 5931 return genericError 5932 5933 } 5934} 5935 5936type awsAwsquery_deserializeOpSetIdentityMailFromDomain struct { 5937} 5938 5939func (*awsAwsquery_deserializeOpSetIdentityMailFromDomain) ID() string { 5940 return "OperationDeserializer" 5941} 5942 5943func (m *awsAwsquery_deserializeOpSetIdentityMailFromDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5944 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5945) { 5946 out, metadata, err = next.HandleDeserialize(ctx, in) 5947 if err != nil { 5948 return out, metadata, err 5949 } 5950 5951 response, ok := out.RawResponse.(*smithyhttp.Response) 5952 if !ok { 5953 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5954 } 5955 5956 if response.StatusCode < 200 || response.StatusCode >= 300 { 5957 return out, metadata, awsAwsquery_deserializeOpErrorSetIdentityMailFromDomain(response, &metadata) 5958 } 5959 output := &SetIdentityMailFromDomainOutput{} 5960 out.Result = output 5961 5962 var buff [1024]byte 5963 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5964 body := io.TeeReader(response.Body, ringBuffer) 5965 rootDecoder := xml.NewDecoder(body) 5966 t, err := smithyxml.FetchRootElement(rootDecoder) 5967 if err == io.EOF { 5968 return out, metadata, nil 5969 } 5970 if err != nil { 5971 var snapshot bytes.Buffer 5972 io.Copy(&snapshot, ringBuffer) 5973 return out, metadata, &smithy.DeserializationError{ 5974 Err: fmt.Errorf("failed to decode response body, %w", err), 5975 Snapshot: snapshot.Bytes(), 5976 } 5977 } 5978 5979 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5980 t, err = decoder.GetElement("SetIdentityMailFromDomainResult") 5981 if err != nil { 5982 var snapshot bytes.Buffer 5983 io.Copy(&snapshot, ringBuffer) 5984 err = &smithy.DeserializationError{ 5985 Err: fmt.Errorf("failed to decode response body, %w", err), 5986 Snapshot: snapshot.Bytes(), 5987 } 5988 return out, metadata, err 5989 } 5990 5991 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5992 err = awsAwsquery_deserializeOpDocumentSetIdentityMailFromDomainOutput(&output, decoder) 5993 if err != nil { 5994 var snapshot bytes.Buffer 5995 io.Copy(&snapshot, ringBuffer) 5996 err = &smithy.DeserializationError{ 5997 Err: fmt.Errorf("failed to decode response body, %w", err), 5998 Snapshot: snapshot.Bytes(), 5999 } 6000 return out, metadata, err 6001 } 6002 6003 return out, metadata, err 6004} 6005 6006func awsAwsquery_deserializeOpErrorSetIdentityMailFromDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6007 var errorBuffer bytes.Buffer 6008 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6009 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6010 } 6011 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6012 6013 errorCode := "UnknownError" 6014 errorMessage := errorCode 6015 6016 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6017 if err != nil { 6018 return err 6019 } 6020 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6021 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6022 } 6023 if len(errorComponents.Code) != 0 { 6024 errorCode = errorComponents.Code 6025 } 6026 if len(errorComponents.Message) != 0 { 6027 errorMessage = errorComponents.Message 6028 } 6029 errorBody.Seek(0, io.SeekStart) 6030 switch { 6031 default: 6032 genericError := &smithy.GenericAPIError{ 6033 Code: errorCode, 6034 Message: errorMessage, 6035 } 6036 return genericError 6037 6038 } 6039} 6040 6041type awsAwsquery_deserializeOpSetIdentityNotificationTopic struct { 6042} 6043 6044func (*awsAwsquery_deserializeOpSetIdentityNotificationTopic) ID() string { 6045 return "OperationDeserializer" 6046} 6047 6048func (m *awsAwsquery_deserializeOpSetIdentityNotificationTopic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6049 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6050) { 6051 out, metadata, err = next.HandleDeserialize(ctx, in) 6052 if err != nil { 6053 return out, metadata, err 6054 } 6055 6056 response, ok := out.RawResponse.(*smithyhttp.Response) 6057 if !ok { 6058 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6059 } 6060 6061 if response.StatusCode < 200 || response.StatusCode >= 300 { 6062 return out, metadata, awsAwsquery_deserializeOpErrorSetIdentityNotificationTopic(response, &metadata) 6063 } 6064 output := &SetIdentityNotificationTopicOutput{} 6065 out.Result = output 6066 6067 var buff [1024]byte 6068 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6069 body := io.TeeReader(response.Body, ringBuffer) 6070 rootDecoder := xml.NewDecoder(body) 6071 t, err := smithyxml.FetchRootElement(rootDecoder) 6072 if err == io.EOF { 6073 return out, metadata, nil 6074 } 6075 if err != nil { 6076 var snapshot bytes.Buffer 6077 io.Copy(&snapshot, ringBuffer) 6078 return out, metadata, &smithy.DeserializationError{ 6079 Err: fmt.Errorf("failed to decode response body, %w", err), 6080 Snapshot: snapshot.Bytes(), 6081 } 6082 } 6083 6084 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6085 t, err = decoder.GetElement("SetIdentityNotificationTopicResult") 6086 if err != nil { 6087 var snapshot bytes.Buffer 6088 io.Copy(&snapshot, ringBuffer) 6089 err = &smithy.DeserializationError{ 6090 Err: fmt.Errorf("failed to decode response body, %w", err), 6091 Snapshot: snapshot.Bytes(), 6092 } 6093 return out, metadata, err 6094 } 6095 6096 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 6097 err = awsAwsquery_deserializeOpDocumentSetIdentityNotificationTopicOutput(&output, decoder) 6098 if err != nil { 6099 var snapshot bytes.Buffer 6100 io.Copy(&snapshot, ringBuffer) 6101 err = &smithy.DeserializationError{ 6102 Err: fmt.Errorf("failed to decode response body, %w", err), 6103 Snapshot: snapshot.Bytes(), 6104 } 6105 return out, metadata, err 6106 } 6107 6108 return out, metadata, err 6109} 6110 6111func awsAwsquery_deserializeOpErrorSetIdentityNotificationTopic(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6112 var errorBuffer bytes.Buffer 6113 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6114 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6115 } 6116 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6117 6118 errorCode := "UnknownError" 6119 errorMessage := errorCode 6120 6121 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6122 if err != nil { 6123 return err 6124 } 6125 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6126 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6127 } 6128 if len(errorComponents.Code) != 0 { 6129 errorCode = errorComponents.Code 6130 } 6131 if len(errorComponents.Message) != 0 { 6132 errorMessage = errorComponents.Message 6133 } 6134 errorBody.Seek(0, io.SeekStart) 6135 switch { 6136 default: 6137 genericError := &smithy.GenericAPIError{ 6138 Code: errorCode, 6139 Message: errorMessage, 6140 } 6141 return genericError 6142 6143 } 6144} 6145 6146type awsAwsquery_deserializeOpSetReceiptRulePosition struct { 6147} 6148 6149func (*awsAwsquery_deserializeOpSetReceiptRulePosition) ID() string { 6150 return "OperationDeserializer" 6151} 6152 6153func (m *awsAwsquery_deserializeOpSetReceiptRulePosition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6154 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6155) { 6156 out, metadata, err = next.HandleDeserialize(ctx, in) 6157 if err != nil { 6158 return out, metadata, err 6159 } 6160 6161 response, ok := out.RawResponse.(*smithyhttp.Response) 6162 if !ok { 6163 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6164 } 6165 6166 if response.StatusCode < 200 || response.StatusCode >= 300 { 6167 return out, metadata, awsAwsquery_deserializeOpErrorSetReceiptRulePosition(response, &metadata) 6168 } 6169 output := &SetReceiptRulePositionOutput{} 6170 out.Result = output 6171 6172 var buff [1024]byte 6173 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6174 body := io.TeeReader(response.Body, ringBuffer) 6175 rootDecoder := xml.NewDecoder(body) 6176 t, err := smithyxml.FetchRootElement(rootDecoder) 6177 if err == io.EOF { 6178 return out, metadata, nil 6179 } 6180 if err != nil { 6181 var snapshot bytes.Buffer 6182 io.Copy(&snapshot, ringBuffer) 6183 return out, metadata, &smithy.DeserializationError{ 6184 Err: fmt.Errorf("failed to decode response body, %w", err), 6185 Snapshot: snapshot.Bytes(), 6186 } 6187 } 6188 6189 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6190 t, err = decoder.GetElement("SetReceiptRulePositionResult") 6191 if err != nil { 6192 var snapshot bytes.Buffer 6193 io.Copy(&snapshot, ringBuffer) 6194 err = &smithy.DeserializationError{ 6195 Err: fmt.Errorf("failed to decode response body, %w", err), 6196 Snapshot: snapshot.Bytes(), 6197 } 6198 return out, metadata, err 6199 } 6200 6201 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 6202 err = awsAwsquery_deserializeOpDocumentSetReceiptRulePositionOutput(&output, decoder) 6203 if err != nil { 6204 var snapshot bytes.Buffer 6205 io.Copy(&snapshot, ringBuffer) 6206 err = &smithy.DeserializationError{ 6207 Err: fmt.Errorf("failed to decode response body, %w", err), 6208 Snapshot: snapshot.Bytes(), 6209 } 6210 return out, metadata, err 6211 } 6212 6213 return out, metadata, err 6214} 6215 6216func awsAwsquery_deserializeOpErrorSetReceiptRulePosition(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6217 var errorBuffer bytes.Buffer 6218 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6219 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6220 } 6221 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6222 6223 errorCode := "UnknownError" 6224 errorMessage := errorCode 6225 6226 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6227 if err != nil { 6228 return err 6229 } 6230 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6231 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6232 } 6233 if len(errorComponents.Code) != 0 { 6234 errorCode = errorComponents.Code 6235 } 6236 if len(errorComponents.Message) != 0 { 6237 errorMessage = errorComponents.Message 6238 } 6239 errorBody.Seek(0, io.SeekStart) 6240 switch { 6241 case strings.EqualFold("RuleDoesNotExistException", errorCode): 6242 return awsAwsquery_deserializeErrorRuleDoesNotExistException(response, errorBody) 6243 6244 case strings.EqualFold("RuleSetDoesNotExistException", errorCode): 6245 return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody) 6246 6247 default: 6248 genericError := &smithy.GenericAPIError{ 6249 Code: errorCode, 6250 Message: errorMessage, 6251 } 6252 return genericError 6253 6254 } 6255} 6256 6257type awsAwsquery_deserializeOpTestRenderTemplate struct { 6258} 6259 6260func (*awsAwsquery_deserializeOpTestRenderTemplate) ID() string { 6261 return "OperationDeserializer" 6262} 6263 6264func (m *awsAwsquery_deserializeOpTestRenderTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6265 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6266) { 6267 out, metadata, err = next.HandleDeserialize(ctx, in) 6268 if err != nil { 6269 return out, metadata, err 6270 } 6271 6272 response, ok := out.RawResponse.(*smithyhttp.Response) 6273 if !ok { 6274 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6275 } 6276 6277 if response.StatusCode < 200 || response.StatusCode >= 300 { 6278 return out, metadata, awsAwsquery_deserializeOpErrorTestRenderTemplate(response, &metadata) 6279 } 6280 output := &TestRenderTemplateOutput{} 6281 out.Result = output 6282 6283 var buff [1024]byte 6284 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6285 body := io.TeeReader(response.Body, ringBuffer) 6286 rootDecoder := xml.NewDecoder(body) 6287 t, err := smithyxml.FetchRootElement(rootDecoder) 6288 if err == io.EOF { 6289 return out, metadata, nil 6290 } 6291 if err != nil { 6292 var snapshot bytes.Buffer 6293 io.Copy(&snapshot, ringBuffer) 6294 return out, metadata, &smithy.DeserializationError{ 6295 Err: fmt.Errorf("failed to decode response body, %w", err), 6296 Snapshot: snapshot.Bytes(), 6297 } 6298 } 6299 6300 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6301 t, err = decoder.GetElement("TestRenderTemplateResult") 6302 if err != nil { 6303 var snapshot bytes.Buffer 6304 io.Copy(&snapshot, ringBuffer) 6305 err = &smithy.DeserializationError{ 6306 Err: fmt.Errorf("failed to decode response body, %w", err), 6307 Snapshot: snapshot.Bytes(), 6308 } 6309 return out, metadata, err 6310 } 6311 6312 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 6313 err = awsAwsquery_deserializeOpDocumentTestRenderTemplateOutput(&output, decoder) 6314 if err != nil { 6315 var snapshot bytes.Buffer 6316 io.Copy(&snapshot, ringBuffer) 6317 err = &smithy.DeserializationError{ 6318 Err: fmt.Errorf("failed to decode response body, %w", err), 6319 Snapshot: snapshot.Bytes(), 6320 } 6321 return out, metadata, err 6322 } 6323 6324 return out, metadata, err 6325} 6326 6327func awsAwsquery_deserializeOpErrorTestRenderTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6328 var errorBuffer bytes.Buffer 6329 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6330 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6331 } 6332 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6333 6334 errorCode := "UnknownError" 6335 errorMessage := errorCode 6336 6337 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6338 if err != nil { 6339 return err 6340 } 6341 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6342 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6343 } 6344 if len(errorComponents.Code) != 0 { 6345 errorCode = errorComponents.Code 6346 } 6347 if len(errorComponents.Message) != 0 { 6348 errorMessage = errorComponents.Message 6349 } 6350 errorBody.Seek(0, io.SeekStart) 6351 switch { 6352 case strings.EqualFold("InvalidRenderingParameterException", errorCode): 6353 return awsAwsquery_deserializeErrorInvalidRenderingParameterException(response, errorBody) 6354 6355 case strings.EqualFold("MissingRenderingAttributeException", errorCode): 6356 return awsAwsquery_deserializeErrorMissingRenderingAttributeException(response, errorBody) 6357 6358 case strings.EqualFold("TemplateDoesNotExistException", errorCode): 6359 return awsAwsquery_deserializeErrorTemplateDoesNotExistException(response, errorBody) 6360 6361 default: 6362 genericError := &smithy.GenericAPIError{ 6363 Code: errorCode, 6364 Message: errorMessage, 6365 } 6366 return genericError 6367 6368 } 6369} 6370 6371type awsAwsquery_deserializeOpUpdateAccountSendingEnabled struct { 6372} 6373 6374func (*awsAwsquery_deserializeOpUpdateAccountSendingEnabled) ID() string { 6375 return "OperationDeserializer" 6376} 6377 6378func (m *awsAwsquery_deserializeOpUpdateAccountSendingEnabled) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6379 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6380) { 6381 out, metadata, err = next.HandleDeserialize(ctx, in) 6382 if err != nil { 6383 return out, metadata, err 6384 } 6385 6386 response, ok := out.RawResponse.(*smithyhttp.Response) 6387 if !ok { 6388 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6389 } 6390 6391 if response.StatusCode < 200 || response.StatusCode >= 300 { 6392 return out, metadata, awsAwsquery_deserializeOpErrorUpdateAccountSendingEnabled(response, &metadata) 6393 } 6394 output := &UpdateAccountSendingEnabledOutput{} 6395 out.Result = output 6396 6397 if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { 6398 return out, metadata, &smithy.DeserializationError{ 6399 Err: fmt.Errorf("failed to discard response body, %w", err), 6400 } 6401 } 6402 6403 return out, metadata, err 6404} 6405 6406func awsAwsquery_deserializeOpErrorUpdateAccountSendingEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6407 var errorBuffer bytes.Buffer 6408 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6409 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6410 } 6411 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6412 6413 errorCode := "UnknownError" 6414 errorMessage := errorCode 6415 6416 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6417 if err != nil { 6418 return err 6419 } 6420 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6421 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6422 } 6423 if len(errorComponents.Code) != 0 { 6424 errorCode = errorComponents.Code 6425 } 6426 if len(errorComponents.Message) != 0 { 6427 errorMessage = errorComponents.Message 6428 } 6429 errorBody.Seek(0, io.SeekStart) 6430 switch { 6431 default: 6432 genericError := &smithy.GenericAPIError{ 6433 Code: errorCode, 6434 Message: errorMessage, 6435 } 6436 return genericError 6437 6438 } 6439} 6440 6441type awsAwsquery_deserializeOpUpdateConfigurationSetEventDestination struct { 6442} 6443 6444func (*awsAwsquery_deserializeOpUpdateConfigurationSetEventDestination) ID() string { 6445 return "OperationDeserializer" 6446} 6447 6448func (m *awsAwsquery_deserializeOpUpdateConfigurationSetEventDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6449 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6450) { 6451 out, metadata, err = next.HandleDeserialize(ctx, in) 6452 if err != nil { 6453 return out, metadata, err 6454 } 6455 6456 response, ok := out.RawResponse.(*smithyhttp.Response) 6457 if !ok { 6458 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6459 } 6460 6461 if response.StatusCode < 200 || response.StatusCode >= 300 { 6462 return out, metadata, awsAwsquery_deserializeOpErrorUpdateConfigurationSetEventDestination(response, &metadata) 6463 } 6464 output := &UpdateConfigurationSetEventDestinationOutput{} 6465 out.Result = output 6466 6467 var buff [1024]byte 6468 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6469 body := io.TeeReader(response.Body, ringBuffer) 6470 rootDecoder := xml.NewDecoder(body) 6471 t, err := smithyxml.FetchRootElement(rootDecoder) 6472 if err == io.EOF { 6473 return out, metadata, nil 6474 } 6475 if err != nil { 6476 var snapshot bytes.Buffer 6477 io.Copy(&snapshot, ringBuffer) 6478 return out, metadata, &smithy.DeserializationError{ 6479 Err: fmt.Errorf("failed to decode response body, %w", err), 6480 Snapshot: snapshot.Bytes(), 6481 } 6482 } 6483 6484 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6485 t, err = decoder.GetElement("UpdateConfigurationSetEventDestinationResult") 6486 if err != nil { 6487 var snapshot bytes.Buffer 6488 io.Copy(&snapshot, ringBuffer) 6489 err = &smithy.DeserializationError{ 6490 Err: fmt.Errorf("failed to decode response body, %w", err), 6491 Snapshot: snapshot.Bytes(), 6492 } 6493 return out, metadata, err 6494 } 6495 6496 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 6497 err = awsAwsquery_deserializeOpDocumentUpdateConfigurationSetEventDestinationOutput(&output, decoder) 6498 if err != nil { 6499 var snapshot bytes.Buffer 6500 io.Copy(&snapshot, ringBuffer) 6501 err = &smithy.DeserializationError{ 6502 Err: fmt.Errorf("failed to decode response body, %w", err), 6503 Snapshot: snapshot.Bytes(), 6504 } 6505 return out, metadata, err 6506 } 6507 6508 return out, metadata, err 6509} 6510 6511func awsAwsquery_deserializeOpErrorUpdateConfigurationSetEventDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6512 var errorBuffer bytes.Buffer 6513 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6514 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6515 } 6516 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6517 6518 errorCode := "UnknownError" 6519 errorMessage := errorCode 6520 6521 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6522 if err != nil { 6523 return err 6524 } 6525 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6526 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6527 } 6528 if len(errorComponents.Code) != 0 { 6529 errorCode = errorComponents.Code 6530 } 6531 if len(errorComponents.Message) != 0 { 6532 errorMessage = errorComponents.Message 6533 } 6534 errorBody.Seek(0, io.SeekStart) 6535 switch { 6536 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 6537 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 6538 6539 case strings.EqualFold("EventDestinationDoesNotExistException", errorCode): 6540 return awsAwsquery_deserializeErrorEventDestinationDoesNotExistException(response, errorBody) 6541 6542 case strings.EqualFold("InvalidCloudWatchDestinationException", errorCode): 6543 return awsAwsquery_deserializeErrorInvalidCloudWatchDestinationException(response, errorBody) 6544 6545 case strings.EqualFold("InvalidFirehoseDestinationException", errorCode): 6546 return awsAwsquery_deserializeErrorInvalidFirehoseDestinationException(response, errorBody) 6547 6548 case strings.EqualFold("InvalidSNSDestinationException", errorCode): 6549 return awsAwsquery_deserializeErrorInvalidSNSDestinationException(response, errorBody) 6550 6551 default: 6552 genericError := &smithy.GenericAPIError{ 6553 Code: errorCode, 6554 Message: errorMessage, 6555 } 6556 return genericError 6557 6558 } 6559} 6560 6561type awsAwsquery_deserializeOpUpdateConfigurationSetReputationMetricsEnabled struct { 6562} 6563 6564func (*awsAwsquery_deserializeOpUpdateConfigurationSetReputationMetricsEnabled) ID() string { 6565 return "OperationDeserializer" 6566} 6567 6568func (m *awsAwsquery_deserializeOpUpdateConfigurationSetReputationMetricsEnabled) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6569 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6570) { 6571 out, metadata, err = next.HandleDeserialize(ctx, in) 6572 if err != nil { 6573 return out, metadata, err 6574 } 6575 6576 response, ok := out.RawResponse.(*smithyhttp.Response) 6577 if !ok { 6578 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6579 } 6580 6581 if response.StatusCode < 200 || response.StatusCode >= 300 { 6582 return out, metadata, awsAwsquery_deserializeOpErrorUpdateConfigurationSetReputationMetricsEnabled(response, &metadata) 6583 } 6584 output := &UpdateConfigurationSetReputationMetricsEnabledOutput{} 6585 out.Result = output 6586 6587 if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { 6588 return out, metadata, &smithy.DeserializationError{ 6589 Err: fmt.Errorf("failed to discard response body, %w", err), 6590 } 6591 } 6592 6593 return out, metadata, err 6594} 6595 6596func awsAwsquery_deserializeOpErrorUpdateConfigurationSetReputationMetricsEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6597 var errorBuffer bytes.Buffer 6598 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6599 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6600 } 6601 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6602 6603 errorCode := "UnknownError" 6604 errorMessage := errorCode 6605 6606 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6607 if err != nil { 6608 return err 6609 } 6610 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6611 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6612 } 6613 if len(errorComponents.Code) != 0 { 6614 errorCode = errorComponents.Code 6615 } 6616 if len(errorComponents.Message) != 0 { 6617 errorMessage = errorComponents.Message 6618 } 6619 errorBody.Seek(0, io.SeekStart) 6620 switch { 6621 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 6622 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 6623 6624 default: 6625 genericError := &smithy.GenericAPIError{ 6626 Code: errorCode, 6627 Message: errorMessage, 6628 } 6629 return genericError 6630 6631 } 6632} 6633 6634type awsAwsquery_deserializeOpUpdateConfigurationSetSendingEnabled struct { 6635} 6636 6637func (*awsAwsquery_deserializeOpUpdateConfigurationSetSendingEnabled) ID() string { 6638 return "OperationDeserializer" 6639} 6640 6641func (m *awsAwsquery_deserializeOpUpdateConfigurationSetSendingEnabled) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6642 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6643) { 6644 out, metadata, err = next.HandleDeserialize(ctx, in) 6645 if err != nil { 6646 return out, metadata, err 6647 } 6648 6649 response, ok := out.RawResponse.(*smithyhttp.Response) 6650 if !ok { 6651 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6652 } 6653 6654 if response.StatusCode < 200 || response.StatusCode >= 300 { 6655 return out, metadata, awsAwsquery_deserializeOpErrorUpdateConfigurationSetSendingEnabled(response, &metadata) 6656 } 6657 output := &UpdateConfigurationSetSendingEnabledOutput{} 6658 out.Result = output 6659 6660 if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { 6661 return out, metadata, &smithy.DeserializationError{ 6662 Err: fmt.Errorf("failed to discard response body, %w", err), 6663 } 6664 } 6665 6666 return out, metadata, err 6667} 6668 6669func awsAwsquery_deserializeOpErrorUpdateConfigurationSetSendingEnabled(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6670 var errorBuffer bytes.Buffer 6671 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6672 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6673 } 6674 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6675 6676 errorCode := "UnknownError" 6677 errorMessage := errorCode 6678 6679 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6680 if err != nil { 6681 return err 6682 } 6683 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6684 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6685 } 6686 if len(errorComponents.Code) != 0 { 6687 errorCode = errorComponents.Code 6688 } 6689 if len(errorComponents.Message) != 0 { 6690 errorMessage = errorComponents.Message 6691 } 6692 errorBody.Seek(0, io.SeekStart) 6693 switch { 6694 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 6695 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 6696 6697 default: 6698 genericError := &smithy.GenericAPIError{ 6699 Code: errorCode, 6700 Message: errorMessage, 6701 } 6702 return genericError 6703 6704 } 6705} 6706 6707type awsAwsquery_deserializeOpUpdateConfigurationSetTrackingOptions struct { 6708} 6709 6710func (*awsAwsquery_deserializeOpUpdateConfigurationSetTrackingOptions) ID() string { 6711 return "OperationDeserializer" 6712} 6713 6714func (m *awsAwsquery_deserializeOpUpdateConfigurationSetTrackingOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6715 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6716) { 6717 out, metadata, err = next.HandleDeserialize(ctx, in) 6718 if err != nil { 6719 return out, metadata, err 6720 } 6721 6722 response, ok := out.RawResponse.(*smithyhttp.Response) 6723 if !ok { 6724 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6725 } 6726 6727 if response.StatusCode < 200 || response.StatusCode >= 300 { 6728 return out, metadata, awsAwsquery_deserializeOpErrorUpdateConfigurationSetTrackingOptions(response, &metadata) 6729 } 6730 output := &UpdateConfigurationSetTrackingOptionsOutput{} 6731 out.Result = output 6732 6733 var buff [1024]byte 6734 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6735 body := io.TeeReader(response.Body, ringBuffer) 6736 rootDecoder := xml.NewDecoder(body) 6737 t, err := smithyxml.FetchRootElement(rootDecoder) 6738 if err == io.EOF { 6739 return out, metadata, nil 6740 } 6741 if err != nil { 6742 var snapshot bytes.Buffer 6743 io.Copy(&snapshot, ringBuffer) 6744 return out, metadata, &smithy.DeserializationError{ 6745 Err: fmt.Errorf("failed to decode response body, %w", err), 6746 Snapshot: snapshot.Bytes(), 6747 } 6748 } 6749 6750 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6751 t, err = decoder.GetElement("UpdateConfigurationSetTrackingOptionsResult") 6752 if err != nil { 6753 var snapshot bytes.Buffer 6754 io.Copy(&snapshot, ringBuffer) 6755 err = &smithy.DeserializationError{ 6756 Err: fmt.Errorf("failed to decode response body, %w", err), 6757 Snapshot: snapshot.Bytes(), 6758 } 6759 return out, metadata, err 6760 } 6761 6762 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 6763 err = awsAwsquery_deserializeOpDocumentUpdateConfigurationSetTrackingOptionsOutput(&output, decoder) 6764 if err != nil { 6765 var snapshot bytes.Buffer 6766 io.Copy(&snapshot, ringBuffer) 6767 err = &smithy.DeserializationError{ 6768 Err: fmt.Errorf("failed to decode response body, %w", err), 6769 Snapshot: snapshot.Bytes(), 6770 } 6771 return out, metadata, err 6772 } 6773 6774 return out, metadata, err 6775} 6776 6777func awsAwsquery_deserializeOpErrorUpdateConfigurationSetTrackingOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6778 var errorBuffer bytes.Buffer 6779 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6780 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6781 } 6782 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6783 6784 errorCode := "UnknownError" 6785 errorMessage := errorCode 6786 6787 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6788 if err != nil { 6789 return err 6790 } 6791 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6792 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6793 } 6794 if len(errorComponents.Code) != 0 { 6795 errorCode = errorComponents.Code 6796 } 6797 if len(errorComponents.Message) != 0 { 6798 errorMessage = errorComponents.Message 6799 } 6800 errorBody.Seek(0, io.SeekStart) 6801 switch { 6802 case strings.EqualFold("ConfigurationSetDoesNotExistException", errorCode): 6803 return awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response, errorBody) 6804 6805 case strings.EqualFold("InvalidTrackingOptionsException", errorCode): 6806 return awsAwsquery_deserializeErrorInvalidTrackingOptionsException(response, errorBody) 6807 6808 case strings.EqualFold("TrackingOptionsDoesNotExistException", errorCode): 6809 return awsAwsquery_deserializeErrorTrackingOptionsDoesNotExistException(response, errorBody) 6810 6811 default: 6812 genericError := &smithy.GenericAPIError{ 6813 Code: errorCode, 6814 Message: errorMessage, 6815 } 6816 return genericError 6817 6818 } 6819} 6820 6821type awsAwsquery_deserializeOpUpdateCustomVerificationEmailTemplate struct { 6822} 6823 6824func (*awsAwsquery_deserializeOpUpdateCustomVerificationEmailTemplate) ID() string { 6825 return "OperationDeserializer" 6826} 6827 6828func (m *awsAwsquery_deserializeOpUpdateCustomVerificationEmailTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6829 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6830) { 6831 out, metadata, err = next.HandleDeserialize(ctx, in) 6832 if err != nil { 6833 return out, metadata, err 6834 } 6835 6836 response, ok := out.RawResponse.(*smithyhttp.Response) 6837 if !ok { 6838 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6839 } 6840 6841 if response.StatusCode < 200 || response.StatusCode >= 300 { 6842 return out, metadata, awsAwsquery_deserializeOpErrorUpdateCustomVerificationEmailTemplate(response, &metadata) 6843 } 6844 output := &UpdateCustomVerificationEmailTemplateOutput{} 6845 out.Result = output 6846 6847 if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { 6848 return out, metadata, &smithy.DeserializationError{ 6849 Err: fmt.Errorf("failed to discard response body, %w", err), 6850 } 6851 } 6852 6853 return out, metadata, err 6854} 6855 6856func awsAwsquery_deserializeOpErrorUpdateCustomVerificationEmailTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6857 var errorBuffer bytes.Buffer 6858 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6859 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6860 } 6861 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6862 6863 errorCode := "UnknownError" 6864 errorMessage := errorCode 6865 6866 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6867 if err != nil { 6868 return err 6869 } 6870 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6871 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6872 } 6873 if len(errorComponents.Code) != 0 { 6874 errorCode = errorComponents.Code 6875 } 6876 if len(errorComponents.Message) != 0 { 6877 errorMessage = errorComponents.Message 6878 } 6879 errorBody.Seek(0, io.SeekStart) 6880 switch { 6881 case strings.EqualFold("CustomVerificationEmailInvalidContentException", errorCode): 6882 return awsAwsquery_deserializeErrorCustomVerificationEmailInvalidContentException(response, errorBody) 6883 6884 case strings.EqualFold("CustomVerificationEmailTemplateDoesNotExistException", errorCode): 6885 return awsAwsquery_deserializeErrorCustomVerificationEmailTemplateDoesNotExistException(response, errorBody) 6886 6887 case strings.EqualFold("FromEmailAddressNotVerifiedException", errorCode): 6888 return awsAwsquery_deserializeErrorFromEmailAddressNotVerifiedException(response, errorBody) 6889 6890 default: 6891 genericError := &smithy.GenericAPIError{ 6892 Code: errorCode, 6893 Message: errorMessage, 6894 } 6895 return genericError 6896 6897 } 6898} 6899 6900type awsAwsquery_deserializeOpUpdateReceiptRule struct { 6901} 6902 6903func (*awsAwsquery_deserializeOpUpdateReceiptRule) ID() string { 6904 return "OperationDeserializer" 6905} 6906 6907func (m *awsAwsquery_deserializeOpUpdateReceiptRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6908 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6909) { 6910 out, metadata, err = next.HandleDeserialize(ctx, in) 6911 if err != nil { 6912 return out, metadata, err 6913 } 6914 6915 response, ok := out.RawResponse.(*smithyhttp.Response) 6916 if !ok { 6917 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6918 } 6919 6920 if response.StatusCode < 200 || response.StatusCode >= 300 { 6921 return out, metadata, awsAwsquery_deserializeOpErrorUpdateReceiptRule(response, &metadata) 6922 } 6923 output := &UpdateReceiptRuleOutput{} 6924 out.Result = output 6925 6926 var buff [1024]byte 6927 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6928 body := io.TeeReader(response.Body, ringBuffer) 6929 rootDecoder := xml.NewDecoder(body) 6930 t, err := smithyxml.FetchRootElement(rootDecoder) 6931 if err == io.EOF { 6932 return out, metadata, nil 6933 } 6934 if err != nil { 6935 var snapshot bytes.Buffer 6936 io.Copy(&snapshot, ringBuffer) 6937 return out, metadata, &smithy.DeserializationError{ 6938 Err: fmt.Errorf("failed to decode response body, %w", err), 6939 Snapshot: snapshot.Bytes(), 6940 } 6941 } 6942 6943 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6944 t, err = decoder.GetElement("UpdateReceiptRuleResult") 6945 if err != nil { 6946 var snapshot bytes.Buffer 6947 io.Copy(&snapshot, ringBuffer) 6948 err = &smithy.DeserializationError{ 6949 Err: fmt.Errorf("failed to decode response body, %w", err), 6950 Snapshot: snapshot.Bytes(), 6951 } 6952 return out, metadata, err 6953 } 6954 6955 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 6956 err = awsAwsquery_deserializeOpDocumentUpdateReceiptRuleOutput(&output, decoder) 6957 if err != nil { 6958 var snapshot bytes.Buffer 6959 io.Copy(&snapshot, ringBuffer) 6960 err = &smithy.DeserializationError{ 6961 Err: fmt.Errorf("failed to decode response body, %w", err), 6962 Snapshot: snapshot.Bytes(), 6963 } 6964 return out, metadata, err 6965 } 6966 6967 return out, metadata, err 6968} 6969 6970func awsAwsquery_deserializeOpErrorUpdateReceiptRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6971 var errorBuffer bytes.Buffer 6972 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6973 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6974 } 6975 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6976 6977 errorCode := "UnknownError" 6978 errorMessage := errorCode 6979 6980 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6981 if err != nil { 6982 return err 6983 } 6984 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6985 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6986 } 6987 if len(errorComponents.Code) != 0 { 6988 errorCode = errorComponents.Code 6989 } 6990 if len(errorComponents.Message) != 0 { 6991 errorMessage = errorComponents.Message 6992 } 6993 errorBody.Seek(0, io.SeekStart) 6994 switch { 6995 case strings.EqualFold("InvalidLambdaFunctionException", errorCode): 6996 return awsAwsquery_deserializeErrorInvalidLambdaFunctionException(response, errorBody) 6997 6998 case strings.EqualFold("InvalidS3ConfigurationException", errorCode): 6999 return awsAwsquery_deserializeErrorInvalidS3ConfigurationException(response, errorBody) 7000 7001 case strings.EqualFold("InvalidSnsTopicException", errorCode): 7002 return awsAwsquery_deserializeErrorInvalidSnsTopicException(response, errorBody) 7003 7004 case strings.EqualFold("LimitExceededException", errorCode): 7005 return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) 7006 7007 case strings.EqualFold("RuleDoesNotExistException", errorCode): 7008 return awsAwsquery_deserializeErrorRuleDoesNotExistException(response, errorBody) 7009 7010 case strings.EqualFold("RuleSetDoesNotExistException", errorCode): 7011 return awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response, errorBody) 7012 7013 default: 7014 genericError := &smithy.GenericAPIError{ 7015 Code: errorCode, 7016 Message: errorMessage, 7017 } 7018 return genericError 7019 7020 } 7021} 7022 7023type awsAwsquery_deserializeOpUpdateTemplate struct { 7024} 7025 7026func (*awsAwsquery_deserializeOpUpdateTemplate) ID() string { 7027 return "OperationDeserializer" 7028} 7029 7030func (m *awsAwsquery_deserializeOpUpdateTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 7031 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 7032) { 7033 out, metadata, err = next.HandleDeserialize(ctx, in) 7034 if err != nil { 7035 return out, metadata, err 7036 } 7037 7038 response, ok := out.RawResponse.(*smithyhttp.Response) 7039 if !ok { 7040 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 7041 } 7042 7043 if response.StatusCode < 200 || response.StatusCode >= 300 { 7044 return out, metadata, awsAwsquery_deserializeOpErrorUpdateTemplate(response, &metadata) 7045 } 7046 output := &UpdateTemplateOutput{} 7047 out.Result = output 7048 7049 var buff [1024]byte 7050 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7051 body := io.TeeReader(response.Body, ringBuffer) 7052 rootDecoder := xml.NewDecoder(body) 7053 t, err := smithyxml.FetchRootElement(rootDecoder) 7054 if err == io.EOF { 7055 return out, metadata, nil 7056 } 7057 if err != nil { 7058 var snapshot bytes.Buffer 7059 io.Copy(&snapshot, ringBuffer) 7060 return out, metadata, &smithy.DeserializationError{ 7061 Err: fmt.Errorf("failed to decode response body, %w", err), 7062 Snapshot: snapshot.Bytes(), 7063 } 7064 } 7065 7066 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7067 t, err = decoder.GetElement("UpdateTemplateResult") 7068 if err != nil { 7069 var snapshot bytes.Buffer 7070 io.Copy(&snapshot, ringBuffer) 7071 err = &smithy.DeserializationError{ 7072 Err: fmt.Errorf("failed to decode response body, %w", err), 7073 Snapshot: snapshot.Bytes(), 7074 } 7075 return out, metadata, err 7076 } 7077 7078 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7079 err = awsAwsquery_deserializeOpDocumentUpdateTemplateOutput(&output, decoder) 7080 if err != nil { 7081 var snapshot bytes.Buffer 7082 io.Copy(&snapshot, ringBuffer) 7083 err = &smithy.DeserializationError{ 7084 Err: fmt.Errorf("failed to decode response body, %w", err), 7085 Snapshot: snapshot.Bytes(), 7086 } 7087 return out, metadata, err 7088 } 7089 7090 return out, metadata, err 7091} 7092 7093func awsAwsquery_deserializeOpErrorUpdateTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { 7094 var errorBuffer bytes.Buffer 7095 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 7096 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 7097 } 7098 errorBody := bytes.NewReader(errorBuffer.Bytes()) 7099 7100 errorCode := "UnknownError" 7101 errorMessage := errorCode 7102 7103 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 7104 if err != nil { 7105 return err 7106 } 7107 if reqID := errorComponents.RequestID; len(reqID) != 0 { 7108 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 7109 } 7110 if len(errorComponents.Code) != 0 { 7111 errorCode = errorComponents.Code 7112 } 7113 if len(errorComponents.Message) != 0 { 7114 errorMessage = errorComponents.Message 7115 } 7116 errorBody.Seek(0, io.SeekStart) 7117 switch { 7118 case strings.EqualFold("InvalidTemplateException", errorCode): 7119 return awsAwsquery_deserializeErrorInvalidTemplateException(response, errorBody) 7120 7121 case strings.EqualFold("TemplateDoesNotExistException", errorCode): 7122 return awsAwsquery_deserializeErrorTemplateDoesNotExistException(response, errorBody) 7123 7124 default: 7125 genericError := &smithy.GenericAPIError{ 7126 Code: errorCode, 7127 Message: errorMessage, 7128 } 7129 return genericError 7130 7131 } 7132} 7133 7134type awsAwsquery_deserializeOpVerifyDomainDkim struct { 7135} 7136 7137func (*awsAwsquery_deserializeOpVerifyDomainDkim) ID() string { 7138 return "OperationDeserializer" 7139} 7140 7141func (m *awsAwsquery_deserializeOpVerifyDomainDkim) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 7142 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 7143) { 7144 out, metadata, err = next.HandleDeserialize(ctx, in) 7145 if err != nil { 7146 return out, metadata, err 7147 } 7148 7149 response, ok := out.RawResponse.(*smithyhttp.Response) 7150 if !ok { 7151 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 7152 } 7153 7154 if response.StatusCode < 200 || response.StatusCode >= 300 { 7155 return out, metadata, awsAwsquery_deserializeOpErrorVerifyDomainDkim(response, &metadata) 7156 } 7157 output := &VerifyDomainDkimOutput{} 7158 out.Result = output 7159 7160 var buff [1024]byte 7161 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7162 body := io.TeeReader(response.Body, ringBuffer) 7163 rootDecoder := xml.NewDecoder(body) 7164 t, err := smithyxml.FetchRootElement(rootDecoder) 7165 if err == io.EOF { 7166 return out, metadata, nil 7167 } 7168 if err != nil { 7169 var snapshot bytes.Buffer 7170 io.Copy(&snapshot, ringBuffer) 7171 return out, metadata, &smithy.DeserializationError{ 7172 Err: fmt.Errorf("failed to decode response body, %w", err), 7173 Snapshot: snapshot.Bytes(), 7174 } 7175 } 7176 7177 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7178 t, err = decoder.GetElement("VerifyDomainDkimResult") 7179 if err != nil { 7180 var snapshot bytes.Buffer 7181 io.Copy(&snapshot, ringBuffer) 7182 err = &smithy.DeserializationError{ 7183 Err: fmt.Errorf("failed to decode response body, %w", err), 7184 Snapshot: snapshot.Bytes(), 7185 } 7186 return out, metadata, err 7187 } 7188 7189 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7190 err = awsAwsquery_deserializeOpDocumentVerifyDomainDkimOutput(&output, decoder) 7191 if err != nil { 7192 var snapshot bytes.Buffer 7193 io.Copy(&snapshot, ringBuffer) 7194 err = &smithy.DeserializationError{ 7195 Err: fmt.Errorf("failed to decode response body, %w", err), 7196 Snapshot: snapshot.Bytes(), 7197 } 7198 return out, metadata, err 7199 } 7200 7201 return out, metadata, err 7202} 7203 7204func awsAwsquery_deserializeOpErrorVerifyDomainDkim(response *smithyhttp.Response, metadata *middleware.Metadata) error { 7205 var errorBuffer bytes.Buffer 7206 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 7207 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 7208 } 7209 errorBody := bytes.NewReader(errorBuffer.Bytes()) 7210 7211 errorCode := "UnknownError" 7212 errorMessage := errorCode 7213 7214 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 7215 if err != nil { 7216 return err 7217 } 7218 if reqID := errorComponents.RequestID; len(reqID) != 0 { 7219 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 7220 } 7221 if len(errorComponents.Code) != 0 { 7222 errorCode = errorComponents.Code 7223 } 7224 if len(errorComponents.Message) != 0 { 7225 errorMessage = errorComponents.Message 7226 } 7227 errorBody.Seek(0, io.SeekStart) 7228 switch { 7229 default: 7230 genericError := &smithy.GenericAPIError{ 7231 Code: errorCode, 7232 Message: errorMessage, 7233 } 7234 return genericError 7235 7236 } 7237} 7238 7239type awsAwsquery_deserializeOpVerifyDomainIdentity struct { 7240} 7241 7242func (*awsAwsquery_deserializeOpVerifyDomainIdentity) ID() string { 7243 return "OperationDeserializer" 7244} 7245 7246func (m *awsAwsquery_deserializeOpVerifyDomainIdentity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 7247 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 7248) { 7249 out, metadata, err = next.HandleDeserialize(ctx, in) 7250 if err != nil { 7251 return out, metadata, err 7252 } 7253 7254 response, ok := out.RawResponse.(*smithyhttp.Response) 7255 if !ok { 7256 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 7257 } 7258 7259 if response.StatusCode < 200 || response.StatusCode >= 300 { 7260 return out, metadata, awsAwsquery_deserializeOpErrorVerifyDomainIdentity(response, &metadata) 7261 } 7262 output := &VerifyDomainIdentityOutput{} 7263 out.Result = output 7264 7265 var buff [1024]byte 7266 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7267 body := io.TeeReader(response.Body, ringBuffer) 7268 rootDecoder := xml.NewDecoder(body) 7269 t, err := smithyxml.FetchRootElement(rootDecoder) 7270 if err == io.EOF { 7271 return out, metadata, nil 7272 } 7273 if err != nil { 7274 var snapshot bytes.Buffer 7275 io.Copy(&snapshot, ringBuffer) 7276 return out, metadata, &smithy.DeserializationError{ 7277 Err: fmt.Errorf("failed to decode response body, %w", err), 7278 Snapshot: snapshot.Bytes(), 7279 } 7280 } 7281 7282 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7283 t, err = decoder.GetElement("VerifyDomainIdentityResult") 7284 if err != nil { 7285 var snapshot bytes.Buffer 7286 io.Copy(&snapshot, ringBuffer) 7287 err = &smithy.DeserializationError{ 7288 Err: fmt.Errorf("failed to decode response body, %w", err), 7289 Snapshot: snapshot.Bytes(), 7290 } 7291 return out, metadata, err 7292 } 7293 7294 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7295 err = awsAwsquery_deserializeOpDocumentVerifyDomainIdentityOutput(&output, decoder) 7296 if err != nil { 7297 var snapshot bytes.Buffer 7298 io.Copy(&snapshot, ringBuffer) 7299 err = &smithy.DeserializationError{ 7300 Err: fmt.Errorf("failed to decode response body, %w", err), 7301 Snapshot: snapshot.Bytes(), 7302 } 7303 return out, metadata, err 7304 } 7305 7306 return out, metadata, err 7307} 7308 7309func awsAwsquery_deserializeOpErrorVerifyDomainIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error { 7310 var errorBuffer bytes.Buffer 7311 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 7312 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 7313 } 7314 errorBody := bytes.NewReader(errorBuffer.Bytes()) 7315 7316 errorCode := "UnknownError" 7317 errorMessage := errorCode 7318 7319 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 7320 if err != nil { 7321 return err 7322 } 7323 if reqID := errorComponents.RequestID; len(reqID) != 0 { 7324 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 7325 } 7326 if len(errorComponents.Code) != 0 { 7327 errorCode = errorComponents.Code 7328 } 7329 if len(errorComponents.Message) != 0 { 7330 errorMessage = errorComponents.Message 7331 } 7332 errorBody.Seek(0, io.SeekStart) 7333 switch { 7334 default: 7335 genericError := &smithy.GenericAPIError{ 7336 Code: errorCode, 7337 Message: errorMessage, 7338 } 7339 return genericError 7340 7341 } 7342} 7343 7344type awsAwsquery_deserializeOpVerifyEmailAddress struct { 7345} 7346 7347func (*awsAwsquery_deserializeOpVerifyEmailAddress) ID() string { 7348 return "OperationDeserializer" 7349} 7350 7351func (m *awsAwsquery_deserializeOpVerifyEmailAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 7352 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 7353) { 7354 out, metadata, err = next.HandleDeserialize(ctx, in) 7355 if err != nil { 7356 return out, metadata, err 7357 } 7358 7359 response, ok := out.RawResponse.(*smithyhttp.Response) 7360 if !ok { 7361 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 7362 } 7363 7364 if response.StatusCode < 200 || response.StatusCode >= 300 { 7365 return out, metadata, awsAwsquery_deserializeOpErrorVerifyEmailAddress(response, &metadata) 7366 } 7367 output := &VerifyEmailAddressOutput{} 7368 out.Result = output 7369 7370 if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { 7371 return out, metadata, &smithy.DeserializationError{ 7372 Err: fmt.Errorf("failed to discard response body, %w", err), 7373 } 7374 } 7375 7376 return out, metadata, err 7377} 7378 7379func awsAwsquery_deserializeOpErrorVerifyEmailAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { 7380 var errorBuffer bytes.Buffer 7381 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 7382 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 7383 } 7384 errorBody := bytes.NewReader(errorBuffer.Bytes()) 7385 7386 errorCode := "UnknownError" 7387 errorMessage := errorCode 7388 7389 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 7390 if err != nil { 7391 return err 7392 } 7393 if reqID := errorComponents.RequestID; len(reqID) != 0 { 7394 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 7395 } 7396 if len(errorComponents.Code) != 0 { 7397 errorCode = errorComponents.Code 7398 } 7399 if len(errorComponents.Message) != 0 { 7400 errorMessage = errorComponents.Message 7401 } 7402 errorBody.Seek(0, io.SeekStart) 7403 switch { 7404 default: 7405 genericError := &smithy.GenericAPIError{ 7406 Code: errorCode, 7407 Message: errorMessage, 7408 } 7409 return genericError 7410 7411 } 7412} 7413 7414type awsAwsquery_deserializeOpVerifyEmailIdentity struct { 7415} 7416 7417func (*awsAwsquery_deserializeOpVerifyEmailIdentity) ID() string { 7418 return "OperationDeserializer" 7419} 7420 7421func (m *awsAwsquery_deserializeOpVerifyEmailIdentity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 7422 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 7423) { 7424 out, metadata, err = next.HandleDeserialize(ctx, in) 7425 if err != nil { 7426 return out, metadata, err 7427 } 7428 7429 response, ok := out.RawResponse.(*smithyhttp.Response) 7430 if !ok { 7431 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 7432 } 7433 7434 if response.StatusCode < 200 || response.StatusCode >= 300 { 7435 return out, metadata, awsAwsquery_deserializeOpErrorVerifyEmailIdentity(response, &metadata) 7436 } 7437 output := &VerifyEmailIdentityOutput{} 7438 out.Result = output 7439 7440 var buff [1024]byte 7441 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7442 body := io.TeeReader(response.Body, ringBuffer) 7443 rootDecoder := xml.NewDecoder(body) 7444 t, err := smithyxml.FetchRootElement(rootDecoder) 7445 if err == io.EOF { 7446 return out, metadata, nil 7447 } 7448 if err != nil { 7449 var snapshot bytes.Buffer 7450 io.Copy(&snapshot, ringBuffer) 7451 return out, metadata, &smithy.DeserializationError{ 7452 Err: fmt.Errorf("failed to decode response body, %w", err), 7453 Snapshot: snapshot.Bytes(), 7454 } 7455 } 7456 7457 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7458 t, err = decoder.GetElement("VerifyEmailIdentityResult") 7459 if err != nil { 7460 var snapshot bytes.Buffer 7461 io.Copy(&snapshot, ringBuffer) 7462 err = &smithy.DeserializationError{ 7463 Err: fmt.Errorf("failed to decode response body, %w", err), 7464 Snapshot: snapshot.Bytes(), 7465 } 7466 return out, metadata, err 7467 } 7468 7469 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7470 err = awsAwsquery_deserializeOpDocumentVerifyEmailIdentityOutput(&output, decoder) 7471 if err != nil { 7472 var snapshot bytes.Buffer 7473 io.Copy(&snapshot, ringBuffer) 7474 err = &smithy.DeserializationError{ 7475 Err: fmt.Errorf("failed to decode response body, %w", err), 7476 Snapshot: snapshot.Bytes(), 7477 } 7478 return out, metadata, err 7479 } 7480 7481 return out, metadata, err 7482} 7483 7484func awsAwsquery_deserializeOpErrorVerifyEmailIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error { 7485 var errorBuffer bytes.Buffer 7486 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 7487 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 7488 } 7489 errorBody := bytes.NewReader(errorBuffer.Bytes()) 7490 7491 errorCode := "UnknownError" 7492 errorMessage := errorCode 7493 7494 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 7495 if err != nil { 7496 return err 7497 } 7498 if reqID := errorComponents.RequestID; len(reqID) != 0 { 7499 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 7500 } 7501 if len(errorComponents.Code) != 0 { 7502 errorCode = errorComponents.Code 7503 } 7504 if len(errorComponents.Message) != 0 { 7505 errorMessage = errorComponents.Message 7506 } 7507 errorBody.Seek(0, io.SeekStart) 7508 switch { 7509 default: 7510 genericError := &smithy.GenericAPIError{ 7511 Code: errorCode, 7512 Message: errorMessage, 7513 } 7514 return genericError 7515 7516 } 7517} 7518 7519func awsAwsquery_deserializeErrorAccountSendingPausedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 7520 output := &types.AccountSendingPausedException{} 7521 var buff [1024]byte 7522 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7523 body := io.TeeReader(errorBody, ringBuffer) 7524 rootDecoder := xml.NewDecoder(body) 7525 t, err := smithyxml.FetchRootElement(rootDecoder) 7526 if err == io.EOF { 7527 return output 7528 } 7529 if err != nil { 7530 var snapshot bytes.Buffer 7531 io.Copy(&snapshot, ringBuffer) 7532 return &smithy.DeserializationError{ 7533 Err: fmt.Errorf("failed to decode response body, %w", err), 7534 Snapshot: snapshot.Bytes(), 7535 } 7536 } 7537 7538 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7539 t, err = decoder.GetElement("Error") 7540 if err != nil { 7541 var snapshot bytes.Buffer 7542 io.Copy(&snapshot, ringBuffer) 7543 return &smithy.DeserializationError{ 7544 Err: fmt.Errorf("failed to decode response body, %w", err), 7545 Snapshot: snapshot.Bytes(), 7546 } 7547 } 7548 7549 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7550 err = awsAwsquery_deserializeDocumentAccountSendingPausedException(&output, decoder) 7551 if err != nil { 7552 var snapshot bytes.Buffer 7553 io.Copy(&snapshot, ringBuffer) 7554 return &smithy.DeserializationError{ 7555 Err: fmt.Errorf("failed to decode response body, %w", err), 7556 Snapshot: snapshot.Bytes(), 7557 } 7558 } 7559 7560 return output 7561} 7562 7563func awsAwsquery_deserializeErrorAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 7564 output := &types.AlreadyExistsException{} 7565 var buff [1024]byte 7566 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7567 body := io.TeeReader(errorBody, ringBuffer) 7568 rootDecoder := xml.NewDecoder(body) 7569 t, err := smithyxml.FetchRootElement(rootDecoder) 7570 if err == io.EOF { 7571 return output 7572 } 7573 if err != nil { 7574 var snapshot bytes.Buffer 7575 io.Copy(&snapshot, ringBuffer) 7576 return &smithy.DeserializationError{ 7577 Err: fmt.Errorf("failed to decode response body, %w", err), 7578 Snapshot: snapshot.Bytes(), 7579 } 7580 } 7581 7582 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7583 t, err = decoder.GetElement("Error") 7584 if err != nil { 7585 var snapshot bytes.Buffer 7586 io.Copy(&snapshot, ringBuffer) 7587 return &smithy.DeserializationError{ 7588 Err: fmt.Errorf("failed to decode response body, %w", err), 7589 Snapshot: snapshot.Bytes(), 7590 } 7591 } 7592 7593 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7594 err = awsAwsquery_deserializeDocumentAlreadyExistsException(&output, decoder) 7595 if err != nil { 7596 var snapshot bytes.Buffer 7597 io.Copy(&snapshot, ringBuffer) 7598 return &smithy.DeserializationError{ 7599 Err: fmt.Errorf("failed to decode response body, %w", err), 7600 Snapshot: snapshot.Bytes(), 7601 } 7602 } 7603 7604 return output 7605} 7606 7607func awsAwsquery_deserializeErrorCannotDeleteException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 7608 output := &types.CannotDeleteException{} 7609 var buff [1024]byte 7610 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7611 body := io.TeeReader(errorBody, ringBuffer) 7612 rootDecoder := xml.NewDecoder(body) 7613 t, err := smithyxml.FetchRootElement(rootDecoder) 7614 if err == io.EOF { 7615 return output 7616 } 7617 if err != nil { 7618 var snapshot bytes.Buffer 7619 io.Copy(&snapshot, ringBuffer) 7620 return &smithy.DeserializationError{ 7621 Err: fmt.Errorf("failed to decode response body, %w", err), 7622 Snapshot: snapshot.Bytes(), 7623 } 7624 } 7625 7626 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7627 t, err = decoder.GetElement("Error") 7628 if err != nil { 7629 var snapshot bytes.Buffer 7630 io.Copy(&snapshot, ringBuffer) 7631 return &smithy.DeserializationError{ 7632 Err: fmt.Errorf("failed to decode response body, %w", err), 7633 Snapshot: snapshot.Bytes(), 7634 } 7635 } 7636 7637 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7638 err = awsAwsquery_deserializeDocumentCannotDeleteException(&output, decoder) 7639 if err != nil { 7640 var snapshot bytes.Buffer 7641 io.Copy(&snapshot, ringBuffer) 7642 return &smithy.DeserializationError{ 7643 Err: fmt.Errorf("failed to decode response body, %w", err), 7644 Snapshot: snapshot.Bytes(), 7645 } 7646 } 7647 7648 return output 7649} 7650 7651func awsAwsquery_deserializeErrorConfigurationSetAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 7652 output := &types.ConfigurationSetAlreadyExistsException{} 7653 var buff [1024]byte 7654 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7655 body := io.TeeReader(errorBody, ringBuffer) 7656 rootDecoder := xml.NewDecoder(body) 7657 t, err := smithyxml.FetchRootElement(rootDecoder) 7658 if err == io.EOF { 7659 return output 7660 } 7661 if err != nil { 7662 var snapshot bytes.Buffer 7663 io.Copy(&snapshot, ringBuffer) 7664 return &smithy.DeserializationError{ 7665 Err: fmt.Errorf("failed to decode response body, %w", err), 7666 Snapshot: snapshot.Bytes(), 7667 } 7668 } 7669 7670 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7671 t, err = decoder.GetElement("Error") 7672 if err != nil { 7673 var snapshot bytes.Buffer 7674 io.Copy(&snapshot, ringBuffer) 7675 return &smithy.DeserializationError{ 7676 Err: fmt.Errorf("failed to decode response body, %w", err), 7677 Snapshot: snapshot.Bytes(), 7678 } 7679 } 7680 7681 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7682 err = awsAwsquery_deserializeDocumentConfigurationSetAlreadyExistsException(&output, decoder) 7683 if err != nil { 7684 var snapshot bytes.Buffer 7685 io.Copy(&snapshot, ringBuffer) 7686 return &smithy.DeserializationError{ 7687 Err: fmt.Errorf("failed to decode response body, %w", err), 7688 Snapshot: snapshot.Bytes(), 7689 } 7690 } 7691 7692 return output 7693} 7694 7695func awsAwsquery_deserializeErrorConfigurationSetDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 7696 output := &types.ConfigurationSetDoesNotExistException{} 7697 var buff [1024]byte 7698 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7699 body := io.TeeReader(errorBody, ringBuffer) 7700 rootDecoder := xml.NewDecoder(body) 7701 t, err := smithyxml.FetchRootElement(rootDecoder) 7702 if err == io.EOF { 7703 return output 7704 } 7705 if err != nil { 7706 var snapshot bytes.Buffer 7707 io.Copy(&snapshot, ringBuffer) 7708 return &smithy.DeserializationError{ 7709 Err: fmt.Errorf("failed to decode response body, %w", err), 7710 Snapshot: snapshot.Bytes(), 7711 } 7712 } 7713 7714 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7715 t, err = decoder.GetElement("Error") 7716 if err != nil { 7717 var snapshot bytes.Buffer 7718 io.Copy(&snapshot, ringBuffer) 7719 return &smithy.DeserializationError{ 7720 Err: fmt.Errorf("failed to decode response body, %w", err), 7721 Snapshot: snapshot.Bytes(), 7722 } 7723 } 7724 7725 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7726 err = awsAwsquery_deserializeDocumentConfigurationSetDoesNotExistException(&output, decoder) 7727 if err != nil { 7728 var snapshot bytes.Buffer 7729 io.Copy(&snapshot, ringBuffer) 7730 return &smithy.DeserializationError{ 7731 Err: fmt.Errorf("failed to decode response body, %w", err), 7732 Snapshot: snapshot.Bytes(), 7733 } 7734 } 7735 7736 return output 7737} 7738 7739func awsAwsquery_deserializeErrorConfigurationSetSendingPausedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 7740 output := &types.ConfigurationSetSendingPausedException{} 7741 var buff [1024]byte 7742 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7743 body := io.TeeReader(errorBody, ringBuffer) 7744 rootDecoder := xml.NewDecoder(body) 7745 t, err := smithyxml.FetchRootElement(rootDecoder) 7746 if err == io.EOF { 7747 return output 7748 } 7749 if err != nil { 7750 var snapshot bytes.Buffer 7751 io.Copy(&snapshot, ringBuffer) 7752 return &smithy.DeserializationError{ 7753 Err: fmt.Errorf("failed to decode response body, %w", err), 7754 Snapshot: snapshot.Bytes(), 7755 } 7756 } 7757 7758 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7759 t, err = decoder.GetElement("Error") 7760 if err != nil { 7761 var snapshot bytes.Buffer 7762 io.Copy(&snapshot, ringBuffer) 7763 return &smithy.DeserializationError{ 7764 Err: fmt.Errorf("failed to decode response body, %w", err), 7765 Snapshot: snapshot.Bytes(), 7766 } 7767 } 7768 7769 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7770 err = awsAwsquery_deserializeDocumentConfigurationSetSendingPausedException(&output, decoder) 7771 if err != nil { 7772 var snapshot bytes.Buffer 7773 io.Copy(&snapshot, ringBuffer) 7774 return &smithy.DeserializationError{ 7775 Err: fmt.Errorf("failed to decode response body, %w", err), 7776 Snapshot: snapshot.Bytes(), 7777 } 7778 } 7779 7780 return output 7781} 7782 7783func awsAwsquery_deserializeErrorCustomVerificationEmailInvalidContentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 7784 output := &types.CustomVerificationEmailInvalidContentException{} 7785 var buff [1024]byte 7786 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7787 body := io.TeeReader(errorBody, ringBuffer) 7788 rootDecoder := xml.NewDecoder(body) 7789 t, err := smithyxml.FetchRootElement(rootDecoder) 7790 if err == io.EOF { 7791 return output 7792 } 7793 if err != nil { 7794 var snapshot bytes.Buffer 7795 io.Copy(&snapshot, ringBuffer) 7796 return &smithy.DeserializationError{ 7797 Err: fmt.Errorf("failed to decode response body, %w", err), 7798 Snapshot: snapshot.Bytes(), 7799 } 7800 } 7801 7802 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7803 t, err = decoder.GetElement("Error") 7804 if err != nil { 7805 var snapshot bytes.Buffer 7806 io.Copy(&snapshot, ringBuffer) 7807 return &smithy.DeserializationError{ 7808 Err: fmt.Errorf("failed to decode response body, %w", err), 7809 Snapshot: snapshot.Bytes(), 7810 } 7811 } 7812 7813 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7814 err = awsAwsquery_deserializeDocumentCustomVerificationEmailInvalidContentException(&output, decoder) 7815 if err != nil { 7816 var snapshot bytes.Buffer 7817 io.Copy(&snapshot, ringBuffer) 7818 return &smithy.DeserializationError{ 7819 Err: fmt.Errorf("failed to decode response body, %w", err), 7820 Snapshot: snapshot.Bytes(), 7821 } 7822 } 7823 7824 return output 7825} 7826 7827func awsAwsquery_deserializeErrorCustomVerificationEmailTemplateAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 7828 output := &types.CustomVerificationEmailTemplateAlreadyExistsException{} 7829 var buff [1024]byte 7830 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7831 body := io.TeeReader(errorBody, ringBuffer) 7832 rootDecoder := xml.NewDecoder(body) 7833 t, err := smithyxml.FetchRootElement(rootDecoder) 7834 if err == io.EOF { 7835 return output 7836 } 7837 if err != nil { 7838 var snapshot bytes.Buffer 7839 io.Copy(&snapshot, ringBuffer) 7840 return &smithy.DeserializationError{ 7841 Err: fmt.Errorf("failed to decode response body, %w", err), 7842 Snapshot: snapshot.Bytes(), 7843 } 7844 } 7845 7846 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7847 t, err = decoder.GetElement("Error") 7848 if err != nil { 7849 var snapshot bytes.Buffer 7850 io.Copy(&snapshot, ringBuffer) 7851 return &smithy.DeserializationError{ 7852 Err: fmt.Errorf("failed to decode response body, %w", err), 7853 Snapshot: snapshot.Bytes(), 7854 } 7855 } 7856 7857 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7858 err = awsAwsquery_deserializeDocumentCustomVerificationEmailTemplateAlreadyExistsException(&output, decoder) 7859 if err != nil { 7860 var snapshot bytes.Buffer 7861 io.Copy(&snapshot, ringBuffer) 7862 return &smithy.DeserializationError{ 7863 Err: fmt.Errorf("failed to decode response body, %w", err), 7864 Snapshot: snapshot.Bytes(), 7865 } 7866 } 7867 7868 return output 7869} 7870 7871func awsAwsquery_deserializeErrorCustomVerificationEmailTemplateDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 7872 output := &types.CustomVerificationEmailTemplateDoesNotExistException{} 7873 var buff [1024]byte 7874 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7875 body := io.TeeReader(errorBody, ringBuffer) 7876 rootDecoder := xml.NewDecoder(body) 7877 t, err := smithyxml.FetchRootElement(rootDecoder) 7878 if err == io.EOF { 7879 return output 7880 } 7881 if err != nil { 7882 var snapshot bytes.Buffer 7883 io.Copy(&snapshot, ringBuffer) 7884 return &smithy.DeserializationError{ 7885 Err: fmt.Errorf("failed to decode response body, %w", err), 7886 Snapshot: snapshot.Bytes(), 7887 } 7888 } 7889 7890 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7891 t, err = decoder.GetElement("Error") 7892 if err != nil { 7893 var snapshot bytes.Buffer 7894 io.Copy(&snapshot, ringBuffer) 7895 return &smithy.DeserializationError{ 7896 Err: fmt.Errorf("failed to decode response body, %w", err), 7897 Snapshot: snapshot.Bytes(), 7898 } 7899 } 7900 7901 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7902 err = awsAwsquery_deserializeDocumentCustomVerificationEmailTemplateDoesNotExistException(&output, decoder) 7903 if err != nil { 7904 var snapshot bytes.Buffer 7905 io.Copy(&snapshot, ringBuffer) 7906 return &smithy.DeserializationError{ 7907 Err: fmt.Errorf("failed to decode response body, %w", err), 7908 Snapshot: snapshot.Bytes(), 7909 } 7910 } 7911 7912 return output 7913} 7914 7915func awsAwsquery_deserializeErrorEventDestinationAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 7916 output := &types.EventDestinationAlreadyExistsException{} 7917 var buff [1024]byte 7918 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7919 body := io.TeeReader(errorBody, ringBuffer) 7920 rootDecoder := xml.NewDecoder(body) 7921 t, err := smithyxml.FetchRootElement(rootDecoder) 7922 if err == io.EOF { 7923 return output 7924 } 7925 if err != nil { 7926 var snapshot bytes.Buffer 7927 io.Copy(&snapshot, ringBuffer) 7928 return &smithy.DeserializationError{ 7929 Err: fmt.Errorf("failed to decode response body, %w", err), 7930 Snapshot: snapshot.Bytes(), 7931 } 7932 } 7933 7934 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7935 t, err = decoder.GetElement("Error") 7936 if err != nil { 7937 var snapshot bytes.Buffer 7938 io.Copy(&snapshot, ringBuffer) 7939 return &smithy.DeserializationError{ 7940 Err: fmt.Errorf("failed to decode response body, %w", err), 7941 Snapshot: snapshot.Bytes(), 7942 } 7943 } 7944 7945 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7946 err = awsAwsquery_deserializeDocumentEventDestinationAlreadyExistsException(&output, decoder) 7947 if err != nil { 7948 var snapshot bytes.Buffer 7949 io.Copy(&snapshot, ringBuffer) 7950 return &smithy.DeserializationError{ 7951 Err: fmt.Errorf("failed to decode response body, %w", err), 7952 Snapshot: snapshot.Bytes(), 7953 } 7954 } 7955 7956 return output 7957} 7958 7959func awsAwsquery_deserializeErrorEventDestinationDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 7960 output := &types.EventDestinationDoesNotExistException{} 7961 var buff [1024]byte 7962 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7963 body := io.TeeReader(errorBody, ringBuffer) 7964 rootDecoder := xml.NewDecoder(body) 7965 t, err := smithyxml.FetchRootElement(rootDecoder) 7966 if err == io.EOF { 7967 return output 7968 } 7969 if err != nil { 7970 var snapshot bytes.Buffer 7971 io.Copy(&snapshot, ringBuffer) 7972 return &smithy.DeserializationError{ 7973 Err: fmt.Errorf("failed to decode response body, %w", err), 7974 Snapshot: snapshot.Bytes(), 7975 } 7976 } 7977 7978 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7979 t, err = decoder.GetElement("Error") 7980 if err != nil { 7981 var snapshot bytes.Buffer 7982 io.Copy(&snapshot, ringBuffer) 7983 return &smithy.DeserializationError{ 7984 Err: fmt.Errorf("failed to decode response body, %w", err), 7985 Snapshot: snapshot.Bytes(), 7986 } 7987 } 7988 7989 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7990 err = awsAwsquery_deserializeDocumentEventDestinationDoesNotExistException(&output, decoder) 7991 if err != nil { 7992 var snapshot bytes.Buffer 7993 io.Copy(&snapshot, ringBuffer) 7994 return &smithy.DeserializationError{ 7995 Err: fmt.Errorf("failed to decode response body, %w", err), 7996 Snapshot: snapshot.Bytes(), 7997 } 7998 } 7999 8000 return output 8001} 8002 8003func awsAwsquery_deserializeErrorFromEmailAddressNotVerifiedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8004 output := &types.FromEmailAddressNotVerifiedException{} 8005 var buff [1024]byte 8006 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8007 body := io.TeeReader(errorBody, ringBuffer) 8008 rootDecoder := xml.NewDecoder(body) 8009 t, err := smithyxml.FetchRootElement(rootDecoder) 8010 if err == io.EOF { 8011 return output 8012 } 8013 if err != nil { 8014 var snapshot bytes.Buffer 8015 io.Copy(&snapshot, ringBuffer) 8016 return &smithy.DeserializationError{ 8017 Err: fmt.Errorf("failed to decode response body, %w", err), 8018 Snapshot: snapshot.Bytes(), 8019 } 8020 } 8021 8022 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8023 t, err = decoder.GetElement("Error") 8024 if err != nil { 8025 var snapshot bytes.Buffer 8026 io.Copy(&snapshot, ringBuffer) 8027 return &smithy.DeserializationError{ 8028 Err: fmt.Errorf("failed to decode response body, %w", err), 8029 Snapshot: snapshot.Bytes(), 8030 } 8031 } 8032 8033 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8034 err = awsAwsquery_deserializeDocumentFromEmailAddressNotVerifiedException(&output, decoder) 8035 if err != nil { 8036 var snapshot bytes.Buffer 8037 io.Copy(&snapshot, ringBuffer) 8038 return &smithy.DeserializationError{ 8039 Err: fmt.Errorf("failed to decode response body, %w", err), 8040 Snapshot: snapshot.Bytes(), 8041 } 8042 } 8043 8044 return output 8045} 8046 8047func awsAwsquery_deserializeErrorInvalidCloudWatchDestinationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8048 output := &types.InvalidCloudWatchDestinationException{} 8049 var buff [1024]byte 8050 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8051 body := io.TeeReader(errorBody, ringBuffer) 8052 rootDecoder := xml.NewDecoder(body) 8053 t, err := smithyxml.FetchRootElement(rootDecoder) 8054 if err == io.EOF { 8055 return output 8056 } 8057 if err != nil { 8058 var snapshot bytes.Buffer 8059 io.Copy(&snapshot, ringBuffer) 8060 return &smithy.DeserializationError{ 8061 Err: fmt.Errorf("failed to decode response body, %w", err), 8062 Snapshot: snapshot.Bytes(), 8063 } 8064 } 8065 8066 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8067 t, err = decoder.GetElement("Error") 8068 if err != nil { 8069 var snapshot bytes.Buffer 8070 io.Copy(&snapshot, ringBuffer) 8071 return &smithy.DeserializationError{ 8072 Err: fmt.Errorf("failed to decode response body, %w", err), 8073 Snapshot: snapshot.Bytes(), 8074 } 8075 } 8076 8077 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8078 err = awsAwsquery_deserializeDocumentInvalidCloudWatchDestinationException(&output, decoder) 8079 if err != nil { 8080 var snapshot bytes.Buffer 8081 io.Copy(&snapshot, ringBuffer) 8082 return &smithy.DeserializationError{ 8083 Err: fmt.Errorf("failed to decode response body, %w", err), 8084 Snapshot: snapshot.Bytes(), 8085 } 8086 } 8087 8088 return output 8089} 8090 8091func awsAwsquery_deserializeErrorInvalidConfigurationSetException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8092 output := &types.InvalidConfigurationSetException{} 8093 var buff [1024]byte 8094 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8095 body := io.TeeReader(errorBody, ringBuffer) 8096 rootDecoder := xml.NewDecoder(body) 8097 t, err := smithyxml.FetchRootElement(rootDecoder) 8098 if err == io.EOF { 8099 return output 8100 } 8101 if err != nil { 8102 var snapshot bytes.Buffer 8103 io.Copy(&snapshot, ringBuffer) 8104 return &smithy.DeserializationError{ 8105 Err: fmt.Errorf("failed to decode response body, %w", err), 8106 Snapshot: snapshot.Bytes(), 8107 } 8108 } 8109 8110 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8111 t, err = decoder.GetElement("Error") 8112 if err != nil { 8113 var snapshot bytes.Buffer 8114 io.Copy(&snapshot, ringBuffer) 8115 return &smithy.DeserializationError{ 8116 Err: fmt.Errorf("failed to decode response body, %w", err), 8117 Snapshot: snapshot.Bytes(), 8118 } 8119 } 8120 8121 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8122 err = awsAwsquery_deserializeDocumentInvalidConfigurationSetException(&output, decoder) 8123 if err != nil { 8124 var snapshot bytes.Buffer 8125 io.Copy(&snapshot, ringBuffer) 8126 return &smithy.DeserializationError{ 8127 Err: fmt.Errorf("failed to decode response body, %w", err), 8128 Snapshot: snapshot.Bytes(), 8129 } 8130 } 8131 8132 return output 8133} 8134 8135func awsAwsquery_deserializeErrorInvalidDeliveryOptionsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8136 output := &types.InvalidDeliveryOptionsException{} 8137 var buff [1024]byte 8138 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8139 body := io.TeeReader(errorBody, ringBuffer) 8140 rootDecoder := xml.NewDecoder(body) 8141 t, err := smithyxml.FetchRootElement(rootDecoder) 8142 if err == io.EOF { 8143 return output 8144 } 8145 if err != nil { 8146 var snapshot bytes.Buffer 8147 io.Copy(&snapshot, ringBuffer) 8148 return &smithy.DeserializationError{ 8149 Err: fmt.Errorf("failed to decode response body, %w", err), 8150 Snapshot: snapshot.Bytes(), 8151 } 8152 } 8153 8154 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8155 t, err = decoder.GetElement("Error") 8156 if err != nil { 8157 var snapshot bytes.Buffer 8158 io.Copy(&snapshot, ringBuffer) 8159 return &smithy.DeserializationError{ 8160 Err: fmt.Errorf("failed to decode response body, %w", err), 8161 Snapshot: snapshot.Bytes(), 8162 } 8163 } 8164 8165 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8166 err = awsAwsquery_deserializeDocumentInvalidDeliveryOptionsException(&output, decoder) 8167 if err != nil { 8168 var snapshot bytes.Buffer 8169 io.Copy(&snapshot, ringBuffer) 8170 return &smithy.DeserializationError{ 8171 Err: fmt.Errorf("failed to decode response body, %w", err), 8172 Snapshot: snapshot.Bytes(), 8173 } 8174 } 8175 8176 return output 8177} 8178 8179func awsAwsquery_deserializeErrorInvalidFirehoseDestinationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8180 output := &types.InvalidFirehoseDestinationException{} 8181 var buff [1024]byte 8182 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8183 body := io.TeeReader(errorBody, ringBuffer) 8184 rootDecoder := xml.NewDecoder(body) 8185 t, err := smithyxml.FetchRootElement(rootDecoder) 8186 if err == io.EOF { 8187 return output 8188 } 8189 if err != nil { 8190 var snapshot bytes.Buffer 8191 io.Copy(&snapshot, ringBuffer) 8192 return &smithy.DeserializationError{ 8193 Err: fmt.Errorf("failed to decode response body, %w", err), 8194 Snapshot: snapshot.Bytes(), 8195 } 8196 } 8197 8198 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8199 t, err = decoder.GetElement("Error") 8200 if err != nil { 8201 var snapshot bytes.Buffer 8202 io.Copy(&snapshot, ringBuffer) 8203 return &smithy.DeserializationError{ 8204 Err: fmt.Errorf("failed to decode response body, %w", err), 8205 Snapshot: snapshot.Bytes(), 8206 } 8207 } 8208 8209 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8210 err = awsAwsquery_deserializeDocumentInvalidFirehoseDestinationException(&output, decoder) 8211 if err != nil { 8212 var snapshot bytes.Buffer 8213 io.Copy(&snapshot, ringBuffer) 8214 return &smithy.DeserializationError{ 8215 Err: fmt.Errorf("failed to decode response body, %w", err), 8216 Snapshot: snapshot.Bytes(), 8217 } 8218 } 8219 8220 return output 8221} 8222 8223func awsAwsquery_deserializeErrorInvalidLambdaFunctionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8224 output := &types.InvalidLambdaFunctionException{} 8225 var buff [1024]byte 8226 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8227 body := io.TeeReader(errorBody, ringBuffer) 8228 rootDecoder := xml.NewDecoder(body) 8229 t, err := smithyxml.FetchRootElement(rootDecoder) 8230 if err == io.EOF { 8231 return output 8232 } 8233 if err != nil { 8234 var snapshot bytes.Buffer 8235 io.Copy(&snapshot, ringBuffer) 8236 return &smithy.DeserializationError{ 8237 Err: fmt.Errorf("failed to decode response body, %w", err), 8238 Snapshot: snapshot.Bytes(), 8239 } 8240 } 8241 8242 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8243 t, err = decoder.GetElement("Error") 8244 if err != nil { 8245 var snapshot bytes.Buffer 8246 io.Copy(&snapshot, ringBuffer) 8247 return &smithy.DeserializationError{ 8248 Err: fmt.Errorf("failed to decode response body, %w", err), 8249 Snapshot: snapshot.Bytes(), 8250 } 8251 } 8252 8253 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8254 err = awsAwsquery_deserializeDocumentInvalidLambdaFunctionException(&output, decoder) 8255 if err != nil { 8256 var snapshot bytes.Buffer 8257 io.Copy(&snapshot, ringBuffer) 8258 return &smithy.DeserializationError{ 8259 Err: fmt.Errorf("failed to decode response body, %w", err), 8260 Snapshot: snapshot.Bytes(), 8261 } 8262 } 8263 8264 return output 8265} 8266 8267func awsAwsquery_deserializeErrorInvalidPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8268 output := &types.InvalidPolicyException{} 8269 var buff [1024]byte 8270 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8271 body := io.TeeReader(errorBody, ringBuffer) 8272 rootDecoder := xml.NewDecoder(body) 8273 t, err := smithyxml.FetchRootElement(rootDecoder) 8274 if err == io.EOF { 8275 return output 8276 } 8277 if err != nil { 8278 var snapshot bytes.Buffer 8279 io.Copy(&snapshot, ringBuffer) 8280 return &smithy.DeserializationError{ 8281 Err: fmt.Errorf("failed to decode response body, %w", err), 8282 Snapshot: snapshot.Bytes(), 8283 } 8284 } 8285 8286 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8287 t, err = decoder.GetElement("Error") 8288 if err != nil { 8289 var snapshot bytes.Buffer 8290 io.Copy(&snapshot, ringBuffer) 8291 return &smithy.DeserializationError{ 8292 Err: fmt.Errorf("failed to decode response body, %w", err), 8293 Snapshot: snapshot.Bytes(), 8294 } 8295 } 8296 8297 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8298 err = awsAwsquery_deserializeDocumentInvalidPolicyException(&output, decoder) 8299 if err != nil { 8300 var snapshot bytes.Buffer 8301 io.Copy(&snapshot, ringBuffer) 8302 return &smithy.DeserializationError{ 8303 Err: fmt.Errorf("failed to decode response body, %w", err), 8304 Snapshot: snapshot.Bytes(), 8305 } 8306 } 8307 8308 return output 8309} 8310 8311func awsAwsquery_deserializeErrorInvalidRenderingParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8312 output := &types.InvalidRenderingParameterException{} 8313 var buff [1024]byte 8314 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8315 body := io.TeeReader(errorBody, ringBuffer) 8316 rootDecoder := xml.NewDecoder(body) 8317 t, err := smithyxml.FetchRootElement(rootDecoder) 8318 if err == io.EOF { 8319 return output 8320 } 8321 if err != nil { 8322 var snapshot bytes.Buffer 8323 io.Copy(&snapshot, ringBuffer) 8324 return &smithy.DeserializationError{ 8325 Err: fmt.Errorf("failed to decode response body, %w", err), 8326 Snapshot: snapshot.Bytes(), 8327 } 8328 } 8329 8330 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8331 t, err = decoder.GetElement("Error") 8332 if err != nil { 8333 var snapshot bytes.Buffer 8334 io.Copy(&snapshot, ringBuffer) 8335 return &smithy.DeserializationError{ 8336 Err: fmt.Errorf("failed to decode response body, %w", err), 8337 Snapshot: snapshot.Bytes(), 8338 } 8339 } 8340 8341 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8342 err = awsAwsquery_deserializeDocumentInvalidRenderingParameterException(&output, decoder) 8343 if err != nil { 8344 var snapshot bytes.Buffer 8345 io.Copy(&snapshot, ringBuffer) 8346 return &smithy.DeserializationError{ 8347 Err: fmt.Errorf("failed to decode response body, %w", err), 8348 Snapshot: snapshot.Bytes(), 8349 } 8350 } 8351 8352 return output 8353} 8354 8355func awsAwsquery_deserializeErrorInvalidS3ConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8356 output := &types.InvalidS3ConfigurationException{} 8357 var buff [1024]byte 8358 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8359 body := io.TeeReader(errorBody, ringBuffer) 8360 rootDecoder := xml.NewDecoder(body) 8361 t, err := smithyxml.FetchRootElement(rootDecoder) 8362 if err == io.EOF { 8363 return output 8364 } 8365 if err != nil { 8366 var snapshot bytes.Buffer 8367 io.Copy(&snapshot, ringBuffer) 8368 return &smithy.DeserializationError{ 8369 Err: fmt.Errorf("failed to decode response body, %w", err), 8370 Snapshot: snapshot.Bytes(), 8371 } 8372 } 8373 8374 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8375 t, err = decoder.GetElement("Error") 8376 if err != nil { 8377 var snapshot bytes.Buffer 8378 io.Copy(&snapshot, ringBuffer) 8379 return &smithy.DeserializationError{ 8380 Err: fmt.Errorf("failed to decode response body, %w", err), 8381 Snapshot: snapshot.Bytes(), 8382 } 8383 } 8384 8385 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8386 err = awsAwsquery_deserializeDocumentInvalidS3ConfigurationException(&output, decoder) 8387 if err != nil { 8388 var snapshot bytes.Buffer 8389 io.Copy(&snapshot, ringBuffer) 8390 return &smithy.DeserializationError{ 8391 Err: fmt.Errorf("failed to decode response body, %w", err), 8392 Snapshot: snapshot.Bytes(), 8393 } 8394 } 8395 8396 return output 8397} 8398 8399func awsAwsquery_deserializeErrorInvalidSNSDestinationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8400 output := &types.InvalidSNSDestinationException{} 8401 var buff [1024]byte 8402 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8403 body := io.TeeReader(errorBody, ringBuffer) 8404 rootDecoder := xml.NewDecoder(body) 8405 t, err := smithyxml.FetchRootElement(rootDecoder) 8406 if err == io.EOF { 8407 return output 8408 } 8409 if err != nil { 8410 var snapshot bytes.Buffer 8411 io.Copy(&snapshot, ringBuffer) 8412 return &smithy.DeserializationError{ 8413 Err: fmt.Errorf("failed to decode response body, %w", err), 8414 Snapshot: snapshot.Bytes(), 8415 } 8416 } 8417 8418 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8419 t, err = decoder.GetElement("Error") 8420 if err != nil { 8421 var snapshot bytes.Buffer 8422 io.Copy(&snapshot, ringBuffer) 8423 return &smithy.DeserializationError{ 8424 Err: fmt.Errorf("failed to decode response body, %w", err), 8425 Snapshot: snapshot.Bytes(), 8426 } 8427 } 8428 8429 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8430 err = awsAwsquery_deserializeDocumentInvalidSNSDestinationException(&output, decoder) 8431 if err != nil { 8432 var snapshot bytes.Buffer 8433 io.Copy(&snapshot, ringBuffer) 8434 return &smithy.DeserializationError{ 8435 Err: fmt.Errorf("failed to decode response body, %w", err), 8436 Snapshot: snapshot.Bytes(), 8437 } 8438 } 8439 8440 return output 8441} 8442 8443func awsAwsquery_deserializeErrorInvalidSnsTopicException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8444 output := &types.InvalidSnsTopicException{} 8445 var buff [1024]byte 8446 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8447 body := io.TeeReader(errorBody, ringBuffer) 8448 rootDecoder := xml.NewDecoder(body) 8449 t, err := smithyxml.FetchRootElement(rootDecoder) 8450 if err == io.EOF { 8451 return output 8452 } 8453 if err != nil { 8454 var snapshot bytes.Buffer 8455 io.Copy(&snapshot, ringBuffer) 8456 return &smithy.DeserializationError{ 8457 Err: fmt.Errorf("failed to decode response body, %w", err), 8458 Snapshot: snapshot.Bytes(), 8459 } 8460 } 8461 8462 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8463 t, err = decoder.GetElement("Error") 8464 if err != nil { 8465 var snapshot bytes.Buffer 8466 io.Copy(&snapshot, ringBuffer) 8467 return &smithy.DeserializationError{ 8468 Err: fmt.Errorf("failed to decode response body, %w", err), 8469 Snapshot: snapshot.Bytes(), 8470 } 8471 } 8472 8473 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8474 err = awsAwsquery_deserializeDocumentInvalidSnsTopicException(&output, decoder) 8475 if err != nil { 8476 var snapshot bytes.Buffer 8477 io.Copy(&snapshot, ringBuffer) 8478 return &smithy.DeserializationError{ 8479 Err: fmt.Errorf("failed to decode response body, %w", err), 8480 Snapshot: snapshot.Bytes(), 8481 } 8482 } 8483 8484 return output 8485} 8486 8487func awsAwsquery_deserializeErrorInvalidTemplateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8488 output := &types.InvalidTemplateException{} 8489 var buff [1024]byte 8490 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8491 body := io.TeeReader(errorBody, ringBuffer) 8492 rootDecoder := xml.NewDecoder(body) 8493 t, err := smithyxml.FetchRootElement(rootDecoder) 8494 if err == io.EOF { 8495 return output 8496 } 8497 if err != nil { 8498 var snapshot bytes.Buffer 8499 io.Copy(&snapshot, ringBuffer) 8500 return &smithy.DeserializationError{ 8501 Err: fmt.Errorf("failed to decode response body, %w", err), 8502 Snapshot: snapshot.Bytes(), 8503 } 8504 } 8505 8506 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8507 t, err = decoder.GetElement("Error") 8508 if err != nil { 8509 var snapshot bytes.Buffer 8510 io.Copy(&snapshot, ringBuffer) 8511 return &smithy.DeserializationError{ 8512 Err: fmt.Errorf("failed to decode response body, %w", err), 8513 Snapshot: snapshot.Bytes(), 8514 } 8515 } 8516 8517 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8518 err = awsAwsquery_deserializeDocumentInvalidTemplateException(&output, decoder) 8519 if err != nil { 8520 var snapshot bytes.Buffer 8521 io.Copy(&snapshot, ringBuffer) 8522 return &smithy.DeserializationError{ 8523 Err: fmt.Errorf("failed to decode response body, %w", err), 8524 Snapshot: snapshot.Bytes(), 8525 } 8526 } 8527 8528 return output 8529} 8530 8531func awsAwsquery_deserializeErrorInvalidTrackingOptionsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8532 output := &types.InvalidTrackingOptionsException{} 8533 var buff [1024]byte 8534 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8535 body := io.TeeReader(errorBody, ringBuffer) 8536 rootDecoder := xml.NewDecoder(body) 8537 t, err := smithyxml.FetchRootElement(rootDecoder) 8538 if err == io.EOF { 8539 return output 8540 } 8541 if err != nil { 8542 var snapshot bytes.Buffer 8543 io.Copy(&snapshot, ringBuffer) 8544 return &smithy.DeserializationError{ 8545 Err: fmt.Errorf("failed to decode response body, %w", err), 8546 Snapshot: snapshot.Bytes(), 8547 } 8548 } 8549 8550 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8551 t, err = decoder.GetElement("Error") 8552 if err != nil { 8553 var snapshot bytes.Buffer 8554 io.Copy(&snapshot, ringBuffer) 8555 return &smithy.DeserializationError{ 8556 Err: fmt.Errorf("failed to decode response body, %w", err), 8557 Snapshot: snapshot.Bytes(), 8558 } 8559 } 8560 8561 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8562 err = awsAwsquery_deserializeDocumentInvalidTrackingOptionsException(&output, decoder) 8563 if err != nil { 8564 var snapshot bytes.Buffer 8565 io.Copy(&snapshot, ringBuffer) 8566 return &smithy.DeserializationError{ 8567 Err: fmt.Errorf("failed to decode response body, %w", err), 8568 Snapshot: snapshot.Bytes(), 8569 } 8570 } 8571 8572 return output 8573} 8574 8575func awsAwsquery_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8576 output := &types.LimitExceededException{} 8577 var buff [1024]byte 8578 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8579 body := io.TeeReader(errorBody, ringBuffer) 8580 rootDecoder := xml.NewDecoder(body) 8581 t, err := smithyxml.FetchRootElement(rootDecoder) 8582 if err == io.EOF { 8583 return output 8584 } 8585 if err != nil { 8586 var snapshot bytes.Buffer 8587 io.Copy(&snapshot, ringBuffer) 8588 return &smithy.DeserializationError{ 8589 Err: fmt.Errorf("failed to decode response body, %w", err), 8590 Snapshot: snapshot.Bytes(), 8591 } 8592 } 8593 8594 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8595 t, err = decoder.GetElement("Error") 8596 if err != nil { 8597 var snapshot bytes.Buffer 8598 io.Copy(&snapshot, ringBuffer) 8599 return &smithy.DeserializationError{ 8600 Err: fmt.Errorf("failed to decode response body, %w", err), 8601 Snapshot: snapshot.Bytes(), 8602 } 8603 } 8604 8605 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8606 err = awsAwsquery_deserializeDocumentLimitExceededException(&output, decoder) 8607 if err != nil { 8608 var snapshot bytes.Buffer 8609 io.Copy(&snapshot, ringBuffer) 8610 return &smithy.DeserializationError{ 8611 Err: fmt.Errorf("failed to decode response body, %w", err), 8612 Snapshot: snapshot.Bytes(), 8613 } 8614 } 8615 8616 return output 8617} 8618 8619func awsAwsquery_deserializeErrorMailFromDomainNotVerifiedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8620 output := &types.MailFromDomainNotVerifiedException{} 8621 var buff [1024]byte 8622 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8623 body := io.TeeReader(errorBody, ringBuffer) 8624 rootDecoder := xml.NewDecoder(body) 8625 t, err := smithyxml.FetchRootElement(rootDecoder) 8626 if err == io.EOF { 8627 return output 8628 } 8629 if err != nil { 8630 var snapshot bytes.Buffer 8631 io.Copy(&snapshot, ringBuffer) 8632 return &smithy.DeserializationError{ 8633 Err: fmt.Errorf("failed to decode response body, %w", err), 8634 Snapshot: snapshot.Bytes(), 8635 } 8636 } 8637 8638 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8639 t, err = decoder.GetElement("Error") 8640 if err != nil { 8641 var snapshot bytes.Buffer 8642 io.Copy(&snapshot, ringBuffer) 8643 return &smithy.DeserializationError{ 8644 Err: fmt.Errorf("failed to decode response body, %w", err), 8645 Snapshot: snapshot.Bytes(), 8646 } 8647 } 8648 8649 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8650 err = awsAwsquery_deserializeDocumentMailFromDomainNotVerifiedException(&output, decoder) 8651 if err != nil { 8652 var snapshot bytes.Buffer 8653 io.Copy(&snapshot, ringBuffer) 8654 return &smithy.DeserializationError{ 8655 Err: fmt.Errorf("failed to decode response body, %w", err), 8656 Snapshot: snapshot.Bytes(), 8657 } 8658 } 8659 8660 return output 8661} 8662 8663func awsAwsquery_deserializeErrorMessageRejected(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8664 output := &types.MessageRejected{} 8665 var buff [1024]byte 8666 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8667 body := io.TeeReader(errorBody, ringBuffer) 8668 rootDecoder := xml.NewDecoder(body) 8669 t, err := smithyxml.FetchRootElement(rootDecoder) 8670 if err == io.EOF { 8671 return output 8672 } 8673 if err != nil { 8674 var snapshot bytes.Buffer 8675 io.Copy(&snapshot, ringBuffer) 8676 return &smithy.DeserializationError{ 8677 Err: fmt.Errorf("failed to decode response body, %w", err), 8678 Snapshot: snapshot.Bytes(), 8679 } 8680 } 8681 8682 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8683 t, err = decoder.GetElement("Error") 8684 if err != nil { 8685 var snapshot bytes.Buffer 8686 io.Copy(&snapshot, ringBuffer) 8687 return &smithy.DeserializationError{ 8688 Err: fmt.Errorf("failed to decode response body, %w", err), 8689 Snapshot: snapshot.Bytes(), 8690 } 8691 } 8692 8693 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8694 err = awsAwsquery_deserializeDocumentMessageRejected(&output, decoder) 8695 if err != nil { 8696 var snapshot bytes.Buffer 8697 io.Copy(&snapshot, ringBuffer) 8698 return &smithy.DeserializationError{ 8699 Err: fmt.Errorf("failed to decode response body, %w", err), 8700 Snapshot: snapshot.Bytes(), 8701 } 8702 } 8703 8704 return output 8705} 8706 8707func awsAwsquery_deserializeErrorMissingRenderingAttributeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8708 output := &types.MissingRenderingAttributeException{} 8709 var buff [1024]byte 8710 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8711 body := io.TeeReader(errorBody, ringBuffer) 8712 rootDecoder := xml.NewDecoder(body) 8713 t, err := smithyxml.FetchRootElement(rootDecoder) 8714 if err == io.EOF { 8715 return output 8716 } 8717 if err != nil { 8718 var snapshot bytes.Buffer 8719 io.Copy(&snapshot, ringBuffer) 8720 return &smithy.DeserializationError{ 8721 Err: fmt.Errorf("failed to decode response body, %w", err), 8722 Snapshot: snapshot.Bytes(), 8723 } 8724 } 8725 8726 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8727 t, err = decoder.GetElement("Error") 8728 if err != nil { 8729 var snapshot bytes.Buffer 8730 io.Copy(&snapshot, ringBuffer) 8731 return &smithy.DeserializationError{ 8732 Err: fmt.Errorf("failed to decode response body, %w", err), 8733 Snapshot: snapshot.Bytes(), 8734 } 8735 } 8736 8737 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8738 err = awsAwsquery_deserializeDocumentMissingRenderingAttributeException(&output, decoder) 8739 if err != nil { 8740 var snapshot bytes.Buffer 8741 io.Copy(&snapshot, ringBuffer) 8742 return &smithy.DeserializationError{ 8743 Err: fmt.Errorf("failed to decode response body, %w", err), 8744 Snapshot: snapshot.Bytes(), 8745 } 8746 } 8747 8748 return output 8749} 8750 8751func awsAwsquery_deserializeErrorProductionAccessNotGrantedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8752 output := &types.ProductionAccessNotGrantedException{} 8753 var buff [1024]byte 8754 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8755 body := io.TeeReader(errorBody, ringBuffer) 8756 rootDecoder := xml.NewDecoder(body) 8757 t, err := smithyxml.FetchRootElement(rootDecoder) 8758 if err == io.EOF { 8759 return output 8760 } 8761 if err != nil { 8762 var snapshot bytes.Buffer 8763 io.Copy(&snapshot, ringBuffer) 8764 return &smithy.DeserializationError{ 8765 Err: fmt.Errorf("failed to decode response body, %w", err), 8766 Snapshot: snapshot.Bytes(), 8767 } 8768 } 8769 8770 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8771 t, err = decoder.GetElement("Error") 8772 if err != nil { 8773 var snapshot bytes.Buffer 8774 io.Copy(&snapshot, ringBuffer) 8775 return &smithy.DeserializationError{ 8776 Err: fmt.Errorf("failed to decode response body, %w", err), 8777 Snapshot: snapshot.Bytes(), 8778 } 8779 } 8780 8781 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8782 err = awsAwsquery_deserializeDocumentProductionAccessNotGrantedException(&output, decoder) 8783 if err != nil { 8784 var snapshot bytes.Buffer 8785 io.Copy(&snapshot, ringBuffer) 8786 return &smithy.DeserializationError{ 8787 Err: fmt.Errorf("failed to decode response body, %w", err), 8788 Snapshot: snapshot.Bytes(), 8789 } 8790 } 8791 8792 return output 8793} 8794 8795func awsAwsquery_deserializeErrorRuleDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8796 output := &types.RuleDoesNotExistException{} 8797 var buff [1024]byte 8798 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8799 body := io.TeeReader(errorBody, ringBuffer) 8800 rootDecoder := xml.NewDecoder(body) 8801 t, err := smithyxml.FetchRootElement(rootDecoder) 8802 if err == io.EOF { 8803 return output 8804 } 8805 if err != nil { 8806 var snapshot bytes.Buffer 8807 io.Copy(&snapshot, ringBuffer) 8808 return &smithy.DeserializationError{ 8809 Err: fmt.Errorf("failed to decode response body, %w", err), 8810 Snapshot: snapshot.Bytes(), 8811 } 8812 } 8813 8814 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8815 t, err = decoder.GetElement("Error") 8816 if err != nil { 8817 var snapshot bytes.Buffer 8818 io.Copy(&snapshot, ringBuffer) 8819 return &smithy.DeserializationError{ 8820 Err: fmt.Errorf("failed to decode response body, %w", err), 8821 Snapshot: snapshot.Bytes(), 8822 } 8823 } 8824 8825 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8826 err = awsAwsquery_deserializeDocumentRuleDoesNotExistException(&output, decoder) 8827 if err != nil { 8828 var snapshot bytes.Buffer 8829 io.Copy(&snapshot, ringBuffer) 8830 return &smithy.DeserializationError{ 8831 Err: fmt.Errorf("failed to decode response body, %w", err), 8832 Snapshot: snapshot.Bytes(), 8833 } 8834 } 8835 8836 return output 8837} 8838 8839func awsAwsquery_deserializeErrorRuleSetDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8840 output := &types.RuleSetDoesNotExistException{} 8841 var buff [1024]byte 8842 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8843 body := io.TeeReader(errorBody, ringBuffer) 8844 rootDecoder := xml.NewDecoder(body) 8845 t, err := smithyxml.FetchRootElement(rootDecoder) 8846 if err == io.EOF { 8847 return output 8848 } 8849 if err != nil { 8850 var snapshot bytes.Buffer 8851 io.Copy(&snapshot, ringBuffer) 8852 return &smithy.DeserializationError{ 8853 Err: fmt.Errorf("failed to decode response body, %w", err), 8854 Snapshot: snapshot.Bytes(), 8855 } 8856 } 8857 8858 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8859 t, err = decoder.GetElement("Error") 8860 if err != nil { 8861 var snapshot bytes.Buffer 8862 io.Copy(&snapshot, ringBuffer) 8863 return &smithy.DeserializationError{ 8864 Err: fmt.Errorf("failed to decode response body, %w", err), 8865 Snapshot: snapshot.Bytes(), 8866 } 8867 } 8868 8869 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8870 err = awsAwsquery_deserializeDocumentRuleSetDoesNotExistException(&output, decoder) 8871 if err != nil { 8872 var snapshot bytes.Buffer 8873 io.Copy(&snapshot, ringBuffer) 8874 return &smithy.DeserializationError{ 8875 Err: fmt.Errorf("failed to decode response body, %w", err), 8876 Snapshot: snapshot.Bytes(), 8877 } 8878 } 8879 8880 return output 8881} 8882 8883func awsAwsquery_deserializeErrorTemplateDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8884 output := &types.TemplateDoesNotExistException{} 8885 var buff [1024]byte 8886 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8887 body := io.TeeReader(errorBody, ringBuffer) 8888 rootDecoder := xml.NewDecoder(body) 8889 t, err := smithyxml.FetchRootElement(rootDecoder) 8890 if err == io.EOF { 8891 return output 8892 } 8893 if err != nil { 8894 var snapshot bytes.Buffer 8895 io.Copy(&snapshot, ringBuffer) 8896 return &smithy.DeserializationError{ 8897 Err: fmt.Errorf("failed to decode response body, %w", err), 8898 Snapshot: snapshot.Bytes(), 8899 } 8900 } 8901 8902 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8903 t, err = decoder.GetElement("Error") 8904 if err != nil { 8905 var snapshot bytes.Buffer 8906 io.Copy(&snapshot, ringBuffer) 8907 return &smithy.DeserializationError{ 8908 Err: fmt.Errorf("failed to decode response body, %w", err), 8909 Snapshot: snapshot.Bytes(), 8910 } 8911 } 8912 8913 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8914 err = awsAwsquery_deserializeDocumentTemplateDoesNotExistException(&output, decoder) 8915 if err != nil { 8916 var snapshot bytes.Buffer 8917 io.Copy(&snapshot, ringBuffer) 8918 return &smithy.DeserializationError{ 8919 Err: fmt.Errorf("failed to decode response body, %w", err), 8920 Snapshot: snapshot.Bytes(), 8921 } 8922 } 8923 8924 return output 8925} 8926 8927func awsAwsquery_deserializeErrorTrackingOptionsAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8928 output := &types.TrackingOptionsAlreadyExistsException{} 8929 var buff [1024]byte 8930 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8931 body := io.TeeReader(errorBody, ringBuffer) 8932 rootDecoder := xml.NewDecoder(body) 8933 t, err := smithyxml.FetchRootElement(rootDecoder) 8934 if err == io.EOF { 8935 return output 8936 } 8937 if err != nil { 8938 var snapshot bytes.Buffer 8939 io.Copy(&snapshot, ringBuffer) 8940 return &smithy.DeserializationError{ 8941 Err: fmt.Errorf("failed to decode response body, %w", err), 8942 Snapshot: snapshot.Bytes(), 8943 } 8944 } 8945 8946 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8947 t, err = decoder.GetElement("Error") 8948 if err != nil { 8949 var snapshot bytes.Buffer 8950 io.Copy(&snapshot, ringBuffer) 8951 return &smithy.DeserializationError{ 8952 Err: fmt.Errorf("failed to decode response body, %w", err), 8953 Snapshot: snapshot.Bytes(), 8954 } 8955 } 8956 8957 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8958 err = awsAwsquery_deserializeDocumentTrackingOptionsAlreadyExistsException(&output, decoder) 8959 if err != nil { 8960 var snapshot bytes.Buffer 8961 io.Copy(&snapshot, ringBuffer) 8962 return &smithy.DeserializationError{ 8963 Err: fmt.Errorf("failed to decode response body, %w", err), 8964 Snapshot: snapshot.Bytes(), 8965 } 8966 } 8967 8968 return output 8969} 8970 8971func awsAwsquery_deserializeErrorTrackingOptionsDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 8972 output := &types.TrackingOptionsDoesNotExistException{} 8973 var buff [1024]byte 8974 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8975 body := io.TeeReader(errorBody, ringBuffer) 8976 rootDecoder := xml.NewDecoder(body) 8977 t, err := smithyxml.FetchRootElement(rootDecoder) 8978 if err == io.EOF { 8979 return output 8980 } 8981 if err != nil { 8982 var snapshot bytes.Buffer 8983 io.Copy(&snapshot, ringBuffer) 8984 return &smithy.DeserializationError{ 8985 Err: fmt.Errorf("failed to decode response body, %w", err), 8986 Snapshot: snapshot.Bytes(), 8987 } 8988 } 8989 8990 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8991 t, err = decoder.GetElement("Error") 8992 if err != nil { 8993 var snapshot bytes.Buffer 8994 io.Copy(&snapshot, ringBuffer) 8995 return &smithy.DeserializationError{ 8996 Err: fmt.Errorf("failed to decode response body, %w", err), 8997 Snapshot: snapshot.Bytes(), 8998 } 8999 } 9000 9001 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9002 err = awsAwsquery_deserializeDocumentTrackingOptionsDoesNotExistException(&output, decoder) 9003 if err != nil { 9004 var snapshot bytes.Buffer 9005 io.Copy(&snapshot, ringBuffer) 9006 return &smithy.DeserializationError{ 9007 Err: fmt.Errorf("failed to decode response body, %w", err), 9008 Snapshot: snapshot.Bytes(), 9009 } 9010 } 9011 9012 return output 9013} 9014 9015func awsAwsquery_deserializeDocumentAccountSendingPausedException(v **types.AccountSendingPausedException, decoder smithyxml.NodeDecoder) error { 9016 if v == nil { 9017 return fmt.Errorf("unexpected nil of type %T", v) 9018 } 9019 var sv *types.AccountSendingPausedException 9020 if *v == nil { 9021 sv = &types.AccountSendingPausedException{} 9022 } else { 9023 sv = *v 9024 } 9025 9026 for { 9027 t, done, err := decoder.Token() 9028 if err != nil { 9029 return err 9030 } 9031 if done { 9032 break 9033 } 9034 originalDecoder := decoder 9035 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9036 switch { 9037 case strings.EqualFold("message", t.Name.Local): 9038 val, err := decoder.Value() 9039 if err != nil { 9040 return err 9041 } 9042 if val == nil { 9043 break 9044 } 9045 { 9046 xtv := string(val) 9047 sv.Message = ptr.String(xtv) 9048 } 9049 9050 default: 9051 // Do nothing and ignore the unexpected tag element 9052 err = decoder.Decoder.Skip() 9053 if err != nil { 9054 return err 9055 } 9056 9057 } 9058 decoder = originalDecoder 9059 } 9060 *v = sv 9061 return nil 9062} 9063 9064func awsAwsquery_deserializeDocumentAddHeaderAction(v **types.AddHeaderAction, decoder smithyxml.NodeDecoder) error { 9065 if v == nil { 9066 return fmt.Errorf("unexpected nil of type %T", v) 9067 } 9068 var sv *types.AddHeaderAction 9069 if *v == nil { 9070 sv = &types.AddHeaderAction{} 9071 } else { 9072 sv = *v 9073 } 9074 9075 for { 9076 t, done, err := decoder.Token() 9077 if err != nil { 9078 return err 9079 } 9080 if done { 9081 break 9082 } 9083 originalDecoder := decoder 9084 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9085 switch { 9086 case strings.EqualFold("HeaderName", t.Name.Local): 9087 val, err := decoder.Value() 9088 if err != nil { 9089 return err 9090 } 9091 if val == nil { 9092 break 9093 } 9094 { 9095 xtv := string(val) 9096 sv.HeaderName = ptr.String(xtv) 9097 } 9098 9099 case strings.EqualFold("HeaderValue", t.Name.Local): 9100 val, err := decoder.Value() 9101 if err != nil { 9102 return err 9103 } 9104 if val == nil { 9105 break 9106 } 9107 { 9108 xtv := string(val) 9109 sv.HeaderValue = ptr.String(xtv) 9110 } 9111 9112 default: 9113 // Do nothing and ignore the unexpected tag element 9114 err = decoder.Decoder.Skip() 9115 if err != nil { 9116 return err 9117 } 9118 9119 } 9120 decoder = originalDecoder 9121 } 9122 *v = sv 9123 return nil 9124} 9125 9126func awsAwsquery_deserializeDocumentAddressList(v *[]string, decoder smithyxml.NodeDecoder) error { 9127 if v == nil { 9128 return fmt.Errorf("unexpected nil of type %T", v) 9129 } 9130 var sv []string 9131 if *v == nil { 9132 sv = make([]string, 0) 9133 } else { 9134 sv = *v 9135 } 9136 9137 originalDecoder := decoder 9138 for { 9139 t, done, err := decoder.Token() 9140 if err != nil { 9141 return err 9142 } 9143 if done { 9144 break 9145 } 9146 memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9147 decoder = memberDecoder 9148 switch { 9149 case strings.EqualFold("member", t.Name.Local): 9150 var col string 9151 val, err := decoder.Value() 9152 if err != nil { 9153 return err 9154 } 9155 if val == nil { 9156 break 9157 } 9158 { 9159 xtv := string(val) 9160 col = xtv 9161 } 9162 sv = append(sv, col) 9163 9164 default: 9165 err = decoder.Decoder.Skip() 9166 if err != nil { 9167 return err 9168 } 9169 9170 } 9171 decoder = originalDecoder 9172 } 9173 *v = sv 9174 return nil 9175} 9176 9177func awsAwsquery_deserializeDocumentAddressListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { 9178 var sv []string 9179 if *v == nil { 9180 sv = make([]string, 0) 9181 } else { 9182 sv = *v 9183 } 9184 9185 switch { 9186 default: 9187 var mv string 9188 t := decoder.StartEl 9189 _ = t 9190 val, err := decoder.Value() 9191 if err != nil { 9192 return err 9193 } 9194 if val == nil { 9195 break 9196 } 9197 { 9198 xtv := string(val) 9199 mv = xtv 9200 } 9201 sv = append(sv, mv) 9202 } 9203 *v = sv 9204 return nil 9205} 9206func awsAwsquery_deserializeDocumentAlreadyExistsException(v **types.AlreadyExistsException, decoder smithyxml.NodeDecoder) error { 9207 if v == nil { 9208 return fmt.Errorf("unexpected nil of type %T", v) 9209 } 9210 var sv *types.AlreadyExistsException 9211 if *v == nil { 9212 sv = &types.AlreadyExistsException{} 9213 } else { 9214 sv = *v 9215 } 9216 9217 for { 9218 t, done, err := decoder.Token() 9219 if err != nil { 9220 return err 9221 } 9222 if done { 9223 break 9224 } 9225 originalDecoder := decoder 9226 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9227 switch { 9228 case strings.EqualFold("message", t.Name.Local): 9229 val, err := decoder.Value() 9230 if err != nil { 9231 return err 9232 } 9233 if val == nil { 9234 break 9235 } 9236 { 9237 xtv := string(val) 9238 sv.Message = ptr.String(xtv) 9239 } 9240 9241 case strings.EqualFold("Name", t.Name.Local): 9242 val, err := decoder.Value() 9243 if err != nil { 9244 return err 9245 } 9246 if val == nil { 9247 break 9248 } 9249 { 9250 xtv := string(val) 9251 sv.Name = ptr.String(xtv) 9252 } 9253 9254 default: 9255 // Do nothing and ignore the unexpected tag element 9256 err = decoder.Decoder.Skip() 9257 if err != nil { 9258 return err 9259 } 9260 9261 } 9262 decoder = originalDecoder 9263 } 9264 *v = sv 9265 return nil 9266} 9267 9268func awsAwsquery_deserializeDocumentBounceAction(v **types.BounceAction, decoder smithyxml.NodeDecoder) error { 9269 if v == nil { 9270 return fmt.Errorf("unexpected nil of type %T", v) 9271 } 9272 var sv *types.BounceAction 9273 if *v == nil { 9274 sv = &types.BounceAction{} 9275 } else { 9276 sv = *v 9277 } 9278 9279 for { 9280 t, done, err := decoder.Token() 9281 if err != nil { 9282 return err 9283 } 9284 if done { 9285 break 9286 } 9287 originalDecoder := decoder 9288 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9289 switch { 9290 case strings.EqualFold("Message", t.Name.Local): 9291 val, err := decoder.Value() 9292 if err != nil { 9293 return err 9294 } 9295 if val == nil { 9296 break 9297 } 9298 { 9299 xtv := string(val) 9300 sv.Message = ptr.String(xtv) 9301 } 9302 9303 case strings.EqualFold("Sender", t.Name.Local): 9304 val, err := decoder.Value() 9305 if err != nil { 9306 return err 9307 } 9308 if val == nil { 9309 break 9310 } 9311 { 9312 xtv := string(val) 9313 sv.Sender = ptr.String(xtv) 9314 } 9315 9316 case strings.EqualFold("SmtpReplyCode", t.Name.Local): 9317 val, err := decoder.Value() 9318 if err != nil { 9319 return err 9320 } 9321 if val == nil { 9322 break 9323 } 9324 { 9325 xtv := string(val) 9326 sv.SmtpReplyCode = ptr.String(xtv) 9327 } 9328 9329 case strings.EqualFold("StatusCode", t.Name.Local): 9330 val, err := decoder.Value() 9331 if err != nil { 9332 return err 9333 } 9334 if val == nil { 9335 break 9336 } 9337 { 9338 xtv := string(val) 9339 sv.StatusCode = ptr.String(xtv) 9340 } 9341 9342 case strings.EqualFold("TopicArn", t.Name.Local): 9343 val, err := decoder.Value() 9344 if err != nil { 9345 return err 9346 } 9347 if val == nil { 9348 break 9349 } 9350 { 9351 xtv := string(val) 9352 sv.TopicArn = ptr.String(xtv) 9353 } 9354 9355 default: 9356 // Do nothing and ignore the unexpected tag element 9357 err = decoder.Decoder.Skip() 9358 if err != nil { 9359 return err 9360 } 9361 9362 } 9363 decoder = originalDecoder 9364 } 9365 *v = sv 9366 return nil 9367} 9368 9369func awsAwsquery_deserializeDocumentBulkEmailDestinationStatus(v **types.BulkEmailDestinationStatus, decoder smithyxml.NodeDecoder) error { 9370 if v == nil { 9371 return fmt.Errorf("unexpected nil of type %T", v) 9372 } 9373 var sv *types.BulkEmailDestinationStatus 9374 if *v == nil { 9375 sv = &types.BulkEmailDestinationStatus{} 9376 } else { 9377 sv = *v 9378 } 9379 9380 for { 9381 t, done, err := decoder.Token() 9382 if err != nil { 9383 return err 9384 } 9385 if done { 9386 break 9387 } 9388 originalDecoder := decoder 9389 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9390 switch { 9391 case strings.EqualFold("Error", t.Name.Local): 9392 val, err := decoder.Value() 9393 if err != nil { 9394 return err 9395 } 9396 if val == nil { 9397 break 9398 } 9399 { 9400 xtv := string(val) 9401 sv.Error = ptr.String(xtv) 9402 } 9403 9404 case strings.EqualFold("MessageId", t.Name.Local): 9405 val, err := decoder.Value() 9406 if err != nil { 9407 return err 9408 } 9409 if val == nil { 9410 break 9411 } 9412 { 9413 xtv := string(val) 9414 sv.MessageId = ptr.String(xtv) 9415 } 9416 9417 case strings.EqualFold("Status", t.Name.Local): 9418 val, err := decoder.Value() 9419 if err != nil { 9420 return err 9421 } 9422 if val == nil { 9423 break 9424 } 9425 { 9426 xtv := string(val) 9427 sv.Status = types.BulkEmailStatus(xtv) 9428 } 9429 9430 default: 9431 // Do nothing and ignore the unexpected tag element 9432 err = decoder.Decoder.Skip() 9433 if err != nil { 9434 return err 9435 } 9436 9437 } 9438 decoder = originalDecoder 9439 } 9440 *v = sv 9441 return nil 9442} 9443 9444func awsAwsquery_deserializeDocumentBulkEmailDestinationStatusList(v *[]types.BulkEmailDestinationStatus, decoder smithyxml.NodeDecoder) error { 9445 if v == nil { 9446 return fmt.Errorf("unexpected nil of type %T", v) 9447 } 9448 var sv []types.BulkEmailDestinationStatus 9449 if *v == nil { 9450 sv = make([]types.BulkEmailDestinationStatus, 0) 9451 } else { 9452 sv = *v 9453 } 9454 9455 originalDecoder := decoder 9456 for { 9457 t, done, err := decoder.Token() 9458 if err != nil { 9459 return err 9460 } 9461 if done { 9462 break 9463 } 9464 switch { 9465 case strings.EqualFold("member", t.Name.Local): 9466 var col types.BulkEmailDestinationStatus 9467 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9468 destAddr := &col 9469 if err := awsAwsquery_deserializeDocumentBulkEmailDestinationStatus(&destAddr, nodeDecoder); err != nil { 9470 return err 9471 } 9472 col = *destAddr 9473 sv = append(sv, col) 9474 9475 default: 9476 err = decoder.Decoder.Skip() 9477 if err != nil { 9478 return err 9479 } 9480 9481 } 9482 decoder = originalDecoder 9483 } 9484 *v = sv 9485 return nil 9486} 9487 9488func awsAwsquery_deserializeDocumentBulkEmailDestinationStatusListUnwrapped(v *[]types.BulkEmailDestinationStatus, decoder smithyxml.NodeDecoder) error { 9489 var sv []types.BulkEmailDestinationStatus 9490 if *v == nil { 9491 sv = make([]types.BulkEmailDestinationStatus, 0) 9492 } else { 9493 sv = *v 9494 } 9495 9496 switch { 9497 default: 9498 var mv types.BulkEmailDestinationStatus 9499 t := decoder.StartEl 9500 _ = t 9501 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9502 destAddr := &mv 9503 if err := awsAwsquery_deserializeDocumentBulkEmailDestinationStatus(&destAddr, nodeDecoder); err != nil { 9504 return err 9505 } 9506 mv = *destAddr 9507 sv = append(sv, mv) 9508 } 9509 *v = sv 9510 return nil 9511} 9512func awsAwsquery_deserializeDocumentCannotDeleteException(v **types.CannotDeleteException, decoder smithyxml.NodeDecoder) error { 9513 if v == nil { 9514 return fmt.Errorf("unexpected nil of type %T", v) 9515 } 9516 var sv *types.CannotDeleteException 9517 if *v == nil { 9518 sv = &types.CannotDeleteException{} 9519 } else { 9520 sv = *v 9521 } 9522 9523 for { 9524 t, done, err := decoder.Token() 9525 if err != nil { 9526 return err 9527 } 9528 if done { 9529 break 9530 } 9531 originalDecoder := decoder 9532 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9533 switch { 9534 case strings.EqualFold("message", t.Name.Local): 9535 val, err := decoder.Value() 9536 if err != nil { 9537 return err 9538 } 9539 if val == nil { 9540 break 9541 } 9542 { 9543 xtv := string(val) 9544 sv.Message = ptr.String(xtv) 9545 } 9546 9547 case strings.EqualFold("Name", t.Name.Local): 9548 val, err := decoder.Value() 9549 if err != nil { 9550 return err 9551 } 9552 if val == nil { 9553 break 9554 } 9555 { 9556 xtv := string(val) 9557 sv.Name = ptr.String(xtv) 9558 } 9559 9560 default: 9561 // Do nothing and ignore the unexpected tag element 9562 err = decoder.Decoder.Skip() 9563 if err != nil { 9564 return err 9565 } 9566 9567 } 9568 decoder = originalDecoder 9569 } 9570 *v = sv 9571 return nil 9572} 9573 9574func awsAwsquery_deserializeDocumentCloudWatchDestination(v **types.CloudWatchDestination, decoder smithyxml.NodeDecoder) error { 9575 if v == nil { 9576 return fmt.Errorf("unexpected nil of type %T", v) 9577 } 9578 var sv *types.CloudWatchDestination 9579 if *v == nil { 9580 sv = &types.CloudWatchDestination{} 9581 } else { 9582 sv = *v 9583 } 9584 9585 for { 9586 t, done, err := decoder.Token() 9587 if err != nil { 9588 return err 9589 } 9590 if done { 9591 break 9592 } 9593 originalDecoder := decoder 9594 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9595 switch { 9596 case strings.EqualFold("DimensionConfigurations", t.Name.Local): 9597 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9598 if err := awsAwsquery_deserializeDocumentCloudWatchDimensionConfigurations(&sv.DimensionConfigurations, nodeDecoder); err != nil { 9599 return err 9600 } 9601 9602 default: 9603 // Do nothing and ignore the unexpected tag element 9604 err = decoder.Decoder.Skip() 9605 if err != nil { 9606 return err 9607 } 9608 9609 } 9610 decoder = originalDecoder 9611 } 9612 *v = sv 9613 return nil 9614} 9615 9616func awsAwsquery_deserializeDocumentCloudWatchDimensionConfiguration(v **types.CloudWatchDimensionConfiguration, decoder smithyxml.NodeDecoder) error { 9617 if v == nil { 9618 return fmt.Errorf("unexpected nil of type %T", v) 9619 } 9620 var sv *types.CloudWatchDimensionConfiguration 9621 if *v == nil { 9622 sv = &types.CloudWatchDimensionConfiguration{} 9623 } else { 9624 sv = *v 9625 } 9626 9627 for { 9628 t, done, err := decoder.Token() 9629 if err != nil { 9630 return err 9631 } 9632 if done { 9633 break 9634 } 9635 originalDecoder := decoder 9636 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9637 switch { 9638 case strings.EqualFold("DefaultDimensionValue", t.Name.Local): 9639 val, err := decoder.Value() 9640 if err != nil { 9641 return err 9642 } 9643 if val == nil { 9644 break 9645 } 9646 { 9647 xtv := string(val) 9648 sv.DefaultDimensionValue = ptr.String(xtv) 9649 } 9650 9651 case strings.EqualFold("DimensionName", t.Name.Local): 9652 val, err := decoder.Value() 9653 if err != nil { 9654 return err 9655 } 9656 if val == nil { 9657 break 9658 } 9659 { 9660 xtv := string(val) 9661 sv.DimensionName = ptr.String(xtv) 9662 } 9663 9664 case strings.EqualFold("DimensionValueSource", t.Name.Local): 9665 val, err := decoder.Value() 9666 if err != nil { 9667 return err 9668 } 9669 if val == nil { 9670 break 9671 } 9672 { 9673 xtv := string(val) 9674 sv.DimensionValueSource = types.DimensionValueSource(xtv) 9675 } 9676 9677 default: 9678 // Do nothing and ignore the unexpected tag element 9679 err = decoder.Decoder.Skip() 9680 if err != nil { 9681 return err 9682 } 9683 9684 } 9685 decoder = originalDecoder 9686 } 9687 *v = sv 9688 return nil 9689} 9690 9691func awsAwsquery_deserializeDocumentCloudWatchDimensionConfigurations(v *[]types.CloudWatchDimensionConfiguration, decoder smithyxml.NodeDecoder) error { 9692 if v == nil { 9693 return fmt.Errorf("unexpected nil of type %T", v) 9694 } 9695 var sv []types.CloudWatchDimensionConfiguration 9696 if *v == nil { 9697 sv = make([]types.CloudWatchDimensionConfiguration, 0) 9698 } else { 9699 sv = *v 9700 } 9701 9702 originalDecoder := decoder 9703 for { 9704 t, done, err := decoder.Token() 9705 if err != nil { 9706 return err 9707 } 9708 if done { 9709 break 9710 } 9711 switch { 9712 case strings.EqualFold("member", t.Name.Local): 9713 var col types.CloudWatchDimensionConfiguration 9714 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9715 destAddr := &col 9716 if err := awsAwsquery_deserializeDocumentCloudWatchDimensionConfiguration(&destAddr, nodeDecoder); err != nil { 9717 return err 9718 } 9719 col = *destAddr 9720 sv = append(sv, col) 9721 9722 default: 9723 err = decoder.Decoder.Skip() 9724 if err != nil { 9725 return err 9726 } 9727 9728 } 9729 decoder = originalDecoder 9730 } 9731 *v = sv 9732 return nil 9733} 9734 9735func awsAwsquery_deserializeDocumentCloudWatchDimensionConfigurationsUnwrapped(v *[]types.CloudWatchDimensionConfiguration, decoder smithyxml.NodeDecoder) error { 9736 var sv []types.CloudWatchDimensionConfiguration 9737 if *v == nil { 9738 sv = make([]types.CloudWatchDimensionConfiguration, 0) 9739 } else { 9740 sv = *v 9741 } 9742 9743 switch { 9744 default: 9745 var mv types.CloudWatchDimensionConfiguration 9746 t := decoder.StartEl 9747 _ = t 9748 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9749 destAddr := &mv 9750 if err := awsAwsquery_deserializeDocumentCloudWatchDimensionConfiguration(&destAddr, nodeDecoder); err != nil { 9751 return err 9752 } 9753 mv = *destAddr 9754 sv = append(sv, mv) 9755 } 9756 *v = sv 9757 return nil 9758} 9759func awsAwsquery_deserializeDocumentConfigurationSet(v **types.ConfigurationSet, decoder smithyxml.NodeDecoder) error { 9760 if v == nil { 9761 return fmt.Errorf("unexpected nil of type %T", v) 9762 } 9763 var sv *types.ConfigurationSet 9764 if *v == nil { 9765 sv = &types.ConfigurationSet{} 9766 } else { 9767 sv = *v 9768 } 9769 9770 for { 9771 t, done, err := decoder.Token() 9772 if err != nil { 9773 return err 9774 } 9775 if done { 9776 break 9777 } 9778 originalDecoder := decoder 9779 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9780 switch { 9781 case strings.EqualFold("Name", t.Name.Local): 9782 val, err := decoder.Value() 9783 if err != nil { 9784 return err 9785 } 9786 if val == nil { 9787 break 9788 } 9789 { 9790 xtv := string(val) 9791 sv.Name = ptr.String(xtv) 9792 } 9793 9794 default: 9795 // Do nothing and ignore the unexpected tag element 9796 err = decoder.Decoder.Skip() 9797 if err != nil { 9798 return err 9799 } 9800 9801 } 9802 decoder = originalDecoder 9803 } 9804 *v = sv 9805 return nil 9806} 9807 9808func awsAwsquery_deserializeDocumentConfigurationSetAlreadyExistsException(v **types.ConfigurationSetAlreadyExistsException, decoder smithyxml.NodeDecoder) error { 9809 if v == nil { 9810 return fmt.Errorf("unexpected nil of type %T", v) 9811 } 9812 var sv *types.ConfigurationSetAlreadyExistsException 9813 if *v == nil { 9814 sv = &types.ConfigurationSetAlreadyExistsException{} 9815 } else { 9816 sv = *v 9817 } 9818 9819 for { 9820 t, done, err := decoder.Token() 9821 if err != nil { 9822 return err 9823 } 9824 if done { 9825 break 9826 } 9827 originalDecoder := decoder 9828 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9829 switch { 9830 case strings.EqualFold("ConfigurationSetName", t.Name.Local): 9831 val, err := decoder.Value() 9832 if err != nil { 9833 return err 9834 } 9835 if val == nil { 9836 break 9837 } 9838 { 9839 xtv := string(val) 9840 sv.ConfigurationSetName = ptr.String(xtv) 9841 } 9842 9843 case strings.EqualFold("message", t.Name.Local): 9844 val, err := decoder.Value() 9845 if err != nil { 9846 return err 9847 } 9848 if val == nil { 9849 break 9850 } 9851 { 9852 xtv := string(val) 9853 sv.Message = ptr.String(xtv) 9854 } 9855 9856 default: 9857 // Do nothing and ignore the unexpected tag element 9858 err = decoder.Decoder.Skip() 9859 if err != nil { 9860 return err 9861 } 9862 9863 } 9864 decoder = originalDecoder 9865 } 9866 *v = sv 9867 return nil 9868} 9869 9870func awsAwsquery_deserializeDocumentConfigurationSetDoesNotExistException(v **types.ConfigurationSetDoesNotExistException, decoder smithyxml.NodeDecoder) error { 9871 if v == nil { 9872 return fmt.Errorf("unexpected nil of type %T", v) 9873 } 9874 var sv *types.ConfigurationSetDoesNotExistException 9875 if *v == nil { 9876 sv = &types.ConfigurationSetDoesNotExistException{} 9877 } else { 9878 sv = *v 9879 } 9880 9881 for { 9882 t, done, err := decoder.Token() 9883 if err != nil { 9884 return err 9885 } 9886 if done { 9887 break 9888 } 9889 originalDecoder := decoder 9890 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9891 switch { 9892 case strings.EqualFold("ConfigurationSetName", t.Name.Local): 9893 val, err := decoder.Value() 9894 if err != nil { 9895 return err 9896 } 9897 if val == nil { 9898 break 9899 } 9900 { 9901 xtv := string(val) 9902 sv.ConfigurationSetName = ptr.String(xtv) 9903 } 9904 9905 case strings.EqualFold("message", t.Name.Local): 9906 val, err := decoder.Value() 9907 if err != nil { 9908 return err 9909 } 9910 if val == nil { 9911 break 9912 } 9913 { 9914 xtv := string(val) 9915 sv.Message = ptr.String(xtv) 9916 } 9917 9918 default: 9919 // Do nothing and ignore the unexpected tag element 9920 err = decoder.Decoder.Skip() 9921 if err != nil { 9922 return err 9923 } 9924 9925 } 9926 decoder = originalDecoder 9927 } 9928 *v = sv 9929 return nil 9930} 9931 9932func awsAwsquery_deserializeDocumentConfigurationSets(v *[]types.ConfigurationSet, decoder smithyxml.NodeDecoder) error { 9933 if v == nil { 9934 return fmt.Errorf("unexpected nil of type %T", v) 9935 } 9936 var sv []types.ConfigurationSet 9937 if *v == nil { 9938 sv = make([]types.ConfigurationSet, 0) 9939 } else { 9940 sv = *v 9941 } 9942 9943 originalDecoder := decoder 9944 for { 9945 t, done, err := decoder.Token() 9946 if err != nil { 9947 return err 9948 } 9949 if done { 9950 break 9951 } 9952 switch { 9953 case strings.EqualFold("member", t.Name.Local): 9954 var col types.ConfigurationSet 9955 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9956 destAddr := &col 9957 if err := awsAwsquery_deserializeDocumentConfigurationSet(&destAddr, nodeDecoder); err != nil { 9958 return err 9959 } 9960 col = *destAddr 9961 sv = append(sv, col) 9962 9963 default: 9964 err = decoder.Decoder.Skip() 9965 if err != nil { 9966 return err 9967 } 9968 9969 } 9970 decoder = originalDecoder 9971 } 9972 *v = sv 9973 return nil 9974} 9975 9976func awsAwsquery_deserializeDocumentConfigurationSetsUnwrapped(v *[]types.ConfigurationSet, decoder smithyxml.NodeDecoder) error { 9977 var sv []types.ConfigurationSet 9978 if *v == nil { 9979 sv = make([]types.ConfigurationSet, 0) 9980 } else { 9981 sv = *v 9982 } 9983 9984 switch { 9985 default: 9986 var mv types.ConfigurationSet 9987 t := decoder.StartEl 9988 _ = t 9989 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9990 destAddr := &mv 9991 if err := awsAwsquery_deserializeDocumentConfigurationSet(&destAddr, nodeDecoder); err != nil { 9992 return err 9993 } 9994 mv = *destAddr 9995 sv = append(sv, mv) 9996 } 9997 *v = sv 9998 return nil 9999} 10000func awsAwsquery_deserializeDocumentConfigurationSetSendingPausedException(v **types.ConfigurationSetSendingPausedException, decoder smithyxml.NodeDecoder) error { 10001 if v == nil { 10002 return fmt.Errorf("unexpected nil of type %T", v) 10003 } 10004 var sv *types.ConfigurationSetSendingPausedException 10005 if *v == nil { 10006 sv = &types.ConfigurationSetSendingPausedException{} 10007 } else { 10008 sv = *v 10009 } 10010 10011 for { 10012 t, done, err := decoder.Token() 10013 if err != nil { 10014 return err 10015 } 10016 if done { 10017 break 10018 } 10019 originalDecoder := decoder 10020 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10021 switch { 10022 case strings.EqualFold("ConfigurationSetName", t.Name.Local): 10023 val, err := decoder.Value() 10024 if err != nil { 10025 return err 10026 } 10027 if val == nil { 10028 break 10029 } 10030 { 10031 xtv := string(val) 10032 sv.ConfigurationSetName = ptr.String(xtv) 10033 } 10034 10035 case strings.EqualFold("message", t.Name.Local): 10036 val, err := decoder.Value() 10037 if err != nil { 10038 return err 10039 } 10040 if val == nil { 10041 break 10042 } 10043 { 10044 xtv := string(val) 10045 sv.Message = ptr.String(xtv) 10046 } 10047 10048 default: 10049 // Do nothing and ignore the unexpected tag element 10050 err = decoder.Decoder.Skip() 10051 if err != nil { 10052 return err 10053 } 10054 10055 } 10056 decoder = originalDecoder 10057 } 10058 *v = sv 10059 return nil 10060} 10061 10062func awsAwsquery_deserializeDocumentCustomVerificationEmailInvalidContentException(v **types.CustomVerificationEmailInvalidContentException, decoder smithyxml.NodeDecoder) error { 10063 if v == nil { 10064 return fmt.Errorf("unexpected nil of type %T", v) 10065 } 10066 var sv *types.CustomVerificationEmailInvalidContentException 10067 if *v == nil { 10068 sv = &types.CustomVerificationEmailInvalidContentException{} 10069 } else { 10070 sv = *v 10071 } 10072 10073 for { 10074 t, done, err := decoder.Token() 10075 if err != nil { 10076 return err 10077 } 10078 if done { 10079 break 10080 } 10081 originalDecoder := decoder 10082 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10083 switch { 10084 case strings.EqualFold("message", t.Name.Local): 10085 val, err := decoder.Value() 10086 if err != nil { 10087 return err 10088 } 10089 if val == nil { 10090 break 10091 } 10092 { 10093 xtv := string(val) 10094 sv.Message = ptr.String(xtv) 10095 } 10096 10097 default: 10098 // Do nothing and ignore the unexpected tag element 10099 err = decoder.Decoder.Skip() 10100 if err != nil { 10101 return err 10102 } 10103 10104 } 10105 decoder = originalDecoder 10106 } 10107 *v = sv 10108 return nil 10109} 10110 10111func awsAwsquery_deserializeDocumentCustomVerificationEmailTemplate(v **types.CustomVerificationEmailTemplate, decoder smithyxml.NodeDecoder) error { 10112 if v == nil { 10113 return fmt.Errorf("unexpected nil of type %T", v) 10114 } 10115 var sv *types.CustomVerificationEmailTemplate 10116 if *v == nil { 10117 sv = &types.CustomVerificationEmailTemplate{} 10118 } else { 10119 sv = *v 10120 } 10121 10122 for { 10123 t, done, err := decoder.Token() 10124 if err != nil { 10125 return err 10126 } 10127 if done { 10128 break 10129 } 10130 originalDecoder := decoder 10131 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10132 switch { 10133 case strings.EqualFold("FailureRedirectionURL", t.Name.Local): 10134 val, err := decoder.Value() 10135 if err != nil { 10136 return err 10137 } 10138 if val == nil { 10139 break 10140 } 10141 { 10142 xtv := string(val) 10143 sv.FailureRedirectionURL = ptr.String(xtv) 10144 } 10145 10146 case strings.EqualFold("FromEmailAddress", t.Name.Local): 10147 val, err := decoder.Value() 10148 if err != nil { 10149 return err 10150 } 10151 if val == nil { 10152 break 10153 } 10154 { 10155 xtv := string(val) 10156 sv.FromEmailAddress = ptr.String(xtv) 10157 } 10158 10159 case strings.EqualFold("SuccessRedirectionURL", t.Name.Local): 10160 val, err := decoder.Value() 10161 if err != nil { 10162 return err 10163 } 10164 if val == nil { 10165 break 10166 } 10167 { 10168 xtv := string(val) 10169 sv.SuccessRedirectionURL = ptr.String(xtv) 10170 } 10171 10172 case strings.EqualFold("TemplateName", t.Name.Local): 10173 val, err := decoder.Value() 10174 if err != nil { 10175 return err 10176 } 10177 if val == nil { 10178 break 10179 } 10180 { 10181 xtv := string(val) 10182 sv.TemplateName = ptr.String(xtv) 10183 } 10184 10185 case strings.EqualFold("TemplateSubject", t.Name.Local): 10186 val, err := decoder.Value() 10187 if err != nil { 10188 return err 10189 } 10190 if val == nil { 10191 break 10192 } 10193 { 10194 xtv := string(val) 10195 sv.TemplateSubject = ptr.String(xtv) 10196 } 10197 10198 default: 10199 // Do nothing and ignore the unexpected tag element 10200 err = decoder.Decoder.Skip() 10201 if err != nil { 10202 return err 10203 } 10204 10205 } 10206 decoder = originalDecoder 10207 } 10208 *v = sv 10209 return nil 10210} 10211 10212func awsAwsquery_deserializeDocumentCustomVerificationEmailTemplateAlreadyExistsException(v **types.CustomVerificationEmailTemplateAlreadyExistsException, decoder smithyxml.NodeDecoder) error { 10213 if v == nil { 10214 return fmt.Errorf("unexpected nil of type %T", v) 10215 } 10216 var sv *types.CustomVerificationEmailTemplateAlreadyExistsException 10217 if *v == nil { 10218 sv = &types.CustomVerificationEmailTemplateAlreadyExistsException{} 10219 } else { 10220 sv = *v 10221 } 10222 10223 for { 10224 t, done, err := decoder.Token() 10225 if err != nil { 10226 return err 10227 } 10228 if done { 10229 break 10230 } 10231 originalDecoder := decoder 10232 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10233 switch { 10234 case strings.EqualFold("CustomVerificationEmailTemplateName", t.Name.Local): 10235 val, err := decoder.Value() 10236 if err != nil { 10237 return err 10238 } 10239 if val == nil { 10240 break 10241 } 10242 { 10243 xtv := string(val) 10244 sv.CustomVerificationEmailTemplateName = ptr.String(xtv) 10245 } 10246 10247 case strings.EqualFold("message", t.Name.Local): 10248 val, err := decoder.Value() 10249 if err != nil { 10250 return err 10251 } 10252 if val == nil { 10253 break 10254 } 10255 { 10256 xtv := string(val) 10257 sv.Message = ptr.String(xtv) 10258 } 10259 10260 default: 10261 // Do nothing and ignore the unexpected tag element 10262 err = decoder.Decoder.Skip() 10263 if err != nil { 10264 return err 10265 } 10266 10267 } 10268 decoder = originalDecoder 10269 } 10270 *v = sv 10271 return nil 10272} 10273 10274func awsAwsquery_deserializeDocumentCustomVerificationEmailTemplateDoesNotExistException(v **types.CustomVerificationEmailTemplateDoesNotExistException, decoder smithyxml.NodeDecoder) error { 10275 if v == nil { 10276 return fmt.Errorf("unexpected nil of type %T", v) 10277 } 10278 var sv *types.CustomVerificationEmailTemplateDoesNotExistException 10279 if *v == nil { 10280 sv = &types.CustomVerificationEmailTemplateDoesNotExistException{} 10281 } else { 10282 sv = *v 10283 } 10284 10285 for { 10286 t, done, err := decoder.Token() 10287 if err != nil { 10288 return err 10289 } 10290 if done { 10291 break 10292 } 10293 originalDecoder := decoder 10294 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10295 switch { 10296 case strings.EqualFold("CustomVerificationEmailTemplateName", t.Name.Local): 10297 val, err := decoder.Value() 10298 if err != nil { 10299 return err 10300 } 10301 if val == nil { 10302 break 10303 } 10304 { 10305 xtv := string(val) 10306 sv.CustomVerificationEmailTemplateName = ptr.String(xtv) 10307 } 10308 10309 case strings.EqualFold("message", t.Name.Local): 10310 val, err := decoder.Value() 10311 if err != nil { 10312 return err 10313 } 10314 if val == nil { 10315 break 10316 } 10317 { 10318 xtv := string(val) 10319 sv.Message = ptr.String(xtv) 10320 } 10321 10322 default: 10323 // Do nothing and ignore the unexpected tag element 10324 err = decoder.Decoder.Skip() 10325 if err != nil { 10326 return err 10327 } 10328 10329 } 10330 decoder = originalDecoder 10331 } 10332 *v = sv 10333 return nil 10334} 10335 10336func awsAwsquery_deserializeDocumentCustomVerificationEmailTemplates(v *[]types.CustomVerificationEmailTemplate, decoder smithyxml.NodeDecoder) error { 10337 if v == nil { 10338 return fmt.Errorf("unexpected nil of type %T", v) 10339 } 10340 var sv []types.CustomVerificationEmailTemplate 10341 if *v == nil { 10342 sv = make([]types.CustomVerificationEmailTemplate, 0) 10343 } else { 10344 sv = *v 10345 } 10346 10347 originalDecoder := decoder 10348 for { 10349 t, done, err := decoder.Token() 10350 if err != nil { 10351 return err 10352 } 10353 if done { 10354 break 10355 } 10356 switch { 10357 case strings.EqualFold("member", t.Name.Local): 10358 var col types.CustomVerificationEmailTemplate 10359 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10360 destAddr := &col 10361 if err := awsAwsquery_deserializeDocumentCustomVerificationEmailTemplate(&destAddr, nodeDecoder); err != nil { 10362 return err 10363 } 10364 col = *destAddr 10365 sv = append(sv, col) 10366 10367 default: 10368 err = decoder.Decoder.Skip() 10369 if err != nil { 10370 return err 10371 } 10372 10373 } 10374 decoder = originalDecoder 10375 } 10376 *v = sv 10377 return nil 10378} 10379 10380func awsAwsquery_deserializeDocumentCustomVerificationEmailTemplatesUnwrapped(v *[]types.CustomVerificationEmailTemplate, decoder smithyxml.NodeDecoder) error { 10381 var sv []types.CustomVerificationEmailTemplate 10382 if *v == nil { 10383 sv = make([]types.CustomVerificationEmailTemplate, 0) 10384 } else { 10385 sv = *v 10386 } 10387 10388 switch { 10389 default: 10390 var mv types.CustomVerificationEmailTemplate 10391 t := decoder.StartEl 10392 _ = t 10393 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10394 destAddr := &mv 10395 if err := awsAwsquery_deserializeDocumentCustomVerificationEmailTemplate(&destAddr, nodeDecoder); err != nil { 10396 return err 10397 } 10398 mv = *destAddr 10399 sv = append(sv, mv) 10400 } 10401 *v = sv 10402 return nil 10403} 10404func awsAwsquery_deserializeDocumentDeliveryOptions(v **types.DeliveryOptions, decoder smithyxml.NodeDecoder) error { 10405 if v == nil { 10406 return fmt.Errorf("unexpected nil of type %T", v) 10407 } 10408 var sv *types.DeliveryOptions 10409 if *v == nil { 10410 sv = &types.DeliveryOptions{} 10411 } else { 10412 sv = *v 10413 } 10414 10415 for { 10416 t, done, err := decoder.Token() 10417 if err != nil { 10418 return err 10419 } 10420 if done { 10421 break 10422 } 10423 originalDecoder := decoder 10424 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10425 switch { 10426 case strings.EqualFold("TlsPolicy", t.Name.Local): 10427 val, err := decoder.Value() 10428 if err != nil { 10429 return err 10430 } 10431 if val == nil { 10432 break 10433 } 10434 { 10435 xtv := string(val) 10436 sv.TlsPolicy = types.TlsPolicy(xtv) 10437 } 10438 10439 default: 10440 // Do nothing and ignore the unexpected tag element 10441 err = decoder.Decoder.Skip() 10442 if err != nil { 10443 return err 10444 } 10445 10446 } 10447 decoder = originalDecoder 10448 } 10449 *v = sv 10450 return nil 10451} 10452 10453func awsAwsquery_deserializeDocumentDkimAttributes(v *map[string]types.IdentityDkimAttributes, decoder smithyxml.NodeDecoder) error { 10454 if v == nil { 10455 return fmt.Errorf("unexpected nil of type %T", v) 10456 } 10457 var sv map[string]types.IdentityDkimAttributes 10458 if *v == nil { 10459 sv = make(map[string]types.IdentityDkimAttributes, 0) 10460 } else { 10461 sv = *v 10462 } 10463 10464 for { 10465 t, done, err := decoder.Token() 10466 if err != nil { 10467 return err 10468 } 10469 if done { 10470 break 10471 } 10472 switch { 10473 case strings.EqualFold("entry", t.Name.Local): 10474 entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10475 if err := awsAwsquery_deserializeDocumentDkimAttributesUnwrapped(&sv, entryDecoder); err != nil { 10476 return err 10477 } 10478 10479 default: 10480 err = decoder.Decoder.Skip() 10481 if err != nil { 10482 return err 10483 } 10484 10485 } 10486 } 10487 *v = sv 10488 return nil 10489} 10490 10491func awsAwsquery_deserializeDocumentDkimAttributesUnwrapped(v *map[string]types.IdentityDkimAttributes, decoder smithyxml.NodeDecoder) error { 10492 var sv map[string]types.IdentityDkimAttributes 10493 if *v == nil { 10494 sv = make(map[string]types.IdentityDkimAttributes, 0) 10495 } else { 10496 sv = *v 10497 } 10498 10499 var ek string 10500 var ev types.IdentityDkimAttributes 10501 for { 10502 t, done, err := decoder.Token() 10503 if err != nil { 10504 return err 10505 } 10506 if done { 10507 sv[ek] = ev 10508 break 10509 } 10510 originalDecoder := decoder 10511 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10512 switch { 10513 case strings.EqualFold("key", t.Name.Local): 10514 val, err := decoder.Value() 10515 if err != nil { 10516 return err 10517 } 10518 if val == nil { 10519 break 10520 } 10521 { 10522 xtv := string(val) 10523 ek = xtv 10524 } 10525 10526 case strings.EqualFold("value", t.Name.Local): 10527 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10528 mapVar := ev 10529 destAddr := &mapVar 10530 if err := awsAwsquery_deserializeDocumentIdentityDkimAttributes(&destAddr, nodeDecoder); err != nil { 10531 return err 10532 } 10533 ev = *destAddr 10534 10535 default: 10536 err = decoder.Decoder.Skip() 10537 if err != nil { 10538 return err 10539 } 10540 10541 } 10542 decoder = originalDecoder 10543 } 10544 *v = sv 10545 return nil 10546} 10547func awsAwsquery_deserializeDocumentEventDestination(v **types.EventDestination, decoder smithyxml.NodeDecoder) error { 10548 if v == nil { 10549 return fmt.Errorf("unexpected nil of type %T", v) 10550 } 10551 var sv *types.EventDestination 10552 if *v == nil { 10553 sv = &types.EventDestination{} 10554 } else { 10555 sv = *v 10556 } 10557 10558 for { 10559 t, done, err := decoder.Token() 10560 if err != nil { 10561 return err 10562 } 10563 if done { 10564 break 10565 } 10566 originalDecoder := decoder 10567 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10568 switch { 10569 case strings.EqualFold("CloudWatchDestination", t.Name.Local): 10570 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10571 if err := awsAwsquery_deserializeDocumentCloudWatchDestination(&sv.CloudWatchDestination, nodeDecoder); err != nil { 10572 return err 10573 } 10574 10575 case strings.EqualFold("Enabled", t.Name.Local): 10576 val, err := decoder.Value() 10577 if err != nil { 10578 return err 10579 } 10580 if val == nil { 10581 break 10582 } 10583 { 10584 xtv, err := strconv.ParseBool(string(val)) 10585 if err != nil { 10586 return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val) 10587 } 10588 sv.Enabled = xtv 10589 } 10590 10591 case strings.EqualFold("KinesisFirehoseDestination", t.Name.Local): 10592 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10593 if err := awsAwsquery_deserializeDocumentKinesisFirehoseDestination(&sv.KinesisFirehoseDestination, nodeDecoder); err != nil { 10594 return err 10595 } 10596 10597 case strings.EqualFold("MatchingEventTypes", t.Name.Local): 10598 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10599 if err := awsAwsquery_deserializeDocumentEventTypes(&sv.MatchingEventTypes, nodeDecoder); err != nil { 10600 return err 10601 } 10602 10603 case strings.EqualFold("Name", t.Name.Local): 10604 val, err := decoder.Value() 10605 if err != nil { 10606 return err 10607 } 10608 if val == nil { 10609 break 10610 } 10611 { 10612 xtv := string(val) 10613 sv.Name = ptr.String(xtv) 10614 } 10615 10616 case strings.EqualFold("SNSDestination", t.Name.Local): 10617 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10618 if err := awsAwsquery_deserializeDocumentSNSDestination(&sv.SNSDestination, nodeDecoder); err != nil { 10619 return err 10620 } 10621 10622 default: 10623 // Do nothing and ignore the unexpected tag element 10624 err = decoder.Decoder.Skip() 10625 if err != nil { 10626 return err 10627 } 10628 10629 } 10630 decoder = originalDecoder 10631 } 10632 *v = sv 10633 return nil 10634} 10635 10636func awsAwsquery_deserializeDocumentEventDestinationAlreadyExistsException(v **types.EventDestinationAlreadyExistsException, decoder smithyxml.NodeDecoder) error { 10637 if v == nil { 10638 return fmt.Errorf("unexpected nil of type %T", v) 10639 } 10640 var sv *types.EventDestinationAlreadyExistsException 10641 if *v == nil { 10642 sv = &types.EventDestinationAlreadyExistsException{} 10643 } else { 10644 sv = *v 10645 } 10646 10647 for { 10648 t, done, err := decoder.Token() 10649 if err != nil { 10650 return err 10651 } 10652 if done { 10653 break 10654 } 10655 originalDecoder := decoder 10656 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10657 switch { 10658 case strings.EqualFold("ConfigurationSetName", t.Name.Local): 10659 val, err := decoder.Value() 10660 if err != nil { 10661 return err 10662 } 10663 if val == nil { 10664 break 10665 } 10666 { 10667 xtv := string(val) 10668 sv.ConfigurationSetName = ptr.String(xtv) 10669 } 10670 10671 case strings.EqualFold("EventDestinationName", t.Name.Local): 10672 val, err := decoder.Value() 10673 if err != nil { 10674 return err 10675 } 10676 if val == nil { 10677 break 10678 } 10679 { 10680 xtv := string(val) 10681 sv.EventDestinationName = ptr.String(xtv) 10682 } 10683 10684 case strings.EqualFold("message", t.Name.Local): 10685 val, err := decoder.Value() 10686 if err != nil { 10687 return err 10688 } 10689 if val == nil { 10690 break 10691 } 10692 { 10693 xtv := string(val) 10694 sv.Message = ptr.String(xtv) 10695 } 10696 10697 default: 10698 // Do nothing and ignore the unexpected tag element 10699 err = decoder.Decoder.Skip() 10700 if err != nil { 10701 return err 10702 } 10703 10704 } 10705 decoder = originalDecoder 10706 } 10707 *v = sv 10708 return nil 10709} 10710 10711func awsAwsquery_deserializeDocumentEventDestinationDoesNotExistException(v **types.EventDestinationDoesNotExistException, decoder smithyxml.NodeDecoder) error { 10712 if v == nil { 10713 return fmt.Errorf("unexpected nil of type %T", v) 10714 } 10715 var sv *types.EventDestinationDoesNotExistException 10716 if *v == nil { 10717 sv = &types.EventDestinationDoesNotExistException{} 10718 } else { 10719 sv = *v 10720 } 10721 10722 for { 10723 t, done, err := decoder.Token() 10724 if err != nil { 10725 return err 10726 } 10727 if done { 10728 break 10729 } 10730 originalDecoder := decoder 10731 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10732 switch { 10733 case strings.EqualFold("ConfigurationSetName", t.Name.Local): 10734 val, err := decoder.Value() 10735 if err != nil { 10736 return err 10737 } 10738 if val == nil { 10739 break 10740 } 10741 { 10742 xtv := string(val) 10743 sv.ConfigurationSetName = ptr.String(xtv) 10744 } 10745 10746 case strings.EqualFold("EventDestinationName", t.Name.Local): 10747 val, err := decoder.Value() 10748 if err != nil { 10749 return err 10750 } 10751 if val == nil { 10752 break 10753 } 10754 { 10755 xtv := string(val) 10756 sv.EventDestinationName = ptr.String(xtv) 10757 } 10758 10759 case strings.EqualFold("message", t.Name.Local): 10760 val, err := decoder.Value() 10761 if err != nil { 10762 return err 10763 } 10764 if val == nil { 10765 break 10766 } 10767 { 10768 xtv := string(val) 10769 sv.Message = ptr.String(xtv) 10770 } 10771 10772 default: 10773 // Do nothing and ignore the unexpected tag element 10774 err = decoder.Decoder.Skip() 10775 if err != nil { 10776 return err 10777 } 10778 10779 } 10780 decoder = originalDecoder 10781 } 10782 *v = sv 10783 return nil 10784} 10785 10786func awsAwsquery_deserializeDocumentEventDestinations(v *[]types.EventDestination, decoder smithyxml.NodeDecoder) error { 10787 if v == nil { 10788 return fmt.Errorf("unexpected nil of type %T", v) 10789 } 10790 var sv []types.EventDestination 10791 if *v == nil { 10792 sv = make([]types.EventDestination, 0) 10793 } else { 10794 sv = *v 10795 } 10796 10797 originalDecoder := decoder 10798 for { 10799 t, done, err := decoder.Token() 10800 if err != nil { 10801 return err 10802 } 10803 if done { 10804 break 10805 } 10806 switch { 10807 case strings.EqualFold("member", t.Name.Local): 10808 var col types.EventDestination 10809 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10810 destAddr := &col 10811 if err := awsAwsquery_deserializeDocumentEventDestination(&destAddr, nodeDecoder); err != nil { 10812 return err 10813 } 10814 col = *destAddr 10815 sv = append(sv, col) 10816 10817 default: 10818 err = decoder.Decoder.Skip() 10819 if err != nil { 10820 return err 10821 } 10822 10823 } 10824 decoder = originalDecoder 10825 } 10826 *v = sv 10827 return nil 10828} 10829 10830func awsAwsquery_deserializeDocumentEventDestinationsUnwrapped(v *[]types.EventDestination, decoder smithyxml.NodeDecoder) error { 10831 var sv []types.EventDestination 10832 if *v == nil { 10833 sv = make([]types.EventDestination, 0) 10834 } else { 10835 sv = *v 10836 } 10837 10838 switch { 10839 default: 10840 var mv types.EventDestination 10841 t := decoder.StartEl 10842 _ = t 10843 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10844 destAddr := &mv 10845 if err := awsAwsquery_deserializeDocumentEventDestination(&destAddr, nodeDecoder); err != nil { 10846 return err 10847 } 10848 mv = *destAddr 10849 sv = append(sv, mv) 10850 } 10851 *v = sv 10852 return nil 10853} 10854func awsAwsquery_deserializeDocumentEventTypes(v *[]types.EventType, decoder smithyxml.NodeDecoder) error { 10855 if v == nil { 10856 return fmt.Errorf("unexpected nil of type %T", v) 10857 } 10858 var sv []types.EventType 10859 if *v == nil { 10860 sv = make([]types.EventType, 0) 10861 } else { 10862 sv = *v 10863 } 10864 10865 originalDecoder := decoder 10866 for { 10867 t, done, err := decoder.Token() 10868 if err != nil { 10869 return err 10870 } 10871 if done { 10872 break 10873 } 10874 memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10875 decoder = memberDecoder 10876 switch { 10877 case strings.EqualFold("member", t.Name.Local): 10878 var col types.EventType 10879 val, err := decoder.Value() 10880 if err != nil { 10881 return err 10882 } 10883 if val == nil { 10884 break 10885 } 10886 { 10887 xtv := string(val) 10888 col = types.EventType(xtv) 10889 } 10890 sv = append(sv, col) 10891 10892 default: 10893 err = decoder.Decoder.Skip() 10894 if err != nil { 10895 return err 10896 } 10897 10898 } 10899 decoder = originalDecoder 10900 } 10901 *v = sv 10902 return nil 10903} 10904 10905func awsAwsquery_deserializeDocumentEventTypesUnwrapped(v *[]types.EventType, decoder smithyxml.NodeDecoder) error { 10906 var sv []types.EventType 10907 if *v == nil { 10908 sv = make([]types.EventType, 0) 10909 } else { 10910 sv = *v 10911 } 10912 10913 switch { 10914 default: 10915 var mv types.EventType 10916 t := decoder.StartEl 10917 _ = t 10918 val, err := decoder.Value() 10919 if err != nil { 10920 return err 10921 } 10922 if val == nil { 10923 break 10924 } 10925 { 10926 xtv := string(val) 10927 mv = types.EventType(xtv) 10928 } 10929 sv = append(sv, mv) 10930 } 10931 *v = sv 10932 return nil 10933} 10934func awsAwsquery_deserializeDocumentFromEmailAddressNotVerifiedException(v **types.FromEmailAddressNotVerifiedException, decoder smithyxml.NodeDecoder) error { 10935 if v == nil { 10936 return fmt.Errorf("unexpected nil of type %T", v) 10937 } 10938 var sv *types.FromEmailAddressNotVerifiedException 10939 if *v == nil { 10940 sv = &types.FromEmailAddressNotVerifiedException{} 10941 } else { 10942 sv = *v 10943 } 10944 10945 for { 10946 t, done, err := decoder.Token() 10947 if err != nil { 10948 return err 10949 } 10950 if done { 10951 break 10952 } 10953 originalDecoder := decoder 10954 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10955 switch { 10956 case strings.EqualFold("FromEmailAddress", t.Name.Local): 10957 val, err := decoder.Value() 10958 if err != nil { 10959 return err 10960 } 10961 if val == nil { 10962 break 10963 } 10964 { 10965 xtv := string(val) 10966 sv.FromEmailAddress = ptr.String(xtv) 10967 } 10968 10969 case strings.EqualFold("message", t.Name.Local): 10970 val, err := decoder.Value() 10971 if err != nil { 10972 return err 10973 } 10974 if val == nil { 10975 break 10976 } 10977 { 10978 xtv := string(val) 10979 sv.Message = ptr.String(xtv) 10980 } 10981 10982 default: 10983 // Do nothing and ignore the unexpected tag element 10984 err = decoder.Decoder.Skip() 10985 if err != nil { 10986 return err 10987 } 10988 10989 } 10990 decoder = originalDecoder 10991 } 10992 *v = sv 10993 return nil 10994} 10995 10996func awsAwsquery_deserializeDocumentIdentityDkimAttributes(v **types.IdentityDkimAttributes, decoder smithyxml.NodeDecoder) error { 10997 if v == nil { 10998 return fmt.Errorf("unexpected nil of type %T", v) 10999 } 11000 var sv *types.IdentityDkimAttributes 11001 if *v == nil { 11002 sv = &types.IdentityDkimAttributes{} 11003 } else { 11004 sv = *v 11005 } 11006 11007 for { 11008 t, done, err := decoder.Token() 11009 if err != nil { 11010 return err 11011 } 11012 if done { 11013 break 11014 } 11015 originalDecoder := decoder 11016 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11017 switch { 11018 case strings.EqualFold("DkimEnabled", t.Name.Local): 11019 val, err := decoder.Value() 11020 if err != nil { 11021 return err 11022 } 11023 if val == nil { 11024 break 11025 } 11026 { 11027 xtv, err := strconv.ParseBool(string(val)) 11028 if err != nil { 11029 return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val) 11030 } 11031 sv.DkimEnabled = xtv 11032 } 11033 11034 case strings.EqualFold("DkimTokens", t.Name.Local): 11035 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11036 if err := awsAwsquery_deserializeDocumentVerificationTokenList(&sv.DkimTokens, nodeDecoder); err != nil { 11037 return err 11038 } 11039 11040 case strings.EqualFold("DkimVerificationStatus", t.Name.Local): 11041 val, err := decoder.Value() 11042 if err != nil { 11043 return err 11044 } 11045 if val == nil { 11046 break 11047 } 11048 { 11049 xtv := string(val) 11050 sv.DkimVerificationStatus = types.VerificationStatus(xtv) 11051 } 11052 11053 default: 11054 // Do nothing and ignore the unexpected tag element 11055 err = decoder.Decoder.Skip() 11056 if err != nil { 11057 return err 11058 } 11059 11060 } 11061 decoder = originalDecoder 11062 } 11063 *v = sv 11064 return nil 11065} 11066 11067func awsAwsquery_deserializeDocumentIdentityList(v *[]string, decoder smithyxml.NodeDecoder) error { 11068 if v == nil { 11069 return fmt.Errorf("unexpected nil of type %T", v) 11070 } 11071 var sv []string 11072 if *v == nil { 11073 sv = make([]string, 0) 11074 } else { 11075 sv = *v 11076 } 11077 11078 originalDecoder := decoder 11079 for { 11080 t, done, err := decoder.Token() 11081 if err != nil { 11082 return err 11083 } 11084 if done { 11085 break 11086 } 11087 memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11088 decoder = memberDecoder 11089 switch { 11090 case strings.EqualFold("member", t.Name.Local): 11091 var col string 11092 val, err := decoder.Value() 11093 if err != nil { 11094 return err 11095 } 11096 if val == nil { 11097 break 11098 } 11099 { 11100 xtv := string(val) 11101 col = xtv 11102 } 11103 sv = append(sv, col) 11104 11105 default: 11106 err = decoder.Decoder.Skip() 11107 if err != nil { 11108 return err 11109 } 11110 11111 } 11112 decoder = originalDecoder 11113 } 11114 *v = sv 11115 return nil 11116} 11117 11118func awsAwsquery_deserializeDocumentIdentityListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { 11119 var sv []string 11120 if *v == nil { 11121 sv = make([]string, 0) 11122 } else { 11123 sv = *v 11124 } 11125 11126 switch { 11127 default: 11128 var mv string 11129 t := decoder.StartEl 11130 _ = t 11131 val, err := decoder.Value() 11132 if err != nil { 11133 return err 11134 } 11135 if val == nil { 11136 break 11137 } 11138 { 11139 xtv := string(val) 11140 mv = xtv 11141 } 11142 sv = append(sv, mv) 11143 } 11144 *v = sv 11145 return nil 11146} 11147func awsAwsquery_deserializeDocumentIdentityMailFromDomainAttributes(v **types.IdentityMailFromDomainAttributes, decoder smithyxml.NodeDecoder) error { 11148 if v == nil { 11149 return fmt.Errorf("unexpected nil of type %T", v) 11150 } 11151 var sv *types.IdentityMailFromDomainAttributes 11152 if *v == nil { 11153 sv = &types.IdentityMailFromDomainAttributes{} 11154 } else { 11155 sv = *v 11156 } 11157 11158 for { 11159 t, done, err := decoder.Token() 11160 if err != nil { 11161 return err 11162 } 11163 if done { 11164 break 11165 } 11166 originalDecoder := decoder 11167 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11168 switch { 11169 case strings.EqualFold("BehaviorOnMXFailure", t.Name.Local): 11170 val, err := decoder.Value() 11171 if err != nil { 11172 return err 11173 } 11174 if val == nil { 11175 break 11176 } 11177 { 11178 xtv := string(val) 11179 sv.BehaviorOnMXFailure = types.BehaviorOnMXFailure(xtv) 11180 } 11181 11182 case strings.EqualFold("MailFromDomain", t.Name.Local): 11183 val, err := decoder.Value() 11184 if err != nil { 11185 return err 11186 } 11187 if val == nil { 11188 break 11189 } 11190 { 11191 xtv := string(val) 11192 sv.MailFromDomain = ptr.String(xtv) 11193 } 11194 11195 case strings.EqualFold("MailFromDomainStatus", t.Name.Local): 11196 val, err := decoder.Value() 11197 if err != nil { 11198 return err 11199 } 11200 if val == nil { 11201 break 11202 } 11203 { 11204 xtv := string(val) 11205 sv.MailFromDomainStatus = types.CustomMailFromStatus(xtv) 11206 } 11207 11208 default: 11209 // Do nothing and ignore the unexpected tag element 11210 err = decoder.Decoder.Skip() 11211 if err != nil { 11212 return err 11213 } 11214 11215 } 11216 decoder = originalDecoder 11217 } 11218 *v = sv 11219 return nil 11220} 11221 11222func awsAwsquery_deserializeDocumentIdentityNotificationAttributes(v **types.IdentityNotificationAttributes, decoder smithyxml.NodeDecoder) error { 11223 if v == nil { 11224 return fmt.Errorf("unexpected nil of type %T", v) 11225 } 11226 var sv *types.IdentityNotificationAttributes 11227 if *v == nil { 11228 sv = &types.IdentityNotificationAttributes{} 11229 } else { 11230 sv = *v 11231 } 11232 11233 for { 11234 t, done, err := decoder.Token() 11235 if err != nil { 11236 return err 11237 } 11238 if done { 11239 break 11240 } 11241 originalDecoder := decoder 11242 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11243 switch { 11244 case strings.EqualFold("BounceTopic", t.Name.Local): 11245 val, err := decoder.Value() 11246 if err != nil { 11247 return err 11248 } 11249 if val == nil { 11250 break 11251 } 11252 { 11253 xtv := string(val) 11254 sv.BounceTopic = ptr.String(xtv) 11255 } 11256 11257 case strings.EqualFold("ComplaintTopic", t.Name.Local): 11258 val, err := decoder.Value() 11259 if err != nil { 11260 return err 11261 } 11262 if val == nil { 11263 break 11264 } 11265 { 11266 xtv := string(val) 11267 sv.ComplaintTopic = ptr.String(xtv) 11268 } 11269 11270 case strings.EqualFold("DeliveryTopic", t.Name.Local): 11271 val, err := decoder.Value() 11272 if err != nil { 11273 return err 11274 } 11275 if val == nil { 11276 break 11277 } 11278 { 11279 xtv := string(val) 11280 sv.DeliveryTopic = ptr.String(xtv) 11281 } 11282 11283 case strings.EqualFold("ForwardingEnabled", t.Name.Local): 11284 val, err := decoder.Value() 11285 if err != nil { 11286 return err 11287 } 11288 if val == nil { 11289 break 11290 } 11291 { 11292 xtv, err := strconv.ParseBool(string(val)) 11293 if err != nil { 11294 return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val) 11295 } 11296 sv.ForwardingEnabled = xtv 11297 } 11298 11299 case strings.EqualFold("HeadersInBounceNotificationsEnabled", t.Name.Local): 11300 val, err := decoder.Value() 11301 if err != nil { 11302 return err 11303 } 11304 if val == nil { 11305 break 11306 } 11307 { 11308 xtv, err := strconv.ParseBool(string(val)) 11309 if err != nil { 11310 return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val) 11311 } 11312 sv.HeadersInBounceNotificationsEnabled = xtv 11313 } 11314 11315 case strings.EqualFold("HeadersInComplaintNotificationsEnabled", t.Name.Local): 11316 val, err := decoder.Value() 11317 if err != nil { 11318 return err 11319 } 11320 if val == nil { 11321 break 11322 } 11323 { 11324 xtv, err := strconv.ParseBool(string(val)) 11325 if err != nil { 11326 return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val) 11327 } 11328 sv.HeadersInComplaintNotificationsEnabled = xtv 11329 } 11330 11331 case strings.EqualFold("HeadersInDeliveryNotificationsEnabled", t.Name.Local): 11332 val, err := decoder.Value() 11333 if err != nil { 11334 return err 11335 } 11336 if val == nil { 11337 break 11338 } 11339 { 11340 xtv, err := strconv.ParseBool(string(val)) 11341 if err != nil { 11342 return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val) 11343 } 11344 sv.HeadersInDeliveryNotificationsEnabled = xtv 11345 } 11346 11347 default: 11348 // Do nothing and ignore the unexpected tag element 11349 err = decoder.Decoder.Skip() 11350 if err != nil { 11351 return err 11352 } 11353 11354 } 11355 decoder = originalDecoder 11356 } 11357 *v = sv 11358 return nil 11359} 11360 11361func awsAwsquery_deserializeDocumentIdentityVerificationAttributes(v **types.IdentityVerificationAttributes, decoder smithyxml.NodeDecoder) error { 11362 if v == nil { 11363 return fmt.Errorf("unexpected nil of type %T", v) 11364 } 11365 var sv *types.IdentityVerificationAttributes 11366 if *v == nil { 11367 sv = &types.IdentityVerificationAttributes{} 11368 } else { 11369 sv = *v 11370 } 11371 11372 for { 11373 t, done, err := decoder.Token() 11374 if err != nil { 11375 return err 11376 } 11377 if done { 11378 break 11379 } 11380 originalDecoder := decoder 11381 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11382 switch { 11383 case strings.EqualFold("VerificationStatus", t.Name.Local): 11384 val, err := decoder.Value() 11385 if err != nil { 11386 return err 11387 } 11388 if val == nil { 11389 break 11390 } 11391 { 11392 xtv := string(val) 11393 sv.VerificationStatus = types.VerificationStatus(xtv) 11394 } 11395 11396 case strings.EqualFold("VerificationToken", t.Name.Local): 11397 val, err := decoder.Value() 11398 if err != nil { 11399 return err 11400 } 11401 if val == nil { 11402 break 11403 } 11404 { 11405 xtv := string(val) 11406 sv.VerificationToken = ptr.String(xtv) 11407 } 11408 11409 default: 11410 // Do nothing and ignore the unexpected tag element 11411 err = decoder.Decoder.Skip() 11412 if err != nil { 11413 return err 11414 } 11415 11416 } 11417 decoder = originalDecoder 11418 } 11419 *v = sv 11420 return nil 11421} 11422 11423func awsAwsquery_deserializeDocumentInvalidCloudWatchDestinationException(v **types.InvalidCloudWatchDestinationException, decoder smithyxml.NodeDecoder) error { 11424 if v == nil { 11425 return fmt.Errorf("unexpected nil of type %T", v) 11426 } 11427 var sv *types.InvalidCloudWatchDestinationException 11428 if *v == nil { 11429 sv = &types.InvalidCloudWatchDestinationException{} 11430 } else { 11431 sv = *v 11432 } 11433 11434 for { 11435 t, done, err := decoder.Token() 11436 if err != nil { 11437 return err 11438 } 11439 if done { 11440 break 11441 } 11442 originalDecoder := decoder 11443 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11444 switch { 11445 case strings.EqualFold("ConfigurationSetName", t.Name.Local): 11446 val, err := decoder.Value() 11447 if err != nil { 11448 return err 11449 } 11450 if val == nil { 11451 break 11452 } 11453 { 11454 xtv := string(val) 11455 sv.ConfigurationSetName = ptr.String(xtv) 11456 } 11457 11458 case strings.EqualFold("EventDestinationName", t.Name.Local): 11459 val, err := decoder.Value() 11460 if err != nil { 11461 return err 11462 } 11463 if val == nil { 11464 break 11465 } 11466 { 11467 xtv := string(val) 11468 sv.EventDestinationName = ptr.String(xtv) 11469 } 11470 11471 case strings.EqualFold("message", t.Name.Local): 11472 val, err := decoder.Value() 11473 if err != nil { 11474 return err 11475 } 11476 if val == nil { 11477 break 11478 } 11479 { 11480 xtv := string(val) 11481 sv.Message = ptr.String(xtv) 11482 } 11483 11484 default: 11485 // Do nothing and ignore the unexpected tag element 11486 err = decoder.Decoder.Skip() 11487 if err != nil { 11488 return err 11489 } 11490 11491 } 11492 decoder = originalDecoder 11493 } 11494 *v = sv 11495 return nil 11496} 11497 11498func awsAwsquery_deserializeDocumentInvalidConfigurationSetException(v **types.InvalidConfigurationSetException, decoder smithyxml.NodeDecoder) error { 11499 if v == nil { 11500 return fmt.Errorf("unexpected nil of type %T", v) 11501 } 11502 var sv *types.InvalidConfigurationSetException 11503 if *v == nil { 11504 sv = &types.InvalidConfigurationSetException{} 11505 } else { 11506 sv = *v 11507 } 11508 11509 for { 11510 t, done, err := decoder.Token() 11511 if err != nil { 11512 return err 11513 } 11514 if done { 11515 break 11516 } 11517 originalDecoder := decoder 11518 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11519 switch { 11520 case strings.EqualFold("message", t.Name.Local): 11521 val, err := decoder.Value() 11522 if err != nil { 11523 return err 11524 } 11525 if val == nil { 11526 break 11527 } 11528 { 11529 xtv := string(val) 11530 sv.Message = ptr.String(xtv) 11531 } 11532 11533 default: 11534 // Do nothing and ignore the unexpected tag element 11535 err = decoder.Decoder.Skip() 11536 if err != nil { 11537 return err 11538 } 11539 11540 } 11541 decoder = originalDecoder 11542 } 11543 *v = sv 11544 return nil 11545} 11546 11547func awsAwsquery_deserializeDocumentInvalidDeliveryOptionsException(v **types.InvalidDeliveryOptionsException, decoder smithyxml.NodeDecoder) error { 11548 if v == nil { 11549 return fmt.Errorf("unexpected nil of type %T", v) 11550 } 11551 var sv *types.InvalidDeliveryOptionsException 11552 if *v == nil { 11553 sv = &types.InvalidDeliveryOptionsException{} 11554 } else { 11555 sv = *v 11556 } 11557 11558 for { 11559 t, done, err := decoder.Token() 11560 if err != nil { 11561 return err 11562 } 11563 if done { 11564 break 11565 } 11566 originalDecoder := decoder 11567 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11568 switch { 11569 case strings.EqualFold("message", t.Name.Local): 11570 val, err := decoder.Value() 11571 if err != nil { 11572 return err 11573 } 11574 if val == nil { 11575 break 11576 } 11577 { 11578 xtv := string(val) 11579 sv.Message = ptr.String(xtv) 11580 } 11581 11582 default: 11583 // Do nothing and ignore the unexpected tag element 11584 err = decoder.Decoder.Skip() 11585 if err != nil { 11586 return err 11587 } 11588 11589 } 11590 decoder = originalDecoder 11591 } 11592 *v = sv 11593 return nil 11594} 11595 11596func awsAwsquery_deserializeDocumentInvalidFirehoseDestinationException(v **types.InvalidFirehoseDestinationException, decoder smithyxml.NodeDecoder) error { 11597 if v == nil { 11598 return fmt.Errorf("unexpected nil of type %T", v) 11599 } 11600 var sv *types.InvalidFirehoseDestinationException 11601 if *v == nil { 11602 sv = &types.InvalidFirehoseDestinationException{} 11603 } else { 11604 sv = *v 11605 } 11606 11607 for { 11608 t, done, err := decoder.Token() 11609 if err != nil { 11610 return err 11611 } 11612 if done { 11613 break 11614 } 11615 originalDecoder := decoder 11616 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11617 switch { 11618 case strings.EqualFold("ConfigurationSetName", t.Name.Local): 11619 val, err := decoder.Value() 11620 if err != nil { 11621 return err 11622 } 11623 if val == nil { 11624 break 11625 } 11626 { 11627 xtv := string(val) 11628 sv.ConfigurationSetName = ptr.String(xtv) 11629 } 11630 11631 case strings.EqualFold("EventDestinationName", t.Name.Local): 11632 val, err := decoder.Value() 11633 if err != nil { 11634 return err 11635 } 11636 if val == nil { 11637 break 11638 } 11639 { 11640 xtv := string(val) 11641 sv.EventDestinationName = ptr.String(xtv) 11642 } 11643 11644 case strings.EqualFold("message", t.Name.Local): 11645 val, err := decoder.Value() 11646 if err != nil { 11647 return err 11648 } 11649 if val == nil { 11650 break 11651 } 11652 { 11653 xtv := string(val) 11654 sv.Message = ptr.String(xtv) 11655 } 11656 11657 default: 11658 // Do nothing and ignore the unexpected tag element 11659 err = decoder.Decoder.Skip() 11660 if err != nil { 11661 return err 11662 } 11663 11664 } 11665 decoder = originalDecoder 11666 } 11667 *v = sv 11668 return nil 11669} 11670 11671func awsAwsquery_deserializeDocumentInvalidLambdaFunctionException(v **types.InvalidLambdaFunctionException, decoder smithyxml.NodeDecoder) error { 11672 if v == nil { 11673 return fmt.Errorf("unexpected nil of type %T", v) 11674 } 11675 var sv *types.InvalidLambdaFunctionException 11676 if *v == nil { 11677 sv = &types.InvalidLambdaFunctionException{} 11678 } else { 11679 sv = *v 11680 } 11681 11682 for { 11683 t, done, err := decoder.Token() 11684 if err != nil { 11685 return err 11686 } 11687 if done { 11688 break 11689 } 11690 originalDecoder := decoder 11691 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11692 switch { 11693 case strings.EqualFold("FunctionArn", t.Name.Local): 11694 val, err := decoder.Value() 11695 if err != nil { 11696 return err 11697 } 11698 if val == nil { 11699 break 11700 } 11701 { 11702 xtv := string(val) 11703 sv.FunctionArn = ptr.String(xtv) 11704 } 11705 11706 case strings.EqualFold("message", t.Name.Local): 11707 val, err := decoder.Value() 11708 if err != nil { 11709 return err 11710 } 11711 if val == nil { 11712 break 11713 } 11714 { 11715 xtv := string(val) 11716 sv.Message = ptr.String(xtv) 11717 } 11718 11719 default: 11720 // Do nothing and ignore the unexpected tag element 11721 err = decoder.Decoder.Skip() 11722 if err != nil { 11723 return err 11724 } 11725 11726 } 11727 decoder = originalDecoder 11728 } 11729 *v = sv 11730 return nil 11731} 11732 11733func awsAwsquery_deserializeDocumentInvalidPolicyException(v **types.InvalidPolicyException, decoder smithyxml.NodeDecoder) error { 11734 if v == nil { 11735 return fmt.Errorf("unexpected nil of type %T", v) 11736 } 11737 var sv *types.InvalidPolicyException 11738 if *v == nil { 11739 sv = &types.InvalidPolicyException{} 11740 } else { 11741 sv = *v 11742 } 11743 11744 for { 11745 t, done, err := decoder.Token() 11746 if err != nil { 11747 return err 11748 } 11749 if done { 11750 break 11751 } 11752 originalDecoder := decoder 11753 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11754 switch { 11755 case strings.EqualFold("message", t.Name.Local): 11756 val, err := decoder.Value() 11757 if err != nil { 11758 return err 11759 } 11760 if val == nil { 11761 break 11762 } 11763 { 11764 xtv := string(val) 11765 sv.Message = ptr.String(xtv) 11766 } 11767 11768 default: 11769 // Do nothing and ignore the unexpected tag element 11770 err = decoder.Decoder.Skip() 11771 if err != nil { 11772 return err 11773 } 11774 11775 } 11776 decoder = originalDecoder 11777 } 11778 *v = sv 11779 return nil 11780} 11781 11782func awsAwsquery_deserializeDocumentInvalidRenderingParameterException(v **types.InvalidRenderingParameterException, decoder smithyxml.NodeDecoder) error { 11783 if v == nil { 11784 return fmt.Errorf("unexpected nil of type %T", v) 11785 } 11786 var sv *types.InvalidRenderingParameterException 11787 if *v == nil { 11788 sv = &types.InvalidRenderingParameterException{} 11789 } else { 11790 sv = *v 11791 } 11792 11793 for { 11794 t, done, err := decoder.Token() 11795 if err != nil { 11796 return err 11797 } 11798 if done { 11799 break 11800 } 11801 originalDecoder := decoder 11802 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11803 switch { 11804 case strings.EqualFold("message", t.Name.Local): 11805 val, err := decoder.Value() 11806 if err != nil { 11807 return err 11808 } 11809 if val == nil { 11810 break 11811 } 11812 { 11813 xtv := string(val) 11814 sv.Message = ptr.String(xtv) 11815 } 11816 11817 case strings.EqualFold("TemplateName", t.Name.Local): 11818 val, err := decoder.Value() 11819 if err != nil { 11820 return err 11821 } 11822 if val == nil { 11823 break 11824 } 11825 { 11826 xtv := string(val) 11827 sv.TemplateName = ptr.String(xtv) 11828 } 11829 11830 default: 11831 // Do nothing and ignore the unexpected tag element 11832 err = decoder.Decoder.Skip() 11833 if err != nil { 11834 return err 11835 } 11836 11837 } 11838 decoder = originalDecoder 11839 } 11840 *v = sv 11841 return nil 11842} 11843 11844func awsAwsquery_deserializeDocumentInvalidS3ConfigurationException(v **types.InvalidS3ConfigurationException, decoder smithyxml.NodeDecoder) error { 11845 if v == nil { 11846 return fmt.Errorf("unexpected nil of type %T", v) 11847 } 11848 var sv *types.InvalidS3ConfigurationException 11849 if *v == nil { 11850 sv = &types.InvalidS3ConfigurationException{} 11851 } else { 11852 sv = *v 11853 } 11854 11855 for { 11856 t, done, err := decoder.Token() 11857 if err != nil { 11858 return err 11859 } 11860 if done { 11861 break 11862 } 11863 originalDecoder := decoder 11864 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11865 switch { 11866 case strings.EqualFold("Bucket", t.Name.Local): 11867 val, err := decoder.Value() 11868 if err != nil { 11869 return err 11870 } 11871 if val == nil { 11872 break 11873 } 11874 { 11875 xtv := string(val) 11876 sv.Bucket = ptr.String(xtv) 11877 } 11878 11879 case strings.EqualFold("message", t.Name.Local): 11880 val, err := decoder.Value() 11881 if err != nil { 11882 return err 11883 } 11884 if val == nil { 11885 break 11886 } 11887 { 11888 xtv := string(val) 11889 sv.Message = ptr.String(xtv) 11890 } 11891 11892 default: 11893 // Do nothing and ignore the unexpected tag element 11894 err = decoder.Decoder.Skip() 11895 if err != nil { 11896 return err 11897 } 11898 11899 } 11900 decoder = originalDecoder 11901 } 11902 *v = sv 11903 return nil 11904} 11905 11906func awsAwsquery_deserializeDocumentInvalidSNSDestinationException(v **types.InvalidSNSDestinationException, decoder smithyxml.NodeDecoder) error { 11907 if v == nil { 11908 return fmt.Errorf("unexpected nil of type %T", v) 11909 } 11910 var sv *types.InvalidSNSDestinationException 11911 if *v == nil { 11912 sv = &types.InvalidSNSDestinationException{} 11913 } else { 11914 sv = *v 11915 } 11916 11917 for { 11918 t, done, err := decoder.Token() 11919 if err != nil { 11920 return err 11921 } 11922 if done { 11923 break 11924 } 11925 originalDecoder := decoder 11926 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 11927 switch { 11928 case strings.EqualFold("ConfigurationSetName", t.Name.Local): 11929 val, err := decoder.Value() 11930 if err != nil { 11931 return err 11932 } 11933 if val == nil { 11934 break 11935 } 11936 { 11937 xtv := string(val) 11938 sv.ConfigurationSetName = ptr.String(xtv) 11939 } 11940 11941 case strings.EqualFold("EventDestinationName", t.Name.Local): 11942 val, err := decoder.Value() 11943 if err != nil { 11944 return err 11945 } 11946 if val == nil { 11947 break 11948 } 11949 { 11950 xtv := string(val) 11951 sv.EventDestinationName = ptr.String(xtv) 11952 } 11953 11954 case strings.EqualFold("message", t.Name.Local): 11955 val, err := decoder.Value() 11956 if err != nil { 11957 return err 11958 } 11959 if val == nil { 11960 break 11961 } 11962 { 11963 xtv := string(val) 11964 sv.Message = ptr.String(xtv) 11965 } 11966 11967 default: 11968 // Do nothing and ignore the unexpected tag element 11969 err = decoder.Decoder.Skip() 11970 if err != nil { 11971 return err 11972 } 11973 11974 } 11975 decoder = originalDecoder 11976 } 11977 *v = sv 11978 return nil 11979} 11980 11981func awsAwsquery_deserializeDocumentInvalidSnsTopicException(v **types.InvalidSnsTopicException, decoder smithyxml.NodeDecoder) error { 11982 if v == nil { 11983 return fmt.Errorf("unexpected nil of type %T", v) 11984 } 11985 var sv *types.InvalidSnsTopicException 11986 if *v == nil { 11987 sv = &types.InvalidSnsTopicException{} 11988 } else { 11989 sv = *v 11990 } 11991 11992 for { 11993 t, done, err := decoder.Token() 11994 if err != nil { 11995 return err 11996 } 11997 if done { 11998 break 11999 } 12000 originalDecoder := decoder 12001 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12002 switch { 12003 case strings.EqualFold("message", t.Name.Local): 12004 val, err := decoder.Value() 12005 if err != nil { 12006 return err 12007 } 12008 if val == nil { 12009 break 12010 } 12011 { 12012 xtv := string(val) 12013 sv.Message = ptr.String(xtv) 12014 } 12015 12016 case strings.EqualFold("Topic", t.Name.Local): 12017 val, err := decoder.Value() 12018 if err != nil { 12019 return err 12020 } 12021 if val == nil { 12022 break 12023 } 12024 { 12025 xtv := string(val) 12026 sv.Topic = ptr.String(xtv) 12027 } 12028 12029 default: 12030 // Do nothing and ignore the unexpected tag element 12031 err = decoder.Decoder.Skip() 12032 if err != nil { 12033 return err 12034 } 12035 12036 } 12037 decoder = originalDecoder 12038 } 12039 *v = sv 12040 return nil 12041} 12042 12043func awsAwsquery_deserializeDocumentInvalidTemplateException(v **types.InvalidTemplateException, decoder smithyxml.NodeDecoder) error { 12044 if v == nil { 12045 return fmt.Errorf("unexpected nil of type %T", v) 12046 } 12047 var sv *types.InvalidTemplateException 12048 if *v == nil { 12049 sv = &types.InvalidTemplateException{} 12050 } else { 12051 sv = *v 12052 } 12053 12054 for { 12055 t, done, err := decoder.Token() 12056 if err != nil { 12057 return err 12058 } 12059 if done { 12060 break 12061 } 12062 originalDecoder := decoder 12063 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12064 switch { 12065 case strings.EqualFold("message", t.Name.Local): 12066 val, err := decoder.Value() 12067 if err != nil { 12068 return err 12069 } 12070 if val == nil { 12071 break 12072 } 12073 { 12074 xtv := string(val) 12075 sv.Message = ptr.String(xtv) 12076 } 12077 12078 case strings.EqualFold("TemplateName", t.Name.Local): 12079 val, err := decoder.Value() 12080 if err != nil { 12081 return err 12082 } 12083 if val == nil { 12084 break 12085 } 12086 { 12087 xtv := string(val) 12088 sv.TemplateName = ptr.String(xtv) 12089 } 12090 12091 default: 12092 // Do nothing and ignore the unexpected tag element 12093 err = decoder.Decoder.Skip() 12094 if err != nil { 12095 return err 12096 } 12097 12098 } 12099 decoder = originalDecoder 12100 } 12101 *v = sv 12102 return nil 12103} 12104 12105func awsAwsquery_deserializeDocumentInvalidTrackingOptionsException(v **types.InvalidTrackingOptionsException, decoder smithyxml.NodeDecoder) error { 12106 if v == nil { 12107 return fmt.Errorf("unexpected nil of type %T", v) 12108 } 12109 var sv *types.InvalidTrackingOptionsException 12110 if *v == nil { 12111 sv = &types.InvalidTrackingOptionsException{} 12112 } else { 12113 sv = *v 12114 } 12115 12116 for { 12117 t, done, err := decoder.Token() 12118 if err != nil { 12119 return err 12120 } 12121 if done { 12122 break 12123 } 12124 originalDecoder := decoder 12125 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12126 switch { 12127 case strings.EqualFold("message", t.Name.Local): 12128 val, err := decoder.Value() 12129 if err != nil { 12130 return err 12131 } 12132 if val == nil { 12133 break 12134 } 12135 { 12136 xtv := string(val) 12137 sv.Message = ptr.String(xtv) 12138 } 12139 12140 default: 12141 // Do nothing and ignore the unexpected tag element 12142 err = decoder.Decoder.Skip() 12143 if err != nil { 12144 return err 12145 } 12146 12147 } 12148 decoder = originalDecoder 12149 } 12150 *v = sv 12151 return nil 12152} 12153 12154func awsAwsquery_deserializeDocumentKinesisFirehoseDestination(v **types.KinesisFirehoseDestination, decoder smithyxml.NodeDecoder) error { 12155 if v == nil { 12156 return fmt.Errorf("unexpected nil of type %T", v) 12157 } 12158 var sv *types.KinesisFirehoseDestination 12159 if *v == nil { 12160 sv = &types.KinesisFirehoseDestination{} 12161 } else { 12162 sv = *v 12163 } 12164 12165 for { 12166 t, done, err := decoder.Token() 12167 if err != nil { 12168 return err 12169 } 12170 if done { 12171 break 12172 } 12173 originalDecoder := decoder 12174 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12175 switch { 12176 case strings.EqualFold("DeliveryStreamARN", t.Name.Local): 12177 val, err := decoder.Value() 12178 if err != nil { 12179 return err 12180 } 12181 if val == nil { 12182 break 12183 } 12184 { 12185 xtv := string(val) 12186 sv.DeliveryStreamARN = ptr.String(xtv) 12187 } 12188 12189 case strings.EqualFold("IAMRoleARN", t.Name.Local): 12190 val, err := decoder.Value() 12191 if err != nil { 12192 return err 12193 } 12194 if val == nil { 12195 break 12196 } 12197 { 12198 xtv := string(val) 12199 sv.IAMRoleARN = ptr.String(xtv) 12200 } 12201 12202 default: 12203 // Do nothing and ignore the unexpected tag element 12204 err = decoder.Decoder.Skip() 12205 if err != nil { 12206 return err 12207 } 12208 12209 } 12210 decoder = originalDecoder 12211 } 12212 *v = sv 12213 return nil 12214} 12215 12216func awsAwsquery_deserializeDocumentLambdaAction(v **types.LambdaAction, decoder smithyxml.NodeDecoder) error { 12217 if v == nil { 12218 return fmt.Errorf("unexpected nil of type %T", v) 12219 } 12220 var sv *types.LambdaAction 12221 if *v == nil { 12222 sv = &types.LambdaAction{} 12223 } else { 12224 sv = *v 12225 } 12226 12227 for { 12228 t, done, err := decoder.Token() 12229 if err != nil { 12230 return err 12231 } 12232 if done { 12233 break 12234 } 12235 originalDecoder := decoder 12236 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12237 switch { 12238 case strings.EqualFold("FunctionArn", t.Name.Local): 12239 val, err := decoder.Value() 12240 if err != nil { 12241 return err 12242 } 12243 if val == nil { 12244 break 12245 } 12246 { 12247 xtv := string(val) 12248 sv.FunctionArn = ptr.String(xtv) 12249 } 12250 12251 case strings.EqualFold("InvocationType", t.Name.Local): 12252 val, err := decoder.Value() 12253 if err != nil { 12254 return err 12255 } 12256 if val == nil { 12257 break 12258 } 12259 { 12260 xtv := string(val) 12261 sv.InvocationType = types.InvocationType(xtv) 12262 } 12263 12264 case strings.EqualFold("TopicArn", t.Name.Local): 12265 val, err := decoder.Value() 12266 if err != nil { 12267 return err 12268 } 12269 if val == nil { 12270 break 12271 } 12272 { 12273 xtv := string(val) 12274 sv.TopicArn = ptr.String(xtv) 12275 } 12276 12277 default: 12278 // Do nothing and ignore the unexpected tag element 12279 err = decoder.Decoder.Skip() 12280 if err != nil { 12281 return err 12282 } 12283 12284 } 12285 decoder = originalDecoder 12286 } 12287 *v = sv 12288 return nil 12289} 12290 12291func awsAwsquery_deserializeDocumentLimitExceededException(v **types.LimitExceededException, decoder smithyxml.NodeDecoder) error { 12292 if v == nil { 12293 return fmt.Errorf("unexpected nil of type %T", v) 12294 } 12295 var sv *types.LimitExceededException 12296 if *v == nil { 12297 sv = &types.LimitExceededException{} 12298 } else { 12299 sv = *v 12300 } 12301 12302 for { 12303 t, done, err := decoder.Token() 12304 if err != nil { 12305 return err 12306 } 12307 if done { 12308 break 12309 } 12310 originalDecoder := decoder 12311 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12312 switch { 12313 case strings.EqualFold("message", t.Name.Local): 12314 val, err := decoder.Value() 12315 if err != nil { 12316 return err 12317 } 12318 if val == nil { 12319 break 12320 } 12321 { 12322 xtv := string(val) 12323 sv.Message = ptr.String(xtv) 12324 } 12325 12326 default: 12327 // Do nothing and ignore the unexpected tag element 12328 err = decoder.Decoder.Skip() 12329 if err != nil { 12330 return err 12331 } 12332 12333 } 12334 decoder = originalDecoder 12335 } 12336 *v = sv 12337 return nil 12338} 12339 12340func awsAwsquery_deserializeDocumentMailFromDomainAttributes(v *map[string]types.IdentityMailFromDomainAttributes, decoder smithyxml.NodeDecoder) error { 12341 if v == nil { 12342 return fmt.Errorf("unexpected nil of type %T", v) 12343 } 12344 var sv map[string]types.IdentityMailFromDomainAttributes 12345 if *v == nil { 12346 sv = make(map[string]types.IdentityMailFromDomainAttributes, 0) 12347 } else { 12348 sv = *v 12349 } 12350 12351 for { 12352 t, done, err := decoder.Token() 12353 if err != nil { 12354 return err 12355 } 12356 if done { 12357 break 12358 } 12359 switch { 12360 case strings.EqualFold("entry", t.Name.Local): 12361 entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12362 if err := awsAwsquery_deserializeDocumentMailFromDomainAttributesUnwrapped(&sv, entryDecoder); err != nil { 12363 return err 12364 } 12365 12366 default: 12367 err = decoder.Decoder.Skip() 12368 if err != nil { 12369 return err 12370 } 12371 12372 } 12373 } 12374 *v = sv 12375 return nil 12376} 12377 12378func awsAwsquery_deserializeDocumentMailFromDomainAttributesUnwrapped(v *map[string]types.IdentityMailFromDomainAttributes, decoder smithyxml.NodeDecoder) error { 12379 var sv map[string]types.IdentityMailFromDomainAttributes 12380 if *v == nil { 12381 sv = make(map[string]types.IdentityMailFromDomainAttributes, 0) 12382 } else { 12383 sv = *v 12384 } 12385 12386 var ek string 12387 var ev types.IdentityMailFromDomainAttributes 12388 for { 12389 t, done, err := decoder.Token() 12390 if err != nil { 12391 return err 12392 } 12393 if done { 12394 sv[ek] = ev 12395 break 12396 } 12397 originalDecoder := decoder 12398 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12399 switch { 12400 case strings.EqualFold("key", t.Name.Local): 12401 val, err := decoder.Value() 12402 if err != nil { 12403 return err 12404 } 12405 if val == nil { 12406 break 12407 } 12408 { 12409 xtv := string(val) 12410 ek = xtv 12411 } 12412 12413 case strings.EqualFold("value", t.Name.Local): 12414 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12415 mapVar := ev 12416 destAddr := &mapVar 12417 if err := awsAwsquery_deserializeDocumentIdentityMailFromDomainAttributes(&destAddr, nodeDecoder); err != nil { 12418 return err 12419 } 12420 ev = *destAddr 12421 12422 default: 12423 err = decoder.Decoder.Skip() 12424 if err != nil { 12425 return err 12426 } 12427 12428 } 12429 decoder = originalDecoder 12430 } 12431 *v = sv 12432 return nil 12433} 12434func awsAwsquery_deserializeDocumentMailFromDomainNotVerifiedException(v **types.MailFromDomainNotVerifiedException, decoder smithyxml.NodeDecoder) error { 12435 if v == nil { 12436 return fmt.Errorf("unexpected nil of type %T", v) 12437 } 12438 var sv *types.MailFromDomainNotVerifiedException 12439 if *v == nil { 12440 sv = &types.MailFromDomainNotVerifiedException{} 12441 } else { 12442 sv = *v 12443 } 12444 12445 for { 12446 t, done, err := decoder.Token() 12447 if err != nil { 12448 return err 12449 } 12450 if done { 12451 break 12452 } 12453 originalDecoder := decoder 12454 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12455 switch { 12456 case strings.EqualFold("message", t.Name.Local): 12457 val, err := decoder.Value() 12458 if err != nil { 12459 return err 12460 } 12461 if val == nil { 12462 break 12463 } 12464 { 12465 xtv := string(val) 12466 sv.Message = ptr.String(xtv) 12467 } 12468 12469 default: 12470 // Do nothing and ignore the unexpected tag element 12471 err = decoder.Decoder.Skip() 12472 if err != nil { 12473 return err 12474 } 12475 12476 } 12477 decoder = originalDecoder 12478 } 12479 *v = sv 12480 return nil 12481} 12482 12483func awsAwsquery_deserializeDocumentMessageRejected(v **types.MessageRejected, decoder smithyxml.NodeDecoder) error { 12484 if v == nil { 12485 return fmt.Errorf("unexpected nil of type %T", v) 12486 } 12487 var sv *types.MessageRejected 12488 if *v == nil { 12489 sv = &types.MessageRejected{} 12490 } else { 12491 sv = *v 12492 } 12493 12494 for { 12495 t, done, err := decoder.Token() 12496 if err != nil { 12497 return err 12498 } 12499 if done { 12500 break 12501 } 12502 originalDecoder := decoder 12503 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12504 switch { 12505 case strings.EqualFold("message", t.Name.Local): 12506 val, err := decoder.Value() 12507 if err != nil { 12508 return err 12509 } 12510 if val == nil { 12511 break 12512 } 12513 { 12514 xtv := string(val) 12515 sv.Message = ptr.String(xtv) 12516 } 12517 12518 default: 12519 // Do nothing and ignore the unexpected tag element 12520 err = decoder.Decoder.Skip() 12521 if err != nil { 12522 return err 12523 } 12524 12525 } 12526 decoder = originalDecoder 12527 } 12528 *v = sv 12529 return nil 12530} 12531 12532func awsAwsquery_deserializeDocumentMissingRenderingAttributeException(v **types.MissingRenderingAttributeException, decoder smithyxml.NodeDecoder) error { 12533 if v == nil { 12534 return fmt.Errorf("unexpected nil of type %T", v) 12535 } 12536 var sv *types.MissingRenderingAttributeException 12537 if *v == nil { 12538 sv = &types.MissingRenderingAttributeException{} 12539 } else { 12540 sv = *v 12541 } 12542 12543 for { 12544 t, done, err := decoder.Token() 12545 if err != nil { 12546 return err 12547 } 12548 if done { 12549 break 12550 } 12551 originalDecoder := decoder 12552 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12553 switch { 12554 case strings.EqualFold("message", t.Name.Local): 12555 val, err := decoder.Value() 12556 if err != nil { 12557 return err 12558 } 12559 if val == nil { 12560 break 12561 } 12562 { 12563 xtv := string(val) 12564 sv.Message = ptr.String(xtv) 12565 } 12566 12567 case strings.EqualFold("TemplateName", t.Name.Local): 12568 val, err := decoder.Value() 12569 if err != nil { 12570 return err 12571 } 12572 if val == nil { 12573 break 12574 } 12575 { 12576 xtv := string(val) 12577 sv.TemplateName = ptr.String(xtv) 12578 } 12579 12580 default: 12581 // Do nothing and ignore the unexpected tag element 12582 err = decoder.Decoder.Skip() 12583 if err != nil { 12584 return err 12585 } 12586 12587 } 12588 decoder = originalDecoder 12589 } 12590 *v = sv 12591 return nil 12592} 12593 12594func awsAwsquery_deserializeDocumentNotificationAttributes(v *map[string]types.IdentityNotificationAttributes, decoder smithyxml.NodeDecoder) error { 12595 if v == nil { 12596 return fmt.Errorf("unexpected nil of type %T", v) 12597 } 12598 var sv map[string]types.IdentityNotificationAttributes 12599 if *v == nil { 12600 sv = make(map[string]types.IdentityNotificationAttributes, 0) 12601 } else { 12602 sv = *v 12603 } 12604 12605 for { 12606 t, done, err := decoder.Token() 12607 if err != nil { 12608 return err 12609 } 12610 if done { 12611 break 12612 } 12613 switch { 12614 case strings.EqualFold("entry", t.Name.Local): 12615 entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12616 if err := awsAwsquery_deserializeDocumentNotificationAttributesUnwrapped(&sv, entryDecoder); err != nil { 12617 return err 12618 } 12619 12620 default: 12621 err = decoder.Decoder.Skip() 12622 if err != nil { 12623 return err 12624 } 12625 12626 } 12627 } 12628 *v = sv 12629 return nil 12630} 12631 12632func awsAwsquery_deserializeDocumentNotificationAttributesUnwrapped(v *map[string]types.IdentityNotificationAttributes, decoder smithyxml.NodeDecoder) error { 12633 var sv map[string]types.IdentityNotificationAttributes 12634 if *v == nil { 12635 sv = make(map[string]types.IdentityNotificationAttributes, 0) 12636 } else { 12637 sv = *v 12638 } 12639 12640 var ek string 12641 var ev types.IdentityNotificationAttributes 12642 for { 12643 t, done, err := decoder.Token() 12644 if err != nil { 12645 return err 12646 } 12647 if done { 12648 sv[ek] = ev 12649 break 12650 } 12651 originalDecoder := decoder 12652 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12653 switch { 12654 case strings.EqualFold("key", t.Name.Local): 12655 val, err := decoder.Value() 12656 if err != nil { 12657 return err 12658 } 12659 if val == nil { 12660 break 12661 } 12662 { 12663 xtv := string(val) 12664 ek = xtv 12665 } 12666 12667 case strings.EqualFold("value", t.Name.Local): 12668 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12669 mapVar := ev 12670 destAddr := &mapVar 12671 if err := awsAwsquery_deserializeDocumentIdentityNotificationAttributes(&destAddr, nodeDecoder); err != nil { 12672 return err 12673 } 12674 ev = *destAddr 12675 12676 default: 12677 err = decoder.Decoder.Skip() 12678 if err != nil { 12679 return err 12680 } 12681 12682 } 12683 decoder = originalDecoder 12684 } 12685 *v = sv 12686 return nil 12687} 12688func awsAwsquery_deserializeDocumentPolicyMap(v *map[string]string, decoder smithyxml.NodeDecoder) error { 12689 if v == nil { 12690 return fmt.Errorf("unexpected nil of type %T", v) 12691 } 12692 var sv map[string]string 12693 if *v == nil { 12694 sv = make(map[string]string, 0) 12695 } else { 12696 sv = *v 12697 } 12698 12699 for { 12700 t, done, err := decoder.Token() 12701 if err != nil { 12702 return err 12703 } 12704 if done { 12705 break 12706 } 12707 switch { 12708 case strings.EqualFold("entry", t.Name.Local): 12709 entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12710 if err := awsAwsquery_deserializeDocumentPolicyMapUnwrapped(&sv, entryDecoder); err != nil { 12711 return err 12712 } 12713 12714 default: 12715 err = decoder.Decoder.Skip() 12716 if err != nil { 12717 return err 12718 } 12719 12720 } 12721 } 12722 *v = sv 12723 return nil 12724} 12725 12726func awsAwsquery_deserializeDocumentPolicyMapUnwrapped(v *map[string]string, decoder smithyxml.NodeDecoder) error { 12727 var sv map[string]string 12728 if *v == nil { 12729 sv = make(map[string]string, 0) 12730 } else { 12731 sv = *v 12732 } 12733 12734 var ek string 12735 var ev string 12736 for { 12737 t, done, err := decoder.Token() 12738 if err != nil { 12739 return err 12740 } 12741 if done { 12742 sv[ek] = ev 12743 break 12744 } 12745 originalDecoder := decoder 12746 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12747 switch { 12748 case strings.EqualFold("key", t.Name.Local): 12749 val, err := decoder.Value() 12750 if err != nil { 12751 return err 12752 } 12753 if val == nil { 12754 break 12755 } 12756 { 12757 xtv := string(val) 12758 ek = xtv 12759 } 12760 12761 case strings.EqualFold("value", t.Name.Local): 12762 val, err := decoder.Value() 12763 if err != nil { 12764 return err 12765 } 12766 if val == nil { 12767 break 12768 } 12769 { 12770 xtv := string(val) 12771 ev = xtv 12772 } 12773 12774 default: 12775 err = decoder.Decoder.Skip() 12776 if err != nil { 12777 return err 12778 } 12779 12780 } 12781 decoder = originalDecoder 12782 } 12783 *v = sv 12784 return nil 12785} 12786func awsAwsquery_deserializeDocumentPolicyNameList(v *[]string, decoder smithyxml.NodeDecoder) error { 12787 if v == nil { 12788 return fmt.Errorf("unexpected nil of type %T", v) 12789 } 12790 var sv []string 12791 if *v == nil { 12792 sv = make([]string, 0) 12793 } else { 12794 sv = *v 12795 } 12796 12797 originalDecoder := decoder 12798 for { 12799 t, done, err := decoder.Token() 12800 if err != nil { 12801 return err 12802 } 12803 if done { 12804 break 12805 } 12806 memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12807 decoder = memberDecoder 12808 switch { 12809 case strings.EqualFold("member", t.Name.Local): 12810 var col string 12811 val, err := decoder.Value() 12812 if err != nil { 12813 return err 12814 } 12815 if val == nil { 12816 break 12817 } 12818 { 12819 xtv := string(val) 12820 col = xtv 12821 } 12822 sv = append(sv, col) 12823 12824 default: 12825 err = decoder.Decoder.Skip() 12826 if err != nil { 12827 return err 12828 } 12829 12830 } 12831 decoder = originalDecoder 12832 } 12833 *v = sv 12834 return nil 12835} 12836 12837func awsAwsquery_deserializeDocumentPolicyNameListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { 12838 var sv []string 12839 if *v == nil { 12840 sv = make([]string, 0) 12841 } else { 12842 sv = *v 12843 } 12844 12845 switch { 12846 default: 12847 var mv string 12848 t := decoder.StartEl 12849 _ = t 12850 val, err := decoder.Value() 12851 if err != nil { 12852 return err 12853 } 12854 if val == nil { 12855 break 12856 } 12857 { 12858 xtv := string(val) 12859 mv = xtv 12860 } 12861 sv = append(sv, mv) 12862 } 12863 *v = sv 12864 return nil 12865} 12866func awsAwsquery_deserializeDocumentProductionAccessNotGrantedException(v **types.ProductionAccessNotGrantedException, decoder smithyxml.NodeDecoder) error { 12867 if v == nil { 12868 return fmt.Errorf("unexpected nil of type %T", v) 12869 } 12870 var sv *types.ProductionAccessNotGrantedException 12871 if *v == nil { 12872 sv = &types.ProductionAccessNotGrantedException{} 12873 } else { 12874 sv = *v 12875 } 12876 12877 for { 12878 t, done, err := decoder.Token() 12879 if err != nil { 12880 return err 12881 } 12882 if done { 12883 break 12884 } 12885 originalDecoder := decoder 12886 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12887 switch { 12888 case strings.EqualFold("message", t.Name.Local): 12889 val, err := decoder.Value() 12890 if err != nil { 12891 return err 12892 } 12893 if val == nil { 12894 break 12895 } 12896 { 12897 xtv := string(val) 12898 sv.Message = ptr.String(xtv) 12899 } 12900 12901 default: 12902 // Do nothing and ignore the unexpected tag element 12903 err = decoder.Decoder.Skip() 12904 if err != nil { 12905 return err 12906 } 12907 12908 } 12909 decoder = originalDecoder 12910 } 12911 *v = sv 12912 return nil 12913} 12914 12915func awsAwsquery_deserializeDocumentReceiptAction(v **types.ReceiptAction, decoder smithyxml.NodeDecoder) error { 12916 if v == nil { 12917 return fmt.Errorf("unexpected nil of type %T", v) 12918 } 12919 var sv *types.ReceiptAction 12920 if *v == nil { 12921 sv = &types.ReceiptAction{} 12922 } else { 12923 sv = *v 12924 } 12925 12926 for { 12927 t, done, err := decoder.Token() 12928 if err != nil { 12929 return err 12930 } 12931 if done { 12932 break 12933 } 12934 originalDecoder := decoder 12935 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 12936 switch { 12937 case strings.EqualFold("AddHeaderAction", t.Name.Local): 12938 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12939 if err := awsAwsquery_deserializeDocumentAddHeaderAction(&sv.AddHeaderAction, nodeDecoder); err != nil { 12940 return err 12941 } 12942 12943 case strings.EqualFold("BounceAction", t.Name.Local): 12944 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12945 if err := awsAwsquery_deserializeDocumentBounceAction(&sv.BounceAction, nodeDecoder); err != nil { 12946 return err 12947 } 12948 12949 case strings.EqualFold("LambdaAction", t.Name.Local): 12950 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12951 if err := awsAwsquery_deserializeDocumentLambdaAction(&sv.LambdaAction, nodeDecoder); err != nil { 12952 return err 12953 } 12954 12955 case strings.EqualFold("S3Action", t.Name.Local): 12956 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12957 if err := awsAwsquery_deserializeDocumentS3Action(&sv.S3Action, nodeDecoder); err != nil { 12958 return err 12959 } 12960 12961 case strings.EqualFold("SNSAction", t.Name.Local): 12962 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12963 if err := awsAwsquery_deserializeDocumentSNSAction(&sv.SNSAction, nodeDecoder); err != nil { 12964 return err 12965 } 12966 12967 case strings.EqualFold("StopAction", t.Name.Local): 12968 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12969 if err := awsAwsquery_deserializeDocumentStopAction(&sv.StopAction, nodeDecoder); err != nil { 12970 return err 12971 } 12972 12973 case strings.EqualFold("WorkmailAction", t.Name.Local): 12974 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12975 if err := awsAwsquery_deserializeDocumentWorkmailAction(&sv.WorkmailAction, nodeDecoder); err != nil { 12976 return err 12977 } 12978 12979 default: 12980 // Do nothing and ignore the unexpected tag element 12981 err = decoder.Decoder.Skip() 12982 if err != nil { 12983 return err 12984 } 12985 12986 } 12987 decoder = originalDecoder 12988 } 12989 *v = sv 12990 return nil 12991} 12992 12993func awsAwsquery_deserializeDocumentReceiptActionsList(v *[]types.ReceiptAction, decoder smithyxml.NodeDecoder) error { 12994 if v == nil { 12995 return fmt.Errorf("unexpected nil of type %T", v) 12996 } 12997 var sv []types.ReceiptAction 12998 if *v == nil { 12999 sv = make([]types.ReceiptAction, 0) 13000 } else { 13001 sv = *v 13002 } 13003 13004 originalDecoder := decoder 13005 for { 13006 t, done, err := decoder.Token() 13007 if err != nil { 13008 return err 13009 } 13010 if done { 13011 break 13012 } 13013 switch { 13014 case strings.EqualFold("member", t.Name.Local): 13015 var col types.ReceiptAction 13016 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13017 destAddr := &col 13018 if err := awsAwsquery_deserializeDocumentReceiptAction(&destAddr, nodeDecoder); err != nil { 13019 return err 13020 } 13021 col = *destAddr 13022 sv = append(sv, col) 13023 13024 default: 13025 err = decoder.Decoder.Skip() 13026 if err != nil { 13027 return err 13028 } 13029 13030 } 13031 decoder = originalDecoder 13032 } 13033 *v = sv 13034 return nil 13035} 13036 13037func awsAwsquery_deserializeDocumentReceiptActionsListUnwrapped(v *[]types.ReceiptAction, decoder smithyxml.NodeDecoder) error { 13038 var sv []types.ReceiptAction 13039 if *v == nil { 13040 sv = make([]types.ReceiptAction, 0) 13041 } else { 13042 sv = *v 13043 } 13044 13045 switch { 13046 default: 13047 var mv types.ReceiptAction 13048 t := decoder.StartEl 13049 _ = t 13050 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13051 destAddr := &mv 13052 if err := awsAwsquery_deserializeDocumentReceiptAction(&destAddr, nodeDecoder); err != nil { 13053 return err 13054 } 13055 mv = *destAddr 13056 sv = append(sv, mv) 13057 } 13058 *v = sv 13059 return nil 13060} 13061func awsAwsquery_deserializeDocumentReceiptFilter(v **types.ReceiptFilter, decoder smithyxml.NodeDecoder) error { 13062 if v == nil { 13063 return fmt.Errorf("unexpected nil of type %T", v) 13064 } 13065 var sv *types.ReceiptFilter 13066 if *v == nil { 13067 sv = &types.ReceiptFilter{} 13068 } else { 13069 sv = *v 13070 } 13071 13072 for { 13073 t, done, err := decoder.Token() 13074 if err != nil { 13075 return err 13076 } 13077 if done { 13078 break 13079 } 13080 originalDecoder := decoder 13081 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 13082 switch { 13083 case strings.EqualFold("IpFilter", t.Name.Local): 13084 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13085 if err := awsAwsquery_deserializeDocumentReceiptIpFilter(&sv.IpFilter, nodeDecoder); err != nil { 13086 return err 13087 } 13088 13089 case strings.EqualFold("Name", t.Name.Local): 13090 val, err := decoder.Value() 13091 if err != nil { 13092 return err 13093 } 13094 if val == nil { 13095 break 13096 } 13097 { 13098 xtv := string(val) 13099 sv.Name = ptr.String(xtv) 13100 } 13101 13102 default: 13103 // Do nothing and ignore the unexpected tag element 13104 err = decoder.Decoder.Skip() 13105 if err != nil { 13106 return err 13107 } 13108 13109 } 13110 decoder = originalDecoder 13111 } 13112 *v = sv 13113 return nil 13114} 13115 13116func awsAwsquery_deserializeDocumentReceiptFilterList(v *[]types.ReceiptFilter, decoder smithyxml.NodeDecoder) error { 13117 if v == nil { 13118 return fmt.Errorf("unexpected nil of type %T", v) 13119 } 13120 var sv []types.ReceiptFilter 13121 if *v == nil { 13122 sv = make([]types.ReceiptFilter, 0) 13123 } else { 13124 sv = *v 13125 } 13126 13127 originalDecoder := decoder 13128 for { 13129 t, done, err := decoder.Token() 13130 if err != nil { 13131 return err 13132 } 13133 if done { 13134 break 13135 } 13136 switch { 13137 case strings.EqualFold("member", t.Name.Local): 13138 var col types.ReceiptFilter 13139 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13140 destAddr := &col 13141 if err := awsAwsquery_deserializeDocumentReceiptFilter(&destAddr, nodeDecoder); err != nil { 13142 return err 13143 } 13144 col = *destAddr 13145 sv = append(sv, col) 13146 13147 default: 13148 err = decoder.Decoder.Skip() 13149 if err != nil { 13150 return err 13151 } 13152 13153 } 13154 decoder = originalDecoder 13155 } 13156 *v = sv 13157 return nil 13158} 13159 13160func awsAwsquery_deserializeDocumentReceiptFilterListUnwrapped(v *[]types.ReceiptFilter, decoder smithyxml.NodeDecoder) error { 13161 var sv []types.ReceiptFilter 13162 if *v == nil { 13163 sv = make([]types.ReceiptFilter, 0) 13164 } else { 13165 sv = *v 13166 } 13167 13168 switch { 13169 default: 13170 var mv types.ReceiptFilter 13171 t := decoder.StartEl 13172 _ = t 13173 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13174 destAddr := &mv 13175 if err := awsAwsquery_deserializeDocumentReceiptFilter(&destAddr, nodeDecoder); err != nil { 13176 return err 13177 } 13178 mv = *destAddr 13179 sv = append(sv, mv) 13180 } 13181 *v = sv 13182 return nil 13183} 13184func awsAwsquery_deserializeDocumentReceiptIpFilter(v **types.ReceiptIpFilter, decoder smithyxml.NodeDecoder) error { 13185 if v == nil { 13186 return fmt.Errorf("unexpected nil of type %T", v) 13187 } 13188 var sv *types.ReceiptIpFilter 13189 if *v == nil { 13190 sv = &types.ReceiptIpFilter{} 13191 } else { 13192 sv = *v 13193 } 13194 13195 for { 13196 t, done, err := decoder.Token() 13197 if err != nil { 13198 return err 13199 } 13200 if done { 13201 break 13202 } 13203 originalDecoder := decoder 13204 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 13205 switch { 13206 case strings.EqualFold("Cidr", t.Name.Local): 13207 val, err := decoder.Value() 13208 if err != nil { 13209 return err 13210 } 13211 if val == nil { 13212 break 13213 } 13214 { 13215 xtv := string(val) 13216 sv.Cidr = ptr.String(xtv) 13217 } 13218 13219 case strings.EqualFold("Policy", t.Name.Local): 13220 val, err := decoder.Value() 13221 if err != nil { 13222 return err 13223 } 13224 if val == nil { 13225 break 13226 } 13227 { 13228 xtv := string(val) 13229 sv.Policy = types.ReceiptFilterPolicy(xtv) 13230 } 13231 13232 default: 13233 // Do nothing and ignore the unexpected tag element 13234 err = decoder.Decoder.Skip() 13235 if err != nil { 13236 return err 13237 } 13238 13239 } 13240 decoder = originalDecoder 13241 } 13242 *v = sv 13243 return nil 13244} 13245 13246func awsAwsquery_deserializeDocumentReceiptRule(v **types.ReceiptRule, decoder smithyxml.NodeDecoder) error { 13247 if v == nil { 13248 return fmt.Errorf("unexpected nil of type %T", v) 13249 } 13250 var sv *types.ReceiptRule 13251 if *v == nil { 13252 sv = &types.ReceiptRule{} 13253 } else { 13254 sv = *v 13255 } 13256 13257 for { 13258 t, done, err := decoder.Token() 13259 if err != nil { 13260 return err 13261 } 13262 if done { 13263 break 13264 } 13265 originalDecoder := decoder 13266 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 13267 switch { 13268 case strings.EqualFold("Actions", t.Name.Local): 13269 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13270 if err := awsAwsquery_deserializeDocumentReceiptActionsList(&sv.Actions, nodeDecoder); err != nil { 13271 return err 13272 } 13273 13274 case strings.EqualFold("Enabled", t.Name.Local): 13275 val, err := decoder.Value() 13276 if err != nil { 13277 return err 13278 } 13279 if val == nil { 13280 break 13281 } 13282 { 13283 xtv, err := strconv.ParseBool(string(val)) 13284 if err != nil { 13285 return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val) 13286 } 13287 sv.Enabled = xtv 13288 } 13289 13290 case strings.EqualFold("Name", t.Name.Local): 13291 val, err := decoder.Value() 13292 if err != nil { 13293 return err 13294 } 13295 if val == nil { 13296 break 13297 } 13298 { 13299 xtv := string(val) 13300 sv.Name = ptr.String(xtv) 13301 } 13302 13303 case strings.EqualFold("Recipients", t.Name.Local): 13304 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13305 if err := awsAwsquery_deserializeDocumentRecipientsList(&sv.Recipients, nodeDecoder); err != nil { 13306 return err 13307 } 13308 13309 case strings.EqualFold("ScanEnabled", t.Name.Local): 13310 val, err := decoder.Value() 13311 if err != nil { 13312 return err 13313 } 13314 if val == nil { 13315 break 13316 } 13317 { 13318 xtv, err := strconv.ParseBool(string(val)) 13319 if err != nil { 13320 return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val) 13321 } 13322 sv.ScanEnabled = xtv 13323 } 13324 13325 case strings.EqualFold("TlsPolicy", t.Name.Local): 13326 val, err := decoder.Value() 13327 if err != nil { 13328 return err 13329 } 13330 if val == nil { 13331 break 13332 } 13333 { 13334 xtv := string(val) 13335 sv.TlsPolicy = types.TlsPolicy(xtv) 13336 } 13337 13338 default: 13339 // Do nothing and ignore the unexpected tag element 13340 err = decoder.Decoder.Skip() 13341 if err != nil { 13342 return err 13343 } 13344 13345 } 13346 decoder = originalDecoder 13347 } 13348 *v = sv 13349 return nil 13350} 13351 13352func awsAwsquery_deserializeDocumentReceiptRuleSetMetadata(v **types.ReceiptRuleSetMetadata, decoder smithyxml.NodeDecoder) error { 13353 if v == nil { 13354 return fmt.Errorf("unexpected nil of type %T", v) 13355 } 13356 var sv *types.ReceiptRuleSetMetadata 13357 if *v == nil { 13358 sv = &types.ReceiptRuleSetMetadata{} 13359 } else { 13360 sv = *v 13361 } 13362 13363 for { 13364 t, done, err := decoder.Token() 13365 if err != nil { 13366 return err 13367 } 13368 if done { 13369 break 13370 } 13371 originalDecoder := decoder 13372 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 13373 switch { 13374 case strings.EqualFold("CreatedTimestamp", t.Name.Local): 13375 val, err := decoder.Value() 13376 if err != nil { 13377 return err 13378 } 13379 if val == nil { 13380 break 13381 } 13382 { 13383 xtv := string(val) 13384 t, err := smithytime.ParseDateTime(xtv) 13385 if err != nil { 13386 return err 13387 } 13388 sv.CreatedTimestamp = ptr.Time(t) 13389 } 13390 13391 case strings.EqualFold("Name", t.Name.Local): 13392 val, err := decoder.Value() 13393 if err != nil { 13394 return err 13395 } 13396 if val == nil { 13397 break 13398 } 13399 { 13400 xtv := string(val) 13401 sv.Name = ptr.String(xtv) 13402 } 13403 13404 default: 13405 // Do nothing and ignore the unexpected tag element 13406 err = decoder.Decoder.Skip() 13407 if err != nil { 13408 return err 13409 } 13410 13411 } 13412 decoder = originalDecoder 13413 } 13414 *v = sv 13415 return nil 13416} 13417 13418func awsAwsquery_deserializeDocumentReceiptRuleSetsLists(v *[]types.ReceiptRuleSetMetadata, decoder smithyxml.NodeDecoder) error { 13419 if v == nil { 13420 return fmt.Errorf("unexpected nil of type %T", v) 13421 } 13422 var sv []types.ReceiptRuleSetMetadata 13423 if *v == nil { 13424 sv = make([]types.ReceiptRuleSetMetadata, 0) 13425 } else { 13426 sv = *v 13427 } 13428 13429 originalDecoder := decoder 13430 for { 13431 t, done, err := decoder.Token() 13432 if err != nil { 13433 return err 13434 } 13435 if done { 13436 break 13437 } 13438 switch { 13439 case strings.EqualFold("member", t.Name.Local): 13440 var col types.ReceiptRuleSetMetadata 13441 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13442 destAddr := &col 13443 if err := awsAwsquery_deserializeDocumentReceiptRuleSetMetadata(&destAddr, nodeDecoder); err != nil { 13444 return err 13445 } 13446 col = *destAddr 13447 sv = append(sv, col) 13448 13449 default: 13450 err = decoder.Decoder.Skip() 13451 if err != nil { 13452 return err 13453 } 13454 13455 } 13456 decoder = originalDecoder 13457 } 13458 *v = sv 13459 return nil 13460} 13461 13462func awsAwsquery_deserializeDocumentReceiptRuleSetsListsUnwrapped(v *[]types.ReceiptRuleSetMetadata, decoder smithyxml.NodeDecoder) error { 13463 var sv []types.ReceiptRuleSetMetadata 13464 if *v == nil { 13465 sv = make([]types.ReceiptRuleSetMetadata, 0) 13466 } else { 13467 sv = *v 13468 } 13469 13470 switch { 13471 default: 13472 var mv types.ReceiptRuleSetMetadata 13473 t := decoder.StartEl 13474 _ = t 13475 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13476 destAddr := &mv 13477 if err := awsAwsquery_deserializeDocumentReceiptRuleSetMetadata(&destAddr, nodeDecoder); err != nil { 13478 return err 13479 } 13480 mv = *destAddr 13481 sv = append(sv, mv) 13482 } 13483 *v = sv 13484 return nil 13485} 13486func awsAwsquery_deserializeDocumentReceiptRulesList(v *[]types.ReceiptRule, decoder smithyxml.NodeDecoder) error { 13487 if v == nil { 13488 return fmt.Errorf("unexpected nil of type %T", v) 13489 } 13490 var sv []types.ReceiptRule 13491 if *v == nil { 13492 sv = make([]types.ReceiptRule, 0) 13493 } else { 13494 sv = *v 13495 } 13496 13497 originalDecoder := decoder 13498 for { 13499 t, done, err := decoder.Token() 13500 if err != nil { 13501 return err 13502 } 13503 if done { 13504 break 13505 } 13506 switch { 13507 case strings.EqualFold("member", t.Name.Local): 13508 var col types.ReceiptRule 13509 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13510 destAddr := &col 13511 if err := awsAwsquery_deserializeDocumentReceiptRule(&destAddr, nodeDecoder); err != nil { 13512 return err 13513 } 13514 col = *destAddr 13515 sv = append(sv, col) 13516 13517 default: 13518 err = decoder.Decoder.Skip() 13519 if err != nil { 13520 return err 13521 } 13522 13523 } 13524 decoder = originalDecoder 13525 } 13526 *v = sv 13527 return nil 13528} 13529 13530func awsAwsquery_deserializeDocumentReceiptRulesListUnwrapped(v *[]types.ReceiptRule, decoder smithyxml.NodeDecoder) error { 13531 var sv []types.ReceiptRule 13532 if *v == nil { 13533 sv = make([]types.ReceiptRule, 0) 13534 } else { 13535 sv = *v 13536 } 13537 13538 switch { 13539 default: 13540 var mv types.ReceiptRule 13541 t := decoder.StartEl 13542 _ = t 13543 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13544 destAddr := &mv 13545 if err := awsAwsquery_deserializeDocumentReceiptRule(&destAddr, nodeDecoder); err != nil { 13546 return err 13547 } 13548 mv = *destAddr 13549 sv = append(sv, mv) 13550 } 13551 *v = sv 13552 return nil 13553} 13554func awsAwsquery_deserializeDocumentRecipientsList(v *[]string, decoder smithyxml.NodeDecoder) error { 13555 if v == nil { 13556 return fmt.Errorf("unexpected nil of type %T", v) 13557 } 13558 var sv []string 13559 if *v == nil { 13560 sv = make([]string, 0) 13561 } else { 13562 sv = *v 13563 } 13564 13565 originalDecoder := decoder 13566 for { 13567 t, done, err := decoder.Token() 13568 if err != nil { 13569 return err 13570 } 13571 if done { 13572 break 13573 } 13574 memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13575 decoder = memberDecoder 13576 switch { 13577 case strings.EqualFold("member", t.Name.Local): 13578 var col string 13579 val, err := decoder.Value() 13580 if err != nil { 13581 return err 13582 } 13583 if val == nil { 13584 break 13585 } 13586 { 13587 xtv := string(val) 13588 col = xtv 13589 } 13590 sv = append(sv, col) 13591 13592 default: 13593 err = decoder.Decoder.Skip() 13594 if err != nil { 13595 return err 13596 } 13597 13598 } 13599 decoder = originalDecoder 13600 } 13601 *v = sv 13602 return nil 13603} 13604 13605func awsAwsquery_deserializeDocumentRecipientsListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { 13606 var sv []string 13607 if *v == nil { 13608 sv = make([]string, 0) 13609 } else { 13610 sv = *v 13611 } 13612 13613 switch { 13614 default: 13615 var mv string 13616 t := decoder.StartEl 13617 _ = t 13618 val, err := decoder.Value() 13619 if err != nil { 13620 return err 13621 } 13622 if val == nil { 13623 break 13624 } 13625 { 13626 xtv := string(val) 13627 mv = xtv 13628 } 13629 sv = append(sv, mv) 13630 } 13631 *v = sv 13632 return nil 13633} 13634func awsAwsquery_deserializeDocumentReputationOptions(v **types.ReputationOptions, decoder smithyxml.NodeDecoder) error { 13635 if v == nil { 13636 return fmt.Errorf("unexpected nil of type %T", v) 13637 } 13638 var sv *types.ReputationOptions 13639 if *v == nil { 13640 sv = &types.ReputationOptions{} 13641 } else { 13642 sv = *v 13643 } 13644 13645 for { 13646 t, done, err := decoder.Token() 13647 if err != nil { 13648 return err 13649 } 13650 if done { 13651 break 13652 } 13653 originalDecoder := decoder 13654 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 13655 switch { 13656 case strings.EqualFold("LastFreshStart", t.Name.Local): 13657 val, err := decoder.Value() 13658 if err != nil { 13659 return err 13660 } 13661 if val == nil { 13662 break 13663 } 13664 { 13665 xtv := string(val) 13666 t, err := smithytime.ParseDateTime(xtv) 13667 if err != nil { 13668 return err 13669 } 13670 sv.LastFreshStart = ptr.Time(t) 13671 } 13672 13673 case strings.EqualFold("ReputationMetricsEnabled", t.Name.Local): 13674 val, err := decoder.Value() 13675 if err != nil { 13676 return err 13677 } 13678 if val == nil { 13679 break 13680 } 13681 { 13682 xtv, err := strconv.ParseBool(string(val)) 13683 if err != nil { 13684 return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val) 13685 } 13686 sv.ReputationMetricsEnabled = xtv 13687 } 13688 13689 case strings.EqualFold("SendingEnabled", t.Name.Local): 13690 val, err := decoder.Value() 13691 if err != nil { 13692 return err 13693 } 13694 if val == nil { 13695 break 13696 } 13697 { 13698 xtv, err := strconv.ParseBool(string(val)) 13699 if err != nil { 13700 return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val) 13701 } 13702 sv.SendingEnabled = xtv 13703 } 13704 13705 default: 13706 // Do nothing and ignore the unexpected tag element 13707 err = decoder.Decoder.Skip() 13708 if err != nil { 13709 return err 13710 } 13711 13712 } 13713 decoder = originalDecoder 13714 } 13715 *v = sv 13716 return nil 13717} 13718 13719func awsAwsquery_deserializeDocumentRuleDoesNotExistException(v **types.RuleDoesNotExistException, decoder smithyxml.NodeDecoder) error { 13720 if v == nil { 13721 return fmt.Errorf("unexpected nil of type %T", v) 13722 } 13723 var sv *types.RuleDoesNotExistException 13724 if *v == nil { 13725 sv = &types.RuleDoesNotExistException{} 13726 } else { 13727 sv = *v 13728 } 13729 13730 for { 13731 t, done, err := decoder.Token() 13732 if err != nil { 13733 return err 13734 } 13735 if done { 13736 break 13737 } 13738 originalDecoder := decoder 13739 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 13740 switch { 13741 case strings.EqualFold("message", t.Name.Local): 13742 val, err := decoder.Value() 13743 if err != nil { 13744 return err 13745 } 13746 if val == nil { 13747 break 13748 } 13749 { 13750 xtv := string(val) 13751 sv.Message = ptr.String(xtv) 13752 } 13753 13754 case strings.EqualFold("Name", t.Name.Local): 13755 val, err := decoder.Value() 13756 if err != nil { 13757 return err 13758 } 13759 if val == nil { 13760 break 13761 } 13762 { 13763 xtv := string(val) 13764 sv.Name = ptr.String(xtv) 13765 } 13766 13767 default: 13768 // Do nothing and ignore the unexpected tag element 13769 err = decoder.Decoder.Skip() 13770 if err != nil { 13771 return err 13772 } 13773 13774 } 13775 decoder = originalDecoder 13776 } 13777 *v = sv 13778 return nil 13779} 13780 13781func awsAwsquery_deserializeDocumentRuleSetDoesNotExistException(v **types.RuleSetDoesNotExistException, decoder smithyxml.NodeDecoder) error { 13782 if v == nil { 13783 return fmt.Errorf("unexpected nil of type %T", v) 13784 } 13785 var sv *types.RuleSetDoesNotExistException 13786 if *v == nil { 13787 sv = &types.RuleSetDoesNotExistException{} 13788 } else { 13789 sv = *v 13790 } 13791 13792 for { 13793 t, done, err := decoder.Token() 13794 if err != nil { 13795 return err 13796 } 13797 if done { 13798 break 13799 } 13800 originalDecoder := decoder 13801 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 13802 switch { 13803 case strings.EqualFold("message", t.Name.Local): 13804 val, err := decoder.Value() 13805 if err != nil { 13806 return err 13807 } 13808 if val == nil { 13809 break 13810 } 13811 { 13812 xtv := string(val) 13813 sv.Message = ptr.String(xtv) 13814 } 13815 13816 case strings.EqualFold("Name", t.Name.Local): 13817 val, err := decoder.Value() 13818 if err != nil { 13819 return err 13820 } 13821 if val == nil { 13822 break 13823 } 13824 { 13825 xtv := string(val) 13826 sv.Name = ptr.String(xtv) 13827 } 13828 13829 default: 13830 // Do nothing and ignore the unexpected tag element 13831 err = decoder.Decoder.Skip() 13832 if err != nil { 13833 return err 13834 } 13835 13836 } 13837 decoder = originalDecoder 13838 } 13839 *v = sv 13840 return nil 13841} 13842 13843func awsAwsquery_deserializeDocumentS3Action(v **types.S3Action, decoder smithyxml.NodeDecoder) error { 13844 if v == nil { 13845 return fmt.Errorf("unexpected nil of type %T", v) 13846 } 13847 var sv *types.S3Action 13848 if *v == nil { 13849 sv = &types.S3Action{} 13850 } else { 13851 sv = *v 13852 } 13853 13854 for { 13855 t, done, err := decoder.Token() 13856 if err != nil { 13857 return err 13858 } 13859 if done { 13860 break 13861 } 13862 originalDecoder := decoder 13863 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 13864 switch { 13865 case strings.EqualFold("BucketName", t.Name.Local): 13866 val, err := decoder.Value() 13867 if err != nil { 13868 return err 13869 } 13870 if val == nil { 13871 break 13872 } 13873 { 13874 xtv := string(val) 13875 sv.BucketName = ptr.String(xtv) 13876 } 13877 13878 case strings.EqualFold("KmsKeyArn", t.Name.Local): 13879 val, err := decoder.Value() 13880 if err != nil { 13881 return err 13882 } 13883 if val == nil { 13884 break 13885 } 13886 { 13887 xtv := string(val) 13888 sv.KmsKeyArn = ptr.String(xtv) 13889 } 13890 13891 case strings.EqualFold("ObjectKeyPrefix", t.Name.Local): 13892 val, err := decoder.Value() 13893 if err != nil { 13894 return err 13895 } 13896 if val == nil { 13897 break 13898 } 13899 { 13900 xtv := string(val) 13901 sv.ObjectKeyPrefix = ptr.String(xtv) 13902 } 13903 13904 case strings.EqualFold("TopicArn", t.Name.Local): 13905 val, err := decoder.Value() 13906 if err != nil { 13907 return err 13908 } 13909 if val == nil { 13910 break 13911 } 13912 { 13913 xtv := string(val) 13914 sv.TopicArn = ptr.String(xtv) 13915 } 13916 13917 default: 13918 // Do nothing and ignore the unexpected tag element 13919 err = decoder.Decoder.Skip() 13920 if err != nil { 13921 return err 13922 } 13923 13924 } 13925 decoder = originalDecoder 13926 } 13927 *v = sv 13928 return nil 13929} 13930 13931func awsAwsquery_deserializeDocumentSendDataPoint(v **types.SendDataPoint, decoder smithyxml.NodeDecoder) error { 13932 if v == nil { 13933 return fmt.Errorf("unexpected nil of type %T", v) 13934 } 13935 var sv *types.SendDataPoint 13936 if *v == nil { 13937 sv = &types.SendDataPoint{} 13938 } else { 13939 sv = *v 13940 } 13941 13942 for { 13943 t, done, err := decoder.Token() 13944 if err != nil { 13945 return err 13946 } 13947 if done { 13948 break 13949 } 13950 originalDecoder := decoder 13951 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 13952 switch { 13953 case strings.EqualFold("Bounces", t.Name.Local): 13954 val, err := decoder.Value() 13955 if err != nil { 13956 return err 13957 } 13958 if val == nil { 13959 break 13960 } 13961 { 13962 xtv := string(val) 13963 i64, err := strconv.ParseInt(xtv, 10, 64) 13964 if err != nil { 13965 return err 13966 } 13967 sv.Bounces = i64 13968 } 13969 13970 case strings.EqualFold("Complaints", t.Name.Local): 13971 val, err := decoder.Value() 13972 if err != nil { 13973 return err 13974 } 13975 if val == nil { 13976 break 13977 } 13978 { 13979 xtv := string(val) 13980 i64, err := strconv.ParseInt(xtv, 10, 64) 13981 if err != nil { 13982 return err 13983 } 13984 sv.Complaints = i64 13985 } 13986 13987 case strings.EqualFold("DeliveryAttempts", t.Name.Local): 13988 val, err := decoder.Value() 13989 if err != nil { 13990 return err 13991 } 13992 if val == nil { 13993 break 13994 } 13995 { 13996 xtv := string(val) 13997 i64, err := strconv.ParseInt(xtv, 10, 64) 13998 if err != nil { 13999 return err 14000 } 14001 sv.DeliveryAttempts = i64 14002 } 14003 14004 case strings.EqualFold("Rejects", t.Name.Local): 14005 val, err := decoder.Value() 14006 if err != nil { 14007 return err 14008 } 14009 if val == nil { 14010 break 14011 } 14012 { 14013 xtv := string(val) 14014 i64, err := strconv.ParseInt(xtv, 10, 64) 14015 if err != nil { 14016 return err 14017 } 14018 sv.Rejects = i64 14019 } 14020 14021 case strings.EqualFold("Timestamp", t.Name.Local): 14022 val, err := decoder.Value() 14023 if err != nil { 14024 return err 14025 } 14026 if val == nil { 14027 break 14028 } 14029 { 14030 xtv := string(val) 14031 t, err := smithytime.ParseDateTime(xtv) 14032 if err != nil { 14033 return err 14034 } 14035 sv.Timestamp = ptr.Time(t) 14036 } 14037 14038 default: 14039 // Do nothing and ignore the unexpected tag element 14040 err = decoder.Decoder.Skip() 14041 if err != nil { 14042 return err 14043 } 14044 14045 } 14046 decoder = originalDecoder 14047 } 14048 *v = sv 14049 return nil 14050} 14051 14052func awsAwsquery_deserializeDocumentSendDataPointList(v *[]types.SendDataPoint, decoder smithyxml.NodeDecoder) error { 14053 if v == nil { 14054 return fmt.Errorf("unexpected nil of type %T", v) 14055 } 14056 var sv []types.SendDataPoint 14057 if *v == nil { 14058 sv = make([]types.SendDataPoint, 0) 14059 } else { 14060 sv = *v 14061 } 14062 14063 originalDecoder := decoder 14064 for { 14065 t, done, err := decoder.Token() 14066 if err != nil { 14067 return err 14068 } 14069 if done { 14070 break 14071 } 14072 switch { 14073 case strings.EqualFold("member", t.Name.Local): 14074 var col types.SendDataPoint 14075 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14076 destAddr := &col 14077 if err := awsAwsquery_deserializeDocumentSendDataPoint(&destAddr, nodeDecoder); err != nil { 14078 return err 14079 } 14080 col = *destAddr 14081 sv = append(sv, col) 14082 14083 default: 14084 err = decoder.Decoder.Skip() 14085 if err != nil { 14086 return err 14087 } 14088 14089 } 14090 decoder = originalDecoder 14091 } 14092 *v = sv 14093 return nil 14094} 14095 14096func awsAwsquery_deserializeDocumentSendDataPointListUnwrapped(v *[]types.SendDataPoint, decoder smithyxml.NodeDecoder) error { 14097 var sv []types.SendDataPoint 14098 if *v == nil { 14099 sv = make([]types.SendDataPoint, 0) 14100 } else { 14101 sv = *v 14102 } 14103 14104 switch { 14105 default: 14106 var mv types.SendDataPoint 14107 t := decoder.StartEl 14108 _ = t 14109 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14110 destAddr := &mv 14111 if err := awsAwsquery_deserializeDocumentSendDataPoint(&destAddr, nodeDecoder); err != nil { 14112 return err 14113 } 14114 mv = *destAddr 14115 sv = append(sv, mv) 14116 } 14117 *v = sv 14118 return nil 14119} 14120func awsAwsquery_deserializeDocumentSNSAction(v **types.SNSAction, decoder smithyxml.NodeDecoder) error { 14121 if v == nil { 14122 return fmt.Errorf("unexpected nil of type %T", v) 14123 } 14124 var sv *types.SNSAction 14125 if *v == nil { 14126 sv = &types.SNSAction{} 14127 } else { 14128 sv = *v 14129 } 14130 14131 for { 14132 t, done, err := decoder.Token() 14133 if err != nil { 14134 return err 14135 } 14136 if done { 14137 break 14138 } 14139 originalDecoder := decoder 14140 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14141 switch { 14142 case strings.EqualFold("Encoding", t.Name.Local): 14143 val, err := decoder.Value() 14144 if err != nil { 14145 return err 14146 } 14147 if val == nil { 14148 break 14149 } 14150 { 14151 xtv := string(val) 14152 sv.Encoding = types.SNSActionEncoding(xtv) 14153 } 14154 14155 case strings.EqualFold("TopicArn", t.Name.Local): 14156 val, err := decoder.Value() 14157 if err != nil { 14158 return err 14159 } 14160 if val == nil { 14161 break 14162 } 14163 { 14164 xtv := string(val) 14165 sv.TopicArn = ptr.String(xtv) 14166 } 14167 14168 default: 14169 // Do nothing and ignore the unexpected tag element 14170 err = decoder.Decoder.Skip() 14171 if err != nil { 14172 return err 14173 } 14174 14175 } 14176 decoder = originalDecoder 14177 } 14178 *v = sv 14179 return nil 14180} 14181 14182func awsAwsquery_deserializeDocumentSNSDestination(v **types.SNSDestination, decoder smithyxml.NodeDecoder) error { 14183 if v == nil { 14184 return fmt.Errorf("unexpected nil of type %T", v) 14185 } 14186 var sv *types.SNSDestination 14187 if *v == nil { 14188 sv = &types.SNSDestination{} 14189 } else { 14190 sv = *v 14191 } 14192 14193 for { 14194 t, done, err := decoder.Token() 14195 if err != nil { 14196 return err 14197 } 14198 if done { 14199 break 14200 } 14201 originalDecoder := decoder 14202 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14203 switch { 14204 case strings.EqualFold("TopicARN", t.Name.Local): 14205 val, err := decoder.Value() 14206 if err != nil { 14207 return err 14208 } 14209 if val == nil { 14210 break 14211 } 14212 { 14213 xtv := string(val) 14214 sv.TopicARN = ptr.String(xtv) 14215 } 14216 14217 default: 14218 // Do nothing and ignore the unexpected tag element 14219 err = decoder.Decoder.Skip() 14220 if err != nil { 14221 return err 14222 } 14223 14224 } 14225 decoder = originalDecoder 14226 } 14227 *v = sv 14228 return nil 14229} 14230 14231func awsAwsquery_deserializeDocumentStopAction(v **types.StopAction, decoder smithyxml.NodeDecoder) error { 14232 if v == nil { 14233 return fmt.Errorf("unexpected nil of type %T", v) 14234 } 14235 var sv *types.StopAction 14236 if *v == nil { 14237 sv = &types.StopAction{} 14238 } else { 14239 sv = *v 14240 } 14241 14242 for { 14243 t, done, err := decoder.Token() 14244 if err != nil { 14245 return err 14246 } 14247 if done { 14248 break 14249 } 14250 originalDecoder := decoder 14251 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14252 switch { 14253 case strings.EqualFold("Scope", t.Name.Local): 14254 val, err := decoder.Value() 14255 if err != nil { 14256 return err 14257 } 14258 if val == nil { 14259 break 14260 } 14261 { 14262 xtv := string(val) 14263 sv.Scope = types.StopScope(xtv) 14264 } 14265 14266 case strings.EqualFold("TopicArn", t.Name.Local): 14267 val, err := decoder.Value() 14268 if err != nil { 14269 return err 14270 } 14271 if val == nil { 14272 break 14273 } 14274 { 14275 xtv := string(val) 14276 sv.TopicArn = ptr.String(xtv) 14277 } 14278 14279 default: 14280 // Do nothing and ignore the unexpected tag element 14281 err = decoder.Decoder.Skip() 14282 if err != nil { 14283 return err 14284 } 14285 14286 } 14287 decoder = originalDecoder 14288 } 14289 *v = sv 14290 return nil 14291} 14292 14293func awsAwsquery_deserializeDocumentTemplate(v **types.Template, decoder smithyxml.NodeDecoder) error { 14294 if v == nil { 14295 return fmt.Errorf("unexpected nil of type %T", v) 14296 } 14297 var sv *types.Template 14298 if *v == nil { 14299 sv = &types.Template{} 14300 } else { 14301 sv = *v 14302 } 14303 14304 for { 14305 t, done, err := decoder.Token() 14306 if err != nil { 14307 return err 14308 } 14309 if done { 14310 break 14311 } 14312 originalDecoder := decoder 14313 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14314 switch { 14315 case strings.EqualFold("HtmlPart", t.Name.Local): 14316 val, err := decoder.Value() 14317 if err != nil { 14318 return err 14319 } 14320 if val == nil { 14321 break 14322 } 14323 { 14324 xtv := string(val) 14325 sv.HtmlPart = ptr.String(xtv) 14326 } 14327 14328 case strings.EqualFold("SubjectPart", t.Name.Local): 14329 val, err := decoder.Value() 14330 if err != nil { 14331 return err 14332 } 14333 if val == nil { 14334 break 14335 } 14336 { 14337 xtv := string(val) 14338 sv.SubjectPart = ptr.String(xtv) 14339 } 14340 14341 case strings.EqualFold("TemplateName", t.Name.Local): 14342 val, err := decoder.Value() 14343 if err != nil { 14344 return err 14345 } 14346 if val == nil { 14347 break 14348 } 14349 { 14350 xtv := string(val) 14351 sv.TemplateName = ptr.String(xtv) 14352 } 14353 14354 case strings.EqualFold("TextPart", t.Name.Local): 14355 val, err := decoder.Value() 14356 if err != nil { 14357 return err 14358 } 14359 if val == nil { 14360 break 14361 } 14362 { 14363 xtv := string(val) 14364 sv.TextPart = ptr.String(xtv) 14365 } 14366 14367 default: 14368 // Do nothing and ignore the unexpected tag element 14369 err = decoder.Decoder.Skip() 14370 if err != nil { 14371 return err 14372 } 14373 14374 } 14375 decoder = originalDecoder 14376 } 14377 *v = sv 14378 return nil 14379} 14380 14381func awsAwsquery_deserializeDocumentTemplateDoesNotExistException(v **types.TemplateDoesNotExistException, decoder smithyxml.NodeDecoder) error { 14382 if v == nil { 14383 return fmt.Errorf("unexpected nil of type %T", v) 14384 } 14385 var sv *types.TemplateDoesNotExistException 14386 if *v == nil { 14387 sv = &types.TemplateDoesNotExistException{} 14388 } else { 14389 sv = *v 14390 } 14391 14392 for { 14393 t, done, err := decoder.Token() 14394 if err != nil { 14395 return err 14396 } 14397 if done { 14398 break 14399 } 14400 originalDecoder := decoder 14401 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14402 switch { 14403 case strings.EqualFold("message", t.Name.Local): 14404 val, err := decoder.Value() 14405 if err != nil { 14406 return err 14407 } 14408 if val == nil { 14409 break 14410 } 14411 { 14412 xtv := string(val) 14413 sv.Message = ptr.String(xtv) 14414 } 14415 14416 case strings.EqualFold("TemplateName", t.Name.Local): 14417 val, err := decoder.Value() 14418 if err != nil { 14419 return err 14420 } 14421 if val == nil { 14422 break 14423 } 14424 { 14425 xtv := string(val) 14426 sv.TemplateName = ptr.String(xtv) 14427 } 14428 14429 default: 14430 // Do nothing and ignore the unexpected tag element 14431 err = decoder.Decoder.Skip() 14432 if err != nil { 14433 return err 14434 } 14435 14436 } 14437 decoder = originalDecoder 14438 } 14439 *v = sv 14440 return nil 14441} 14442 14443func awsAwsquery_deserializeDocumentTemplateMetadata(v **types.TemplateMetadata, decoder smithyxml.NodeDecoder) error { 14444 if v == nil { 14445 return fmt.Errorf("unexpected nil of type %T", v) 14446 } 14447 var sv *types.TemplateMetadata 14448 if *v == nil { 14449 sv = &types.TemplateMetadata{} 14450 } else { 14451 sv = *v 14452 } 14453 14454 for { 14455 t, done, err := decoder.Token() 14456 if err != nil { 14457 return err 14458 } 14459 if done { 14460 break 14461 } 14462 originalDecoder := decoder 14463 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14464 switch { 14465 case strings.EqualFold("CreatedTimestamp", t.Name.Local): 14466 val, err := decoder.Value() 14467 if err != nil { 14468 return err 14469 } 14470 if val == nil { 14471 break 14472 } 14473 { 14474 xtv := string(val) 14475 t, err := smithytime.ParseDateTime(xtv) 14476 if err != nil { 14477 return err 14478 } 14479 sv.CreatedTimestamp = ptr.Time(t) 14480 } 14481 14482 case strings.EqualFold("Name", t.Name.Local): 14483 val, err := decoder.Value() 14484 if err != nil { 14485 return err 14486 } 14487 if val == nil { 14488 break 14489 } 14490 { 14491 xtv := string(val) 14492 sv.Name = ptr.String(xtv) 14493 } 14494 14495 default: 14496 // Do nothing and ignore the unexpected tag element 14497 err = decoder.Decoder.Skip() 14498 if err != nil { 14499 return err 14500 } 14501 14502 } 14503 decoder = originalDecoder 14504 } 14505 *v = sv 14506 return nil 14507} 14508 14509func awsAwsquery_deserializeDocumentTemplateMetadataList(v *[]types.TemplateMetadata, decoder smithyxml.NodeDecoder) error { 14510 if v == nil { 14511 return fmt.Errorf("unexpected nil of type %T", v) 14512 } 14513 var sv []types.TemplateMetadata 14514 if *v == nil { 14515 sv = make([]types.TemplateMetadata, 0) 14516 } else { 14517 sv = *v 14518 } 14519 14520 originalDecoder := decoder 14521 for { 14522 t, done, err := decoder.Token() 14523 if err != nil { 14524 return err 14525 } 14526 if done { 14527 break 14528 } 14529 switch { 14530 case strings.EqualFold("member", t.Name.Local): 14531 var col types.TemplateMetadata 14532 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14533 destAddr := &col 14534 if err := awsAwsquery_deserializeDocumentTemplateMetadata(&destAddr, nodeDecoder); err != nil { 14535 return err 14536 } 14537 col = *destAddr 14538 sv = append(sv, col) 14539 14540 default: 14541 err = decoder.Decoder.Skip() 14542 if err != nil { 14543 return err 14544 } 14545 14546 } 14547 decoder = originalDecoder 14548 } 14549 *v = sv 14550 return nil 14551} 14552 14553func awsAwsquery_deserializeDocumentTemplateMetadataListUnwrapped(v *[]types.TemplateMetadata, decoder smithyxml.NodeDecoder) error { 14554 var sv []types.TemplateMetadata 14555 if *v == nil { 14556 sv = make([]types.TemplateMetadata, 0) 14557 } else { 14558 sv = *v 14559 } 14560 14561 switch { 14562 default: 14563 var mv types.TemplateMetadata 14564 t := decoder.StartEl 14565 _ = t 14566 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14567 destAddr := &mv 14568 if err := awsAwsquery_deserializeDocumentTemplateMetadata(&destAddr, nodeDecoder); err != nil { 14569 return err 14570 } 14571 mv = *destAddr 14572 sv = append(sv, mv) 14573 } 14574 *v = sv 14575 return nil 14576} 14577func awsAwsquery_deserializeDocumentTrackingOptions(v **types.TrackingOptions, decoder smithyxml.NodeDecoder) error { 14578 if v == nil { 14579 return fmt.Errorf("unexpected nil of type %T", v) 14580 } 14581 var sv *types.TrackingOptions 14582 if *v == nil { 14583 sv = &types.TrackingOptions{} 14584 } else { 14585 sv = *v 14586 } 14587 14588 for { 14589 t, done, err := decoder.Token() 14590 if err != nil { 14591 return err 14592 } 14593 if done { 14594 break 14595 } 14596 originalDecoder := decoder 14597 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14598 switch { 14599 case strings.EqualFold("CustomRedirectDomain", t.Name.Local): 14600 val, err := decoder.Value() 14601 if err != nil { 14602 return err 14603 } 14604 if val == nil { 14605 break 14606 } 14607 { 14608 xtv := string(val) 14609 sv.CustomRedirectDomain = ptr.String(xtv) 14610 } 14611 14612 default: 14613 // Do nothing and ignore the unexpected tag element 14614 err = decoder.Decoder.Skip() 14615 if err != nil { 14616 return err 14617 } 14618 14619 } 14620 decoder = originalDecoder 14621 } 14622 *v = sv 14623 return nil 14624} 14625 14626func awsAwsquery_deserializeDocumentTrackingOptionsAlreadyExistsException(v **types.TrackingOptionsAlreadyExistsException, decoder smithyxml.NodeDecoder) error { 14627 if v == nil { 14628 return fmt.Errorf("unexpected nil of type %T", v) 14629 } 14630 var sv *types.TrackingOptionsAlreadyExistsException 14631 if *v == nil { 14632 sv = &types.TrackingOptionsAlreadyExistsException{} 14633 } else { 14634 sv = *v 14635 } 14636 14637 for { 14638 t, done, err := decoder.Token() 14639 if err != nil { 14640 return err 14641 } 14642 if done { 14643 break 14644 } 14645 originalDecoder := decoder 14646 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14647 switch { 14648 case strings.EqualFold("ConfigurationSetName", t.Name.Local): 14649 val, err := decoder.Value() 14650 if err != nil { 14651 return err 14652 } 14653 if val == nil { 14654 break 14655 } 14656 { 14657 xtv := string(val) 14658 sv.ConfigurationSetName = ptr.String(xtv) 14659 } 14660 14661 case strings.EqualFold("message", t.Name.Local): 14662 val, err := decoder.Value() 14663 if err != nil { 14664 return err 14665 } 14666 if val == nil { 14667 break 14668 } 14669 { 14670 xtv := string(val) 14671 sv.Message = ptr.String(xtv) 14672 } 14673 14674 default: 14675 // Do nothing and ignore the unexpected tag element 14676 err = decoder.Decoder.Skip() 14677 if err != nil { 14678 return err 14679 } 14680 14681 } 14682 decoder = originalDecoder 14683 } 14684 *v = sv 14685 return nil 14686} 14687 14688func awsAwsquery_deserializeDocumentTrackingOptionsDoesNotExistException(v **types.TrackingOptionsDoesNotExistException, decoder smithyxml.NodeDecoder) error { 14689 if v == nil { 14690 return fmt.Errorf("unexpected nil of type %T", v) 14691 } 14692 var sv *types.TrackingOptionsDoesNotExistException 14693 if *v == nil { 14694 sv = &types.TrackingOptionsDoesNotExistException{} 14695 } else { 14696 sv = *v 14697 } 14698 14699 for { 14700 t, done, err := decoder.Token() 14701 if err != nil { 14702 return err 14703 } 14704 if done { 14705 break 14706 } 14707 originalDecoder := decoder 14708 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14709 switch { 14710 case strings.EqualFold("ConfigurationSetName", t.Name.Local): 14711 val, err := decoder.Value() 14712 if err != nil { 14713 return err 14714 } 14715 if val == nil { 14716 break 14717 } 14718 { 14719 xtv := string(val) 14720 sv.ConfigurationSetName = ptr.String(xtv) 14721 } 14722 14723 case strings.EqualFold("message", t.Name.Local): 14724 val, err := decoder.Value() 14725 if err != nil { 14726 return err 14727 } 14728 if val == nil { 14729 break 14730 } 14731 { 14732 xtv := string(val) 14733 sv.Message = ptr.String(xtv) 14734 } 14735 14736 default: 14737 // Do nothing and ignore the unexpected tag element 14738 err = decoder.Decoder.Skip() 14739 if err != nil { 14740 return err 14741 } 14742 14743 } 14744 decoder = originalDecoder 14745 } 14746 *v = sv 14747 return nil 14748} 14749 14750func awsAwsquery_deserializeDocumentVerificationAttributes(v *map[string]types.IdentityVerificationAttributes, decoder smithyxml.NodeDecoder) error { 14751 if v == nil { 14752 return fmt.Errorf("unexpected nil of type %T", v) 14753 } 14754 var sv map[string]types.IdentityVerificationAttributes 14755 if *v == nil { 14756 sv = make(map[string]types.IdentityVerificationAttributes, 0) 14757 } else { 14758 sv = *v 14759 } 14760 14761 for { 14762 t, done, err := decoder.Token() 14763 if err != nil { 14764 return err 14765 } 14766 if done { 14767 break 14768 } 14769 switch { 14770 case strings.EqualFold("entry", t.Name.Local): 14771 entryDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14772 if err := awsAwsquery_deserializeDocumentVerificationAttributesUnwrapped(&sv, entryDecoder); err != nil { 14773 return err 14774 } 14775 14776 default: 14777 err = decoder.Decoder.Skip() 14778 if err != nil { 14779 return err 14780 } 14781 14782 } 14783 } 14784 *v = sv 14785 return nil 14786} 14787 14788func awsAwsquery_deserializeDocumentVerificationAttributesUnwrapped(v *map[string]types.IdentityVerificationAttributes, decoder smithyxml.NodeDecoder) error { 14789 var sv map[string]types.IdentityVerificationAttributes 14790 if *v == nil { 14791 sv = make(map[string]types.IdentityVerificationAttributes, 0) 14792 } else { 14793 sv = *v 14794 } 14795 14796 var ek string 14797 var ev types.IdentityVerificationAttributes 14798 for { 14799 t, done, err := decoder.Token() 14800 if err != nil { 14801 return err 14802 } 14803 if done { 14804 sv[ek] = ev 14805 break 14806 } 14807 originalDecoder := decoder 14808 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14809 switch { 14810 case strings.EqualFold("key", t.Name.Local): 14811 val, err := decoder.Value() 14812 if err != nil { 14813 return err 14814 } 14815 if val == nil { 14816 break 14817 } 14818 { 14819 xtv := string(val) 14820 ek = xtv 14821 } 14822 14823 case strings.EqualFold("value", t.Name.Local): 14824 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14825 mapVar := ev 14826 destAddr := &mapVar 14827 if err := awsAwsquery_deserializeDocumentIdentityVerificationAttributes(&destAddr, nodeDecoder); err != nil { 14828 return err 14829 } 14830 ev = *destAddr 14831 14832 default: 14833 err = decoder.Decoder.Skip() 14834 if err != nil { 14835 return err 14836 } 14837 14838 } 14839 decoder = originalDecoder 14840 } 14841 *v = sv 14842 return nil 14843} 14844func awsAwsquery_deserializeDocumentVerificationTokenList(v *[]string, decoder smithyxml.NodeDecoder) error { 14845 if v == nil { 14846 return fmt.Errorf("unexpected nil of type %T", v) 14847 } 14848 var sv []string 14849 if *v == nil { 14850 sv = make([]string, 0) 14851 } else { 14852 sv = *v 14853 } 14854 14855 originalDecoder := decoder 14856 for { 14857 t, done, err := decoder.Token() 14858 if err != nil { 14859 return err 14860 } 14861 if done { 14862 break 14863 } 14864 memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14865 decoder = memberDecoder 14866 switch { 14867 case strings.EqualFold("member", t.Name.Local): 14868 var col string 14869 val, err := decoder.Value() 14870 if err != nil { 14871 return err 14872 } 14873 if val == nil { 14874 break 14875 } 14876 { 14877 xtv := string(val) 14878 col = xtv 14879 } 14880 sv = append(sv, col) 14881 14882 default: 14883 err = decoder.Decoder.Skip() 14884 if err != nil { 14885 return err 14886 } 14887 14888 } 14889 decoder = originalDecoder 14890 } 14891 *v = sv 14892 return nil 14893} 14894 14895func awsAwsquery_deserializeDocumentVerificationTokenListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { 14896 var sv []string 14897 if *v == nil { 14898 sv = make([]string, 0) 14899 } else { 14900 sv = *v 14901 } 14902 14903 switch { 14904 default: 14905 var mv string 14906 t := decoder.StartEl 14907 _ = t 14908 val, err := decoder.Value() 14909 if err != nil { 14910 return err 14911 } 14912 if val == nil { 14913 break 14914 } 14915 { 14916 xtv := string(val) 14917 mv = xtv 14918 } 14919 sv = append(sv, mv) 14920 } 14921 *v = sv 14922 return nil 14923} 14924func awsAwsquery_deserializeDocumentWorkmailAction(v **types.WorkmailAction, decoder smithyxml.NodeDecoder) error { 14925 if v == nil { 14926 return fmt.Errorf("unexpected nil of type %T", v) 14927 } 14928 var sv *types.WorkmailAction 14929 if *v == nil { 14930 sv = &types.WorkmailAction{} 14931 } else { 14932 sv = *v 14933 } 14934 14935 for { 14936 t, done, err := decoder.Token() 14937 if err != nil { 14938 return err 14939 } 14940 if done { 14941 break 14942 } 14943 originalDecoder := decoder 14944 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14945 switch { 14946 case strings.EqualFold("OrganizationArn", t.Name.Local): 14947 val, err := decoder.Value() 14948 if err != nil { 14949 return err 14950 } 14951 if val == nil { 14952 break 14953 } 14954 { 14955 xtv := string(val) 14956 sv.OrganizationArn = ptr.String(xtv) 14957 } 14958 14959 case strings.EqualFold("TopicArn", t.Name.Local): 14960 val, err := decoder.Value() 14961 if err != nil { 14962 return err 14963 } 14964 if val == nil { 14965 break 14966 } 14967 { 14968 xtv := string(val) 14969 sv.TopicArn = ptr.String(xtv) 14970 } 14971 14972 default: 14973 // Do nothing and ignore the unexpected tag element 14974 err = decoder.Decoder.Skip() 14975 if err != nil { 14976 return err 14977 } 14978 14979 } 14980 decoder = originalDecoder 14981 } 14982 *v = sv 14983 return nil 14984} 14985 14986func awsAwsquery_deserializeOpDocumentCloneReceiptRuleSetOutput(v **CloneReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error { 14987 if v == nil { 14988 return fmt.Errorf("unexpected nil of type %T", v) 14989 } 14990 var sv *CloneReceiptRuleSetOutput 14991 if *v == nil { 14992 sv = &CloneReceiptRuleSetOutput{} 14993 } else { 14994 sv = *v 14995 } 14996 14997 for { 14998 t, done, err := decoder.Token() 14999 if err != nil { 15000 return err 15001 } 15002 if done { 15003 break 15004 } 15005 originalDecoder := decoder 15006 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15007 switch { 15008 default: 15009 // Do nothing and ignore the unexpected tag element 15010 err = decoder.Decoder.Skip() 15011 if err != nil { 15012 return err 15013 } 15014 15015 } 15016 decoder = originalDecoder 15017 } 15018 *v = sv 15019 return nil 15020} 15021 15022func awsAwsquery_deserializeOpDocumentCreateConfigurationSetEventDestinationOutput(v **CreateConfigurationSetEventDestinationOutput, decoder smithyxml.NodeDecoder) error { 15023 if v == nil { 15024 return fmt.Errorf("unexpected nil of type %T", v) 15025 } 15026 var sv *CreateConfigurationSetEventDestinationOutput 15027 if *v == nil { 15028 sv = &CreateConfigurationSetEventDestinationOutput{} 15029 } else { 15030 sv = *v 15031 } 15032 15033 for { 15034 t, done, err := decoder.Token() 15035 if err != nil { 15036 return err 15037 } 15038 if done { 15039 break 15040 } 15041 originalDecoder := decoder 15042 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15043 switch { 15044 default: 15045 // Do nothing and ignore the unexpected tag element 15046 err = decoder.Decoder.Skip() 15047 if err != nil { 15048 return err 15049 } 15050 15051 } 15052 decoder = originalDecoder 15053 } 15054 *v = sv 15055 return nil 15056} 15057 15058func awsAwsquery_deserializeOpDocumentCreateConfigurationSetOutput(v **CreateConfigurationSetOutput, decoder smithyxml.NodeDecoder) error { 15059 if v == nil { 15060 return fmt.Errorf("unexpected nil of type %T", v) 15061 } 15062 var sv *CreateConfigurationSetOutput 15063 if *v == nil { 15064 sv = &CreateConfigurationSetOutput{} 15065 } else { 15066 sv = *v 15067 } 15068 15069 for { 15070 t, done, err := decoder.Token() 15071 if err != nil { 15072 return err 15073 } 15074 if done { 15075 break 15076 } 15077 originalDecoder := decoder 15078 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15079 switch { 15080 default: 15081 // Do nothing and ignore the unexpected tag element 15082 err = decoder.Decoder.Skip() 15083 if err != nil { 15084 return err 15085 } 15086 15087 } 15088 decoder = originalDecoder 15089 } 15090 *v = sv 15091 return nil 15092} 15093 15094func awsAwsquery_deserializeOpDocumentCreateConfigurationSetTrackingOptionsOutput(v **CreateConfigurationSetTrackingOptionsOutput, decoder smithyxml.NodeDecoder) error { 15095 if v == nil { 15096 return fmt.Errorf("unexpected nil of type %T", v) 15097 } 15098 var sv *CreateConfigurationSetTrackingOptionsOutput 15099 if *v == nil { 15100 sv = &CreateConfigurationSetTrackingOptionsOutput{} 15101 } else { 15102 sv = *v 15103 } 15104 15105 for { 15106 t, done, err := decoder.Token() 15107 if err != nil { 15108 return err 15109 } 15110 if done { 15111 break 15112 } 15113 originalDecoder := decoder 15114 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15115 switch { 15116 default: 15117 // Do nothing and ignore the unexpected tag element 15118 err = decoder.Decoder.Skip() 15119 if err != nil { 15120 return err 15121 } 15122 15123 } 15124 decoder = originalDecoder 15125 } 15126 *v = sv 15127 return nil 15128} 15129 15130func awsAwsquery_deserializeOpDocumentCreateReceiptFilterOutput(v **CreateReceiptFilterOutput, decoder smithyxml.NodeDecoder) error { 15131 if v == nil { 15132 return fmt.Errorf("unexpected nil of type %T", v) 15133 } 15134 var sv *CreateReceiptFilterOutput 15135 if *v == nil { 15136 sv = &CreateReceiptFilterOutput{} 15137 } else { 15138 sv = *v 15139 } 15140 15141 for { 15142 t, done, err := decoder.Token() 15143 if err != nil { 15144 return err 15145 } 15146 if done { 15147 break 15148 } 15149 originalDecoder := decoder 15150 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15151 switch { 15152 default: 15153 // Do nothing and ignore the unexpected tag element 15154 err = decoder.Decoder.Skip() 15155 if err != nil { 15156 return err 15157 } 15158 15159 } 15160 decoder = originalDecoder 15161 } 15162 *v = sv 15163 return nil 15164} 15165 15166func awsAwsquery_deserializeOpDocumentCreateReceiptRuleOutput(v **CreateReceiptRuleOutput, decoder smithyxml.NodeDecoder) error { 15167 if v == nil { 15168 return fmt.Errorf("unexpected nil of type %T", v) 15169 } 15170 var sv *CreateReceiptRuleOutput 15171 if *v == nil { 15172 sv = &CreateReceiptRuleOutput{} 15173 } else { 15174 sv = *v 15175 } 15176 15177 for { 15178 t, done, err := decoder.Token() 15179 if err != nil { 15180 return err 15181 } 15182 if done { 15183 break 15184 } 15185 originalDecoder := decoder 15186 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15187 switch { 15188 default: 15189 // Do nothing and ignore the unexpected tag element 15190 err = decoder.Decoder.Skip() 15191 if err != nil { 15192 return err 15193 } 15194 15195 } 15196 decoder = originalDecoder 15197 } 15198 *v = sv 15199 return nil 15200} 15201 15202func awsAwsquery_deserializeOpDocumentCreateReceiptRuleSetOutput(v **CreateReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error { 15203 if v == nil { 15204 return fmt.Errorf("unexpected nil of type %T", v) 15205 } 15206 var sv *CreateReceiptRuleSetOutput 15207 if *v == nil { 15208 sv = &CreateReceiptRuleSetOutput{} 15209 } else { 15210 sv = *v 15211 } 15212 15213 for { 15214 t, done, err := decoder.Token() 15215 if err != nil { 15216 return err 15217 } 15218 if done { 15219 break 15220 } 15221 originalDecoder := decoder 15222 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15223 switch { 15224 default: 15225 // Do nothing and ignore the unexpected tag element 15226 err = decoder.Decoder.Skip() 15227 if err != nil { 15228 return err 15229 } 15230 15231 } 15232 decoder = originalDecoder 15233 } 15234 *v = sv 15235 return nil 15236} 15237 15238func awsAwsquery_deserializeOpDocumentCreateTemplateOutput(v **CreateTemplateOutput, decoder smithyxml.NodeDecoder) error { 15239 if v == nil { 15240 return fmt.Errorf("unexpected nil of type %T", v) 15241 } 15242 var sv *CreateTemplateOutput 15243 if *v == nil { 15244 sv = &CreateTemplateOutput{} 15245 } else { 15246 sv = *v 15247 } 15248 15249 for { 15250 t, done, err := decoder.Token() 15251 if err != nil { 15252 return err 15253 } 15254 if done { 15255 break 15256 } 15257 originalDecoder := decoder 15258 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15259 switch { 15260 default: 15261 // Do nothing and ignore the unexpected tag element 15262 err = decoder.Decoder.Skip() 15263 if err != nil { 15264 return err 15265 } 15266 15267 } 15268 decoder = originalDecoder 15269 } 15270 *v = sv 15271 return nil 15272} 15273 15274func awsAwsquery_deserializeOpDocumentDeleteConfigurationSetEventDestinationOutput(v **DeleteConfigurationSetEventDestinationOutput, decoder smithyxml.NodeDecoder) error { 15275 if v == nil { 15276 return fmt.Errorf("unexpected nil of type %T", v) 15277 } 15278 var sv *DeleteConfigurationSetEventDestinationOutput 15279 if *v == nil { 15280 sv = &DeleteConfigurationSetEventDestinationOutput{} 15281 } else { 15282 sv = *v 15283 } 15284 15285 for { 15286 t, done, err := decoder.Token() 15287 if err != nil { 15288 return err 15289 } 15290 if done { 15291 break 15292 } 15293 originalDecoder := decoder 15294 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15295 switch { 15296 default: 15297 // Do nothing and ignore the unexpected tag element 15298 err = decoder.Decoder.Skip() 15299 if err != nil { 15300 return err 15301 } 15302 15303 } 15304 decoder = originalDecoder 15305 } 15306 *v = sv 15307 return nil 15308} 15309 15310func awsAwsquery_deserializeOpDocumentDeleteConfigurationSetOutput(v **DeleteConfigurationSetOutput, decoder smithyxml.NodeDecoder) error { 15311 if v == nil { 15312 return fmt.Errorf("unexpected nil of type %T", v) 15313 } 15314 var sv *DeleteConfigurationSetOutput 15315 if *v == nil { 15316 sv = &DeleteConfigurationSetOutput{} 15317 } else { 15318 sv = *v 15319 } 15320 15321 for { 15322 t, done, err := decoder.Token() 15323 if err != nil { 15324 return err 15325 } 15326 if done { 15327 break 15328 } 15329 originalDecoder := decoder 15330 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15331 switch { 15332 default: 15333 // Do nothing and ignore the unexpected tag element 15334 err = decoder.Decoder.Skip() 15335 if err != nil { 15336 return err 15337 } 15338 15339 } 15340 decoder = originalDecoder 15341 } 15342 *v = sv 15343 return nil 15344} 15345 15346func awsAwsquery_deserializeOpDocumentDeleteConfigurationSetTrackingOptionsOutput(v **DeleteConfigurationSetTrackingOptionsOutput, decoder smithyxml.NodeDecoder) error { 15347 if v == nil { 15348 return fmt.Errorf("unexpected nil of type %T", v) 15349 } 15350 var sv *DeleteConfigurationSetTrackingOptionsOutput 15351 if *v == nil { 15352 sv = &DeleteConfigurationSetTrackingOptionsOutput{} 15353 } else { 15354 sv = *v 15355 } 15356 15357 for { 15358 t, done, err := decoder.Token() 15359 if err != nil { 15360 return err 15361 } 15362 if done { 15363 break 15364 } 15365 originalDecoder := decoder 15366 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15367 switch { 15368 default: 15369 // Do nothing and ignore the unexpected tag element 15370 err = decoder.Decoder.Skip() 15371 if err != nil { 15372 return err 15373 } 15374 15375 } 15376 decoder = originalDecoder 15377 } 15378 *v = sv 15379 return nil 15380} 15381 15382func awsAwsquery_deserializeOpDocumentDeleteIdentityOutput(v **DeleteIdentityOutput, decoder smithyxml.NodeDecoder) error { 15383 if v == nil { 15384 return fmt.Errorf("unexpected nil of type %T", v) 15385 } 15386 var sv *DeleteIdentityOutput 15387 if *v == nil { 15388 sv = &DeleteIdentityOutput{} 15389 } else { 15390 sv = *v 15391 } 15392 15393 for { 15394 t, done, err := decoder.Token() 15395 if err != nil { 15396 return err 15397 } 15398 if done { 15399 break 15400 } 15401 originalDecoder := decoder 15402 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15403 switch { 15404 default: 15405 // Do nothing and ignore the unexpected tag element 15406 err = decoder.Decoder.Skip() 15407 if err != nil { 15408 return err 15409 } 15410 15411 } 15412 decoder = originalDecoder 15413 } 15414 *v = sv 15415 return nil 15416} 15417 15418func awsAwsquery_deserializeOpDocumentDeleteIdentityPolicyOutput(v **DeleteIdentityPolicyOutput, decoder smithyxml.NodeDecoder) error { 15419 if v == nil { 15420 return fmt.Errorf("unexpected nil of type %T", v) 15421 } 15422 var sv *DeleteIdentityPolicyOutput 15423 if *v == nil { 15424 sv = &DeleteIdentityPolicyOutput{} 15425 } else { 15426 sv = *v 15427 } 15428 15429 for { 15430 t, done, err := decoder.Token() 15431 if err != nil { 15432 return err 15433 } 15434 if done { 15435 break 15436 } 15437 originalDecoder := decoder 15438 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15439 switch { 15440 default: 15441 // Do nothing and ignore the unexpected tag element 15442 err = decoder.Decoder.Skip() 15443 if err != nil { 15444 return err 15445 } 15446 15447 } 15448 decoder = originalDecoder 15449 } 15450 *v = sv 15451 return nil 15452} 15453 15454func awsAwsquery_deserializeOpDocumentDeleteReceiptFilterOutput(v **DeleteReceiptFilterOutput, decoder smithyxml.NodeDecoder) error { 15455 if v == nil { 15456 return fmt.Errorf("unexpected nil of type %T", v) 15457 } 15458 var sv *DeleteReceiptFilterOutput 15459 if *v == nil { 15460 sv = &DeleteReceiptFilterOutput{} 15461 } else { 15462 sv = *v 15463 } 15464 15465 for { 15466 t, done, err := decoder.Token() 15467 if err != nil { 15468 return err 15469 } 15470 if done { 15471 break 15472 } 15473 originalDecoder := decoder 15474 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15475 switch { 15476 default: 15477 // Do nothing and ignore the unexpected tag element 15478 err = decoder.Decoder.Skip() 15479 if err != nil { 15480 return err 15481 } 15482 15483 } 15484 decoder = originalDecoder 15485 } 15486 *v = sv 15487 return nil 15488} 15489 15490func awsAwsquery_deserializeOpDocumentDeleteReceiptRuleOutput(v **DeleteReceiptRuleOutput, decoder smithyxml.NodeDecoder) error { 15491 if v == nil { 15492 return fmt.Errorf("unexpected nil of type %T", v) 15493 } 15494 var sv *DeleteReceiptRuleOutput 15495 if *v == nil { 15496 sv = &DeleteReceiptRuleOutput{} 15497 } else { 15498 sv = *v 15499 } 15500 15501 for { 15502 t, done, err := decoder.Token() 15503 if err != nil { 15504 return err 15505 } 15506 if done { 15507 break 15508 } 15509 originalDecoder := decoder 15510 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15511 switch { 15512 default: 15513 // Do nothing and ignore the unexpected tag element 15514 err = decoder.Decoder.Skip() 15515 if err != nil { 15516 return err 15517 } 15518 15519 } 15520 decoder = originalDecoder 15521 } 15522 *v = sv 15523 return nil 15524} 15525 15526func awsAwsquery_deserializeOpDocumentDeleteReceiptRuleSetOutput(v **DeleteReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error { 15527 if v == nil { 15528 return fmt.Errorf("unexpected nil of type %T", v) 15529 } 15530 var sv *DeleteReceiptRuleSetOutput 15531 if *v == nil { 15532 sv = &DeleteReceiptRuleSetOutput{} 15533 } else { 15534 sv = *v 15535 } 15536 15537 for { 15538 t, done, err := decoder.Token() 15539 if err != nil { 15540 return err 15541 } 15542 if done { 15543 break 15544 } 15545 originalDecoder := decoder 15546 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15547 switch { 15548 default: 15549 // Do nothing and ignore the unexpected tag element 15550 err = decoder.Decoder.Skip() 15551 if err != nil { 15552 return err 15553 } 15554 15555 } 15556 decoder = originalDecoder 15557 } 15558 *v = sv 15559 return nil 15560} 15561 15562func awsAwsquery_deserializeOpDocumentDeleteTemplateOutput(v **DeleteTemplateOutput, decoder smithyxml.NodeDecoder) error { 15563 if v == nil { 15564 return fmt.Errorf("unexpected nil of type %T", v) 15565 } 15566 var sv *DeleteTemplateOutput 15567 if *v == nil { 15568 sv = &DeleteTemplateOutput{} 15569 } else { 15570 sv = *v 15571 } 15572 15573 for { 15574 t, done, err := decoder.Token() 15575 if err != nil { 15576 return err 15577 } 15578 if done { 15579 break 15580 } 15581 originalDecoder := decoder 15582 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15583 switch { 15584 default: 15585 // Do nothing and ignore the unexpected tag element 15586 err = decoder.Decoder.Skip() 15587 if err != nil { 15588 return err 15589 } 15590 15591 } 15592 decoder = originalDecoder 15593 } 15594 *v = sv 15595 return nil 15596} 15597 15598func awsAwsquery_deserializeOpDocumentDescribeActiveReceiptRuleSetOutput(v **DescribeActiveReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error { 15599 if v == nil { 15600 return fmt.Errorf("unexpected nil of type %T", v) 15601 } 15602 var sv *DescribeActiveReceiptRuleSetOutput 15603 if *v == nil { 15604 sv = &DescribeActiveReceiptRuleSetOutput{} 15605 } else { 15606 sv = *v 15607 } 15608 15609 for { 15610 t, done, err := decoder.Token() 15611 if err != nil { 15612 return err 15613 } 15614 if done { 15615 break 15616 } 15617 originalDecoder := decoder 15618 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15619 switch { 15620 case strings.EqualFold("Metadata", t.Name.Local): 15621 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15622 if err := awsAwsquery_deserializeDocumentReceiptRuleSetMetadata(&sv.Metadata, nodeDecoder); err != nil { 15623 return err 15624 } 15625 15626 case strings.EqualFold("Rules", t.Name.Local): 15627 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15628 if err := awsAwsquery_deserializeDocumentReceiptRulesList(&sv.Rules, nodeDecoder); err != nil { 15629 return err 15630 } 15631 15632 default: 15633 // Do nothing and ignore the unexpected tag element 15634 err = decoder.Decoder.Skip() 15635 if err != nil { 15636 return err 15637 } 15638 15639 } 15640 decoder = originalDecoder 15641 } 15642 *v = sv 15643 return nil 15644} 15645 15646func awsAwsquery_deserializeOpDocumentDescribeConfigurationSetOutput(v **DescribeConfigurationSetOutput, decoder smithyxml.NodeDecoder) error { 15647 if v == nil { 15648 return fmt.Errorf("unexpected nil of type %T", v) 15649 } 15650 var sv *DescribeConfigurationSetOutput 15651 if *v == nil { 15652 sv = &DescribeConfigurationSetOutput{} 15653 } else { 15654 sv = *v 15655 } 15656 15657 for { 15658 t, done, err := decoder.Token() 15659 if err != nil { 15660 return err 15661 } 15662 if done { 15663 break 15664 } 15665 originalDecoder := decoder 15666 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15667 switch { 15668 case strings.EqualFold("ConfigurationSet", t.Name.Local): 15669 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15670 if err := awsAwsquery_deserializeDocumentConfigurationSet(&sv.ConfigurationSet, nodeDecoder); err != nil { 15671 return err 15672 } 15673 15674 case strings.EqualFold("DeliveryOptions", t.Name.Local): 15675 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15676 if err := awsAwsquery_deserializeDocumentDeliveryOptions(&sv.DeliveryOptions, nodeDecoder); err != nil { 15677 return err 15678 } 15679 15680 case strings.EqualFold("EventDestinations", t.Name.Local): 15681 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15682 if err := awsAwsquery_deserializeDocumentEventDestinations(&sv.EventDestinations, nodeDecoder); err != nil { 15683 return err 15684 } 15685 15686 case strings.EqualFold("ReputationOptions", t.Name.Local): 15687 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15688 if err := awsAwsquery_deserializeDocumentReputationOptions(&sv.ReputationOptions, nodeDecoder); err != nil { 15689 return err 15690 } 15691 15692 case strings.EqualFold("TrackingOptions", t.Name.Local): 15693 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15694 if err := awsAwsquery_deserializeDocumentTrackingOptions(&sv.TrackingOptions, nodeDecoder); err != nil { 15695 return err 15696 } 15697 15698 default: 15699 // Do nothing and ignore the unexpected tag element 15700 err = decoder.Decoder.Skip() 15701 if err != nil { 15702 return err 15703 } 15704 15705 } 15706 decoder = originalDecoder 15707 } 15708 *v = sv 15709 return nil 15710} 15711 15712func awsAwsquery_deserializeOpDocumentDescribeReceiptRuleOutput(v **DescribeReceiptRuleOutput, decoder smithyxml.NodeDecoder) error { 15713 if v == nil { 15714 return fmt.Errorf("unexpected nil of type %T", v) 15715 } 15716 var sv *DescribeReceiptRuleOutput 15717 if *v == nil { 15718 sv = &DescribeReceiptRuleOutput{} 15719 } else { 15720 sv = *v 15721 } 15722 15723 for { 15724 t, done, err := decoder.Token() 15725 if err != nil { 15726 return err 15727 } 15728 if done { 15729 break 15730 } 15731 originalDecoder := decoder 15732 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15733 switch { 15734 case strings.EqualFold("Rule", t.Name.Local): 15735 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15736 if err := awsAwsquery_deserializeDocumentReceiptRule(&sv.Rule, nodeDecoder); err != nil { 15737 return err 15738 } 15739 15740 default: 15741 // Do nothing and ignore the unexpected tag element 15742 err = decoder.Decoder.Skip() 15743 if err != nil { 15744 return err 15745 } 15746 15747 } 15748 decoder = originalDecoder 15749 } 15750 *v = sv 15751 return nil 15752} 15753 15754func awsAwsquery_deserializeOpDocumentDescribeReceiptRuleSetOutput(v **DescribeReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error { 15755 if v == nil { 15756 return fmt.Errorf("unexpected nil of type %T", v) 15757 } 15758 var sv *DescribeReceiptRuleSetOutput 15759 if *v == nil { 15760 sv = &DescribeReceiptRuleSetOutput{} 15761 } else { 15762 sv = *v 15763 } 15764 15765 for { 15766 t, done, err := decoder.Token() 15767 if err != nil { 15768 return err 15769 } 15770 if done { 15771 break 15772 } 15773 originalDecoder := decoder 15774 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15775 switch { 15776 case strings.EqualFold("Metadata", t.Name.Local): 15777 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15778 if err := awsAwsquery_deserializeDocumentReceiptRuleSetMetadata(&sv.Metadata, nodeDecoder); err != nil { 15779 return err 15780 } 15781 15782 case strings.EqualFold("Rules", t.Name.Local): 15783 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15784 if err := awsAwsquery_deserializeDocumentReceiptRulesList(&sv.Rules, nodeDecoder); err != nil { 15785 return err 15786 } 15787 15788 default: 15789 // Do nothing and ignore the unexpected tag element 15790 err = decoder.Decoder.Skip() 15791 if err != nil { 15792 return err 15793 } 15794 15795 } 15796 decoder = originalDecoder 15797 } 15798 *v = sv 15799 return nil 15800} 15801 15802func awsAwsquery_deserializeOpDocumentGetAccountSendingEnabledOutput(v **GetAccountSendingEnabledOutput, decoder smithyxml.NodeDecoder) error { 15803 if v == nil { 15804 return fmt.Errorf("unexpected nil of type %T", v) 15805 } 15806 var sv *GetAccountSendingEnabledOutput 15807 if *v == nil { 15808 sv = &GetAccountSendingEnabledOutput{} 15809 } else { 15810 sv = *v 15811 } 15812 15813 for { 15814 t, done, err := decoder.Token() 15815 if err != nil { 15816 return err 15817 } 15818 if done { 15819 break 15820 } 15821 originalDecoder := decoder 15822 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15823 switch { 15824 case strings.EqualFold("Enabled", t.Name.Local): 15825 val, err := decoder.Value() 15826 if err != nil { 15827 return err 15828 } 15829 if val == nil { 15830 break 15831 } 15832 { 15833 xtv, err := strconv.ParseBool(string(val)) 15834 if err != nil { 15835 return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", val) 15836 } 15837 sv.Enabled = xtv 15838 } 15839 15840 default: 15841 // Do nothing and ignore the unexpected tag element 15842 err = decoder.Decoder.Skip() 15843 if err != nil { 15844 return err 15845 } 15846 15847 } 15848 decoder = originalDecoder 15849 } 15850 *v = sv 15851 return nil 15852} 15853 15854func awsAwsquery_deserializeOpDocumentGetCustomVerificationEmailTemplateOutput(v **GetCustomVerificationEmailTemplateOutput, decoder smithyxml.NodeDecoder) error { 15855 if v == nil { 15856 return fmt.Errorf("unexpected nil of type %T", v) 15857 } 15858 var sv *GetCustomVerificationEmailTemplateOutput 15859 if *v == nil { 15860 sv = &GetCustomVerificationEmailTemplateOutput{} 15861 } else { 15862 sv = *v 15863 } 15864 15865 for { 15866 t, done, err := decoder.Token() 15867 if err != nil { 15868 return err 15869 } 15870 if done { 15871 break 15872 } 15873 originalDecoder := decoder 15874 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15875 switch { 15876 case strings.EqualFold("FailureRedirectionURL", t.Name.Local): 15877 val, err := decoder.Value() 15878 if err != nil { 15879 return err 15880 } 15881 if val == nil { 15882 break 15883 } 15884 { 15885 xtv := string(val) 15886 sv.FailureRedirectionURL = ptr.String(xtv) 15887 } 15888 15889 case strings.EqualFold("FromEmailAddress", t.Name.Local): 15890 val, err := decoder.Value() 15891 if err != nil { 15892 return err 15893 } 15894 if val == nil { 15895 break 15896 } 15897 { 15898 xtv := string(val) 15899 sv.FromEmailAddress = ptr.String(xtv) 15900 } 15901 15902 case strings.EqualFold("SuccessRedirectionURL", t.Name.Local): 15903 val, err := decoder.Value() 15904 if err != nil { 15905 return err 15906 } 15907 if val == nil { 15908 break 15909 } 15910 { 15911 xtv := string(val) 15912 sv.SuccessRedirectionURL = ptr.String(xtv) 15913 } 15914 15915 case strings.EqualFold("TemplateContent", t.Name.Local): 15916 val, err := decoder.Value() 15917 if err != nil { 15918 return err 15919 } 15920 if val == nil { 15921 break 15922 } 15923 { 15924 xtv := string(val) 15925 sv.TemplateContent = ptr.String(xtv) 15926 } 15927 15928 case strings.EqualFold("TemplateName", t.Name.Local): 15929 val, err := decoder.Value() 15930 if err != nil { 15931 return err 15932 } 15933 if val == nil { 15934 break 15935 } 15936 { 15937 xtv := string(val) 15938 sv.TemplateName = ptr.String(xtv) 15939 } 15940 15941 case strings.EqualFold("TemplateSubject", t.Name.Local): 15942 val, err := decoder.Value() 15943 if err != nil { 15944 return err 15945 } 15946 if val == nil { 15947 break 15948 } 15949 { 15950 xtv := string(val) 15951 sv.TemplateSubject = ptr.String(xtv) 15952 } 15953 15954 default: 15955 // Do nothing and ignore the unexpected tag element 15956 err = decoder.Decoder.Skip() 15957 if err != nil { 15958 return err 15959 } 15960 15961 } 15962 decoder = originalDecoder 15963 } 15964 *v = sv 15965 return nil 15966} 15967 15968func awsAwsquery_deserializeOpDocumentGetIdentityDkimAttributesOutput(v **GetIdentityDkimAttributesOutput, decoder smithyxml.NodeDecoder) error { 15969 if v == nil { 15970 return fmt.Errorf("unexpected nil of type %T", v) 15971 } 15972 var sv *GetIdentityDkimAttributesOutput 15973 if *v == nil { 15974 sv = &GetIdentityDkimAttributesOutput{} 15975 } else { 15976 sv = *v 15977 } 15978 15979 for { 15980 t, done, err := decoder.Token() 15981 if err != nil { 15982 return err 15983 } 15984 if done { 15985 break 15986 } 15987 originalDecoder := decoder 15988 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15989 switch { 15990 case strings.EqualFold("DkimAttributes", t.Name.Local): 15991 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15992 if err := awsAwsquery_deserializeDocumentDkimAttributes(&sv.DkimAttributes, nodeDecoder); err != nil { 15993 return err 15994 } 15995 15996 default: 15997 // Do nothing and ignore the unexpected tag element 15998 err = decoder.Decoder.Skip() 15999 if err != nil { 16000 return err 16001 } 16002 16003 } 16004 decoder = originalDecoder 16005 } 16006 *v = sv 16007 return nil 16008} 16009 16010func awsAwsquery_deserializeOpDocumentGetIdentityMailFromDomainAttributesOutput(v **GetIdentityMailFromDomainAttributesOutput, decoder smithyxml.NodeDecoder) error { 16011 if v == nil { 16012 return fmt.Errorf("unexpected nil of type %T", v) 16013 } 16014 var sv *GetIdentityMailFromDomainAttributesOutput 16015 if *v == nil { 16016 sv = &GetIdentityMailFromDomainAttributesOutput{} 16017 } else { 16018 sv = *v 16019 } 16020 16021 for { 16022 t, done, err := decoder.Token() 16023 if err != nil { 16024 return err 16025 } 16026 if done { 16027 break 16028 } 16029 originalDecoder := decoder 16030 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16031 switch { 16032 case strings.EqualFold("MailFromDomainAttributes", t.Name.Local): 16033 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16034 if err := awsAwsquery_deserializeDocumentMailFromDomainAttributes(&sv.MailFromDomainAttributes, nodeDecoder); err != nil { 16035 return err 16036 } 16037 16038 default: 16039 // Do nothing and ignore the unexpected tag element 16040 err = decoder.Decoder.Skip() 16041 if err != nil { 16042 return err 16043 } 16044 16045 } 16046 decoder = originalDecoder 16047 } 16048 *v = sv 16049 return nil 16050} 16051 16052func awsAwsquery_deserializeOpDocumentGetIdentityNotificationAttributesOutput(v **GetIdentityNotificationAttributesOutput, decoder smithyxml.NodeDecoder) error { 16053 if v == nil { 16054 return fmt.Errorf("unexpected nil of type %T", v) 16055 } 16056 var sv *GetIdentityNotificationAttributesOutput 16057 if *v == nil { 16058 sv = &GetIdentityNotificationAttributesOutput{} 16059 } else { 16060 sv = *v 16061 } 16062 16063 for { 16064 t, done, err := decoder.Token() 16065 if err != nil { 16066 return err 16067 } 16068 if done { 16069 break 16070 } 16071 originalDecoder := decoder 16072 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16073 switch { 16074 case strings.EqualFold("NotificationAttributes", t.Name.Local): 16075 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16076 if err := awsAwsquery_deserializeDocumentNotificationAttributes(&sv.NotificationAttributes, nodeDecoder); err != nil { 16077 return err 16078 } 16079 16080 default: 16081 // Do nothing and ignore the unexpected tag element 16082 err = decoder.Decoder.Skip() 16083 if err != nil { 16084 return err 16085 } 16086 16087 } 16088 decoder = originalDecoder 16089 } 16090 *v = sv 16091 return nil 16092} 16093 16094func awsAwsquery_deserializeOpDocumentGetIdentityPoliciesOutput(v **GetIdentityPoliciesOutput, decoder smithyxml.NodeDecoder) error { 16095 if v == nil { 16096 return fmt.Errorf("unexpected nil of type %T", v) 16097 } 16098 var sv *GetIdentityPoliciesOutput 16099 if *v == nil { 16100 sv = &GetIdentityPoliciesOutput{} 16101 } else { 16102 sv = *v 16103 } 16104 16105 for { 16106 t, done, err := decoder.Token() 16107 if err != nil { 16108 return err 16109 } 16110 if done { 16111 break 16112 } 16113 originalDecoder := decoder 16114 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16115 switch { 16116 case strings.EqualFold("Policies", t.Name.Local): 16117 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16118 if err := awsAwsquery_deserializeDocumentPolicyMap(&sv.Policies, nodeDecoder); err != nil { 16119 return err 16120 } 16121 16122 default: 16123 // Do nothing and ignore the unexpected tag element 16124 err = decoder.Decoder.Skip() 16125 if err != nil { 16126 return err 16127 } 16128 16129 } 16130 decoder = originalDecoder 16131 } 16132 *v = sv 16133 return nil 16134} 16135 16136func awsAwsquery_deserializeOpDocumentGetIdentityVerificationAttributesOutput(v **GetIdentityVerificationAttributesOutput, decoder smithyxml.NodeDecoder) error { 16137 if v == nil { 16138 return fmt.Errorf("unexpected nil of type %T", v) 16139 } 16140 var sv *GetIdentityVerificationAttributesOutput 16141 if *v == nil { 16142 sv = &GetIdentityVerificationAttributesOutput{} 16143 } else { 16144 sv = *v 16145 } 16146 16147 for { 16148 t, done, err := decoder.Token() 16149 if err != nil { 16150 return err 16151 } 16152 if done { 16153 break 16154 } 16155 originalDecoder := decoder 16156 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16157 switch { 16158 case strings.EqualFold("VerificationAttributes", t.Name.Local): 16159 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16160 if err := awsAwsquery_deserializeDocumentVerificationAttributes(&sv.VerificationAttributes, nodeDecoder); err != nil { 16161 return err 16162 } 16163 16164 default: 16165 // Do nothing and ignore the unexpected tag element 16166 err = decoder.Decoder.Skip() 16167 if err != nil { 16168 return err 16169 } 16170 16171 } 16172 decoder = originalDecoder 16173 } 16174 *v = sv 16175 return nil 16176} 16177 16178func awsAwsquery_deserializeOpDocumentGetSendQuotaOutput(v **GetSendQuotaOutput, decoder smithyxml.NodeDecoder) error { 16179 if v == nil { 16180 return fmt.Errorf("unexpected nil of type %T", v) 16181 } 16182 var sv *GetSendQuotaOutput 16183 if *v == nil { 16184 sv = &GetSendQuotaOutput{} 16185 } else { 16186 sv = *v 16187 } 16188 16189 for { 16190 t, done, err := decoder.Token() 16191 if err != nil { 16192 return err 16193 } 16194 if done { 16195 break 16196 } 16197 originalDecoder := decoder 16198 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16199 switch { 16200 case strings.EqualFold("Max24HourSend", t.Name.Local): 16201 val, err := decoder.Value() 16202 if err != nil { 16203 return err 16204 } 16205 if val == nil { 16206 break 16207 } 16208 { 16209 xtv := string(val) 16210 f64, err := strconv.ParseFloat(xtv, 64) 16211 if err != nil { 16212 return err 16213 } 16214 sv.Max24HourSend = f64 16215 } 16216 16217 case strings.EqualFold("MaxSendRate", t.Name.Local): 16218 val, err := decoder.Value() 16219 if err != nil { 16220 return err 16221 } 16222 if val == nil { 16223 break 16224 } 16225 { 16226 xtv := string(val) 16227 f64, err := strconv.ParseFloat(xtv, 64) 16228 if err != nil { 16229 return err 16230 } 16231 sv.MaxSendRate = f64 16232 } 16233 16234 case strings.EqualFold("SentLast24Hours", t.Name.Local): 16235 val, err := decoder.Value() 16236 if err != nil { 16237 return err 16238 } 16239 if val == nil { 16240 break 16241 } 16242 { 16243 xtv := string(val) 16244 f64, err := strconv.ParseFloat(xtv, 64) 16245 if err != nil { 16246 return err 16247 } 16248 sv.SentLast24Hours = f64 16249 } 16250 16251 default: 16252 // Do nothing and ignore the unexpected tag element 16253 err = decoder.Decoder.Skip() 16254 if err != nil { 16255 return err 16256 } 16257 16258 } 16259 decoder = originalDecoder 16260 } 16261 *v = sv 16262 return nil 16263} 16264 16265func awsAwsquery_deserializeOpDocumentGetSendStatisticsOutput(v **GetSendStatisticsOutput, decoder smithyxml.NodeDecoder) error { 16266 if v == nil { 16267 return fmt.Errorf("unexpected nil of type %T", v) 16268 } 16269 var sv *GetSendStatisticsOutput 16270 if *v == nil { 16271 sv = &GetSendStatisticsOutput{} 16272 } else { 16273 sv = *v 16274 } 16275 16276 for { 16277 t, done, err := decoder.Token() 16278 if err != nil { 16279 return err 16280 } 16281 if done { 16282 break 16283 } 16284 originalDecoder := decoder 16285 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16286 switch { 16287 case strings.EqualFold("SendDataPoints", t.Name.Local): 16288 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16289 if err := awsAwsquery_deserializeDocumentSendDataPointList(&sv.SendDataPoints, nodeDecoder); err != nil { 16290 return err 16291 } 16292 16293 default: 16294 // Do nothing and ignore the unexpected tag element 16295 err = decoder.Decoder.Skip() 16296 if err != nil { 16297 return err 16298 } 16299 16300 } 16301 decoder = originalDecoder 16302 } 16303 *v = sv 16304 return nil 16305} 16306 16307func awsAwsquery_deserializeOpDocumentGetTemplateOutput(v **GetTemplateOutput, decoder smithyxml.NodeDecoder) error { 16308 if v == nil { 16309 return fmt.Errorf("unexpected nil of type %T", v) 16310 } 16311 var sv *GetTemplateOutput 16312 if *v == nil { 16313 sv = &GetTemplateOutput{} 16314 } else { 16315 sv = *v 16316 } 16317 16318 for { 16319 t, done, err := decoder.Token() 16320 if err != nil { 16321 return err 16322 } 16323 if done { 16324 break 16325 } 16326 originalDecoder := decoder 16327 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16328 switch { 16329 case strings.EqualFold("Template", t.Name.Local): 16330 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16331 if err := awsAwsquery_deserializeDocumentTemplate(&sv.Template, nodeDecoder); err != nil { 16332 return err 16333 } 16334 16335 default: 16336 // Do nothing and ignore the unexpected tag element 16337 err = decoder.Decoder.Skip() 16338 if err != nil { 16339 return err 16340 } 16341 16342 } 16343 decoder = originalDecoder 16344 } 16345 *v = sv 16346 return nil 16347} 16348 16349func awsAwsquery_deserializeOpDocumentListConfigurationSetsOutput(v **ListConfigurationSetsOutput, decoder smithyxml.NodeDecoder) error { 16350 if v == nil { 16351 return fmt.Errorf("unexpected nil of type %T", v) 16352 } 16353 var sv *ListConfigurationSetsOutput 16354 if *v == nil { 16355 sv = &ListConfigurationSetsOutput{} 16356 } else { 16357 sv = *v 16358 } 16359 16360 for { 16361 t, done, err := decoder.Token() 16362 if err != nil { 16363 return err 16364 } 16365 if done { 16366 break 16367 } 16368 originalDecoder := decoder 16369 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16370 switch { 16371 case strings.EqualFold("ConfigurationSets", t.Name.Local): 16372 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16373 if err := awsAwsquery_deserializeDocumentConfigurationSets(&sv.ConfigurationSets, nodeDecoder); err != nil { 16374 return err 16375 } 16376 16377 case strings.EqualFold("NextToken", t.Name.Local): 16378 val, err := decoder.Value() 16379 if err != nil { 16380 return err 16381 } 16382 if val == nil { 16383 break 16384 } 16385 { 16386 xtv := string(val) 16387 sv.NextToken = ptr.String(xtv) 16388 } 16389 16390 default: 16391 // Do nothing and ignore the unexpected tag element 16392 err = decoder.Decoder.Skip() 16393 if err != nil { 16394 return err 16395 } 16396 16397 } 16398 decoder = originalDecoder 16399 } 16400 *v = sv 16401 return nil 16402} 16403 16404func awsAwsquery_deserializeOpDocumentListCustomVerificationEmailTemplatesOutput(v **ListCustomVerificationEmailTemplatesOutput, decoder smithyxml.NodeDecoder) error { 16405 if v == nil { 16406 return fmt.Errorf("unexpected nil of type %T", v) 16407 } 16408 var sv *ListCustomVerificationEmailTemplatesOutput 16409 if *v == nil { 16410 sv = &ListCustomVerificationEmailTemplatesOutput{} 16411 } else { 16412 sv = *v 16413 } 16414 16415 for { 16416 t, done, err := decoder.Token() 16417 if err != nil { 16418 return err 16419 } 16420 if done { 16421 break 16422 } 16423 originalDecoder := decoder 16424 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16425 switch { 16426 case strings.EqualFold("CustomVerificationEmailTemplates", t.Name.Local): 16427 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16428 if err := awsAwsquery_deserializeDocumentCustomVerificationEmailTemplates(&sv.CustomVerificationEmailTemplates, nodeDecoder); err != nil { 16429 return err 16430 } 16431 16432 case strings.EqualFold("NextToken", t.Name.Local): 16433 val, err := decoder.Value() 16434 if err != nil { 16435 return err 16436 } 16437 if val == nil { 16438 break 16439 } 16440 { 16441 xtv := string(val) 16442 sv.NextToken = ptr.String(xtv) 16443 } 16444 16445 default: 16446 // Do nothing and ignore the unexpected tag element 16447 err = decoder.Decoder.Skip() 16448 if err != nil { 16449 return err 16450 } 16451 16452 } 16453 decoder = originalDecoder 16454 } 16455 *v = sv 16456 return nil 16457} 16458 16459func awsAwsquery_deserializeOpDocumentListIdentitiesOutput(v **ListIdentitiesOutput, decoder smithyxml.NodeDecoder) error { 16460 if v == nil { 16461 return fmt.Errorf("unexpected nil of type %T", v) 16462 } 16463 var sv *ListIdentitiesOutput 16464 if *v == nil { 16465 sv = &ListIdentitiesOutput{} 16466 } else { 16467 sv = *v 16468 } 16469 16470 for { 16471 t, done, err := decoder.Token() 16472 if err != nil { 16473 return err 16474 } 16475 if done { 16476 break 16477 } 16478 originalDecoder := decoder 16479 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16480 switch { 16481 case strings.EqualFold("Identities", t.Name.Local): 16482 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16483 if err := awsAwsquery_deserializeDocumentIdentityList(&sv.Identities, nodeDecoder); err != nil { 16484 return err 16485 } 16486 16487 case strings.EqualFold("NextToken", t.Name.Local): 16488 val, err := decoder.Value() 16489 if err != nil { 16490 return err 16491 } 16492 if val == nil { 16493 break 16494 } 16495 { 16496 xtv := string(val) 16497 sv.NextToken = ptr.String(xtv) 16498 } 16499 16500 default: 16501 // Do nothing and ignore the unexpected tag element 16502 err = decoder.Decoder.Skip() 16503 if err != nil { 16504 return err 16505 } 16506 16507 } 16508 decoder = originalDecoder 16509 } 16510 *v = sv 16511 return nil 16512} 16513 16514func awsAwsquery_deserializeOpDocumentListIdentityPoliciesOutput(v **ListIdentityPoliciesOutput, decoder smithyxml.NodeDecoder) error { 16515 if v == nil { 16516 return fmt.Errorf("unexpected nil of type %T", v) 16517 } 16518 var sv *ListIdentityPoliciesOutput 16519 if *v == nil { 16520 sv = &ListIdentityPoliciesOutput{} 16521 } else { 16522 sv = *v 16523 } 16524 16525 for { 16526 t, done, err := decoder.Token() 16527 if err != nil { 16528 return err 16529 } 16530 if done { 16531 break 16532 } 16533 originalDecoder := decoder 16534 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16535 switch { 16536 case strings.EqualFold("PolicyNames", t.Name.Local): 16537 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16538 if err := awsAwsquery_deserializeDocumentPolicyNameList(&sv.PolicyNames, nodeDecoder); err != nil { 16539 return err 16540 } 16541 16542 default: 16543 // Do nothing and ignore the unexpected tag element 16544 err = decoder.Decoder.Skip() 16545 if err != nil { 16546 return err 16547 } 16548 16549 } 16550 decoder = originalDecoder 16551 } 16552 *v = sv 16553 return nil 16554} 16555 16556func awsAwsquery_deserializeOpDocumentListReceiptFiltersOutput(v **ListReceiptFiltersOutput, decoder smithyxml.NodeDecoder) error { 16557 if v == nil { 16558 return fmt.Errorf("unexpected nil of type %T", v) 16559 } 16560 var sv *ListReceiptFiltersOutput 16561 if *v == nil { 16562 sv = &ListReceiptFiltersOutput{} 16563 } else { 16564 sv = *v 16565 } 16566 16567 for { 16568 t, done, err := decoder.Token() 16569 if err != nil { 16570 return err 16571 } 16572 if done { 16573 break 16574 } 16575 originalDecoder := decoder 16576 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16577 switch { 16578 case strings.EqualFold("Filters", t.Name.Local): 16579 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16580 if err := awsAwsquery_deserializeDocumentReceiptFilterList(&sv.Filters, nodeDecoder); err != nil { 16581 return err 16582 } 16583 16584 default: 16585 // Do nothing and ignore the unexpected tag element 16586 err = decoder.Decoder.Skip() 16587 if err != nil { 16588 return err 16589 } 16590 16591 } 16592 decoder = originalDecoder 16593 } 16594 *v = sv 16595 return nil 16596} 16597 16598func awsAwsquery_deserializeOpDocumentListReceiptRuleSetsOutput(v **ListReceiptRuleSetsOutput, decoder smithyxml.NodeDecoder) error { 16599 if v == nil { 16600 return fmt.Errorf("unexpected nil of type %T", v) 16601 } 16602 var sv *ListReceiptRuleSetsOutput 16603 if *v == nil { 16604 sv = &ListReceiptRuleSetsOutput{} 16605 } else { 16606 sv = *v 16607 } 16608 16609 for { 16610 t, done, err := decoder.Token() 16611 if err != nil { 16612 return err 16613 } 16614 if done { 16615 break 16616 } 16617 originalDecoder := decoder 16618 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16619 switch { 16620 case strings.EqualFold("NextToken", t.Name.Local): 16621 val, err := decoder.Value() 16622 if err != nil { 16623 return err 16624 } 16625 if val == nil { 16626 break 16627 } 16628 { 16629 xtv := string(val) 16630 sv.NextToken = ptr.String(xtv) 16631 } 16632 16633 case strings.EqualFold("RuleSets", t.Name.Local): 16634 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16635 if err := awsAwsquery_deserializeDocumentReceiptRuleSetsLists(&sv.RuleSets, nodeDecoder); err != nil { 16636 return err 16637 } 16638 16639 default: 16640 // Do nothing and ignore the unexpected tag element 16641 err = decoder.Decoder.Skip() 16642 if err != nil { 16643 return err 16644 } 16645 16646 } 16647 decoder = originalDecoder 16648 } 16649 *v = sv 16650 return nil 16651} 16652 16653func awsAwsquery_deserializeOpDocumentListTemplatesOutput(v **ListTemplatesOutput, decoder smithyxml.NodeDecoder) error { 16654 if v == nil { 16655 return fmt.Errorf("unexpected nil of type %T", v) 16656 } 16657 var sv *ListTemplatesOutput 16658 if *v == nil { 16659 sv = &ListTemplatesOutput{} 16660 } else { 16661 sv = *v 16662 } 16663 16664 for { 16665 t, done, err := decoder.Token() 16666 if err != nil { 16667 return err 16668 } 16669 if done { 16670 break 16671 } 16672 originalDecoder := decoder 16673 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16674 switch { 16675 case strings.EqualFold("NextToken", t.Name.Local): 16676 val, err := decoder.Value() 16677 if err != nil { 16678 return err 16679 } 16680 if val == nil { 16681 break 16682 } 16683 { 16684 xtv := string(val) 16685 sv.NextToken = ptr.String(xtv) 16686 } 16687 16688 case strings.EqualFold("TemplatesMetadata", t.Name.Local): 16689 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16690 if err := awsAwsquery_deserializeDocumentTemplateMetadataList(&sv.TemplatesMetadata, nodeDecoder); err != nil { 16691 return err 16692 } 16693 16694 default: 16695 // Do nothing and ignore the unexpected tag element 16696 err = decoder.Decoder.Skip() 16697 if err != nil { 16698 return err 16699 } 16700 16701 } 16702 decoder = originalDecoder 16703 } 16704 *v = sv 16705 return nil 16706} 16707 16708func awsAwsquery_deserializeOpDocumentListVerifiedEmailAddressesOutput(v **ListVerifiedEmailAddressesOutput, decoder smithyxml.NodeDecoder) error { 16709 if v == nil { 16710 return fmt.Errorf("unexpected nil of type %T", v) 16711 } 16712 var sv *ListVerifiedEmailAddressesOutput 16713 if *v == nil { 16714 sv = &ListVerifiedEmailAddressesOutput{} 16715 } else { 16716 sv = *v 16717 } 16718 16719 for { 16720 t, done, err := decoder.Token() 16721 if err != nil { 16722 return err 16723 } 16724 if done { 16725 break 16726 } 16727 originalDecoder := decoder 16728 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16729 switch { 16730 case strings.EqualFold("VerifiedEmailAddresses", t.Name.Local): 16731 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16732 if err := awsAwsquery_deserializeDocumentAddressList(&sv.VerifiedEmailAddresses, nodeDecoder); err != nil { 16733 return err 16734 } 16735 16736 default: 16737 // Do nothing and ignore the unexpected tag element 16738 err = decoder.Decoder.Skip() 16739 if err != nil { 16740 return err 16741 } 16742 16743 } 16744 decoder = originalDecoder 16745 } 16746 *v = sv 16747 return nil 16748} 16749 16750func awsAwsquery_deserializeOpDocumentPutConfigurationSetDeliveryOptionsOutput(v **PutConfigurationSetDeliveryOptionsOutput, decoder smithyxml.NodeDecoder) error { 16751 if v == nil { 16752 return fmt.Errorf("unexpected nil of type %T", v) 16753 } 16754 var sv *PutConfigurationSetDeliveryOptionsOutput 16755 if *v == nil { 16756 sv = &PutConfigurationSetDeliveryOptionsOutput{} 16757 } else { 16758 sv = *v 16759 } 16760 16761 for { 16762 t, done, err := decoder.Token() 16763 if err != nil { 16764 return err 16765 } 16766 if done { 16767 break 16768 } 16769 originalDecoder := decoder 16770 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16771 switch { 16772 default: 16773 // Do nothing and ignore the unexpected tag element 16774 err = decoder.Decoder.Skip() 16775 if err != nil { 16776 return err 16777 } 16778 16779 } 16780 decoder = originalDecoder 16781 } 16782 *v = sv 16783 return nil 16784} 16785 16786func awsAwsquery_deserializeOpDocumentPutIdentityPolicyOutput(v **PutIdentityPolicyOutput, decoder smithyxml.NodeDecoder) error { 16787 if v == nil { 16788 return fmt.Errorf("unexpected nil of type %T", v) 16789 } 16790 var sv *PutIdentityPolicyOutput 16791 if *v == nil { 16792 sv = &PutIdentityPolicyOutput{} 16793 } else { 16794 sv = *v 16795 } 16796 16797 for { 16798 t, done, err := decoder.Token() 16799 if err != nil { 16800 return err 16801 } 16802 if done { 16803 break 16804 } 16805 originalDecoder := decoder 16806 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16807 switch { 16808 default: 16809 // Do nothing and ignore the unexpected tag element 16810 err = decoder.Decoder.Skip() 16811 if err != nil { 16812 return err 16813 } 16814 16815 } 16816 decoder = originalDecoder 16817 } 16818 *v = sv 16819 return nil 16820} 16821 16822func awsAwsquery_deserializeOpDocumentReorderReceiptRuleSetOutput(v **ReorderReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error { 16823 if v == nil { 16824 return fmt.Errorf("unexpected nil of type %T", v) 16825 } 16826 var sv *ReorderReceiptRuleSetOutput 16827 if *v == nil { 16828 sv = &ReorderReceiptRuleSetOutput{} 16829 } else { 16830 sv = *v 16831 } 16832 16833 for { 16834 t, done, err := decoder.Token() 16835 if err != nil { 16836 return err 16837 } 16838 if done { 16839 break 16840 } 16841 originalDecoder := decoder 16842 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16843 switch { 16844 default: 16845 // Do nothing and ignore the unexpected tag element 16846 err = decoder.Decoder.Skip() 16847 if err != nil { 16848 return err 16849 } 16850 16851 } 16852 decoder = originalDecoder 16853 } 16854 *v = sv 16855 return nil 16856} 16857 16858func awsAwsquery_deserializeOpDocumentSendBounceOutput(v **SendBounceOutput, decoder smithyxml.NodeDecoder) error { 16859 if v == nil { 16860 return fmt.Errorf("unexpected nil of type %T", v) 16861 } 16862 var sv *SendBounceOutput 16863 if *v == nil { 16864 sv = &SendBounceOutput{} 16865 } else { 16866 sv = *v 16867 } 16868 16869 for { 16870 t, done, err := decoder.Token() 16871 if err != nil { 16872 return err 16873 } 16874 if done { 16875 break 16876 } 16877 originalDecoder := decoder 16878 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16879 switch { 16880 case strings.EqualFold("MessageId", t.Name.Local): 16881 val, err := decoder.Value() 16882 if err != nil { 16883 return err 16884 } 16885 if val == nil { 16886 break 16887 } 16888 { 16889 xtv := string(val) 16890 sv.MessageId = ptr.String(xtv) 16891 } 16892 16893 default: 16894 // Do nothing and ignore the unexpected tag element 16895 err = decoder.Decoder.Skip() 16896 if err != nil { 16897 return err 16898 } 16899 16900 } 16901 decoder = originalDecoder 16902 } 16903 *v = sv 16904 return nil 16905} 16906 16907func awsAwsquery_deserializeOpDocumentSendBulkTemplatedEmailOutput(v **SendBulkTemplatedEmailOutput, decoder smithyxml.NodeDecoder) error { 16908 if v == nil { 16909 return fmt.Errorf("unexpected nil of type %T", v) 16910 } 16911 var sv *SendBulkTemplatedEmailOutput 16912 if *v == nil { 16913 sv = &SendBulkTemplatedEmailOutput{} 16914 } else { 16915 sv = *v 16916 } 16917 16918 for { 16919 t, done, err := decoder.Token() 16920 if err != nil { 16921 return err 16922 } 16923 if done { 16924 break 16925 } 16926 originalDecoder := decoder 16927 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16928 switch { 16929 case strings.EqualFold("Status", t.Name.Local): 16930 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16931 if err := awsAwsquery_deserializeDocumentBulkEmailDestinationStatusList(&sv.Status, nodeDecoder); err != nil { 16932 return err 16933 } 16934 16935 default: 16936 // Do nothing and ignore the unexpected tag element 16937 err = decoder.Decoder.Skip() 16938 if err != nil { 16939 return err 16940 } 16941 16942 } 16943 decoder = originalDecoder 16944 } 16945 *v = sv 16946 return nil 16947} 16948 16949func awsAwsquery_deserializeOpDocumentSendCustomVerificationEmailOutput(v **SendCustomVerificationEmailOutput, decoder smithyxml.NodeDecoder) error { 16950 if v == nil { 16951 return fmt.Errorf("unexpected nil of type %T", v) 16952 } 16953 var sv *SendCustomVerificationEmailOutput 16954 if *v == nil { 16955 sv = &SendCustomVerificationEmailOutput{} 16956 } else { 16957 sv = *v 16958 } 16959 16960 for { 16961 t, done, err := decoder.Token() 16962 if err != nil { 16963 return err 16964 } 16965 if done { 16966 break 16967 } 16968 originalDecoder := decoder 16969 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16970 switch { 16971 case strings.EqualFold("MessageId", t.Name.Local): 16972 val, err := decoder.Value() 16973 if err != nil { 16974 return err 16975 } 16976 if val == nil { 16977 break 16978 } 16979 { 16980 xtv := string(val) 16981 sv.MessageId = ptr.String(xtv) 16982 } 16983 16984 default: 16985 // Do nothing and ignore the unexpected tag element 16986 err = decoder.Decoder.Skip() 16987 if err != nil { 16988 return err 16989 } 16990 16991 } 16992 decoder = originalDecoder 16993 } 16994 *v = sv 16995 return nil 16996} 16997 16998func awsAwsquery_deserializeOpDocumentSendEmailOutput(v **SendEmailOutput, decoder smithyxml.NodeDecoder) error { 16999 if v == nil { 17000 return fmt.Errorf("unexpected nil of type %T", v) 17001 } 17002 var sv *SendEmailOutput 17003 if *v == nil { 17004 sv = &SendEmailOutput{} 17005 } else { 17006 sv = *v 17007 } 17008 17009 for { 17010 t, done, err := decoder.Token() 17011 if err != nil { 17012 return err 17013 } 17014 if done { 17015 break 17016 } 17017 originalDecoder := decoder 17018 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17019 switch { 17020 case strings.EqualFold("MessageId", t.Name.Local): 17021 val, err := decoder.Value() 17022 if err != nil { 17023 return err 17024 } 17025 if val == nil { 17026 break 17027 } 17028 { 17029 xtv := string(val) 17030 sv.MessageId = ptr.String(xtv) 17031 } 17032 17033 default: 17034 // Do nothing and ignore the unexpected tag element 17035 err = decoder.Decoder.Skip() 17036 if err != nil { 17037 return err 17038 } 17039 17040 } 17041 decoder = originalDecoder 17042 } 17043 *v = sv 17044 return nil 17045} 17046 17047func awsAwsquery_deserializeOpDocumentSendRawEmailOutput(v **SendRawEmailOutput, decoder smithyxml.NodeDecoder) error { 17048 if v == nil { 17049 return fmt.Errorf("unexpected nil of type %T", v) 17050 } 17051 var sv *SendRawEmailOutput 17052 if *v == nil { 17053 sv = &SendRawEmailOutput{} 17054 } else { 17055 sv = *v 17056 } 17057 17058 for { 17059 t, done, err := decoder.Token() 17060 if err != nil { 17061 return err 17062 } 17063 if done { 17064 break 17065 } 17066 originalDecoder := decoder 17067 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17068 switch { 17069 case strings.EqualFold("MessageId", t.Name.Local): 17070 val, err := decoder.Value() 17071 if err != nil { 17072 return err 17073 } 17074 if val == nil { 17075 break 17076 } 17077 { 17078 xtv := string(val) 17079 sv.MessageId = ptr.String(xtv) 17080 } 17081 17082 default: 17083 // Do nothing and ignore the unexpected tag element 17084 err = decoder.Decoder.Skip() 17085 if err != nil { 17086 return err 17087 } 17088 17089 } 17090 decoder = originalDecoder 17091 } 17092 *v = sv 17093 return nil 17094} 17095 17096func awsAwsquery_deserializeOpDocumentSendTemplatedEmailOutput(v **SendTemplatedEmailOutput, decoder smithyxml.NodeDecoder) error { 17097 if v == nil { 17098 return fmt.Errorf("unexpected nil of type %T", v) 17099 } 17100 var sv *SendTemplatedEmailOutput 17101 if *v == nil { 17102 sv = &SendTemplatedEmailOutput{} 17103 } else { 17104 sv = *v 17105 } 17106 17107 for { 17108 t, done, err := decoder.Token() 17109 if err != nil { 17110 return err 17111 } 17112 if done { 17113 break 17114 } 17115 originalDecoder := decoder 17116 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17117 switch { 17118 case strings.EqualFold("MessageId", t.Name.Local): 17119 val, err := decoder.Value() 17120 if err != nil { 17121 return err 17122 } 17123 if val == nil { 17124 break 17125 } 17126 { 17127 xtv := string(val) 17128 sv.MessageId = ptr.String(xtv) 17129 } 17130 17131 default: 17132 // Do nothing and ignore the unexpected tag element 17133 err = decoder.Decoder.Skip() 17134 if err != nil { 17135 return err 17136 } 17137 17138 } 17139 decoder = originalDecoder 17140 } 17141 *v = sv 17142 return nil 17143} 17144 17145func awsAwsquery_deserializeOpDocumentSetActiveReceiptRuleSetOutput(v **SetActiveReceiptRuleSetOutput, decoder smithyxml.NodeDecoder) error { 17146 if v == nil { 17147 return fmt.Errorf("unexpected nil of type %T", v) 17148 } 17149 var sv *SetActiveReceiptRuleSetOutput 17150 if *v == nil { 17151 sv = &SetActiveReceiptRuleSetOutput{} 17152 } else { 17153 sv = *v 17154 } 17155 17156 for { 17157 t, done, err := decoder.Token() 17158 if err != nil { 17159 return err 17160 } 17161 if done { 17162 break 17163 } 17164 originalDecoder := decoder 17165 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17166 switch { 17167 default: 17168 // Do nothing and ignore the unexpected tag element 17169 err = decoder.Decoder.Skip() 17170 if err != nil { 17171 return err 17172 } 17173 17174 } 17175 decoder = originalDecoder 17176 } 17177 *v = sv 17178 return nil 17179} 17180 17181func awsAwsquery_deserializeOpDocumentSetIdentityDkimEnabledOutput(v **SetIdentityDkimEnabledOutput, decoder smithyxml.NodeDecoder) error { 17182 if v == nil { 17183 return fmt.Errorf("unexpected nil of type %T", v) 17184 } 17185 var sv *SetIdentityDkimEnabledOutput 17186 if *v == nil { 17187 sv = &SetIdentityDkimEnabledOutput{} 17188 } else { 17189 sv = *v 17190 } 17191 17192 for { 17193 t, done, err := decoder.Token() 17194 if err != nil { 17195 return err 17196 } 17197 if done { 17198 break 17199 } 17200 originalDecoder := decoder 17201 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17202 switch { 17203 default: 17204 // Do nothing and ignore the unexpected tag element 17205 err = decoder.Decoder.Skip() 17206 if err != nil { 17207 return err 17208 } 17209 17210 } 17211 decoder = originalDecoder 17212 } 17213 *v = sv 17214 return nil 17215} 17216 17217func awsAwsquery_deserializeOpDocumentSetIdentityFeedbackForwardingEnabledOutput(v **SetIdentityFeedbackForwardingEnabledOutput, decoder smithyxml.NodeDecoder) error { 17218 if v == nil { 17219 return fmt.Errorf("unexpected nil of type %T", v) 17220 } 17221 var sv *SetIdentityFeedbackForwardingEnabledOutput 17222 if *v == nil { 17223 sv = &SetIdentityFeedbackForwardingEnabledOutput{} 17224 } else { 17225 sv = *v 17226 } 17227 17228 for { 17229 t, done, err := decoder.Token() 17230 if err != nil { 17231 return err 17232 } 17233 if done { 17234 break 17235 } 17236 originalDecoder := decoder 17237 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17238 switch { 17239 default: 17240 // Do nothing and ignore the unexpected tag element 17241 err = decoder.Decoder.Skip() 17242 if err != nil { 17243 return err 17244 } 17245 17246 } 17247 decoder = originalDecoder 17248 } 17249 *v = sv 17250 return nil 17251} 17252 17253func awsAwsquery_deserializeOpDocumentSetIdentityHeadersInNotificationsEnabledOutput(v **SetIdentityHeadersInNotificationsEnabledOutput, decoder smithyxml.NodeDecoder) error { 17254 if v == nil { 17255 return fmt.Errorf("unexpected nil of type %T", v) 17256 } 17257 var sv *SetIdentityHeadersInNotificationsEnabledOutput 17258 if *v == nil { 17259 sv = &SetIdentityHeadersInNotificationsEnabledOutput{} 17260 } else { 17261 sv = *v 17262 } 17263 17264 for { 17265 t, done, err := decoder.Token() 17266 if err != nil { 17267 return err 17268 } 17269 if done { 17270 break 17271 } 17272 originalDecoder := decoder 17273 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17274 switch { 17275 default: 17276 // Do nothing and ignore the unexpected tag element 17277 err = decoder.Decoder.Skip() 17278 if err != nil { 17279 return err 17280 } 17281 17282 } 17283 decoder = originalDecoder 17284 } 17285 *v = sv 17286 return nil 17287} 17288 17289func awsAwsquery_deserializeOpDocumentSetIdentityMailFromDomainOutput(v **SetIdentityMailFromDomainOutput, decoder smithyxml.NodeDecoder) error { 17290 if v == nil { 17291 return fmt.Errorf("unexpected nil of type %T", v) 17292 } 17293 var sv *SetIdentityMailFromDomainOutput 17294 if *v == nil { 17295 sv = &SetIdentityMailFromDomainOutput{} 17296 } else { 17297 sv = *v 17298 } 17299 17300 for { 17301 t, done, err := decoder.Token() 17302 if err != nil { 17303 return err 17304 } 17305 if done { 17306 break 17307 } 17308 originalDecoder := decoder 17309 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17310 switch { 17311 default: 17312 // Do nothing and ignore the unexpected tag element 17313 err = decoder.Decoder.Skip() 17314 if err != nil { 17315 return err 17316 } 17317 17318 } 17319 decoder = originalDecoder 17320 } 17321 *v = sv 17322 return nil 17323} 17324 17325func awsAwsquery_deserializeOpDocumentSetIdentityNotificationTopicOutput(v **SetIdentityNotificationTopicOutput, decoder smithyxml.NodeDecoder) error { 17326 if v == nil { 17327 return fmt.Errorf("unexpected nil of type %T", v) 17328 } 17329 var sv *SetIdentityNotificationTopicOutput 17330 if *v == nil { 17331 sv = &SetIdentityNotificationTopicOutput{} 17332 } else { 17333 sv = *v 17334 } 17335 17336 for { 17337 t, done, err := decoder.Token() 17338 if err != nil { 17339 return err 17340 } 17341 if done { 17342 break 17343 } 17344 originalDecoder := decoder 17345 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17346 switch { 17347 default: 17348 // Do nothing and ignore the unexpected tag element 17349 err = decoder.Decoder.Skip() 17350 if err != nil { 17351 return err 17352 } 17353 17354 } 17355 decoder = originalDecoder 17356 } 17357 *v = sv 17358 return nil 17359} 17360 17361func awsAwsquery_deserializeOpDocumentSetReceiptRulePositionOutput(v **SetReceiptRulePositionOutput, decoder smithyxml.NodeDecoder) error { 17362 if v == nil { 17363 return fmt.Errorf("unexpected nil of type %T", v) 17364 } 17365 var sv *SetReceiptRulePositionOutput 17366 if *v == nil { 17367 sv = &SetReceiptRulePositionOutput{} 17368 } else { 17369 sv = *v 17370 } 17371 17372 for { 17373 t, done, err := decoder.Token() 17374 if err != nil { 17375 return err 17376 } 17377 if done { 17378 break 17379 } 17380 originalDecoder := decoder 17381 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17382 switch { 17383 default: 17384 // Do nothing and ignore the unexpected tag element 17385 err = decoder.Decoder.Skip() 17386 if err != nil { 17387 return err 17388 } 17389 17390 } 17391 decoder = originalDecoder 17392 } 17393 *v = sv 17394 return nil 17395} 17396 17397func awsAwsquery_deserializeOpDocumentTestRenderTemplateOutput(v **TestRenderTemplateOutput, decoder smithyxml.NodeDecoder) error { 17398 if v == nil { 17399 return fmt.Errorf("unexpected nil of type %T", v) 17400 } 17401 var sv *TestRenderTemplateOutput 17402 if *v == nil { 17403 sv = &TestRenderTemplateOutput{} 17404 } else { 17405 sv = *v 17406 } 17407 17408 for { 17409 t, done, err := decoder.Token() 17410 if err != nil { 17411 return err 17412 } 17413 if done { 17414 break 17415 } 17416 originalDecoder := decoder 17417 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17418 switch { 17419 case strings.EqualFold("RenderedTemplate", t.Name.Local): 17420 val, err := decoder.Value() 17421 if err != nil { 17422 return err 17423 } 17424 if val == nil { 17425 break 17426 } 17427 { 17428 xtv := string(val) 17429 sv.RenderedTemplate = ptr.String(xtv) 17430 } 17431 17432 default: 17433 // Do nothing and ignore the unexpected tag element 17434 err = decoder.Decoder.Skip() 17435 if err != nil { 17436 return err 17437 } 17438 17439 } 17440 decoder = originalDecoder 17441 } 17442 *v = sv 17443 return nil 17444} 17445 17446func awsAwsquery_deserializeOpDocumentUpdateConfigurationSetEventDestinationOutput(v **UpdateConfigurationSetEventDestinationOutput, decoder smithyxml.NodeDecoder) error { 17447 if v == nil { 17448 return fmt.Errorf("unexpected nil of type %T", v) 17449 } 17450 var sv *UpdateConfigurationSetEventDestinationOutput 17451 if *v == nil { 17452 sv = &UpdateConfigurationSetEventDestinationOutput{} 17453 } else { 17454 sv = *v 17455 } 17456 17457 for { 17458 t, done, err := decoder.Token() 17459 if err != nil { 17460 return err 17461 } 17462 if done { 17463 break 17464 } 17465 originalDecoder := decoder 17466 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17467 switch { 17468 default: 17469 // Do nothing and ignore the unexpected tag element 17470 err = decoder.Decoder.Skip() 17471 if err != nil { 17472 return err 17473 } 17474 17475 } 17476 decoder = originalDecoder 17477 } 17478 *v = sv 17479 return nil 17480} 17481 17482func awsAwsquery_deserializeOpDocumentUpdateConfigurationSetTrackingOptionsOutput(v **UpdateConfigurationSetTrackingOptionsOutput, decoder smithyxml.NodeDecoder) error { 17483 if v == nil { 17484 return fmt.Errorf("unexpected nil of type %T", v) 17485 } 17486 var sv *UpdateConfigurationSetTrackingOptionsOutput 17487 if *v == nil { 17488 sv = &UpdateConfigurationSetTrackingOptionsOutput{} 17489 } else { 17490 sv = *v 17491 } 17492 17493 for { 17494 t, done, err := decoder.Token() 17495 if err != nil { 17496 return err 17497 } 17498 if done { 17499 break 17500 } 17501 originalDecoder := decoder 17502 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17503 switch { 17504 default: 17505 // Do nothing and ignore the unexpected tag element 17506 err = decoder.Decoder.Skip() 17507 if err != nil { 17508 return err 17509 } 17510 17511 } 17512 decoder = originalDecoder 17513 } 17514 *v = sv 17515 return nil 17516} 17517 17518func awsAwsquery_deserializeOpDocumentUpdateReceiptRuleOutput(v **UpdateReceiptRuleOutput, decoder smithyxml.NodeDecoder) error { 17519 if v == nil { 17520 return fmt.Errorf("unexpected nil of type %T", v) 17521 } 17522 var sv *UpdateReceiptRuleOutput 17523 if *v == nil { 17524 sv = &UpdateReceiptRuleOutput{} 17525 } else { 17526 sv = *v 17527 } 17528 17529 for { 17530 t, done, err := decoder.Token() 17531 if err != nil { 17532 return err 17533 } 17534 if done { 17535 break 17536 } 17537 originalDecoder := decoder 17538 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17539 switch { 17540 default: 17541 // Do nothing and ignore the unexpected tag element 17542 err = decoder.Decoder.Skip() 17543 if err != nil { 17544 return err 17545 } 17546 17547 } 17548 decoder = originalDecoder 17549 } 17550 *v = sv 17551 return nil 17552} 17553 17554func awsAwsquery_deserializeOpDocumentUpdateTemplateOutput(v **UpdateTemplateOutput, decoder smithyxml.NodeDecoder) error { 17555 if v == nil { 17556 return fmt.Errorf("unexpected nil of type %T", v) 17557 } 17558 var sv *UpdateTemplateOutput 17559 if *v == nil { 17560 sv = &UpdateTemplateOutput{} 17561 } else { 17562 sv = *v 17563 } 17564 17565 for { 17566 t, done, err := decoder.Token() 17567 if err != nil { 17568 return err 17569 } 17570 if done { 17571 break 17572 } 17573 originalDecoder := decoder 17574 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17575 switch { 17576 default: 17577 // Do nothing and ignore the unexpected tag element 17578 err = decoder.Decoder.Skip() 17579 if err != nil { 17580 return err 17581 } 17582 17583 } 17584 decoder = originalDecoder 17585 } 17586 *v = sv 17587 return nil 17588} 17589 17590func awsAwsquery_deserializeOpDocumentVerifyDomainDkimOutput(v **VerifyDomainDkimOutput, decoder smithyxml.NodeDecoder) error { 17591 if v == nil { 17592 return fmt.Errorf("unexpected nil of type %T", v) 17593 } 17594 var sv *VerifyDomainDkimOutput 17595 if *v == nil { 17596 sv = &VerifyDomainDkimOutput{} 17597 } else { 17598 sv = *v 17599 } 17600 17601 for { 17602 t, done, err := decoder.Token() 17603 if err != nil { 17604 return err 17605 } 17606 if done { 17607 break 17608 } 17609 originalDecoder := decoder 17610 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17611 switch { 17612 case strings.EqualFold("DkimTokens", t.Name.Local): 17613 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 17614 if err := awsAwsquery_deserializeDocumentVerificationTokenList(&sv.DkimTokens, nodeDecoder); err != nil { 17615 return err 17616 } 17617 17618 default: 17619 // Do nothing and ignore the unexpected tag element 17620 err = decoder.Decoder.Skip() 17621 if err != nil { 17622 return err 17623 } 17624 17625 } 17626 decoder = originalDecoder 17627 } 17628 *v = sv 17629 return nil 17630} 17631 17632func awsAwsquery_deserializeOpDocumentVerifyDomainIdentityOutput(v **VerifyDomainIdentityOutput, decoder smithyxml.NodeDecoder) error { 17633 if v == nil { 17634 return fmt.Errorf("unexpected nil of type %T", v) 17635 } 17636 var sv *VerifyDomainIdentityOutput 17637 if *v == nil { 17638 sv = &VerifyDomainIdentityOutput{} 17639 } else { 17640 sv = *v 17641 } 17642 17643 for { 17644 t, done, err := decoder.Token() 17645 if err != nil { 17646 return err 17647 } 17648 if done { 17649 break 17650 } 17651 originalDecoder := decoder 17652 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17653 switch { 17654 case strings.EqualFold("VerificationToken", t.Name.Local): 17655 val, err := decoder.Value() 17656 if err != nil { 17657 return err 17658 } 17659 if val == nil { 17660 break 17661 } 17662 { 17663 xtv := string(val) 17664 sv.VerificationToken = ptr.String(xtv) 17665 } 17666 17667 default: 17668 // Do nothing and ignore the unexpected tag element 17669 err = decoder.Decoder.Skip() 17670 if err != nil { 17671 return err 17672 } 17673 17674 } 17675 decoder = originalDecoder 17676 } 17677 *v = sv 17678 return nil 17679} 17680 17681func awsAwsquery_deserializeOpDocumentVerifyEmailIdentityOutput(v **VerifyEmailIdentityOutput, decoder smithyxml.NodeDecoder) error { 17682 if v == nil { 17683 return fmt.Errorf("unexpected nil of type %T", v) 17684 } 17685 var sv *VerifyEmailIdentityOutput 17686 if *v == nil { 17687 sv = &VerifyEmailIdentityOutput{} 17688 } else { 17689 sv = *v 17690 } 17691 17692 for { 17693 t, done, err := decoder.Token() 17694 if err != nil { 17695 return err 17696 } 17697 if done { 17698 break 17699 } 17700 originalDecoder := decoder 17701 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17702 switch { 17703 default: 17704 // Do nothing and ignore the unexpected tag element 17705 err = decoder.Decoder.Skip() 17706 if err != nil { 17707 return err 17708 } 17709 17710 } 17711 decoder = originalDecoder 17712 } 17713 *v = sv 17714 return nil 17715} 17716