deserializers.go (574578B)
1 // Code generated by smithy-go-codegen DO NOT EDIT. 2 3 package route53 4 5 import ( 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/route53/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 "strconv" 22 "strings" 23 ) 24 25 type awsRestxml_deserializeOpActivateKeySigningKey struct { 26 } 27 28 func (*awsRestxml_deserializeOpActivateKeySigningKey) ID() string { 29 return "OperationDeserializer" 30 } 31 32 func (m *awsRestxml_deserializeOpActivateKeySigningKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 33 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 34 ) { 35 out, metadata, err = next.HandleDeserialize(ctx, in) 36 if err != nil { 37 return out, metadata, err 38 } 39 40 response, ok := out.RawResponse.(*smithyhttp.Response) 41 if !ok { 42 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 43 } 44 45 if response.StatusCode < 200 || response.StatusCode >= 300 { 46 return out, metadata, awsRestxml_deserializeOpErrorActivateKeySigningKey(response, &metadata) 47 } 48 output := &ActivateKeySigningKeyOutput{} 49 out.Result = output 50 51 var buff [1024]byte 52 ringBuffer := smithyio.NewRingBuffer(buff[:]) 53 body := io.TeeReader(response.Body, ringBuffer) 54 rootDecoder := xml.NewDecoder(body) 55 t, err := smithyxml.FetchRootElement(rootDecoder) 56 if err == io.EOF { 57 return out, metadata, nil 58 } 59 if err != nil { 60 var snapshot bytes.Buffer 61 io.Copy(&snapshot, ringBuffer) 62 return out, metadata, &smithy.DeserializationError{ 63 Err: fmt.Errorf("failed to decode response body, %w", err), 64 Snapshot: snapshot.Bytes(), 65 } 66 } 67 68 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 69 err = awsRestxml_deserializeOpDocumentActivateKeySigningKeyOutput(&output, decoder) 70 if err != nil { 71 var snapshot bytes.Buffer 72 io.Copy(&snapshot, ringBuffer) 73 return out, metadata, &smithy.DeserializationError{ 74 Err: fmt.Errorf("failed to decode response body, %w", err), 75 Snapshot: snapshot.Bytes(), 76 } 77 } 78 79 return out, metadata, err 80 } 81 82 func awsRestxml_deserializeOpErrorActivateKeySigningKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { 83 var errorBuffer bytes.Buffer 84 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 85 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 86 } 87 errorBody := bytes.NewReader(errorBuffer.Bytes()) 88 89 errorCode := "UnknownError" 90 errorMessage := errorCode 91 92 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 93 if err != nil { 94 return err 95 } 96 if reqID := errorComponents.RequestID; len(reqID) != 0 { 97 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 98 } 99 if len(errorComponents.Code) != 0 { 100 errorCode = errorComponents.Code 101 } 102 if len(errorComponents.Message) != 0 { 103 errorMessage = errorComponents.Message 104 } 105 errorBody.Seek(0, io.SeekStart) 106 switch { 107 case strings.EqualFold("ConcurrentModification", errorCode): 108 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 109 110 case strings.EqualFold("InvalidInput", errorCode): 111 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 112 113 case strings.EqualFold("InvalidKMSArn", errorCode): 114 return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) 115 116 case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): 117 return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) 118 119 case strings.EqualFold("InvalidSigningStatus", errorCode): 120 return awsRestxml_deserializeErrorInvalidSigningStatus(response, errorBody) 121 122 case strings.EqualFold("NoSuchKeySigningKey", errorCode): 123 return awsRestxml_deserializeErrorNoSuchKeySigningKey(response, errorBody) 124 125 default: 126 genericError := &smithy.GenericAPIError{ 127 Code: errorCode, 128 Message: errorMessage, 129 } 130 return genericError 131 132 } 133 } 134 135 func awsRestxml_deserializeOpDocumentActivateKeySigningKeyOutput(v **ActivateKeySigningKeyOutput, decoder smithyxml.NodeDecoder) error { 136 if v == nil { 137 return fmt.Errorf("unexpected nil of type %T", v) 138 } 139 var sv *ActivateKeySigningKeyOutput 140 if *v == nil { 141 sv = &ActivateKeySigningKeyOutput{} 142 } else { 143 sv = *v 144 } 145 146 for { 147 t, done, err := decoder.Token() 148 if err != nil { 149 return err 150 } 151 if done { 152 break 153 } 154 originalDecoder := decoder 155 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 156 switch { 157 case strings.EqualFold("ChangeInfo", t.Name.Local): 158 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 159 if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { 160 return err 161 } 162 163 default: 164 // Do nothing and ignore the unexpected tag element 165 err = decoder.Decoder.Skip() 166 if err != nil { 167 return err 168 } 169 170 } 171 decoder = originalDecoder 172 } 173 *v = sv 174 return nil 175 } 176 177 type awsRestxml_deserializeOpAssociateVPCWithHostedZone struct { 178 } 179 180 func (*awsRestxml_deserializeOpAssociateVPCWithHostedZone) ID() string { 181 return "OperationDeserializer" 182 } 183 184 func (m *awsRestxml_deserializeOpAssociateVPCWithHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 185 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 186 ) { 187 out, metadata, err = next.HandleDeserialize(ctx, in) 188 if err != nil { 189 return out, metadata, err 190 } 191 192 response, ok := out.RawResponse.(*smithyhttp.Response) 193 if !ok { 194 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 195 } 196 197 if response.StatusCode < 200 || response.StatusCode >= 300 { 198 return out, metadata, awsRestxml_deserializeOpErrorAssociateVPCWithHostedZone(response, &metadata) 199 } 200 output := &AssociateVPCWithHostedZoneOutput{} 201 out.Result = output 202 203 var buff [1024]byte 204 ringBuffer := smithyio.NewRingBuffer(buff[:]) 205 body := io.TeeReader(response.Body, ringBuffer) 206 rootDecoder := xml.NewDecoder(body) 207 t, err := smithyxml.FetchRootElement(rootDecoder) 208 if err == io.EOF { 209 return out, metadata, nil 210 } 211 if err != nil { 212 var snapshot bytes.Buffer 213 io.Copy(&snapshot, ringBuffer) 214 return out, metadata, &smithy.DeserializationError{ 215 Err: fmt.Errorf("failed to decode response body, %w", err), 216 Snapshot: snapshot.Bytes(), 217 } 218 } 219 220 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 221 err = awsRestxml_deserializeOpDocumentAssociateVPCWithHostedZoneOutput(&output, decoder) 222 if err != nil { 223 var snapshot bytes.Buffer 224 io.Copy(&snapshot, ringBuffer) 225 return out, metadata, &smithy.DeserializationError{ 226 Err: fmt.Errorf("failed to decode response body, %w", err), 227 Snapshot: snapshot.Bytes(), 228 } 229 } 230 231 return out, metadata, err 232 } 233 234 func awsRestxml_deserializeOpErrorAssociateVPCWithHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { 235 var errorBuffer bytes.Buffer 236 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 237 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 238 } 239 errorBody := bytes.NewReader(errorBuffer.Bytes()) 240 241 errorCode := "UnknownError" 242 errorMessage := errorCode 243 244 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 245 if err != nil { 246 return err 247 } 248 if reqID := errorComponents.RequestID; len(reqID) != 0 { 249 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 250 } 251 if len(errorComponents.Code) != 0 { 252 errorCode = errorComponents.Code 253 } 254 if len(errorComponents.Message) != 0 { 255 errorMessage = errorComponents.Message 256 } 257 errorBody.Seek(0, io.SeekStart) 258 switch { 259 case strings.EqualFold("ConflictingDomainExists", errorCode): 260 return awsRestxml_deserializeErrorConflictingDomainExists(response, errorBody) 261 262 case strings.EqualFold("InvalidInput", errorCode): 263 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 264 265 case strings.EqualFold("InvalidVPCId", errorCode): 266 return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) 267 268 case strings.EqualFold("LimitsExceeded", errorCode): 269 return awsRestxml_deserializeErrorLimitsExceeded(response, errorBody) 270 271 case strings.EqualFold("NoSuchHostedZone", errorCode): 272 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 273 274 case strings.EqualFold("NotAuthorizedException", errorCode): 275 return awsRestxml_deserializeErrorNotAuthorizedException(response, errorBody) 276 277 case strings.EqualFold("PriorRequestNotComplete", errorCode): 278 return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) 279 280 case strings.EqualFold("PublicZoneVPCAssociation", errorCode): 281 return awsRestxml_deserializeErrorPublicZoneVPCAssociation(response, errorBody) 282 283 default: 284 genericError := &smithy.GenericAPIError{ 285 Code: errorCode, 286 Message: errorMessage, 287 } 288 return genericError 289 290 } 291 } 292 293 func awsRestxml_deserializeOpDocumentAssociateVPCWithHostedZoneOutput(v **AssociateVPCWithHostedZoneOutput, decoder smithyxml.NodeDecoder) error { 294 if v == nil { 295 return fmt.Errorf("unexpected nil of type %T", v) 296 } 297 var sv *AssociateVPCWithHostedZoneOutput 298 if *v == nil { 299 sv = &AssociateVPCWithHostedZoneOutput{} 300 } else { 301 sv = *v 302 } 303 304 for { 305 t, done, err := decoder.Token() 306 if err != nil { 307 return err 308 } 309 if done { 310 break 311 } 312 originalDecoder := decoder 313 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 314 switch { 315 case strings.EqualFold("ChangeInfo", t.Name.Local): 316 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 317 if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { 318 return err 319 } 320 321 default: 322 // Do nothing and ignore the unexpected tag element 323 err = decoder.Decoder.Skip() 324 if err != nil { 325 return err 326 } 327 328 } 329 decoder = originalDecoder 330 } 331 *v = sv 332 return nil 333 } 334 335 type awsRestxml_deserializeOpChangeCidrCollection struct { 336 } 337 338 func (*awsRestxml_deserializeOpChangeCidrCollection) ID() string { 339 return "OperationDeserializer" 340 } 341 342 func (m *awsRestxml_deserializeOpChangeCidrCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 343 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 344 ) { 345 out, metadata, err = next.HandleDeserialize(ctx, in) 346 if err != nil { 347 return out, metadata, err 348 } 349 350 response, ok := out.RawResponse.(*smithyhttp.Response) 351 if !ok { 352 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 353 } 354 355 if response.StatusCode < 200 || response.StatusCode >= 300 { 356 return out, metadata, awsRestxml_deserializeOpErrorChangeCidrCollection(response, &metadata) 357 } 358 output := &ChangeCidrCollectionOutput{} 359 out.Result = output 360 361 var buff [1024]byte 362 ringBuffer := smithyio.NewRingBuffer(buff[:]) 363 body := io.TeeReader(response.Body, ringBuffer) 364 rootDecoder := xml.NewDecoder(body) 365 t, err := smithyxml.FetchRootElement(rootDecoder) 366 if err == io.EOF { 367 return out, metadata, nil 368 } 369 if err != nil { 370 var snapshot bytes.Buffer 371 io.Copy(&snapshot, ringBuffer) 372 return out, metadata, &smithy.DeserializationError{ 373 Err: fmt.Errorf("failed to decode response body, %w", err), 374 Snapshot: snapshot.Bytes(), 375 } 376 } 377 378 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 379 err = awsRestxml_deserializeOpDocumentChangeCidrCollectionOutput(&output, decoder) 380 if err != nil { 381 var snapshot bytes.Buffer 382 io.Copy(&snapshot, ringBuffer) 383 return out, metadata, &smithy.DeserializationError{ 384 Err: fmt.Errorf("failed to decode response body, %w", err), 385 Snapshot: snapshot.Bytes(), 386 } 387 } 388 389 return out, metadata, err 390 } 391 392 func awsRestxml_deserializeOpErrorChangeCidrCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { 393 var errorBuffer bytes.Buffer 394 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 395 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 396 } 397 errorBody := bytes.NewReader(errorBuffer.Bytes()) 398 399 errorCode := "UnknownError" 400 errorMessage := errorCode 401 402 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 403 if err != nil { 404 return err 405 } 406 if reqID := errorComponents.RequestID; len(reqID) != 0 { 407 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 408 } 409 if len(errorComponents.Code) != 0 { 410 errorCode = errorComponents.Code 411 } 412 if len(errorComponents.Message) != 0 { 413 errorMessage = errorComponents.Message 414 } 415 errorBody.Seek(0, io.SeekStart) 416 switch { 417 case strings.EqualFold("CidrBlockInUseException", errorCode): 418 return awsRestxml_deserializeErrorCidrBlockInUseException(response, errorBody) 419 420 case strings.EqualFold("CidrCollectionVersionMismatchException", errorCode): 421 return awsRestxml_deserializeErrorCidrCollectionVersionMismatchException(response, errorBody) 422 423 case strings.EqualFold("ConcurrentModification", errorCode): 424 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 425 426 case strings.EqualFold("InvalidInput", errorCode): 427 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 428 429 case strings.EqualFold("LimitsExceeded", errorCode): 430 return awsRestxml_deserializeErrorLimitsExceeded(response, errorBody) 431 432 case strings.EqualFold("NoSuchCidrCollectionException", errorCode): 433 return awsRestxml_deserializeErrorNoSuchCidrCollectionException(response, errorBody) 434 435 default: 436 genericError := &smithy.GenericAPIError{ 437 Code: errorCode, 438 Message: errorMessage, 439 } 440 return genericError 441 442 } 443 } 444 445 func awsRestxml_deserializeOpDocumentChangeCidrCollectionOutput(v **ChangeCidrCollectionOutput, decoder smithyxml.NodeDecoder) error { 446 if v == nil { 447 return fmt.Errorf("unexpected nil of type %T", v) 448 } 449 var sv *ChangeCidrCollectionOutput 450 if *v == nil { 451 sv = &ChangeCidrCollectionOutput{} 452 } else { 453 sv = *v 454 } 455 456 for { 457 t, done, err := decoder.Token() 458 if err != nil { 459 return err 460 } 461 if done { 462 break 463 } 464 originalDecoder := decoder 465 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 466 switch { 467 case strings.EqualFold("Id", t.Name.Local): 468 val, err := decoder.Value() 469 if err != nil { 470 return err 471 } 472 if val == nil { 473 break 474 } 475 { 476 xtv := string(val) 477 sv.Id = ptr.String(xtv) 478 } 479 480 default: 481 // Do nothing and ignore the unexpected tag element 482 err = decoder.Decoder.Skip() 483 if err != nil { 484 return err 485 } 486 487 } 488 decoder = originalDecoder 489 } 490 *v = sv 491 return nil 492 } 493 494 type awsRestxml_deserializeOpChangeResourceRecordSets struct { 495 } 496 497 func (*awsRestxml_deserializeOpChangeResourceRecordSets) ID() string { 498 return "OperationDeserializer" 499 } 500 501 func (m *awsRestxml_deserializeOpChangeResourceRecordSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 502 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 503 ) { 504 out, metadata, err = next.HandleDeserialize(ctx, in) 505 if err != nil { 506 return out, metadata, err 507 } 508 509 response, ok := out.RawResponse.(*smithyhttp.Response) 510 if !ok { 511 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 512 } 513 514 if response.StatusCode < 200 || response.StatusCode >= 300 { 515 return out, metadata, awsRestxml_deserializeOpErrorChangeResourceRecordSets(response, &metadata) 516 } 517 output := &ChangeResourceRecordSetsOutput{} 518 out.Result = output 519 520 var buff [1024]byte 521 ringBuffer := smithyio.NewRingBuffer(buff[:]) 522 body := io.TeeReader(response.Body, ringBuffer) 523 rootDecoder := xml.NewDecoder(body) 524 t, err := smithyxml.FetchRootElement(rootDecoder) 525 if err == io.EOF { 526 return out, metadata, nil 527 } 528 if err != nil { 529 var snapshot bytes.Buffer 530 io.Copy(&snapshot, ringBuffer) 531 return out, metadata, &smithy.DeserializationError{ 532 Err: fmt.Errorf("failed to decode response body, %w", err), 533 Snapshot: snapshot.Bytes(), 534 } 535 } 536 537 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 538 err = awsRestxml_deserializeOpDocumentChangeResourceRecordSetsOutput(&output, decoder) 539 if err != nil { 540 var snapshot bytes.Buffer 541 io.Copy(&snapshot, ringBuffer) 542 return out, metadata, &smithy.DeserializationError{ 543 Err: fmt.Errorf("failed to decode response body, %w", err), 544 Snapshot: snapshot.Bytes(), 545 } 546 } 547 548 return out, metadata, err 549 } 550 551 func awsRestxml_deserializeOpErrorChangeResourceRecordSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { 552 var errorBuffer bytes.Buffer 553 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 554 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 555 } 556 errorBody := bytes.NewReader(errorBuffer.Bytes()) 557 558 errorCode := "UnknownError" 559 errorMessage := errorCode 560 561 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 562 if err != nil { 563 return err 564 } 565 if reqID := errorComponents.RequestID; len(reqID) != 0 { 566 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 567 } 568 if len(errorComponents.Code) != 0 { 569 errorCode = errorComponents.Code 570 } 571 if len(errorComponents.Message) != 0 { 572 errorMessage = errorComponents.Message 573 } 574 errorBody.Seek(0, io.SeekStart) 575 switch { 576 case strings.EqualFold("InvalidChangeBatch", errorCode): 577 return awsRestxml_deserializeErrorInvalidChangeBatch(response, errorBody) 578 579 case strings.EqualFold("InvalidInput", errorCode): 580 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 581 582 case strings.EqualFold("NoSuchHealthCheck", errorCode): 583 return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) 584 585 case strings.EqualFold("NoSuchHostedZone", errorCode): 586 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 587 588 case strings.EqualFold("PriorRequestNotComplete", errorCode): 589 return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) 590 591 default: 592 genericError := &smithy.GenericAPIError{ 593 Code: errorCode, 594 Message: errorMessage, 595 } 596 return genericError 597 598 } 599 } 600 601 func awsRestxml_deserializeOpDocumentChangeResourceRecordSetsOutput(v **ChangeResourceRecordSetsOutput, decoder smithyxml.NodeDecoder) error { 602 if v == nil { 603 return fmt.Errorf("unexpected nil of type %T", v) 604 } 605 var sv *ChangeResourceRecordSetsOutput 606 if *v == nil { 607 sv = &ChangeResourceRecordSetsOutput{} 608 } else { 609 sv = *v 610 } 611 612 for { 613 t, done, err := decoder.Token() 614 if err != nil { 615 return err 616 } 617 if done { 618 break 619 } 620 originalDecoder := decoder 621 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 622 switch { 623 case strings.EqualFold("ChangeInfo", t.Name.Local): 624 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 625 if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { 626 return err 627 } 628 629 default: 630 // Do nothing and ignore the unexpected tag element 631 err = decoder.Decoder.Skip() 632 if err != nil { 633 return err 634 } 635 636 } 637 decoder = originalDecoder 638 } 639 *v = sv 640 return nil 641 } 642 643 type awsRestxml_deserializeOpChangeTagsForResource struct { 644 } 645 646 func (*awsRestxml_deserializeOpChangeTagsForResource) ID() string { 647 return "OperationDeserializer" 648 } 649 650 func (m *awsRestxml_deserializeOpChangeTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 651 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 652 ) { 653 out, metadata, err = next.HandleDeserialize(ctx, in) 654 if err != nil { 655 return out, metadata, err 656 } 657 658 response, ok := out.RawResponse.(*smithyhttp.Response) 659 if !ok { 660 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 661 } 662 663 if response.StatusCode < 200 || response.StatusCode >= 300 { 664 return out, metadata, awsRestxml_deserializeOpErrorChangeTagsForResource(response, &metadata) 665 } 666 output := &ChangeTagsForResourceOutput{} 667 out.Result = output 668 669 return out, metadata, err 670 } 671 672 func awsRestxml_deserializeOpErrorChangeTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { 673 var errorBuffer bytes.Buffer 674 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 675 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 676 } 677 errorBody := bytes.NewReader(errorBuffer.Bytes()) 678 679 errorCode := "UnknownError" 680 errorMessage := errorCode 681 682 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 683 if err != nil { 684 return err 685 } 686 if reqID := errorComponents.RequestID; len(reqID) != 0 { 687 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 688 } 689 if len(errorComponents.Code) != 0 { 690 errorCode = errorComponents.Code 691 } 692 if len(errorComponents.Message) != 0 { 693 errorMessage = errorComponents.Message 694 } 695 errorBody.Seek(0, io.SeekStart) 696 switch { 697 case strings.EqualFold("InvalidInput", errorCode): 698 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 699 700 case strings.EqualFold("NoSuchHealthCheck", errorCode): 701 return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) 702 703 case strings.EqualFold("NoSuchHostedZone", errorCode): 704 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 705 706 case strings.EqualFold("PriorRequestNotComplete", errorCode): 707 return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) 708 709 case strings.EqualFold("ThrottlingException", errorCode): 710 return awsRestxml_deserializeErrorThrottlingException(response, errorBody) 711 712 default: 713 genericError := &smithy.GenericAPIError{ 714 Code: errorCode, 715 Message: errorMessage, 716 } 717 return genericError 718 719 } 720 } 721 722 type awsRestxml_deserializeOpCreateCidrCollection struct { 723 } 724 725 func (*awsRestxml_deserializeOpCreateCidrCollection) ID() string { 726 return "OperationDeserializer" 727 } 728 729 func (m *awsRestxml_deserializeOpCreateCidrCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 730 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 731 ) { 732 out, metadata, err = next.HandleDeserialize(ctx, in) 733 if err != nil { 734 return out, metadata, err 735 } 736 737 response, ok := out.RawResponse.(*smithyhttp.Response) 738 if !ok { 739 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 740 } 741 742 if response.StatusCode < 200 || response.StatusCode >= 300 { 743 return out, metadata, awsRestxml_deserializeOpErrorCreateCidrCollection(response, &metadata) 744 } 745 output := &CreateCidrCollectionOutput{} 746 out.Result = output 747 748 err = awsRestxml_deserializeOpHttpBindingsCreateCidrCollectionOutput(output, response) 749 if err != nil { 750 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} 751 } 752 753 var buff [1024]byte 754 ringBuffer := smithyio.NewRingBuffer(buff[:]) 755 body := io.TeeReader(response.Body, ringBuffer) 756 rootDecoder := xml.NewDecoder(body) 757 t, err := smithyxml.FetchRootElement(rootDecoder) 758 if err == io.EOF { 759 return out, metadata, nil 760 } 761 if err != nil { 762 var snapshot bytes.Buffer 763 io.Copy(&snapshot, ringBuffer) 764 return out, metadata, &smithy.DeserializationError{ 765 Err: fmt.Errorf("failed to decode response body, %w", err), 766 Snapshot: snapshot.Bytes(), 767 } 768 } 769 770 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 771 err = awsRestxml_deserializeOpDocumentCreateCidrCollectionOutput(&output, decoder) 772 if err != nil { 773 var snapshot bytes.Buffer 774 io.Copy(&snapshot, ringBuffer) 775 return out, metadata, &smithy.DeserializationError{ 776 Err: fmt.Errorf("failed to decode response body, %w", err), 777 Snapshot: snapshot.Bytes(), 778 } 779 } 780 781 return out, metadata, err 782 } 783 784 func awsRestxml_deserializeOpErrorCreateCidrCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { 785 var errorBuffer bytes.Buffer 786 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 787 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 788 } 789 errorBody := bytes.NewReader(errorBuffer.Bytes()) 790 791 errorCode := "UnknownError" 792 errorMessage := errorCode 793 794 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 795 if err != nil { 796 return err 797 } 798 if reqID := errorComponents.RequestID; len(reqID) != 0 { 799 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 800 } 801 if len(errorComponents.Code) != 0 { 802 errorCode = errorComponents.Code 803 } 804 if len(errorComponents.Message) != 0 { 805 errorMessage = errorComponents.Message 806 } 807 errorBody.Seek(0, io.SeekStart) 808 switch { 809 case strings.EqualFold("CidrCollectionAlreadyExistsException", errorCode): 810 return awsRestxml_deserializeErrorCidrCollectionAlreadyExistsException(response, errorBody) 811 812 case strings.EqualFold("ConcurrentModification", errorCode): 813 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 814 815 case strings.EqualFold("InvalidInput", errorCode): 816 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 817 818 case strings.EqualFold("LimitsExceeded", errorCode): 819 return awsRestxml_deserializeErrorLimitsExceeded(response, errorBody) 820 821 default: 822 genericError := &smithy.GenericAPIError{ 823 Code: errorCode, 824 Message: errorMessage, 825 } 826 return genericError 827 828 } 829 } 830 831 func awsRestxml_deserializeOpHttpBindingsCreateCidrCollectionOutput(v *CreateCidrCollectionOutput, response *smithyhttp.Response) error { 832 if v == nil { 833 return fmt.Errorf("unsupported deserialization for nil %T", v) 834 } 835 836 if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { 837 headerValues[0] = strings.TrimSpace(headerValues[0]) 838 v.Location = ptr.String(headerValues[0]) 839 } 840 841 return nil 842 } 843 func awsRestxml_deserializeOpDocumentCreateCidrCollectionOutput(v **CreateCidrCollectionOutput, decoder smithyxml.NodeDecoder) error { 844 if v == nil { 845 return fmt.Errorf("unexpected nil of type %T", v) 846 } 847 var sv *CreateCidrCollectionOutput 848 if *v == nil { 849 sv = &CreateCidrCollectionOutput{} 850 } else { 851 sv = *v 852 } 853 854 for { 855 t, done, err := decoder.Token() 856 if err != nil { 857 return err 858 } 859 if done { 860 break 861 } 862 originalDecoder := decoder 863 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 864 switch { 865 case strings.EqualFold("Collection", t.Name.Local): 866 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 867 if err := awsRestxml_deserializeDocumentCidrCollection(&sv.Collection, nodeDecoder); err != nil { 868 return err 869 } 870 871 default: 872 // Do nothing and ignore the unexpected tag element 873 err = decoder.Decoder.Skip() 874 if err != nil { 875 return err 876 } 877 878 } 879 decoder = originalDecoder 880 } 881 *v = sv 882 return nil 883 } 884 885 type awsRestxml_deserializeOpCreateHealthCheck struct { 886 } 887 888 func (*awsRestxml_deserializeOpCreateHealthCheck) ID() string { 889 return "OperationDeserializer" 890 } 891 892 func (m *awsRestxml_deserializeOpCreateHealthCheck) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 893 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 894 ) { 895 out, metadata, err = next.HandleDeserialize(ctx, in) 896 if err != nil { 897 return out, metadata, err 898 } 899 900 response, ok := out.RawResponse.(*smithyhttp.Response) 901 if !ok { 902 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 903 } 904 905 if response.StatusCode < 200 || response.StatusCode >= 300 { 906 return out, metadata, awsRestxml_deserializeOpErrorCreateHealthCheck(response, &metadata) 907 } 908 output := &CreateHealthCheckOutput{} 909 out.Result = output 910 911 err = awsRestxml_deserializeOpHttpBindingsCreateHealthCheckOutput(output, response) 912 if err != nil { 913 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} 914 } 915 916 var buff [1024]byte 917 ringBuffer := smithyio.NewRingBuffer(buff[:]) 918 body := io.TeeReader(response.Body, ringBuffer) 919 rootDecoder := xml.NewDecoder(body) 920 t, err := smithyxml.FetchRootElement(rootDecoder) 921 if err == io.EOF { 922 return out, metadata, nil 923 } 924 if err != nil { 925 var snapshot bytes.Buffer 926 io.Copy(&snapshot, ringBuffer) 927 return out, metadata, &smithy.DeserializationError{ 928 Err: fmt.Errorf("failed to decode response body, %w", err), 929 Snapshot: snapshot.Bytes(), 930 } 931 } 932 933 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 934 err = awsRestxml_deserializeOpDocumentCreateHealthCheckOutput(&output, decoder) 935 if err != nil { 936 var snapshot bytes.Buffer 937 io.Copy(&snapshot, ringBuffer) 938 return out, metadata, &smithy.DeserializationError{ 939 Err: fmt.Errorf("failed to decode response body, %w", err), 940 Snapshot: snapshot.Bytes(), 941 } 942 } 943 944 return out, metadata, err 945 } 946 947 func awsRestxml_deserializeOpErrorCreateHealthCheck(response *smithyhttp.Response, metadata *middleware.Metadata) error { 948 var errorBuffer bytes.Buffer 949 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 950 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 951 } 952 errorBody := bytes.NewReader(errorBuffer.Bytes()) 953 954 errorCode := "UnknownError" 955 errorMessage := errorCode 956 957 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 958 if err != nil { 959 return err 960 } 961 if reqID := errorComponents.RequestID; len(reqID) != 0 { 962 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 963 } 964 if len(errorComponents.Code) != 0 { 965 errorCode = errorComponents.Code 966 } 967 if len(errorComponents.Message) != 0 { 968 errorMessage = errorComponents.Message 969 } 970 errorBody.Seek(0, io.SeekStart) 971 switch { 972 case strings.EqualFold("HealthCheckAlreadyExists", errorCode): 973 return awsRestxml_deserializeErrorHealthCheckAlreadyExists(response, errorBody) 974 975 case strings.EqualFold("InvalidInput", errorCode): 976 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 977 978 case strings.EqualFold("TooManyHealthChecks", errorCode): 979 return awsRestxml_deserializeErrorTooManyHealthChecks(response, errorBody) 980 981 default: 982 genericError := &smithy.GenericAPIError{ 983 Code: errorCode, 984 Message: errorMessage, 985 } 986 return genericError 987 988 } 989 } 990 991 func awsRestxml_deserializeOpHttpBindingsCreateHealthCheckOutput(v *CreateHealthCheckOutput, response *smithyhttp.Response) error { 992 if v == nil { 993 return fmt.Errorf("unsupported deserialization for nil %T", v) 994 } 995 996 if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { 997 headerValues[0] = strings.TrimSpace(headerValues[0]) 998 v.Location = ptr.String(headerValues[0]) 999 } 1000 1001 return nil 1002 } 1003 func awsRestxml_deserializeOpDocumentCreateHealthCheckOutput(v **CreateHealthCheckOutput, decoder smithyxml.NodeDecoder) error { 1004 if v == nil { 1005 return fmt.Errorf("unexpected nil of type %T", v) 1006 } 1007 var sv *CreateHealthCheckOutput 1008 if *v == nil { 1009 sv = &CreateHealthCheckOutput{} 1010 } else { 1011 sv = *v 1012 } 1013 1014 for { 1015 t, done, err := decoder.Token() 1016 if err != nil { 1017 return err 1018 } 1019 if done { 1020 break 1021 } 1022 originalDecoder := decoder 1023 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 1024 switch { 1025 case strings.EqualFold("HealthCheck", t.Name.Local): 1026 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1027 if err := awsRestxml_deserializeDocumentHealthCheck(&sv.HealthCheck, nodeDecoder); err != nil { 1028 return err 1029 } 1030 1031 default: 1032 // Do nothing and ignore the unexpected tag element 1033 err = decoder.Decoder.Skip() 1034 if err != nil { 1035 return err 1036 } 1037 1038 } 1039 decoder = originalDecoder 1040 } 1041 *v = sv 1042 return nil 1043 } 1044 1045 type awsRestxml_deserializeOpCreateHostedZone struct { 1046 } 1047 1048 func (*awsRestxml_deserializeOpCreateHostedZone) ID() string { 1049 return "OperationDeserializer" 1050 } 1051 1052 func (m *awsRestxml_deserializeOpCreateHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1053 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1054 ) { 1055 out, metadata, err = next.HandleDeserialize(ctx, in) 1056 if err != nil { 1057 return out, metadata, err 1058 } 1059 1060 response, ok := out.RawResponse.(*smithyhttp.Response) 1061 if !ok { 1062 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1063 } 1064 1065 if response.StatusCode < 200 || response.StatusCode >= 300 { 1066 return out, metadata, awsRestxml_deserializeOpErrorCreateHostedZone(response, &metadata) 1067 } 1068 output := &CreateHostedZoneOutput{} 1069 out.Result = output 1070 1071 err = awsRestxml_deserializeOpHttpBindingsCreateHostedZoneOutput(output, response) 1072 if err != nil { 1073 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} 1074 } 1075 1076 var buff [1024]byte 1077 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1078 body := io.TeeReader(response.Body, ringBuffer) 1079 rootDecoder := xml.NewDecoder(body) 1080 t, err := smithyxml.FetchRootElement(rootDecoder) 1081 if err == io.EOF { 1082 return out, metadata, nil 1083 } 1084 if err != nil { 1085 var snapshot bytes.Buffer 1086 io.Copy(&snapshot, ringBuffer) 1087 return out, metadata, &smithy.DeserializationError{ 1088 Err: fmt.Errorf("failed to decode response body, %w", err), 1089 Snapshot: snapshot.Bytes(), 1090 } 1091 } 1092 1093 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1094 err = awsRestxml_deserializeOpDocumentCreateHostedZoneOutput(&output, decoder) 1095 if err != nil { 1096 var snapshot bytes.Buffer 1097 io.Copy(&snapshot, ringBuffer) 1098 return out, metadata, &smithy.DeserializationError{ 1099 Err: fmt.Errorf("failed to decode response body, %w", err), 1100 Snapshot: snapshot.Bytes(), 1101 } 1102 } 1103 1104 return out, metadata, err 1105 } 1106 1107 func awsRestxml_deserializeOpErrorCreateHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1108 var errorBuffer bytes.Buffer 1109 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1110 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1111 } 1112 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1113 1114 errorCode := "UnknownError" 1115 errorMessage := errorCode 1116 1117 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1118 if err != nil { 1119 return err 1120 } 1121 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1122 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1123 } 1124 if len(errorComponents.Code) != 0 { 1125 errorCode = errorComponents.Code 1126 } 1127 if len(errorComponents.Message) != 0 { 1128 errorMessage = errorComponents.Message 1129 } 1130 errorBody.Seek(0, io.SeekStart) 1131 switch { 1132 case strings.EqualFold("ConflictingDomainExists", errorCode): 1133 return awsRestxml_deserializeErrorConflictingDomainExists(response, errorBody) 1134 1135 case strings.EqualFold("DelegationSetNotAvailable", errorCode): 1136 return awsRestxml_deserializeErrorDelegationSetNotAvailable(response, errorBody) 1137 1138 case strings.EqualFold("DelegationSetNotReusable", errorCode): 1139 return awsRestxml_deserializeErrorDelegationSetNotReusable(response, errorBody) 1140 1141 case strings.EqualFold("HostedZoneAlreadyExists", errorCode): 1142 return awsRestxml_deserializeErrorHostedZoneAlreadyExists(response, errorBody) 1143 1144 case strings.EqualFold("InvalidDomainName", errorCode): 1145 return awsRestxml_deserializeErrorInvalidDomainName(response, errorBody) 1146 1147 case strings.EqualFold("InvalidInput", errorCode): 1148 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 1149 1150 case strings.EqualFold("InvalidVPCId", errorCode): 1151 return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) 1152 1153 case strings.EqualFold("NoSuchDelegationSet", errorCode): 1154 return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) 1155 1156 case strings.EqualFold("TooManyHostedZones", errorCode): 1157 return awsRestxml_deserializeErrorTooManyHostedZones(response, errorBody) 1158 1159 default: 1160 genericError := &smithy.GenericAPIError{ 1161 Code: errorCode, 1162 Message: errorMessage, 1163 } 1164 return genericError 1165 1166 } 1167 } 1168 1169 func awsRestxml_deserializeOpHttpBindingsCreateHostedZoneOutput(v *CreateHostedZoneOutput, response *smithyhttp.Response) error { 1170 if v == nil { 1171 return fmt.Errorf("unsupported deserialization for nil %T", v) 1172 } 1173 1174 if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { 1175 headerValues[0] = strings.TrimSpace(headerValues[0]) 1176 v.Location = ptr.String(headerValues[0]) 1177 } 1178 1179 return nil 1180 } 1181 func awsRestxml_deserializeOpDocumentCreateHostedZoneOutput(v **CreateHostedZoneOutput, decoder smithyxml.NodeDecoder) error { 1182 if v == nil { 1183 return fmt.Errorf("unexpected nil of type %T", v) 1184 } 1185 var sv *CreateHostedZoneOutput 1186 if *v == nil { 1187 sv = &CreateHostedZoneOutput{} 1188 } else { 1189 sv = *v 1190 } 1191 1192 for { 1193 t, done, err := decoder.Token() 1194 if err != nil { 1195 return err 1196 } 1197 if done { 1198 break 1199 } 1200 originalDecoder := decoder 1201 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 1202 switch { 1203 case strings.EqualFold("ChangeInfo", t.Name.Local): 1204 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1205 if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { 1206 return err 1207 } 1208 1209 case strings.EqualFold("DelegationSet", t.Name.Local): 1210 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1211 if err := awsRestxml_deserializeDocumentDelegationSet(&sv.DelegationSet, nodeDecoder); err != nil { 1212 return err 1213 } 1214 1215 case strings.EqualFold("HostedZone", t.Name.Local): 1216 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1217 if err := awsRestxml_deserializeDocumentHostedZone(&sv.HostedZone, nodeDecoder); err != nil { 1218 return err 1219 } 1220 1221 case strings.EqualFold("VPC", t.Name.Local): 1222 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1223 if err := awsRestxml_deserializeDocumentVPC(&sv.VPC, nodeDecoder); err != nil { 1224 return err 1225 } 1226 1227 default: 1228 // Do nothing and ignore the unexpected tag element 1229 err = decoder.Decoder.Skip() 1230 if err != nil { 1231 return err 1232 } 1233 1234 } 1235 decoder = originalDecoder 1236 } 1237 *v = sv 1238 return nil 1239 } 1240 1241 type awsRestxml_deserializeOpCreateKeySigningKey struct { 1242 } 1243 1244 func (*awsRestxml_deserializeOpCreateKeySigningKey) ID() string { 1245 return "OperationDeserializer" 1246 } 1247 1248 func (m *awsRestxml_deserializeOpCreateKeySigningKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1249 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1250 ) { 1251 out, metadata, err = next.HandleDeserialize(ctx, in) 1252 if err != nil { 1253 return out, metadata, err 1254 } 1255 1256 response, ok := out.RawResponse.(*smithyhttp.Response) 1257 if !ok { 1258 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1259 } 1260 1261 if response.StatusCode < 200 || response.StatusCode >= 300 { 1262 return out, metadata, awsRestxml_deserializeOpErrorCreateKeySigningKey(response, &metadata) 1263 } 1264 output := &CreateKeySigningKeyOutput{} 1265 out.Result = output 1266 1267 err = awsRestxml_deserializeOpHttpBindingsCreateKeySigningKeyOutput(output, response) 1268 if err != nil { 1269 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} 1270 } 1271 1272 var buff [1024]byte 1273 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1274 body := io.TeeReader(response.Body, ringBuffer) 1275 rootDecoder := xml.NewDecoder(body) 1276 t, err := smithyxml.FetchRootElement(rootDecoder) 1277 if err == io.EOF { 1278 return out, metadata, nil 1279 } 1280 if err != nil { 1281 var snapshot bytes.Buffer 1282 io.Copy(&snapshot, ringBuffer) 1283 return out, metadata, &smithy.DeserializationError{ 1284 Err: fmt.Errorf("failed to decode response body, %w", err), 1285 Snapshot: snapshot.Bytes(), 1286 } 1287 } 1288 1289 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1290 err = awsRestxml_deserializeOpDocumentCreateKeySigningKeyOutput(&output, decoder) 1291 if err != nil { 1292 var snapshot bytes.Buffer 1293 io.Copy(&snapshot, ringBuffer) 1294 return out, metadata, &smithy.DeserializationError{ 1295 Err: fmt.Errorf("failed to decode response body, %w", err), 1296 Snapshot: snapshot.Bytes(), 1297 } 1298 } 1299 1300 return out, metadata, err 1301 } 1302 1303 func awsRestxml_deserializeOpErrorCreateKeySigningKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1304 var errorBuffer bytes.Buffer 1305 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1306 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1307 } 1308 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1309 1310 errorCode := "UnknownError" 1311 errorMessage := errorCode 1312 1313 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1314 if err != nil { 1315 return err 1316 } 1317 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1318 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1319 } 1320 if len(errorComponents.Code) != 0 { 1321 errorCode = errorComponents.Code 1322 } 1323 if len(errorComponents.Message) != 0 { 1324 errorMessage = errorComponents.Message 1325 } 1326 errorBody.Seek(0, io.SeekStart) 1327 switch { 1328 case strings.EqualFold("ConcurrentModification", errorCode): 1329 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 1330 1331 case strings.EqualFold("InvalidArgument", errorCode): 1332 return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) 1333 1334 case strings.EqualFold("InvalidInput", errorCode): 1335 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 1336 1337 case strings.EqualFold("InvalidKMSArn", errorCode): 1338 return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) 1339 1340 case strings.EqualFold("InvalidKeySigningKeyName", errorCode): 1341 return awsRestxml_deserializeErrorInvalidKeySigningKeyName(response, errorBody) 1342 1343 case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): 1344 return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) 1345 1346 case strings.EqualFold("InvalidSigningStatus", errorCode): 1347 return awsRestxml_deserializeErrorInvalidSigningStatus(response, errorBody) 1348 1349 case strings.EqualFold("KeySigningKeyAlreadyExists", errorCode): 1350 return awsRestxml_deserializeErrorKeySigningKeyAlreadyExists(response, errorBody) 1351 1352 case strings.EqualFold("NoSuchHostedZone", errorCode): 1353 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 1354 1355 case strings.EqualFold("TooManyKeySigningKeys", errorCode): 1356 return awsRestxml_deserializeErrorTooManyKeySigningKeys(response, errorBody) 1357 1358 default: 1359 genericError := &smithy.GenericAPIError{ 1360 Code: errorCode, 1361 Message: errorMessage, 1362 } 1363 return genericError 1364 1365 } 1366 } 1367 1368 func awsRestxml_deserializeOpHttpBindingsCreateKeySigningKeyOutput(v *CreateKeySigningKeyOutput, response *smithyhttp.Response) error { 1369 if v == nil { 1370 return fmt.Errorf("unsupported deserialization for nil %T", v) 1371 } 1372 1373 if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { 1374 headerValues[0] = strings.TrimSpace(headerValues[0]) 1375 v.Location = ptr.String(headerValues[0]) 1376 } 1377 1378 return nil 1379 } 1380 func awsRestxml_deserializeOpDocumentCreateKeySigningKeyOutput(v **CreateKeySigningKeyOutput, decoder smithyxml.NodeDecoder) error { 1381 if v == nil { 1382 return fmt.Errorf("unexpected nil of type %T", v) 1383 } 1384 var sv *CreateKeySigningKeyOutput 1385 if *v == nil { 1386 sv = &CreateKeySigningKeyOutput{} 1387 } else { 1388 sv = *v 1389 } 1390 1391 for { 1392 t, done, err := decoder.Token() 1393 if err != nil { 1394 return err 1395 } 1396 if done { 1397 break 1398 } 1399 originalDecoder := decoder 1400 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 1401 switch { 1402 case strings.EqualFold("ChangeInfo", t.Name.Local): 1403 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1404 if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { 1405 return err 1406 } 1407 1408 case strings.EqualFold("KeySigningKey", t.Name.Local): 1409 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1410 if err := awsRestxml_deserializeDocumentKeySigningKey(&sv.KeySigningKey, nodeDecoder); err != nil { 1411 return err 1412 } 1413 1414 default: 1415 // Do nothing and ignore the unexpected tag element 1416 err = decoder.Decoder.Skip() 1417 if err != nil { 1418 return err 1419 } 1420 1421 } 1422 decoder = originalDecoder 1423 } 1424 *v = sv 1425 return nil 1426 } 1427 1428 type awsRestxml_deserializeOpCreateQueryLoggingConfig struct { 1429 } 1430 1431 func (*awsRestxml_deserializeOpCreateQueryLoggingConfig) ID() string { 1432 return "OperationDeserializer" 1433 } 1434 1435 func (m *awsRestxml_deserializeOpCreateQueryLoggingConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1436 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1437 ) { 1438 out, metadata, err = next.HandleDeserialize(ctx, in) 1439 if err != nil { 1440 return out, metadata, err 1441 } 1442 1443 response, ok := out.RawResponse.(*smithyhttp.Response) 1444 if !ok { 1445 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1446 } 1447 1448 if response.StatusCode < 200 || response.StatusCode >= 300 { 1449 return out, metadata, awsRestxml_deserializeOpErrorCreateQueryLoggingConfig(response, &metadata) 1450 } 1451 output := &CreateQueryLoggingConfigOutput{} 1452 out.Result = output 1453 1454 err = awsRestxml_deserializeOpHttpBindingsCreateQueryLoggingConfigOutput(output, response) 1455 if err != nil { 1456 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} 1457 } 1458 1459 var buff [1024]byte 1460 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1461 body := io.TeeReader(response.Body, ringBuffer) 1462 rootDecoder := xml.NewDecoder(body) 1463 t, err := smithyxml.FetchRootElement(rootDecoder) 1464 if err == io.EOF { 1465 return out, metadata, nil 1466 } 1467 if err != nil { 1468 var snapshot bytes.Buffer 1469 io.Copy(&snapshot, ringBuffer) 1470 return out, metadata, &smithy.DeserializationError{ 1471 Err: fmt.Errorf("failed to decode response body, %w", err), 1472 Snapshot: snapshot.Bytes(), 1473 } 1474 } 1475 1476 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1477 err = awsRestxml_deserializeOpDocumentCreateQueryLoggingConfigOutput(&output, decoder) 1478 if err != nil { 1479 var snapshot bytes.Buffer 1480 io.Copy(&snapshot, ringBuffer) 1481 return out, metadata, &smithy.DeserializationError{ 1482 Err: fmt.Errorf("failed to decode response body, %w", err), 1483 Snapshot: snapshot.Bytes(), 1484 } 1485 } 1486 1487 return out, metadata, err 1488 } 1489 1490 func awsRestxml_deserializeOpErrorCreateQueryLoggingConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1491 var errorBuffer bytes.Buffer 1492 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1493 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1494 } 1495 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1496 1497 errorCode := "UnknownError" 1498 errorMessage := errorCode 1499 1500 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1501 if err != nil { 1502 return err 1503 } 1504 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1505 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1506 } 1507 if len(errorComponents.Code) != 0 { 1508 errorCode = errorComponents.Code 1509 } 1510 if len(errorComponents.Message) != 0 { 1511 errorMessage = errorComponents.Message 1512 } 1513 errorBody.Seek(0, io.SeekStart) 1514 switch { 1515 case strings.EqualFold("ConcurrentModification", errorCode): 1516 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 1517 1518 case strings.EqualFold("InsufficientCloudWatchLogsResourcePolicy", errorCode): 1519 return awsRestxml_deserializeErrorInsufficientCloudWatchLogsResourcePolicy(response, errorBody) 1520 1521 case strings.EqualFold("InvalidInput", errorCode): 1522 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 1523 1524 case strings.EqualFold("NoSuchCloudWatchLogsLogGroup", errorCode): 1525 return awsRestxml_deserializeErrorNoSuchCloudWatchLogsLogGroup(response, errorBody) 1526 1527 case strings.EqualFold("NoSuchHostedZone", errorCode): 1528 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 1529 1530 case strings.EqualFold("QueryLoggingConfigAlreadyExists", errorCode): 1531 return awsRestxml_deserializeErrorQueryLoggingConfigAlreadyExists(response, errorBody) 1532 1533 default: 1534 genericError := &smithy.GenericAPIError{ 1535 Code: errorCode, 1536 Message: errorMessage, 1537 } 1538 return genericError 1539 1540 } 1541 } 1542 1543 func awsRestxml_deserializeOpHttpBindingsCreateQueryLoggingConfigOutput(v *CreateQueryLoggingConfigOutput, response *smithyhttp.Response) error { 1544 if v == nil { 1545 return fmt.Errorf("unsupported deserialization for nil %T", v) 1546 } 1547 1548 if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { 1549 headerValues[0] = strings.TrimSpace(headerValues[0]) 1550 v.Location = ptr.String(headerValues[0]) 1551 } 1552 1553 return nil 1554 } 1555 func awsRestxml_deserializeOpDocumentCreateQueryLoggingConfigOutput(v **CreateQueryLoggingConfigOutput, decoder smithyxml.NodeDecoder) error { 1556 if v == nil { 1557 return fmt.Errorf("unexpected nil of type %T", v) 1558 } 1559 var sv *CreateQueryLoggingConfigOutput 1560 if *v == nil { 1561 sv = &CreateQueryLoggingConfigOutput{} 1562 } else { 1563 sv = *v 1564 } 1565 1566 for { 1567 t, done, err := decoder.Token() 1568 if err != nil { 1569 return err 1570 } 1571 if done { 1572 break 1573 } 1574 originalDecoder := decoder 1575 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 1576 switch { 1577 case strings.EqualFold("QueryLoggingConfig", t.Name.Local): 1578 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1579 if err := awsRestxml_deserializeDocumentQueryLoggingConfig(&sv.QueryLoggingConfig, nodeDecoder); err != nil { 1580 return err 1581 } 1582 1583 default: 1584 // Do nothing and ignore the unexpected tag element 1585 err = decoder.Decoder.Skip() 1586 if err != nil { 1587 return err 1588 } 1589 1590 } 1591 decoder = originalDecoder 1592 } 1593 *v = sv 1594 return nil 1595 } 1596 1597 type awsRestxml_deserializeOpCreateReusableDelegationSet struct { 1598 } 1599 1600 func (*awsRestxml_deserializeOpCreateReusableDelegationSet) ID() string { 1601 return "OperationDeserializer" 1602 } 1603 1604 func (m *awsRestxml_deserializeOpCreateReusableDelegationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1605 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1606 ) { 1607 out, metadata, err = next.HandleDeserialize(ctx, in) 1608 if err != nil { 1609 return out, metadata, err 1610 } 1611 1612 response, ok := out.RawResponse.(*smithyhttp.Response) 1613 if !ok { 1614 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1615 } 1616 1617 if response.StatusCode < 200 || response.StatusCode >= 300 { 1618 return out, metadata, awsRestxml_deserializeOpErrorCreateReusableDelegationSet(response, &metadata) 1619 } 1620 output := &CreateReusableDelegationSetOutput{} 1621 out.Result = output 1622 1623 err = awsRestxml_deserializeOpHttpBindingsCreateReusableDelegationSetOutput(output, response) 1624 if err != nil { 1625 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} 1626 } 1627 1628 var buff [1024]byte 1629 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1630 body := io.TeeReader(response.Body, ringBuffer) 1631 rootDecoder := xml.NewDecoder(body) 1632 t, err := smithyxml.FetchRootElement(rootDecoder) 1633 if err == io.EOF { 1634 return out, metadata, nil 1635 } 1636 if err != nil { 1637 var snapshot bytes.Buffer 1638 io.Copy(&snapshot, ringBuffer) 1639 return out, metadata, &smithy.DeserializationError{ 1640 Err: fmt.Errorf("failed to decode response body, %w", err), 1641 Snapshot: snapshot.Bytes(), 1642 } 1643 } 1644 1645 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1646 err = awsRestxml_deserializeOpDocumentCreateReusableDelegationSetOutput(&output, decoder) 1647 if err != nil { 1648 var snapshot bytes.Buffer 1649 io.Copy(&snapshot, ringBuffer) 1650 return out, metadata, &smithy.DeserializationError{ 1651 Err: fmt.Errorf("failed to decode response body, %w", err), 1652 Snapshot: snapshot.Bytes(), 1653 } 1654 } 1655 1656 return out, metadata, err 1657 } 1658 1659 func awsRestxml_deserializeOpErrorCreateReusableDelegationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1660 var errorBuffer bytes.Buffer 1661 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1662 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1663 } 1664 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1665 1666 errorCode := "UnknownError" 1667 errorMessage := errorCode 1668 1669 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1670 if err != nil { 1671 return err 1672 } 1673 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1674 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1675 } 1676 if len(errorComponents.Code) != 0 { 1677 errorCode = errorComponents.Code 1678 } 1679 if len(errorComponents.Message) != 0 { 1680 errorMessage = errorComponents.Message 1681 } 1682 errorBody.Seek(0, io.SeekStart) 1683 switch { 1684 case strings.EqualFold("DelegationSetAlreadyCreated", errorCode): 1685 return awsRestxml_deserializeErrorDelegationSetAlreadyCreated(response, errorBody) 1686 1687 case strings.EqualFold("DelegationSetAlreadyReusable", errorCode): 1688 return awsRestxml_deserializeErrorDelegationSetAlreadyReusable(response, errorBody) 1689 1690 case strings.EqualFold("DelegationSetNotAvailable", errorCode): 1691 return awsRestxml_deserializeErrorDelegationSetNotAvailable(response, errorBody) 1692 1693 case strings.EqualFold("HostedZoneNotFound", errorCode): 1694 return awsRestxml_deserializeErrorHostedZoneNotFound(response, errorBody) 1695 1696 case strings.EqualFold("InvalidArgument", errorCode): 1697 return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) 1698 1699 case strings.EqualFold("InvalidInput", errorCode): 1700 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 1701 1702 case strings.EqualFold("LimitsExceeded", errorCode): 1703 return awsRestxml_deserializeErrorLimitsExceeded(response, errorBody) 1704 1705 default: 1706 genericError := &smithy.GenericAPIError{ 1707 Code: errorCode, 1708 Message: errorMessage, 1709 } 1710 return genericError 1711 1712 } 1713 } 1714 1715 func awsRestxml_deserializeOpHttpBindingsCreateReusableDelegationSetOutput(v *CreateReusableDelegationSetOutput, response *smithyhttp.Response) error { 1716 if v == nil { 1717 return fmt.Errorf("unsupported deserialization for nil %T", v) 1718 } 1719 1720 if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { 1721 headerValues[0] = strings.TrimSpace(headerValues[0]) 1722 v.Location = ptr.String(headerValues[0]) 1723 } 1724 1725 return nil 1726 } 1727 func awsRestxml_deserializeOpDocumentCreateReusableDelegationSetOutput(v **CreateReusableDelegationSetOutput, decoder smithyxml.NodeDecoder) error { 1728 if v == nil { 1729 return fmt.Errorf("unexpected nil of type %T", v) 1730 } 1731 var sv *CreateReusableDelegationSetOutput 1732 if *v == nil { 1733 sv = &CreateReusableDelegationSetOutput{} 1734 } else { 1735 sv = *v 1736 } 1737 1738 for { 1739 t, done, err := decoder.Token() 1740 if err != nil { 1741 return err 1742 } 1743 if done { 1744 break 1745 } 1746 originalDecoder := decoder 1747 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 1748 switch { 1749 case strings.EqualFold("DelegationSet", t.Name.Local): 1750 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1751 if err := awsRestxml_deserializeDocumentDelegationSet(&sv.DelegationSet, nodeDecoder); err != nil { 1752 return err 1753 } 1754 1755 default: 1756 // Do nothing and ignore the unexpected tag element 1757 err = decoder.Decoder.Skip() 1758 if err != nil { 1759 return err 1760 } 1761 1762 } 1763 decoder = originalDecoder 1764 } 1765 *v = sv 1766 return nil 1767 } 1768 1769 type awsRestxml_deserializeOpCreateTrafficPolicy struct { 1770 } 1771 1772 func (*awsRestxml_deserializeOpCreateTrafficPolicy) ID() string { 1773 return "OperationDeserializer" 1774 } 1775 1776 func (m *awsRestxml_deserializeOpCreateTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1777 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1778 ) { 1779 out, metadata, err = next.HandleDeserialize(ctx, in) 1780 if err != nil { 1781 return out, metadata, err 1782 } 1783 1784 response, ok := out.RawResponse.(*smithyhttp.Response) 1785 if !ok { 1786 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1787 } 1788 1789 if response.StatusCode < 200 || response.StatusCode >= 300 { 1790 return out, metadata, awsRestxml_deserializeOpErrorCreateTrafficPolicy(response, &metadata) 1791 } 1792 output := &CreateTrafficPolicyOutput{} 1793 out.Result = output 1794 1795 err = awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyOutput(output, response) 1796 if err != nil { 1797 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} 1798 } 1799 1800 var buff [1024]byte 1801 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1802 body := io.TeeReader(response.Body, ringBuffer) 1803 rootDecoder := xml.NewDecoder(body) 1804 t, err := smithyxml.FetchRootElement(rootDecoder) 1805 if err == io.EOF { 1806 return out, metadata, nil 1807 } 1808 if err != nil { 1809 var snapshot bytes.Buffer 1810 io.Copy(&snapshot, ringBuffer) 1811 return out, metadata, &smithy.DeserializationError{ 1812 Err: fmt.Errorf("failed to decode response body, %w", err), 1813 Snapshot: snapshot.Bytes(), 1814 } 1815 } 1816 1817 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1818 err = awsRestxml_deserializeOpDocumentCreateTrafficPolicyOutput(&output, decoder) 1819 if err != nil { 1820 var snapshot bytes.Buffer 1821 io.Copy(&snapshot, ringBuffer) 1822 return out, metadata, &smithy.DeserializationError{ 1823 Err: fmt.Errorf("failed to decode response body, %w", err), 1824 Snapshot: snapshot.Bytes(), 1825 } 1826 } 1827 1828 return out, metadata, err 1829 } 1830 1831 func awsRestxml_deserializeOpErrorCreateTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1832 var errorBuffer bytes.Buffer 1833 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1834 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1835 } 1836 errorBody := bytes.NewReader(errorBuffer.Bytes()) 1837 1838 errorCode := "UnknownError" 1839 errorMessage := errorCode 1840 1841 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 1842 if err != nil { 1843 return err 1844 } 1845 if reqID := errorComponents.RequestID; len(reqID) != 0 { 1846 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 1847 } 1848 if len(errorComponents.Code) != 0 { 1849 errorCode = errorComponents.Code 1850 } 1851 if len(errorComponents.Message) != 0 { 1852 errorMessage = errorComponents.Message 1853 } 1854 errorBody.Seek(0, io.SeekStart) 1855 switch { 1856 case strings.EqualFold("InvalidInput", errorCode): 1857 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 1858 1859 case strings.EqualFold("InvalidTrafficPolicyDocument", errorCode): 1860 return awsRestxml_deserializeErrorInvalidTrafficPolicyDocument(response, errorBody) 1861 1862 case strings.EqualFold("TooManyTrafficPolicies", errorCode): 1863 return awsRestxml_deserializeErrorTooManyTrafficPolicies(response, errorBody) 1864 1865 case strings.EqualFold("TrafficPolicyAlreadyExists", errorCode): 1866 return awsRestxml_deserializeErrorTrafficPolicyAlreadyExists(response, errorBody) 1867 1868 default: 1869 genericError := &smithy.GenericAPIError{ 1870 Code: errorCode, 1871 Message: errorMessage, 1872 } 1873 return genericError 1874 1875 } 1876 } 1877 1878 func awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyOutput(v *CreateTrafficPolicyOutput, response *smithyhttp.Response) error { 1879 if v == nil { 1880 return fmt.Errorf("unsupported deserialization for nil %T", v) 1881 } 1882 1883 if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { 1884 headerValues[0] = strings.TrimSpace(headerValues[0]) 1885 v.Location = ptr.String(headerValues[0]) 1886 } 1887 1888 return nil 1889 } 1890 func awsRestxml_deserializeOpDocumentCreateTrafficPolicyOutput(v **CreateTrafficPolicyOutput, decoder smithyxml.NodeDecoder) error { 1891 if v == nil { 1892 return fmt.Errorf("unexpected nil of type %T", v) 1893 } 1894 var sv *CreateTrafficPolicyOutput 1895 if *v == nil { 1896 sv = &CreateTrafficPolicyOutput{} 1897 } else { 1898 sv = *v 1899 } 1900 1901 for { 1902 t, done, err := decoder.Token() 1903 if err != nil { 1904 return err 1905 } 1906 if done { 1907 break 1908 } 1909 originalDecoder := decoder 1910 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 1911 switch { 1912 case strings.EqualFold("TrafficPolicy", t.Name.Local): 1913 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 1914 if err := awsRestxml_deserializeDocumentTrafficPolicy(&sv.TrafficPolicy, nodeDecoder); err != nil { 1915 return err 1916 } 1917 1918 default: 1919 // Do nothing and ignore the unexpected tag element 1920 err = decoder.Decoder.Skip() 1921 if err != nil { 1922 return err 1923 } 1924 1925 } 1926 decoder = originalDecoder 1927 } 1928 *v = sv 1929 return nil 1930 } 1931 1932 type awsRestxml_deserializeOpCreateTrafficPolicyInstance struct { 1933 } 1934 1935 func (*awsRestxml_deserializeOpCreateTrafficPolicyInstance) ID() string { 1936 return "OperationDeserializer" 1937 } 1938 1939 func (m *awsRestxml_deserializeOpCreateTrafficPolicyInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 1940 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 1941 ) { 1942 out, metadata, err = next.HandleDeserialize(ctx, in) 1943 if err != nil { 1944 return out, metadata, err 1945 } 1946 1947 response, ok := out.RawResponse.(*smithyhttp.Response) 1948 if !ok { 1949 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 1950 } 1951 1952 if response.StatusCode < 200 || response.StatusCode >= 300 { 1953 return out, metadata, awsRestxml_deserializeOpErrorCreateTrafficPolicyInstance(response, &metadata) 1954 } 1955 output := &CreateTrafficPolicyInstanceOutput{} 1956 out.Result = output 1957 1958 err = awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyInstanceOutput(output, response) 1959 if err != nil { 1960 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} 1961 } 1962 1963 var buff [1024]byte 1964 ringBuffer := smithyio.NewRingBuffer(buff[:]) 1965 body := io.TeeReader(response.Body, ringBuffer) 1966 rootDecoder := xml.NewDecoder(body) 1967 t, err := smithyxml.FetchRootElement(rootDecoder) 1968 if err == io.EOF { 1969 return out, metadata, nil 1970 } 1971 if err != nil { 1972 var snapshot bytes.Buffer 1973 io.Copy(&snapshot, ringBuffer) 1974 return out, metadata, &smithy.DeserializationError{ 1975 Err: fmt.Errorf("failed to decode response body, %w", err), 1976 Snapshot: snapshot.Bytes(), 1977 } 1978 } 1979 1980 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 1981 err = awsRestxml_deserializeOpDocumentCreateTrafficPolicyInstanceOutput(&output, decoder) 1982 if err != nil { 1983 var snapshot bytes.Buffer 1984 io.Copy(&snapshot, ringBuffer) 1985 return out, metadata, &smithy.DeserializationError{ 1986 Err: fmt.Errorf("failed to decode response body, %w", err), 1987 Snapshot: snapshot.Bytes(), 1988 } 1989 } 1990 1991 return out, metadata, err 1992 } 1993 1994 func awsRestxml_deserializeOpErrorCreateTrafficPolicyInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { 1995 var errorBuffer bytes.Buffer 1996 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 1997 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 1998 } 1999 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2000 2001 errorCode := "UnknownError" 2002 errorMessage := errorCode 2003 2004 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2005 if err != nil { 2006 return err 2007 } 2008 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2009 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2010 } 2011 if len(errorComponents.Code) != 0 { 2012 errorCode = errorComponents.Code 2013 } 2014 if len(errorComponents.Message) != 0 { 2015 errorMessage = errorComponents.Message 2016 } 2017 errorBody.Seek(0, io.SeekStart) 2018 switch { 2019 case strings.EqualFold("InvalidInput", errorCode): 2020 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 2021 2022 case strings.EqualFold("NoSuchHostedZone", errorCode): 2023 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 2024 2025 case strings.EqualFold("NoSuchTrafficPolicy", errorCode): 2026 return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) 2027 2028 case strings.EqualFold("TooManyTrafficPolicyInstances", errorCode): 2029 return awsRestxml_deserializeErrorTooManyTrafficPolicyInstances(response, errorBody) 2030 2031 case strings.EqualFold("TrafficPolicyInstanceAlreadyExists", errorCode): 2032 return awsRestxml_deserializeErrorTrafficPolicyInstanceAlreadyExists(response, errorBody) 2033 2034 default: 2035 genericError := &smithy.GenericAPIError{ 2036 Code: errorCode, 2037 Message: errorMessage, 2038 } 2039 return genericError 2040 2041 } 2042 } 2043 2044 func awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyInstanceOutput(v *CreateTrafficPolicyInstanceOutput, response *smithyhttp.Response) error { 2045 if v == nil { 2046 return fmt.Errorf("unsupported deserialization for nil %T", v) 2047 } 2048 2049 if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { 2050 headerValues[0] = strings.TrimSpace(headerValues[0]) 2051 v.Location = ptr.String(headerValues[0]) 2052 } 2053 2054 return nil 2055 } 2056 func awsRestxml_deserializeOpDocumentCreateTrafficPolicyInstanceOutput(v **CreateTrafficPolicyInstanceOutput, decoder smithyxml.NodeDecoder) error { 2057 if v == nil { 2058 return fmt.Errorf("unexpected nil of type %T", v) 2059 } 2060 var sv *CreateTrafficPolicyInstanceOutput 2061 if *v == nil { 2062 sv = &CreateTrafficPolicyInstanceOutput{} 2063 } else { 2064 sv = *v 2065 } 2066 2067 for { 2068 t, done, err := decoder.Token() 2069 if err != nil { 2070 return err 2071 } 2072 if done { 2073 break 2074 } 2075 originalDecoder := decoder 2076 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 2077 switch { 2078 case strings.EqualFold("TrafficPolicyInstance", t.Name.Local): 2079 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2080 if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&sv.TrafficPolicyInstance, nodeDecoder); err != nil { 2081 return err 2082 } 2083 2084 default: 2085 // Do nothing and ignore the unexpected tag element 2086 err = decoder.Decoder.Skip() 2087 if err != nil { 2088 return err 2089 } 2090 2091 } 2092 decoder = originalDecoder 2093 } 2094 *v = sv 2095 return nil 2096 } 2097 2098 type awsRestxml_deserializeOpCreateTrafficPolicyVersion struct { 2099 } 2100 2101 func (*awsRestxml_deserializeOpCreateTrafficPolicyVersion) ID() string { 2102 return "OperationDeserializer" 2103 } 2104 2105 func (m *awsRestxml_deserializeOpCreateTrafficPolicyVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2106 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2107 ) { 2108 out, metadata, err = next.HandleDeserialize(ctx, in) 2109 if err != nil { 2110 return out, metadata, err 2111 } 2112 2113 response, ok := out.RawResponse.(*smithyhttp.Response) 2114 if !ok { 2115 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2116 } 2117 2118 if response.StatusCode < 200 || response.StatusCode >= 300 { 2119 return out, metadata, awsRestxml_deserializeOpErrorCreateTrafficPolicyVersion(response, &metadata) 2120 } 2121 output := &CreateTrafficPolicyVersionOutput{} 2122 out.Result = output 2123 2124 err = awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyVersionOutput(output, response) 2125 if err != nil { 2126 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} 2127 } 2128 2129 var buff [1024]byte 2130 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2131 body := io.TeeReader(response.Body, ringBuffer) 2132 rootDecoder := xml.NewDecoder(body) 2133 t, err := smithyxml.FetchRootElement(rootDecoder) 2134 if err == io.EOF { 2135 return out, metadata, nil 2136 } 2137 if err != nil { 2138 var snapshot bytes.Buffer 2139 io.Copy(&snapshot, ringBuffer) 2140 return out, metadata, &smithy.DeserializationError{ 2141 Err: fmt.Errorf("failed to decode response body, %w", err), 2142 Snapshot: snapshot.Bytes(), 2143 } 2144 } 2145 2146 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2147 err = awsRestxml_deserializeOpDocumentCreateTrafficPolicyVersionOutput(&output, decoder) 2148 if err != nil { 2149 var snapshot bytes.Buffer 2150 io.Copy(&snapshot, ringBuffer) 2151 return out, metadata, &smithy.DeserializationError{ 2152 Err: fmt.Errorf("failed to decode response body, %w", err), 2153 Snapshot: snapshot.Bytes(), 2154 } 2155 } 2156 2157 return out, metadata, err 2158 } 2159 2160 func awsRestxml_deserializeOpErrorCreateTrafficPolicyVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2161 var errorBuffer bytes.Buffer 2162 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2163 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2164 } 2165 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2166 2167 errorCode := "UnknownError" 2168 errorMessage := errorCode 2169 2170 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2171 if err != nil { 2172 return err 2173 } 2174 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2175 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2176 } 2177 if len(errorComponents.Code) != 0 { 2178 errorCode = errorComponents.Code 2179 } 2180 if len(errorComponents.Message) != 0 { 2181 errorMessage = errorComponents.Message 2182 } 2183 errorBody.Seek(0, io.SeekStart) 2184 switch { 2185 case strings.EqualFold("ConcurrentModification", errorCode): 2186 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 2187 2188 case strings.EqualFold("InvalidInput", errorCode): 2189 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 2190 2191 case strings.EqualFold("InvalidTrafficPolicyDocument", errorCode): 2192 return awsRestxml_deserializeErrorInvalidTrafficPolicyDocument(response, errorBody) 2193 2194 case strings.EqualFold("NoSuchTrafficPolicy", errorCode): 2195 return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) 2196 2197 case strings.EqualFold("TooManyTrafficPolicyVersionsForCurrentPolicy", errorCode): 2198 return awsRestxml_deserializeErrorTooManyTrafficPolicyVersionsForCurrentPolicy(response, errorBody) 2199 2200 default: 2201 genericError := &smithy.GenericAPIError{ 2202 Code: errorCode, 2203 Message: errorMessage, 2204 } 2205 return genericError 2206 2207 } 2208 } 2209 2210 func awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyVersionOutput(v *CreateTrafficPolicyVersionOutput, response *smithyhttp.Response) error { 2211 if v == nil { 2212 return fmt.Errorf("unsupported deserialization for nil %T", v) 2213 } 2214 2215 if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { 2216 headerValues[0] = strings.TrimSpace(headerValues[0]) 2217 v.Location = ptr.String(headerValues[0]) 2218 } 2219 2220 return nil 2221 } 2222 func awsRestxml_deserializeOpDocumentCreateTrafficPolicyVersionOutput(v **CreateTrafficPolicyVersionOutput, decoder smithyxml.NodeDecoder) error { 2223 if v == nil { 2224 return fmt.Errorf("unexpected nil of type %T", v) 2225 } 2226 var sv *CreateTrafficPolicyVersionOutput 2227 if *v == nil { 2228 sv = &CreateTrafficPolicyVersionOutput{} 2229 } else { 2230 sv = *v 2231 } 2232 2233 for { 2234 t, done, err := decoder.Token() 2235 if err != nil { 2236 return err 2237 } 2238 if done { 2239 break 2240 } 2241 originalDecoder := decoder 2242 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 2243 switch { 2244 case strings.EqualFold("TrafficPolicy", t.Name.Local): 2245 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2246 if err := awsRestxml_deserializeDocumentTrafficPolicy(&sv.TrafficPolicy, nodeDecoder); err != nil { 2247 return err 2248 } 2249 2250 default: 2251 // Do nothing and ignore the unexpected tag element 2252 err = decoder.Decoder.Skip() 2253 if err != nil { 2254 return err 2255 } 2256 2257 } 2258 decoder = originalDecoder 2259 } 2260 *v = sv 2261 return nil 2262 } 2263 2264 type awsRestxml_deserializeOpCreateVPCAssociationAuthorization struct { 2265 } 2266 2267 func (*awsRestxml_deserializeOpCreateVPCAssociationAuthorization) ID() string { 2268 return "OperationDeserializer" 2269 } 2270 2271 func (m *awsRestxml_deserializeOpCreateVPCAssociationAuthorization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2272 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2273 ) { 2274 out, metadata, err = next.HandleDeserialize(ctx, in) 2275 if err != nil { 2276 return out, metadata, err 2277 } 2278 2279 response, ok := out.RawResponse.(*smithyhttp.Response) 2280 if !ok { 2281 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2282 } 2283 2284 if response.StatusCode < 200 || response.StatusCode >= 300 { 2285 return out, metadata, awsRestxml_deserializeOpErrorCreateVPCAssociationAuthorization(response, &metadata) 2286 } 2287 output := &CreateVPCAssociationAuthorizationOutput{} 2288 out.Result = output 2289 2290 var buff [1024]byte 2291 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2292 body := io.TeeReader(response.Body, ringBuffer) 2293 rootDecoder := xml.NewDecoder(body) 2294 t, err := smithyxml.FetchRootElement(rootDecoder) 2295 if err == io.EOF { 2296 return out, metadata, nil 2297 } 2298 if err != nil { 2299 var snapshot bytes.Buffer 2300 io.Copy(&snapshot, ringBuffer) 2301 return out, metadata, &smithy.DeserializationError{ 2302 Err: fmt.Errorf("failed to decode response body, %w", err), 2303 Snapshot: snapshot.Bytes(), 2304 } 2305 } 2306 2307 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2308 err = awsRestxml_deserializeOpDocumentCreateVPCAssociationAuthorizationOutput(&output, decoder) 2309 if err != nil { 2310 var snapshot bytes.Buffer 2311 io.Copy(&snapshot, ringBuffer) 2312 return out, metadata, &smithy.DeserializationError{ 2313 Err: fmt.Errorf("failed to decode response body, %w", err), 2314 Snapshot: snapshot.Bytes(), 2315 } 2316 } 2317 2318 return out, metadata, err 2319 } 2320 2321 func awsRestxml_deserializeOpErrorCreateVPCAssociationAuthorization(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2322 var errorBuffer bytes.Buffer 2323 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2324 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2325 } 2326 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2327 2328 errorCode := "UnknownError" 2329 errorMessage := errorCode 2330 2331 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2332 if err != nil { 2333 return err 2334 } 2335 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2336 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2337 } 2338 if len(errorComponents.Code) != 0 { 2339 errorCode = errorComponents.Code 2340 } 2341 if len(errorComponents.Message) != 0 { 2342 errorMessage = errorComponents.Message 2343 } 2344 errorBody.Seek(0, io.SeekStart) 2345 switch { 2346 case strings.EqualFold("ConcurrentModification", errorCode): 2347 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 2348 2349 case strings.EqualFold("InvalidInput", errorCode): 2350 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 2351 2352 case strings.EqualFold("InvalidVPCId", errorCode): 2353 return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) 2354 2355 case strings.EqualFold("NoSuchHostedZone", errorCode): 2356 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 2357 2358 case strings.EqualFold("TooManyVPCAssociationAuthorizations", errorCode): 2359 return awsRestxml_deserializeErrorTooManyVPCAssociationAuthorizations(response, errorBody) 2360 2361 default: 2362 genericError := &smithy.GenericAPIError{ 2363 Code: errorCode, 2364 Message: errorMessage, 2365 } 2366 return genericError 2367 2368 } 2369 } 2370 2371 func awsRestxml_deserializeOpDocumentCreateVPCAssociationAuthorizationOutput(v **CreateVPCAssociationAuthorizationOutput, decoder smithyxml.NodeDecoder) error { 2372 if v == nil { 2373 return fmt.Errorf("unexpected nil of type %T", v) 2374 } 2375 var sv *CreateVPCAssociationAuthorizationOutput 2376 if *v == nil { 2377 sv = &CreateVPCAssociationAuthorizationOutput{} 2378 } else { 2379 sv = *v 2380 } 2381 2382 for { 2383 t, done, err := decoder.Token() 2384 if err != nil { 2385 return err 2386 } 2387 if done { 2388 break 2389 } 2390 originalDecoder := decoder 2391 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 2392 switch { 2393 case strings.EqualFold("HostedZoneId", t.Name.Local): 2394 val, err := decoder.Value() 2395 if err != nil { 2396 return err 2397 } 2398 if val == nil { 2399 break 2400 } 2401 { 2402 xtv := string(val) 2403 sv.HostedZoneId = ptr.String(xtv) 2404 } 2405 2406 case strings.EqualFold("VPC", t.Name.Local): 2407 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2408 if err := awsRestxml_deserializeDocumentVPC(&sv.VPC, nodeDecoder); err != nil { 2409 return err 2410 } 2411 2412 default: 2413 // Do nothing and ignore the unexpected tag element 2414 err = decoder.Decoder.Skip() 2415 if err != nil { 2416 return err 2417 } 2418 2419 } 2420 decoder = originalDecoder 2421 } 2422 *v = sv 2423 return nil 2424 } 2425 2426 type awsRestxml_deserializeOpDeactivateKeySigningKey struct { 2427 } 2428 2429 func (*awsRestxml_deserializeOpDeactivateKeySigningKey) ID() string { 2430 return "OperationDeserializer" 2431 } 2432 2433 func (m *awsRestxml_deserializeOpDeactivateKeySigningKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2434 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2435 ) { 2436 out, metadata, err = next.HandleDeserialize(ctx, in) 2437 if err != nil { 2438 return out, metadata, err 2439 } 2440 2441 response, ok := out.RawResponse.(*smithyhttp.Response) 2442 if !ok { 2443 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2444 } 2445 2446 if response.StatusCode < 200 || response.StatusCode >= 300 { 2447 return out, metadata, awsRestxml_deserializeOpErrorDeactivateKeySigningKey(response, &metadata) 2448 } 2449 output := &DeactivateKeySigningKeyOutput{} 2450 out.Result = output 2451 2452 var buff [1024]byte 2453 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2454 body := io.TeeReader(response.Body, ringBuffer) 2455 rootDecoder := xml.NewDecoder(body) 2456 t, err := smithyxml.FetchRootElement(rootDecoder) 2457 if err == io.EOF { 2458 return out, metadata, nil 2459 } 2460 if err != nil { 2461 var snapshot bytes.Buffer 2462 io.Copy(&snapshot, ringBuffer) 2463 return out, metadata, &smithy.DeserializationError{ 2464 Err: fmt.Errorf("failed to decode response body, %w", err), 2465 Snapshot: snapshot.Bytes(), 2466 } 2467 } 2468 2469 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2470 err = awsRestxml_deserializeOpDocumentDeactivateKeySigningKeyOutput(&output, decoder) 2471 if err != nil { 2472 var snapshot bytes.Buffer 2473 io.Copy(&snapshot, ringBuffer) 2474 return out, metadata, &smithy.DeserializationError{ 2475 Err: fmt.Errorf("failed to decode response body, %w", err), 2476 Snapshot: snapshot.Bytes(), 2477 } 2478 } 2479 2480 return out, metadata, err 2481 } 2482 2483 func awsRestxml_deserializeOpErrorDeactivateKeySigningKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2484 var errorBuffer bytes.Buffer 2485 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2486 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2487 } 2488 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2489 2490 errorCode := "UnknownError" 2491 errorMessage := errorCode 2492 2493 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2494 if err != nil { 2495 return err 2496 } 2497 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2498 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2499 } 2500 if len(errorComponents.Code) != 0 { 2501 errorCode = errorComponents.Code 2502 } 2503 if len(errorComponents.Message) != 0 { 2504 errorMessage = errorComponents.Message 2505 } 2506 errorBody.Seek(0, io.SeekStart) 2507 switch { 2508 case strings.EqualFold("ConcurrentModification", errorCode): 2509 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 2510 2511 case strings.EqualFold("InvalidInput", errorCode): 2512 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 2513 2514 case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): 2515 return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) 2516 2517 case strings.EqualFold("InvalidSigningStatus", errorCode): 2518 return awsRestxml_deserializeErrorInvalidSigningStatus(response, errorBody) 2519 2520 case strings.EqualFold("KeySigningKeyInParentDSRecord", errorCode): 2521 return awsRestxml_deserializeErrorKeySigningKeyInParentDSRecord(response, errorBody) 2522 2523 case strings.EqualFold("KeySigningKeyInUse", errorCode): 2524 return awsRestxml_deserializeErrorKeySigningKeyInUse(response, errorBody) 2525 2526 case strings.EqualFold("NoSuchKeySigningKey", errorCode): 2527 return awsRestxml_deserializeErrorNoSuchKeySigningKey(response, errorBody) 2528 2529 default: 2530 genericError := &smithy.GenericAPIError{ 2531 Code: errorCode, 2532 Message: errorMessage, 2533 } 2534 return genericError 2535 2536 } 2537 } 2538 2539 func awsRestxml_deserializeOpDocumentDeactivateKeySigningKeyOutput(v **DeactivateKeySigningKeyOutput, decoder smithyxml.NodeDecoder) error { 2540 if v == nil { 2541 return fmt.Errorf("unexpected nil of type %T", v) 2542 } 2543 var sv *DeactivateKeySigningKeyOutput 2544 if *v == nil { 2545 sv = &DeactivateKeySigningKeyOutput{} 2546 } else { 2547 sv = *v 2548 } 2549 2550 for { 2551 t, done, err := decoder.Token() 2552 if err != nil { 2553 return err 2554 } 2555 if done { 2556 break 2557 } 2558 originalDecoder := decoder 2559 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 2560 switch { 2561 case strings.EqualFold("ChangeInfo", t.Name.Local): 2562 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2563 if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { 2564 return err 2565 } 2566 2567 default: 2568 // Do nothing and ignore the unexpected tag element 2569 err = decoder.Decoder.Skip() 2570 if err != nil { 2571 return err 2572 } 2573 2574 } 2575 decoder = originalDecoder 2576 } 2577 *v = sv 2578 return nil 2579 } 2580 2581 type awsRestxml_deserializeOpDeleteCidrCollection struct { 2582 } 2583 2584 func (*awsRestxml_deserializeOpDeleteCidrCollection) ID() string { 2585 return "OperationDeserializer" 2586 } 2587 2588 func (m *awsRestxml_deserializeOpDeleteCidrCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2589 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2590 ) { 2591 out, metadata, err = next.HandleDeserialize(ctx, in) 2592 if err != nil { 2593 return out, metadata, err 2594 } 2595 2596 response, ok := out.RawResponse.(*smithyhttp.Response) 2597 if !ok { 2598 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2599 } 2600 2601 if response.StatusCode < 200 || response.StatusCode >= 300 { 2602 return out, metadata, awsRestxml_deserializeOpErrorDeleteCidrCollection(response, &metadata) 2603 } 2604 output := &DeleteCidrCollectionOutput{} 2605 out.Result = output 2606 2607 return out, metadata, err 2608 } 2609 2610 func awsRestxml_deserializeOpErrorDeleteCidrCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2611 var errorBuffer bytes.Buffer 2612 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2613 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2614 } 2615 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2616 2617 errorCode := "UnknownError" 2618 errorMessage := errorCode 2619 2620 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2621 if err != nil { 2622 return err 2623 } 2624 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2625 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2626 } 2627 if len(errorComponents.Code) != 0 { 2628 errorCode = errorComponents.Code 2629 } 2630 if len(errorComponents.Message) != 0 { 2631 errorMessage = errorComponents.Message 2632 } 2633 errorBody.Seek(0, io.SeekStart) 2634 switch { 2635 case strings.EqualFold("CidrCollectionInUseException", errorCode): 2636 return awsRestxml_deserializeErrorCidrCollectionInUseException(response, errorBody) 2637 2638 case strings.EqualFold("ConcurrentModification", errorCode): 2639 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 2640 2641 case strings.EqualFold("InvalidInput", errorCode): 2642 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 2643 2644 case strings.EqualFold("NoSuchCidrCollectionException", errorCode): 2645 return awsRestxml_deserializeErrorNoSuchCidrCollectionException(response, errorBody) 2646 2647 default: 2648 genericError := &smithy.GenericAPIError{ 2649 Code: errorCode, 2650 Message: errorMessage, 2651 } 2652 return genericError 2653 2654 } 2655 } 2656 2657 type awsRestxml_deserializeOpDeleteHealthCheck struct { 2658 } 2659 2660 func (*awsRestxml_deserializeOpDeleteHealthCheck) ID() string { 2661 return "OperationDeserializer" 2662 } 2663 2664 func (m *awsRestxml_deserializeOpDeleteHealthCheck) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2665 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2666 ) { 2667 out, metadata, err = next.HandleDeserialize(ctx, in) 2668 if err != nil { 2669 return out, metadata, err 2670 } 2671 2672 response, ok := out.RawResponse.(*smithyhttp.Response) 2673 if !ok { 2674 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2675 } 2676 2677 if response.StatusCode < 200 || response.StatusCode >= 300 { 2678 return out, metadata, awsRestxml_deserializeOpErrorDeleteHealthCheck(response, &metadata) 2679 } 2680 output := &DeleteHealthCheckOutput{} 2681 out.Result = output 2682 2683 return out, metadata, err 2684 } 2685 2686 func awsRestxml_deserializeOpErrorDeleteHealthCheck(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2687 var errorBuffer bytes.Buffer 2688 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2689 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2690 } 2691 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2692 2693 errorCode := "UnknownError" 2694 errorMessage := errorCode 2695 2696 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2697 if err != nil { 2698 return err 2699 } 2700 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2701 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2702 } 2703 if len(errorComponents.Code) != 0 { 2704 errorCode = errorComponents.Code 2705 } 2706 if len(errorComponents.Message) != 0 { 2707 errorMessage = errorComponents.Message 2708 } 2709 errorBody.Seek(0, io.SeekStart) 2710 switch { 2711 case strings.EqualFold("HealthCheckInUse", errorCode): 2712 return awsRestxml_deserializeErrorHealthCheckInUse(response, errorBody) 2713 2714 case strings.EqualFold("InvalidInput", errorCode): 2715 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 2716 2717 case strings.EqualFold("NoSuchHealthCheck", errorCode): 2718 return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) 2719 2720 default: 2721 genericError := &smithy.GenericAPIError{ 2722 Code: errorCode, 2723 Message: errorMessage, 2724 } 2725 return genericError 2726 2727 } 2728 } 2729 2730 type awsRestxml_deserializeOpDeleteHostedZone struct { 2731 } 2732 2733 func (*awsRestxml_deserializeOpDeleteHostedZone) ID() string { 2734 return "OperationDeserializer" 2735 } 2736 2737 func (m *awsRestxml_deserializeOpDeleteHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2738 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2739 ) { 2740 out, metadata, err = next.HandleDeserialize(ctx, in) 2741 if err != nil { 2742 return out, metadata, err 2743 } 2744 2745 response, ok := out.RawResponse.(*smithyhttp.Response) 2746 if !ok { 2747 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2748 } 2749 2750 if response.StatusCode < 200 || response.StatusCode >= 300 { 2751 return out, metadata, awsRestxml_deserializeOpErrorDeleteHostedZone(response, &metadata) 2752 } 2753 output := &DeleteHostedZoneOutput{} 2754 out.Result = output 2755 2756 var buff [1024]byte 2757 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2758 body := io.TeeReader(response.Body, ringBuffer) 2759 rootDecoder := xml.NewDecoder(body) 2760 t, err := smithyxml.FetchRootElement(rootDecoder) 2761 if err == io.EOF { 2762 return out, metadata, nil 2763 } 2764 if err != nil { 2765 var snapshot bytes.Buffer 2766 io.Copy(&snapshot, ringBuffer) 2767 return out, metadata, &smithy.DeserializationError{ 2768 Err: fmt.Errorf("failed to decode response body, %w", err), 2769 Snapshot: snapshot.Bytes(), 2770 } 2771 } 2772 2773 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2774 err = awsRestxml_deserializeOpDocumentDeleteHostedZoneOutput(&output, decoder) 2775 if err != nil { 2776 var snapshot bytes.Buffer 2777 io.Copy(&snapshot, ringBuffer) 2778 return out, metadata, &smithy.DeserializationError{ 2779 Err: fmt.Errorf("failed to decode response body, %w", err), 2780 Snapshot: snapshot.Bytes(), 2781 } 2782 } 2783 2784 return out, metadata, err 2785 } 2786 2787 func awsRestxml_deserializeOpErrorDeleteHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2788 var errorBuffer bytes.Buffer 2789 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2790 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2791 } 2792 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2793 2794 errorCode := "UnknownError" 2795 errorMessage := errorCode 2796 2797 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2798 if err != nil { 2799 return err 2800 } 2801 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2802 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2803 } 2804 if len(errorComponents.Code) != 0 { 2805 errorCode = errorComponents.Code 2806 } 2807 if len(errorComponents.Message) != 0 { 2808 errorMessage = errorComponents.Message 2809 } 2810 errorBody.Seek(0, io.SeekStart) 2811 switch { 2812 case strings.EqualFold("HostedZoneNotEmpty", errorCode): 2813 return awsRestxml_deserializeErrorHostedZoneNotEmpty(response, errorBody) 2814 2815 case strings.EqualFold("InvalidDomainName", errorCode): 2816 return awsRestxml_deserializeErrorInvalidDomainName(response, errorBody) 2817 2818 case strings.EqualFold("InvalidInput", errorCode): 2819 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 2820 2821 case strings.EqualFold("NoSuchHostedZone", errorCode): 2822 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 2823 2824 case strings.EqualFold("PriorRequestNotComplete", errorCode): 2825 return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) 2826 2827 default: 2828 genericError := &smithy.GenericAPIError{ 2829 Code: errorCode, 2830 Message: errorMessage, 2831 } 2832 return genericError 2833 2834 } 2835 } 2836 2837 func awsRestxml_deserializeOpDocumentDeleteHostedZoneOutput(v **DeleteHostedZoneOutput, decoder smithyxml.NodeDecoder) error { 2838 if v == nil { 2839 return fmt.Errorf("unexpected nil of type %T", v) 2840 } 2841 var sv *DeleteHostedZoneOutput 2842 if *v == nil { 2843 sv = &DeleteHostedZoneOutput{} 2844 } else { 2845 sv = *v 2846 } 2847 2848 for { 2849 t, done, err := decoder.Token() 2850 if err != nil { 2851 return err 2852 } 2853 if done { 2854 break 2855 } 2856 originalDecoder := decoder 2857 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 2858 switch { 2859 case strings.EqualFold("ChangeInfo", t.Name.Local): 2860 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 2861 if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { 2862 return err 2863 } 2864 2865 default: 2866 // Do nothing and ignore the unexpected tag element 2867 err = decoder.Decoder.Skip() 2868 if err != nil { 2869 return err 2870 } 2871 2872 } 2873 decoder = originalDecoder 2874 } 2875 *v = sv 2876 return nil 2877 } 2878 2879 type awsRestxml_deserializeOpDeleteKeySigningKey struct { 2880 } 2881 2882 func (*awsRestxml_deserializeOpDeleteKeySigningKey) ID() string { 2883 return "OperationDeserializer" 2884 } 2885 2886 func (m *awsRestxml_deserializeOpDeleteKeySigningKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 2887 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 2888 ) { 2889 out, metadata, err = next.HandleDeserialize(ctx, in) 2890 if err != nil { 2891 return out, metadata, err 2892 } 2893 2894 response, ok := out.RawResponse.(*smithyhttp.Response) 2895 if !ok { 2896 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 2897 } 2898 2899 if response.StatusCode < 200 || response.StatusCode >= 300 { 2900 return out, metadata, awsRestxml_deserializeOpErrorDeleteKeySigningKey(response, &metadata) 2901 } 2902 output := &DeleteKeySigningKeyOutput{} 2903 out.Result = output 2904 2905 var buff [1024]byte 2906 ringBuffer := smithyio.NewRingBuffer(buff[:]) 2907 body := io.TeeReader(response.Body, ringBuffer) 2908 rootDecoder := xml.NewDecoder(body) 2909 t, err := smithyxml.FetchRootElement(rootDecoder) 2910 if err == io.EOF { 2911 return out, metadata, nil 2912 } 2913 if err != nil { 2914 var snapshot bytes.Buffer 2915 io.Copy(&snapshot, ringBuffer) 2916 return out, metadata, &smithy.DeserializationError{ 2917 Err: fmt.Errorf("failed to decode response body, %w", err), 2918 Snapshot: snapshot.Bytes(), 2919 } 2920 } 2921 2922 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 2923 err = awsRestxml_deserializeOpDocumentDeleteKeySigningKeyOutput(&output, decoder) 2924 if err != nil { 2925 var snapshot bytes.Buffer 2926 io.Copy(&snapshot, ringBuffer) 2927 return out, metadata, &smithy.DeserializationError{ 2928 Err: fmt.Errorf("failed to decode response body, %w", err), 2929 Snapshot: snapshot.Bytes(), 2930 } 2931 } 2932 2933 return out, metadata, err 2934 } 2935 2936 func awsRestxml_deserializeOpErrorDeleteKeySigningKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { 2937 var errorBuffer bytes.Buffer 2938 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 2939 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 2940 } 2941 errorBody := bytes.NewReader(errorBuffer.Bytes()) 2942 2943 errorCode := "UnknownError" 2944 errorMessage := errorCode 2945 2946 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 2947 if err != nil { 2948 return err 2949 } 2950 if reqID := errorComponents.RequestID; len(reqID) != 0 { 2951 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 2952 } 2953 if len(errorComponents.Code) != 0 { 2954 errorCode = errorComponents.Code 2955 } 2956 if len(errorComponents.Message) != 0 { 2957 errorMessage = errorComponents.Message 2958 } 2959 errorBody.Seek(0, io.SeekStart) 2960 switch { 2961 case strings.EqualFold("ConcurrentModification", errorCode): 2962 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 2963 2964 case strings.EqualFold("InvalidInput", errorCode): 2965 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 2966 2967 case strings.EqualFold("InvalidKMSArn", errorCode): 2968 return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) 2969 2970 case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): 2971 return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) 2972 2973 case strings.EqualFold("InvalidSigningStatus", errorCode): 2974 return awsRestxml_deserializeErrorInvalidSigningStatus(response, errorBody) 2975 2976 case strings.EqualFold("NoSuchKeySigningKey", errorCode): 2977 return awsRestxml_deserializeErrorNoSuchKeySigningKey(response, errorBody) 2978 2979 default: 2980 genericError := &smithy.GenericAPIError{ 2981 Code: errorCode, 2982 Message: errorMessage, 2983 } 2984 return genericError 2985 2986 } 2987 } 2988 2989 func awsRestxml_deserializeOpDocumentDeleteKeySigningKeyOutput(v **DeleteKeySigningKeyOutput, decoder smithyxml.NodeDecoder) error { 2990 if v == nil { 2991 return fmt.Errorf("unexpected nil of type %T", v) 2992 } 2993 var sv *DeleteKeySigningKeyOutput 2994 if *v == nil { 2995 sv = &DeleteKeySigningKeyOutput{} 2996 } else { 2997 sv = *v 2998 } 2999 3000 for { 3001 t, done, err := decoder.Token() 3002 if err != nil { 3003 return err 3004 } 3005 if done { 3006 break 3007 } 3008 originalDecoder := decoder 3009 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 3010 switch { 3011 case strings.EqualFold("ChangeInfo", t.Name.Local): 3012 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3013 if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { 3014 return err 3015 } 3016 3017 default: 3018 // Do nothing and ignore the unexpected tag element 3019 err = decoder.Decoder.Skip() 3020 if err != nil { 3021 return err 3022 } 3023 3024 } 3025 decoder = originalDecoder 3026 } 3027 *v = sv 3028 return nil 3029 } 3030 3031 type awsRestxml_deserializeOpDeleteQueryLoggingConfig struct { 3032 } 3033 3034 func (*awsRestxml_deserializeOpDeleteQueryLoggingConfig) ID() string { 3035 return "OperationDeserializer" 3036 } 3037 3038 func (m *awsRestxml_deserializeOpDeleteQueryLoggingConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3039 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3040 ) { 3041 out, metadata, err = next.HandleDeserialize(ctx, in) 3042 if err != nil { 3043 return out, metadata, err 3044 } 3045 3046 response, ok := out.RawResponse.(*smithyhttp.Response) 3047 if !ok { 3048 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3049 } 3050 3051 if response.StatusCode < 200 || response.StatusCode >= 300 { 3052 return out, metadata, awsRestxml_deserializeOpErrorDeleteQueryLoggingConfig(response, &metadata) 3053 } 3054 output := &DeleteQueryLoggingConfigOutput{} 3055 out.Result = output 3056 3057 return out, metadata, err 3058 } 3059 3060 func awsRestxml_deserializeOpErrorDeleteQueryLoggingConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3061 var errorBuffer bytes.Buffer 3062 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3063 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3064 } 3065 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3066 3067 errorCode := "UnknownError" 3068 errorMessage := errorCode 3069 3070 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3071 if err != nil { 3072 return err 3073 } 3074 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3075 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3076 } 3077 if len(errorComponents.Code) != 0 { 3078 errorCode = errorComponents.Code 3079 } 3080 if len(errorComponents.Message) != 0 { 3081 errorMessage = errorComponents.Message 3082 } 3083 errorBody.Seek(0, io.SeekStart) 3084 switch { 3085 case strings.EqualFold("ConcurrentModification", errorCode): 3086 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 3087 3088 case strings.EqualFold("InvalidInput", errorCode): 3089 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 3090 3091 case strings.EqualFold("NoSuchQueryLoggingConfig", errorCode): 3092 return awsRestxml_deserializeErrorNoSuchQueryLoggingConfig(response, errorBody) 3093 3094 default: 3095 genericError := &smithy.GenericAPIError{ 3096 Code: errorCode, 3097 Message: errorMessage, 3098 } 3099 return genericError 3100 3101 } 3102 } 3103 3104 type awsRestxml_deserializeOpDeleteReusableDelegationSet struct { 3105 } 3106 3107 func (*awsRestxml_deserializeOpDeleteReusableDelegationSet) ID() string { 3108 return "OperationDeserializer" 3109 } 3110 3111 func (m *awsRestxml_deserializeOpDeleteReusableDelegationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3112 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3113 ) { 3114 out, metadata, err = next.HandleDeserialize(ctx, in) 3115 if err != nil { 3116 return out, metadata, err 3117 } 3118 3119 response, ok := out.RawResponse.(*smithyhttp.Response) 3120 if !ok { 3121 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3122 } 3123 3124 if response.StatusCode < 200 || response.StatusCode >= 300 { 3125 return out, metadata, awsRestxml_deserializeOpErrorDeleteReusableDelegationSet(response, &metadata) 3126 } 3127 output := &DeleteReusableDelegationSetOutput{} 3128 out.Result = output 3129 3130 return out, metadata, err 3131 } 3132 3133 func awsRestxml_deserializeOpErrorDeleteReusableDelegationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3134 var errorBuffer bytes.Buffer 3135 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3136 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3137 } 3138 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3139 3140 errorCode := "UnknownError" 3141 errorMessage := errorCode 3142 3143 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3144 if err != nil { 3145 return err 3146 } 3147 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3148 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3149 } 3150 if len(errorComponents.Code) != 0 { 3151 errorCode = errorComponents.Code 3152 } 3153 if len(errorComponents.Message) != 0 { 3154 errorMessage = errorComponents.Message 3155 } 3156 errorBody.Seek(0, io.SeekStart) 3157 switch { 3158 case strings.EqualFold("DelegationSetInUse", errorCode): 3159 return awsRestxml_deserializeErrorDelegationSetInUse(response, errorBody) 3160 3161 case strings.EqualFold("DelegationSetNotReusable", errorCode): 3162 return awsRestxml_deserializeErrorDelegationSetNotReusable(response, errorBody) 3163 3164 case strings.EqualFold("InvalidInput", errorCode): 3165 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 3166 3167 case strings.EqualFold("NoSuchDelegationSet", errorCode): 3168 return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) 3169 3170 default: 3171 genericError := &smithy.GenericAPIError{ 3172 Code: errorCode, 3173 Message: errorMessage, 3174 } 3175 return genericError 3176 3177 } 3178 } 3179 3180 type awsRestxml_deserializeOpDeleteTrafficPolicy struct { 3181 } 3182 3183 func (*awsRestxml_deserializeOpDeleteTrafficPolicy) ID() string { 3184 return "OperationDeserializer" 3185 } 3186 3187 func (m *awsRestxml_deserializeOpDeleteTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3188 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3189 ) { 3190 out, metadata, err = next.HandleDeserialize(ctx, in) 3191 if err != nil { 3192 return out, metadata, err 3193 } 3194 3195 response, ok := out.RawResponse.(*smithyhttp.Response) 3196 if !ok { 3197 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3198 } 3199 3200 if response.StatusCode < 200 || response.StatusCode >= 300 { 3201 return out, metadata, awsRestxml_deserializeOpErrorDeleteTrafficPolicy(response, &metadata) 3202 } 3203 output := &DeleteTrafficPolicyOutput{} 3204 out.Result = output 3205 3206 return out, metadata, err 3207 } 3208 3209 func awsRestxml_deserializeOpErrorDeleteTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3210 var errorBuffer bytes.Buffer 3211 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3212 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3213 } 3214 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3215 3216 errorCode := "UnknownError" 3217 errorMessage := errorCode 3218 3219 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3220 if err != nil { 3221 return err 3222 } 3223 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3224 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3225 } 3226 if len(errorComponents.Code) != 0 { 3227 errorCode = errorComponents.Code 3228 } 3229 if len(errorComponents.Message) != 0 { 3230 errorMessage = errorComponents.Message 3231 } 3232 errorBody.Seek(0, io.SeekStart) 3233 switch { 3234 case strings.EqualFold("ConcurrentModification", errorCode): 3235 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 3236 3237 case strings.EqualFold("InvalidInput", errorCode): 3238 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 3239 3240 case strings.EqualFold("NoSuchTrafficPolicy", errorCode): 3241 return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) 3242 3243 case strings.EqualFold("TrafficPolicyInUse", errorCode): 3244 return awsRestxml_deserializeErrorTrafficPolicyInUse(response, errorBody) 3245 3246 default: 3247 genericError := &smithy.GenericAPIError{ 3248 Code: errorCode, 3249 Message: errorMessage, 3250 } 3251 return genericError 3252 3253 } 3254 } 3255 3256 type awsRestxml_deserializeOpDeleteTrafficPolicyInstance struct { 3257 } 3258 3259 func (*awsRestxml_deserializeOpDeleteTrafficPolicyInstance) ID() string { 3260 return "OperationDeserializer" 3261 } 3262 3263 func (m *awsRestxml_deserializeOpDeleteTrafficPolicyInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3264 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3265 ) { 3266 out, metadata, err = next.HandleDeserialize(ctx, in) 3267 if err != nil { 3268 return out, metadata, err 3269 } 3270 3271 response, ok := out.RawResponse.(*smithyhttp.Response) 3272 if !ok { 3273 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3274 } 3275 3276 if response.StatusCode < 200 || response.StatusCode >= 300 { 3277 return out, metadata, awsRestxml_deserializeOpErrorDeleteTrafficPolicyInstance(response, &metadata) 3278 } 3279 output := &DeleteTrafficPolicyInstanceOutput{} 3280 out.Result = output 3281 3282 return out, metadata, err 3283 } 3284 3285 func awsRestxml_deserializeOpErrorDeleteTrafficPolicyInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3286 var errorBuffer bytes.Buffer 3287 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3288 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3289 } 3290 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3291 3292 errorCode := "UnknownError" 3293 errorMessage := errorCode 3294 3295 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3296 if err != nil { 3297 return err 3298 } 3299 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3300 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3301 } 3302 if len(errorComponents.Code) != 0 { 3303 errorCode = errorComponents.Code 3304 } 3305 if len(errorComponents.Message) != 0 { 3306 errorMessage = errorComponents.Message 3307 } 3308 errorBody.Seek(0, io.SeekStart) 3309 switch { 3310 case strings.EqualFold("InvalidInput", errorCode): 3311 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 3312 3313 case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): 3314 return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) 3315 3316 case strings.EqualFold("PriorRequestNotComplete", errorCode): 3317 return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) 3318 3319 default: 3320 genericError := &smithy.GenericAPIError{ 3321 Code: errorCode, 3322 Message: errorMessage, 3323 } 3324 return genericError 3325 3326 } 3327 } 3328 3329 type awsRestxml_deserializeOpDeleteVPCAssociationAuthorization struct { 3330 } 3331 3332 func (*awsRestxml_deserializeOpDeleteVPCAssociationAuthorization) ID() string { 3333 return "OperationDeserializer" 3334 } 3335 3336 func (m *awsRestxml_deserializeOpDeleteVPCAssociationAuthorization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3337 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3338 ) { 3339 out, metadata, err = next.HandleDeserialize(ctx, in) 3340 if err != nil { 3341 return out, metadata, err 3342 } 3343 3344 response, ok := out.RawResponse.(*smithyhttp.Response) 3345 if !ok { 3346 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3347 } 3348 3349 if response.StatusCode < 200 || response.StatusCode >= 300 { 3350 return out, metadata, awsRestxml_deserializeOpErrorDeleteVPCAssociationAuthorization(response, &metadata) 3351 } 3352 output := &DeleteVPCAssociationAuthorizationOutput{} 3353 out.Result = output 3354 3355 return out, metadata, err 3356 } 3357 3358 func awsRestxml_deserializeOpErrorDeleteVPCAssociationAuthorization(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3359 var errorBuffer bytes.Buffer 3360 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3361 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3362 } 3363 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3364 3365 errorCode := "UnknownError" 3366 errorMessage := errorCode 3367 3368 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3369 if err != nil { 3370 return err 3371 } 3372 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3373 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3374 } 3375 if len(errorComponents.Code) != 0 { 3376 errorCode = errorComponents.Code 3377 } 3378 if len(errorComponents.Message) != 0 { 3379 errorMessage = errorComponents.Message 3380 } 3381 errorBody.Seek(0, io.SeekStart) 3382 switch { 3383 case strings.EqualFold("ConcurrentModification", errorCode): 3384 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 3385 3386 case strings.EqualFold("InvalidInput", errorCode): 3387 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 3388 3389 case strings.EqualFold("InvalidVPCId", errorCode): 3390 return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) 3391 3392 case strings.EqualFold("NoSuchHostedZone", errorCode): 3393 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 3394 3395 case strings.EqualFold("VPCAssociationAuthorizationNotFound", errorCode): 3396 return awsRestxml_deserializeErrorVPCAssociationAuthorizationNotFound(response, errorBody) 3397 3398 default: 3399 genericError := &smithy.GenericAPIError{ 3400 Code: errorCode, 3401 Message: errorMessage, 3402 } 3403 return genericError 3404 3405 } 3406 } 3407 3408 type awsRestxml_deserializeOpDisableHostedZoneDNSSEC struct { 3409 } 3410 3411 func (*awsRestxml_deserializeOpDisableHostedZoneDNSSEC) ID() string { 3412 return "OperationDeserializer" 3413 } 3414 3415 func (m *awsRestxml_deserializeOpDisableHostedZoneDNSSEC) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3416 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3417 ) { 3418 out, metadata, err = next.HandleDeserialize(ctx, in) 3419 if err != nil { 3420 return out, metadata, err 3421 } 3422 3423 response, ok := out.RawResponse.(*smithyhttp.Response) 3424 if !ok { 3425 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3426 } 3427 3428 if response.StatusCode < 200 || response.StatusCode >= 300 { 3429 return out, metadata, awsRestxml_deserializeOpErrorDisableHostedZoneDNSSEC(response, &metadata) 3430 } 3431 output := &DisableHostedZoneDNSSECOutput{} 3432 out.Result = output 3433 3434 var buff [1024]byte 3435 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3436 body := io.TeeReader(response.Body, ringBuffer) 3437 rootDecoder := xml.NewDecoder(body) 3438 t, err := smithyxml.FetchRootElement(rootDecoder) 3439 if err == io.EOF { 3440 return out, metadata, nil 3441 } 3442 if err != nil { 3443 var snapshot bytes.Buffer 3444 io.Copy(&snapshot, ringBuffer) 3445 return out, metadata, &smithy.DeserializationError{ 3446 Err: fmt.Errorf("failed to decode response body, %w", err), 3447 Snapshot: snapshot.Bytes(), 3448 } 3449 } 3450 3451 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3452 err = awsRestxml_deserializeOpDocumentDisableHostedZoneDNSSECOutput(&output, decoder) 3453 if err != nil { 3454 var snapshot bytes.Buffer 3455 io.Copy(&snapshot, ringBuffer) 3456 return out, metadata, &smithy.DeserializationError{ 3457 Err: fmt.Errorf("failed to decode response body, %w", err), 3458 Snapshot: snapshot.Bytes(), 3459 } 3460 } 3461 3462 return out, metadata, err 3463 } 3464 3465 func awsRestxml_deserializeOpErrorDisableHostedZoneDNSSEC(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3466 var errorBuffer bytes.Buffer 3467 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3468 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3469 } 3470 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3471 3472 errorCode := "UnknownError" 3473 errorMessage := errorCode 3474 3475 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3476 if err != nil { 3477 return err 3478 } 3479 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3480 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3481 } 3482 if len(errorComponents.Code) != 0 { 3483 errorCode = errorComponents.Code 3484 } 3485 if len(errorComponents.Message) != 0 { 3486 errorMessage = errorComponents.Message 3487 } 3488 errorBody.Seek(0, io.SeekStart) 3489 switch { 3490 case strings.EqualFold("ConcurrentModification", errorCode): 3491 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 3492 3493 case strings.EqualFold("DNSSECNotFound", errorCode): 3494 return awsRestxml_deserializeErrorDNSSECNotFound(response, errorBody) 3495 3496 case strings.EqualFold("InvalidArgument", errorCode): 3497 return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) 3498 3499 case strings.EqualFold("InvalidInput", errorCode): 3500 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 3501 3502 case strings.EqualFold("InvalidKMSArn", errorCode): 3503 return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) 3504 3505 case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): 3506 return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) 3507 3508 case strings.EqualFold("KeySigningKeyInParentDSRecord", errorCode): 3509 return awsRestxml_deserializeErrorKeySigningKeyInParentDSRecord(response, errorBody) 3510 3511 case strings.EqualFold("NoSuchHostedZone", errorCode): 3512 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 3513 3514 default: 3515 genericError := &smithy.GenericAPIError{ 3516 Code: errorCode, 3517 Message: errorMessage, 3518 } 3519 return genericError 3520 3521 } 3522 } 3523 3524 func awsRestxml_deserializeOpDocumentDisableHostedZoneDNSSECOutput(v **DisableHostedZoneDNSSECOutput, decoder smithyxml.NodeDecoder) error { 3525 if v == nil { 3526 return fmt.Errorf("unexpected nil of type %T", v) 3527 } 3528 var sv *DisableHostedZoneDNSSECOutput 3529 if *v == nil { 3530 sv = &DisableHostedZoneDNSSECOutput{} 3531 } else { 3532 sv = *v 3533 } 3534 3535 for { 3536 t, done, err := decoder.Token() 3537 if err != nil { 3538 return err 3539 } 3540 if done { 3541 break 3542 } 3543 originalDecoder := decoder 3544 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 3545 switch { 3546 case strings.EqualFold("ChangeInfo", t.Name.Local): 3547 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3548 if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { 3549 return err 3550 } 3551 3552 default: 3553 // Do nothing and ignore the unexpected tag element 3554 err = decoder.Decoder.Skip() 3555 if err != nil { 3556 return err 3557 } 3558 3559 } 3560 decoder = originalDecoder 3561 } 3562 *v = sv 3563 return nil 3564 } 3565 3566 type awsRestxml_deserializeOpDisassociateVPCFromHostedZone struct { 3567 } 3568 3569 func (*awsRestxml_deserializeOpDisassociateVPCFromHostedZone) ID() string { 3570 return "OperationDeserializer" 3571 } 3572 3573 func (m *awsRestxml_deserializeOpDisassociateVPCFromHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3574 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3575 ) { 3576 out, metadata, err = next.HandleDeserialize(ctx, in) 3577 if err != nil { 3578 return out, metadata, err 3579 } 3580 3581 response, ok := out.RawResponse.(*smithyhttp.Response) 3582 if !ok { 3583 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3584 } 3585 3586 if response.StatusCode < 200 || response.StatusCode >= 300 { 3587 return out, metadata, awsRestxml_deserializeOpErrorDisassociateVPCFromHostedZone(response, &metadata) 3588 } 3589 output := &DisassociateVPCFromHostedZoneOutput{} 3590 out.Result = output 3591 3592 var buff [1024]byte 3593 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3594 body := io.TeeReader(response.Body, ringBuffer) 3595 rootDecoder := xml.NewDecoder(body) 3596 t, err := smithyxml.FetchRootElement(rootDecoder) 3597 if err == io.EOF { 3598 return out, metadata, nil 3599 } 3600 if err != nil { 3601 var snapshot bytes.Buffer 3602 io.Copy(&snapshot, ringBuffer) 3603 return out, metadata, &smithy.DeserializationError{ 3604 Err: fmt.Errorf("failed to decode response body, %w", err), 3605 Snapshot: snapshot.Bytes(), 3606 } 3607 } 3608 3609 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3610 err = awsRestxml_deserializeOpDocumentDisassociateVPCFromHostedZoneOutput(&output, decoder) 3611 if err != nil { 3612 var snapshot bytes.Buffer 3613 io.Copy(&snapshot, ringBuffer) 3614 return out, metadata, &smithy.DeserializationError{ 3615 Err: fmt.Errorf("failed to decode response body, %w", err), 3616 Snapshot: snapshot.Bytes(), 3617 } 3618 } 3619 3620 return out, metadata, err 3621 } 3622 3623 func awsRestxml_deserializeOpErrorDisassociateVPCFromHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3624 var errorBuffer bytes.Buffer 3625 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3626 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3627 } 3628 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3629 3630 errorCode := "UnknownError" 3631 errorMessage := errorCode 3632 3633 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3634 if err != nil { 3635 return err 3636 } 3637 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3638 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3639 } 3640 if len(errorComponents.Code) != 0 { 3641 errorCode = errorComponents.Code 3642 } 3643 if len(errorComponents.Message) != 0 { 3644 errorMessage = errorComponents.Message 3645 } 3646 errorBody.Seek(0, io.SeekStart) 3647 switch { 3648 case strings.EqualFold("InvalidInput", errorCode): 3649 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 3650 3651 case strings.EqualFold("InvalidVPCId", errorCode): 3652 return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) 3653 3654 case strings.EqualFold("LastVPCAssociation", errorCode): 3655 return awsRestxml_deserializeErrorLastVPCAssociation(response, errorBody) 3656 3657 case strings.EqualFold("NoSuchHostedZone", errorCode): 3658 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 3659 3660 case strings.EqualFold("VPCAssociationNotFound", errorCode): 3661 return awsRestxml_deserializeErrorVPCAssociationNotFound(response, errorBody) 3662 3663 default: 3664 genericError := &smithy.GenericAPIError{ 3665 Code: errorCode, 3666 Message: errorMessage, 3667 } 3668 return genericError 3669 3670 } 3671 } 3672 3673 func awsRestxml_deserializeOpDocumentDisassociateVPCFromHostedZoneOutput(v **DisassociateVPCFromHostedZoneOutput, decoder smithyxml.NodeDecoder) error { 3674 if v == nil { 3675 return fmt.Errorf("unexpected nil of type %T", v) 3676 } 3677 var sv *DisassociateVPCFromHostedZoneOutput 3678 if *v == nil { 3679 sv = &DisassociateVPCFromHostedZoneOutput{} 3680 } else { 3681 sv = *v 3682 } 3683 3684 for { 3685 t, done, err := decoder.Token() 3686 if err != nil { 3687 return err 3688 } 3689 if done { 3690 break 3691 } 3692 originalDecoder := decoder 3693 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 3694 switch { 3695 case strings.EqualFold("ChangeInfo", t.Name.Local): 3696 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3697 if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { 3698 return err 3699 } 3700 3701 default: 3702 // Do nothing and ignore the unexpected tag element 3703 err = decoder.Decoder.Skip() 3704 if err != nil { 3705 return err 3706 } 3707 3708 } 3709 decoder = originalDecoder 3710 } 3711 *v = sv 3712 return nil 3713 } 3714 3715 type awsRestxml_deserializeOpEnableHostedZoneDNSSEC struct { 3716 } 3717 3718 func (*awsRestxml_deserializeOpEnableHostedZoneDNSSEC) ID() string { 3719 return "OperationDeserializer" 3720 } 3721 3722 func (m *awsRestxml_deserializeOpEnableHostedZoneDNSSEC) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3723 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3724 ) { 3725 out, metadata, err = next.HandleDeserialize(ctx, in) 3726 if err != nil { 3727 return out, metadata, err 3728 } 3729 3730 response, ok := out.RawResponse.(*smithyhttp.Response) 3731 if !ok { 3732 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3733 } 3734 3735 if response.StatusCode < 200 || response.StatusCode >= 300 { 3736 return out, metadata, awsRestxml_deserializeOpErrorEnableHostedZoneDNSSEC(response, &metadata) 3737 } 3738 output := &EnableHostedZoneDNSSECOutput{} 3739 out.Result = output 3740 3741 var buff [1024]byte 3742 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3743 body := io.TeeReader(response.Body, ringBuffer) 3744 rootDecoder := xml.NewDecoder(body) 3745 t, err := smithyxml.FetchRootElement(rootDecoder) 3746 if err == io.EOF { 3747 return out, metadata, nil 3748 } 3749 if err != nil { 3750 var snapshot bytes.Buffer 3751 io.Copy(&snapshot, ringBuffer) 3752 return out, metadata, &smithy.DeserializationError{ 3753 Err: fmt.Errorf("failed to decode response body, %w", err), 3754 Snapshot: snapshot.Bytes(), 3755 } 3756 } 3757 3758 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3759 err = awsRestxml_deserializeOpDocumentEnableHostedZoneDNSSECOutput(&output, decoder) 3760 if err != nil { 3761 var snapshot bytes.Buffer 3762 io.Copy(&snapshot, ringBuffer) 3763 return out, metadata, &smithy.DeserializationError{ 3764 Err: fmt.Errorf("failed to decode response body, %w", err), 3765 Snapshot: snapshot.Bytes(), 3766 } 3767 } 3768 3769 return out, metadata, err 3770 } 3771 3772 func awsRestxml_deserializeOpErrorEnableHostedZoneDNSSEC(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3773 var errorBuffer bytes.Buffer 3774 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3775 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3776 } 3777 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3778 3779 errorCode := "UnknownError" 3780 errorMessage := errorCode 3781 3782 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3783 if err != nil { 3784 return err 3785 } 3786 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3787 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3788 } 3789 if len(errorComponents.Code) != 0 { 3790 errorCode = errorComponents.Code 3791 } 3792 if len(errorComponents.Message) != 0 { 3793 errorMessage = errorComponents.Message 3794 } 3795 errorBody.Seek(0, io.SeekStart) 3796 switch { 3797 case strings.EqualFold("ConcurrentModification", errorCode): 3798 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 3799 3800 case strings.EqualFold("DNSSECNotFound", errorCode): 3801 return awsRestxml_deserializeErrorDNSSECNotFound(response, errorBody) 3802 3803 case strings.EqualFold("HostedZonePartiallyDelegated", errorCode): 3804 return awsRestxml_deserializeErrorHostedZonePartiallyDelegated(response, errorBody) 3805 3806 case strings.EqualFold("InvalidArgument", errorCode): 3807 return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) 3808 3809 case strings.EqualFold("InvalidInput", errorCode): 3810 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 3811 3812 case strings.EqualFold("InvalidKMSArn", errorCode): 3813 return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) 3814 3815 case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): 3816 return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) 3817 3818 case strings.EqualFold("KeySigningKeyWithActiveStatusNotFound", errorCode): 3819 return awsRestxml_deserializeErrorKeySigningKeyWithActiveStatusNotFound(response, errorBody) 3820 3821 case strings.EqualFold("NoSuchHostedZone", errorCode): 3822 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 3823 3824 default: 3825 genericError := &smithy.GenericAPIError{ 3826 Code: errorCode, 3827 Message: errorMessage, 3828 } 3829 return genericError 3830 3831 } 3832 } 3833 3834 func awsRestxml_deserializeOpDocumentEnableHostedZoneDNSSECOutput(v **EnableHostedZoneDNSSECOutput, decoder smithyxml.NodeDecoder) error { 3835 if v == nil { 3836 return fmt.Errorf("unexpected nil of type %T", v) 3837 } 3838 var sv *EnableHostedZoneDNSSECOutput 3839 if *v == nil { 3840 sv = &EnableHostedZoneDNSSECOutput{} 3841 } else { 3842 sv = *v 3843 } 3844 3845 for { 3846 t, done, err := decoder.Token() 3847 if err != nil { 3848 return err 3849 } 3850 if done { 3851 break 3852 } 3853 originalDecoder := decoder 3854 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 3855 switch { 3856 case strings.EqualFold("ChangeInfo", t.Name.Local): 3857 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 3858 if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { 3859 return err 3860 } 3861 3862 default: 3863 // Do nothing and ignore the unexpected tag element 3864 err = decoder.Decoder.Skip() 3865 if err != nil { 3866 return err 3867 } 3868 3869 } 3870 decoder = originalDecoder 3871 } 3872 *v = sv 3873 return nil 3874 } 3875 3876 type awsRestxml_deserializeOpGetAccountLimit struct { 3877 } 3878 3879 func (*awsRestxml_deserializeOpGetAccountLimit) ID() string { 3880 return "OperationDeserializer" 3881 } 3882 3883 func (m *awsRestxml_deserializeOpGetAccountLimit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 3884 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 3885 ) { 3886 out, metadata, err = next.HandleDeserialize(ctx, in) 3887 if err != nil { 3888 return out, metadata, err 3889 } 3890 3891 response, ok := out.RawResponse.(*smithyhttp.Response) 3892 if !ok { 3893 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 3894 } 3895 3896 if response.StatusCode < 200 || response.StatusCode >= 300 { 3897 return out, metadata, awsRestxml_deserializeOpErrorGetAccountLimit(response, &metadata) 3898 } 3899 output := &GetAccountLimitOutput{} 3900 out.Result = output 3901 3902 var buff [1024]byte 3903 ringBuffer := smithyio.NewRingBuffer(buff[:]) 3904 body := io.TeeReader(response.Body, ringBuffer) 3905 rootDecoder := xml.NewDecoder(body) 3906 t, err := smithyxml.FetchRootElement(rootDecoder) 3907 if err == io.EOF { 3908 return out, metadata, nil 3909 } 3910 if err != nil { 3911 var snapshot bytes.Buffer 3912 io.Copy(&snapshot, ringBuffer) 3913 return out, metadata, &smithy.DeserializationError{ 3914 Err: fmt.Errorf("failed to decode response body, %w", err), 3915 Snapshot: snapshot.Bytes(), 3916 } 3917 } 3918 3919 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 3920 err = awsRestxml_deserializeOpDocumentGetAccountLimitOutput(&output, decoder) 3921 if err != nil { 3922 var snapshot bytes.Buffer 3923 io.Copy(&snapshot, ringBuffer) 3924 return out, metadata, &smithy.DeserializationError{ 3925 Err: fmt.Errorf("failed to decode response body, %w", err), 3926 Snapshot: snapshot.Bytes(), 3927 } 3928 } 3929 3930 return out, metadata, err 3931 } 3932 3933 func awsRestxml_deserializeOpErrorGetAccountLimit(response *smithyhttp.Response, metadata *middleware.Metadata) error { 3934 var errorBuffer bytes.Buffer 3935 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 3936 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 3937 } 3938 errorBody := bytes.NewReader(errorBuffer.Bytes()) 3939 3940 errorCode := "UnknownError" 3941 errorMessage := errorCode 3942 3943 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 3944 if err != nil { 3945 return err 3946 } 3947 if reqID := errorComponents.RequestID; len(reqID) != 0 { 3948 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 3949 } 3950 if len(errorComponents.Code) != 0 { 3951 errorCode = errorComponents.Code 3952 } 3953 if len(errorComponents.Message) != 0 { 3954 errorMessage = errorComponents.Message 3955 } 3956 errorBody.Seek(0, io.SeekStart) 3957 switch { 3958 case strings.EqualFold("InvalidInput", errorCode): 3959 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 3960 3961 default: 3962 genericError := &smithy.GenericAPIError{ 3963 Code: errorCode, 3964 Message: errorMessage, 3965 } 3966 return genericError 3967 3968 } 3969 } 3970 3971 func awsRestxml_deserializeOpDocumentGetAccountLimitOutput(v **GetAccountLimitOutput, decoder smithyxml.NodeDecoder) error { 3972 if v == nil { 3973 return fmt.Errorf("unexpected nil of type %T", v) 3974 } 3975 var sv *GetAccountLimitOutput 3976 if *v == nil { 3977 sv = &GetAccountLimitOutput{} 3978 } else { 3979 sv = *v 3980 } 3981 3982 for { 3983 t, done, err := decoder.Token() 3984 if err != nil { 3985 return err 3986 } 3987 if done { 3988 break 3989 } 3990 originalDecoder := decoder 3991 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 3992 switch { 3993 case strings.EqualFold("Count", t.Name.Local): 3994 val, err := decoder.Value() 3995 if err != nil { 3996 return err 3997 } 3998 if val == nil { 3999 break 4000 } 4001 { 4002 xtv := string(val) 4003 i64, err := strconv.ParseInt(xtv, 10, 64) 4004 if err != nil { 4005 return err 4006 } 4007 sv.Count = i64 4008 } 4009 4010 case strings.EqualFold("Limit", t.Name.Local): 4011 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4012 if err := awsRestxml_deserializeDocumentAccountLimit(&sv.Limit, nodeDecoder); err != nil { 4013 return err 4014 } 4015 4016 default: 4017 // Do nothing and ignore the unexpected tag element 4018 err = decoder.Decoder.Skip() 4019 if err != nil { 4020 return err 4021 } 4022 4023 } 4024 decoder = originalDecoder 4025 } 4026 *v = sv 4027 return nil 4028 } 4029 4030 type awsRestxml_deserializeOpGetChange struct { 4031 } 4032 4033 func (*awsRestxml_deserializeOpGetChange) ID() string { 4034 return "OperationDeserializer" 4035 } 4036 4037 func (m *awsRestxml_deserializeOpGetChange) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4038 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4039 ) { 4040 out, metadata, err = next.HandleDeserialize(ctx, in) 4041 if err != nil { 4042 return out, metadata, err 4043 } 4044 4045 response, ok := out.RawResponse.(*smithyhttp.Response) 4046 if !ok { 4047 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4048 } 4049 4050 if response.StatusCode < 200 || response.StatusCode >= 300 { 4051 return out, metadata, awsRestxml_deserializeOpErrorGetChange(response, &metadata) 4052 } 4053 output := &GetChangeOutput{} 4054 out.Result = output 4055 4056 var buff [1024]byte 4057 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4058 body := io.TeeReader(response.Body, ringBuffer) 4059 rootDecoder := xml.NewDecoder(body) 4060 t, err := smithyxml.FetchRootElement(rootDecoder) 4061 if err == io.EOF { 4062 return out, metadata, nil 4063 } 4064 if err != nil { 4065 var snapshot bytes.Buffer 4066 io.Copy(&snapshot, ringBuffer) 4067 return out, metadata, &smithy.DeserializationError{ 4068 Err: fmt.Errorf("failed to decode response body, %w", err), 4069 Snapshot: snapshot.Bytes(), 4070 } 4071 } 4072 4073 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4074 err = awsRestxml_deserializeOpDocumentGetChangeOutput(&output, decoder) 4075 if err != nil { 4076 var snapshot bytes.Buffer 4077 io.Copy(&snapshot, ringBuffer) 4078 return out, metadata, &smithy.DeserializationError{ 4079 Err: fmt.Errorf("failed to decode response body, %w", err), 4080 Snapshot: snapshot.Bytes(), 4081 } 4082 } 4083 4084 return out, metadata, err 4085 } 4086 4087 func awsRestxml_deserializeOpErrorGetChange(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4088 var errorBuffer bytes.Buffer 4089 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4090 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4091 } 4092 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4093 4094 errorCode := "UnknownError" 4095 errorMessage := errorCode 4096 4097 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4098 if err != nil { 4099 return err 4100 } 4101 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4102 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4103 } 4104 if len(errorComponents.Code) != 0 { 4105 errorCode = errorComponents.Code 4106 } 4107 if len(errorComponents.Message) != 0 { 4108 errorMessage = errorComponents.Message 4109 } 4110 errorBody.Seek(0, io.SeekStart) 4111 switch { 4112 case strings.EqualFold("InvalidInput", errorCode): 4113 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 4114 4115 case strings.EqualFold("NoSuchChange", errorCode): 4116 return awsRestxml_deserializeErrorNoSuchChange(response, errorBody) 4117 4118 default: 4119 genericError := &smithy.GenericAPIError{ 4120 Code: errorCode, 4121 Message: errorMessage, 4122 } 4123 return genericError 4124 4125 } 4126 } 4127 4128 func awsRestxml_deserializeOpDocumentGetChangeOutput(v **GetChangeOutput, decoder smithyxml.NodeDecoder) error { 4129 if v == nil { 4130 return fmt.Errorf("unexpected nil of type %T", v) 4131 } 4132 var sv *GetChangeOutput 4133 if *v == nil { 4134 sv = &GetChangeOutput{} 4135 } else { 4136 sv = *v 4137 } 4138 4139 for { 4140 t, done, err := decoder.Token() 4141 if err != nil { 4142 return err 4143 } 4144 if done { 4145 break 4146 } 4147 originalDecoder := decoder 4148 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 4149 switch { 4150 case strings.EqualFold("ChangeInfo", t.Name.Local): 4151 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4152 if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { 4153 return err 4154 } 4155 4156 default: 4157 // Do nothing and ignore the unexpected tag element 4158 err = decoder.Decoder.Skip() 4159 if err != nil { 4160 return err 4161 } 4162 4163 } 4164 decoder = originalDecoder 4165 } 4166 *v = sv 4167 return nil 4168 } 4169 4170 type awsRestxml_deserializeOpGetCheckerIpRanges struct { 4171 } 4172 4173 func (*awsRestxml_deserializeOpGetCheckerIpRanges) ID() string { 4174 return "OperationDeserializer" 4175 } 4176 4177 func (m *awsRestxml_deserializeOpGetCheckerIpRanges) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4178 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4179 ) { 4180 out, metadata, err = next.HandleDeserialize(ctx, in) 4181 if err != nil { 4182 return out, metadata, err 4183 } 4184 4185 response, ok := out.RawResponse.(*smithyhttp.Response) 4186 if !ok { 4187 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4188 } 4189 4190 if response.StatusCode < 200 || response.StatusCode >= 300 { 4191 return out, metadata, awsRestxml_deserializeOpErrorGetCheckerIpRanges(response, &metadata) 4192 } 4193 output := &GetCheckerIpRangesOutput{} 4194 out.Result = output 4195 4196 var buff [1024]byte 4197 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4198 body := io.TeeReader(response.Body, ringBuffer) 4199 rootDecoder := xml.NewDecoder(body) 4200 t, err := smithyxml.FetchRootElement(rootDecoder) 4201 if err == io.EOF { 4202 return out, metadata, nil 4203 } 4204 if err != nil { 4205 var snapshot bytes.Buffer 4206 io.Copy(&snapshot, ringBuffer) 4207 return out, metadata, &smithy.DeserializationError{ 4208 Err: fmt.Errorf("failed to decode response body, %w", err), 4209 Snapshot: snapshot.Bytes(), 4210 } 4211 } 4212 4213 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4214 err = awsRestxml_deserializeOpDocumentGetCheckerIpRangesOutput(&output, decoder) 4215 if err != nil { 4216 var snapshot bytes.Buffer 4217 io.Copy(&snapshot, ringBuffer) 4218 return out, metadata, &smithy.DeserializationError{ 4219 Err: fmt.Errorf("failed to decode response body, %w", err), 4220 Snapshot: snapshot.Bytes(), 4221 } 4222 } 4223 4224 return out, metadata, err 4225 } 4226 4227 func awsRestxml_deserializeOpErrorGetCheckerIpRanges(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4228 var errorBuffer bytes.Buffer 4229 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4230 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4231 } 4232 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4233 4234 errorCode := "UnknownError" 4235 errorMessage := errorCode 4236 4237 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4238 if err != nil { 4239 return err 4240 } 4241 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4242 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4243 } 4244 if len(errorComponents.Code) != 0 { 4245 errorCode = errorComponents.Code 4246 } 4247 if len(errorComponents.Message) != 0 { 4248 errorMessage = errorComponents.Message 4249 } 4250 errorBody.Seek(0, io.SeekStart) 4251 switch { 4252 default: 4253 genericError := &smithy.GenericAPIError{ 4254 Code: errorCode, 4255 Message: errorMessage, 4256 } 4257 return genericError 4258 4259 } 4260 } 4261 4262 func awsRestxml_deserializeOpDocumentGetCheckerIpRangesOutput(v **GetCheckerIpRangesOutput, decoder smithyxml.NodeDecoder) error { 4263 if v == nil { 4264 return fmt.Errorf("unexpected nil of type %T", v) 4265 } 4266 var sv *GetCheckerIpRangesOutput 4267 if *v == nil { 4268 sv = &GetCheckerIpRangesOutput{} 4269 } else { 4270 sv = *v 4271 } 4272 4273 for { 4274 t, done, err := decoder.Token() 4275 if err != nil { 4276 return err 4277 } 4278 if done { 4279 break 4280 } 4281 originalDecoder := decoder 4282 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 4283 switch { 4284 case strings.EqualFold("CheckerIpRanges", t.Name.Local): 4285 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4286 if err := awsRestxml_deserializeDocumentCheckerIpRanges(&sv.CheckerIpRanges, nodeDecoder); err != nil { 4287 return err 4288 } 4289 4290 default: 4291 // Do nothing and ignore the unexpected tag element 4292 err = decoder.Decoder.Skip() 4293 if err != nil { 4294 return err 4295 } 4296 4297 } 4298 decoder = originalDecoder 4299 } 4300 *v = sv 4301 return nil 4302 } 4303 4304 type awsRestxml_deserializeOpGetDNSSEC struct { 4305 } 4306 4307 func (*awsRestxml_deserializeOpGetDNSSEC) ID() string { 4308 return "OperationDeserializer" 4309 } 4310 4311 func (m *awsRestxml_deserializeOpGetDNSSEC) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4312 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4313 ) { 4314 out, metadata, err = next.HandleDeserialize(ctx, in) 4315 if err != nil { 4316 return out, metadata, err 4317 } 4318 4319 response, ok := out.RawResponse.(*smithyhttp.Response) 4320 if !ok { 4321 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4322 } 4323 4324 if response.StatusCode < 200 || response.StatusCode >= 300 { 4325 return out, metadata, awsRestxml_deserializeOpErrorGetDNSSEC(response, &metadata) 4326 } 4327 output := &GetDNSSECOutput{} 4328 out.Result = output 4329 4330 var buff [1024]byte 4331 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4332 body := io.TeeReader(response.Body, ringBuffer) 4333 rootDecoder := xml.NewDecoder(body) 4334 t, err := smithyxml.FetchRootElement(rootDecoder) 4335 if err == io.EOF { 4336 return out, metadata, nil 4337 } 4338 if err != nil { 4339 var snapshot bytes.Buffer 4340 io.Copy(&snapshot, ringBuffer) 4341 return out, metadata, &smithy.DeserializationError{ 4342 Err: fmt.Errorf("failed to decode response body, %w", err), 4343 Snapshot: snapshot.Bytes(), 4344 } 4345 } 4346 4347 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4348 err = awsRestxml_deserializeOpDocumentGetDNSSECOutput(&output, decoder) 4349 if err != nil { 4350 var snapshot bytes.Buffer 4351 io.Copy(&snapshot, ringBuffer) 4352 return out, metadata, &smithy.DeserializationError{ 4353 Err: fmt.Errorf("failed to decode response body, %w", err), 4354 Snapshot: snapshot.Bytes(), 4355 } 4356 } 4357 4358 return out, metadata, err 4359 } 4360 4361 func awsRestxml_deserializeOpErrorGetDNSSEC(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4362 var errorBuffer bytes.Buffer 4363 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4364 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4365 } 4366 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4367 4368 errorCode := "UnknownError" 4369 errorMessage := errorCode 4370 4371 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4372 if err != nil { 4373 return err 4374 } 4375 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4376 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4377 } 4378 if len(errorComponents.Code) != 0 { 4379 errorCode = errorComponents.Code 4380 } 4381 if len(errorComponents.Message) != 0 { 4382 errorMessage = errorComponents.Message 4383 } 4384 errorBody.Seek(0, io.SeekStart) 4385 switch { 4386 case strings.EqualFold("InvalidArgument", errorCode): 4387 return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) 4388 4389 case strings.EqualFold("InvalidInput", errorCode): 4390 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 4391 4392 case strings.EqualFold("NoSuchHostedZone", errorCode): 4393 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 4394 4395 default: 4396 genericError := &smithy.GenericAPIError{ 4397 Code: errorCode, 4398 Message: errorMessage, 4399 } 4400 return genericError 4401 4402 } 4403 } 4404 4405 func awsRestxml_deserializeOpDocumentGetDNSSECOutput(v **GetDNSSECOutput, decoder smithyxml.NodeDecoder) error { 4406 if v == nil { 4407 return fmt.Errorf("unexpected nil of type %T", v) 4408 } 4409 var sv *GetDNSSECOutput 4410 if *v == nil { 4411 sv = &GetDNSSECOutput{} 4412 } else { 4413 sv = *v 4414 } 4415 4416 for { 4417 t, done, err := decoder.Token() 4418 if err != nil { 4419 return err 4420 } 4421 if done { 4422 break 4423 } 4424 originalDecoder := decoder 4425 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 4426 switch { 4427 case strings.EqualFold("KeySigningKeys", t.Name.Local): 4428 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4429 if err := awsRestxml_deserializeDocumentKeySigningKeys(&sv.KeySigningKeys, nodeDecoder); err != nil { 4430 return err 4431 } 4432 4433 case strings.EqualFold("Status", t.Name.Local): 4434 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4435 if err := awsRestxml_deserializeDocumentDNSSECStatus(&sv.Status, nodeDecoder); err != nil { 4436 return err 4437 } 4438 4439 default: 4440 // Do nothing and ignore the unexpected tag element 4441 err = decoder.Decoder.Skip() 4442 if err != nil { 4443 return err 4444 } 4445 4446 } 4447 decoder = originalDecoder 4448 } 4449 *v = sv 4450 return nil 4451 } 4452 4453 type awsRestxml_deserializeOpGetGeoLocation struct { 4454 } 4455 4456 func (*awsRestxml_deserializeOpGetGeoLocation) ID() string { 4457 return "OperationDeserializer" 4458 } 4459 4460 func (m *awsRestxml_deserializeOpGetGeoLocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4461 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4462 ) { 4463 out, metadata, err = next.HandleDeserialize(ctx, in) 4464 if err != nil { 4465 return out, metadata, err 4466 } 4467 4468 response, ok := out.RawResponse.(*smithyhttp.Response) 4469 if !ok { 4470 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4471 } 4472 4473 if response.StatusCode < 200 || response.StatusCode >= 300 { 4474 return out, metadata, awsRestxml_deserializeOpErrorGetGeoLocation(response, &metadata) 4475 } 4476 output := &GetGeoLocationOutput{} 4477 out.Result = output 4478 4479 var buff [1024]byte 4480 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4481 body := io.TeeReader(response.Body, ringBuffer) 4482 rootDecoder := xml.NewDecoder(body) 4483 t, err := smithyxml.FetchRootElement(rootDecoder) 4484 if err == io.EOF { 4485 return out, metadata, nil 4486 } 4487 if err != nil { 4488 var snapshot bytes.Buffer 4489 io.Copy(&snapshot, ringBuffer) 4490 return out, metadata, &smithy.DeserializationError{ 4491 Err: fmt.Errorf("failed to decode response body, %w", err), 4492 Snapshot: snapshot.Bytes(), 4493 } 4494 } 4495 4496 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4497 err = awsRestxml_deserializeOpDocumentGetGeoLocationOutput(&output, decoder) 4498 if err != nil { 4499 var snapshot bytes.Buffer 4500 io.Copy(&snapshot, ringBuffer) 4501 return out, metadata, &smithy.DeserializationError{ 4502 Err: fmt.Errorf("failed to decode response body, %w", err), 4503 Snapshot: snapshot.Bytes(), 4504 } 4505 } 4506 4507 return out, metadata, err 4508 } 4509 4510 func awsRestxml_deserializeOpErrorGetGeoLocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4511 var errorBuffer bytes.Buffer 4512 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4513 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4514 } 4515 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4516 4517 errorCode := "UnknownError" 4518 errorMessage := errorCode 4519 4520 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4521 if err != nil { 4522 return err 4523 } 4524 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4525 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4526 } 4527 if len(errorComponents.Code) != 0 { 4528 errorCode = errorComponents.Code 4529 } 4530 if len(errorComponents.Message) != 0 { 4531 errorMessage = errorComponents.Message 4532 } 4533 errorBody.Seek(0, io.SeekStart) 4534 switch { 4535 case strings.EqualFold("InvalidInput", errorCode): 4536 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 4537 4538 case strings.EqualFold("NoSuchGeoLocation", errorCode): 4539 return awsRestxml_deserializeErrorNoSuchGeoLocation(response, errorBody) 4540 4541 default: 4542 genericError := &smithy.GenericAPIError{ 4543 Code: errorCode, 4544 Message: errorMessage, 4545 } 4546 return genericError 4547 4548 } 4549 } 4550 4551 func awsRestxml_deserializeOpDocumentGetGeoLocationOutput(v **GetGeoLocationOutput, decoder smithyxml.NodeDecoder) error { 4552 if v == nil { 4553 return fmt.Errorf("unexpected nil of type %T", v) 4554 } 4555 var sv *GetGeoLocationOutput 4556 if *v == nil { 4557 sv = &GetGeoLocationOutput{} 4558 } else { 4559 sv = *v 4560 } 4561 4562 for { 4563 t, done, err := decoder.Token() 4564 if err != nil { 4565 return err 4566 } 4567 if done { 4568 break 4569 } 4570 originalDecoder := decoder 4571 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 4572 switch { 4573 case strings.EqualFold("GeoLocationDetails", t.Name.Local): 4574 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4575 if err := awsRestxml_deserializeDocumentGeoLocationDetails(&sv.GeoLocationDetails, nodeDecoder); err != nil { 4576 return err 4577 } 4578 4579 default: 4580 // Do nothing and ignore the unexpected tag element 4581 err = decoder.Decoder.Skip() 4582 if err != nil { 4583 return err 4584 } 4585 4586 } 4587 decoder = originalDecoder 4588 } 4589 *v = sv 4590 return nil 4591 } 4592 4593 type awsRestxml_deserializeOpGetHealthCheck struct { 4594 } 4595 4596 func (*awsRestxml_deserializeOpGetHealthCheck) ID() string { 4597 return "OperationDeserializer" 4598 } 4599 4600 func (m *awsRestxml_deserializeOpGetHealthCheck) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4601 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4602 ) { 4603 out, metadata, err = next.HandleDeserialize(ctx, in) 4604 if err != nil { 4605 return out, metadata, err 4606 } 4607 4608 response, ok := out.RawResponse.(*smithyhttp.Response) 4609 if !ok { 4610 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4611 } 4612 4613 if response.StatusCode < 200 || response.StatusCode >= 300 { 4614 return out, metadata, awsRestxml_deserializeOpErrorGetHealthCheck(response, &metadata) 4615 } 4616 output := &GetHealthCheckOutput{} 4617 out.Result = output 4618 4619 var buff [1024]byte 4620 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4621 body := io.TeeReader(response.Body, ringBuffer) 4622 rootDecoder := xml.NewDecoder(body) 4623 t, err := smithyxml.FetchRootElement(rootDecoder) 4624 if err == io.EOF { 4625 return out, metadata, nil 4626 } 4627 if err != nil { 4628 var snapshot bytes.Buffer 4629 io.Copy(&snapshot, ringBuffer) 4630 return out, metadata, &smithy.DeserializationError{ 4631 Err: fmt.Errorf("failed to decode response body, %w", err), 4632 Snapshot: snapshot.Bytes(), 4633 } 4634 } 4635 4636 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4637 err = awsRestxml_deserializeOpDocumentGetHealthCheckOutput(&output, decoder) 4638 if err != nil { 4639 var snapshot bytes.Buffer 4640 io.Copy(&snapshot, ringBuffer) 4641 return out, metadata, &smithy.DeserializationError{ 4642 Err: fmt.Errorf("failed to decode response body, %w", err), 4643 Snapshot: snapshot.Bytes(), 4644 } 4645 } 4646 4647 return out, metadata, err 4648 } 4649 4650 func awsRestxml_deserializeOpErrorGetHealthCheck(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("IncompatibleVersion", errorCode): 4676 return awsRestxml_deserializeErrorIncompatibleVersion(response, errorBody) 4677 4678 case strings.EqualFold("InvalidInput", errorCode): 4679 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 4680 4681 case strings.EqualFold("NoSuchHealthCheck", errorCode): 4682 return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) 4683 4684 default: 4685 genericError := &smithy.GenericAPIError{ 4686 Code: errorCode, 4687 Message: errorMessage, 4688 } 4689 return genericError 4690 4691 } 4692 } 4693 4694 func awsRestxml_deserializeOpDocumentGetHealthCheckOutput(v **GetHealthCheckOutput, decoder smithyxml.NodeDecoder) error { 4695 if v == nil { 4696 return fmt.Errorf("unexpected nil of type %T", v) 4697 } 4698 var sv *GetHealthCheckOutput 4699 if *v == nil { 4700 sv = &GetHealthCheckOutput{} 4701 } else { 4702 sv = *v 4703 } 4704 4705 for { 4706 t, done, err := decoder.Token() 4707 if err != nil { 4708 return err 4709 } 4710 if done { 4711 break 4712 } 4713 originalDecoder := decoder 4714 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 4715 switch { 4716 case strings.EqualFold("HealthCheck", t.Name.Local): 4717 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 4718 if err := awsRestxml_deserializeDocumentHealthCheck(&sv.HealthCheck, nodeDecoder); err != nil { 4719 return err 4720 } 4721 4722 default: 4723 // Do nothing and ignore the unexpected tag element 4724 err = decoder.Decoder.Skip() 4725 if err != nil { 4726 return err 4727 } 4728 4729 } 4730 decoder = originalDecoder 4731 } 4732 *v = sv 4733 return nil 4734 } 4735 4736 type awsRestxml_deserializeOpGetHealthCheckCount struct { 4737 } 4738 4739 func (*awsRestxml_deserializeOpGetHealthCheckCount) ID() string { 4740 return "OperationDeserializer" 4741 } 4742 4743 func (m *awsRestxml_deserializeOpGetHealthCheckCount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4744 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4745 ) { 4746 out, metadata, err = next.HandleDeserialize(ctx, in) 4747 if err != nil { 4748 return out, metadata, err 4749 } 4750 4751 response, ok := out.RawResponse.(*smithyhttp.Response) 4752 if !ok { 4753 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4754 } 4755 4756 if response.StatusCode < 200 || response.StatusCode >= 300 { 4757 return out, metadata, awsRestxml_deserializeOpErrorGetHealthCheckCount(response, &metadata) 4758 } 4759 output := &GetHealthCheckCountOutput{} 4760 out.Result = output 4761 4762 var buff [1024]byte 4763 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4764 body := io.TeeReader(response.Body, ringBuffer) 4765 rootDecoder := xml.NewDecoder(body) 4766 t, err := smithyxml.FetchRootElement(rootDecoder) 4767 if err == io.EOF { 4768 return out, metadata, nil 4769 } 4770 if err != nil { 4771 var snapshot bytes.Buffer 4772 io.Copy(&snapshot, ringBuffer) 4773 return out, metadata, &smithy.DeserializationError{ 4774 Err: fmt.Errorf("failed to decode response body, %w", err), 4775 Snapshot: snapshot.Bytes(), 4776 } 4777 } 4778 4779 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4780 err = awsRestxml_deserializeOpDocumentGetHealthCheckCountOutput(&output, decoder) 4781 if err != nil { 4782 var snapshot bytes.Buffer 4783 io.Copy(&snapshot, ringBuffer) 4784 return out, metadata, &smithy.DeserializationError{ 4785 Err: fmt.Errorf("failed to decode response body, %w", err), 4786 Snapshot: snapshot.Bytes(), 4787 } 4788 } 4789 4790 return out, metadata, err 4791 } 4792 4793 func awsRestxml_deserializeOpErrorGetHealthCheckCount(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4794 var errorBuffer bytes.Buffer 4795 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4796 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4797 } 4798 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4799 4800 errorCode := "UnknownError" 4801 errorMessage := errorCode 4802 4803 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4804 if err != nil { 4805 return err 4806 } 4807 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4808 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4809 } 4810 if len(errorComponents.Code) != 0 { 4811 errorCode = errorComponents.Code 4812 } 4813 if len(errorComponents.Message) != 0 { 4814 errorMessage = errorComponents.Message 4815 } 4816 errorBody.Seek(0, io.SeekStart) 4817 switch { 4818 default: 4819 genericError := &smithy.GenericAPIError{ 4820 Code: errorCode, 4821 Message: errorMessage, 4822 } 4823 return genericError 4824 4825 } 4826 } 4827 4828 func awsRestxml_deserializeOpDocumentGetHealthCheckCountOutput(v **GetHealthCheckCountOutput, decoder smithyxml.NodeDecoder) error { 4829 if v == nil { 4830 return fmt.Errorf("unexpected nil of type %T", v) 4831 } 4832 var sv *GetHealthCheckCountOutput 4833 if *v == nil { 4834 sv = &GetHealthCheckCountOutput{} 4835 } else { 4836 sv = *v 4837 } 4838 4839 for { 4840 t, done, err := decoder.Token() 4841 if err != nil { 4842 return err 4843 } 4844 if done { 4845 break 4846 } 4847 originalDecoder := decoder 4848 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 4849 switch { 4850 case strings.EqualFold("HealthCheckCount", t.Name.Local): 4851 val, err := decoder.Value() 4852 if err != nil { 4853 return err 4854 } 4855 if val == nil { 4856 break 4857 } 4858 { 4859 xtv := string(val) 4860 i64, err := strconv.ParseInt(xtv, 10, 64) 4861 if err != nil { 4862 return err 4863 } 4864 sv.HealthCheckCount = ptr.Int64(i64) 4865 } 4866 4867 default: 4868 // Do nothing and ignore the unexpected tag element 4869 err = decoder.Decoder.Skip() 4870 if err != nil { 4871 return err 4872 } 4873 4874 } 4875 decoder = originalDecoder 4876 } 4877 *v = sv 4878 return nil 4879 } 4880 4881 type awsRestxml_deserializeOpGetHealthCheckLastFailureReason struct { 4882 } 4883 4884 func (*awsRestxml_deserializeOpGetHealthCheckLastFailureReason) ID() string { 4885 return "OperationDeserializer" 4886 } 4887 4888 func (m *awsRestxml_deserializeOpGetHealthCheckLastFailureReason) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 4889 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 4890 ) { 4891 out, metadata, err = next.HandleDeserialize(ctx, in) 4892 if err != nil { 4893 return out, metadata, err 4894 } 4895 4896 response, ok := out.RawResponse.(*smithyhttp.Response) 4897 if !ok { 4898 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 4899 } 4900 4901 if response.StatusCode < 200 || response.StatusCode >= 300 { 4902 return out, metadata, awsRestxml_deserializeOpErrorGetHealthCheckLastFailureReason(response, &metadata) 4903 } 4904 output := &GetHealthCheckLastFailureReasonOutput{} 4905 out.Result = output 4906 4907 var buff [1024]byte 4908 ringBuffer := smithyio.NewRingBuffer(buff[:]) 4909 body := io.TeeReader(response.Body, ringBuffer) 4910 rootDecoder := xml.NewDecoder(body) 4911 t, err := smithyxml.FetchRootElement(rootDecoder) 4912 if err == io.EOF { 4913 return out, metadata, nil 4914 } 4915 if err != nil { 4916 var snapshot bytes.Buffer 4917 io.Copy(&snapshot, ringBuffer) 4918 return out, metadata, &smithy.DeserializationError{ 4919 Err: fmt.Errorf("failed to decode response body, %w", err), 4920 Snapshot: snapshot.Bytes(), 4921 } 4922 } 4923 4924 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 4925 err = awsRestxml_deserializeOpDocumentGetHealthCheckLastFailureReasonOutput(&output, decoder) 4926 if err != nil { 4927 var snapshot bytes.Buffer 4928 io.Copy(&snapshot, ringBuffer) 4929 return out, metadata, &smithy.DeserializationError{ 4930 Err: fmt.Errorf("failed to decode response body, %w", err), 4931 Snapshot: snapshot.Bytes(), 4932 } 4933 } 4934 4935 return out, metadata, err 4936 } 4937 4938 func awsRestxml_deserializeOpErrorGetHealthCheckLastFailureReason(response *smithyhttp.Response, metadata *middleware.Metadata) error { 4939 var errorBuffer bytes.Buffer 4940 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 4941 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 4942 } 4943 errorBody := bytes.NewReader(errorBuffer.Bytes()) 4944 4945 errorCode := "UnknownError" 4946 errorMessage := errorCode 4947 4948 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 4949 if err != nil { 4950 return err 4951 } 4952 if reqID := errorComponents.RequestID; len(reqID) != 0 { 4953 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 4954 } 4955 if len(errorComponents.Code) != 0 { 4956 errorCode = errorComponents.Code 4957 } 4958 if len(errorComponents.Message) != 0 { 4959 errorMessage = errorComponents.Message 4960 } 4961 errorBody.Seek(0, io.SeekStart) 4962 switch { 4963 case strings.EqualFold("InvalidInput", errorCode): 4964 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 4965 4966 case strings.EqualFold("NoSuchHealthCheck", errorCode): 4967 return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) 4968 4969 default: 4970 genericError := &smithy.GenericAPIError{ 4971 Code: errorCode, 4972 Message: errorMessage, 4973 } 4974 return genericError 4975 4976 } 4977 } 4978 4979 func awsRestxml_deserializeOpDocumentGetHealthCheckLastFailureReasonOutput(v **GetHealthCheckLastFailureReasonOutput, decoder smithyxml.NodeDecoder) error { 4980 if v == nil { 4981 return fmt.Errorf("unexpected nil of type %T", v) 4982 } 4983 var sv *GetHealthCheckLastFailureReasonOutput 4984 if *v == nil { 4985 sv = &GetHealthCheckLastFailureReasonOutput{} 4986 } else { 4987 sv = *v 4988 } 4989 4990 for { 4991 t, done, err := decoder.Token() 4992 if err != nil { 4993 return err 4994 } 4995 if done { 4996 break 4997 } 4998 originalDecoder := decoder 4999 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 5000 switch { 5001 case strings.EqualFold("HealthCheckObservations", t.Name.Local): 5002 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5003 if err := awsRestxml_deserializeDocumentHealthCheckObservations(&sv.HealthCheckObservations, nodeDecoder); err != nil { 5004 return err 5005 } 5006 5007 default: 5008 // Do nothing and ignore the unexpected tag element 5009 err = decoder.Decoder.Skip() 5010 if err != nil { 5011 return err 5012 } 5013 5014 } 5015 decoder = originalDecoder 5016 } 5017 *v = sv 5018 return nil 5019 } 5020 5021 type awsRestxml_deserializeOpGetHealthCheckStatus struct { 5022 } 5023 5024 func (*awsRestxml_deserializeOpGetHealthCheckStatus) ID() string { 5025 return "OperationDeserializer" 5026 } 5027 5028 func (m *awsRestxml_deserializeOpGetHealthCheckStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5029 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5030 ) { 5031 out, metadata, err = next.HandleDeserialize(ctx, in) 5032 if err != nil { 5033 return out, metadata, err 5034 } 5035 5036 response, ok := out.RawResponse.(*smithyhttp.Response) 5037 if !ok { 5038 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5039 } 5040 5041 if response.StatusCode < 200 || response.StatusCode >= 300 { 5042 return out, metadata, awsRestxml_deserializeOpErrorGetHealthCheckStatus(response, &metadata) 5043 } 5044 output := &GetHealthCheckStatusOutput{} 5045 out.Result = output 5046 5047 var buff [1024]byte 5048 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5049 body := io.TeeReader(response.Body, ringBuffer) 5050 rootDecoder := xml.NewDecoder(body) 5051 t, err := smithyxml.FetchRootElement(rootDecoder) 5052 if err == io.EOF { 5053 return out, metadata, nil 5054 } 5055 if err != nil { 5056 var snapshot bytes.Buffer 5057 io.Copy(&snapshot, ringBuffer) 5058 return out, metadata, &smithy.DeserializationError{ 5059 Err: fmt.Errorf("failed to decode response body, %w", err), 5060 Snapshot: snapshot.Bytes(), 5061 } 5062 } 5063 5064 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5065 err = awsRestxml_deserializeOpDocumentGetHealthCheckStatusOutput(&output, decoder) 5066 if err != nil { 5067 var snapshot bytes.Buffer 5068 io.Copy(&snapshot, ringBuffer) 5069 return out, metadata, &smithy.DeserializationError{ 5070 Err: fmt.Errorf("failed to decode response body, %w", err), 5071 Snapshot: snapshot.Bytes(), 5072 } 5073 } 5074 5075 return out, metadata, err 5076 } 5077 5078 func awsRestxml_deserializeOpErrorGetHealthCheckStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5079 var errorBuffer bytes.Buffer 5080 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5081 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5082 } 5083 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5084 5085 errorCode := "UnknownError" 5086 errorMessage := errorCode 5087 5088 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5089 if err != nil { 5090 return err 5091 } 5092 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5093 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5094 } 5095 if len(errorComponents.Code) != 0 { 5096 errorCode = errorComponents.Code 5097 } 5098 if len(errorComponents.Message) != 0 { 5099 errorMessage = errorComponents.Message 5100 } 5101 errorBody.Seek(0, io.SeekStart) 5102 switch { 5103 case strings.EqualFold("InvalidInput", errorCode): 5104 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 5105 5106 case strings.EqualFold("NoSuchHealthCheck", errorCode): 5107 return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) 5108 5109 default: 5110 genericError := &smithy.GenericAPIError{ 5111 Code: errorCode, 5112 Message: errorMessage, 5113 } 5114 return genericError 5115 5116 } 5117 } 5118 5119 func awsRestxml_deserializeOpDocumentGetHealthCheckStatusOutput(v **GetHealthCheckStatusOutput, decoder smithyxml.NodeDecoder) error { 5120 if v == nil { 5121 return fmt.Errorf("unexpected nil of type %T", v) 5122 } 5123 var sv *GetHealthCheckStatusOutput 5124 if *v == nil { 5125 sv = &GetHealthCheckStatusOutput{} 5126 } else { 5127 sv = *v 5128 } 5129 5130 for { 5131 t, done, err := decoder.Token() 5132 if err != nil { 5133 return err 5134 } 5135 if done { 5136 break 5137 } 5138 originalDecoder := decoder 5139 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 5140 switch { 5141 case strings.EqualFold("HealthCheckObservations", t.Name.Local): 5142 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5143 if err := awsRestxml_deserializeDocumentHealthCheckObservations(&sv.HealthCheckObservations, nodeDecoder); err != nil { 5144 return err 5145 } 5146 5147 default: 5148 // Do nothing and ignore the unexpected tag element 5149 err = decoder.Decoder.Skip() 5150 if err != nil { 5151 return err 5152 } 5153 5154 } 5155 decoder = originalDecoder 5156 } 5157 *v = sv 5158 return nil 5159 } 5160 5161 type awsRestxml_deserializeOpGetHostedZone struct { 5162 } 5163 5164 func (*awsRestxml_deserializeOpGetHostedZone) ID() string { 5165 return "OperationDeserializer" 5166 } 5167 5168 func (m *awsRestxml_deserializeOpGetHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5169 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5170 ) { 5171 out, metadata, err = next.HandleDeserialize(ctx, in) 5172 if err != nil { 5173 return out, metadata, err 5174 } 5175 5176 response, ok := out.RawResponse.(*smithyhttp.Response) 5177 if !ok { 5178 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5179 } 5180 5181 if response.StatusCode < 200 || response.StatusCode >= 300 { 5182 return out, metadata, awsRestxml_deserializeOpErrorGetHostedZone(response, &metadata) 5183 } 5184 output := &GetHostedZoneOutput{} 5185 out.Result = output 5186 5187 var buff [1024]byte 5188 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5189 body := io.TeeReader(response.Body, ringBuffer) 5190 rootDecoder := xml.NewDecoder(body) 5191 t, err := smithyxml.FetchRootElement(rootDecoder) 5192 if err == io.EOF { 5193 return out, metadata, nil 5194 } 5195 if err != nil { 5196 var snapshot bytes.Buffer 5197 io.Copy(&snapshot, ringBuffer) 5198 return out, metadata, &smithy.DeserializationError{ 5199 Err: fmt.Errorf("failed to decode response body, %w", err), 5200 Snapshot: snapshot.Bytes(), 5201 } 5202 } 5203 5204 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5205 err = awsRestxml_deserializeOpDocumentGetHostedZoneOutput(&output, decoder) 5206 if err != nil { 5207 var snapshot bytes.Buffer 5208 io.Copy(&snapshot, ringBuffer) 5209 return out, metadata, &smithy.DeserializationError{ 5210 Err: fmt.Errorf("failed to decode response body, %w", err), 5211 Snapshot: snapshot.Bytes(), 5212 } 5213 } 5214 5215 return out, metadata, err 5216 } 5217 5218 func awsRestxml_deserializeOpErrorGetHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5219 var errorBuffer bytes.Buffer 5220 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5221 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5222 } 5223 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5224 5225 errorCode := "UnknownError" 5226 errorMessage := errorCode 5227 5228 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5229 if err != nil { 5230 return err 5231 } 5232 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5233 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5234 } 5235 if len(errorComponents.Code) != 0 { 5236 errorCode = errorComponents.Code 5237 } 5238 if len(errorComponents.Message) != 0 { 5239 errorMessage = errorComponents.Message 5240 } 5241 errorBody.Seek(0, io.SeekStart) 5242 switch { 5243 case strings.EqualFold("InvalidInput", errorCode): 5244 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 5245 5246 case strings.EqualFold("NoSuchHostedZone", errorCode): 5247 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 5248 5249 default: 5250 genericError := &smithy.GenericAPIError{ 5251 Code: errorCode, 5252 Message: errorMessage, 5253 } 5254 return genericError 5255 5256 } 5257 } 5258 5259 func awsRestxml_deserializeOpDocumentGetHostedZoneOutput(v **GetHostedZoneOutput, decoder smithyxml.NodeDecoder) error { 5260 if v == nil { 5261 return fmt.Errorf("unexpected nil of type %T", v) 5262 } 5263 var sv *GetHostedZoneOutput 5264 if *v == nil { 5265 sv = &GetHostedZoneOutput{} 5266 } else { 5267 sv = *v 5268 } 5269 5270 for { 5271 t, done, err := decoder.Token() 5272 if err != nil { 5273 return err 5274 } 5275 if done { 5276 break 5277 } 5278 originalDecoder := decoder 5279 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 5280 switch { 5281 case strings.EqualFold("DelegationSet", t.Name.Local): 5282 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5283 if err := awsRestxml_deserializeDocumentDelegationSet(&sv.DelegationSet, nodeDecoder); err != nil { 5284 return err 5285 } 5286 5287 case strings.EqualFold("HostedZone", t.Name.Local): 5288 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5289 if err := awsRestxml_deserializeDocumentHostedZone(&sv.HostedZone, nodeDecoder); err != nil { 5290 return err 5291 } 5292 5293 case strings.EqualFold("VPCs", t.Name.Local): 5294 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5295 if err := awsRestxml_deserializeDocumentVPCs(&sv.VPCs, nodeDecoder); err != nil { 5296 return err 5297 } 5298 5299 default: 5300 // Do nothing and ignore the unexpected tag element 5301 err = decoder.Decoder.Skip() 5302 if err != nil { 5303 return err 5304 } 5305 5306 } 5307 decoder = originalDecoder 5308 } 5309 *v = sv 5310 return nil 5311 } 5312 5313 type awsRestxml_deserializeOpGetHostedZoneCount struct { 5314 } 5315 5316 func (*awsRestxml_deserializeOpGetHostedZoneCount) ID() string { 5317 return "OperationDeserializer" 5318 } 5319 5320 func (m *awsRestxml_deserializeOpGetHostedZoneCount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5321 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5322 ) { 5323 out, metadata, err = next.HandleDeserialize(ctx, in) 5324 if err != nil { 5325 return out, metadata, err 5326 } 5327 5328 response, ok := out.RawResponse.(*smithyhttp.Response) 5329 if !ok { 5330 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5331 } 5332 5333 if response.StatusCode < 200 || response.StatusCode >= 300 { 5334 return out, metadata, awsRestxml_deserializeOpErrorGetHostedZoneCount(response, &metadata) 5335 } 5336 output := &GetHostedZoneCountOutput{} 5337 out.Result = output 5338 5339 var buff [1024]byte 5340 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5341 body := io.TeeReader(response.Body, ringBuffer) 5342 rootDecoder := xml.NewDecoder(body) 5343 t, err := smithyxml.FetchRootElement(rootDecoder) 5344 if err == io.EOF { 5345 return out, metadata, nil 5346 } 5347 if err != nil { 5348 var snapshot bytes.Buffer 5349 io.Copy(&snapshot, ringBuffer) 5350 return out, metadata, &smithy.DeserializationError{ 5351 Err: fmt.Errorf("failed to decode response body, %w", err), 5352 Snapshot: snapshot.Bytes(), 5353 } 5354 } 5355 5356 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5357 err = awsRestxml_deserializeOpDocumentGetHostedZoneCountOutput(&output, decoder) 5358 if err != nil { 5359 var snapshot bytes.Buffer 5360 io.Copy(&snapshot, ringBuffer) 5361 return out, metadata, &smithy.DeserializationError{ 5362 Err: fmt.Errorf("failed to decode response body, %w", err), 5363 Snapshot: snapshot.Bytes(), 5364 } 5365 } 5366 5367 return out, metadata, err 5368 } 5369 5370 func awsRestxml_deserializeOpErrorGetHostedZoneCount(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5371 var errorBuffer bytes.Buffer 5372 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5373 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5374 } 5375 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5376 5377 errorCode := "UnknownError" 5378 errorMessage := errorCode 5379 5380 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5381 if err != nil { 5382 return err 5383 } 5384 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5385 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5386 } 5387 if len(errorComponents.Code) != 0 { 5388 errorCode = errorComponents.Code 5389 } 5390 if len(errorComponents.Message) != 0 { 5391 errorMessage = errorComponents.Message 5392 } 5393 errorBody.Seek(0, io.SeekStart) 5394 switch { 5395 case strings.EqualFold("InvalidInput", errorCode): 5396 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 5397 5398 default: 5399 genericError := &smithy.GenericAPIError{ 5400 Code: errorCode, 5401 Message: errorMessage, 5402 } 5403 return genericError 5404 5405 } 5406 } 5407 5408 func awsRestxml_deserializeOpDocumentGetHostedZoneCountOutput(v **GetHostedZoneCountOutput, decoder smithyxml.NodeDecoder) error { 5409 if v == nil { 5410 return fmt.Errorf("unexpected nil of type %T", v) 5411 } 5412 var sv *GetHostedZoneCountOutput 5413 if *v == nil { 5414 sv = &GetHostedZoneCountOutput{} 5415 } else { 5416 sv = *v 5417 } 5418 5419 for { 5420 t, done, err := decoder.Token() 5421 if err != nil { 5422 return err 5423 } 5424 if done { 5425 break 5426 } 5427 originalDecoder := decoder 5428 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 5429 switch { 5430 case strings.EqualFold("HostedZoneCount", t.Name.Local): 5431 val, err := decoder.Value() 5432 if err != nil { 5433 return err 5434 } 5435 if val == nil { 5436 break 5437 } 5438 { 5439 xtv := string(val) 5440 i64, err := strconv.ParseInt(xtv, 10, 64) 5441 if err != nil { 5442 return err 5443 } 5444 sv.HostedZoneCount = ptr.Int64(i64) 5445 } 5446 5447 default: 5448 // Do nothing and ignore the unexpected tag element 5449 err = decoder.Decoder.Skip() 5450 if err != nil { 5451 return err 5452 } 5453 5454 } 5455 decoder = originalDecoder 5456 } 5457 *v = sv 5458 return nil 5459 } 5460 5461 type awsRestxml_deserializeOpGetHostedZoneLimit struct { 5462 } 5463 5464 func (*awsRestxml_deserializeOpGetHostedZoneLimit) ID() string { 5465 return "OperationDeserializer" 5466 } 5467 5468 func (m *awsRestxml_deserializeOpGetHostedZoneLimit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5469 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5470 ) { 5471 out, metadata, err = next.HandleDeserialize(ctx, in) 5472 if err != nil { 5473 return out, metadata, err 5474 } 5475 5476 response, ok := out.RawResponse.(*smithyhttp.Response) 5477 if !ok { 5478 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5479 } 5480 5481 if response.StatusCode < 200 || response.StatusCode >= 300 { 5482 return out, metadata, awsRestxml_deserializeOpErrorGetHostedZoneLimit(response, &metadata) 5483 } 5484 output := &GetHostedZoneLimitOutput{} 5485 out.Result = output 5486 5487 var buff [1024]byte 5488 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5489 body := io.TeeReader(response.Body, ringBuffer) 5490 rootDecoder := xml.NewDecoder(body) 5491 t, err := smithyxml.FetchRootElement(rootDecoder) 5492 if err == io.EOF { 5493 return out, metadata, nil 5494 } 5495 if err != nil { 5496 var snapshot bytes.Buffer 5497 io.Copy(&snapshot, ringBuffer) 5498 return out, metadata, &smithy.DeserializationError{ 5499 Err: fmt.Errorf("failed to decode response body, %w", err), 5500 Snapshot: snapshot.Bytes(), 5501 } 5502 } 5503 5504 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5505 err = awsRestxml_deserializeOpDocumentGetHostedZoneLimitOutput(&output, decoder) 5506 if err != nil { 5507 var snapshot bytes.Buffer 5508 io.Copy(&snapshot, ringBuffer) 5509 return out, metadata, &smithy.DeserializationError{ 5510 Err: fmt.Errorf("failed to decode response body, %w", err), 5511 Snapshot: snapshot.Bytes(), 5512 } 5513 } 5514 5515 return out, metadata, err 5516 } 5517 5518 func awsRestxml_deserializeOpErrorGetHostedZoneLimit(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5519 var errorBuffer bytes.Buffer 5520 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5521 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5522 } 5523 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5524 5525 errorCode := "UnknownError" 5526 errorMessage := errorCode 5527 5528 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5529 if err != nil { 5530 return err 5531 } 5532 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5533 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5534 } 5535 if len(errorComponents.Code) != 0 { 5536 errorCode = errorComponents.Code 5537 } 5538 if len(errorComponents.Message) != 0 { 5539 errorMessage = errorComponents.Message 5540 } 5541 errorBody.Seek(0, io.SeekStart) 5542 switch { 5543 case strings.EqualFold("HostedZoneNotPrivate", errorCode): 5544 return awsRestxml_deserializeErrorHostedZoneNotPrivate(response, errorBody) 5545 5546 case strings.EqualFold("InvalidInput", errorCode): 5547 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 5548 5549 case strings.EqualFold("NoSuchHostedZone", errorCode): 5550 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 5551 5552 default: 5553 genericError := &smithy.GenericAPIError{ 5554 Code: errorCode, 5555 Message: errorMessage, 5556 } 5557 return genericError 5558 5559 } 5560 } 5561 5562 func awsRestxml_deserializeOpDocumentGetHostedZoneLimitOutput(v **GetHostedZoneLimitOutput, decoder smithyxml.NodeDecoder) error { 5563 if v == nil { 5564 return fmt.Errorf("unexpected nil of type %T", v) 5565 } 5566 var sv *GetHostedZoneLimitOutput 5567 if *v == nil { 5568 sv = &GetHostedZoneLimitOutput{} 5569 } else { 5570 sv = *v 5571 } 5572 5573 for { 5574 t, done, err := decoder.Token() 5575 if err != nil { 5576 return err 5577 } 5578 if done { 5579 break 5580 } 5581 originalDecoder := decoder 5582 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 5583 switch { 5584 case strings.EqualFold("Count", t.Name.Local): 5585 val, err := decoder.Value() 5586 if err != nil { 5587 return err 5588 } 5589 if val == nil { 5590 break 5591 } 5592 { 5593 xtv := string(val) 5594 i64, err := strconv.ParseInt(xtv, 10, 64) 5595 if err != nil { 5596 return err 5597 } 5598 sv.Count = i64 5599 } 5600 5601 case strings.EqualFold("Limit", t.Name.Local): 5602 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5603 if err := awsRestxml_deserializeDocumentHostedZoneLimit(&sv.Limit, nodeDecoder); err != nil { 5604 return err 5605 } 5606 5607 default: 5608 // Do nothing and ignore the unexpected tag element 5609 err = decoder.Decoder.Skip() 5610 if err != nil { 5611 return err 5612 } 5613 5614 } 5615 decoder = originalDecoder 5616 } 5617 *v = sv 5618 return nil 5619 } 5620 5621 type awsRestxml_deserializeOpGetQueryLoggingConfig struct { 5622 } 5623 5624 func (*awsRestxml_deserializeOpGetQueryLoggingConfig) ID() string { 5625 return "OperationDeserializer" 5626 } 5627 5628 func (m *awsRestxml_deserializeOpGetQueryLoggingConfig) 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, awsRestxml_deserializeOpErrorGetQueryLoggingConfig(response, &metadata) 5643 } 5644 output := &GetQueryLoggingConfigOutput{} 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 err = awsRestxml_deserializeOpDocumentGetQueryLoggingConfigOutput(&output, decoder) 5666 if err != nil { 5667 var snapshot bytes.Buffer 5668 io.Copy(&snapshot, ringBuffer) 5669 return out, metadata, &smithy.DeserializationError{ 5670 Err: fmt.Errorf("failed to decode response body, %w", err), 5671 Snapshot: snapshot.Bytes(), 5672 } 5673 } 5674 5675 return out, metadata, err 5676 } 5677 5678 func awsRestxml_deserializeOpErrorGetQueryLoggingConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5679 var errorBuffer bytes.Buffer 5680 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5681 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5682 } 5683 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5684 5685 errorCode := "UnknownError" 5686 errorMessage := errorCode 5687 5688 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5689 if err != nil { 5690 return err 5691 } 5692 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5693 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5694 } 5695 if len(errorComponents.Code) != 0 { 5696 errorCode = errorComponents.Code 5697 } 5698 if len(errorComponents.Message) != 0 { 5699 errorMessage = errorComponents.Message 5700 } 5701 errorBody.Seek(0, io.SeekStart) 5702 switch { 5703 case strings.EqualFold("InvalidInput", errorCode): 5704 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 5705 5706 case strings.EqualFold("NoSuchQueryLoggingConfig", errorCode): 5707 return awsRestxml_deserializeErrorNoSuchQueryLoggingConfig(response, errorBody) 5708 5709 default: 5710 genericError := &smithy.GenericAPIError{ 5711 Code: errorCode, 5712 Message: errorMessage, 5713 } 5714 return genericError 5715 5716 } 5717 } 5718 5719 func awsRestxml_deserializeOpDocumentGetQueryLoggingConfigOutput(v **GetQueryLoggingConfigOutput, decoder smithyxml.NodeDecoder) error { 5720 if v == nil { 5721 return fmt.Errorf("unexpected nil of type %T", v) 5722 } 5723 var sv *GetQueryLoggingConfigOutput 5724 if *v == nil { 5725 sv = &GetQueryLoggingConfigOutput{} 5726 } else { 5727 sv = *v 5728 } 5729 5730 for { 5731 t, done, err := decoder.Token() 5732 if err != nil { 5733 return err 5734 } 5735 if done { 5736 break 5737 } 5738 originalDecoder := decoder 5739 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 5740 switch { 5741 case strings.EqualFold("QueryLoggingConfig", t.Name.Local): 5742 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5743 if err := awsRestxml_deserializeDocumentQueryLoggingConfig(&sv.QueryLoggingConfig, nodeDecoder); err != nil { 5744 return err 5745 } 5746 5747 default: 5748 // Do nothing and ignore the unexpected tag element 5749 err = decoder.Decoder.Skip() 5750 if err != nil { 5751 return err 5752 } 5753 5754 } 5755 decoder = originalDecoder 5756 } 5757 *v = sv 5758 return nil 5759 } 5760 5761 type awsRestxml_deserializeOpGetReusableDelegationSet struct { 5762 } 5763 5764 func (*awsRestxml_deserializeOpGetReusableDelegationSet) ID() string { 5765 return "OperationDeserializer" 5766 } 5767 5768 func (m *awsRestxml_deserializeOpGetReusableDelegationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5769 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5770 ) { 5771 out, metadata, err = next.HandleDeserialize(ctx, in) 5772 if err != nil { 5773 return out, metadata, err 5774 } 5775 5776 response, ok := out.RawResponse.(*smithyhttp.Response) 5777 if !ok { 5778 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5779 } 5780 5781 if response.StatusCode < 200 || response.StatusCode >= 300 { 5782 return out, metadata, awsRestxml_deserializeOpErrorGetReusableDelegationSet(response, &metadata) 5783 } 5784 output := &GetReusableDelegationSetOutput{} 5785 out.Result = output 5786 5787 var buff [1024]byte 5788 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5789 body := io.TeeReader(response.Body, ringBuffer) 5790 rootDecoder := xml.NewDecoder(body) 5791 t, err := smithyxml.FetchRootElement(rootDecoder) 5792 if err == io.EOF { 5793 return out, metadata, nil 5794 } 5795 if err != nil { 5796 var snapshot bytes.Buffer 5797 io.Copy(&snapshot, ringBuffer) 5798 return out, metadata, &smithy.DeserializationError{ 5799 Err: fmt.Errorf("failed to decode response body, %w", err), 5800 Snapshot: snapshot.Bytes(), 5801 } 5802 } 5803 5804 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5805 err = awsRestxml_deserializeOpDocumentGetReusableDelegationSetOutput(&output, decoder) 5806 if err != nil { 5807 var snapshot bytes.Buffer 5808 io.Copy(&snapshot, ringBuffer) 5809 return out, metadata, &smithy.DeserializationError{ 5810 Err: fmt.Errorf("failed to decode response body, %w", err), 5811 Snapshot: snapshot.Bytes(), 5812 } 5813 } 5814 5815 return out, metadata, err 5816 } 5817 5818 func awsRestxml_deserializeOpErrorGetReusableDelegationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5819 var errorBuffer bytes.Buffer 5820 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5821 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5822 } 5823 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5824 5825 errorCode := "UnknownError" 5826 errorMessage := errorCode 5827 5828 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5829 if err != nil { 5830 return err 5831 } 5832 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5833 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5834 } 5835 if len(errorComponents.Code) != 0 { 5836 errorCode = errorComponents.Code 5837 } 5838 if len(errorComponents.Message) != 0 { 5839 errorMessage = errorComponents.Message 5840 } 5841 errorBody.Seek(0, io.SeekStart) 5842 switch { 5843 case strings.EqualFold("DelegationSetNotReusable", errorCode): 5844 return awsRestxml_deserializeErrorDelegationSetNotReusable(response, errorBody) 5845 5846 case strings.EqualFold("InvalidInput", errorCode): 5847 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 5848 5849 case strings.EqualFold("NoSuchDelegationSet", errorCode): 5850 return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) 5851 5852 default: 5853 genericError := &smithy.GenericAPIError{ 5854 Code: errorCode, 5855 Message: errorMessage, 5856 } 5857 return genericError 5858 5859 } 5860 } 5861 5862 func awsRestxml_deserializeOpDocumentGetReusableDelegationSetOutput(v **GetReusableDelegationSetOutput, decoder smithyxml.NodeDecoder) error { 5863 if v == nil { 5864 return fmt.Errorf("unexpected nil of type %T", v) 5865 } 5866 var sv *GetReusableDelegationSetOutput 5867 if *v == nil { 5868 sv = &GetReusableDelegationSetOutput{} 5869 } else { 5870 sv = *v 5871 } 5872 5873 for { 5874 t, done, err := decoder.Token() 5875 if err != nil { 5876 return err 5877 } 5878 if done { 5879 break 5880 } 5881 originalDecoder := decoder 5882 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 5883 switch { 5884 case strings.EqualFold("DelegationSet", t.Name.Local): 5885 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 5886 if err := awsRestxml_deserializeDocumentDelegationSet(&sv.DelegationSet, nodeDecoder); err != nil { 5887 return err 5888 } 5889 5890 default: 5891 // Do nothing and ignore the unexpected tag element 5892 err = decoder.Decoder.Skip() 5893 if err != nil { 5894 return err 5895 } 5896 5897 } 5898 decoder = originalDecoder 5899 } 5900 *v = sv 5901 return nil 5902 } 5903 5904 type awsRestxml_deserializeOpGetReusableDelegationSetLimit struct { 5905 } 5906 5907 func (*awsRestxml_deserializeOpGetReusableDelegationSetLimit) ID() string { 5908 return "OperationDeserializer" 5909 } 5910 5911 func (m *awsRestxml_deserializeOpGetReusableDelegationSetLimit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 5912 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 5913 ) { 5914 out, metadata, err = next.HandleDeserialize(ctx, in) 5915 if err != nil { 5916 return out, metadata, err 5917 } 5918 5919 response, ok := out.RawResponse.(*smithyhttp.Response) 5920 if !ok { 5921 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 5922 } 5923 5924 if response.StatusCode < 200 || response.StatusCode >= 300 { 5925 return out, metadata, awsRestxml_deserializeOpErrorGetReusableDelegationSetLimit(response, &metadata) 5926 } 5927 output := &GetReusableDelegationSetLimitOutput{} 5928 out.Result = output 5929 5930 var buff [1024]byte 5931 ringBuffer := smithyio.NewRingBuffer(buff[:]) 5932 body := io.TeeReader(response.Body, ringBuffer) 5933 rootDecoder := xml.NewDecoder(body) 5934 t, err := smithyxml.FetchRootElement(rootDecoder) 5935 if err == io.EOF { 5936 return out, metadata, nil 5937 } 5938 if err != nil { 5939 var snapshot bytes.Buffer 5940 io.Copy(&snapshot, ringBuffer) 5941 return out, metadata, &smithy.DeserializationError{ 5942 Err: fmt.Errorf("failed to decode response body, %w", err), 5943 Snapshot: snapshot.Bytes(), 5944 } 5945 } 5946 5947 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 5948 err = awsRestxml_deserializeOpDocumentGetReusableDelegationSetLimitOutput(&output, decoder) 5949 if err != nil { 5950 var snapshot bytes.Buffer 5951 io.Copy(&snapshot, ringBuffer) 5952 return out, metadata, &smithy.DeserializationError{ 5953 Err: fmt.Errorf("failed to decode response body, %w", err), 5954 Snapshot: snapshot.Bytes(), 5955 } 5956 } 5957 5958 return out, metadata, err 5959 } 5960 5961 func awsRestxml_deserializeOpErrorGetReusableDelegationSetLimit(response *smithyhttp.Response, metadata *middleware.Metadata) error { 5962 var errorBuffer bytes.Buffer 5963 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 5964 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 5965 } 5966 errorBody := bytes.NewReader(errorBuffer.Bytes()) 5967 5968 errorCode := "UnknownError" 5969 errorMessage := errorCode 5970 5971 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 5972 if err != nil { 5973 return err 5974 } 5975 if reqID := errorComponents.RequestID; len(reqID) != 0 { 5976 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 5977 } 5978 if len(errorComponents.Code) != 0 { 5979 errorCode = errorComponents.Code 5980 } 5981 if len(errorComponents.Message) != 0 { 5982 errorMessage = errorComponents.Message 5983 } 5984 errorBody.Seek(0, io.SeekStart) 5985 switch { 5986 case strings.EqualFold("InvalidInput", errorCode): 5987 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 5988 5989 case strings.EqualFold("NoSuchDelegationSet", errorCode): 5990 return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) 5991 5992 default: 5993 genericError := &smithy.GenericAPIError{ 5994 Code: errorCode, 5995 Message: errorMessage, 5996 } 5997 return genericError 5998 5999 } 6000 } 6001 6002 func awsRestxml_deserializeOpDocumentGetReusableDelegationSetLimitOutput(v **GetReusableDelegationSetLimitOutput, decoder smithyxml.NodeDecoder) error { 6003 if v == nil { 6004 return fmt.Errorf("unexpected nil of type %T", v) 6005 } 6006 var sv *GetReusableDelegationSetLimitOutput 6007 if *v == nil { 6008 sv = &GetReusableDelegationSetLimitOutput{} 6009 } else { 6010 sv = *v 6011 } 6012 6013 for { 6014 t, done, err := decoder.Token() 6015 if err != nil { 6016 return err 6017 } 6018 if done { 6019 break 6020 } 6021 originalDecoder := decoder 6022 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 6023 switch { 6024 case strings.EqualFold("Count", t.Name.Local): 6025 val, err := decoder.Value() 6026 if err != nil { 6027 return err 6028 } 6029 if val == nil { 6030 break 6031 } 6032 { 6033 xtv := string(val) 6034 i64, err := strconv.ParseInt(xtv, 10, 64) 6035 if err != nil { 6036 return err 6037 } 6038 sv.Count = i64 6039 } 6040 6041 case strings.EqualFold("Limit", t.Name.Local): 6042 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 6043 if err := awsRestxml_deserializeDocumentReusableDelegationSetLimit(&sv.Limit, nodeDecoder); err != nil { 6044 return err 6045 } 6046 6047 default: 6048 // Do nothing and ignore the unexpected tag element 6049 err = decoder.Decoder.Skip() 6050 if err != nil { 6051 return err 6052 } 6053 6054 } 6055 decoder = originalDecoder 6056 } 6057 *v = sv 6058 return nil 6059 } 6060 6061 type awsRestxml_deserializeOpGetTrafficPolicy struct { 6062 } 6063 6064 func (*awsRestxml_deserializeOpGetTrafficPolicy) ID() string { 6065 return "OperationDeserializer" 6066 } 6067 6068 func (m *awsRestxml_deserializeOpGetTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6069 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6070 ) { 6071 out, metadata, err = next.HandleDeserialize(ctx, in) 6072 if err != nil { 6073 return out, metadata, err 6074 } 6075 6076 response, ok := out.RawResponse.(*smithyhttp.Response) 6077 if !ok { 6078 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6079 } 6080 6081 if response.StatusCode < 200 || response.StatusCode >= 300 { 6082 return out, metadata, awsRestxml_deserializeOpErrorGetTrafficPolicy(response, &metadata) 6083 } 6084 output := &GetTrafficPolicyOutput{} 6085 out.Result = output 6086 6087 var buff [1024]byte 6088 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6089 body := io.TeeReader(response.Body, ringBuffer) 6090 rootDecoder := xml.NewDecoder(body) 6091 t, err := smithyxml.FetchRootElement(rootDecoder) 6092 if err == io.EOF { 6093 return out, metadata, nil 6094 } 6095 if err != nil { 6096 var snapshot bytes.Buffer 6097 io.Copy(&snapshot, ringBuffer) 6098 return out, metadata, &smithy.DeserializationError{ 6099 Err: fmt.Errorf("failed to decode response body, %w", err), 6100 Snapshot: snapshot.Bytes(), 6101 } 6102 } 6103 6104 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6105 err = awsRestxml_deserializeOpDocumentGetTrafficPolicyOutput(&output, decoder) 6106 if err != nil { 6107 var snapshot bytes.Buffer 6108 io.Copy(&snapshot, ringBuffer) 6109 return out, metadata, &smithy.DeserializationError{ 6110 Err: fmt.Errorf("failed to decode response body, %w", err), 6111 Snapshot: snapshot.Bytes(), 6112 } 6113 } 6114 6115 return out, metadata, err 6116 } 6117 6118 func awsRestxml_deserializeOpErrorGetTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6119 var errorBuffer bytes.Buffer 6120 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6121 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6122 } 6123 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6124 6125 errorCode := "UnknownError" 6126 errorMessage := errorCode 6127 6128 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6129 if err != nil { 6130 return err 6131 } 6132 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6133 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6134 } 6135 if len(errorComponents.Code) != 0 { 6136 errorCode = errorComponents.Code 6137 } 6138 if len(errorComponents.Message) != 0 { 6139 errorMessage = errorComponents.Message 6140 } 6141 errorBody.Seek(0, io.SeekStart) 6142 switch { 6143 case strings.EqualFold("InvalidInput", errorCode): 6144 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 6145 6146 case strings.EqualFold("NoSuchTrafficPolicy", errorCode): 6147 return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) 6148 6149 default: 6150 genericError := &smithy.GenericAPIError{ 6151 Code: errorCode, 6152 Message: errorMessage, 6153 } 6154 return genericError 6155 6156 } 6157 } 6158 6159 func awsRestxml_deserializeOpDocumentGetTrafficPolicyOutput(v **GetTrafficPolicyOutput, decoder smithyxml.NodeDecoder) error { 6160 if v == nil { 6161 return fmt.Errorf("unexpected nil of type %T", v) 6162 } 6163 var sv *GetTrafficPolicyOutput 6164 if *v == nil { 6165 sv = &GetTrafficPolicyOutput{} 6166 } else { 6167 sv = *v 6168 } 6169 6170 for { 6171 t, done, err := decoder.Token() 6172 if err != nil { 6173 return err 6174 } 6175 if done { 6176 break 6177 } 6178 originalDecoder := decoder 6179 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 6180 switch { 6181 case strings.EqualFold("TrafficPolicy", t.Name.Local): 6182 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 6183 if err := awsRestxml_deserializeDocumentTrafficPolicy(&sv.TrafficPolicy, nodeDecoder); err != nil { 6184 return err 6185 } 6186 6187 default: 6188 // Do nothing and ignore the unexpected tag element 6189 err = decoder.Decoder.Skip() 6190 if err != nil { 6191 return err 6192 } 6193 6194 } 6195 decoder = originalDecoder 6196 } 6197 *v = sv 6198 return nil 6199 } 6200 6201 type awsRestxml_deserializeOpGetTrafficPolicyInstance struct { 6202 } 6203 6204 func (*awsRestxml_deserializeOpGetTrafficPolicyInstance) ID() string { 6205 return "OperationDeserializer" 6206 } 6207 6208 func (m *awsRestxml_deserializeOpGetTrafficPolicyInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6209 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6210 ) { 6211 out, metadata, err = next.HandleDeserialize(ctx, in) 6212 if err != nil { 6213 return out, metadata, err 6214 } 6215 6216 response, ok := out.RawResponse.(*smithyhttp.Response) 6217 if !ok { 6218 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6219 } 6220 6221 if response.StatusCode < 200 || response.StatusCode >= 300 { 6222 return out, metadata, awsRestxml_deserializeOpErrorGetTrafficPolicyInstance(response, &metadata) 6223 } 6224 output := &GetTrafficPolicyInstanceOutput{} 6225 out.Result = output 6226 6227 var buff [1024]byte 6228 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6229 body := io.TeeReader(response.Body, ringBuffer) 6230 rootDecoder := xml.NewDecoder(body) 6231 t, err := smithyxml.FetchRootElement(rootDecoder) 6232 if err == io.EOF { 6233 return out, metadata, nil 6234 } 6235 if err != nil { 6236 var snapshot bytes.Buffer 6237 io.Copy(&snapshot, ringBuffer) 6238 return out, metadata, &smithy.DeserializationError{ 6239 Err: fmt.Errorf("failed to decode response body, %w", err), 6240 Snapshot: snapshot.Bytes(), 6241 } 6242 } 6243 6244 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6245 err = awsRestxml_deserializeOpDocumentGetTrafficPolicyInstanceOutput(&output, decoder) 6246 if err != nil { 6247 var snapshot bytes.Buffer 6248 io.Copy(&snapshot, ringBuffer) 6249 return out, metadata, &smithy.DeserializationError{ 6250 Err: fmt.Errorf("failed to decode response body, %w", err), 6251 Snapshot: snapshot.Bytes(), 6252 } 6253 } 6254 6255 return out, metadata, err 6256 } 6257 6258 func awsRestxml_deserializeOpErrorGetTrafficPolicyInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6259 var errorBuffer bytes.Buffer 6260 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6261 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6262 } 6263 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6264 6265 errorCode := "UnknownError" 6266 errorMessage := errorCode 6267 6268 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6269 if err != nil { 6270 return err 6271 } 6272 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6273 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6274 } 6275 if len(errorComponents.Code) != 0 { 6276 errorCode = errorComponents.Code 6277 } 6278 if len(errorComponents.Message) != 0 { 6279 errorMessage = errorComponents.Message 6280 } 6281 errorBody.Seek(0, io.SeekStart) 6282 switch { 6283 case strings.EqualFold("InvalidInput", errorCode): 6284 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 6285 6286 case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): 6287 return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) 6288 6289 default: 6290 genericError := &smithy.GenericAPIError{ 6291 Code: errorCode, 6292 Message: errorMessage, 6293 } 6294 return genericError 6295 6296 } 6297 } 6298 6299 func awsRestxml_deserializeOpDocumentGetTrafficPolicyInstanceOutput(v **GetTrafficPolicyInstanceOutput, decoder smithyxml.NodeDecoder) error { 6300 if v == nil { 6301 return fmt.Errorf("unexpected nil of type %T", v) 6302 } 6303 var sv *GetTrafficPolicyInstanceOutput 6304 if *v == nil { 6305 sv = &GetTrafficPolicyInstanceOutput{} 6306 } else { 6307 sv = *v 6308 } 6309 6310 for { 6311 t, done, err := decoder.Token() 6312 if err != nil { 6313 return err 6314 } 6315 if done { 6316 break 6317 } 6318 originalDecoder := decoder 6319 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 6320 switch { 6321 case strings.EqualFold("TrafficPolicyInstance", t.Name.Local): 6322 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 6323 if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&sv.TrafficPolicyInstance, nodeDecoder); err != nil { 6324 return err 6325 } 6326 6327 default: 6328 // Do nothing and ignore the unexpected tag element 6329 err = decoder.Decoder.Skip() 6330 if err != nil { 6331 return err 6332 } 6333 6334 } 6335 decoder = originalDecoder 6336 } 6337 *v = sv 6338 return nil 6339 } 6340 6341 type awsRestxml_deserializeOpGetTrafficPolicyInstanceCount struct { 6342 } 6343 6344 func (*awsRestxml_deserializeOpGetTrafficPolicyInstanceCount) ID() string { 6345 return "OperationDeserializer" 6346 } 6347 6348 func (m *awsRestxml_deserializeOpGetTrafficPolicyInstanceCount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6349 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6350 ) { 6351 out, metadata, err = next.HandleDeserialize(ctx, in) 6352 if err != nil { 6353 return out, metadata, err 6354 } 6355 6356 response, ok := out.RawResponse.(*smithyhttp.Response) 6357 if !ok { 6358 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6359 } 6360 6361 if response.StatusCode < 200 || response.StatusCode >= 300 { 6362 return out, metadata, awsRestxml_deserializeOpErrorGetTrafficPolicyInstanceCount(response, &metadata) 6363 } 6364 output := &GetTrafficPolicyInstanceCountOutput{} 6365 out.Result = output 6366 6367 var buff [1024]byte 6368 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6369 body := io.TeeReader(response.Body, ringBuffer) 6370 rootDecoder := xml.NewDecoder(body) 6371 t, err := smithyxml.FetchRootElement(rootDecoder) 6372 if err == io.EOF { 6373 return out, metadata, nil 6374 } 6375 if err != nil { 6376 var snapshot bytes.Buffer 6377 io.Copy(&snapshot, ringBuffer) 6378 return out, metadata, &smithy.DeserializationError{ 6379 Err: fmt.Errorf("failed to decode response body, %w", err), 6380 Snapshot: snapshot.Bytes(), 6381 } 6382 } 6383 6384 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6385 err = awsRestxml_deserializeOpDocumentGetTrafficPolicyInstanceCountOutput(&output, decoder) 6386 if err != nil { 6387 var snapshot bytes.Buffer 6388 io.Copy(&snapshot, ringBuffer) 6389 return out, metadata, &smithy.DeserializationError{ 6390 Err: fmt.Errorf("failed to decode response body, %w", err), 6391 Snapshot: snapshot.Bytes(), 6392 } 6393 } 6394 6395 return out, metadata, err 6396 } 6397 6398 func awsRestxml_deserializeOpErrorGetTrafficPolicyInstanceCount(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6399 var errorBuffer bytes.Buffer 6400 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6401 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6402 } 6403 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6404 6405 errorCode := "UnknownError" 6406 errorMessage := errorCode 6407 6408 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6409 if err != nil { 6410 return err 6411 } 6412 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6413 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6414 } 6415 if len(errorComponents.Code) != 0 { 6416 errorCode = errorComponents.Code 6417 } 6418 if len(errorComponents.Message) != 0 { 6419 errorMessage = errorComponents.Message 6420 } 6421 errorBody.Seek(0, io.SeekStart) 6422 switch { 6423 default: 6424 genericError := &smithy.GenericAPIError{ 6425 Code: errorCode, 6426 Message: errorMessage, 6427 } 6428 return genericError 6429 6430 } 6431 } 6432 6433 func awsRestxml_deserializeOpDocumentGetTrafficPolicyInstanceCountOutput(v **GetTrafficPolicyInstanceCountOutput, decoder smithyxml.NodeDecoder) error { 6434 if v == nil { 6435 return fmt.Errorf("unexpected nil of type %T", v) 6436 } 6437 var sv *GetTrafficPolicyInstanceCountOutput 6438 if *v == nil { 6439 sv = &GetTrafficPolicyInstanceCountOutput{} 6440 } else { 6441 sv = *v 6442 } 6443 6444 for { 6445 t, done, err := decoder.Token() 6446 if err != nil { 6447 return err 6448 } 6449 if done { 6450 break 6451 } 6452 originalDecoder := decoder 6453 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 6454 switch { 6455 case strings.EqualFold("TrafficPolicyInstanceCount", t.Name.Local): 6456 val, err := decoder.Value() 6457 if err != nil { 6458 return err 6459 } 6460 if val == nil { 6461 break 6462 } 6463 { 6464 xtv := string(val) 6465 i64, err := strconv.ParseInt(xtv, 10, 64) 6466 if err != nil { 6467 return err 6468 } 6469 sv.TrafficPolicyInstanceCount = ptr.Int32(int32(i64)) 6470 } 6471 6472 default: 6473 // Do nothing and ignore the unexpected tag element 6474 err = decoder.Decoder.Skip() 6475 if err != nil { 6476 return err 6477 } 6478 6479 } 6480 decoder = originalDecoder 6481 } 6482 *v = sv 6483 return nil 6484 } 6485 6486 type awsRestxml_deserializeOpListCidrBlocks struct { 6487 } 6488 6489 func (*awsRestxml_deserializeOpListCidrBlocks) ID() string { 6490 return "OperationDeserializer" 6491 } 6492 6493 func (m *awsRestxml_deserializeOpListCidrBlocks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6494 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6495 ) { 6496 out, metadata, err = next.HandleDeserialize(ctx, in) 6497 if err != nil { 6498 return out, metadata, err 6499 } 6500 6501 response, ok := out.RawResponse.(*smithyhttp.Response) 6502 if !ok { 6503 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6504 } 6505 6506 if response.StatusCode < 200 || response.StatusCode >= 300 { 6507 return out, metadata, awsRestxml_deserializeOpErrorListCidrBlocks(response, &metadata) 6508 } 6509 output := &ListCidrBlocksOutput{} 6510 out.Result = output 6511 6512 var buff [1024]byte 6513 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6514 body := io.TeeReader(response.Body, ringBuffer) 6515 rootDecoder := xml.NewDecoder(body) 6516 t, err := smithyxml.FetchRootElement(rootDecoder) 6517 if err == io.EOF { 6518 return out, metadata, nil 6519 } 6520 if err != nil { 6521 var snapshot bytes.Buffer 6522 io.Copy(&snapshot, ringBuffer) 6523 return out, metadata, &smithy.DeserializationError{ 6524 Err: fmt.Errorf("failed to decode response body, %w", err), 6525 Snapshot: snapshot.Bytes(), 6526 } 6527 } 6528 6529 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6530 err = awsRestxml_deserializeOpDocumentListCidrBlocksOutput(&output, decoder) 6531 if err != nil { 6532 var snapshot bytes.Buffer 6533 io.Copy(&snapshot, ringBuffer) 6534 return out, metadata, &smithy.DeserializationError{ 6535 Err: fmt.Errorf("failed to decode response body, %w", err), 6536 Snapshot: snapshot.Bytes(), 6537 } 6538 } 6539 6540 return out, metadata, err 6541 } 6542 6543 func awsRestxml_deserializeOpErrorListCidrBlocks(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6544 var errorBuffer bytes.Buffer 6545 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6546 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6547 } 6548 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6549 6550 errorCode := "UnknownError" 6551 errorMessage := errorCode 6552 6553 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6554 if err != nil { 6555 return err 6556 } 6557 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6558 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6559 } 6560 if len(errorComponents.Code) != 0 { 6561 errorCode = errorComponents.Code 6562 } 6563 if len(errorComponents.Message) != 0 { 6564 errorMessage = errorComponents.Message 6565 } 6566 errorBody.Seek(0, io.SeekStart) 6567 switch { 6568 case strings.EqualFold("InvalidInput", errorCode): 6569 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 6570 6571 case strings.EqualFold("NoSuchCidrCollectionException", errorCode): 6572 return awsRestxml_deserializeErrorNoSuchCidrCollectionException(response, errorBody) 6573 6574 case strings.EqualFold("NoSuchCidrLocationException", errorCode): 6575 return awsRestxml_deserializeErrorNoSuchCidrLocationException(response, errorBody) 6576 6577 default: 6578 genericError := &smithy.GenericAPIError{ 6579 Code: errorCode, 6580 Message: errorMessage, 6581 } 6582 return genericError 6583 6584 } 6585 } 6586 6587 func awsRestxml_deserializeOpDocumentListCidrBlocksOutput(v **ListCidrBlocksOutput, decoder smithyxml.NodeDecoder) error { 6588 if v == nil { 6589 return fmt.Errorf("unexpected nil of type %T", v) 6590 } 6591 var sv *ListCidrBlocksOutput 6592 if *v == nil { 6593 sv = &ListCidrBlocksOutput{} 6594 } else { 6595 sv = *v 6596 } 6597 6598 for { 6599 t, done, err := decoder.Token() 6600 if err != nil { 6601 return err 6602 } 6603 if done { 6604 break 6605 } 6606 originalDecoder := decoder 6607 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 6608 switch { 6609 case strings.EqualFold("CidrBlocks", t.Name.Local): 6610 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 6611 if err := awsRestxml_deserializeDocumentCidrBlockSummaries(&sv.CidrBlocks, nodeDecoder); err != nil { 6612 return err 6613 } 6614 6615 case strings.EqualFold("NextToken", t.Name.Local): 6616 val, err := decoder.Value() 6617 if err != nil { 6618 return err 6619 } 6620 if val == nil { 6621 break 6622 } 6623 { 6624 xtv := string(val) 6625 sv.NextToken = ptr.String(xtv) 6626 } 6627 6628 default: 6629 // Do nothing and ignore the unexpected tag element 6630 err = decoder.Decoder.Skip() 6631 if err != nil { 6632 return err 6633 } 6634 6635 } 6636 decoder = originalDecoder 6637 } 6638 *v = sv 6639 return nil 6640 } 6641 6642 type awsRestxml_deserializeOpListCidrCollections struct { 6643 } 6644 6645 func (*awsRestxml_deserializeOpListCidrCollections) ID() string { 6646 return "OperationDeserializer" 6647 } 6648 6649 func (m *awsRestxml_deserializeOpListCidrCollections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6650 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6651 ) { 6652 out, metadata, err = next.HandleDeserialize(ctx, in) 6653 if err != nil { 6654 return out, metadata, err 6655 } 6656 6657 response, ok := out.RawResponse.(*smithyhttp.Response) 6658 if !ok { 6659 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6660 } 6661 6662 if response.StatusCode < 200 || response.StatusCode >= 300 { 6663 return out, metadata, awsRestxml_deserializeOpErrorListCidrCollections(response, &metadata) 6664 } 6665 output := &ListCidrCollectionsOutput{} 6666 out.Result = output 6667 6668 var buff [1024]byte 6669 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6670 body := io.TeeReader(response.Body, ringBuffer) 6671 rootDecoder := xml.NewDecoder(body) 6672 t, err := smithyxml.FetchRootElement(rootDecoder) 6673 if err == io.EOF { 6674 return out, metadata, nil 6675 } 6676 if err != nil { 6677 var snapshot bytes.Buffer 6678 io.Copy(&snapshot, ringBuffer) 6679 return out, metadata, &smithy.DeserializationError{ 6680 Err: fmt.Errorf("failed to decode response body, %w", err), 6681 Snapshot: snapshot.Bytes(), 6682 } 6683 } 6684 6685 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6686 err = awsRestxml_deserializeOpDocumentListCidrCollectionsOutput(&output, decoder) 6687 if err != nil { 6688 var snapshot bytes.Buffer 6689 io.Copy(&snapshot, ringBuffer) 6690 return out, metadata, &smithy.DeserializationError{ 6691 Err: fmt.Errorf("failed to decode response body, %w", err), 6692 Snapshot: snapshot.Bytes(), 6693 } 6694 } 6695 6696 return out, metadata, err 6697 } 6698 6699 func awsRestxml_deserializeOpErrorListCidrCollections(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6700 var errorBuffer bytes.Buffer 6701 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6702 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6703 } 6704 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6705 6706 errorCode := "UnknownError" 6707 errorMessage := errorCode 6708 6709 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6710 if err != nil { 6711 return err 6712 } 6713 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6714 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6715 } 6716 if len(errorComponents.Code) != 0 { 6717 errorCode = errorComponents.Code 6718 } 6719 if len(errorComponents.Message) != 0 { 6720 errorMessage = errorComponents.Message 6721 } 6722 errorBody.Seek(0, io.SeekStart) 6723 switch { 6724 case strings.EqualFold("InvalidInput", errorCode): 6725 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 6726 6727 default: 6728 genericError := &smithy.GenericAPIError{ 6729 Code: errorCode, 6730 Message: errorMessage, 6731 } 6732 return genericError 6733 6734 } 6735 } 6736 6737 func awsRestxml_deserializeOpDocumentListCidrCollectionsOutput(v **ListCidrCollectionsOutput, decoder smithyxml.NodeDecoder) error { 6738 if v == nil { 6739 return fmt.Errorf("unexpected nil of type %T", v) 6740 } 6741 var sv *ListCidrCollectionsOutput 6742 if *v == nil { 6743 sv = &ListCidrCollectionsOutput{} 6744 } else { 6745 sv = *v 6746 } 6747 6748 for { 6749 t, done, err := decoder.Token() 6750 if err != nil { 6751 return err 6752 } 6753 if done { 6754 break 6755 } 6756 originalDecoder := decoder 6757 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 6758 switch { 6759 case strings.EqualFold("CidrCollections", t.Name.Local): 6760 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 6761 if err := awsRestxml_deserializeDocumentCollectionSummaries(&sv.CidrCollections, nodeDecoder); err != nil { 6762 return err 6763 } 6764 6765 case strings.EqualFold("NextToken", t.Name.Local): 6766 val, err := decoder.Value() 6767 if err != nil { 6768 return err 6769 } 6770 if val == nil { 6771 break 6772 } 6773 { 6774 xtv := string(val) 6775 sv.NextToken = ptr.String(xtv) 6776 } 6777 6778 default: 6779 // Do nothing and ignore the unexpected tag element 6780 err = decoder.Decoder.Skip() 6781 if err != nil { 6782 return err 6783 } 6784 6785 } 6786 decoder = originalDecoder 6787 } 6788 *v = sv 6789 return nil 6790 } 6791 6792 type awsRestxml_deserializeOpListCidrLocations struct { 6793 } 6794 6795 func (*awsRestxml_deserializeOpListCidrLocations) ID() string { 6796 return "OperationDeserializer" 6797 } 6798 6799 func (m *awsRestxml_deserializeOpListCidrLocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6800 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6801 ) { 6802 out, metadata, err = next.HandleDeserialize(ctx, in) 6803 if err != nil { 6804 return out, metadata, err 6805 } 6806 6807 response, ok := out.RawResponse.(*smithyhttp.Response) 6808 if !ok { 6809 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6810 } 6811 6812 if response.StatusCode < 200 || response.StatusCode >= 300 { 6813 return out, metadata, awsRestxml_deserializeOpErrorListCidrLocations(response, &metadata) 6814 } 6815 output := &ListCidrLocationsOutput{} 6816 out.Result = output 6817 6818 var buff [1024]byte 6819 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6820 body := io.TeeReader(response.Body, ringBuffer) 6821 rootDecoder := xml.NewDecoder(body) 6822 t, err := smithyxml.FetchRootElement(rootDecoder) 6823 if err == io.EOF { 6824 return out, metadata, nil 6825 } 6826 if err != nil { 6827 var snapshot bytes.Buffer 6828 io.Copy(&snapshot, ringBuffer) 6829 return out, metadata, &smithy.DeserializationError{ 6830 Err: fmt.Errorf("failed to decode response body, %w", err), 6831 Snapshot: snapshot.Bytes(), 6832 } 6833 } 6834 6835 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6836 err = awsRestxml_deserializeOpDocumentListCidrLocationsOutput(&output, decoder) 6837 if err != nil { 6838 var snapshot bytes.Buffer 6839 io.Copy(&snapshot, ringBuffer) 6840 return out, metadata, &smithy.DeserializationError{ 6841 Err: fmt.Errorf("failed to decode response body, %w", err), 6842 Snapshot: snapshot.Bytes(), 6843 } 6844 } 6845 6846 return out, metadata, err 6847 } 6848 6849 func awsRestxml_deserializeOpErrorListCidrLocations(response *smithyhttp.Response, metadata *middleware.Metadata) error { 6850 var errorBuffer bytes.Buffer 6851 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 6852 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 6853 } 6854 errorBody := bytes.NewReader(errorBuffer.Bytes()) 6855 6856 errorCode := "UnknownError" 6857 errorMessage := errorCode 6858 6859 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 6860 if err != nil { 6861 return err 6862 } 6863 if reqID := errorComponents.RequestID; len(reqID) != 0 { 6864 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 6865 } 6866 if len(errorComponents.Code) != 0 { 6867 errorCode = errorComponents.Code 6868 } 6869 if len(errorComponents.Message) != 0 { 6870 errorMessage = errorComponents.Message 6871 } 6872 errorBody.Seek(0, io.SeekStart) 6873 switch { 6874 case strings.EqualFold("InvalidInput", errorCode): 6875 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 6876 6877 case strings.EqualFold("NoSuchCidrCollectionException", errorCode): 6878 return awsRestxml_deserializeErrorNoSuchCidrCollectionException(response, errorBody) 6879 6880 default: 6881 genericError := &smithy.GenericAPIError{ 6882 Code: errorCode, 6883 Message: errorMessage, 6884 } 6885 return genericError 6886 6887 } 6888 } 6889 6890 func awsRestxml_deserializeOpDocumentListCidrLocationsOutput(v **ListCidrLocationsOutput, decoder smithyxml.NodeDecoder) error { 6891 if v == nil { 6892 return fmt.Errorf("unexpected nil of type %T", v) 6893 } 6894 var sv *ListCidrLocationsOutput 6895 if *v == nil { 6896 sv = &ListCidrLocationsOutput{} 6897 } else { 6898 sv = *v 6899 } 6900 6901 for { 6902 t, done, err := decoder.Token() 6903 if err != nil { 6904 return err 6905 } 6906 if done { 6907 break 6908 } 6909 originalDecoder := decoder 6910 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 6911 switch { 6912 case strings.EqualFold("CidrLocations", t.Name.Local): 6913 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 6914 if err := awsRestxml_deserializeDocumentLocationSummaries(&sv.CidrLocations, nodeDecoder); err != nil { 6915 return err 6916 } 6917 6918 case strings.EqualFold("NextToken", t.Name.Local): 6919 val, err := decoder.Value() 6920 if err != nil { 6921 return err 6922 } 6923 if val == nil { 6924 break 6925 } 6926 { 6927 xtv := string(val) 6928 sv.NextToken = ptr.String(xtv) 6929 } 6930 6931 default: 6932 // Do nothing and ignore the unexpected tag element 6933 err = decoder.Decoder.Skip() 6934 if err != nil { 6935 return err 6936 } 6937 6938 } 6939 decoder = originalDecoder 6940 } 6941 *v = sv 6942 return nil 6943 } 6944 6945 type awsRestxml_deserializeOpListGeoLocations struct { 6946 } 6947 6948 func (*awsRestxml_deserializeOpListGeoLocations) ID() string { 6949 return "OperationDeserializer" 6950 } 6951 6952 func (m *awsRestxml_deserializeOpListGeoLocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 6953 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 6954 ) { 6955 out, metadata, err = next.HandleDeserialize(ctx, in) 6956 if err != nil { 6957 return out, metadata, err 6958 } 6959 6960 response, ok := out.RawResponse.(*smithyhttp.Response) 6961 if !ok { 6962 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 6963 } 6964 6965 if response.StatusCode < 200 || response.StatusCode >= 300 { 6966 return out, metadata, awsRestxml_deserializeOpErrorListGeoLocations(response, &metadata) 6967 } 6968 output := &ListGeoLocationsOutput{} 6969 out.Result = output 6970 6971 var buff [1024]byte 6972 ringBuffer := smithyio.NewRingBuffer(buff[:]) 6973 body := io.TeeReader(response.Body, ringBuffer) 6974 rootDecoder := xml.NewDecoder(body) 6975 t, err := smithyxml.FetchRootElement(rootDecoder) 6976 if err == io.EOF { 6977 return out, metadata, nil 6978 } 6979 if err != nil { 6980 var snapshot bytes.Buffer 6981 io.Copy(&snapshot, ringBuffer) 6982 return out, metadata, &smithy.DeserializationError{ 6983 Err: fmt.Errorf("failed to decode response body, %w", err), 6984 Snapshot: snapshot.Bytes(), 6985 } 6986 } 6987 6988 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 6989 err = awsRestxml_deserializeOpDocumentListGeoLocationsOutput(&output, decoder) 6990 if err != nil { 6991 var snapshot bytes.Buffer 6992 io.Copy(&snapshot, ringBuffer) 6993 return out, metadata, &smithy.DeserializationError{ 6994 Err: fmt.Errorf("failed to decode response body, %w", err), 6995 Snapshot: snapshot.Bytes(), 6996 } 6997 } 6998 6999 return out, metadata, err 7000 } 7001 7002 func awsRestxml_deserializeOpErrorListGeoLocations(response *smithyhttp.Response, metadata *middleware.Metadata) error { 7003 var errorBuffer bytes.Buffer 7004 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 7005 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 7006 } 7007 errorBody := bytes.NewReader(errorBuffer.Bytes()) 7008 7009 errorCode := "UnknownError" 7010 errorMessage := errorCode 7011 7012 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 7013 if err != nil { 7014 return err 7015 } 7016 if reqID := errorComponents.RequestID; len(reqID) != 0 { 7017 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 7018 } 7019 if len(errorComponents.Code) != 0 { 7020 errorCode = errorComponents.Code 7021 } 7022 if len(errorComponents.Message) != 0 { 7023 errorMessage = errorComponents.Message 7024 } 7025 errorBody.Seek(0, io.SeekStart) 7026 switch { 7027 case strings.EqualFold("InvalidInput", errorCode): 7028 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 7029 7030 default: 7031 genericError := &smithy.GenericAPIError{ 7032 Code: errorCode, 7033 Message: errorMessage, 7034 } 7035 return genericError 7036 7037 } 7038 } 7039 7040 func awsRestxml_deserializeOpDocumentListGeoLocationsOutput(v **ListGeoLocationsOutput, decoder smithyxml.NodeDecoder) error { 7041 if v == nil { 7042 return fmt.Errorf("unexpected nil of type %T", v) 7043 } 7044 var sv *ListGeoLocationsOutput 7045 if *v == nil { 7046 sv = &ListGeoLocationsOutput{} 7047 } else { 7048 sv = *v 7049 } 7050 7051 for { 7052 t, done, err := decoder.Token() 7053 if err != nil { 7054 return err 7055 } 7056 if done { 7057 break 7058 } 7059 originalDecoder := decoder 7060 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 7061 switch { 7062 case strings.EqualFold("GeoLocationDetailsList", t.Name.Local): 7063 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7064 if err := awsRestxml_deserializeDocumentGeoLocationDetailsList(&sv.GeoLocationDetailsList, nodeDecoder); err != nil { 7065 return err 7066 } 7067 7068 case strings.EqualFold("IsTruncated", t.Name.Local): 7069 val, err := decoder.Value() 7070 if err != nil { 7071 return err 7072 } 7073 if val == nil { 7074 break 7075 } 7076 { 7077 xtv, err := strconv.ParseBool(string(val)) 7078 if err != nil { 7079 return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) 7080 } 7081 sv.IsTruncated = xtv 7082 } 7083 7084 case strings.EqualFold("MaxItems", t.Name.Local): 7085 val, err := decoder.Value() 7086 if err != nil { 7087 return err 7088 } 7089 if val == nil { 7090 break 7091 } 7092 { 7093 xtv := string(val) 7094 i64, err := strconv.ParseInt(xtv, 10, 64) 7095 if err != nil { 7096 return err 7097 } 7098 sv.MaxItems = ptr.Int32(int32(i64)) 7099 } 7100 7101 case strings.EqualFold("NextContinentCode", t.Name.Local): 7102 val, err := decoder.Value() 7103 if err != nil { 7104 return err 7105 } 7106 if val == nil { 7107 break 7108 } 7109 { 7110 xtv := string(val) 7111 sv.NextContinentCode = ptr.String(xtv) 7112 } 7113 7114 case strings.EqualFold("NextCountryCode", t.Name.Local): 7115 val, err := decoder.Value() 7116 if err != nil { 7117 return err 7118 } 7119 if val == nil { 7120 break 7121 } 7122 { 7123 xtv := string(val) 7124 sv.NextCountryCode = ptr.String(xtv) 7125 } 7126 7127 case strings.EqualFold("NextSubdivisionCode", t.Name.Local): 7128 val, err := decoder.Value() 7129 if err != nil { 7130 return err 7131 } 7132 if val == nil { 7133 break 7134 } 7135 { 7136 xtv := string(val) 7137 sv.NextSubdivisionCode = ptr.String(xtv) 7138 } 7139 7140 default: 7141 // Do nothing and ignore the unexpected tag element 7142 err = decoder.Decoder.Skip() 7143 if err != nil { 7144 return err 7145 } 7146 7147 } 7148 decoder = originalDecoder 7149 } 7150 *v = sv 7151 return nil 7152 } 7153 7154 type awsRestxml_deserializeOpListHealthChecks struct { 7155 } 7156 7157 func (*awsRestxml_deserializeOpListHealthChecks) ID() string { 7158 return "OperationDeserializer" 7159 } 7160 7161 func (m *awsRestxml_deserializeOpListHealthChecks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 7162 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 7163 ) { 7164 out, metadata, err = next.HandleDeserialize(ctx, in) 7165 if err != nil { 7166 return out, metadata, err 7167 } 7168 7169 response, ok := out.RawResponse.(*smithyhttp.Response) 7170 if !ok { 7171 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 7172 } 7173 7174 if response.StatusCode < 200 || response.StatusCode >= 300 { 7175 return out, metadata, awsRestxml_deserializeOpErrorListHealthChecks(response, &metadata) 7176 } 7177 output := &ListHealthChecksOutput{} 7178 out.Result = output 7179 7180 var buff [1024]byte 7181 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7182 body := io.TeeReader(response.Body, ringBuffer) 7183 rootDecoder := xml.NewDecoder(body) 7184 t, err := smithyxml.FetchRootElement(rootDecoder) 7185 if err == io.EOF { 7186 return out, metadata, nil 7187 } 7188 if err != nil { 7189 var snapshot bytes.Buffer 7190 io.Copy(&snapshot, ringBuffer) 7191 return out, metadata, &smithy.DeserializationError{ 7192 Err: fmt.Errorf("failed to decode response body, %w", err), 7193 Snapshot: snapshot.Bytes(), 7194 } 7195 } 7196 7197 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7198 err = awsRestxml_deserializeOpDocumentListHealthChecksOutput(&output, decoder) 7199 if err != nil { 7200 var snapshot bytes.Buffer 7201 io.Copy(&snapshot, ringBuffer) 7202 return out, metadata, &smithy.DeserializationError{ 7203 Err: fmt.Errorf("failed to decode response body, %w", err), 7204 Snapshot: snapshot.Bytes(), 7205 } 7206 } 7207 7208 return out, metadata, err 7209 } 7210 7211 func awsRestxml_deserializeOpErrorListHealthChecks(response *smithyhttp.Response, metadata *middleware.Metadata) error { 7212 var errorBuffer bytes.Buffer 7213 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 7214 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 7215 } 7216 errorBody := bytes.NewReader(errorBuffer.Bytes()) 7217 7218 errorCode := "UnknownError" 7219 errorMessage := errorCode 7220 7221 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 7222 if err != nil { 7223 return err 7224 } 7225 if reqID := errorComponents.RequestID; len(reqID) != 0 { 7226 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 7227 } 7228 if len(errorComponents.Code) != 0 { 7229 errorCode = errorComponents.Code 7230 } 7231 if len(errorComponents.Message) != 0 { 7232 errorMessage = errorComponents.Message 7233 } 7234 errorBody.Seek(0, io.SeekStart) 7235 switch { 7236 case strings.EqualFold("IncompatibleVersion", errorCode): 7237 return awsRestxml_deserializeErrorIncompatibleVersion(response, errorBody) 7238 7239 case strings.EqualFold("InvalidInput", errorCode): 7240 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 7241 7242 default: 7243 genericError := &smithy.GenericAPIError{ 7244 Code: errorCode, 7245 Message: errorMessage, 7246 } 7247 return genericError 7248 7249 } 7250 } 7251 7252 func awsRestxml_deserializeOpDocumentListHealthChecksOutput(v **ListHealthChecksOutput, decoder smithyxml.NodeDecoder) error { 7253 if v == nil { 7254 return fmt.Errorf("unexpected nil of type %T", v) 7255 } 7256 var sv *ListHealthChecksOutput 7257 if *v == nil { 7258 sv = &ListHealthChecksOutput{} 7259 } else { 7260 sv = *v 7261 } 7262 7263 for { 7264 t, done, err := decoder.Token() 7265 if err != nil { 7266 return err 7267 } 7268 if done { 7269 break 7270 } 7271 originalDecoder := decoder 7272 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 7273 switch { 7274 case strings.EqualFold("HealthChecks", t.Name.Local): 7275 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7276 if err := awsRestxml_deserializeDocumentHealthChecks(&sv.HealthChecks, nodeDecoder); err != nil { 7277 return err 7278 } 7279 7280 case strings.EqualFold("IsTruncated", t.Name.Local): 7281 val, err := decoder.Value() 7282 if err != nil { 7283 return err 7284 } 7285 if val == nil { 7286 break 7287 } 7288 { 7289 xtv, err := strconv.ParseBool(string(val)) 7290 if err != nil { 7291 return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) 7292 } 7293 sv.IsTruncated = xtv 7294 } 7295 7296 case strings.EqualFold("Marker", t.Name.Local): 7297 val, err := decoder.Value() 7298 if err != nil { 7299 return err 7300 } 7301 if val == nil { 7302 break 7303 } 7304 { 7305 xtv := string(val) 7306 sv.Marker = ptr.String(xtv) 7307 } 7308 7309 case strings.EqualFold("MaxItems", t.Name.Local): 7310 val, err := decoder.Value() 7311 if err != nil { 7312 return err 7313 } 7314 if val == nil { 7315 break 7316 } 7317 { 7318 xtv := string(val) 7319 i64, err := strconv.ParseInt(xtv, 10, 64) 7320 if err != nil { 7321 return err 7322 } 7323 sv.MaxItems = ptr.Int32(int32(i64)) 7324 } 7325 7326 case strings.EqualFold("NextMarker", t.Name.Local): 7327 val, err := decoder.Value() 7328 if err != nil { 7329 return err 7330 } 7331 if val == nil { 7332 break 7333 } 7334 { 7335 xtv := string(val) 7336 sv.NextMarker = ptr.String(xtv) 7337 } 7338 7339 default: 7340 // Do nothing and ignore the unexpected tag element 7341 err = decoder.Decoder.Skip() 7342 if err != nil { 7343 return err 7344 } 7345 7346 } 7347 decoder = originalDecoder 7348 } 7349 *v = sv 7350 return nil 7351 } 7352 7353 type awsRestxml_deserializeOpListHostedZones struct { 7354 } 7355 7356 func (*awsRestxml_deserializeOpListHostedZones) ID() string { 7357 return "OperationDeserializer" 7358 } 7359 7360 func (m *awsRestxml_deserializeOpListHostedZones) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 7361 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 7362 ) { 7363 out, metadata, err = next.HandleDeserialize(ctx, in) 7364 if err != nil { 7365 return out, metadata, err 7366 } 7367 7368 response, ok := out.RawResponse.(*smithyhttp.Response) 7369 if !ok { 7370 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 7371 } 7372 7373 if response.StatusCode < 200 || response.StatusCode >= 300 { 7374 return out, metadata, awsRestxml_deserializeOpErrorListHostedZones(response, &metadata) 7375 } 7376 output := &ListHostedZonesOutput{} 7377 out.Result = output 7378 7379 var buff [1024]byte 7380 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7381 body := io.TeeReader(response.Body, ringBuffer) 7382 rootDecoder := xml.NewDecoder(body) 7383 t, err := smithyxml.FetchRootElement(rootDecoder) 7384 if err == io.EOF { 7385 return out, metadata, nil 7386 } 7387 if err != nil { 7388 var snapshot bytes.Buffer 7389 io.Copy(&snapshot, ringBuffer) 7390 return out, metadata, &smithy.DeserializationError{ 7391 Err: fmt.Errorf("failed to decode response body, %w", err), 7392 Snapshot: snapshot.Bytes(), 7393 } 7394 } 7395 7396 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7397 err = awsRestxml_deserializeOpDocumentListHostedZonesOutput(&output, decoder) 7398 if err != nil { 7399 var snapshot bytes.Buffer 7400 io.Copy(&snapshot, ringBuffer) 7401 return out, metadata, &smithy.DeserializationError{ 7402 Err: fmt.Errorf("failed to decode response body, %w", err), 7403 Snapshot: snapshot.Bytes(), 7404 } 7405 } 7406 7407 return out, metadata, err 7408 } 7409 7410 func awsRestxml_deserializeOpErrorListHostedZones(response *smithyhttp.Response, metadata *middleware.Metadata) error { 7411 var errorBuffer bytes.Buffer 7412 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 7413 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 7414 } 7415 errorBody := bytes.NewReader(errorBuffer.Bytes()) 7416 7417 errorCode := "UnknownError" 7418 errorMessage := errorCode 7419 7420 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 7421 if err != nil { 7422 return err 7423 } 7424 if reqID := errorComponents.RequestID; len(reqID) != 0 { 7425 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 7426 } 7427 if len(errorComponents.Code) != 0 { 7428 errorCode = errorComponents.Code 7429 } 7430 if len(errorComponents.Message) != 0 { 7431 errorMessage = errorComponents.Message 7432 } 7433 errorBody.Seek(0, io.SeekStart) 7434 switch { 7435 case strings.EqualFold("DelegationSetNotReusable", errorCode): 7436 return awsRestxml_deserializeErrorDelegationSetNotReusable(response, errorBody) 7437 7438 case strings.EqualFold("InvalidInput", errorCode): 7439 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 7440 7441 case strings.EqualFold("NoSuchDelegationSet", errorCode): 7442 return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) 7443 7444 default: 7445 genericError := &smithy.GenericAPIError{ 7446 Code: errorCode, 7447 Message: errorMessage, 7448 } 7449 return genericError 7450 7451 } 7452 } 7453 7454 func awsRestxml_deserializeOpDocumentListHostedZonesOutput(v **ListHostedZonesOutput, decoder smithyxml.NodeDecoder) error { 7455 if v == nil { 7456 return fmt.Errorf("unexpected nil of type %T", v) 7457 } 7458 var sv *ListHostedZonesOutput 7459 if *v == nil { 7460 sv = &ListHostedZonesOutput{} 7461 } else { 7462 sv = *v 7463 } 7464 7465 for { 7466 t, done, err := decoder.Token() 7467 if err != nil { 7468 return err 7469 } 7470 if done { 7471 break 7472 } 7473 originalDecoder := decoder 7474 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 7475 switch { 7476 case strings.EqualFold("HostedZones", t.Name.Local): 7477 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7478 if err := awsRestxml_deserializeDocumentHostedZones(&sv.HostedZones, nodeDecoder); err != nil { 7479 return err 7480 } 7481 7482 case strings.EqualFold("IsTruncated", t.Name.Local): 7483 val, err := decoder.Value() 7484 if err != nil { 7485 return err 7486 } 7487 if val == nil { 7488 break 7489 } 7490 { 7491 xtv, err := strconv.ParseBool(string(val)) 7492 if err != nil { 7493 return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) 7494 } 7495 sv.IsTruncated = xtv 7496 } 7497 7498 case strings.EqualFold("Marker", t.Name.Local): 7499 val, err := decoder.Value() 7500 if err != nil { 7501 return err 7502 } 7503 if val == nil { 7504 break 7505 } 7506 { 7507 xtv := string(val) 7508 sv.Marker = ptr.String(xtv) 7509 } 7510 7511 case strings.EqualFold("MaxItems", t.Name.Local): 7512 val, err := decoder.Value() 7513 if err != nil { 7514 return err 7515 } 7516 if val == nil { 7517 break 7518 } 7519 { 7520 xtv := string(val) 7521 i64, err := strconv.ParseInt(xtv, 10, 64) 7522 if err != nil { 7523 return err 7524 } 7525 sv.MaxItems = ptr.Int32(int32(i64)) 7526 } 7527 7528 case strings.EqualFold("NextMarker", t.Name.Local): 7529 val, err := decoder.Value() 7530 if err != nil { 7531 return err 7532 } 7533 if val == nil { 7534 break 7535 } 7536 { 7537 xtv := string(val) 7538 sv.NextMarker = ptr.String(xtv) 7539 } 7540 7541 default: 7542 // Do nothing and ignore the unexpected tag element 7543 err = decoder.Decoder.Skip() 7544 if err != nil { 7545 return err 7546 } 7547 7548 } 7549 decoder = originalDecoder 7550 } 7551 *v = sv 7552 return nil 7553 } 7554 7555 type awsRestxml_deserializeOpListHostedZonesByName struct { 7556 } 7557 7558 func (*awsRestxml_deserializeOpListHostedZonesByName) ID() string { 7559 return "OperationDeserializer" 7560 } 7561 7562 func (m *awsRestxml_deserializeOpListHostedZonesByName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 7563 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 7564 ) { 7565 out, metadata, err = next.HandleDeserialize(ctx, in) 7566 if err != nil { 7567 return out, metadata, err 7568 } 7569 7570 response, ok := out.RawResponse.(*smithyhttp.Response) 7571 if !ok { 7572 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 7573 } 7574 7575 if response.StatusCode < 200 || response.StatusCode >= 300 { 7576 return out, metadata, awsRestxml_deserializeOpErrorListHostedZonesByName(response, &metadata) 7577 } 7578 output := &ListHostedZonesByNameOutput{} 7579 out.Result = output 7580 7581 var buff [1024]byte 7582 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7583 body := io.TeeReader(response.Body, ringBuffer) 7584 rootDecoder := xml.NewDecoder(body) 7585 t, err := smithyxml.FetchRootElement(rootDecoder) 7586 if err == io.EOF { 7587 return out, metadata, nil 7588 } 7589 if err != nil { 7590 var snapshot bytes.Buffer 7591 io.Copy(&snapshot, ringBuffer) 7592 return out, metadata, &smithy.DeserializationError{ 7593 Err: fmt.Errorf("failed to decode response body, %w", err), 7594 Snapshot: snapshot.Bytes(), 7595 } 7596 } 7597 7598 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7599 err = awsRestxml_deserializeOpDocumentListHostedZonesByNameOutput(&output, decoder) 7600 if err != nil { 7601 var snapshot bytes.Buffer 7602 io.Copy(&snapshot, ringBuffer) 7603 return out, metadata, &smithy.DeserializationError{ 7604 Err: fmt.Errorf("failed to decode response body, %w", err), 7605 Snapshot: snapshot.Bytes(), 7606 } 7607 } 7608 7609 return out, metadata, err 7610 } 7611 7612 func awsRestxml_deserializeOpErrorListHostedZonesByName(response *smithyhttp.Response, metadata *middleware.Metadata) error { 7613 var errorBuffer bytes.Buffer 7614 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 7615 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 7616 } 7617 errorBody := bytes.NewReader(errorBuffer.Bytes()) 7618 7619 errorCode := "UnknownError" 7620 errorMessage := errorCode 7621 7622 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 7623 if err != nil { 7624 return err 7625 } 7626 if reqID := errorComponents.RequestID; len(reqID) != 0 { 7627 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 7628 } 7629 if len(errorComponents.Code) != 0 { 7630 errorCode = errorComponents.Code 7631 } 7632 if len(errorComponents.Message) != 0 { 7633 errorMessage = errorComponents.Message 7634 } 7635 errorBody.Seek(0, io.SeekStart) 7636 switch { 7637 case strings.EqualFold("InvalidDomainName", errorCode): 7638 return awsRestxml_deserializeErrorInvalidDomainName(response, errorBody) 7639 7640 case strings.EqualFold("InvalidInput", errorCode): 7641 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 7642 7643 default: 7644 genericError := &smithy.GenericAPIError{ 7645 Code: errorCode, 7646 Message: errorMessage, 7647 } 7648 return genericError 7649 7650 } 7651 } 7652 7653 func awsRestxml_deserializeOpDocumentListHostedZonesByNameOutput(v **ListHostedZonesByNameOutput, decoder smithyxml.NodeDecoder) error { 7654 if v == nil { 7655 return fmt.Errorf("unexpected nil of type %T", v) 7656 } 7657 var sv *ListHostedZonesByNameOutput 7658 if *v == nil { 7659 sv = &ListHostedZonesByNameOutput{} 7660 } else { 7661 sv = *v 7662 } 7663 7664 for { 7665 t, done, err := decoder.Token() 7666 if err != nil { 7667 return err 7668 } 7669 if done { 7670 break 7671 } 7672 originalDecoder := decoder 7673 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 7674 switch { 7675 case strings.EqualFold("DNSName", t.Name.Local): 7676 val, err := decoder.Value() 7677 if err != nil { 7678 return err 7679 } 7680 if val == nil { 7681 break 7682 } 7683 { 7684 xtv := string(val) 7685 sv.DNSName = ptr.String(xtv) 7686 } 7687 7688 case strings.EqualFold("HostedZoneId", t.Name.Local): 7689 val, err := decoder.Value() 7690 if err != nil { 7691 return err 7692 } 7693 if val == nil { 7694 break 7695 } 7696 { 7697 xtv := string(val) 7698 sv.HostedZoneId = ptr.String(xtv) 7699 } 7700 7701 case strings.EqualFold("HostedZones", t.Name.Local): 7702 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7703 if err := awsRestxml_deserializeDocumentHostedZones(&sv.HostedZones, nodeDecoder); err != nil { 7704 return err 7705 } 7706 7707 case strings.EqualFold("IsTruncated", t.Name.Local): 7708 val, err := decoder.Value() 7709 if err != nil { 7710 return err 7711 } 7712 if val == nil { 7713 break 7714 } 7715 { 7716 xtv, err := strconv.ParseBool(string(val)) 7717 if err != nil { 7718 return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) 7719 } 7720 sv.IsTruncated = xtv 7721 } 7722 7723 case strings.EqualFold("MaxItems", t.Name.Local): 7724 val, err := decoder.Value() 7725 if err != nil { 7726 return err 7727 } 7728 if val == nil { 7729 break 7730 } 7731 { 7732 xtv := string(val) 7733 i64, err := strconv.ParseInt(xtv, 10, 64) 7734 if err != nil { 7735 return err 7736 } 7737 sv.MaxItems = ptr.Int32(int32(i64)) 7738 } 7739 7740 case strings.EqualFold("NextDNSName", t.Name.Local): 7741 val, err := decoder.Value() 7742 if err != nil { 7743 return err 7744 } 7745 if val == nil { 7746 break 7747 } 7748 { 7749 xtv := string(val) 7750 sv.NextDNSName = ptr.String(xtv) 7751 } 7752 7753 case strings.EqualFold("NextHostedZoneId", t.Name.Local): 7754 val, err := decoder.Value() 7755 if err != nil { 7756 return err 7757 } 7758 if val == nil { 7759 break 7760 } 7761 { 7762 xtv := string(val) 7763 sv.NextHostedZoneId = ptr.String(xtv) 7764 } 7765 7766 default: 7767 // Do nothing and ignore the unexpected tag element 7768 err = decoder.Decoder.Skip() 7769 if err != nil { 7770 return err 7771 } 7772 7773 } 7774 decoder = originalDecoder 7775 } 7776 *v = sv 7777 return nil 7778 } 7779 7780 type awsRestxml_deserializeOpListHostedZonesByVPC struct { 7781 } 7782 7783 func (*awsRestxml_deserializeOpListHostedZonesByVPC) ID() string { 7784 return "OperationDeserializer" 7785 } 7786 7787 func (m *awsRestxml_deserializeOpListHostedZonesByVPC) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 7788 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 7789 ) { 7790 out, metadata, err = next.HandleDeserialize(ctx, in) 7791 if err != nil { 7792 return out, metadata, err 7793 } 7794 7795 response, ok := out.RawResponse.(*smithyhttp.Response) 7796 if !ok { 7797 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 7798 } 7799 7800 if response.StatusCode < 200 || response.StatusCode >= 300 { 7801 return out, metadata, awsRestxml_deserializeOpErrorListHostedZonesByVPC(response, &metadata) 7802 } 7803 output := &ListHostedZonesByVPCOutput{} 7804 out.Result = output 7805 7806 var buff [1024]byte 7807 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7808 body := io.TeeReader(response.Body, ringBuffer) 7809 rootDecoder := xml.NewDecoder(body) 7810 t, err := smithyxml.FetchRootElement(rootDecoder) 7811 if err == io.EOF { 7812 return out, metadata, nil 7813 } 7814 if err != nil { 7815 var snapshot bytes.Buffer 7816 io.Copy(&snapshot, ringBuffer) 7817 return out, metadata, &smithy.DeserializationError{ 7818 Err: fmt.Errorf("failed to decode response body, %w", err), 7819 Snapshot: snapshot.Bytes(), 7820 } 7821 } 7822 7823 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7824 err = awsRestxml_deserializeOpDocumentListHostedZonesByVPCOutput(&output, decoder) 7825 if err != nil { 7826 var snapshot bytes.Buffer 7827 io.Copy(&snapshot, ringBuffer) 7828 return out, metadata, &smithy.DeserializationError{ 7829 Err: fmt.Errorf("failed to decode response body, %w", err), 7830 Snapshot: snapshot.Bytes(), 7831 } 7832 } 7833 7834 return out, metadata, err 7835 } 7836 7837 func awsRestxml_deserializeOpErrorListHostedZonesByVPC(response *smithyhttp.Response, metadata *middleware.Metadata) error { 7838 var errorBuffer bytes.Buffer 7839 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 7840 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 7841 } 7842 errorBody := bytes.NewReader(errorBuffer.Bytes()) 7843 7844 errorCode := "UnknownError" 7845 errorMessage := errorCode 7846 7847 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 7848 if err != nil { 7849 return err 7850 } 7851 if reqID := errorComponents.RequestID; len(reqID) != 0 { 7852 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 7853 } 7854 if len(errorComponents.Code) != 0 { 7855 errorCode = errorComponents.Code 7856 } 7857 if len(errorComponents.Message) != 0 { 7858 errorMessage = errorComponents.Message 7859 } 7860 errorBody.Seek(0, io.SeekStart) 7861 switch { 7862 case strings.EqualFold("InvalidInput", errorCode): 7863 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 7864 7865 case strings.EqualFold("InvalidPaginationToken", errorCode): 7866 return awsRestxml_deserializeErrorInvalidPaginationToken(response, errorBody) 7867 7868 default: 7869 genericError := &smithy.GenericAPIError{ 7870 Code: errorCode, 7871 Message: errorMessage, 7872 } 7873 return genericError 7874 7875 } 7876 } 7877 7878 func awsRestxml_deserializeOpDocumentListHostedZonesByVPCOutput(v **ListHostedZonesByVPCOutput, decoder smithyxml.NodeDecoder) error { 7879 if v == nil { 7880 return fmt.Errorf("unexpected nil of type %T", v) 7881 } 7882 var sv *ListHostedZonesByVPCOutput 7883 if *v == nil { 7884 sv = &ListHostedZonesByVPCOutput{} 7885 } else { 7886 sv = *v 7887 } 7888 7889 for { 7890 t, done, err := decoder.Token() 7891 if err != nil { 7892 return err 7893 } 7894 if done { 7895 break 7896 } 7897 originalDecoder := decoder 7898 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 7899 switch { 7900 case strings.EqualFold("HostedZoneSummaries", t.Name.Local): 7901 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 7902 if err := awsRestxml_deserializeDocumentHostedZoneSummaries(&sv.HostedZoneSummaries, nodeDecoder); err != nil { 7903 return err 7904 } 7905 7906 case strings.EqualFold("MaxItems", t.Name.Local): 7907 val, err := decoder.Value() 7908 if err != nil { 7909 return err 7910 } 7911 if val == nil { 7912 break 7913 } 7914 { 7915 xtv := string(val) 7916 i64, err := strconv.ParseInt(xtv, 10, 64) 7917 if err != nil { 7918 return err 7919 } 7920 sv.MaxItems = ptr.Int32(int32(i64)) 7921 } 7922 7923 case strings.EqualFold("NextToken", t.Name.Local): 7924 val, err := decoder.Value() 7925 if err != nil { 7926 return err 7927 } 7928 if val == nil { 7929 break 7930 } 7931 { 7932 xtv := string(val) 7933 sv.NextToken = ptr.String(xtv) 7934 } 7935 7936 default: 7937 // Do nothing and ignore the unexpected tag element 7938 err = decoder.Decoder.Skip() 7939 if err != nil { 7940 return err 7941 } 7942 7943 } 7944 decoder = originalDecoder 7945 } 7946 *v = sv 7947 return nil 7948 } 7949 7950 type awsRestxml_deserializeOpListQueryLoggingConfigs struct { 7951 } 7952 7953 func (*awsRestxml_deserializeOpListQueryLoggingConfigs) ID() string { 7954 return "OperationDeserializer" 7955 } 7956 7957 func (m *awsRestxml_deserializeOpListQueryLoggingConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 7958 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 7959 ) { 7960 out, metadata, err = next.HandleDeserialize(ctx, in) 7961 if err != nil { 7962 return out, metadata, err 7963 } 7964 7965 response, ok := out.RawResponse.(*smithyhttp.Response) 7966 if !ok { 7967 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 7968 } 7969 7970 if response.StatusCode < 200 || response.StatusCode >= 300 { 7971 return out, metadata, awsRestxml_deserializeOpErrorListQueryLoggingConfigs(response, &metadata) 7972 } 7973 output := &ListQueryLoggingConfigsOutput{} 7974 out.Result = output 7975 7976 var buff [1024]byte 7977 ringBuffer := smithyio.NewRingBuffer(buff[:]) 7978 body := io.TeeReader(response.Body, ringBuffer) 7979 rootDecoder := xml.NewDecoder(body) 7980 t, err := smithyxml.FetchRootElement(rootDecoder) 7981 if err == io.EOF { 7982 return out, metadata, nil 7983 } 7984 if err != nil { 7985 var snapshot bytes.Buffer 7986 io.Copy(&snapshot, ringBuffer) 7987 return out, metadata, &smithy.DeserializationError{ 7988 Err: fmt.Errorf("failed to decode response body, %w", err), 7989 Snapshot: snapshot.Bytes(), 7990 } 7991 } 7992 7993 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 7994 err = awsRestxml_deserializeOpDocumentListQueryLoggingConfigsOutput(&output, decoder) 7995 if err != nil { 7996 var snapshot bytes.Buffer 7997 io.Copy(&snapshot, ringBuffer) 7998 return out, metadata, &smithy.DeserializationError{ 7999 Err: fmt.Errorf("failed to decode response body, %w", err), 8000 Snapshot: snapshot.Bytes(), 8001 } 8002 } 8003 8004 return out, metadata, err 8005 } 8006 8007 func awsRestxml_deserializeOpErrorListQueryLoggingConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { 8008 var errorBuffer bytes.Buffer 8009 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 8010 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 8011 } 8012 errorBody := bytes.NewReader(errorBuffer.Bytes()) 8013 8014 errorCode := "UnknownError" 8015 errorMessage := errorCode 8016 8017 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 8018 if err != nil { 8019 return err 8020 } 8021 if reqID := errorComponents.RequestID; len(reqID) != 0 { 8022 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 8023 } 8024 if len(errorComponents.Code) != 0 { 8025 errorCode = errorComponents.Code 8026 } 8027 if len(errorComponents.Message) != 0 { 8028 errorMessage = errorComponents.Message 8029 } 8030 errorBody.Seek(0, io.SeekStart) 8031 switch { 8032 case strings.EqualFold("InvalidInput", errorCode): 8033 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 8034 8035 case strings.EqualFold("InvalidPaginationToken", errorCode): 8036 return awsRestxml_deserializeErrorInvalidPaginationToken(response, errorBody) 8037 8038 case strings.EqualFold("NoSuchHostedZone", errorCode): 8039 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 8040 8041 default: 8042 genericError := &smithy.GenericAPIError{ 8043 Code: errorCode, 8044 Message: errorMessage, 8045 } 8046 return genericError 8047 8048 } 8049 } 8050 8051 func awsRestxml_deserializeOpDocumentListQueryLoggingConfigsOutput(v **ListQueryLoggingConfigsOutput, decoder smithyxml.NodeDecoder) error { 8052 if v == nil { 8053 return fmt.Errorf("unexpected nil of type %T", v) 8054 } 8055 var sv *ListQueryLoggingConfigsOutput 8056 if *v == nil { 8057 sv = &ListQueryLoggingConfigsOutput{} 8058 } else { 8059 sv = *v 8060 } 8061 8062 for { 8063 t, done, err := decoder.Token() 8064 if err != nil { 8065 return err 8066 } 8067 if done { 8068 break 8069 } 8070 originalDecoder := decoder 8071 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 8072 switch { 8073 case strings.EqualFold("NextToken", t.Name.Local): 8074 val, err := decoder.Value() 8075 if err != nil { 8076 return err 8077 } 8078 if val == nil { 8079 break 8080 } 8081 { 8082 xtv := string(val) 8083 sv.NextToken = ptr.String(xtv) 8084 } 8085 8086 case strings.EqualFold("QueryLoggingConfigs", t.Name.Local): 8087 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8088 if err := awsRestxml_deserializeDocumentQueryLoggingConfigs(&sv.QueryLoggingConfigs, nodeDecoder); err != nil { 8089 return err 8090 } 8091 8092 default: 8093 // Do nothing and ignore the unexpected tag element 8094 err = decoder.Decoder.Skip() 8095 if err != nil { 8096 return err 8097 } 8098 8099 } 8100 decoder = originalDecoder 8101 } 8102 *v = sv 8103 return nil 8104 } 8105 8106 type awsRestxml_deserializeOpListResourceRecordSets struct { 8107 } 8108 8109 func (*awsRestxml_deserializeOpListResourceRecordSets) ID() string { 8110 return "OperationDeserializer" 8111 } 8112 8113 func (m *awsRestxml_deserializeOpListResourceRecordSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 8114 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 8115 ) { 8116 out, metadata, err = next.HandleDeserialize(ctx, in) 8117 if err != nil { 8118 return out, metadata, err 8119 } 8120 8121 response, ok := out.RawResponse.(*smithyhttp.Response) 8122 if !ok { 8123 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 8124 } 8125 8126 if response.StatusCode < 200 || response.StatusCode >= 300 { 8127 return out, metadata, awsRestxml_deserializeOpErrorListResourceRecordSets(response, &metadata) 8128 } 8129 output := &ListResourceRecordSetsOutput{} 8130 out.Result = output 8131 8132 var buff [1024]byte 8133 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8134 body := io.TeeReader(response.Body, ringBuffer) 8135 rootDecoder := xml.NewDecoder(body) 8136 t, err := smithyxml.FetchRootElement(rootDecoder) 8137 if err == io.EOF { 8138 return out, metadata, nil 8139 } 8140 if err != nil { 8141 var snapshot bytes.Buffer 8142 io.Copy(&snapshot, ringBuffer) 8143 return out, metadata, &smithy.DeserializationError{ 8144 Err: fmt.Errorf("failed to decode response body, %w", err), 8145 Snapshot: snapshot.Bytes(), 8146 } 8147 } 8148 8149 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8150 err = awsRestxml_deserializeOpDocumentListResourceRecordSetsOutput(&output, decoder) 8151 if err != nil { 8152 var snapshot bytes.Buffer 8153 io.Copy(&snapshot, ringBuffer) 8154 return out, metadata, &smithy.DeserializationError{ 8155 Err: fmt.Errorf("failed to decode response body, %w", err), 8156 Snapshot: snapshot.Bytes(), 8157 } 8158 } 8159 8160 return out, metadata, err 8161 } 8162 8163 func awsRestxml_deserializeOpErrorListResourceRecordSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { 8164 var errorBuffer bytes.Buffer 8165 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 8166 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 8167 } 8168 errorBody := bytes.NewReader(errorBuffer.Bytes()) 8169 8170 errorCode := "UnknownError" 8171 errorMessage := errorCode 8172 8173 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 8174 if err != nil { 8175 return err 8176 } 8177 if reqID := errorComponents.RequestID; len(reqID) != 0 { 8178 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 8179 } 8180 if len(errorComponents.Code) != 0 { 8181 errorCode = errorComponents.Code 8182 } 8183 if len(errorComponents.Message) != 0 { 8184 errorMessage = errorComponents.Message 8185 } 8186 errorBody.Seek(0, io.SeekStart) 8187 switch { 8188 case strings.EqualFold("InvalidInput", errorCode): 8189 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 8190 8191 case strings.EqualFold("NoSuchHostedZone", errorCode): 8192 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 8193 8194 default: 8195 genericError := &smithy.GenericAPIError{ 8196 Code: errorCode, 8197 Message: errorMessage, 8198 } 8199 return genericError 8200 8201 } 8202 } 8203 8204 func awsRestxml_deserializeOpDocumentListResourceRecordSetsOutput(v **ListResourceRecordSetsOutput, decoder smithyxml.NodeDecoder) error { 8205 if v == nil { 8206 return fmt.Errorf("unexpected nil of type %T", v) 8207 } 8208 var sv *ListResourceRecordSetsOutput 8209 if *v == nil { 8210 sv = &ListResourceRecordSetsOutput{} 8211 } else { 8212 sv = *v 8213 } 8214 8215 for { 8216 t, done, err := decoder.Token() 8217 if err != nil { 8218 return err 8219 } 8220 if done { 8221 break 8222 } 8223 originalDecoder := decoder 8224 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 8225 switch { 8226 case strings.EqualFold("IsTruncated", t.Name.Local): 8227 val, err := decoder.Value() 8228 if err != nil { 8229 return err 8230 } 8231 if val == nil { 8232 break 8233 } 8234 { 8235 xtv, err := strconv.ParseBool(string(val)) 8236 if err != nil { 8237 return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) 8238 } 8239 sv.IsTruncated = xtv 8240 } 8241 8242 case strings.EqualFold("MaxItems", t.Name.Local): 8243 val, err := decoder.Value() 8244 if err != nil { 8245 return err 8246 } 8247 if val == nil { 8248 break 8249 } 8250 { 8251 xtv := string(val) 8252 i64, err := strconv.ParseInt(xtv, 10, 64) 8253 if err != nil { 8254 return err 8255 } 8256 sv.MaxItems = ptr.Int32(int32(i64)) 8257 } 8258 8259 case strings.EqualFold("NextRecordIdentifier", t.Name.Local): 8260 val, err := decoder.Value() 8261 if err != nil { 8262 return err 8263 } 8264 if val == nil { 8265 break 8266 } 8267 { 8268 xtv := string(val) 8269 sv.NextRecordIdentifier = ptr.String(xtv) 8270 } 8271 8272 case strings.EqualFold("NextRecordName", t.Name.Local): 8273 val, err := decoder.Value() 8274 if err != nil { 8275 return err 8276 } 8277 if val == nil { 8278 break 8279 } 8280 { 8281 xtv := string(val) 8282 sv.NextRecordName = ptr.String(xtv) 8283 } 8284 8285 case strings.EqualFold("NextRecordType", t.Name.Local): 8286 val, err := decoder.Value() 8287 if err != nil { 8288 return err 8289 } 8290 if val == nil { 8291 break 8292 } 8293 { 8294 xtv := string(val) 8295 sv.NextRecordType = types.RRType(xtv) 8296 } 8297 8298 case strings.EqualFold("ResourceRecordSets", t.Name.Local): 8299 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8300 if err := awsRestxml_deserializeDocumentResourceRecordSets(&sv.ResourceRecordSets, nodeDecoder); err != nil { 8301 return err 8302 } 8303 8304 default: 8305 // Do nothing and ignore the unexpected tag element 8306 err = decoder.Decoder.Skip() 8307 if err != nil { 8308 return err 8309 } 8310 8311 } 8312 decoder = originalDecoder 8313 } 8314 *v = sv 8315 return nil 8316 } 8317 8318 type awsRestxml_deserializeOpListReusableDelegationSets struct { 8319 } 8320 8321 func (*awsRestxml_deserializeOpListReusableDelegationSets) ID() string { 8322 return "OperationDeserializer" 8323 } 8324 8325 func (m *awsRestxml_deserializeOpListReusableDelegationSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 8326 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 8327 ) { 8328 out, metadata, err = next.HandleDeserialize(ctx, in) 8329 if err != nil { 8330 return out, metadata, err 8331 } 8332 8333 response, ok := out.RawResponse.(*smithyhttp.Response) 8334 if !ok { 8335 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 8336 } 8337 8338 if response.StatusCode < 200 || response.StatusCode >= 300 { 8339 return out, metadata, awsRestxml_deserializeOpErrorListReusableDelegationSets(response, &metadata) 8340 } 8341 output := &ListReusableDelegationSetsOutput{} 8342 out.Result = output 8343 8344 var buff [1024]byte 8345 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8346 body := io.TeeReader(response.Body, ringBuffer) 8347 rootDecoder := xml.NewDecoder(body) 8348 t, err := smithyxml.FetchRootElement(rootDecoder) 8349 if err == io.EOF { 8350 return out, metadata, nil 8351 } 8352 if err != nil { 8353 var snapshot bytes.Buffer 8354 io.Copy(&snapshot, ringBuffer) 8355 return out, metadata, &smithy.DeserializationError{ 8356 Err: fmt.Errorf("failed to decode response body, %w", err), 8357 Snapshot: snapshot.Bytes(), 8358 } 8359 } 8360 8361 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8362 err = awsRestxml_deserializeOpDocumentListReusableDelegationSetsOutput(&output, decoder) 8363 if err != nil { 8364 var snapshot bytes.Buffer 8365 io.Copy(&snapshot, ringBuffer) 8366 return out, metadata, &smithy.DeserializationError{ 8367 Err: fmt.Errorf("failed to decode response body, %w", err), 8368 Snapshot: snapshot.Bytes(), 8369 } 8370 } 8371 8372 return out, metadata, err 8373 } 8374 8375 func awsRestxml_deserializeOpErrorListReusableDelegationSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { 8376 var errorBuffer bytes.Buffer 8377 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 8378 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 8379 } 8380 errorBody := bytes.NewReader(errorBuffer.Bytes()) 8381 8382 errorCode := "UnknownError" 8383 errorMessage := errorCode 8384 8385 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 8386 if err != nil { 8387 return err 8388 } 8389 if reqID := errorComponents.RequestID; len(reqID) != 0 { 8390 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 8391 } 8392 if len(errorComponents.Code) != 0 { 8393 errorCode = errorComponents.Code 8394 } 8395 if len(errorComponents.Message) != 0 { 8396 errorMessage = errorComponents.Message 8397 } 8398 errorBody.Seek(0, io.SeekStart) 8399 switch { 8400 case strings.EqualFold("InvalidInput", errorCode): 8401 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 8402 8403 default: 8404 genericError := &smithy.GenericAPIError{ 8405 Code: errorCode, 8406 Message: errorMessage, 8407 } 8408 return genericError 8409 8410 } 8411 } 8412 8413 func awsRestxml_deserializeOpDocumentListReusableDelegationSetsOutput(v **ListReusableDelegationSetsOutput, decoder smithyxml.NodeDecoder) error { 8414 if v == nil { 8415 return fmt.Errorf("unexpected nil of type %T", v) 8416 } 8417 var sv *ListReusableDelegationSetsOutput 8418 if *v == nil { 8419 sv = &ListReusableDelegationSetsOutput{} 8420 } else { 8421 sv = *v 8422 } 8423 8424 for { 8425 t, done, err := decoder.Token() 8426 if err != nil { 8427 return err 8428 } 8429 if done { 8430 break 8431 } 8432 originalDecoder := decoder 8433 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 8434 switch { 8435 case strings.EqualFold("DelegationSets", t.Name.Local): 8436 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8437 if err := awsRestxml_deserializeDocumentDelegationSets(&sv.DelegationSets, nodeDecoder); err != nil { 8438 return err 8439 } 8440 8441 case strings.EqualFold("IsTruncated", t.Name.Local): 8442 val, err := decoder.Value() 8443 if err != nil { 8444 return err 8445 } 8446 if val == nil { 8447 break 8448 } 8449 { 8450 xtv, err := strconv.ParseBool(string(val)) 8451 if err != nil { 8452 return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) 8453 } 8454 sv.IsTruncated = xtv 8455 } 8456 8457 case strings.EqualFold("Marker", t.Name.Local): 8458 val, err := decoder.Value() 8459 if err != nil { 8460 return err 8461 } 8462 if val == nil { 8463 break 8464 } 8465 { 8466 xtv := string(val) 8467 sv.Marker = ptr.String(xtv) 8468 } 8469 8470 case strings.EqualFold("MaxItems", t.Name.Local): 8471 val, err := decoder.Value() 8472 if err != nil { 8473 return err 8474 } 8475 if val == nil { 8476 break 8477 } 8478 { 8479 xtv := string(val) 8480 i64, err := strconv.ParseInt(xtv, 10, 64) 8481 if err != nil { 8482 return err 8483 } 8484 sv.MaxItems = ptr.Int32(int32(i64)) 8485 } 8486 8487 case strings.EqualFold("NextMarker", t.Name.Local): 8488 val, err := decoder.Value() 8489 if err != nil { 8490 return err 8491 } 8492 if val == nil { 8493 break 8494 } 8495 { 8496 xtv := string(val) 8497 sv.NextMarker = ptr.String(xtv) 8498 } 8499 8500 default: 8501 // Do nothing and ignore the unexpected tag element 8502 err = decoder.Decoder.Skip() 8503 if err != nil { 8504 return err 8505 } 8506 8507 } 8508 decoder = originalDecoder 8509 } 8510 *v = sv 8511 return nil 8512 } 8513 8514 type awsRestxml_deserializeOpListTagsForResource struct { 8515 } 8516 8517 func (*awsRestxml_deserializeOpListTagsForResource) ID() string { 8518 return "OperationDeserializer" 8519 } 8520 8521 func (m *awsRestxml_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 8522 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 8523 ) { 8524 out, metadata, err = next.HandleDeserialize(ctx, in) 8525 if err != nil { 8526 return out, metadata, err 8527 } 8528 8529 response, ok := out.RawResponse.(*smithyhttp.Response) 8530 if !ok { 8531 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 8532 } 8533 8534 if response.StatusCode < 200 || response.StatusCode >= 300 { 8535 return out, metadata, awsRestxml_deserializeOpErrorListTagsForResource(response, &metadata) 8536 } 8537 output := &ListTagsForResourceOutput{} 8538 out.Result = output 8539 8540 var buff [1024]byte 8541 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8542 body := io.TeeReader(response.Body, ringBuffer) 8543 rootDecoder := xml.NewDecoder(body) 8544 t, err := smithyxml.FetchRootElement(rootDecoder) 8545 if err == io.EOF { 8546 return out, metadata, nil 8547 } 8548 if err != nil { 8549 var snapshot bytes.Buffer 8550 io.Copy(&snapshot, ringBuffer) 8551 return out, metadata, &smithy.DeserializationError{ 8552 Err: fmt.Errorf("failed to decode response body, %w", err), 8553 Snapshot: snapshot.Bytes(), 8554 } 8555 } 8556 8557 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8558 err = awsRestxml_deserializeOpDocumentListTagsForResourceOutput(&output, decoder) 8559 if err != nil { 8560 var snapshot bytes.Buffer 8561 io.Copy(&snapshot, ringBuffer) 8562 return out, metadata, &smithy.DeserializationError{ 8563 Err: fmt.Errorf("failed to decode response body, %w", err), 8564 Snapshot: snapshot.Bytes(), 8565 } 8566 } 8567 8568 return out, metadata, err 8569 } 8570 8571 func awsRestxml_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { 8572 var errorBuffer bytes.Buffer 8573 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 8574 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 8575 } 8576 errorBody := bytes.NewReader(errorBuffer.Bytes()) 8577 8578 errorCode := "UnknownError" 8579 errorMessage := errorCode 8580 8581 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 8582 if err != nil { 8583 return err 8584 } 8585 if reqID := errorComponents.RequestID; len(reqID) != 0 { 8586 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 8587 } 8588 if len(errorComponents.Code) != 0 { 8589 errorCode = errorComponents.Code 8590 } 8591 if len(errorComponents.Message) != 0 { 8592 errorMessage = errorComponents.Message 8593 } 8594 errorBody.Seek(0, io.SeekStart) 8595 switch { 8596 case strings.EqualFold("InvalidInput", errorCode): 8597 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 8598 8599 case strings.EqualFold("NoSuchHealthCheck", errorCode): 8600 return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) 8601 8602 case strings.EqualFold("NoSuchHostedZone", errorCode): 8603 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 8604 8605 case strings.EqualFold("PriorRequestNotComplete", errorCode): 8606 return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) 8607 8608 case strings.EqualFold("ThrottlingException", errorCode): 8609 return awsRestxml_deserializeErrorThrottlingException(response, errorBody) 8610 8611 default: 8612 genericError := &smithy.GenericAPIError{ 8613 Code: errorCode, 8614 Message: errorMessage, 8615 } 8616 return genericError 8617 8618 } 8619 } 8620 8621 func awsRestxml_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, decoder smithyxml.NodeDecoder) error { 8622 if v == nil { 8623 return fmt.Errorf("unexpected nil of type %T", v) 8624 } 8625 var sv *ListTagsForResourceOutput 8626 if *v == nil { 8627 sv = &ListTagsForResourceOutput{} 8628 } else { 8629 sv = *v 8630 } 8631 8632 for { 8633 t, done, err := decoder.Token() 8634 if err != nil { 8635 return err 8636 } 8637 if done { 8638 break 8639 } 8640 originalDecoder := decoder 8641 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 8642 switch { 8643 case strings.EqualFold("ResourceTagSet", t.Name.Local): 8644 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8645 if err := awsRestxml_deserializeDocumentResourceTagSet(&sv.ResourceTagSet, nodeDecoder); err != nil { 8646 return err 8647 } 8648 8649 default: 8650 // Do nothing and ignore the unexpected tag element 8651 err = decoder.Decoder.Skip() 8652 if err != nil { 8653 return err 8654 } 8655 8656 } 8657 decoder = originalDecoder 8658 } 8659 *v = sv 8660 return nil 8661 } 8662 8663 type awsRestxml_deserializeOpListTagsForResources struct { 8664 } 8665 8666 func (*awsRestxml_deserializeOpListTagsForResources) ID() string { 8667 return "OperationDeserializer" 8668 } 8669 8670 func (m *awsRestxml_deserializeOpListTagsForResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 8671 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 8672 ) { 8673 out, metadata, err = next.HandleDeserialize(ctx, in) 8674 if err != nil { 8675 return out, metadata, err 8676 } 8677 8678 response, ok := out.RawResponse.(*smithyhttp.Response) 8679 if !ok { 8680 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 8681 } 8682 8683 if response.StatusCode < 200 || response.StatusCode >= 300 { 8684 return out, metadata, awsRestxml_deserializeOpErrorListTagsForResources(response, &metadata) 8685 } 8686 output := &ListTagsForResourcesOutput{} 8687 out.Result = output 8688 8689 var buff [1024]byte 8690 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8691 body := io.TeeReader(response.Body, ringBuffer) 8692 rootDecoder := xml.NewDecoder(body) 8693 t, err := smithyxml.FetchRootElement(rootDecoder) 8694 if err == io.EOF { 8695 return out, metadata, nil 8696 } 8697 if err != nil { 8698 var snapshot bytes.Buffer 8699 io.Copy(&snapshot, ringBuffer) 8700 return out, metadata, &smithy.DeserializationError{ 8701 Err: fmt.Errorf("failed to decode response body, %w", err), 8702 Snapshot: snapshot.Bytes(), 8703 } 8704 } 8705 8706 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8707 err = awsRestxml_deserializeOpDocumentListTagsForResourcesOutput(&output, decoder) 8708 if err != nil { 8709 var snapshot bytes.Buffer 8710 io.Copy(&snapshot, ringBuffer) 8711 return out, metadata, &smithy.DeserializationError{ 8712 Err: fmt.Errorf("failed to decode response body, %w", err), 8713 Snapshot: snapshot.Bytes(), 8714 } 8715 } 8716 8717 return out, metadata, err 8718 } 8719 8720 func awsRestxml_deserializeOpErrorListTagsForResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { 8721 var errorBuffer bytes.Buffer 8722 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 8723 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 8724 } 8725 errorBody := bytes.NewReader(errorBuffer.Bytes()) 8726 8727 errorCode := "UnknownError" 8728 errorMessage := errorCode 8729 8730 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 8731 if err != nil { 8732 return err 8733 } 8734 if reqID := errorComponents.RequestID; len(reqID) != 0 { 8735 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 8736 } 8737 if len(errorComponents.Code) != 0 { 8738 errorCode = errorComponents.Code 8739 } 8740 if len(errorComponents.Message) != 0 { 8741 errorMessage = errorComponents.Message 8742 } 8743 errorBody.Seek(0, io.SeekStart) 8744 switch { 8745 case strings.EqualFold("InvalidInput", errorCode): 8746 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 8747 8748 case strings.EqualFold("NoSuchHealthCheck", errorCode): 8749 return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) 8750 8751 case strings.EqualFold("NoSuchHostedZone", errorCode): 8752 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 8753 8754 case strings.EqualFold("PriorRequestNotComplete", errorCode): 8755 return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) 8756 8757 case strings.EqualFold("ThrottlingException", errorCode): 8758 return awsRestxml_deserializeErrorThrottlingException(response, errorBody) 8759 8760 default: 8761 genericError := &smithy.GenericAPIError{ 8762 Code: errorCode, 8763 Message: errorMessage, 8764 } 8765 return genericError 8766 8767 } 8768 } 8769 8770 func awsRestxml_deserializeOpDocumentListTagsForResourcesOutput(v **ListTagsForResourcesOutput, decoder smithyxml.NodeDecoder) error { 8771 if v == nil { 8772 return fmt.Errorf("unexpected nil of type %T", v) 8773 } 8774 var sv *ListTagsForResourcesOutput 8775 if *v == nil { 8776 sv = &ListTagsForResourcesOutput{} 8777 } else { 8778 sv = *v 8779 } 8780 8781 for { 8782 t, done, err := decoder.Token() 8783 if err != nil { 8784 return err 8785 } 8786 if done { 8787 break 8788 } 8789 originalDecoder := decoder 8790 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 8791 switch { 8792 case strings.EqualFold("ResourceTagSets", t.Name.Local): 8793 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8794 if err := awsRestxml_deserializeDocumentResourceTagSetList(&sv.ResourceTagSets, nodeDecoder); err != nil { 8795 return err 8796 } 8797 8798 default: 8799 // Do nothing and ignore the unexpected tag element 8800 err = decoder.Decoder.Skip() 8801 if err != nil { 8802 return err 8803 } 8804 8805 } 8806 decoder = originalDecoder 8807 } 8808 *v = sv 8809 return nil 8810 } 8811 8812 type awsRestxml_deserializeOpListTrafficPolicies struct { 8813 } 8814 8815 func (*awsRestxml_deserializeOpListTrafficPolicies) ID() string { 8816 return "OperationDeserializer" 8817 } 8818 8819 func (m *awsRestxml_deserializeOpListTrafficPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 8820 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 8821 ) { 8822 out, metadata, err = next.HandleDeserialize(ctx, in) 8823 if err != nil { 8824 return out, metadata, err 8825 } 8826 8827 response, ok := out.RawResponse.(*smithyhttp.Response) 8828 if !ok { 8829 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 8830 } 8831 8832 if response.StatusCode < 200 || response.StatusCode >= 300 { 8833 return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicies(response, &metadata) 8834 } 8835 output := &ListTrafficPoliciesOutput{} 8836 out.Result = output 8837 8838 var buff [1024]byte 8839 ringBuffer := smithyio.NewRingBuffer(buff[:]) 8840 body := io.TeeReader(response.Body, ringBuffer) 8841 rootDecoder := xml.NewDecoder(body) 8842 t, err := smithyxml.FetchRootElement(rootDecoder) 8843 if err == io.EOF { 8844 return out, metadata, nil 8845 } 8846 if err != nil { 8847 var snapshot bytes.Buffer 8848 io.Copy(&snapshot, ringBuffer) 8849 return out, metadata, &smithy.DeserializationError{ 8850 Err: fmt.Errorf("failed to decode response body, %w", err), 8851 Snapshot: snapshot.Bytes(), 8852 } 8853 } 8854 8855 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 8856 err = awsRestxml_deserializeOpDocumentListTrafficPoliciesOutput(&output, decoder) 8857 if err != nil { 8858 var snapshot bytes.Buffer 8859 io.Copy(&snapshot, ringBuffer) 8860 return out, metadata, &smithy.DeserializationError{ 8861 Err: fmt.Errorf("failed to decode response body, %w", err), 8862 Snapshot: snapshot.Bytes(), 8863 } 8864 } 8865 8866 return out, metadata, err 8867 } 8868 8869 func awsRestxml_deserializeOpErrorListTrafficPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { 8870 var errorBuffer bytes.Buffer 8871 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 8872 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 8873 } 8874 errorBody := bytes.NewReader(errorBuffer.Bytes()) 8875 8876 errorCode := "UnknownError" 8877 errorMessage := errorCode 8878 8879 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 8880 if err != nil { 8881 return err 8882 } 8883 if reqID := errorComponents.RequestID; len(reqID) != 0 { 8884 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 8885 } 8886 if len(errorComponents.Code) != 0 { 8887 errorCode = errorComponents.Code 8888 } 8889 if len(errorComponents.Message) != 0 { 8890 errorMessage = errorComponents.Message 8891 } 8892 errorBody.Seek(0, io.SeekStart) 8893 switch { 8894 case strings.EqualFold("InvalidInput", errorCode): 8895 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 8896 8897 default: 8898 genericError := &smithy.GenericAPIError{ 8899 Code: errorCode, 8900 Message: errorMessage, 8901 } 8902 return genericError 8903 8904 } 8905 } 8906 8907 func awsRestxml_deserializeOpDocumentListTrafficPoliciesOutput(v **ListTrafficPoliciesOutput, decoder smithyxml.NodeDecoder) error { 8908 if v == nil { 8909 return fmt.Errorf("unexpected nil of type %T", v) 8910 } 8911 var sv *ListTrafficPoliciesOutput 8912 if *v == nil { 8913 sv = &ListTrafficPoliciesOutput{} 8914 } else { 8915 sv = *v 8916 } 8917 8918 for { 8919 t, done, err := decoder.Token() 8920 if err != nil { 8921 return err 8922 } 8923 if done { 8924 break 8925 } 8926 originalDecoder := decoder 8927 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 8928 switch { 8929 case strings.EqualFold("IsTruncated", t.Name.Local): 8930 val, err := decoder.Value() 8931 if err != nil { 8932 return err 8933 } 8934 if val == nil { 8935 break 8936 } 8937 { 8938 xtv, err := strconv.ParseBool(string(val)) 8939 if err != nil { 8940 return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) 8941 } 8942 sv.IsTruncated = xtv 8943 } 8944 8945 case strings.EqualFold("MaxItems", t.Name.Local): 8946 val, err := decoder.Value() 8947 if err != nil { 8948 return err 8949 } 8950 if val == nil { 8951 break 8952 } 8953 { 8954 xtv := string(val) 8955 i64, err := strconv.ParseInt(xtv, 10, 64) 8956 if err != nil { 8957 return err 8958 } 8959 sv.MaxItems = ptr.Int32(int32(i64)) 8960 } 8961 8962 case strings.EqualFold("TrafficPolicyIdMarker", t.Name.Local): 8963 val, err := decoder.Value() 8964 if err != nil { 8965 return err 8966 } 8967 if val == nil { 8968 break 8969 } 8970 { 8971 xtv := string(val) 8972 sv.TrafficPolicyIdMarker = ptr.String(xtv) 8973 } 8974 8975 case strings.EqualFold("TrafficPolicySummaries", t.Name.Local): 8976 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 8977 if err := awsRestxml_deserializeDocumentTrafficPolicySummaries(&sv.TrafficPolicySummaries, nodeDecoder); err != nil { 8978 return err 8979 } 8980 8981 default: 8982 // Do nothing and ignore the unexpected tag element 8983 err = decoder.Decoder.Skip() 8984 if err != nil { 8985 return err 8986 } 8987 8988 } 8989 decoder = originalDecoder 8990 } 8991 *v = sv 8992 return nil 8993 } 8994 8995 type awsRestxml_deserializeOpListTrafficPolicyInstances struct { 8996 } 8997 8998 func (*awsRestxml_deserializeOpListTrafficPolicyInstances) ID() string { 8999 return "OperationDeserializer" 9000 } 9001 9002 func (m *awsRestxml_deserializeOpListTrafficPolicyInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 9003 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 9004 ) { 9005 out, metadata, err = next.HandleDeserialize(ctx, in) 9006 if err != nil { 9007 return out, metadata, err 9008 } 9009 9010 response, ok := out.RawResponse.(*smithyhttp.Response) 9011 if !ok { 9012 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 9013 } 9014 9015 if response.StatusCode < 200 || response.StatusCode >= 300 { 9016 return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicyInstances(response, &metadata) 9017 } 9018 output := &ListTrafficPolicyInstancesOutput{} 9019 out.Result = output 9020 9021 var buff [1024]byte 9022 ringBuffer := smithyio.NewRingBuffer(buff[:]) 9023 body := io.TeeReader(response.Body, ringBuffer) 9024 rootDecoder := xml.NewDecoder(body) 9025 t, err := smithyxml.FetchRootElement(rootDecoder) 9026 if err == io.EOF { 9027 return out, metadata, nil 9028 } 9029 if err != nil { 9030 var snapshot bytes.Buffer 9031 io.Copy(&snapshot, ringBuffer) 9032 return out, metadata, &smithy.DeserializationError{ 9033 Err: fmt.Errorf("failed to decode response body, %w", err), 9034 Snapshot: snapshot.Bytes(), 9035 } 9036 } 9037 9038 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 9039 err = awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesOutput(&output, decoder) 9040 if err != nil { 9041 var snapshot bytes.Buffer 9042 io.Copy(&snapshot, ringBuffer) 9043 return out, metadata, &smithy.DeserializationError{ 9044 Err: fmt.Errorf("failed to decode response body, %w", err), 9045 Snapshot: snapshot.Bytes(), 9046 } 9047 } 9048 9049 return out, metadata, err 9050 } 9051 9052 func awsRestxml_deserializeOpErrorListTrafficPolicyInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { 9053 var errorBuffer bytes.Buffer 9054 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 9055 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 9056 } 9057 errorBody := bytes.NewReader(errorBuffer.Bytes()) 9058 9059 errorCode := "UnknownError" 9060 errorMessage := errorCode 9061 9062 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 9063 if err != nil { 9064 return err 9065 } 9066 if reqID := errorComponents.RequestID; len(reqID) != 0 { 9067 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 9068 } 9069 if len(errorComponents.Code) != 0 { 9070 errorCode = errorComponents.Code 9071 } 9072 if len(errorComponents.Message) != 0 { 9073 errorMessage = errorComponents.Message 9074 } 9075 errorBody.Seek(0, io.SeekStart) 9076 switch { 9077 case strings.EqualFold("InvalidInput", errorCode): 9078 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 9079 9080 case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): 9081 return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) 9082 9083 default: 9084 genericError := &smithy.GenericAPIError{ 9085 Code: errorCode, 9086 Message: errorMessage, 9087 } 9088 return genericError 9089 9090 } 9091 } 9092 9093 func awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesOutput(v **ListTrafficPolicyInstancesOutput, decoder smithyxml.NodeDecoder) error { 9094 if v == nil { 9095 return fmt.Errorf("unexpected nil of type %T", v) 9096 } 9097 var sv *ListTrafficPolicyInstancesOutput 9098 if *v == nil { 9099 sv = &ListTrafficPolicyInstancesOutput{} 9100 } else { 9101 sv = *v 9102 } 9103 9104 for { 9105 t, done, err := decoder.Token() 9106 if err != nil { 9107 return err 9108 } 9109 if done { 9110 break 9111 } 9112 originalDecoder := decoder 9113 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9114 switch { 9115 case strings.EqualFold("HostedZoneIdMarker", t.Name.Local): 9116 val, err := decoder.Value() 9117 if err != nil { 9118 return err 9119 } 9120 if val == nil { 9121 break 9122 } 9123 { 9124 xtv := string(val) 9125 sv.HostedZoneIdMarker = ptr.String(xtv) 9126 } 9127 9128 case strings.EqualFold("IsTruncated", t.Name.Local): 9129 val, err := decoder.Value() 9130 if err != nil { 9131 return err 9132 } 9133 if val == nil { 9134 break 9135 } 9136 { 9137 xtv, err := strconv.ParseBool(string(val)) 9138 if err != nil { 9139 return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) 9140 } 9141 sv.IsTruncated = xtv 9142 } 9143 9144 case strings.EqualFold("MaxItems", t.Name.Local): 9145 val, err := decoder.Value() 9146 if err != nil { 9147 return err 9148 } 9149 if val == nil { 9150 break 9151 } 9152 { 9153 xtv := string(val) 9154 i64, err := strconv.ParseInt(xtv, 10, 64) 9155 if err != nil { 9156 return err 9157 } 9158 sv.MaxItems = ptr.Int32(int32(i64)) 9159 } 9160 9161 case strings.EqualFold("TrafficPolicyInstanceNameMarker", t.Name.Local): 9162 val, err := decoder.Value() 9163 if err != nil { 9164 return err 9165 } 9166 if val == nil { 9167 break 9168 } 9169 { 9170 xtv := string(val) 9171 sv.TrafficPolicyInstanceNameMarker = ptr.String(xtv) 9172 } 9173 9174 case strings.EqualFold("TrafficPolicyInstances", t.Name.Local): 9175 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9176 if err := awsRestxml_deserializeDocumentTrafficPolicyInstances(&sv.TrafficPolicyInstances, nodeDecoder); err != nil { 9177 return err 9178 } 9179 9180 case strings.EqualFold("TrafficPolicyInstanceTypeMarker", t.Name.Local): 9181 val, err := decoder.Value() 9182 if err != nil { 9183 return err 9184 } 9185 if val == nil { 9186 break 9187 } 9188 { 9189 xtv := string(val) 9190 sv.TrafficPolicyInstanceTypeMarker = types.RRType(xtv) 9191 } 9192 9193 default: 9194 // Do nothing and ignore the unexpected tag element 9195 err = decoder.Decoder.Skip() 9196 if err != nil { 9197 return err 9198 } 9199 9200 } 9201 decoder = originalDecoder 9202 } 9203 *v = sv 9204 return nil 9205 } 9206 9207 type awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone struct { 9208 } 9209 9210 func (*awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone) ID() string { 9211 return "OperationDeserializer" 9212 } 9213 9214 func (m *awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 9215 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 9216 ) { 9217 out, metadata, err = next.HandleDeserialize(ctx, in) 9218 if err != nil { 9219 return out, metadata, err 9220 } 9221 9222 response, ok := out.RawResponse.(*smithyhttp.Response) 9223 if !ok { 9224 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 9225 } 9226 9227 if response.StatusCode < 200 || response.StatusCode >= 300 { 9228 return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicyInstancesByHostedZone(response, &metadata) 9229 } 9230 output := &ListTrafficPolicyInstancesByHostedZoneOutput{} 9231 out.Result = output 9232 9233 var buff [1024]byte 9234 ringBuffer := smithyio.NewRingBuffer(buff[:]) 9235 body := io.TeeReader(response.Body, ringBuffer) 9236 rootDecoder := xml.NewDecoder(body) 9237 t, err := smithyxml.FetchRootElement(rootDecoder) 9238 if err == io.EOF { 9239 return out, metadata, nil 9240 } 9241 if err != nil { 9242 var snapshot bytes.Buffer 9243 io.Copy(&snapshot, ringBuffer) 9244 return out, metadata, &smithy.DeserializationError{ 9245 Err: fmt.Errorf("failed to decode response body, %w", err), 9246 Snapshot: snapshot.Bytes(), 9247 } 9248 } 9249 9250 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 9251 err = awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesByHostedZoneOutput(&output, decoder) 9252 if err != nil { 9253 var snapshot bytes.Buffer 9254 io.Copy(&snapshot, ringBuffer) 9255 return out, metadata, &smithy.DeserializationError{ 9256 Err: fmt.Errorf("failed to decode response body, %w", err), 9257 Snapshot: snapshot.Bytes(), 9258 } 9259 } 9260 9261 return out, metadata, err 9262 } 9263 9264 func awsRestxml_deserializeOpErrorListTrafficPolicyInstancesByHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { 9265 var errorBuffer bytes.Buffer 9266 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 9267 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 9268 } 9269 errorBody := bytes.NewReader(errorBuffer.Bytes()) 9270 9271 errorCode := "UnknownError" 9272 errorMessage := errorCode 9273 9274 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 9275 if err != nil { 9276 return err 9277 } 9278 if reqID := errorComponents.RequestID; len(reqID) != 0 { 9279 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 9280 } 9281 if len(errorComponents.Code) != 0 { 9282 errorCode = errorComponents.Code 9283 } 9284 if len(errorComponents.Message) != 0 { 9285 errorMessage = errorComponents.Message 9286 } 9287 errorBody.Seek(0, io.SeekStart) 9288 switch { 9289 case strings.EqualFold("InvalidInput", errorCode): 9290 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 9291 9292 case strings.EqualFold("NoSuchHostedZone", errorCode): 9293 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 9294 9295 case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): 9296 return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) 9297 9298 default: 9299 genericError := &smithy.GenericAPIError{ 9300 Code: errorCode, 9301 Message: errorMessage, 9302 } 9303 return genericError 9304 9305 } 9306 } 9307 9308 func awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesByHostedZoneOutput(v **ListTrafficPolicyInstancesByHostedZoneOutput, decoder smithyxml.NodeDecoder) error { 9309 if v == nil { 9310 return fmt.Errorf("unexpected nil of type %T", v) 9311 } 9312 var sv *ListTrafficPolicyInstancesByHostedZoneOutput 9313 if *v == nil { 9314 sv = &ListTrafficPolicyInstancesByHostedZoneOutput{} 9315 } else { 9316 sv = *v 9317 } 9318 9319 for { 9320 t, done, err := decoder.Token() 9321 if err != nil { 9322 return err 9323 } 9324 if done { 9325 break 9326 } 9327 originalDecoder := decoder 9328 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9329 switch { 9330 case strings.EqualFold("IsTruncated", t.Name.Local): 9331 val, err := decoder.Value() 9332 if err != nil { 9333 return err 9334 } 9335 if val == nil { 9336 break 9337 } 9338 { 9339 xtv, err := strconv.ParseBool(string(val)) 9340 if err != nil { 9341 return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) 9342 } 9343 sv.IsTruncated = xtv 9344 } 9345 9346 case strings.EqualFold("MaxItems", t.Name.Local): 9347 val, err := decoder.Value() 9348 if err != nil { 9349 return err 9350 } 9351 if val == nil { 9352 break 9353 } 9354 { 9355 xtv := string(val) 9356 i64, err := strconv.ParseInt(xtv, 10, 64) 9357 if err != nil { 9358 return err 9359 } 9360 sv.MaxItems = ptr.Int32(int32(i64)) 9361 } 9362 9363 case strings.EqualFold("TrafficPolicyInstanceNameMarker", t.Name.Local): 9364 val, err := decoder.Value() 9365 if err != nil { 9366 return err 9367 } 9368 if val == nil { 9369 break 9370 } 9371 { 9372 xtv := string(val) 9373 sv.TrafficPolicyInstanceNameMarker = ptr.String(xtv) 9374 } 9375 9376 case strings.EqualFold("TrafficPolicyInstances", t.Name.Local): 9377 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9378 if err := awsRestxml_deserializeDocumentTrafficPolicyInstances(&sv.TrafficPolicyInstances, nodeDecoder); err != nil { 9379 return err 9380 } 9381 9382 case strings.EqualFold("TrafficPolicyInstanceTypeMarker", t.Name.Local): 9383 val, err := decoder.Value() 9384 if err != nil { 9385 return err 9386 } 9387 if val == nil { 9388 break 9389 } 9390 { 9391 xtv := string(val) 9392 sv.TrafficPolicyInstanceTypeMarker = types.RRType(xtv) 9393 } 9394 9395 default: 9396 // Do nothing and ignore the unexpected tag element 9397 err = decoder.Decoder.Skip() 9398 if err != nil { 9399 return err 9400 } 9401 9402 } 9403 decoder = originalDecoder 9404 } 9405 *v = sv 9406 return nil 9407 } 9408 9409 type awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy struct { 9410 } 9411 9412 func (*awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy) ID() string { 9413 return "OperationDeserializer" 9414 } 9415 9416 func (m *awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 9417 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 9418 ) { 9419 out, metadata, err = next.HandleDeserialize(ctx, in) 9420 if err != nil { 9421 return out, metadata, err 9422 } 9423 9424 response, ok := out.RawResponse.(*smithyhttp.Response) 9425 if !ok { 9426 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 9427 } 9428 9429 if response.StatusCode < 200 || response.StatusCode >= 300 { 9430 return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicyInstancesByPolicy(response, &metadata) 9431 } 9432 output := &ListTrafficPolicyInstancesByPolicyOutput{} 9433 out.Result = output 9434 9435 var buff [1024]byte 9436 ringBuffer := smithyio.NewRingBuffer(buff[:]) 9437 body := io.TeeReader(response.Body, ringBuffer) 9438 rootDecoder := xml.NewDecoder(body) 9439 t, err := smithyxml.FetchRootElement(rootDecoder) 9440 if err == io.EOF { 9441 return out, metadata, nil 9442 } 9443 if err != nil { 9444 var snapshot bytes.Buffer 9445 io.Copy(&snapshot, ringBuffer) 9446 return out, metadata, &smithy.DeserializationError{ 9447 Err: fmt.Errorf("failed to decode response body, %w", err), 9448 Snapshot: snapshot.Bytes(), 9449 } 9450 } 9451 9452 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 9453 err = awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesByPolicyOutput(&output, decoder) 9454 if err != nil { 9455 var snapshot bytes.Buffer 9456 io.Copy(&snapshot, ringBuffer) 9457 return out, metadata, &smithy.DeserializationError{ 9458 Err: fmt.Errorf("failed to decode response body, %w", err), 9459 Snapshot: snapshot.Bytes(), 9460 } 9461 } 9462 9463 return out, metadata, err 9464 } 9465 9466 func awsRestxml_deserializeOpErrorListTrafficPolicyInstancesByPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { 9467 var errorBuffer bytes.Buffer 9468 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 9469 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 9470 } 9471 errorBody := bytes.NewReader(errorBuffer.Bytes()) 9472 9473 errorCode := "UnknownError" 9474 errorMessage := errorCode 9475 9476 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 9477 if err != nil { 9478 return err 9479 } 9480 if reqID := errorComponents.RequestID; len(reqID) != 0 { 9481 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 9482 } 9483 if len(errorComponents.Code) != 0 { 9484 errorCode = errorComponents.Code 9485 } 9486 if len(errorComponents.Message) != 0 { 9487 errorMessage = errorComponents.Message 9488 } 9489 errorBody.Seek(0, io.SeekStart) 9490 switch { 9491 case strings.EqualFold("InvalidInput", errorCode): 9492 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 9493 9494 case strings.EqualFold("NoSuchTrafficPolicy", errorCode): 9495 return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) 9496 9497 case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): 9498 return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) 9499 9500 default: 9501 genericError := &smithy.GenericAPIError{ 9502 Code: errorCode, 9503 Message: errorMessage, 9504 } 9505 return genericError 9506 9507 } 9508 } 9509 9510 func awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesByPolicyOutput(v **ListTrafficPolicyInstancesByPolicyOutput, decoder smithyxml.NodeDecoder) error { 9511 if v == nil { 9512 return fmt.Errorf("unexpected nil of type %T", v) 9513 } 9514 var sv *ListTrafficPolicyInstancesByPolicyOutput 9515 if *v == nil { 9516 sv = &ListTrafficPolicyInstancesByPolicyOutput{} 9517 } else { 9518 sv = *v 9519 } 9520 9521 for { 9522 t, done, err := decoder.Token() 9523 if err != nil { 9524 return err 9525 } 9526 if done { 9527 break 9528 } 9529 originalDecoder := decoder 9530 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9531 switch { 9532 case strings.EqualFold("HostedZoneIdMarker", t.Name.Local): 9533 val, err := decoder.Value() 9534 if err != nil { 9535 return err 9536 } 9537 if val == nil { 9538 break 9539 } 9540 { 9541 xtv := string(val) 9542 sv.HostedZoneIdMarker = ptr.String(xtv) 9543 } 9544 9545 case strings.EqualFold("IsTruncated", t.Name.Local): 9546 val, err := decoder.Value() 9547 if err != nil { 9548 return err 9549 } 9550 if val == nil { 9551 break 9552 } 9553 { 9554 xtv, err := strconv.ParseBool(string(val)) 9555 if err != nil { 9556 return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) 9557 } 9558 sv.IsTruncated = xtv 9559 } 9560 9561 case strings.EqualFold("MaxItems", t.Name.Local): 9562 val, err := decoder.Value() 9563 if err != nil { 9564 return err 9565 } 9566 if val == nil { 9567 break 9568 } 9569 { 9570 xtv := string(val) 9571 i64, err := strconv.ParseInt(xtv, 10, 64) 9572 if err != nil { 9573 return err 9574 } 9575 sv.MaxItems = ptr.Int32(int32(i64)) 9576 } 9577 9578 case strings.EqualFold("TrafficPolicyInstanceNameMarker", t.Name.Local): 9579 val, err := decoder.Value() 9580 if err != nil { 9581 return err 9582 } 9583 if val == nil { 9584 break 9585 } 9586 { 9587 xtv := string(val) 9588 sv.TrafficPolicyInstanceNameMarker = ptr.String(xtv) 9589 } 9590 9591 case strings.EqualFold("TrafficPolicyInstances", t.Name.Local): 9592 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9593 if err := awsRestxml_deserializeDocumentTrafficPolicyInstances(&sv.TrafficPolicyInstances, nodeDecoder); err != nil { 9594 return err 9595 } 9596 9597 case strings.EqualFold("TrafficPolicyInstanceTypeMarker", t.Name.Local): 9598 val, err := decoder.Value() 9599 if err != nil { 9600 return err 9601 } 9602 if val == nil { 9603 break 9604 } 9605 { 9606 xtv := string(val) 9607 sv.TrafficPolicyInstanceTypeMarker = types.RRType(xtv) 9608 } 9609 9610 default: 9611 // Do nothing and ignore the unexpected tag element 9612 err = decoder.Decoder.Skip() 9613 if err != nil { 9614 return err 9615 } 9616 9617 } 9618 decoder = originalDecoder 9619 } 9620 *v = sv 9621 return nil 9622 } 9623 9624 type awsRestxml_deserializeOpListTrafficPolicyVersions struct { 9625 } 9626 9627 func (*awsRestxml_deserializeOpListTrafficPolicyVersions) ID() string { 9628 return "OperationDeserializer" 9629 } 9630 9631 func (m *awsRestxml_deserializeOpListTrafficPolicyVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 9632 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 9633 ) { 9634 out, metadata, err = next.HandleDeserialize(ctx, in) 9635 if err != nil { 9636 return out, metadata, err 9637 } 9638 9639 response, ok := out.RawResponse.(*smithyhttp.Response) 9640 if !ok { 9641 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 9642 } 9643 9644 if response.StatusCode < 200 || response.StatusCode >= 300 { 9645 return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicyVersions(response, &metadata) 9646 } 9647 output := &ListTrafficPolicyVersionsOutput{} 9648 out.Result = output 9649 9650 var buff [1024]byte 9651 ringBuffer := smithyio.NewRingBuffer(buff[:]) 9652 body := io.TeeReader(response.Body, ringBuffer) 9653 rootDecoder := xml.NewDecoder(body) 9654 t, err := smithyxml.FetchRootElement(rootDecoder) 9655 if err == io.EOF { 9656 return out, metadata, nil 9657 } 9658 if err != nil { 9659 var snapshot bytes.Buffer 9660 io.Copy(&snapshot, ringBuffer) 9661 return out, metadata, &smithy.DeserializationError{ 9662 Err: fmt.Errorf("failed to decode response body, %w", err), 9663 Snapshot: snapshot.Bytes(), 9664 } 9665 } 9666 9667 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 9668 err = awsRestxml_deserializeOpDocumentListTrafficPolicyVersionsOutput(&output, decoder) 9669 if err != nil { 9670 var snapshot bytes.Buffer 9671 io.Copy(&snapshot, ringBuffer) 9672 return out, metadata, &smithy.DeserializationError{ 9673 Err: fmt.Errorf("failed to decode response body, %w", err), 9674 Snapshot: snapshot.Bytes(), 9675 } 9676 } 9677 9678 return out, metadata, err 9679 } 9680 9681 func awsRestxml_deserializeOpErrorListTrafficPolicyVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { 9682 var errorBuffer bytes.Buffer 9683 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 9684 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 9685 } 9686 errorBody := bytes.NewReader(errorBuffer.Bytes()) 9687 9688 errorCode := "UnknownError" 9689 errorMessage := errorCode 9690 9691 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 9692 if err != nil { 9693 return err 9694 } 9695 if reqID := errorComponents.RequestID; len(reqID) != 0 { 9696 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 9697 } 9698 if len(errorComponents.Code) != 0 { 9699 errorCode = errorComponents.Code 9700 } 9701 if len(errorComponents.Message) != 0 { 9702 errorMessage = errorComponents.Message 9703 } 9704 errorBody.Seek(0, io.SeekStart) 9705 switch { 9706 case strings.EqualFold("InvalidInput", errorCode): 9707 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 9708 9709 case strings.EqualFold("NoSuchTrafficPolicy", errorCode): 9710 return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) 9711 9712 default: 9713 genericError := &smithy.GenericAPIError{ 9714 Code: errorCode, 9715 Message: errorMessage, 9716 } 9717 return genericError 9718 9719 } 9720 } 9721 9722 func awsRestxml_deserializeOpDocumentListTrafficPolicyVersionsOutput(v **ListTrafficPolicyVersionsOutput, decoder smithyxml.NodeDecoder) error { 9723 if v == nil { 9724 return fmt.Errorf("unexpected nil of type %T", v) 9725 } 9726 var sv *ListTrafficPolicyVersionsOutput 9727 if *v == nil { 9728 sv = &ListTrafficPolicyVersionsOutput{} 9729 } else { 9730 sv = *v 9731 } 9732 9733 for { 9734 t, done, err := decoder.Token() 9735 if err != nil { 9736 return err 9737 } 9738 if done { 9739 break 9740 } 9741 originalDecoder := decoder 9742 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9743 switch { 9744 case strings.EqualFold("IsTruncated", t.Name.Local): 9745 val, err := decoder.Value() 9746 if err != nil { 9747 return err 9748 } 9749 if val == nil { 9750 break 9751 } 9752 { 9753 xtv, err := strconv.ParseBool(string(val)) 9754 if err != nil { 9755 return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) 9756 } 9757 sv.IsTruncated = xtv 9758 } 9759 9760 case strings.EqualFold("MaxItems", t.Name.Local): 9761 val, err := decoder.Value() 9762 if err != nil { 9763 return err 9764 } 9765 if val == nil { 9766 break 9767 } 9768 { 9769 xtv := string(val) 9770 i64, err := strconv.ParseInt(xtv, 10, 64) 9771 if err != nil { 9772 return err 9773 } 9774 sv.MaxItems = ptr.Int32(int32(i64)) 9775 } 9776 9777 case strings.EqualFold("TrafficPolicies", t.Name.Local): 9778 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9779 if err := awsRestxml_deserializeDocumentTrafficPolicies(&sv.TrafficPolicies, nodeDecoder); err != nil { 9780 return err 9781 } 9782 9783 case strings.EqualFold("TrafficPolicyVersionMarker", t.Name.Local): 9784 val, err := decoder.Value() 9785 if err != nil { 9786 return err 9787 } 9788 if val == nil { 9789 break 9790 } 9791 { 9792 xtv := string(val) 9793 sv.TrafficPolicyVersionMarker = ptr.String(xtv) 9794 } 9795 9796 default: 9797 // Do nothing and ignore the unexpected tag element 9798 err = decoder.Decoder.Skip() 9799 if err != nil { 9800 return err 9801 } 9802 9803 } 9804 decoder = originalDecoder 9805 } 9806 *v = sv 9807 return nil 9808 } 9809 9810 type awsRestxml_deserializeOpListVPCAssociationAuthorizations struct { 9811 } 9812 9813 func (*awsRestxml_deserializeOpListVPCAssociationAuthorizations) ID() string { 9814 return "OperationDeserializer" 9815 } 9816 9817 func (m *awsRestxml_deserializeOpListVPCAssociationAuthorizations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 9818 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 9819 ) { 9820 out, metadata, err = next.HandleDeserialize(ctx, in) 9821 if err != nil { 9822 return out, metadata, err 9823 } 9824 9825 response, ok := out.RawResponse.(*smithyhttp.Response) 9826 if !ok { 9827 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 9828 } 9829 9830 if response.StatusCode < 200 || response.StatusCode >= 300 { 9831 return out, metadata, awsRestxml_deserializeOpErrorListVPCAssociationAuthorizations(response, &metadata) 9832 } 9833 output := &ListVPCAssociationAuthorizationsOutput{} 9834 out.Result = output 9835 9836 var buff [1024]byte 9837 ringBuffer := smithyio.NewRingBuffer(buff[:]) 9838 body := io.TeeReader(response.Body, ringBuffer) 9839 rootDecoder := xml.NewDecoder(body) 9840 t, err := smithyxml.FetchRootElement(rootDecoder) 9841 if err == io.EOF { 9842 return out, metadata, nil 9843 } 9844 if err != nil { 9845 var snapshot bytes.Buffer 9846 io.Copy(&snapshot, ringBuffer) 9847 return out, metadata, &smithy.DeserializationError{ 9848 Err: fmt.Errorf("failed to decode response body, %w", err), 9849 Snapshot: snapshot.Bytes(), 9850 } 9851 } 9852 9853 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 9854 err = awsRestxml_deserializeOpDocumentListVPCAssociationAuthorizationsOutput(&output, decoder) 9855 if err != nil { 9856 var snapshot bytes.Buffer 9857 io.Copy(&snapshot, ringBuffer) 9858 return out, metadata, &smithy.DeserializationError{ 9859 Err: fmt.Errorf("failed to decode response body, %w", err), 9860 Snapshot: snapshot.Bytes(), 9861 } 9862 } 9863 9864 return out, metadata, err 9865 } 9866 9867 func awsRestxml_deserializeOpErrorListVPCAssociationAuthorizations(response *smithyhttp.Response, metadata *middleware.Metadata) error { 9868 var errorBuffer bytes.Buffer 9869 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 9870 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 9871 } 9872 errorBody := bytes.NewReader(errorBuffer.Bytes()) 9873 9874 errorCode := "UnknownError" 9875 errorMessage := errorCode 9876 9877 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 9878 if err != nil { 9879 return err 9880 } 9881 if reqID := errorComponents.RequestID; len(reqID) != 0 { 9882 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 9883 } 9884 if len(errorComponents.Code) != 0 { 9885 errorCode = errorComponents.Code 9886 } 9887 if len(errorComponents.Message) != 0 { 9888 errorMessage = errorComponents.Message 9889 } 9890 errorBody.Seek(0, io.SeekStart) 9891 switch { 9892 case strings.EqualFold("InvalidInput", errorCode): 9893 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 9894 9895 case strings.EqualFold("InvalidPaginationToken", errorCode): 9896 return awsRestxml_deserializeErrorInvalidPaginationToken(response, errorBody) 9897 9898 case strings.EqualFold("NoSuchHostedZone", errorCode): 9899 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 9900 9901 default: 9902 genericError := &smithy.GenericAPIError{ 9903 Code: errorCode, 9904 Message: errorMessage, 9905 } 9906 return genericError 9907 9908 } 9909 } 9910 9911 func awsRestxml_deserializeOpDocumentListVPCAssociationAuthorizationsOutput(v **ListVPCAssociationAuthorizationsOutput, decoder smithyxml.NodeDecoder) error { 9912 if v == nil { 9913 return fmt.Errorf("unexpected nil of type %T", v) 9914 } 9915 var sv *ListVPCAssociationAuthorizationsOutput 9916 if *v == nil { 9917 sv = &ListVPCAssociationAuthorizationsOutput{} 9918 } else { 9919 sv = *v 9920 } 9921 9922 for { 9923 t, done, err := decoder.Token() 9924 if err != nil { 9925 return err 9926 } 9927 if done { 9928 break 9929 } 9930 originalDecoder := decoder 9931 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 9932 switch { 9933 case strings.EqualFold("HostedZoneId", t.Name.Local): 9934 val, err := decoder.Value() 9935 if err != nil { 9936 return err 9937 } 9938 if val == nil { 9939 break 9940 } 9941 { 9942 xtv := string(val) 9943 sv.HostedZoneId = ptr.String(xtv) 9944 } 9945 9946 case strings.EqualFold("NextToken", t.Name.Local): 9947 val, err := decoder.Value() 9948 if err != nil { 9949 return err 9950 } 9951 if val == nil { 9952 break 9953 } 9954 { 9955 xtv := string(val) 9956 sv.NextToken = ptr.String(xtv) 9957 } 9958 9959 case strings.EqualFold("VPCs", t.Name.Local): 9960 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 9961 if err := awsRestxml_deserializeDocumentVPCs(&sv.VPCs, nodeDecoder); err != nil { 9962 return err 9963 } 9964 9965 default: 9966 // Do nothing and ignore the unexpected tag element 9967 err = decoder.Decoder.Skip() 9968 if err != nil { 9969 return err 9970 } 9971 9972 } 9973 decoder = originalDecoder 9974 } 9975 *v = sv 9976 return nil 9977 } 9978 9979 type awsRestxml_deserializeOpTestDNSAnswer struct { 9980 } 9981 9982 func (*awsRestxml_deserializeOpTestDNSAnswer) ID() string { 9983 return "OperationDeserializer" 9984 } 9985 9986 func (m *awsRestxml_deserializeOpTestDNSAnswer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 9987 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 9988 ) { 9989 out, metadata, err = next.HandleDeserialize(ctx, in) 9990 if err != nil { 9991 return out, metadata, err 9992 } 9993 9994 response, ok := out.RawResponse.(*smithyhttp.Response) 9995 if !ok { 9996 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 9997 } 9998 9999 if response.StatusCode < 200 || response.StatusCode >= 300 { 10000 return out, metadata, awsRestxml_deserializeOpErrorTestDNSAnswer(response, &metadata) 10001 } 10002 output := &TestDNSAnswerOutput{} 10003 out.Result = output 10004 10005 var buff [1024]byte 10006 ringBuffer := smithyio.NewRingBuffer(buff[:]) 10007 body := io.TeeReader(response.Body, ringBuffer) 10008 rootDecoder := xml.NewDecoder(body) 10009 t, err := smithyxml.FetchRootElement(rootDecoder) 10010 if err == io.EOF { 10011 return out, metadata, nil 10012 } 10013 if err != nil { 10014 var snapshot bytes.Buffer 10015 io.Copy(&snapshot, ringBuffer) 10016 return out, metadata, &smithy.DeserializationError{ 10017 Err: fmt.Errorf("failed to decode response body, %w", err), 10018 Snapshot: snapshot.Bytes(), 10019 } 10020 } 10021 10022 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 10023 err = awsRestxml_deserializeOpDocumentTestDNSAnswerOutput(&output, decoder) 10024 if err != nil { 10025 var snapshot bytes.Buffer 10026 io.Copy(&snapshot, ringBuffer) 10027 return out, metadata, &smithy.DeserializationError{ 10028 Err: fmt.Errorf("failed to decode response body, %w", err), 10029 Snapshot: snapshot.Bytes(), 10030 } 10031 } 10032 10033 return out, metadata, err 10034 } 10035 10036 func awsRestxml_deserializeOpErrorTestDNSAnswer(response *smithyhttp.Response, metadata *middleware.Metadata) error { 10037 var errorBuffer bytes.Buffer 10038 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 10039 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 10040 } 10041 errorBody := bytes.NewReader(errorBuffer.Bytes()) 10042 10043 errorCode := "UnknownError" 10044 errorMessage := errorCode 10045 10046 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 10047 if err != nil { 10048 return err 10049 } 10050 if reqID := errorComponents.RequestID; len(reqID) != 0 { 10051 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 10052 } 10053 if len(errorComponents.Code) != 0 { 10054 errorCode = errorComponents.Code 10055 } 10056 if len(errorComponents.Message) != 0 { 10057 errorMessage = errorComponents.Message 10058 } 10059 errorBody.Seek(0, io.SeekStart) 10060 switch { 10061 case strings.EqualFold("InvalidInput", errorCode): 10062 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 10063 10064 case strings.EqualFold("NoSuchHostedZone", errorCode): 10065 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 10066 10067 default: 10068 genericError := &smithy.GenericAPIError{ 10069 Code: errorCode, 10070 Message: errorMessage, 10071 } 10072 return genericError 10073 10074 } 10075 } 10076 10077 func awsRestxml_deserializeOpDocumentTestDNSAnswerOutput(v **TestDNSAnswerOutput, decoder smithyxml.NodeDecoder) error { 10078 if v == nil { 10079 return fmt.Errorf("unexpected nil of type %T", v) 10080 } 10081 var sv *TestDNSAnswerOutput 10082 if *v == nil { 10083 sv = &TestDNSAnswerOutput{} 10084 } else { 10085 sv = *v 10086 } 10087 10088 for { 10089 t, done, err := decoder.Token() 10090 if err != nil { 10091 return err 10092 } 10093 if done { 10094 break 10095 } 10096 originalDecoder := decoder 10097 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10098 switch { 10099 case strings.EqualFold("Nameserver", t.Name.Local): 10100 val, err := decoder.Value() 10101 if err != nil { 10102 return err 10103 } 10104 if val == nil { 10105 break 10106 } 10107 { 10108 xtv := string(val) 10109 sv.Nameserver = ptr.String(xtv) 10110 } 10111 10112 case strings.EqualFold("Protocol", t.Name.Local): 10113 val, err := decoder.Value() 10114 if err != nil { 10115 return err 10116 } 10117 if val == nil { 10118 break 10119 } 10120 { 10121 xtv := string(val) 10122 sv.Protocol = ptr.String(xtv) 10123 } 10124 10125 case strings.EqualFold("RecordData", t.Name.Local): 10126 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10127 if err := awsRestxml_deserializeDocumentRecordData(&sv.RecordData, nodeDecoder); err != nil { 10128 return err 10129 } 10130 10131 case strings.EqualFold("RecordName", t.Name.Local): 10132 val, err := decoder.Value() 10133 if err != nil { 10134 return err 10135 } 10136 if val == nil { 10137 break 10138 } 10139 { 10140 xtv := string(val) 10141 sv.RecordName = ptr.String(xtv) 10142 } 10143 10144 case strings.EqualFold("RecordType", t.Name.Local): 10145 val, err := decoder.Value() 10146 if err != nil { 10147 return err 10148 } 10149 if val == nil { 10150 break 10151 } 10152 { 10153 xtv := string(val) 10154 sv.RecordType = types.RRType(xtv) 10155 } 10156 10157 case strings.EqualFold("ResponseCode", t.Name.Local): 10158 val, err := decoder.Value() 10159 if err != nil { 10160 return err 10161 } 10162 if val == nil { 10163 break 10164 } 10165 { 10166 xtv := string(val) 10167 sv.ResponseCode = ptr.String(xtv) 10168 } 10169 10170 default: 10171 // Do nothing and ignore the unexpected tag element 10172 err = decoder.Decoder.Skip() 10173 if err != nil { 10174 return err 10175 } 10176 10177 } 10178 decoder = originalDecoder 10179 } 10180 *v = sv 10181 return nil 10182 } 10183 10184 type awsRestxml_deserializeOpUpdateHealthCheck struct { 10185 } 10186 10187 func (*awsRestxml_deserializeOpUpdateHealthCheck) ID() string { 10188 return "OperationDeserializer" 10189 } 10190 10191 func (m *awsRestxml_deserializeOpUpdateHealthCheck) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 10192 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 10193 ) { 10194 out, metadata, err = next.HandleDeserialize(ctx, in) 10195 if err != nil { 10196 return out, metadata, err 10197 } 10198 10199 response, ok := out.RawResponse.(*smithyhttp.Response) 10200 if !ok { 10201 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 10202 } 10203 10204 if response.StatusCode < 200 || response.StatusCode >= 300 { 10205 return out, metadata, awsRestxml_deserializeOpErrorUpdateHealthCheck(response, &metadata) 10206 } 10207 output := &UpdateHealthCheckOutput{} 10208 out.Result = output 10209 10210 var buff [1024]byte 10211 ringBuffer := smithyio.NewRingBuffer(buff[:]) 10212 body := io.TeeReader(response.Body, ringBuffer) 10213 rootDecoder := xml.NewDecoder(body) 10214 t, err := smithyxml.FetchRootElement(rootDecoder) 10215 if err == io.EOF { 10216 return out, metadata, nil 10217 } 10218 if err != nil { 10219 var snapshot bytes.Buffer 10220 io.Copy(&snapshot, ringBuffer) 10221 return out, metadata, &smithy.DeserializationError{ 10222 Err: fmt.Errorf("failed to decode response body, %w", err), 10223 Snapshot: snapshot.Bytes(), 10224 } 10225 } 10226 10227 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 10228 err = awsRestxml_deserializeOpDocumentUpdateHealthCheckOutput(&output, decoder) 10229 if err != nil { 10230 var snapshot bytes.Buffer 10231 io.Copy(&snapshot, ringBuffer) 10232 return out, metadata, &smithy.DeserializationError{ 10233 Err: fmt.Errorf("failed to decode response body, %w", err), 10234 Snapshot: snapshot.Bytes(), 10235 } 10236 } 10237 10238 return out, metadata, err 10239 } 10240 10241 func awsRestxml_deserializeOpErrorUpdateHealthCheck(response *smithyhttp.Response, metadata *middleware.Metadata) error { 10242 var errorBuffer bytes.Buffer 10243 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 10244 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 10245 } 10246 errorBody := bytes.NewReader(errorBuffer.Bytes()) 10247 10248 errorCode := "UnknownError" 10249 errorMessage := errorCode 10250 10251 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 10252 if err != nil { 10253 return err 10254 } 10255 if reqID := errorComponents.RequestID; len(reqID) != 0 { 10256 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 10257 } 10258 if len(errorComponents.Code) != 0 { 10259 errorCode = errorComponents.Code 10260 } 10261 if len(errorComponents.Message) != 0 { 10262 errorMessage = errorComponents.Message 10263 } 10264 errorBody.Seek(0, io.SeekStart) 10265 switch { 10266 case strings.EqualFold("HealthCheckVersionMismatch", errorCode): 10267 return awsRestxml_deserializeErrorHealthCheckVersionMismatch(response, errorBody) 10268 10269 case strings.EqualFold("InvalidInput", errorCode): 10270 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 10271 10272 case strings.EqualFold("NoSuchHealthCheck", errorCode): 10273 return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) 10274 10275 default: 10276 genericError := &smithy.GenericAPIError{ 10277 Code: errorCode, 10278 Message: errorMessage, 10279 } 10280 return genericError 10281 10282 } 10283 } 10284 10285 func awsRestxml_deserializeOpDocumentUpdateHealthCheckOutput(v **UpdateHealthCheckOutput, decoder smithyxml.NodeDecoder) error { 10286 if v == nil { 10287 return fmt.Errorf("unexpected nil of type %T", v) 10288 } 10289 var sv *UpdateHealthCheckOutput 10290 if *v == nil { 10291 sv = &UpdateHealthCheckOutput{} 10292 } else { 10293 sv = *v 10294 } 10295 10296 for { 10297 t, done, err := decoder.Token() 10298 if err != nil { 10299 return err 10300 } 10301 if done { 10302 break 10303 } 10304 originalDecoder := decoder 10305 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10306 switch { 10307 case strings.EqualFold("HealthCheck", t.Name.Local): 10308 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10309 if err := awsRestxml_deserializeDocumentHealthCheck(&sv.HealthCheck, nodeDecoder); err != nil { 10310 return err 10311 } 10312 10313 default: 10314 // Do nothing and ignore the unexpected tag element 10315 err = decoder.Decoder.Skip() 10316 if err != nil { 10317 return err 10318 } 10319 10320 } 10321 decoder = originalDecoder 10322 } 10323 *v = sv 10324 return nil 10325 } 10326 10327 type awsRestxml_deserializeOpUpdateHostedZoneComment struct { 10328 } 10329 10330 func (*awsRestxml_deserializeOpUpdateHostedZoneComment) ID() string { 10331 return "OperationDeserializer" 10332 } 10333 10334 func (m *awsRestxml_deserializeOpUpdateHostedZoneComment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 10335 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 10336 ) { 10337 out, metadata, err = next.HandleDeserialize(ctx, in) 10338 if err != nil { 10339 return out, metadata, err 10340 } 10341 10342 response, ok := out.RawResponse.(*smithyhttp.Response) 10343 if !ok { 10344 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 10345 } 10346 10347 if response.StatusCode < 200 || response.StatusCode >= 300 { 10348 return out, metadata, awsRestxml_deserializeOpErrorUpdateHostedZoneComment(response, &metadata) 10349 } 10350 output := &UpdateHostedZoneCommentOutput{} 10351 out.Result = output 10352 10353 var buff [1024]byte 10354 ringBuffer := smithyio.NewRingBuffer(buff[:]) 10355 body := io.TeeReader(response.Body, ringBuffer) 10356 rootDecoder := xml.NewDecoder(body) 10357 t, err := smithyxml.FetchRootElement(rootDecoder) 10358 if err == io.EOF { 10359 return out, metadata, nil 10360 } 10361 if err != nil { 10362 var snapshot bytes.Buffer 10363 io.Copy(&snapshot, ringBuffer) 10364 return out, metadata, &smithy.DeserializationError{ 10365 Err: fmt.Errorf("failed to decode response body, %w", err), 10366 Snapshot: snapshot.Bytes(), 10367 } 10368 } 10369 10370 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 10371 err = awsRestxml_deserializeOpDocumentUpdateHostedZoneCommentOutput(&output, decoder) 10372 if err != nil { 10373 var snapshot bytes.Buffer 10374 io.Copy(&snapshot, ringBuffer) 10375 return out, metadata, &smithy.DeserializationError{ 10376 Err: fmt.Errorf("failed to decode response body, %w", err), 10377 Snapshot: snapshot.Bytes(), 10378 } 10379 } 10380 10381 return out, metadata, err 10382 } 10383 10384 func awsRestxml_deserializeOpErrorUpdateHostedZoneComment(response *smithyhttp.Response, metadata *middleware.Metadata) error { 10385 var errorBuffer bytes.Buffer 10386 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 10387 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 10388 } 10389 errorBody := bytes.NewReader(errorBuffer.Bytes()) 10390 10391 errorCode := "UnknownError" 10392 errorMessage := errorCode 10393 10394 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 10395 if err != nil { 10396 return err 10397 } 10398 if reqID := errorComponents.RequestID; len(reqID) != 0 { 10399 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 10400 } 10401 if len(errorComponents.Code) != 0 { 10402 errorCode = errorComponents.Code 10403 } 10404 if len(errorComponents.Message) != 0 { 10405 errorMessage = errorComponents.Message 10406 } 10407 errorBody.Seek(0, io.SeekStart) 10408 switch { 10409 case strings.EqualFold("InvalidInput", errorCode): 10410 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 10411 10412 case strings.EqualFold("NoSuchHostedZone", errorCode): 10413 return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) 10414 10415 case strings.EqualFold("PriorRequestNotComplete", errorCode): 10416 return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) 10417 10418 default: 10419 genericError := &smithy.GenericAPIError{ 10420 Code: errorCode, 10421 Message: errorMessage, 10422 } 10423 return genericError 10424 10425 } 10426 } 10427 10428 func awsRestxml_deserializeOpDocumentUpdateHostedZoneCommentOutput(v **UpdateHostedZoneCommentOutput, decoder smithyxml.NodeDecoder) error { 10429 if v == nil { 10430 return fmt.Errorf("unexpected nil of type %T", v) 10431 } 10432 var sv *UpdateHostedZoneCommentOutput 10433 if *v == nil { 10434 sv = &UpdateHostedZoneCommentOutput{} 10435 } else { 10436 sv = *v 10437 } 10438 10439 for { 10440 t, done, err := decoder.Token() 10441 if err != nil { 10442 return err 10443 } 10444 if done { 10445 break 10446 } 10447 originalDecoder := decoder 10448 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10449 switch { 10450 case strings.EqualFold("HostedZone", t.Name.Local): 10451 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10452 if err := awsRestxml_deserializeDocumentHostedZone(&sv.HostedZone, nodeDecoder); err != nil { 10453 return err 10454 } 10455 10456 default: 10457 // Do nothing and ignore the unexpected tag element 10458 err = decoder.Decoder.Skip() 10459 if err != nil { 10460 return err 10461 } 10462 10463 } 10464 decoder = originalDecoder 10465 } 10466 *v = sv 10467 return nil 10468 } 10469 10470 type awsRestxml_deserializeOpUpdateTrafficPolicyComment struct { 10471 } 10472 10473 func (*awsRestxml_deserializeOpUpdateTrafficPolicyComment) ID() string { 10474 return "OperationDeserializer" 10475 } 10476 10477 func (m *awsRestxml_deserializeOpUpdateTrafficPolicyComment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 10478 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 10479 ) { 10480 out, metadata, err = next.HandleDeserialize(ctx, in) 10481 if err != nil { 10482 return out, metadata, err 10483 } 10484 10485 response, ok := out.RawResponse.(*smithyhttp.Response) 10486 if !ok { 10487 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 10488 } 10489 10490 if response.StatusCode < 200 || response.StatusCode >= 300 { 10491 return out, metadata, awsRestxml_deserializeOpErrorUpdateTrafficPolicyComment(response, &metadata) 10492 } 10493 output := &UpdateTrafficPolicyCommentOutput{} 10494 out.Result = output 10495 10496 var buff [1024]byte 10497 ringBuffer := smithyio.NewRingBuffer(buff[:]) 10498 body := io.TeeReader(response.Body, ringBuffer) 10499 rootDecoder := xml.NewDecoder(body) 10500 t, err := smithyxml.FetchRootElement(rootDecoder) 10501 if err == io.EOF { 10502 return out, metadata, nil 10503 } 10504 if err != nil { 10505 var snapshot bytes.Buffer 10506 io.Copy(&snapshot, ringBuffer) 10507 return out, metadata, &smithy.DeserializationError{ 10508 Err: fmt.Errorf("failed to decode response body, %w", err), 10509 Snapshot: snapshot.Bytes(), 10510 } 10511 } 10512 10513 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 10514 err = awsRestxml_deserializeOpDocumentUpdateTrafficPolicyCommentOutput(&output, decoder) 10515 if err != nil { 10516 var snapshot bytes.Buffer 10517 io.Copy(&snapshot, ringBuffer) 10518 return out, metadata, &smithy.DeserializationError{ 10519 Err: fmt.Errorf("failed to decode response body, %w", err), 10520 Snapshot: snapshot.Bytes(), 10521 } 10522 } 10523 10524 return out, metadata, err 10525 } 10526 10527 func awsRestxml_deserializeOpErrorUpdateTrafficPolicyComment(response *smithyhttp.Response, metadata *middleware.Metadata) error { 10528 var errorBuffer bytes.Buffer 10529 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 10530 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 10531 } 10532 errorBody := bytes.NewReader(errorBuffer.Bytes()) 10533 10534 errorCode := "UnknownError" 10535 errorMessage := errorCode 10536 10537 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 10538 if err != nil { 10539 return err 10540 } 10541 if reqID := errorComponents.RequestID; len(reqID) != 0 { 10542 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 10543 } 10544 if len(errorComponents.Code) != 0 { 10545 errorCode = errorComponents.Code 10546 } 10547 if len(errorComponents.Message) != 0 { 10548 errorMessage = errorComponents.Message 10549 } 10550 errorBody.Seek(0, io.SeekStart) 10551 switch { 10552 case strings.EqualFold("ConcurrentModification", errorCode): 10553 return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) 10554 10555 case strings.EqualFold("InvalidInput", errorCode): 10556 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 10557 10558 case strings.EqualFold("NoSuchTrafficPolicy", errorCode): 10559 return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) 10560 10561 default: 10562 genericError := &smithy.GenericAPIError{ 10563 Code: errorCode, 10564 Message: errorMessage, 10565 } 10566 return genericError 10567 10568 } 10569 } 10570 10571 func awsRestxml_deserializeOpDocumentUpdateTrafficPolicyCommentOutput(v **UpdateTrafficPolicyCommentOutput, decoder smithyxml.NodeDecoder) error { 10572 if v == nil { 10573 return fmt.Errorf("unexpected nil of type %T", v) 10574 } 10575 var sv *UpdateTrafficPolicyCommentOutput 10576 if *v == nil { 10577 sv = &UpdateTrafficPolicyCommentOutput{} 10578 } else { 10579 sv = *v 10580 } 10581 10582 for { 10583 t, done, err := decoder.Token() 10584 if err != nil { 10585 return err 10586 } 10587 if done { 10588 break 10589 } 10590 originalDecoder := decoder 10591 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10592 switch { 10593 case strings.EqualFold("TrafficPolicy", t.Name.Local): 10594 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10595 if err := awsRestxml_deserializeDocumentTrafficPolicy(&sv.TrafficPolicy, nodeDecoder); err != nil { 10596 return err 10597 } 10598 10599 default: 10600 // Do nothing and ignore the unexpected tag element 10601 err = decoder.Decoder.Skip() 10602 if err != nil { 10603 return err 10604 } 10605 10606 } 10607 decoder = originalDecoder 10608 } 10609 *v = sv 10610 return nil 10611 } 10612 10613 type awsRestxml_deserializeOpUpdateTrafficPolicyInstance struct { 10614 } 10615 10616 func (*awsRestxml_deserializeOpUpdateTrafficPolicyInstance) ID() string { 10617 return "OperationDeserializer" 10618 } 10619 10620 func (m *awsRestxml_deserializeOpUpdateTrafficPolicyInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( 10621 out middleware.DeserializeOutput, metadata middleware.Metadata, err error, 10622 ) { 10623 out, metadata, err = next.HandleDeserialize(ctx, in) 10624 if err != nil { 10625 return out, metadata, err 10626 } 10627 10628 response, ok := out.RawResponse.(*smithyhttp.Response) 10629 if !ok { 10630 return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} 10631 } 10632 10633 if response.StatusCode < 200 || response.StatusCode >= 300 { 10634 return out, metadata, awsRestxml_deserializeOpErrorUpdateTrafficPolicyInstance(response, &metadata) 10635 } 10636 output := &UpdateTrafficPolicyInstanceOutput{} 10637 out.Result = output 10638 10639 var buff [1024]byte 10640 ringBuffer := smithyio.NewRingBuffer(buff[:]) 10641 body := io.TeeReader(response.Body, ringBuffer) 10642 rootDecoder := xml.NewDecoder(body) 10643 t, err := smithyxml.FetchRootElement(rootDecoder) 10644 if err == io.EOF { 10645 return out, metadata, nil 10646 } 10647 if err != nil { 10648 var snapshot bytes.Buffer 10649 io.Copy(&snapshot, ringBuffer) 10650 return out, metadata, &smithy.DeserializationError{ 10651 Err: fmt.Errorf("failed to decode response body, %w", err), 10652 Snapshot: snapshot.Bytes(), 10653 } 10654 } 10655 10656 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 10657 err = awsRestxml_deserializeOpDocumentUpdateTrafficPolicyInstanceOutput(&output, decoder) 10658 if err != nil { 10659 var snapshot bytes.Buffer 10660 io.Copy(&snapshot, ringBuffer) 10661 return out, metadata, &smithy.DeserializationError{ 10662 Err: fmt.Errorf("failed to decode response body, %w", err), 10663 Snapshot: snapshot.Bytes(), 10664 } 10665 } 10666 10667 return out, metadata, err 10668 } 10669 10670 func awsRestxml_deserializeOpErrorUpdateTrafficPolicyInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { 10671 var errorBuffer bytes.Buffer 10672 if _, err := io.Copy(&errorBuffer, response.Body); err != nil { 10673 return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} 10674 } 10675 errorBody := bytes.NewReader(errorBuffer.Bytes()) 10676 10677 errorCode := "UnknownError" 10678 errorMessage := errorCode 10679 10680 errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) 10681 if err != nil { 10682 return err 10683 } 10684 if reqID := errorComponents.RequestID; len(reqID) != 0 { 10685 awsmiddleware.SetRequestIDMetadata(metadata, reqID) 10686 } 10687 if len(errorComponents.Code) != 0 { 10688 errorCode = errorComponents.Code 10689 } 10690 if len(errorComponents.Message) != 0 { 10691 errorMessage = errorComponents.Message 10692 } 10693 errorBody.Seek(0, io.SeekStart) 10694 switch { 10695 case strings.EqualFold("ConflictingTypes", errorCode): 10696 return awsRestxml_deserializeErrorConflictingTypes(response, errorBody) 10697 10698 case strings.EqualFold("InvalidInput", errorCode): 10699 return awsRestxml_deserializeErrorInvalidInput(response, errorBody) 10700 10701 case strings.EqualFold("NoSuchTrafficPolicy", errorCode): 10702 return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) 10703 10704 case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): 10705 return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) 10706 10707 case strings.EqualFold("PriorRequestNotComplete", errorCode): 10708 return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) 10709 10710 default: 10711 genericError := &smithy.GenericAPIError{ 10712 Code: errorCode, 10713 Message: errorMessage, 10714 } 10715 return genericError 10716 10717 } 10718 } 10719 10720 func awsRestxml_deserializeOpDocumentUpdateTrafficPolicyInstanceOutput(v **UpdateTrafficPolicyInstanceOutput, decoder smithyxml.NodeDecoder) error { 10721 if v == nil { 10722 return fmt.Errorf("unexpected nil of type %T", v) 10723 } 10724 var sv *UpdateTrafficPolicyInstanceOutput 10725 if *v == nil { 10726 sv = &UpdateTrafficPolicyInstanceOutput{} 10727 } else { 10728 sv = *v 10729 } 10730 10731 for { 10732 t, done, err := decoder.Token() 10733 if err != nil { 10734 return err 10735 } 10736 if done { 10737 break 10738 } 10739 originalDecoder := decoder 10740 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 10741 switch { 10742 case strings.EqualFold("TrafficPolicyInstance", t.Name.Local): 10743 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10744 if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&sv.TrafficPolicyInstance, nodeDecoder); err != nil { 10745 return err 10746 } 10747 10748 default: 10749 // Do nothing and ignore the unexpected tag element 10750 err = decoder.Decoder.Skip() 10751 if err != nil { 10752 return err 10753 } 10754 10755 } 10756 decoder = originalDecoder 10757 } 10758 *v = sv 10759 return nil 10760 } 10761 10762 func awsRestxml_deserializeErrorCidrBlockInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 10763 output := &types.CidrBlockInUseException{} 10764 var buff [1024]byte 10765 ringBuffer := smithyio.NewRingBuffer(buff[:]) 10766 body := io.TeeReader(errorBody, ringBuffer) 10767 rootDecoder := xml.NewDecoder(body) 10768 t, err := smithyxml.FetchRootElement(rootDecoder) 10769 if err == io.EOF { 10770 return output 10771 } 10772 if err != nil { 10773 var snapshot bytes.Buffer 10774 io.Copy(&snapshot, ringBuffer) 10775 return &smithy.DeserializationError{ 10776 Err: fmt.Errorf("failed to decode response body, %w", err), 10777 Snapshot: snapshot.Bytes(), 10778 } 10779 } 10780 10781 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 10782 t, err = decoder.GetElement("Error") 10783 if err != nil { 10784 var snapshot bytes.Buffer 10785 io.Copy(&snapshot, ringBuffer) 10786 return &smithy.DeserializationError{ 10787 Err: fmt.Errorf("failed to decode response body, %w", err), 10788 Snapshot: snapshot.Bytes(), 10789 } 10790 } 10791 10792 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10793 err = awsRestxml_deserializeDocumentCidrBlockInUseException(&output, decoder) 10794 if err != nil { 10795 var snapshot bytes.Buffer 10796 io.Copy(&snapshot, ringBuffer) 10797 return &smithy.DeserializationError{ 10798 Err: fmt.Errorf("failed to decode response body, %w", err), 10799 Snapshot: snapshot.Bytes(), 10800 } 10801 } 10802 10803 return output 10804 } 10805 10806 func awsRestxml_deserializeErrorCidrCollectionAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 10807 output := &types.CidrCollectionAlreadyExistsException{} 10808 var buff [1024]byte 10809 ringBuffer := smithyio.NewRingBuffer(buff[:]) 10810 body := io.TeeReader(errorBody, ringBuffer) 10811 rootDecoder := xml.NewDecoder(body) 10812 t, err := smithyxml.FetchRootElement(rootDecoder) 10813 if err == io.EOF { 10814 return output 10815 } 10816 if err != nil { 10817 var snapshot bytes.Buffer 10818 io.Copy(&snapshot, ringBuffer) 10819 return &smithy.DeserializationError{ 10820 Err: fmt.Errorf("failed to decode response body, %w", err), 10821 Snapshot: snapshot.Bytes(), 10822 } 10823 } 10824 10825 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 10826 t, err = decoder.GetElement("Error") 10827 if err != nil { 10828 var snapshot bytes.Buffer 10829 io.Copy(&snapshot, ringBuffer) 10830 return &smithy.DeserializationError{ 10831 Err: fmt.Errorf("failed to decode response body, %w", err), 10832 Snapshot: snapshot.Bytes(), 10833 } 10834 } 10835 10836 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10837 err = awsRestxml_deserializeDocumentCidrCollectionAlreadyExistsException(&output, decoder) 10838 if err != nil { 10839 var snapshot bytes.Buffer 10840 io.Copy(&snapshot, ringBuffer) 10841 return &smithy.DeserializationError{ 10842 Err: fmt.Errorf("failed to decode response body, %w", err), 10843 Snapshot: snapshot.Bytes(), 10844 } 10845 } 10846 10847 return output 10848 } 10849 10850 func awsRestxml_deserializeErrorCidrCollectionInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 10851 output := &types.CidrCollectionInUseException{} 10852 var buff [1024]byte 10853 ringBuffer := smithyio.NewRingBuffer(buff[:]) 10854 body := io.TeeReader(errorBody, ringBuffer) 10855 rootDecoder := xml.NewDecoder(body) 10856 t, err := smithyxml.FetchRootElement(rootDecoder) 10857 if err == io.EOF { 10858 return output 10859 } 10860 if err != nil { 10861 var snapshot bytes.Buffer 10862 io.Copy(&snapshot, ringBuffer) 10863 return &smithy.DeserializationError{ 10864 Err: fmt.Errorf("failed to decode response body, %w", err), 10865 Snapshot: snapshot.Bytes(), 10866 } 10867 } 10868 10869 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 10870 t, err = decoder.GetElement("Error") 10871 if err != nil { 10872 var snapshot bytes.Buffer 10873 io.Copy(&snapshot, ringBuffer) 10874 return &smithy.DeserializationError{ 10875 Err: fmt.Errorf("failed to decode response body, %w", err), 10876 Snapshot: snapshot.Bytes(), 10877 } 10878 } 10879 10880 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10881 err = awsRestxml_deserializeDocumentCidrCollectionInUseException(&output, decoder) 10882 if err != nil { 10883 var snapshot bytes.Buffer 10884 io.Copy(&snapshot, ringBuffer) 10885 return &smithy.DeserializationError{ 10886 Err: fmt.Errorf("failed to decode response body, %w", err), 10887 Snapshot: snapshot.Bytes(), 10888 } 10889 } 10890 10891 return output 10892 } 10893 10894 func awsRestxml_deserializeErrorCidrCollectionVersionMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 10895 output := &types.CidrCollectionVersionMismatchException{} 10896 var buff [1024]byte 10897 ringBuffer := smithyio.NewRingBuffer(buff[:]) 10898 body := io.TeeReader(errorBody, ringBuffer) 10899 rootDecoder := xml.NewDecoder(body) 10900 t, err := smithyxml.FetchRootElement(rootDecoder) 10901 if err == io.EOF { 10902 return output 10903 } 10904 if err != nil { 10905 var snapshot bytes.Buffer 10906 io.Copy(&snapshot, ringBuffer) 10907 return &smithy.DeserializationError{ 10908 Err: fmt.Errorf("failed to decode response body, %w", err), 10909 Snapshot: snapshot.Bytes(), 10910 } 10911 } 10912 10913 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 10914 t, err = decoder.GetElement("Error") 10915 if err != nil { 10916 var snapshot bytes.Buffer 10917 io.Copy(&snapshot, ringBuffer) 10918 return &smithy.DeserializationError{ 10919 Err: fmt.Errorf("failed to decode response body, %w", err), 10920 Snapshot: snapshot.Bytes(), 10921 } 10922 } 10923 10924 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10925 err = awsRestxml_deserializeDocumentCidrCollectionVersionMismatchException(&output, decoder) 10926 if err != nil { 10927 var snapshot bytes.Buffer 10928 io.Copy(&snapshot, ringBuffer) 10929 return &smithy.DeserializationError{ 10930 Err: fmt.Errorf("failed to decode response body, %w", err), 10931 Snapshot: snapshot.Bytes(), 10932 } 10933 } 10934 10935 return output 10936 } 10937 10938 func awsRestxml_deserializeErrorConcurrentModification(response *smithyhttp.Response, errorBody *bytes.Reader) error { 10939 output := &types.ConcurrentModification{} 10940 var buff [1024]byte 10941 ringBuffer := smithyio.NewRingBuffer(buff[:]) 10942 body := io.TeeReader(errorBody, ringBuffer) 10943 rootDecoder := xml.NewDecoder(body) 10944 t, err := smithyxml.FetchRootElement(rootDecoder) 10945 if err == io.EOF { 10946 return output 10947 } 10948 if err != nil { 10949 var snapshot bytes.Buffer 10950 io.Copy(&snapshot, ringBuffer) 10951 return &smithy.DeserializationError{ 10952 Err: fmt.Errorf("failed to decode response body, %w", err), 10953 Snapshot: snapshot.Bytes(), 10954 } 10955 } 10956 10957 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 10958 t, err = decoder.GetElement("Error") 10959 if err != nil { 10960 var snapshot bytes.Buffer 10961 io.Copy(&snapshot, ringBuffer) 10962 return &smithy.DeserializationError{ 10963 Err: fmt.Errorf("failed to decode response body, %w", err), 10964 Snapshot: snapshot.Bytes(), 10965 } 10966 } 10967 10968 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 10969 err = awsRestxml_deserializeDocumentConcurrentModification(&output, decoder) 10970 if err != nil { 10971 var snapshot bytes.Buffer 10972 io.Copy(&snapshot, ringBuffer) 10973 return &smithy.DeserializationError{ 10974 Err: fmt.Errorf("failed to decode response body, %w", err), 10975 Snapshot: snapshot.Bytes(), 10976 } 10977 } 10978 10979 return output 10980 } 10981 10982 func awsRestxml_deserializeErrorConflictingDomainExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { 10983 output := &types.ConflictingDomainExists{} 10984 var buff [1024]byte 10985 ringBuffer := smithyio.NewRingBuffer(buff[:]) 10986 body := io.TeeReader(errorBody, ringBuffer) 10987 rootDecoder := xml.NewDecoder(body) 10988 t, err := smithyxml.FetchRootElement(rootDecoder) 10989 if err == io.EOF { 10990 return output 10991 } 10992 if err != nil { 10993 var snapshot bytes.Buffer 10994 io.Copy(&snapshot, ringBuffer) 10995 return &smithy.DeserializationError{ 10996 Err: fmt.Errorf("failed to decode response body, %w", err), 10997 Snapshot: snapshot.Bytes(), 10998 } 10999 } 11000 11001 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11002 t, err = decoder.GetElement("Error") 11003 if err != nil { 11004 var snapshot bytes.Buffer 11005 io.Copy(&snapshot, ringBuffer) 11006 return &smithy.DeserializationError{ 11007 Err: fmt.Errorf("failed to decode response body, %w", err), 11008 Snapshot: snapshot.Bytes(), 11009 } 11010 } 11011 11012 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11013 err = awsRestxml_deserializeDocumentConflictingDomainExists(&output, decoder) 11014 if err != nil { 11015 var snapshot bytes.Buffer 11016 io.Copy(&snapshot, ringBuffer) 11017 return &smithy.DeserializationError{ 11018 Err: fmt.Errorf("failed to decode response body, %w", err), 11019 Snapshot: snapshot.Bytes(), 11020 } 11021 } 11022 11023 return output 11024 } 11025 11026 func awsRestxml_deserializeErrorConflictingTypes(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11027 output := &types.ConflictingTypes{} 11028 var buff [1024]byte 11029 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11030 body := io.TeeReader(errorBody, ringBuffer) 11031 rootDecoder := xml.NewDecoder(body) 11032 t, err := smithyxml.FetchRootElement(rootDecoder) 11033 if err == io.EOF { 11034 return output 11035 } 11036 if err != nil { 11037 var snapshot bytes.Buffer 11038 io.Copy(&snapshot, ringBuffer) 11039 return &smithy.DeserializationError{ 11040 Err: fmt.Errorf("failed to decode response body, %w", err), 11041 Snapshot: snapshot.Bytes(), 11042 } 11043 } 11044 11045 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11046 t, err = decoder.GetElement("Error") 11047 if err != nil { 11048 var snapshot bytes.Buffer 11049 io.Copy(&snapshot, ringBuffer) 11050 return &smithy.DeserializationError{ 11051 Err: fmt.Errorf("failed to decode response body, %w", err), 11052 Snapshot: snapshot.Bytes(), 11053 } 11054 } 11055 11056 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11057 err = awsRestxml_deserializeDocumentConflictingTypes(&output, decoder) 11058 if err != nil { 11059 var snapshot bytes.Buffer 11060 io.Copy(&snapshot, ringBuffer) 11061 return &smithy.DeserializationError{ 11062 Err: fmt.Errorf("failed to decode response body, %w", err), 11063 Snapshot: snapshot.Bytes(), 11064 } 11065 } 11066 11067 return output 11068 } 11069 11070 func awsRestxml_deserializeErrorDelegationSetAlreadyCreated(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11071 output := &types.DelegationSetAlreadyCreated{} 11072 var buff [1024]byte 11073 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11074 body := io.TeeReader(errorBody, ringBuffer) 11075 rootDecoder := xml.NewDecoder(body) 11076 t, err := smithyxml.FetchRootElement(rootDecoder) 11077 if err == io.EOF { 11078 return output 11079 } 11080 if err != nil { 11081 var snapshot bytes.Buffer 11082 io.Copy(&snapshot, ringBuffer) 11083 return &smithy.DeserializationError{ 11084 Err: fmt.Errorf("failed to decode response body, %w", err), 11085 Snapshot: snapshot.Bytes(), 11086 } 11087 } 11088 11089 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11090 t, err = decoder.GetElement("Error") 11091 if err != nil { 11092 var snapshot bytes.Buffer 11093 io.Copy(&snapshot, ringBuffer) 11094 return &smithy.DeserializationError{ 11095 Err: fmt.Errorf("failed to decode response body, %w", err), 11096 Snapshot: snapshot.Bytes(), 11097 } 11098 } 11099 11100 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11101 err = awsRestxml_deserializeDocumentDelegationSetAlreadyCreated(&output, decoder) 11102 if err != nil { 11103 var snapshot bytes.Buffer 11104 io.Copy(&snapshot, ringBuffer) 11105 return &smithy.DeserializationError{ 11106 Err: fmt.Errorf("failed to decode response body, %w", err), 11107 Snapshot: snapshot.Bytes(), 11108 } 11109 } 11110 11111 return output 11112 } 11113 11114 func awsRestxml_deserializeErrorDelegationSetAlreadyReusable(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11115 output := &types.DelegationSetAlreadyReusable{} 11116 var buff [1024]byte 11117 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11118 body := io.TeeReader(errorBody, ringBuffer) 11119 rootDecoder := xml.NewDecoder(body) 11120 t, err := smithyxml.FetchRootElement(rootDecoder) 11121 if err == io.EOF { 11122 return output 11123 } 11124 if err != nil { 11125 var snapshot bytes.Buffer 11126 io.Copy(&snapshot, ringBuffer) 11127 return &smithy.DeserializationError{ 11128 Err: fmt.Errorf("failed to decode response body, %w", err), 11129 Snapshot: snapshot.Bytes(), 11130 } 11131 } 11132 11133 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11134 t, err = decoder.GetElement("Error") 11135 if err != nil { 11136 var snapshot bytes.Buffer 11137 io.Copy(&snapshot, ringBuffer) 11138 return &smithy.DeserializationError{ 11139 Err: fmt.Errorf("failed to decode response body, %w", err), 11140 Snapshot: snapshot.Bytes(), 11141 } 11142 } 11143 11144 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11145 err = awsRestxml_deserializeDocumentDelegationSetAlreadyReusable(&output, decoder) 11146 if err != nil { 11147 var snapshot bytes.Buffer 11148 io.Copy(&snapshot, ringBuffer) 11149 return &smithy.DeserializationError{ 11150 Err: fmt.Errorf("failed to decode response body, %w", err), 11151 Snapshot: snapshot.Bytes(), 11152 } 11153 } 11154 11155 return output 11156 } 11157 11158 func awsRestxml_deserializeErrorDelegationSetInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11159 output := &types.DelegationSetInUse{} 11160 var buff [1024]byte 11161 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11162 body := io.TeeReader(errorBody, ringBuffer) 11163 rootDecoder := xml.NewDecoder(body) 11164 t, err := smithyxml.FetchRootElement(rootDecoder) 11165 if err == io.EOF { 11166 return output 11167 } 11168 if err != nil { 11169 var snapshot bytes.Buffer 11170 io.Copy(&snapshot, ringBuffer) 11171 return &smithy.DeserializationError{ 11172 Err: fmt.Errorf("failed to decode response body, %w", err), 11173 Snapshot: snapshot.Bytes(), 11174 } 11175 } 11176 11177 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11178 t, err = decoder.GetElement("Error") 11179 if err != nil { 11180 var snapshot bytes.Buffer 11181 io.Copy(&snapshot, ringBuffer) 11182 return &smithy.DeserializationError{ 11183 Err: fmt.Errorf("failed to decode response body, %w", err), 11184 Snapshot: snapshot.Bytes(), 11185 } 11186 } 11187 11188 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11189 err = awsRestxml_deserializeDocumentDelegationSetInUse(&output, decoder) 11190 if err != nil { 11191 var snapshot bytes.Buffer 11192 io.Copy(&snapshot, ringBuffer) 11193 return &smithy.DeserializationError{ 11194 Err: fmt.Errorf("failed to decode response body, %w", err), 11195 Snapshot: snapshot.Bytes(), 11196 } 11197 } 11198 11199 return output 11200 } 11201 11202 func awsRestxml_deserializeErrorDelegationSetNotAvailable(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11203 output := &types.DelegationSetNotAvailable{} 11204 var buff [1024]byte 11205 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11206 body := io.TeeReader(errorBody, ringBuffer) 11207 rootDecoder := xml.NewDecoder(body) 11208 t, err := smithyxml.FetchRootElement(rootDecoder) 11209 if err == io.EOF { 11210 return output 11211 } 11212 if err != nil { 11213 var snapshot bytes.Buffer 11214 io.Copy(&snapshot, ringBuffer) 11215 return &smithy.DeserializationError{ 11216 Err: fmt.Errorf("failed to decode response body, %w", err), 11217 Snapshot: snapshot.Bytes(), 11218 } 11219 } 11220 11221 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11222 t, err = decoder.GetElement("Error") 11223 if err != nil { 11224 var snapshot bytes.Buffer 11225 io.Copy(&snapshot, ringBuffer) 11226 return &smithy.DeserializationError{ 11227 Err: fmt.Errorf("failed to decode response body, %w", err), 11228 Snapshot: snapshot.Bytes(), 11229 } 11230 } 11231 11232 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11233 err = awsRestxml_deserializeDocumentDelegationSetNotAvailable(&output, decoder) 11234 if err != nil { 11235 var snapshot bytes.Buffer 11236 io.Copy(&snapshot, ringBuffer) 11237 return &smithy.DeserializationError{ 11238 Err: fmt.Errorf("failed to decode response body, %w", err), 11239 Snapshot: snapshot.Bytes(), 11240 } 11241 } 11242 11243 return output 11244 } 11245 11246 func awsRestxml_deserializeErrorDelegationSetNotReusable(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11247 output := &types.DelegationSetNotReusable{} 11248 var buff [1024]byte 11249 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11250 body := io.TeeReader(errorBody, ringBuffer) 11251 rootDecoder := xml.NewDecoder(body) 11252 t, err := smithyxml.FetchRootElement(rootDecoder) 11253 if err == io.EOF { 11254 return output 11255 } 11256 if err != nil { 11257 var snapshot bytes.Buffer 11258 io.Copy(&snapshot, ringBuffer) 11259 return &smithy.DeserializationError{ 11260 Err: fmt.Errorf("failed to decode response body, %w", err), 11261 Snapshot: snapshot.Bytes(), 11262 } 11263 } 11264 11265 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11266 t, err = decoder.GetElement("Error") 11267 if err != nil { 11268 var snapshot bytes.Buffer 11269 io.Copy(&snapshot, ringBuffer) 11270 return &smithy.DeserializationError{ 11271 Err: fmt.Errorf("failed to decode response body, %w", err), 11272 Snapshot: snapshot.Bytes(), 11273 } 11274 } 11275 11276 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11277 err = awsRestxml_deserializeDocumentDelegationSetNotReusable(&output, decoder) 11278 if err != nil { 11279 var snapshot bytes.Buffer 11280 io.Copy(&snapshot, ringBuffer) 11281 return &smithy.DeserializationError{ 11282 Err: fmt.Errorf("failed to decode response body, %w", err), 11283 Snapshot: snapshot.Bytes(), 11284 } 11285 } 11286 11287 return output 11288 } 11289 11290 func awsRestxml_deserializeErrorDNSSECNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11291 output := &types.DNSSECNotFound{} 11292 var buff [1024]byte 11293 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11294 body := io.TeeReader(errorBody, ringBuffer) 11295 rootDecoder := xml.NewDecoder(body) 11296 t, err := smithyxml.FetchRootElement(rootDecoder) 11297 if err == io.EOF { 11298 return output 11299 } 11300 if err != nil { 11301 var snapshot bytes.Buffer 11302 io.Copy(&snapshot, ringBuffer) 11303 return &smithy.DeserializationError{ 11304 Err: fmt.Errorf("failed to decode response body, %w", err), 11305 Snapshot: snapshot.Bytes(), 11306 } 11307 } 11308 11309 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11310 t, err = decoder.GetElement("Error") 11311 if err != nil { 11312 var snapshot bytes.Buffer 11313 io.Copy(&snapshot, ringBuffer) 11314 return &smithy.DeserializationError{ 11315 Err: fmt.Errorf("failed to decode response body, %w", err), 11316 Snapshot: snapshot.Bytes(), 11317 } 11318 } 11319 11320 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11321 err = awsRestxml_deserializeDocumentDNSSECNotFound(&output, decoder) 11322 if err != nil { 11323 var snapshot bytes.Buffer 11324 io.Copy(&snapshot, ringBuffer) 11325 return &smithy.DeserializationError{ 11326 Err: fmt.Errorf("failed to decode response body, %w", err), 11327 Snapshot: snapshot.Bytes(), 11328 } 11329 } 11330 11331 return output 11332 } 11333 11334 func awsRestxml_deserializeErrorHealthCheckAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11335 output := &types.HealthCheckAlreadyExists{} 11336 var buff [1024]byte 11337 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11338 body := io.TeeReader(errorBody, ringBuffer) 11339 rootDecoder := xml.NewDecoder(body) 11340 t, err := smithyxml.FetchRootElement(rootDecoder) 11341 if err == io.EOF { 11342 return output 11343 } 11344 if err != nil { 11345 var snapshot bytes.Buffer 11346 io.Copy(&snapshot, ringBuffer) 11347 return &smithy.DeserializationError{ 11348 Err: fmt.Errorf("failed to decode response body, %w", err), 11349 Snapshot: snapshot.Bytes(), 11350 } 11351 } 11352 11353 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11354 t, err = decoder.GetElement("Error") 11355 if err != nil { 11356 var snapshot bytes.Buffer 11357 io.Copy(&snapshot, ringBuffer) 11358 return &smithy.DeserializationError{ 11359 Err: fmt.Errorf("failed to decode response body, %w", err), 11360 Snapshot: snapshot.Bytes(), 11361 } 11362 } 11363 11364 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11365 err = awsRestxml_deserializeDocumentHealthCheckAlreadyExists(&output, decoder) 11366 if err != nil { 11367 var snapshot bytes.Buffer 11368 io.Copy(&snapshot, ringBuffer) 11369 return &smithy.DeserializationError{ 11370 Err: fmt.Errorf("failed to decode response body, %w", err), 11371 Snapshot: snapshot.Bytes(), 11372 } 11373 } 11374 11375 return output 11376 } 11377 11378 func awsRestxml_deserializeErrorHealthCheckInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11379 output := &types.HealthCheckInUse{} 11380 var buff [1024]byte 11381 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11382 body := io.TeeReader(errorBody, ringBuffer) 11383 rootDecoder := xml.NewDecoder(body) 11384 t, err := smithyxml.FetchRootElement(rootDecoder) 11385 if err == io.EOF { 11386 return output 11387 } 11388 if err != nil { 11389 var snapshot bytes.Buffer 11390 io.Copy(&snapshot, ringBuffer) 11391 return &smithy.DeserializationError{ 11392 Err: fmt.Errorf("failed to decode response body, %w", err), 11393 Snapshot: snapshot.Bytes(), 11394 } 11395 } 11396 11397 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11398 t, err = decoder.GetElement("Error") 11399 if err != nil { 11400 var snapshot bytes.Buffer 11401 io.Copy(&snapshot, ringBuffer) 11402 return &smithy.DeserializationError{ 11403 Err: fmt.Errorf("failed to decode response body, %w", err), 11404 Snapshot: snapshot.Bytes(), 11405 } 11406 } 11407 11408 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11409 err = awsRestxml_deserializeDocumentHealthCheckInUse(&output, decoder) 11410 if err != nil { 11411 var snapshot bytes.Buffer 11412 io.Copy(&snapshot, ringBuffer) 11413 return &smithy.DeserializationError{ 11414 Err: fmt.Errorf("failed to decode response body, %w", err), 11415 Snapshot: snapshot.Bytes(), 11416 } 11417 } 11418 11419 return output 11420 } 11421 11422 func awsRestxml_deserializeErrorHealthCheckVersionMismatch(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11423 output := &types.HealthCheckVersionMismatch{} 11424 var buff [1024]byte 11425 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11426 body := io.TeeReader(errorBody, ringBuffer) 11427 rootDecoder := xml.NewDecoder(body) 11428 t, err := smithyxml.FetchRootElement(rootDecoder) 11429 if err == io.EOF { 11430 return output 11431 } 11432 if err != nil { 11433 var snapshot bytes.Buffer 11434 io.Copy(&snapshot, ringBuffer) 11435 return &smithy.DeserializationError{ 11436 Err: fmt.Errorf("failed to decode response body, %w", err), 11437 Snapshot: snapshot.Bytes(), 11438 } 11439 } 11440 11441 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11442 t, err = decoder.GetElement("Error") 11443 if err != nil { 11444 var snapshot bytes.Buffer 11445 io.Copy(&snapshot, ringBuffer) 11446 return &smithy.DeserializationError{ 11447 Err: fmt.Errorf("failed to decode response body, %w", err), 11448 Snapshot: snapshot.Bytes(), 11449 } 11450 } 11451 11452 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11453 err = awsRestxml_deserializeDocumentHealthCheckVersionMismatch(&output, decoder) 11454 if err != nil { 11455 var snapshot bytes.Buffer 11456 io.Copy(&snapshot, ringBuffer) 11457 return &smithy.DeserializationError{ 11458 Err: fmt.Errorf("failed to decode response body, %w", err), 11459 Snapshot: snapshot.Bytes(), 11460 } 11461 } 11462 11463 return output 11464 } 11465 11466 func awsRestxml_deserializeErrorHostedZoneAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11467 output := &types.HostedZoneAlreadyExists{} 11468 var buff [1024]byte 11469 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11470 body := io.TeeReader(errorBody, ringBuffer) 11471 rootDecoder := xml.NewDecoder(body) 11472 t, err := smithyxml.FetchRootElement(rootDecoder) 11473 if err == io.EOF { 11474 return output 11475 } 11476 if err != nil { 11477 var snapshot bytes.Buffer 11478 io.Copy(&snapshot, ringBuffer) 11479 return &smithy.DeserializationError{ 11480 Err: fmt.Errorf("failed to decode response body, %w", err), 11481 Snapshot: snapshot.Bytes(), 11482 } 11483 } 11484 11485 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11486 t, err = decoder.GetElement("Error") 11487 if err != nil { 11488 var snapshot bytes.Buffer 11489 io.Copy(&snapshot, ringBuffer) 11490 return &smithy.DeserializationError{ 11491 Err: fmt.Errorf("failed to decode response body, %w", err), 11492 Snapshot: snapshot.Bytes(), 11493 } 11494 } 11495 11496 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11497 err = awsRestxml_deserializeDocumentHostedZoneAlreadyExists(&output, decoder) 11498 if err != nil { 11499 var snapshot bytes.Buffer 11500 io.Copy(&snapshot, ringBuffer) 11501 return &smithy.DeserializationError{ 11502 Err: fmt.Errorf("failed to decode response body, %w", err), 11503 Snapshot: snapshot.Bytes(), 11504 } 11505 } 11506 11507 return output 11508 } 11509 11510 func awsRestxml_deserializeErrorHostedZoneNotEmpty(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11511 output := &types.HostedZoneNotEmpty{} 11512 var buff [1024]byte 11513 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11514 body := io.TeeReader(errorBody, ringBuffer) 11515 rootDecoder := xml.NewDecoder(body) 11516 t, err := smithyxml.FetchRootElement(rootDecoder) 11517 if err == io.EOF { 11518 return output 11519 } 11520 if err != nil { 11521 var snapshot bytes.Buffer 11522 io.Copy(&snapshot, ringBuffer) 11523 return &smithy.DeserializationError{ 11524 Err: fmt.Errorf("failed to decode response body, %w", err), 11525 Snapshot: snapshot.Bytes(), 11526 } 11527 } 11528 11529 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11530 t, err = decoder.GetElement("Error") 11531 if err != nil { 11532 var snapshot bytes.Buffer 11533 io.Copy(&snapshot, ringBuffer) 11534 return &smithy.DeserializationError{ 11535 Err: fmt.Errorf("failed to decode response body, %w", err), 11536 Snapshot: snapshot.Bytes(), 11537 } 11538 } 11539 11540 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11541 err = awsRestxml_deserializeDocumentHostedZoneNotEmpty(&output, decoder) 11542 if err != nil { 11543 var snapshot bytes.Buffer 11544 io.Copy(&snapshot, ringBuffer) 11545 return &smithy.DeserializationError{ 11546 Err: fmt.Errorf("failed to decode response body, %w", err), 11547 Snapshot: snapshot.Bytes(), 11548 } 11549 } 11550 11551 return output 11552 } 11553 11554 func awsRestxml_deserializeErrorHostedZoneNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11555 output := &types.HostedZoneNotFound{} 11556 var buff [1024]byte 11557 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11558 body := io.TeeReader(errorBody, ringBuffer) 11559 rootDecoder := xml.NewDecoder(body) 11560 t, err := smithyxml.FetchRootElement(rootDecoder) 11561 if err == io.EOF { 11562 return output 11563 } 11564 if err != nil { 11565 var snapshot bytes.Buffer 11566 io.Copy(&snapshot, ringBuffer) 11567 return &smithy.DeserializationError{ 11568 Err: fmt.Errorf("failed to decode response body, %w", err), 11569 Snapshot: snapshot.Bytes(), 11570 } 11571 } 11572 11573 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11574 t, err = decoder.GetElement("Error") 11575 if err != nil { 11576 var snapshot bytes.Buffer 11577 io.Copy(&snapshot, ringBuffer) 11578 return &smithy.DeserializationError{ 11579 Err: fmt.Errorf("failed to decode response body, %w", err), 11580 Snapshot: snapshot.Bytes(), 11581 } 11582 } 11583 11584 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11585 err = awsRestxml_deserializeDocumentHostedZoneNotFound(&output, decoder) 11586 if err != nil { 11587 var snapshot bytes.Buffer 11588 io.Copy(&snapshot, ringBuffer) 11589 return &smithy.DeserializationError{ 11590 Err: fmt.Errorf("failed to decode response body, %w", err), 11591 Snapshot: snapshot.Bytes(), 11592 } 11593 } 11594 11595 return output 11596 } 11597 11598 func awsRestxml_deserializeErrorHostedZoneNotPrivate(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11599 output := &types.HostedZoneNotPrivate{} 11600 var buff [1024]byte 11601 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11602 body := io.TeeReader(errorBody, ringBuffer) 11603 rootDecoder := xml.NewDecoder(body) 11604 t, err := smithyxml.FetchRootElement(rootDecoder) 11605 if err == io.EOF { 11606 return output 11607 } 11608 if err != nil { 11609 var snapshot bytes.Buffer 11610 io.Copy(&snapshot, ringBuffer) 11611 return &smithy.DeserializationError{ 11612 Err: fmt.Errorf("failed to decode response body, %w", err), 11613 Snapshot: snapshot.Bytes(), 11614 } 11615 } 11616 11617 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11618 t, err = decoder.GetElement("Error") 11619 if err != nil { 11620 var snapshot bytes.Buffer 11621 io.Copy(&snapshot, ringBuffer) 11622 return &smithy.DeserializationError{ 11623 Err: fmt.Errorf("failed to decode response body, %w", err), 11624 Snapshot: snapshot.Bytes(), 11625 } 11626 } 11627 11628 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11629 err = awsRestxml_deserializeDocumentHostedZoneNotPrivate(&output, decoder) 11630 if err != nil { 11631 var snapshot bytes.Buffer 11632 io.Copy(&snapshot, ringBuffer) 11633 return &smithy.DeserializationError{ 11634 Err: fmt.Errorf("failed to decode response body, %w", err), 11635 Snapshot: snapshot.Bytes(), 11636 } 11637 } 11638 11639 return output 11640 } 11641 11642 func awsRestxml_deserializeErrorHostedZonePartiallyDelegated(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11643 output := &types.HostedZonePartiallyDelegated{} 11644 var buff [1024]byte 11645 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11646 body := io.TeeReader(errorBody, ringBuffer) 11647 rootDecoder := xml.NewDecoder(body) 11648 t, err := smithyxml.FetchRootElement(rootDecoder) 11649 if err == io.EOF { 11650 return output 11651 } 11652 if err != nil { 11653 var snapshot bytes.Buffer 11654 io.Copy(&snapshot, ringBuffer) 11655 return &smithy.DeserializationError{ 11656 Err: fmt.Errorf("failed to decode response body, %w", err), 11657 Snapshot: snapshot.Bytes(), 11658 } 11659 } 11660 11661 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11662 t, err = decoder.GetElement("Error") 11663 if err != nil { 11664 var snapshot bytes.Buffer 11665 io.Copy(&snapshot, ringBuffer) 11666 return &smithy.DeserializationError{ 11667 Err: fmt.Errorf("failed to decode response body, %w", err), 11668 Snapshot: snapshot.Bytes(), 11669 } 11670 } 11671 11672 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11673 err = awsRestxml_deserializeDocumentHostedZonePartiallyDelegated(&output, decoder) 11674 if err != nil { 11675 var snapshot bytes.Buffer 11676 io.Copy(&snapshot, ringBuffer) 11677 return &smithy.DeserializationError{ 11678 Err: fmt.Errorf("failed to decode response body, %w", err), 11679 Snapshot: snapshot.Bytes(), 11680 } 11681 } 11682 11683 return output 11684 } 11685 11686 func awsRestxml_deserializeErrorIncompatibleVersion(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11687 output := &types.IncompatibleVersion{} 11688 var buff [1024]byte 11689 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11690 body := io.TeeReader(errorBody, ringBuffer) 11691 rootDecoder := xml.NewDecoder(body) 11692 t, err := smithyxml.FetchRootElement(rootDecoder) 11693 if err == io.EOF { 11694 return output 11695 } 11696 if err != nil { 11697 var snapshot bytes.Buffer 11698 io.Copy(&snapshot, ringBuffer) 11699 return &smithy.DeserializationError{ 11700 Err: fmt.Errorf("failed to decode response body, %w", err), 11701 Snapshot: snapshot.Bytes(), 11702 } 11703 } 11704 11705 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11706 t, err = decoder.GetElement("Error") 11707 if err != nil { 11708 var snapshot bytes.Buffer 11709 io.Copy(&snapshot, ringBuffer) 11710 return &smithy.DeserializationError{ 11711 Err: fmt.Errorf("failed to decode response body, %w", err), 11712 Snapshot: snapshot.Bytes(), 11713 } 11714 } 11715 11716 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11717 err = awsRestxml_deserializeDocumentIncompatibleVersion(&output, decoder) 11718 if err != nil { 11719 var snapshot bytes.Buffer 11720 io.Copy(&snapshot, ringBuffer) 11721 return &smithy.DeserializationError{ 11722 Err: fmt.Errorf("failed to decode response body, %w", err), 11723 Snapshot: snapshot.Bytes(), 11724 } 11725 } 11726 11727 return output 11728 } 11729 11730 func awsRestxml_deserializeErrorInsufficientCloudWatchLogsResourcePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11731 output := &types.InsufficientCloudWatchLogsResourcePolicy{} 11732 var buff [1024]byte 11733 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11734 body := io.TeeReader(errorBody, ringBuffer) 11735 rootDecoder := xml.NewDecoder(body) 11736 t, err := smithyxml.FetchRootElement(rootDecoder) 11737 if err == io.EOF { 11738 return output 11739 } 11740 if err != nil { 11741 var snapshot bytes.Buffer 11742 io.Copy(&snapshot, ringBuffer) 11743 return &smithy.DeserializationError{ 11744 Err: fmt.Errorf("failed to decode response body, %w", err), 11745 Snapshot: snapshot.Bytes(), 11746 } 11747 } 11748 11749 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11750 t, err = decoder.GetElement("Error") 11751 if err != nil { 11752 var snapshot bytes.Buffer 11753 io.Copy(&snapshot, ringBuffer) 11754 return &smithy.DeserializationError{ 11755 Err: fmt.Errorf("failed to decode response body, %w", err), 11756 Snapshot: snapshot.Bytes(), 11757 } 11758 } 11759 11760 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11761 err = awsRestxml_deserializeDocumentInsufficientCloudWatchLogsResourcePolicy(&output, decoder) 11762 if err != nil { 11763 var snapshot bytes.Buffer 11764 io.Copy(&snapshot, ringBuffer) 11765 return &smithy.DeserializationError{ 11766 Err: fmt.Errorf("failed to decode response body, %w", err), 11767 Snapshot: snapshot.Bytes(), 11768 } 11769 } 11770 11771 return output 11772 } 11773 11774 func awsRestxml_deserializeErrorInvalidArgument(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11775 output := &types.InvalidArgument{} 11776 var buff [1024]byte 11777 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11778 body := io.TeeReader(errorBody, ringBuffer) 11779 rootDecoder := xml.NewDecoder(body) 11780 t, err := smithyxml.FetchRootElement(rootDecoder) 11781 if err == io.EOF { 11782 return output 11783 } 11784 if err != nil { 11785 var snapshot bytes.Buffer 11786 io.Copy(&snapshot, ringBuffer) 11787 return &smithy.DeserializationError{ 11788 Err: fmt.Errorf("failed to decode response body, %w", err), 11789 Snapshot: snapshot.Bytes(), 11790 } 11791 } 11792 11793 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11794 t, err = decoder.GetElement("Error") 11795 if err != nil { 11796 var snapshot bytes.Buffer 11797 io.Copy(&snapshot, ringBuffer) 11798 return &smithy.DeserializationError{ 11799 Err: fmt.Errorf("failed to decode response body, %w", err), 11800 Snapshot: snapshot.Bytes(), 11801 } 11802 } 11803 11804 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11805 err = awsRestxml_deserializeDocumentInvalidArgument(&output, decoder) 11806 if err != nil { 11807 var snapshot bytes.Buffer 11808 io.Copy(&snapshot, ringBuffer) 11809 return &smithy.DeserializationError{ 11810 Err: fmt.Errorf("failed to decode response body, %w", err), 11811 Snapshot: snapshot.Bytes(), 11812 } 11813 } 11814 11815 return output 11816 } 11817 11818 func awsRestxml_deserializeErrorInvalidChangeBatch(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11819 output := &types.InvalidChangeBatch{} 11820 var buff [1024]byte 11821 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11822 body := io.TeeReader(errorBody, ringBuffer) 11823 rootDecoder := xml.NewDecoder(body) 11824 t, err := smithyxml.FetchRootElement(rootDecoder) 11825 if err == io.EOF { 11826 return output 11827 } 11828 if err != nil { 11829 var snapshot bytes.Buffer 11830 io.Copy(&snapshot, ringBuffer) 11831 return &smithy.DeserializationError{ 11832 Err: fmt.Errorf("failed to decode response body, %w", err), 11833 Snapshot: snapshot.Bytes(), 11834 } 11835 } 11836 11837 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11838 t, err = decoder.GetElement("Error") 11839 if err != nil { 11840 var snapshot bytes.Buffer 11841 io.Copy(&snapshot, ringBuffer) 11842 return &smithy.DeserializationError{ 11843 Err: fmt.Errorf("failed to decode response body, %w", err), 11844 Snapshot: snapshot.Bytes(), 11845 } 11846 } 11847 11848 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11849 err = awsRestxml_deserializeDocumentInvalidChangeBatch(&output, decoder) 11850 if err != nil { 11851 var snapshot bytes.Buffer 11852 io.Copy(&snapshot, ringBuffer) 11853 return &smithy.DeserializationError{ 11854 Err: fmt.Errorf("failed to decode response body, %w", err), 11855 Snapshot: snapshot.Bytes(), 11856 } 11857 } 11858 11859 return output 11860 } 11861 11862 func awsRestxml_deserializeErrorInvalidDomainName(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11863 output := &types.InvalidDomainName{} 11864 var buff [1024]byte 11865 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11866 body := io.TeeReader(errorBody, ringBuffer) 11867 rootDecoder := xml.NewDecoder(body) 11868 t, err := smithyxml.FetchRootElement(rootDecoder) 11869 if err == io.EOF { 11870 return output 11871 } 11872 if err != nil { 11873 var snapshot bytes.Buffer 11874 io.Copy(&snapshot, ringBuffer) 11875 return &smithy.DeserializationError{ 11876 Err: fmt.Errorf("failed to decode response body, %w", err), 11877 Snapshot: snapshot.Bytes(), 11878 } 11879 } 11880 11881 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11882 t, err = decoder.GetElement("Error") 11883 if err != nil { 11884 var snapshot bytes.Buffer 11885 io.Copy(&snapshot, ringBuffer) 11886 return &smithy.DeserializationError{ 11887 Err: fmt.Errorf("failed to decode response body, %w", err), 11888 Snapshot: snapshot.Bytes(), 11889 } 11890 } 11891 11892 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11893 err = awsRestxml_deserializeDocumentInvalidDomainName(&output, decoder) 11894 if err != nil { 11895 var snapshot bytes.Buffer 11896 io.Copy(&snapshot, ringBuffer) 11897 return &smithy.DeserializationError{ 11898 Err: fmt.Errorf("failed to decode response body, %w", err), 11899 Snapshot: snapshot.Bytes(), 11900 } 11901 } 11902 11903 return output 11904 } 11905 11906 func awsRestxml_deserializeErrorInvalidInput(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11907 output := &types.InvalidInput{} 11908 var buff [1024]byte 11909 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11910 body := io.TeeReader(errorBody, ringBuffer) 11911 rootDecoder := xml.NewDecoder(body) 11912 t, err := smithyxml.FetchRootElement(rootDecoder) 11913 if err == io.EOF { 11914 return output 11915 } 11916 if err != nil { 11917 var snapshot bytes.Buffer 11918 io.Copy(&snapshot, ringBuffer) 11919 return &smithy.DeserializationError{ 11920 Err: fmt.Errorf("failed to decode response body, %w", err), 11921 Snapshot: snapshot.Bytes(), 11922 } 11923 } 11924 11925 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11926 t, err = decoder.GetElement("Error") 11927 if err != nil { 11928 var snapshot bytes.Buffer 11929 io.Copy(&snapshot, ringBuffer) 11930 return &smithy.DeserializationError{ 11931 Err: fmt.Errorf("failed to decode response body, %w", err), 11932 Snapshot: snapshot.Bytes(), 11933 } 11934 } 11935 11936 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11937 err = awsRestxml_deserializeDocumentInvalidInput(&output, decoder) 11938 if err != nil { 11939 var snapshot bytes.Buffer 11940 io.Copy(&snapshot, ringBuffer) 11941 return &smithy.DeserializationError{ 11942 Err: fmt.Errorf("failed to decode response body, %w", err), 11943 Snapshot: snapshot.Bytes(), 11944 } 11945 } 11946 11947 return output 11948 } 11949 11950 func awsRestxml_deserializeErrorInvalidKeySigningKeyName(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11951 output := &types.InvalidKeySigningKeyName{} 11952 var buff [1024]byte 11953 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11954 body := io.TeeReader(errorBody, ringBuffer) 11955 rootDecoder := xml.NewDecoder(body) 11956 t, err := smithyxml.FetchRootElement(rootDecoder) 11957 if err == io.EOF { 11958 return output 11959 } 11960 if err != nil { 11961 var snapshot bytes.Buffer 11962 io.Copy(&snapshot, ringBuffer) 11963 return &smithy.DeserializationError{ 11964 Err: fmt.Errorf("failed to decode response body, %w", err), 11965 Snapshot: snapshot.Bytes(), 11966 } 11967 } 11968 11969 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 11970 t, err = decoder.GetElement("Error") 11971 if err != nil { 11972 var snapshot bytes.Buffer 11973 io.Copy(&snapshot, ringBuffer) 11974 return &smithy.DeserializationError{ 11975 Err: fmt.Errorf("failed to decode response body, %w", err), 11976 Snapshot: snapshot.Bytes(), 11977 } 11978 } 11979 11980 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 11981 err = awsRestxml_deserializeDocumentInvalidKeySigningKeyName(&output, decoder) 11982 if err != nil { 11983 var snapshot bytes.Buffer 11984 io.Copy(&snapshot, ringBuffer) 11985 return &smithy.DeserializationError{ 11986 Err: fmt.Errorf("failed to decode response body, %w", err), 11987 Snapshot: snapshot.Bytes(), 11988 } 11989 } 11990 11991 return output 11992 } 11993 11994 func awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response *smithyhttp.Response, errorBody *bytes.Reader) error { 11995 output := &types.InvalidKeySigningKeyStatus{} 11996 var buff [1024]byte 11997 ringBuffer := smithyio.NewRingBuffer(buff[:]) 11998 body := io.TeeReader(errorBody, ringBuffer) 11999 rootDecoder := xml.NewDecoder(body) 12000 t, err := smithyxml.FetchRootElement(rootDecoder) 12001 if err == io.EOF { 12002 return output 12003 } 12004 if err != nil { 12005 var snapshot bytes.Buffer 12006 io.Copy(&snapshot, ringBuffer) 12007 return &smithy.DeserializationError{ 12008 Err: fmt.Errorf("failed to decode response body, %w", err), 12009 Snapshot: snapshot.Bytes(), 12010 } 12011 } 12012 12013 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12014 t, err = decoder.GetElement("Error") 12015 if err != nil { 12016 var snapshot bytes.Buffer 12017 io.Copy(&snapshot, ringBuffer) 12018 return &smithy.DeserializationError{ 12019 Err: fmt.Errorf("failed to decode response body, %w", err), 12020 Snapshot: snapshot.Bytes(), 12021 } 12022 } 12023 12024 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12025 err = awsRestxml_deserializeDocumentInvalidKeySigningKeyStatus(&output, decoder) 12026 if err != nil { 12027 var snapshot bytes.Buffer 12028 io.Copy(&snapshot, ringBuffer) 12029 return &smithy.DeserializationError{ 12030 Err: fmt.Errorf("failed to decode response body, %w", err), 12031 Snapshot: snapshot.Bytes(), 12032 } 12033 } 12034 12035 return output 12036 } 12037 12038 func awsRestxml_deserializeErrorInvalidKMSArn(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12039 output := &types.InvalidKMSArn{} 12040 var buff [1024]byte 12041 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12042 body := io.TeeReader(errorBody, ringBuffer) 12043 rootDecoder := xml.NewDecoder(body) 12044 t, err := smithyxml.FetchRootElement(rootDecoder) 12045 if err == io.EOF { 12046 return output 12047 } 12048 if err != nil { 12049 var snapshot bytes.Buffer 12050 io.Copy(&snapshot, ringBuffer) 12051 return &smithy.DeserializationError{ 12052 Err: fmt.Errorf("failed to decode response body, %w", err), 12053 Snapshot: snapshot.Bytes(), 12054 } 12055 } 12056 12057 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12058 t, err = decoder.GetElement("Error") 12059 if err != nil { 12060 var snapshot bytes.Buffer 12061 io.Copy(&snapshot, ringBuffer) 12062 return &smithy.DeserializationError{ 12063 Err: fmt.Errorf("failed to decode response body, %w", err), 12064 Snapshot: snapshot.Bytes(), 12065 } 12066 } 12067 12068 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12069 err = awsRestxml_deserializeDocumentInvalidKMSArn(&output, decoder) 12070 if err != nil { 12071 var snapshot bytes.Buffer 12072 io.Copy(&snapshot, ringBuffer) 12073 return &smithy.DeserializationError{ 12074 Err: fmt.Errorf("failed to decode response body, %w", err), 12075 Snapshot: snapshot.Bytes(), 12076 } 12077 } 12078 12079 return output 12080 } 12081 12082 func awsRestxml_deserializeErrorInvalidPaginationToken(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12083 output := &types.InvalidPaginationToken{} 12084 var buff [1024]byte 12085 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12086 body := io.TeeReader(errorBody, ringBuffer) 12087 rootDecoder := xml.NewDecoder(body) 12088 t, err := smithyxml.FetchRootElement(rootDecoder) 12089 if err == io.EOF { 12090 return output 12091 } 12092 if err != nil { 12093 var snapshot bytes.Buffer 12094 io.Copy(&snapshot, ringBuffer) 12095 return &smithy.DeserializationError{ 12096 Err: fmt.Errorf("failed to decode response body, %w", err), 12097 Snapshot: snapshot.Bytes(), 12098 } 12099 } 12100 12101 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12102 t, err = decoder.GetElement("Error") 12103 if err != nil { 12104 var snapshot bytes.Buffer 12105 io.Copy(&snapshot, ringBuffer) 12106 return &smithy.DeserializationError{ 12107 Err: fmt.Errorf("failed to decode response body, %w", err), 12108 Snapshot: snapshot.Bytes(), 12109 } 12110 } 12111 12112 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12113 err = awsRestxml_deserializeDocumentInvalidPaginationToken(&output, decoder) 12114 if err != nil { 12115 var snapshot bytes.Buffer 12116 io.Copy(&snapshot, ringBuffer) 12117 return &smithy.DeserializationError{ 12118 Err: fmt.Errorf("failed to decode response body, %w", err), 12119 Snapshot: snapshot.Bytes(), 12120 } 12121 } 12122 12123 return output 12124 } 12125 12126 func awsRestxml_deserializeErrorInvalidSigningStatus(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12127 output := &types.InvalidSigningStatus{} 12128 var buff [1024]byte 12129 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12130 body := io.TeeReader(errorBody, ringBuffer) 12131 rootDecoder := xml.NewDecoder(body) 12132 t, err := smithyxml.FetchRootElement(rootDecoder) 12133 if err == io.EOF { 12134 return output 12135 } 12136 if err != nil { 12137 var snapshot bytes.Buffer 12138 io.Copy(&snapshot, ringBuffer) 12139 return &smithy.DeserializationError{ 12140 Err: fmt.Errorf("failed to decode response body, %w", err), 12141 Snapshot: snapshot.Bytes(), 12142 } 12143 } 12144 12145 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12146 t, err = decoder.GetElement("Error") 12147 if err != nil { 12148 var snapshot bytes.Buffer 12149 io.Copy(&snapshot, ringBuffer) 12150 return &smithy.DeserializationError{ 12151 Err: fmt.Errorf("failed to decode response body, %w", err), 12152 Snapshot: snapshot.Bytes(), 12153 } 12154 } 12155 12156 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12157 err = awsRestxml_deserializeDocumentInvalidSigningStatus(&output, decoder) 12158 if err != nil { 12159 var snapshot bytes.Buffer 12160 io.Copy(&snapshot, ringBuffer) 12161 return &smithy.DeserializationError{ 12162 Err: fmt.Errorf("failed to decode response body, %w", err), 12163 Snapshot: snapshot.Bytes(), 12164 } 12165 } 12166 12167 return output 12168 } 12169 12170 func awsRestxml_deserializeErrorInvalidTrafficPolicyDocument(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12171 output := &types.InvalidTrafficPolicyDocument{} 12172 var buff [1024]byte 12173 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12174 body := io.TeeReader(errorBody, ringBuffer) 12175 rootDecoder := xml.NewDecoder(body) 12176 t, err := smithyxml.FetchRootElement(rootDecoder) 12177 if err == io.EOF { 12178 return output 12179 } 12180 if err != nil { 12181 var snapshot bytes.Buffer 12182 io.Copy(&snapshot, ringBuffer) 12183 return &smithy.DeserializationError{ 12184 Err: fmt.Errorf("failed to decode response body, %w", err), 12185 Snapshot: snapshot.Bytes(), 12186 } 12187 } 12188 12189 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12190 t, err = decoder.GetElement("Error") 12191 if err != nil { 12192 var snapshot bytes.Buffer 12193 io.Copy(&snapshot, ringBuffer) 12194 return &smithy.DeserializationError{ 12195 Err: fmt.Errorf("failed to decode response body, %w", err), 12196 Snapshot: snapshot.Bytes(), 12197 } 12198 } 12199 12200 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12201 err = awsRestxml_deserializeDocumentInvalidTrafficPolicyDocument(&output, decoder) 12202 if err != nil { 12203 var snapshot bytes.Buffer 12204 io.Copy(&snapshot, ringBuffer) 12205 return &smithy.DeserializationError{ 12206 Err: fmt.Errorf("failed to decode response body, %w", err), 12207 Snapshot: snapshot.Bytes(), 12208 } 12209 } 12210 12211 return output 12212 } 12213 12214 func awsRestxml_deserializeErrorInvalidVPCId(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12215 output := &types.InvalidVPCId{} 12216 var buff [1024]byte 12217 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12218 body := io.TeeReader(errorBody, ringBuffer) 12219 rootDecoder := xml.NewDecoder(body) 12220 t, err := smithyxml.FetchRootElement(rootDecoder) 12221 if err == io.EOF { 12222 return output 12223 } 12224 if err != nil { 12225 var snapshot bytes.Buffer 12226 io.Copy(&snapshot, ringBuffer) 12227 return &smithy.DeserializationError{ 12228 Err: fmt.Errorf("failed to decode response body, %w", err), 12229 Snapshot: snapshot.Bytes(), 12230 } 12231 } 12232 12233 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12234 t, err = decoder.GetElement("Error") 12235 if err != nil { 12236 var snapshot bytes.Buffer 12237 io.Copy(&snapshot, ringBuffer) 12238 return &smithy.DeserializationError{ 12239 Err: fmt.Errorf("failed to decode response body, %w", err), 12240 Snapshot: snapshot.Bytes(), 12241 } 12242 } 12243 12244 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12245 err = awsRestxml_deserializeDocumentInvalidVPCId(&output, decoder) 12246 if err != nil { 12247 var snapshot bytes.Buffer 12248 io.Copy(&snapshot, ringBuffer) 12249 return &smithy.DeserializationError{ 12250 Err: fmt.Errorf("failed to decode response body, %w", err), 12251 Snapshot: snapshot.Bytes(), 12252 } 12253 } 12254 12255 return output 12256 } 12257 12258 func awsRestxml_deserializeErrorKeySigningKeyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12259 output := &types.KeySigningKeyAlreadyExists{} 12260 var buff [1024]byte 12261 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12262 body := io.TeeReader(errorBody, ringBuffer) 12263 rootDecoder := xml.NewDecoder(body) 12264 t, err := smithyxml.FetchRootElement(rootDecoder) 12265 if err == io.EOF { 12266 return output 12267 } 12268 if err != nil { 12269 var snapshot bytes.Buffer 12270 io.Copy(&snapshot, ringBuffer) 12271 return &smithy.DeserializationError{ 12272 Err: fmt.Errorf("failed to decode response body, %w", err), 12273 Snapshot: snapshot.Bytes(), 12274 } 12275 } 12276 12277 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12278 t, err = decoder.GetElement("Error") 12279 if err != nil { 12280 var snapshot bytes.Buffer 12281 io.Copy(&snapshot, ringBuffer) 12282 return &smithy.DeserializationError{ 12283 Err: fmt.Errorf("failed to decode response body, %w", err), 12284 Snapshot: snapshot.Bytes(), 12285 } 12286 } 12287 12288 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12289 err = awsRestxml_deserializeDocumentKeySigningKeyAlreadyExists(&output, decoder) 12290 if err != nil { 12291 var snapshot bytes.Buffer 12292 io.Copy(&snapshot, ringBuffer) 12293 return &smithy.DeserializationError{ 12294 Err: fmt.Errorf("failed to decode response body, %w", err), 12295 Snapshot: snapshot.Bytes(), 12296 } 12297 } 12298 12299 return output 12300 } 12301 12302 func awsRestxml_deserializeErrorKeySigningKeyInParentDSRecord(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12303 output := &types.KeySigningKeyInParentDSRecord{} 12304 var buff [1024]byte 12305 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12306 body := io.TeeReader(errorBody, ringBuffer) 12307 rootDecoder := xml.NewDecoder(body) 12308 t, err := smithyxml.FetchRootElement(rootDecoder) 12309 if err == io.EOF { 12310 return output 12311 } 12312 if err != nil { 12313 var snapshot bytes.Buffer 12314 io.Copy(&snapshot, ringBuffer) 12315 return &smithy.DeserializationError{ 12316 Err: fmt.Errorf("failed to decode response body, %w", err), 12317 Snapshot: snapshot.Bytes(), 12318 } 12319 } 12320 12321 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12322 t, err = decoder.GetElement("Error") 12323 if err != nil { 12324 var snapshot bytes.Buffer 12325 io.Copy(&snapshot, ringBuffer) 12326 return &smithy.DeserializationError{ 12327 Err: fmt.Errorf("failed to decode response body, %w", err), 12328 Snapshot: snapshot.Bytes(), 12329 } 12330 } 12331 12332 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12333 err = awsRestxml_deserializeDocumentKeySigningKeyInParentDSRecord(&output, decoder) 12334 if err != nil { 12335 var snapshot bytes.Buffer 12336 io.Copy(&snapshot, ringBuffer) 12337 return &smithy.DeserializationError{ 12338 Err: fmt.Errorf("failed to decode response body, %w", err), 12339 Snapshot: snapshot.Bytes(), 12340 } 12341 } 12342 12343 return output 12344 } 12345 12346 func awsRestxml_deserializeErrorKeySigningKeyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12347 output := &types.KeySigningKeyInUse{} 12348 var buff [1024]byte 12349 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12350 body := io.TeeReader(errorBody, ringBuffer) 12351 rootDecoder := xml.NewDecoder(body) 12352 t, err := smithyxml.FetchRootElement(rootDecoder) 12353 if err == io.EOF { 12354 return output 12355 } 12356 if err != nil { 12357 var snapshot bytes.Buffer 12358 io.Copy(&snapshot, ringBuffer) 12359 return &smithy.DeserializationError{ 12360 Err: fmt.Errorf("failed to decode response body, %w", err), 12361 Snapshot: snapshot.Bytes(), 12362 } 12363 } 12364 12365 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12366 t, err = decoder.GetElement("Error") 12367 if err != nil { 12368 var snapshot bytes.Buffer 12369 io.Copy(&snapshot, ringBuffer) 12370 return &smithy.DeserializationError{ 12371 Err: fmt.Errorf("failed to decode response body, %w", err), 12372 Snapshot: snapshot.Bytes(), 12373 } 12374 } 12375 12376 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12377 err = awsRestxml_deserializeDocumentKeySigningKeyInUse(&output, decoder) 12378 if err != nil { 12379 var snapshot bytes.Buffer 12380 io.Copy(&snapshot, ringBuffer) 12381 return &smithy.DeserializationError{ 12382 Err: fmt.Errorf("failed to decode response body, %w", err), 12383 Snapshot: snapshot.Bytes(), 12384 } 12385 } 12386 12387 return output 12388 } 12389 12390 func awsRestxml_deserializeErrorKeySigningKeyWithActiveStatusNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12391 output := &types.KeySigningKeyWithActiveStatusNotFound{} 12392 var buff [1024]byte 12393 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12394 body := io.TeeReader(errorBody, ringBuffer) 12395 rootDecoder := xml.NewDecoder(body) 12396 t, err := smithyxml.FetchRootElement(rootDecoder) 12397 if err == io.EOF { 12398 return output 12399 } 12400 if err != nil { 12401 var snapshot bytes.Buffer 12402 io.Copy(&snapshot, ringBuffer) 12403 return &smithy.DeserializationError{ 12404 Err: fmt.Errorf("failed to decode response body, %w", err), 12405 Snapshot: snapshot.Bytes(), 12406 } 12407 } 12408 12409 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12410 t, err = decoder.GetElement("Error") 12411 if err != nil { 12412 var snapshot bytes.Buffer 12413 io.Copy(&snapshot, ringBuffer) 12414 return &smithy.DeserializationError{ 12415 Err: fmt.Errorf("failed to decode response body, %w", err), 12416 Snapshot: snapshot.Bytes(), 12417 } 12418 } 12419 12420 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12421 err = awsRestxml_deserializeDocumentKeySigningKeyWithActiveStatusNotFound(&output, decoder) 12422 if err != nil { 12423 var snapshot bytes.Buffer 12424 io.Copy(&snapshot, ringBuffer) 12425 return &smithy.DeserializationError{ 12426 Err: fmt.Errorf("failed to decode response body, %w", err), 12427 Snapshot: snapshot.Bytes(), 12428 } 12429 } 12430 12431 return output 12432 } 12433 12434 func awsRestxml_deserializeErrorLastVPCAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12435 output := &types.LastVPCAssociation{} 12436 var buff [1024]byte 12437 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12438 body := io.TeeReader(errorBody, ringBuffer) 12439 rootDecoder := xml.NewDecoder(body) 12440 t, err := smithyxml.FetchRootElement(rootDecoder) 12441 if err == io.EOF { 12442 return output 12443 } 12444 if err != nil { 12445 var snapshot bytes.Buffer 12446 io.Copy(&snapshot, ringBuffer) 12447 return &smithy.DeserializationError{ 12448 Err: fmt.Errorf("failed to decode response body, %w", err), 12449 Snapshot: snapshot.Bytes(), 12450 } 12451 } 12452 12453 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12454 t, err = decoder.GetElement("Error") 12455 if err != nil { 12456 var snapshot bytes.Buffer 12457 io.Copy(&snapshot, ringBuffer) 12458 return &smithy.DeserializationError{ 12459 Err: fmt.Errorf("failed to decode response body, %w", err), 12460 Snapshot: snapshot.Bytes(), 12461 } 12462 } 12463 12464 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12465 err = awsRestxml_deserializeDocumentLastVPCAssociation(&output, decoder) 12466 if err != nil { 12467 var snapshot bytes.Buffer 12468 io.Copy(&snapshot, ringBuffer) 12469 return &smithy.DeserializationError{ 12470 Err: fmt.Errorf("failed to decode response body, %w", err), 12471 Snapshot: snapshot.Bytes(), 12472 } 12473 } 12474 12475 return output 12476 } 12477 12478 func awsRestxml_deserializeErrorLimitsExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12479 output := &types.LimitsExceeded{} 12480 var buff [1024]byte 12481 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12482 body := io.TeeReader(errorBody, ringBuffer) 12483 rootDecoder := xml.NewDecoder(body) 12484 t, err := smithyxml.FetchRootElement(rootDecoder) 12485 if err == io.EOF { 12486 return output 12487 } 12488 if err != nil { 12489 var snapshot bytes.Buffer 12490 io.Copy(&snapshot, ringBuffer) 12491 return &smithy.DeserializationError{ 12492 Err: fmt.Errorf("failed to decode response body, %w", err), 12493 Snapshot: snapshot.Bytes(), 12494 } 12495 } 12496 12497 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12498 t, err = decoder.GetElement("Error") 12499 if err != nil { 12500 var snapshot bytes.Buffer 12501 io.Copy(&snapshot, ringBuffer) 12502 return &smithy.DeserializationError{ 12503 Err: fmt.Errorf("failed to decode response body, %w", err), 12504 Snapshot: snapshot.Bytes(), 12505 } 12506 } 12507 12508 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12509 err = awsRestxml_deserializeDocumentLimitsExceeded(&output, decoder) 12510 if err != nil { 12511 var snapshot bytes.Buffer 12512 io.Copy(&snapshot, ringBuffer) 12513 return &smithy.DeserializationError{ 12514 Err: fmt.Errorf("failed to decode response body, %w", err), 12515 Snapshot: snapshot.Bytes(), 12516 } 12517 } 12518 12519 return output 12520 } 12521 12522 func awsRestxml_deserializeErrorNoSuchChange(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12523 output := &types.NoSuchChange{} 12524 var buff [1024]byte 12525 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12526 body := io.TeeReader(errorBody, ringBuffer) 12527 rootDecoder := xml.NewDecoder(body) 12528 t, err := smithyxml.FetchRootElement(rootDecoder) 12529 if err == io.EOF { 12530 return output 12531 } 12532 if err != nil { 12533 var snapshot bytes.Buffer 12534 io.Copy(&snapshot, ringBuffer) 12535 return &smithy.DeserializationError{ 12536 Err: fmt.Errorf("failed to decode response body, %w", err), 12537 Snapshot: snapshot.Bytes(), 12538 } 12539 } 12540 12541 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12542 t, err = decoder.GetElement("Error") 12543 if err != nil { 12544 var snapshot bytes.Buffer 12545 io.Copy(&snapshot, ringBuffer) 12546 return &smithy.DeserializationError{ 12547 Err: fmt.Errorf("failed to decode response body, %w", err), 12548 Snapshot: snapshot.Bytes(), 12549 } 12550 } 12551 12552 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12553 err = awsRestxml_deserializeDocumentNoSuchChange(&output, decoder) 12554 if err != nil { 12555 var snapshot bytes.Buffer 12556 io.Copy(&snapshot, ringBuffer) 12557 return &smithy.DeserializationError{ 12558 Err: fmt.Errorf("failed to decode response body, %w", err), 12559 Snapshot: snapshot.Bytes(), 12560 } 12561 } 12562 12563 return output 12564 } 12565 12566 func awsRestxml_deserializeErrorNoSuchCidrCollectionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12567 output := &types.NoSuchCidrCollectionException{} 12568 var buff [1024]byte 12569 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12570 body := io.TeeReader(errorBody, ringBuffer) 12571 rootDecoder := xml.NewDecoder(body) 12572 t, err := smithyxml.FetchRootElement(rootDecoder) 12573 if err == io.EOF { 12574 return output 12575 } 12576 if err != nil { 12577 var snapshot bytes.Buffer 12578 io.Copy(&snapshot, ringBuffer) 12579 return &smithy.DeserializationError{ 12580 Err: fmt.Errorf("failed to decode response body, %w", err), 12581 Snapshot: snapshot.Bytes(), 12582 } 12583 } 12584 12585 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12586 t, err = decoder.GetElement("Error") 12587 if err != nil { 12588 var snapshot bytes.Buffer 12589 io.Copy(&snapshot, ringBuffer) 12590 return &smithy.DeserializationError{ 12591 Err: fmt.Errorf("failed to decode response body, %w", err), 12592 Snapshot: snapshot.Bytes(), 12593 } 12594 } 12595 12596 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12597 err = awsRestxml_deserializeDocumentNoSuchCidrCollectionException(&output, decoder) 12598 if err != nil { 12599 var snapshot bytes.Buffer 12600 io.Copy(&snapshot, ringBuffer) 12601 return &smithy.DeserializationError{ 12602 Err: fmt.Errorf("failed to decode response body, %w", err), 12603 Snapshot: snapshot.Bytes(), 12604 } 12605 } 12606 12607 return output 12608 } 12609 12610 func awsRestxml_deserializeErrorNoSuchCidrLocationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12611 output := &types.NoSuchCidrLocationException{} 12612 var buff [1024]byte 12613 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12614 body := io.TeeReader(errorBody, ringBuffer) 12615 rootDecoder := xml.NewDecoder(body) 12616 t, err := smithyxml.FetchRootElement(rootDecoder) 12617 if err == io.EOF { 12618 return output 12619 } 12620 if err != nil { 12621 var snapshot bytes.Buffer 12622 io.Copy(&snapshot, ringBuffer) 12623 return &smithy.DeserializationError{ 12624 Err: fmt.Errorf("failed to decode response body, %w", err), 12625 Snapshot: snapshot.Bytes(), 12626 } 12627 } 12628 12629 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12630 t, err = decoder.GetElement("Error") 12631 if err != nil { 12632 var snapshot bytes.Buffer 12633 io.Copy(&snapshot, ringBuffer) 12634 return &smithy.DeserializationError{ 12635 Err: fmt.Errorf("failed to decode response body, %w", err), 12636 Snapshot: snapshot.Bytes(), 12637 } 12638 } 12639 12640 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12641 err = awsRestxml_deserializeDocumentNoSuchCidrLocationException(&output, decoder) 12642 if err != nil { 12643 var snapshot bytes.Buffer 12644 io.Copy(&snapshot, ringBuffer) 12645 return &smithy.DeserializationError{ 12646 Err: fmt.Errorf("failed to decode response body, %w", err), 12647 Snapshot: snapshot.Bytes(), 12648 } 12649 } 12650 12651 return output 12652 } 12653 12654 func awsRestxml_deserializeErrorNoSuchCloudWatchLogsLogGroup(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12655 output := &types.NoSuchCloudWatchLogsLogGroup{} 12656 var buff [1024]byte 12657 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12658 body := io.TeeReader(errorBody, ringBuffer) 12659 rootDecoder := xml.NewDecoder(body) 12660 t, err := smithyxml.FetchRootElement(rootDecoder) 12661 if err == io.EOF { 12662 return output 12663 } 12664 if err != nil { 12665 var snapshot bytes.Buffer 12666 io.Copy(&snapshot, ringBuffer) 12667 return &smithy.DeserializationError{ 12668 Err: fmt.Errorf("failed to decode response body, %w", err), 12669 Snapshot: snapshot.Bytes(), 12670 } 12671 } 12672 12673 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12674 t, err = decoder.GetElement("Error") 12675 if err != nil { 12676 var snapshot bytes.Buffer 12677 io.Copy(&snapshot, ringBuffer) 12678 return &smithy.DeserializationError{ 12679 Err: fmt.Errorf("failed to decode response body, %w", err), 12680 Snapshot: snapshot.Bytes(), 12681 } 12682 } 12683 12684 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12685 err = awsRestxml_deserializeDocumentNoSuchCloudWatchLogsLogGroup(&output, decoder) 12686 if err != nil { 12687 var snapshot bytes.Buffer 12688 io.Copy(&snapshot, ringBuffer) 12689 return &smithy.DeserializationError{ 12690 Err: fmt.Errorf("failed to decode response body, %w", err), 12691 Snapshot: snapshot.Bytes(), 12692 } 12693 } 12694 12695 return output 12696 } 12697 12698 func awsRestxml_deserializeErrorNoSuchDelegationSet(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12699 output := &types.NoSuchDelegationSet{} 12700 var buff [1024]byte 12701 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12702 body := io.TeeReader(errorBody, ringBuffer) 12703 rootDecoder := xml.NewDecoder(body) 12704 t, err := smithyxml.FetchRootElement(rootDecoder) 12705 if err == io.EOF { 12706 return output 12707 } 12708 if err != nil { 12709 var snapshot bytes.Buffer 12710 io.Copy(&snapshot, ringBuffer) 12711 return &smithy.DeserializationError{ 12712 Err: fmt.Errorf("failed to decode response body, %w", err), 12713 Snapshot: snapshot.Bytes(), 12714 } 12715 } 12716 12717 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12718 t, err = decoder.GetElement("Error") 12719 if err != nil { 12720 var snapshot bytes.Buffer 12721 io.Copy(&snapshot, ringBuffer) 12722 return &smithy.DeserializationError{ 12723 Err: fmt.Errorf("failed to decode response body, %w", err), 12724 Snapshot: snapshot.Bytes(), 12725 } 12726 } 12727 12728 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12729 err = awsRestxml_deserializeDocumentNoSuchDelegationSet(&output, decoder) 12730 if err != nil { 12731 var snapshot bytes.Buffer 12732 io.Copy(&snapshot, ringBuffer) 12733 return &smithy.DeserializationError{ 12734 Err: fmt.Errorf("failed to decode response body, %w", err), 12735 Snapshot: snapshot.Bytes(), 12736 } 12737 } 12738 12739 return output 12740 } 12741 12742 func awsRestxml_deserializeErrorNoSuchGeoLocation(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12743 output := &types.NoSuchGeoLocation{} 12744 var buff [1024]byte 12745 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12746 body := io.TeeReader(errorBody, ringBuffer) 12747 rootDecoder := xml.NewDecoder(body) 12748 t, err := smithyxml.FetchRootElement(rootDecoder) 12749 if err == io.EOF { 12750 return output 12751 } 12752 if err != nil { 12753 var snapshot bytes.Buffer 12754 io.Copy(&snapshot, ringBuffer) 12755 return &smithy.DeserializationError{ 12756 Err: fmt.Errorf("failed to decode response body, %w", err), 12757 Snapshot: snapshot.Bytes(), 12758 } 12759 } 12760 12761 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12762 t, err = decoder.GetElement("Error") 12763 if err != nil { 12764 var snapshot bytes.Buffer 12765 io.Copy(&snapshot, ringBuffer) 12766 return &smithy.DeserializationError{ 12767 Err: fmt.Errorf("failed to decode response body, %w", err), 12768 Snapshot: snapshot.Bytes(), 12769 } 12770 } 12771 12772 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12773 err = awsRestxml_deserializeDocumentNoSuchGeoLocation(&output, decoder) 12774 if err != nil { 12775 var snapshot bytes.Buffer 12776 io.Copy(&snapshot, ringBuffer) 12777 return &smithy.DeserializationError{ 12778 Err: fmt.Errorf("failed to decode response body, %w", err), 12779 Snapshot: snapshot.Bytes(), 12780 } 12781 } 12782 12783 return output 12784 } 12785 12786 func awsRestxml_deserializeErrorNoSuchHealthCheck(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12787 output := &types.NoSuchHealthCheck{} 12788 var buff [1024]byte 12789 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12790 body := io.TeeReader(errorBody, ringBuffer) 12791 rootDecoder := xml.NewDecoder(body) 12792 t, err := smithyxml.FetchRootElement(rootDecoder) 12793 if err == io.EOF { 12794 return output 12795 } 12796 if err != nil { 12797 var snapshot bytes.Buffer 12798 io.Copy(&snapshot, ringBuffer) 12799 return &smithy.DeserializationError{ 12800 Err: fmt.Errorf("failed to decode response body, %w", err), 12801 Snapshot: snapshot.Bytes(), 12802 } 12803 } 12804 12805 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12806 t, err = decoder.GetElement("Error") 12807 if err != nil { 12808 var snapshot bytes.Buffer 12809 io.Copy(&snapshot, ringBuffer) 12810 return &smithy.DeserializationError{ 12811 Err: fmt.Errorf("failed to decode response body, %w", err), 12812 Snapshot: snapshot.Bytes(), 12813 } 12814 } 12815 12816 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12817 err = awsRestxml_deserializeDocumentNoSuchHealthCheck(&output, decoder) 12818 if err != nil { 12819 var snapshot bytes.Buffer 12820 io.Copy(&snapshot, ringBuffer) 12821 return &smithy.DeserializationError{ 12822 Err: fmt.Errorf("failed to decode response body, %w", err), 12823 Snapshot: snapshot.Bytes(), 12824 } 12825 } 12826 12827 return output 12828 } 12829 12830 func awsRestxml_deserializeErrorNoSuchHostedZone(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12831 output := &types.NoSuchHostedZone{} 12832 var buff [1024]byte 12833 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12834 body := io.TeeReader(errorBody, ringBuffer) 12835 rootDecoder := xml.NewDecoder(body) 12836 t, err := smithyxml.FetchRootElement(rootDecoder) 12837 if err == io.EOF { 12838 return output 12839 } 12840 if err != nil { 12841 var snapshot bytes.Buffer 12842 io.Copy(&snapshot, ringBuffer) 12843 return &smithy.DeserializationError{ 12844 Err: fmt.Errorf("failed to decode response body, %w", err), 12845 Snapshot: snapshot.Bytes(), 12846 } 12847 } 12848 12849 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12850 t, err = decoder.GetElement("Error") 12851 if err != nil { 12852 var snapshot bytes.Buffer 12853 io.Copy(&snapshot, ringBuffer) 12854 return &smithy.DeserializationError{ 12855 Err: fmt.Errorf("failed to decode response body, %w", err), 12856 Snapshot: snapshot.Bytes(), 12857 } 12858 } 12859 12860 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12861 err = awsRestxml_deserializeDocumentNoSuchHostedZone(&output, decoder) 12862 if err != nil { 12863 var snapshot bytes.Buffer 12864 io.Copy(&snapshot, ringBuffer) 12865 return &smithy.DeserializationError{ 12866 Err: fmt.Errorf("failed to decode response body, %w", err), 12867 Snapshot: snapshot.Bytes(), 12868 } 12869 } 12870 12871 return output 12872 } 12873 12874 func awsRestxml_deserializeErrorNoSuchKeySigningKey(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12875 output := &types.NoSuchKeySigningKey{} 12876 var buff [1024]byte 12877 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12878 body := io.TeeReader(errorBody, ringBuffer) 12879 rootDecoder := xml.NewDecoder(body) 12880 t, err := smithyxml.FetchRootElement(rootDecoder) 12881 if err == io.EOF { 12882 return output 12883 } 12884 if err != nil { 12885 var snapshot bytes.Buffer 12886 io.Copy(&snapshot, ringBuffer) 12887 return &smithy.DeserializationError{ 12888 Err: fmt.Errorf("failed to decode response body, %w", err), 12889 Snapshot: snapshot.Bytes(), 12890 } 12891 } 12892 12893 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12894 t, err = decoder.GetElement("Error") 12895 if err != nil { 12896 var snapshot bytes.Buffer 12897 io.Copy(&snapshot, ringBuffer) 12898 return &smithy.DeserializationError{ 12899 Err: fmt.Errorf("failed to decode response body, %w", err), 12900 Snapshot: snapshot.Bytes(), 12901 } 12902 } 12903 12904 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12905 err = awsRestxml_deserializeDocumentNoSuchKeySigningKey(&output, decoder) 12906 if err != nil { 12907 var snapshot bytes.Buffer 12908 io.Copy(&snapshot, ringBuffer) 12909 return &smithy.DeserializationError{ 12910 Err: fmt.Errorf("failed to decode response body, %w", err), 12911 Snapshot: snapshot.Bytes(), 12912 } 12913 } 12914 12915 return output 12916 } 12917 12918 func awsRestxml_deserializeErrorNoSuchQueryLoggingConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12919 output := &types.NoSuchQueryLoggingConfig{} 12920 var buff [1024]byte 12921 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12922 body := io.TeeReader(errorBody, ringBuffer) 12923 rootDecoder := xml.NewDecoder(body) 12924 t, err := smithyxml.FetchRootElement(rootDecoder) 12925 if err == io.EOF { 12926 return output 12927 } 12928 if err != nil { 12929 var snapshot bytes.Buffer 12930 io.Copy(&snapshot, ringBuffer) 12931 return &smithy.DeserializationError{ 12932 Err: fmt.Errorf("failed to decode response body, %w", err), 12933 Snapshot: snapshot.Bytes(), 12934 } 12935 } 12936 12937 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12938 t, err = decoder.GetElement("Error") 12939 if err != nil { 12940 var snapshot bytes.Buffer 12941 io.Copy(&snapshot, ringBuffer) 12942 return &smithy.DeserializationError{ 12943 Err: fmt.Errorf("failed to decode response body, %w", err), 12944 Snapshot: snapshot.Bytes(), 12945 } 12946 } 12947 12948 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12949 err = awsRestxml_deserializeDocumentNoSuchQueryLoggingConfig(&output, decoder) 12950 if err != nil { 12951 var snapshot bytes.Buffer 12952 io.Copy(&snapshot, ringBuffer) 12953 return &smithy.DeserializationError{ 12954 Err: fmt.Errorf("failed to decode response body, %w", err), 12955 Snapshot: snapshot.Bytes(), 12956 } 12957 } 12958 12959 return output 12960 } 12961 12962 func awsRestxml_deserializeErrorNoSuchTrafficPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { 12963 output := &types.NoSuchTrafficPolicy{} 12964 var buff [1024]byte 12965 ringBuffer := smithyio.NewRingBuffer(buff[:]) 12966 body := io.TeeReader(errorBody, ringBuffer) 12967 rootDecoder := xml.NewDecoder(body) 12968 t, err := smithyxml.FetchRootElement(rootDecoder) 12969 if err == io.EOF { 12970 return output 12971 } 12972 if err != nil { 12973 var snapshot bytes.Buffer 12974 io.Copy(&snapshot, ringBuffer) 12975 return &smithy.DeserializationError{ 12976 Err: fmt.Errorf("failed to decode response body, %w", err), 12977 Snapshot: snapshot.Bytes(), 12978 } 12979 } 12980 12981 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 12982 t, err = decoder.GetElement("Error") 12983 if err != nil { 12984 var snapshot bytes.Buffer 12985 io.Copy(&snapshot, ringBuffer) 12986 return &smithy.DeserializationError{ 12987 Err: fmt.Errorf("failed to decode response body, %w", err), 12988 Snapshot: snapshot.Bytes(), 12989 } 12990 } 12991 12992 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 12993 err = awsRestxml_deserializeDocumentNoSuchTrafficPolicy(&output, decoder) 12994 if err != nil { 12995 var snapshot bytes.Buffer 12996 io.Copy(&snapshot, ringBuffer) 12997 return &smithy.DeserializationError{ 12998 Err: fmt.Errorf("failed to decode response body, %w", err), 12999 Snapshot: snapshot.Bytes(), 13000 } 13001 } 13002 13003 return output 13004 } 13005 13006 func awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13007 output := &types.NoSuchTrafficPolicyInstance{} 13008 var buff [1024]byte 13009 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13010 body := io.TeeReader(errorBody, ringBuffer) 13011 rootDecoder := xml.NewDecoder(body) 13012 t, err := smithyxml.FetchRootElement(rootDecoder) 13013 if err == io.EOF { 13014 return output 13015 } 13016 if err != nil { 13017 var snapshot bytes.Buffer 13018 io.Copy(&snapshot, ringBuffer) 13019 return &smithy.DeserializationError{ 13020 Err: fmt.Errorf("failed to decode response body, %w", err), 13021 Snapshot: snapshot.Bytes(), 13022 } 13023 } 13024 13025 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13026 t, err = decoder.GetElement("Error") 13027 if err != nil { 13028 var snapshot bytes.Buffer 13029 io.Copy(&snapshot, ringBuffer) 13030 return &smithy.DeserializationError{ 13031 Err: fmt.Errorf("failed to decode response body, %w", err), 13032 Snapshot: snapshot.Bytes(), 13033 } 13034 } 13035 13036 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13037 err = awsRestxml_deserializeDocumentNoSuchTrafficPolicyInstance(&output, decoder) 13038 if err != nil { 13039 var snapshot bytes.Buffer 13040 io.Copy(&snapshot, ringBuffer) 13041 return &smithy.DeserializationError{ 13042 Err: fmt.Errorf("failed to decode response body, %w", err), 13043 Snapshot: snapshot.Bytes(), 13044 } 13045 } 13046 13047 return output 13048 } 13049 13050 func awsRestxml_deserializeErrorNotAuthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13051 output := &types.NotAuthorizedException{} 13052 var buff [1024]byte 13053 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13054 body := io.TeeReader(errorBody, ringBuffer) 13055 rootDecoder := xml.NewDecoder(body) 13056 t, err := smithyxml.FetchRootElement(rootDecoder) 13057 if err == io.EOF { 13058 return output 13059 } 13060 if err != nil { 13061 var snapshot bytes.Buffer 13062 io.Copy(&snapshot, ringBuffer) 13063 return &smithy.DeserializationError{ 13064 Err: fmt.Errorf("failed to decode response body, %w", err), 13065 Snapshot: snapshot.Bytes(), 13066 } 13067 } 13068 13069 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13070 t, err = decoder.GetElement("Error") 13071 if err != nil { 13072 var snapshot bytes.Buffer 13073 io.Copy(&snapshot, ringBuffer) 13074 return &smithy.DeserializationError{ 13075 Err: fmt.Errorf("failed to decode response body, %w", err), 13076 Snapshot: snapshot.Bytes(), 13077 } 13078 } 13079 13080 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13081 err = awsRestxml_deserializeDocumentNotAuthorizedException(&output, decoder) 13082 if err != nil { 13083 var snapshot bytes.Buffer 13084 io.Copy(&snapshot, ringBuffer) 13085 return &smithy.DeserializationError{ 13086 Err: fmt.Errorf("failed to decode response body, %w", err), 13087 Snapshot: snapshot.Bytes(), 13088 } 13089 } 13090 13091 return output 13092 } 13093 13094 func awsRestxml_deserializeErrorPriorRequestNotComplete(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13095 output := &types.PriorRequestNotComplete{} 13096 var buff [1024]byte 13097 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13098 body := io.TeeReader(errorBody, ringBuffer) 13099 rootDecoder := xml.NewDecoder(body) 13100 t, err := smithyxml.FetchRootElement(rootDecoder) 13101 if err == io.EOF { 13102 return output 13103 } 13104 if err != nil { 13105 var snapshot bytes.Buffer 13106 io.Copy(&snapshot, ringBuffer) 13107 return &smithy.DeserializationError{ 13108 Err: fmt.Errorf("failed to decode response body, %w", err), 13109 Snapshot: snapshot.Bytes(), 13110 } 13111 } 13112 13113 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13114 t, err = decoder.GetElement("Error") 13115 if err != nil { 13116 var snapshot bytes.Buffer 13117 io.Copy(&snapshot, ringBuffer) 13118 return &smithy.DeserializationError{ 13119 Err: fmt.Errorf("failed to decode response body, %w", err), 13120 Snapshot: snapshot.Bytes(), 13121 } 13122 } 13123 13124 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13125 err = awsRestxml_deserializeDocumentPriorRequestNotComplete(&output, decoder) 13126 if err != nil { 13127 var snapshot bytes.Buffer 13128 io.Copy(&snapshot, ringBuffer) 13129 return &smithy.DeserializationError{ 13130 Err: fmt.Errorf("failed to decode response body, %w", err), 13131 Snapshot: snapshot.Bytes(), 13132 } 13133 } 13134 13135 return output 13136 } 13137 13138 func awsRestxml_deserializeErrorPublicZoneVPCAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13139 output := &types.PublicZoneVPCAssociation{} 13140 var buff [1024]byte 13141 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13142 body := io.TeeReader(errorBody, ringBuffer) 13143 rootDecoder := xml.NewDecoder(body) 13144 t, err := smithyxml.FetchRootElement(rootDecoder) 13145 if err == io.EOF { 13146 return output 13147 } 13148 if err != nil { 13149 var snapshot bytes.Buffer 13150 io.Copy(&snapshot, ringBuffer) 13151 return &smithy.DeserializationError{ 13152 Err: fmt.Errorf("failed to decode response body, %w", err), 13153 Snapshot: snapshot.Bytes(), 13154 } 13155 } 13156 13157 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13158 t, err = decoder.GetElement("Error") 13159 if err != nil { 13160 var snapshot bytes.Buffer 13161 io.Copy(&snapshot, ringBuffer) 13162 return &smithy.DeserializationError{ 13163 Err: fmt.Errorf("failed to decode response body, %w", err), 13164 Snapshot: snapshot.Bytes(), 13165 } 13166 } 13167 13168 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13169 err = awsRestxml_deserializeDocumentPublicZoneVPCAssociation(&output, decoder) 13170 if err != nil { 13171 var snapshot bytes.Buffer 13172 io.Copy(&snapshot, ringBuffer) 13173 return &smithy.DeserializationError{ 13174 Err: fmt.Errorf("failed to decode response body, %w", err), 13175 Snapshot: snapshot.Bytes(), 13176 } 13177 } 13178 13179 return output 13180 } 13181 13182 func awsRestxml_deserializeErrorQueryLoggingConfigAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13183 output := &types.QueryLoggingConfigAlreadyExists{} 13184 var buff [1024]byte 13185 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13186 body := io.TeeReader(errorBody, ringBuffer) 13187 rootDecoder := xml.NewDecoder(body) 13188 t, err := smithyxml.FetchRootElement(rootDecoder) 13189 if err == io.EOF { 13190 return output 13191 } 13192 if err != nil { 13193 var snapshot bytes.Buffer 13194 io.Copy(&snapshot, ringBuffer) 13195 return &smithy.DeserializationError{ 13196 Err: fmt.Errorf("failed to decode response body, %w", err), 13197 Snapshot: snapshot.Bytes(), 13198 } 13199 } 13200 13201 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13202 t, err = decoder.GetElement("Error") 13203 if err != nil { 13204 var snapshot bytes.Buffer 13205 io.Copy(&snapshot, ringBuffer) 13206 return &smithy.DeserializationError{ 13207 Err: fmt.Errorf("failed to decode response body, %w", err), 13208 Snapshot: snapshot.Bytes(), 13209 } 13210 } 13211 13212 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13213 err = awsRestxml_deserializeDocumentQueryLoggingConfigAlreadyExists(&output, decoder) 13214 if err != nil { 13215 var snapshot bytes.Buffer 13216 io.Copy(&snapshot, ringBuffer) 13217 return &smithy.DeserializationError{ 13218 Err: fmt.Errorf("failed to decode response body, %w", err), 13219 Snapshot: snapshot.Bytes(), 13220 } 13221 } 13222 13223 return output 13224 } 13225 13226 func awsRestxml_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13227 output := &types.ThrottlingException{} 13228 var buff [1024]byte 13229 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13230 body := io.TeeReader(errorBody, ringBuffer) 13231 rootDecoder := xml.NewDecoder(body) 13232 t, err := smithyxml.FetchRootElement(rootDecoder) 13233 if err == io.EOF { 13234 return output 13235 } 13236 if err != nil { 13237 var snapshot bytes.Buffer 13238 io.Copy(&snapshot, ringBuffer) 13239 return &smithy.DeserializationError{ 13240 Err: fmt.Errorf("failed to decode response body, %w", err), 13241 Snapshot: snapshot.Bytes(), 13242 } 13243 } 13244 13245 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13246 t, err = decoder.GetElement("Error") 13247 if err != nil { 13248 var snapshot bytes.Buffer 13249 io.Copy(&snapshot, ringBuffer) 13250 return &smithy.DeserializationError{ 13251 Err: fmt.Errorf("failed to decode response body, %w", err), 13252 Snapshot: snapshot.Bytes(), 13253 } 13254 } 13255 13256 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13257 err = awsRestxml_deserializeDocumentThrottlingException(&output, decoder) 13258 if err != nil { 13259 var snapshot bytes.Buffer 13260 io.Copy(&snapshot, ringBuffer) 13261 return &smithy.DeserializationError{ 13262 Err: fmt.Errorf("failed to decode response body, %w", err), 13263 Snapshot: snapshot.Bytes(), 13264 } 13265 } 13266 13267 return output 13268 } 13269 13270 func awsRestxml_deserializeErrorTooManyHealthChecks(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13271 output := &types.TooManyHealthChecks{} 13272 var buff [1024]byte 13273 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13274 body := io.TeeReader(errorBody, ringBuffer) 13275 rootDecoder := xml.NewDecoder(body) 13276 t, err := smithyxml.FetchRootElement(rootDecoder) 13277 if err == io.EOF { 13278 return output 13279 } 13280 if err != nil { 13281 var snapshot bytes.Buffer 13282 io.Copy(&snapshot, ringBuffer) 13283 return &smithy.DeserializationError{ 13284 Err: fmt.Errorf("failed to decode response body, %w", err), 13285 Snapshot: snapshot.Bytes(), 13286 } 13287 } 13288 13289 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13290 t, err = decoder.GetElement("Error") 13291 if err != nil { 13292 var snapshot bytes.Buffer 13293 io.Copy(&snapshot, ringBuffer) 13294 return &smithy.DeserializationError{ 13295 Err: fmt.Errorf("failed to decode response body, %w", err), 13296 Snapshot: snapshot.Bytes(), 13297 } 13298 } 13299 13300 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13301 err = awsRestxml_deserializeDocumentTooManyHealthChecks(&output, decoder) 13302 if err != nil { 13303 var snapshot bytes.Buffer 13304 io.Copy(&snapshot, ringBuffer) 13305 return &smithy.DeserializationError{ 13306 Err: fmt.Errorf("failed to decode response body, %w", err), 13307 Snapshot: snapshot.Bytes(), 13308 } 13309 } 13310 13311 return output 13312 } 13313 13314 func awsRestxml_deserializeErrorTooManyHostedZones(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13315 output := &types.TooManyHostedZones{} 13316 var buff [1024]byte 13317 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13318 body := io.TeeReader(errorBody, ringBuffer) 13319 rootDecoder := xml.NewDecoder(body) 13320 t, err := smithyxml.FetchRootElement(rootDecoder) 13321 if err == io.EOF { 13322 return output 13323 } 13324 if err != nil { 13325 var snapshot bytes.Buffer 13326 io.Copy(&snapshot, ringBuffer) 13327 return &smithy.DeserializationError{ 13328 Err: fmt.Errorf("failed to decode response body, %w", err), 13329 Snapshot: snapshot.Bytes(), 13330 } 13331 } 13332 13333 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13334 t, err = decoder.GetElement("Error") 13335 if err != nil { 13336 var snapshot bytes.Buffer 13337 io.Copy(&snapshot, ringBuffer) 13338 return &smithy.DeserializationError{ 13339 Err: fmt.Errorf("failed to decode response body, %w", err), 13340 Snapshot: snapshot.Bytes(), 13341 } 13342 } 13343 13344 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13345 err = awsRestxml_deserializeDocumentTooManyHostedZones(&output, decoder) 13346 if err != nil { 13347 var snapshot bytes.Buffer 13348 io.Copy(&snapshot, ringBuffer) 13349 return &smithy.DeserializationError{ 13350 Err: fmt.Errorf("failed to decode response body, %w", err), 13351 Snapshot: snapshot.Bytes(), 13352 } 13353 } 13354 13355 return output 13356 } 13357 13358 func awsRestxml_deserializeErrorTooManyKeySigningKeys(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13359 output := &types.TooManyKeySigningKeys{} 13360 var buff [1024]byte 13361 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13362 body := io.TeeReader(errorBody, ringBuffer) 13363 rootDecoder := xml.NewDecoder(body) 13364 t, err := smithyxml.FetchRootElement(rootDecoder) 13365 if err == io.EOF { 13366 return output 13367 } 13368 if err != nil { 13369 var snapshot bytes.Buffer 13370 io.Copy(&snapshot, ringBuffer) 13371 return &smithy.DeserializationError{ 13372 Err: fmt.Errorf("failed to decode response body, %w", err), 13373 Snapshot: snapshot.Bytes(), 13374 } 13375 } 13376 13377 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13378 t, err = decoder.GetElement("Error") 13379 if err != nil { 13380 var snapshot bytes.Buffer 13381 io.Copy(&snapshot, ringBuffer) 13382 return &smithy.DeserializationError{ 13383 Err: fmt.Errorf("failed to decode response body, %w", err), 13384 Snapshot: snapshot.Bytes(), 13385 } 13386 } 13387 13388 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13389 err = awsRestxml_deserializeDocumentTooManyKeySigningKeys(&output, decoder) 13390 if err != nil { 13391 var snapshot bytes.Buffer 13392 io.Copy(&snapshot, ringBuffer) 13393 return &smithy.DeserializationError{ 13394 Err: fmt.Errorf("failed to decode response body, %w", err), 13395 Snapshot: snapshot.Bytes(), 13396 } 13397 } 13398 13399 return output 13400 } 13401 13402 func awsRestxml_deserializeErrorTooManyTrafficPolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13403 output := &types.TooManyTrafficPolicies{} 13404 var buff [1024]byte 13405 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13406 body := io.TeeReader(errorBody, ringBuffer) 13407 rootDecoder := xml.NewDecoder(body) 13408 t, err := smithyxml.FetchRootElement(rootDecoder) 13409 if err == io.EOF { 13410 return output 13411 } 13412 if err != nil { 13413 var snapshot bytes.Buffer 13414 io.Copy(&snapshot, ringBuffer) 13415 return &smithy.DeserializationError{ 13416 Err: fmt.Errorf("failed to decode response body, %w", err), 13417 Snapshot: snapshot.Bytes(), 13418 } 13419 } 13420 13421 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13422 t, err = decoder.GetElement("Error") 13423 if err != nil { 13424 var snapshot bytes.Buffer 13425 io.Copy(&snapshot, ringBuffer) 13426 return &smithy.DeserializationError{ 13427 Err: fmt.Errorf("failed to decode response body, %w", err), 13428 Snapshot: snapshot.Bytes(), 13429 } 13430 } 13431 13432 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13433 err = awsRestxml_deserializeDocumentTooManyTrafficPolicies(&output, decoder) 13434 if err != nil { 13435 var snapshot bytes.Buffer 13436 io.Copy(&snapshot, ringBuffer) 13437 return &smithy.DeserializationError{ 13438 Err: fmt.Errorf("failed to decode response body, %w", err), 13439 Snapshot: snapshot.Bytes(), 13440 } 13441 } 13442 13443 return output 13444 } 13445 13446 func awsRestxml_deserializeErrorTooManyTrafficPolicyInstances(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13447 output := &types.TooManyTrafficPolicyInstances{} 13448 var buff [1024]byte 13449 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13450 body := io.TeeReader(errorBody, ringBuffer) 13451 rootDecoder := xml.NewDecoder(body) 13452 t, err := smithyxml.FetchRootElement(rootDecoder) 13453 if err == io.EOF { 13454 return output 13455 } 13456 if err != nil { 13457 var snapshot bytes.Buffer 13458 io.Copy(&snapshot, ringBuffer) 13459 return &smithy.DeserializationError{ 13460 Err: fmt.Errorf("failed to decode response body, %w", err), 13461 Snapshot: snapshot.Bytes(), 13462 } 13463 } 13464 13465 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13466 t, err = decoder.GetElement("Error") 13467 if err != nil { 13468 var snapshot bytes.Buffer 13469 io.Copy(&snapshot, ringBuffer) 13470 return &smithy.DeserializationError{ 13471 Err: fmt.Errorf("failed to decode response body, %w", err), 13472 Snapshot: snapshot.Bytes(), 13473 } 13474 } 13475 13476 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13477 err = awsRestxml_deserializeDocumentTooManyTrafficPolicyInstances(&output, decoder) 13478 if err != nil { 13479 var snapshot bytes.Buffer 13480 io.Copy(&snapshot, ringBuffer) 13481 return &smithy.DeserializationError{ 13482 Err: fmt.Errorf("failed to decode response body, %w", err), 13483 Snapshot: snapshot.Bytes(), 13484 } 13485 } 13486 13487 return output 13488 } 13489 13490 func awsRestxml_deserializeErrorTooManyTrafficPolicyVersionsForCurrentPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13491 output := &types.TooManyTrafficPolicyVersionsForCurrentPolicy{} 13492 var buff [1024]byte 13493 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13494 body := io.TeeReader(errorBody, ringBuffer) 13495 rootDecoder := xml.NewDecoder(body) 13496 t, err := smithyxml.FetchRootElement(rootDecoder) 13497 if err == io.EOF { 13498 return output 13499 } 13500 if err != nil { 13501 var snapshot bytes.Buffer 13502 io.Copy(&snapshot, ringBuffer) 13503 return &smithy.DeserializationError{ 13504 Err: fmt.Errorf("failed to decode response body, %w", err), 13505 Snapshot: snapshot.Bytes(), 13506 } 13507 } 13508 13509 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13510 t, err = decoder.GetElement("Error") 13511 if err != nil { 13512 var snapshot bytes.Buffer 13513 io.Copy(&snapshot, ringBuffer) 13514 return &smithy.DeserializationError{ 13515 Err: fmt.Errorf("failed to decode response body, %w", err), 13516 Snapshot: snapshot.Bytes(), 13517 } 13518 } 13519 13520 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13521 err = awsRestxml_deserializeDocumentTooManyTrafficPolicyVersionsForCurrentPolicy(&output, decoder) 13522 if err != nil { 13523 var snapshot bytes.Buffer 13524 io.Copy(&snapshot, ringBuffer) 13525 return &smithy.DeserializationError{ 13526 Err: fmt.Errorf("failed to decode response body, %w", err), 13527 Snapshot: snapshot.Bytes(), 13528 } 13529 } 13530 13531 return output 13532 } 13533 13534 func awsRestxml_deserializeErrorTooManyVPCAssociationAuthorizations(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13535 output := &types.TooManyVPCAssociationAuthorizations{} 13536 var buff [1024]byte 13537 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13538 body := io.TeeReader(errorBody, ringBuffer) 13539 rootDecoder := xml.NewDecoder(body) 13540 t, err := smithyxml.FetchRootElement(rootDecoder) 13541 if err == io.EOF { 13542 return output 13543 } 13544 if err != nil { 13545 var snapshot bytes.Buffer 13546 io.Copy(&snapshot, ringBuffer) 13547 return &smithy.DeserializationError{ 13548 Err: fmt.Errorf("failed to decode response body, %w", err), 13549 Snapshot: snapshot.Bytes(), 13550 } 13551 } 13552 13553 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13554 t, err = decoder.GetElement("Error") 13555 if err != nil { 13556 var snapshot bytes.Buffer 13557 io.Copy(&snapshot, ringBuffer) 13558 return &smithy.DeserializationError{ 13559 Err: fmt.Errorf("failed to decode response body, %w", err), 13560 Snapshot: snapshot.Bytes(), 13561 } 13562 } 13563 13564 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13565 err = awsRestxml_deserializeDocumentTooManyVPCAssociationAuthorizations(&output, decoder) 13566 if err != nil { 13567 var snapshot bytes.Buffer 13568 io.Copy(&snapshot, ringBuffer) 13569 return &smithy.DeserializationError{ 13570 Err: fmt.Errorf("failed to decode response body, %w", err), 13571 Snapshot: snapshot.Bytes(), 13572 } 13573 } 13574 13575 return output 13576 } 13577 13578 func awsRestxml_deserializeErrorTrafficPolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13579 output := &types.TrafficPolicyAlreadyExists{} 13580 var buff [1024]byte 13581 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13582 body := io.TeeReader(errorBody, ringBuffer) 13583 rootDecoder := xml.NewDecoder(body) 13584 t, err := smithyxml.FetchRootElement(rootDecoder) 13585 if err == io.EOF { 13586 return output 13587 } 13588 if err != nil { 13589 var snapshot bytes.Buffer 13590 io.Copy(&snapshot, ringBuffer) 13591 return &smithy.DeserializationError{ 13592 Err: fmt.Errorf("failed to decode response body, %w", err), 13593 Snapshot: snapshot.Bytes(), 13594 } 13595 } 13596 13597 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13598 t, err = decoder.GetElement("Error") 13599 if err != nil { 13600 var snapshot bytes.Buffer 13601 io.Copy(&snapshot, ringBuffer) 13602 return &smithy.DeserializationError{ 13603 Err: fmt.Errorf("failed to decode response body, %w", err), 13604 Snapshot: snapshot.Bytes(), 13605 } 13606 } 13607 13608 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13609 err = awsRestxml_deserializeDocumentTrafficPolicyAlreadyExists(&output, decoder) 13610 if err != nil { 13611 var snapshot bytes.Buffer 13612 io.Copy(&snapshot, ringBuffer) 13613 return &smithy.DeserializationError{ 13614 Err: fmt.Errorf("failed to decode response body, %w", err), 13615 Snapshot: snapshot.Bytes(), 13616 } 13617 } 13618 13619 return output 13620 } 13621 13622 func awsRestxml_deserializeErrorTrafficPolicyInstanceAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13623 output := &types.TrafficPolicyInstanceAlreadyExists{} 13624 var buff [1024]byte 13625 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13626 body := io.TeeReader(errorBody, ringBuffer) 13627 rootDecoder := xml.NewDecoder(body) 13628 t, err := smithyxml.FetchRootElement(rootDecoder) 13629 if err == io.EOF { 13630 return output 13631 } 13632 if err != nil { 13633 var snapshot bytes.Buffer 13634 io.Copy(&snapshot, ringBuffer) 13635 return &smithy.DeserializationError{ 13636 Err: fmt.Errorf("failed to decode response body, %w", err), 13637 Snapshot: snapshot.Bytes(), 13638 } 13639 } 13640 13641 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13642 t, err = decoder.GetElement("Error") 13643 if err != nil { 13644 var snapshot bytes.Buffer 13645 io.Copy(&snapshot, ringBuffer) 13646 return &smithy.DeserializationError{ 13647 Err: fmt.Errorf("failed to decode response body, %w", err), 13648 Snapshot: snapshot.Bytes(), 13649 } 13650 } 13651 13652 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13653 err = awsRestxml_deserializeDocumentTrafficPolicyInstanceAlreadyExists(&output, decoder) 13654 if err != nil { 13655 var snapshot bytes.Buffer 13656 io.Copy(&snapshot, ringBuffer) 13657 return &smithy.DeserializationError{ 13658 Err: fmt.Errorf("failed to decode response body, %w", err), 13659 Snapshot: snapshot.Bytes(), 13660 } 13661 } 13662 13663 return output 13664 } 13665 13666 func awsRestxml_deserializeErrorTrafficPolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13667 output := &types.TrafficPolicyInUse{} 13668 var buff [1024]byte 13669 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13670 body := io.TeeReader(errorBody, ringBuffer) 13671 rootDecoder := xml.NewDecoder(body) 13672 t, err := smithyxml.FetchRootElement(rootDecoder) 13673 if err == io.EOF { 13674 return output 13675 } 13676 if err != nil { 13677 var snapshot bytes.Buffer 13678 io.Copy(&snapshot, ringBuffer) 13679 return &smithy.DeserializationError{ 13680 Err: fmt.Errorf("failed to decode response body, %w", err), 13681 Snapshot: snapshot.Bytes(), 13682 } 13683 } 13684 13685 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13686 t, err = decoder.GetElement("Error") 13687 if err != nil { 13688 var snapshot bytes.Buffer 13689 io.Copy(&snapshot, ringBuffer) 13690 return &smithy.DeserializationError{ 13691 Err: fmt.Errorf("failed to decode response body, %w", err), 13692 Snapshot: snapshot.Bytes(), 13693 } 13694 } 13695 13696 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13697 err = awsRestxml_deserializeDocumentTrafficPolicyInUse(&output, decoder) 13698 if err != nil { 13699 var snapshot bytes.Buffer 13700 io.Copy(&snapshot, ringBuffer) 13701 return &smithy.DeserializationError{ 13702 Err: fmt.Errorf("failed to decode response body, %w", err), 13703 Snapshot: snapshot.Bytes(), 13704 } 13705 } 13706 13707 return output 13708 } 13709 13710 func awsRestxml_deserializeErrorVPCAssociationAuthorizationNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13711 output := &types.VPCAssociationAuthorizationNotFound{} 13712 var buff [1024]byte 13713 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13714 body := io.TeeReader(errorBody, ringBuffer) 13715 rootDecoder := xml.NewDecoder(body) 13716 t, err := smithyxml.FetchRootElement(rootDecoder) 13717 if err == io.EOF { 13718 return output 13719 } 13720 if err != nil { 13721 var snapshot bytes.Buffer 13722 io.Copy(&snapshot, ringBuffer) 13723 return &smithy.DeserializationError{ 13724 Err: fmt.Errorf("failed to decode response body, %w", err), 13725 Snapshot: snapshot.Bytes(), 13726 } 13727 } 13728 13729 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13730 t, err = decoder.GetElement("Error") 13731 if err != nil { 13732 var snapshot bytes.Buffer 13733 io.Copy(&snapshot, ringBuffer) 13734 return &smithy.DeserializationError{ 13735 Err: fmt.Errorf("failed to decode response body, %w", err), 13736 Snapshot: snapshot.Bytes(), 13737 } 13738 } 13739 13740 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13741 err = awsRestxml_deserializeDocumentVPCAssociationAuthorizationNotFound(&output, decoder) 13742 if err != nil { 13743 var snapshot bytes.Buffer 13744 io.Copy(&snapshot, ringBuffer) 13745 return &smithy.DeserializationError{ 13746 Err: fmt.Errorf("failed to decode response body, %w", err), 13747 Snapshot: snapshot.Bytes(), 13748 } 13749 } 13750 13751 return output 13752 } 13753 13754 func awsRestxml_deserializeErrorVPCAssociationNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { 13755 output := &types.VPCAssociationNotFound{} 13756 var buff [1024]byte 13757 ringBuffer := smithyio.NewRingBuffer(buff[:]) 13758 body := io.TeeReader(errorBody, ringBuffer) 13759 rootDecoder := xml.NewDecoder(body) 13760 t, err := smithyxml.FetchRootElement(rootDecoder) 13761 if err == io.EOF { 13762 return output 13763 } 13764 if err != nil { 13765 var snapshot bytes.Buffer 13766 io.Copy(&snapshot, ringBuffer) 13767 return &smithy.DeserializationError{ 13768 Err: fmt.Errorf("failed to decode response body, %w", err), 13769 Snapshot: snapshot.Bytes(), 13770 } 13771 } 13772 13773 decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) 13774 t, err = decoder.GetElement("Error") 13775 if err != nil { 13776 var snapshot bytes.Buffer 13777 io.Copy(&snapshot, ringBuffer) 13778 return &smithy.DeserializationError{ 13779 Err: fmt.Errorf("failed to decode response body, %w", err), 13780 Snapshot: snapshot.Bytes(), 13781 } 13782 } 13783 13784 decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) 13785 err = awsRestxml_deserializeDocumentVPCAssociationNotFound(&output, decoder) 13786 if err != nil { 13787 var snapshot bytes.Buffer 13788 io.Copy(&snapshot, ringBuffer) 13789 return &smithy.DeserializationError{ 13790 Err: fmt.Errorf("failed to decode response body, %w", err), 13791 Snapshot: snapshot.Bytes(), 13792 } 13793 } 13794 13795 return output 13796 } 13797 13798 func awsRestxml_deserializeDocumentAccountLimit(v **types.AccountLimit, decoder smithyxml.NodeDecoder) error { 13799 if v == nil { 13800 return fmt.Errorf("unexpected nil of type %T", v) 13801 } 13802 var sv *types.AccountLimit 13803 if *v == nil { 13804 sv = &types.AccountLimit{} 13805 } else { 13806 sv = *v 13807 } 13808 13809 for { 13810 t, done, err := decoder.Token() 13811 if err != nil { 13812 return err 13813 } 13814 if done { 13815 break 13816 } 13817 originalDecoder := decoder 13818 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 13819 switch { 13820 case strings.EqualFold("Type", t.Name.Local): 13821 val, err := decoder.Value() 13822 if err != nil { 13823 return err 13824 } 13825 if val == nil { 13826 break 13827 } 13828 { 13829 xtv := string(val) 13830 sv.Type = types.AccountLimitType(xtv) 13831 } 13832 13833 case strings.EqualFold("Value", t.Name.Local): 13834 val, err := decoder.Value() 13835 if err != nil { 13836 return err 13837 } 13838 if val == nil { 13839 break 13840 } 13841 { 13842 xtv := string(val) 13843 i64, err := strconv.ParseInt(xtv, 10, 64) 13844 if err != nil { 13845 return err 13846 } 13847 sv.Value = ptr.Int64(i64) 13848 } 13849 13850 default: 13851 // Do nothing and ignore the unexpected tag element 13852 err = decoder.Decoder.Skip() 13853 if err != nil { 13854 return err 13855 } 13856 13857 } 13858 decoder = originalDecoder 13859 } 13860 *v = sv 13861 return nil 13862 } 13863 13864 func awsRestxml_deserializeDocumentAlarmIdentifier(v **types.AlarmIdentifier, decoder smithyxml.NodeDecoder) error { 13865 if v == nil { 13866 return fmt.Errorf("unexpected nil of type %T", v) 13867 } 13868 var sv *types.AlarmIdentifier 13869 if *v == nil { 13870 sv = &types.AlarmIdentifier{} 13871 } else { 13872 sv = *v 13873 } 13874 13875 for { 13876 t, done, err := decoder.Token() 13877 if err != nil { 13878 return err 13879 } 13880 if done { 13881 break 13882 } 13883 originalDecoder := decoder 13884 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 13885 switch { 13886 case strings.EqualFold("Name", t.Name.Local): 13887 val, err := decoder.Value() 13888 if err != nil { 13889 return err 13890 } 13891 if val == nil { 13892 break 13893 } 13894 { 13895 xtv := string(val) 13896 sv.Name = ptr.String(xtv) 13897 } 13898 13899 case strings.EqualFold("Region", t.Name.Local): 13900 val, err := decoder.Value() 13901 if err != nil { 13902 return err 13903 } 13904 if val == nil { 13905 break 13906 } 13907 { 13908 xtv := string(val) 13909 sv.Region = types.CloudWatchRegion(xtv) 13910 } 13911 13912 default: 13913 // Do nothing and ignore the unexpected tag element 13914 err = decoder.Decoder.Skip() 13915 if err != nil { 13916 return err 13917 } 13918 13919 } 13920 decoder = originalDecoder 13921 } 13922 *v = sv 13923 return nil 13924 } 13925 13926 func awsRestxml_deserializeDocumentAliasTarget(v **types.AliasTarget, decoder smithyxml.NodeDecoder) error { 13927 if v == nil { 13928 return fmt.Errorf("unexpected nil of type %T", v) 13929 } 13930 var sv *types.AliasTarget 13931 if *v == nil { 13932 sv = &types.AliasTarget{} 13933 } else { 13934 sv = *v 13935 } 13936 13937 for { 13938 t, done, err := decoder.Token() 13939 if err != nil { 13940 return err 13941 } 13942 if done { 13943 break 13944 } 13945 originalDecoder := decoder 13946 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 13947 switch { 13948 case strings.EqualFold("DNSName", t.Name.Local): 13949 val, err := decoder.Value() 13950 if err != nil { 13951 return err 13952 } 13953 if val == nil { 13954 break 13955 } 13956 { 13957 xtv := string(val) 13958 sv.DNSName = ptr.String(xtv) 13959 } 13960 13961 case strings.EqualFold("EvaluateTargetHealth", t.Name.Local): 13962 val, err := decoder.Value() 13963 if err != nil { 13964 return err 13965 } 13966 if val == nil { 13967 break 13968 } 13969 { 13970 xtv, err := strconv.ParseBool(string(val)) 13971 if err != nil { 13972 return fmt.Errorf("expected AliasHealthEnabled to be of type *bool, got %T instead", val) 13973 } 13974 sv.EvaluateTargetHealth = xtv 13975 } 13976 13977 case strings.EqualFold("HostedZoneId", t.Name.Local): 13978 val, err := decoder.Value() 13979 if err != nil { 13980 return err 13981 } 13982 if val == nil { 13983 break 13984 } 13985 { 13986 xtv := string(val) 13987 sv.HostedZoneId = ptr.String(xtv) 13988 } 13989 13990 default: 13991 // Do nothing and ignore the unexpected tag element 13992 err = decoder.Decoder.Skip() 13993 if err != nil { 13994 return err 13995 } 13996 13997 } 13998 decoder = originalDecoder 13999 } 14000 *v = sv 14001 return nil 14002 } 14003 14004 func awsRestxml_deserializeDocumentChangeInfo(v **types.ChangeInfo, decoder smithyxml.NodeDecoder) error { 14005 if v == nil { 14006 return fmt.Errorf("unexpected nil of type %T", v) 14007 } 14008 var sv *types.ChangeInfo 14009 if *v == nil { 14010 sv = &types.ChangeInfo{} 14011 } else { 14012 sv = *v 14013 } 14014 14015 for { 14016 t, done, err := decoder.Token() 14017 if err != nil { 14018 return err 14019 } 14020 if done { 14021 break 14022 } 14023 originalDecoder := decoder 14024 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14025 switch { 14026 case strings.EqualFold("Comment", t.Name.Local): 14027 val, err := decoder.Value() 14028 if err != nil { 14029 return err 14030 } 14031 if val == nil { 14032 break 14033 } 14034 { 14035 xtv := string(val) 14036 sv.Comment = ptr.String(xtv) 14037 } 14038 14039 case strings.EqualFold("Id", t.Name.Local): 14040 val, err := decoder.Value() 14041 if err != nil { 14042 return err 14043 } 14044 if val == nil { 14045 break 14046 } 14047 { 14048 xtv := string(val) 14049 sv.Id = ptr.String(xtv) 14050 } 14051 14052 case strings.EqualFold("Status", t.Name.Local): 14053 val, err := decoder.Value() 14054 if err != nil { 14055 return err 14056 } 14057 if val == nil { 14058 break 14059 } 14060 { 14061 xtv := string(val) 14062 sv.Status = types.ChangeStatus(xtv) 14063 } 14064 14065 case strings.EqualFold("SubmittedAt", t.Name.Local): 14066 val, err := decoder.Value() 14067 if err != nil { 14068 return err 14069 } 14070 if val == nil { 14071 break 14072 } 14073 { 14074 xtv := string(val) 14075 t, err := smithytime.ParseDateTime(xtv) 14076 if err != nil { 14077 return err 14078 } 14079 sv.SubmittedAt = ptr.Time(t) 14080 } 14081 14082 default: 14083 // Do nothing and ignore the unexpected tag element 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 14096 func awsRestxml_deserializeDocumentCheckerIpRanges(v *[]string, decoder smithyxml.NodeDecoder) error { 14097 if v == nil { 14098 return fmt.Errorf("unexpected nil of type %T", v) 14099 } 14100 var sv []string 14101 if *v == nil { 14102 sv = make([]string, 0) 14103 } else { 14104 sv = *v 14105 } 14106 14107 originalDecoder := decoder 14108 for { 14109 t, done, err := decoder.Token() 14110 if err != nil { 14111 return err 14112 } 14113 if done { 14114 break 14115 } 14116 memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14117 decoder = memberDecoder 14118 switch { 14119 case strings.EqualFold("member", t.Name.Local): 14120 var col string 14121 val, err := decoder.Value() 14122 if err != nil { 14123 return err 14124 } 14125 if val == nil { 14126 break 14127 } 14128 { 14129 xtv := string(val) 14130 col = xtv 14131 } 14132 sv = append(sv, col) 14133 14134 default: 14135 err = decoder.Decoder.Skip() 14136 if err != nil { 14137 return err 14138 } 14139 14140 } 14141 decoder = originalDecoder 14142 } 14143 *v = sv 14144 return nil 14145 } 14146 14147 func awsRestxml_deserializeDocumentCheckerIpRangesUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { 14148 var sv []string 14149 if *v == nil { 14150 sv = make([]string, 0) 14151 } else { 14152 sv = *v 14153 } 14154 14155 switch { 14156 default: 14157 var mv string 14158 t := decoder.StartEl 14159 _ = t 14160 val, err := decoder.Value() 14161 if err != nil { 14162 return err 14163 } 14164 if val == nil { 14165 break 14166 } 14167 { 14168 xtv := string(val) 14169 mv = xtv 14170 } 14171 sv = append(sv, mv) 14172 } 14173 *v = sv 14174 return nil 14175 } 14176 func awsRestxml_deserializeDocumentChildHealthCheckList(v *[]string, decoder smithyxml.NodeDecoder) error { 14177 if v == nil { 14178 return fmt.Errorf("unexpected nil of type %T", v) 14179 } 14180 var sv []string 14181 if *v == nil { 14182 sv = make([]string, 0) 14183 } else { 14184 sv = *v 14185 } 14186 14187 originalDecoder := decoder 14188 for { 14189 t, done, err := decoder.Token() 14190 if err != nil { 14191 return err 14192 } 14193 if done { 14194 break 14195 } 14196 memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14197 decoder = memberDecoder 14198 switch { 14199 case strings.EqualFold("ChildHealthCheck", t.Name.Local): 14200 var col string 14201 val, err := decoder.Value() 14202 if err != nil { 14203 return err 14204 } 14205 if val == nil { 14206 break 14207 } 14208 { 14209 xtv := string(val) 14210 col = xtv 14211 } 14212 sv = append(sv, col) 14213 14214 default: 14215 err = decoder.Decoder.Skip() 14216 if err != nil { 14217 return err 14218 } 14219 14220 } 14221 decoder = originalDecoder 14222 } 14223 *v = sv 14224 return nil 14225 } 14226 14227 func awsRestxml_deserializeDocumentChildHealthCheckListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { 14228 var sv []string 14229 if *v == nil { 14230 sv = make([]string, 0) 14231 } else { 14232 sv = *v 14233 } 14234 14235 switch { 14236 default: 14237 var mv string 14238 t := decoder.StartEl 14239 _ = t 14240 val, err := decoder.Value() 14241 if err != nil { 14242 return err 14243 } 14244 if val == nil { 14245 break 14246 } 14247 { 14248 xtv := string(val) 14249 mv = xtv 14250 } 14251 sv = append(sv, mv) 14252 } 14253 *v = sv 14254 return nil 14255 } 14256 func awsRestxml_deserializeDocumentCidrBlockInUseException(v **types.CidrBlockInUseException, decoder smithyxml.NodeDecoder) error { 14257 if v == nil { 14258 return fmt.Errorf("unexpected nil of type %T", v) 14259 } 14260 var sv *types.CidrBlockInUseException 14261 if *v == nil { 14262 sv = &types.CidrBlockInUseException{} 14263 } else { 14264 sv = *v 14265 } 14266 14267 for { 14268 t, done, err := decoder.Token() 14269 if err != nil { 14270 return err 14271 } 14272 if done { 14273 break 14274 } 14275 originalDecoder := decoder 14276 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14277 switch { 14278 case strings.EqualFold("Message", t.Name.Local): 14279 val, err := decoder.Value() 14280 if err != nil { 14281 return err 14282 } 14283 if val == nil { 14284 break 14285 } 14286 { 14287 xtv := string(val) 14288 sv.Message = ptr.String(xtv) 14289 } 14290 14291 default: 14292 // Do nothing and ignore the unexpected tag element 14293 err = decoder.Decoder.Skip() 14294 if err != nil { 14295 return err 14296 } 14297 14298 } 14299 decoder = originalDecoder 14300 } 14301 *v = sv 14302 return nil 14303 } 14304 14305 func awsRestxml_deserializeDocumentCidrBlockSummaries(v *[]types.CidrBlockSummary, decoder smithyxml.NodeDecoder) error { 14306 if v == nil { 14307 return fmt.Errorf("unexpected nil of type %T", v) 14308 } 14309 var sv []types.CidrBlockSummary 14310 if *v == nil { 14311 sv = make([]types.CidrBlockSummary, 0) 14312 } else { 14313 sv = *v 14314 } 14315 14316 originalDecoder := decoder 14317 for { 14318 t, done, err := decoder.Token() 14319 if err != nil { 14320 return err 14321 } 14322 if done { 14323 break 14324 } 14325 switch { 14326 case strings.EqualFold("member", t.Name.Local): 14327 var col types.CidrBlockSummary 14328 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14329 destAddr := &col 14330 if err := awsRestxml_deserializeDocumentCidrBlockSummary(&destAddr, nodeDecoder); err != nil { 14331 return err 14332 } 14333 col = *destAddr 14334 sv = append(sv, col) 14335 14336 default: 14337 err = decoder.Decoder.Skip() 14338 if err != nil { 14339 return err 14340 } 14341 14342 } 14343 decoder = originalDecoder 14344 } 14345 *v = sv 14346 return nil 14347 } 14348 14349 func awsRestxml_deserializeDocumentCidrBlockSummariesUnwrapped(v *[]types.CidrBlockSummary, decoder smithyxml.NodeDecoder) error { 14350 var sv []types.CidrBlockSummary 14351 if *v == nil { 14352 sv = make([]types.CidrBlockSummary, 0) 14353 } else { 14354 sv = *v 14355 } 14356 14357 switch { 14358 default: 14359 var mv types.CidrBlockSummary 14360 t := decoder.StartEl 14361 _ = t 14362 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14363 destAddr := &mv 14364 if err := awsRestxml_deserializeDocumentCidrBlockSummary(&destAddr, nodeDecoder); err != nil { 14365 return err 14366 } 14367 mv = *destAddr 14368 sv = append(sv, mv) 14369 } 14370 *v = sv 14371 return nil 14372 } 14373 func awsRestxml_deserializeDocumentCidrBlockSummary(v **types.CidrBlockSummary, decoder smithyxml.NodeDecoder) error { 14374 if v == nil { 14375 return fmt.Errorf("unexpected nil of type %T", v) 14376 } 14377 var sv *types.CidrBlockSummary 14378 if *v == nil { 14379 sv = &types.CidrBlockSummary{} 14380 } else { 14381 sv = *v 14382 } 14383 14384 for { 14385 t, done, err := decoder.Token() 14386 if err != nil { 14387 return err 14388 } 14389 if done { 14390 break 14391 } 14392 originalDecoder := decoder 14393 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14394 switch { 14395 case strings.EqualFold("CidrBlock", t.Name.Local): 14396 val, err := decoder.Value() 14397 if err != nil { 14398 return err 14399 } 14400 if val == nil { 14401 break 14402 } 14403 { 14404 xtv := string(val) 14405 sv.CidrBlock = ptr.String(xtv) 14406 } 14407 14408 case strings.EqualFold("LocationName", t.Name.Local): 14409 val, err := decoder.Value() 14410 if err != nil { 14411 return err 14412 } 14413 if val == nil { 14414 break 14415 } 14416 { 14417 xtv := string(val) 14418 sv.LocationName = ptr.String(xtv) 14419 } 14420 14421 default: 14422 // Do nothing and ignore the unexpected tag element 14423 err = decoder.Decoder.Skip() 14424 if err != nil { 14425 return err 14426 } 14427 14428 } 14429 decoder = originalDecoder 14430 } 14431 *v = sv 14432 return nil 14433 } 14434 14435 func awsRestxml_deserializeDocumentCidrCollection(v **types.CidrCollection, decoder smithyxml.NodeDecoder) error { 14436 if v == nil { 14437 return fmt.Errorf("unexpected nil of type %T", v) 14438 } 14439 var sv *types.CidrCollection 14440 if *v == nil { 14441 sv = &types.CidrCollection{} 14442 } else { 14443 sv = *v 14444 } 14445 14446 for { 14447 t, done, err := decoder.Token() 14448 if err != nil { 14449 return err 14450 } 14451 if done { 14452 break 14453 } 14454 originalDecoder := decoder 14455 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14456 switch { 14457 case strings.EqualFold("Arn", t.Name.Local): 14458 val, err := decoder.Value() 14459 if err != nil { 14460 return err 14461 } 14462 if val == nil { 14463 break 14464 } 14465 { 14466 xtv := string(val) 14467 sv.Arn = ptr.String(xtv) 14468 } 14469 14470 case strings.EqualFold("Id", t.Name.Local): 14471 val, err := decoder.Value() 14472 if err != nil { 14473 return err 14474 } 14475 if val == nil { 14476 break 14477 } 14478 { 14479 xtv := string(val) 14480 sv.Id = ptr.String(xtv) 14481 } 14482 14483 case strings.EqualFold("Name", t.Name.Local): 14484 val, err := decoder.Value() 14485 if err != nil { 14486 return err 14487 } 14488 if val == nil { 14489 break 14490 } 14491 { 14492 xtv := string(val) 14493 sv.Name = ptr.String(xtv) 14494 } 14495 14496 case strings.EqualFold("Version", t.Name.Local): 14497 val, err := decoder.Value() 14498 if err != nil { 14499 return err 14500 } 14501 if val == nil { 14502 break 14503 } 14504 { 14505 xtv := string(val) 14506 i64, err := strconv.ParseInt(xtv, 10, 64) 14507 if err != nil { 14508 return err 14509 } 14510 sv.Version = ptr.Int64(i64) 14511 } 14512 14513 default: 14514 // Do nothing and ignore the unexpected tag element 14515 err = decoder.Decoder.Skip() 14516 if err != nil { 14517 return err 14518 } 14519 14520 } 14521 decoder = originalDecoder 14522 } 14523 *v = sv 14524 return nil 14525 } 14526 14527 func awsRestxml_deserializeDocumentCidrCollectionAlreadyExistsException(v **types.CidrCollectionAlreadyExistsException, decoder smithyxml.NodeDecoder) error { 14528 if v == nil { 14529 return fmt.Errorf("unexpected nil of type %T", v) 14530 } 14531 var sv *types.CidrCollectionAlreadyExistsException 14532 if *v == nil { 14533 sv = &types.CidrCollectionAlreadyExistsException{} 14534 } else { 14535 sv = *v 14536 } 14537 14538 for { 14539 t, done, err := decoder.Token() 14540 if err != nil { 14541 return err 14542 } 14543 if done { 14544 break 14545 } 14546 originalDecoder := decoder 14547 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14548 switch { 14549 case strings.EqualFold("Message", t.Name.Local): 14550 val, err := decoder.Value() 14551 if err != nil { 14552 return err 14553 } 14554 if val == nil { 14555 break 14556 } 14557 { 14558 xtv := string(val) 14559 sv.Message = ptr.String(xtv) 14560 } 14561 14562 default: 14563 // Do nothing and ignore the unexpected tag element 14564 err = decoder.Decoder.Skip() 14565 if err != nil { 14566 return err 14567 } 14568 14569 } 14570 decoder = originalDecoder 14571 } 14572 *v = sv 14573 return nil 14574 } 14575 14576 func awsRestxml_deserializeDocumentCidrCollectionInUseException(v **types.CidrCollectionInUseException, decoder smithyxml.NodeDecoder) error { 14577 if v == nil { 14578 return fmt.Errorf("unexpected nil of type %T", v) 14579 } 14580 var sv *types.CidrCollectionInUseException 14581 if *v == nil { 14582 sv = &types.CidrCollectionInUseException{} 14583 } else { 14584 sv = *v 14585 } 14586 14587 for { 14588 t, done, err := decoder.Token() 14589 if err != nil { 14590 return err 14591 } 14592 if done { 14593 break 14594 } 14595 originalDecoder := decoder 14596 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14597 switch { 14598 case strings.EqualFold("Message", t.Name.Local): 14599 val, err := decoder.Value() 14600 if err != nil { 14601 return err 14602 } 14603 if val == nil { 14604 break 14605 } 14606 { 14607 xtv := string(val) 14608 sv.Message = ptr.String(xtv) 14609 } 14610 14611 default: 14612 // Do nothing and ignore the unexpected tag element 14613 err = decoder.Decoder.Skip() 14614 if err != nil { 14615 return err 14616 } 14617 14618 } 14619 decoder = originalDecoder 14620 } 14621 *v = sv 14622 return nil 14623 } 14624 14625 func awsRestxml_deserializeDocumentCidrCollectionVersionMismatchException(v **types.CidrCollectionVersionMismatchException, decoder smithyxml.NodeDecoder) error { 14626 if v == nil { 14627 return fmt.Errorf("unexpected nil of type %T", v) 14628 } 14629 var sv *types.CidrCollectionVersionMismatchException 14630 if *v == nil { 14631 sv = &types.CidrCollectionVersionMismatchException{} 14632 } else { 14633 sv = *v 14634 } 14635 14636 for { 14637 t, done, err := decoder.Token() 14638 if err != nil { 14639 return err 14640 } 14641 if done { 14642 break 14643 } 14644 originalDecoder := decoder 14645 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14646 switch { 14647 case strings.EqualFold("Message", t.Name.Local): 14648 val, err := decoder.Value() 14649 if err != nil { 14650 return err 14651 } 14652 if val == nil { 14653 break 14654 } 14655 { 14656 xtv := string(val) 14657 sv.Message = ptr.String(xtv) 14658 } 14659 14660 default: 14661 // Do nothing and ignore the unexpected tag element 14662 err = decoder.Decoder.Skip() 14663 if err != nil { 14664 return err 14665 } 14666 14667 } 14668 decoder = originalDecoder 14669 } 14670 *v = sv 14671 return nil 14672 } 14673 14674 func awsRestxml_deserializeDocumentCidrRoutingConfig(v **types.CidrRoutingConfig, decoder smithyxml.NodeDecoder) error { 14675 if v == nil { 14676 return fmt.Errorf("unexpected nil of type %T", v) 14677 } 14678 var sv *types.CidrRoutingConfig 14679 if *v == nil { 14680 sv = &types.CidrRoutingConfig{} 14681 } else { 14682 sv = *v 14683 } 14684 14685 for { 14686 t, done, err := decoder.Token() 14687 if err != nil { 14688 return err 14689 } 14690 if done { 14691 break 14692 } 14693 originalDecoder := decoder 14694 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14695 switch { 14696 case strings.EqualFold("CollectionId", t.Name.Local): 14697 val, err := decoder.Value() 14698 if err != nil { 14699 return err 14700 } 14701 if val == nil { 14702 break 14703 } 14704 { 14705 xtv := string(val) 14706 sv.CollectionId = ptr.String(xtv) 14707 } 14708 14709 case strings.EqualFold("LocationName", t.Name.Local): 14710 val, err := decoder.Value() 14711 if err != nil { 14712 return err 14713 } 14714 if val == nil { 14715 break 14716 } 14717 { 14718 xtv := string(val) 14719 sv.LocationName = ptr.String(xtv) 14720 } 14721 14722 default: 14723 // Do nothing and ignore the unexpected tag element 14724 err = decoder.Decoder.Skip() 14725 if err != nil { 14726 return err 14727 } 14728 14729 } 14730 decoder = originalDecoder 14731 } 14732 *v = sv 14733 return nil 14734 } 14735 14736 func awsRestxml_deserializeDocumentCloudWatchAlarmConfiguration(v **types.CloudWatchAlarmConfiguration, decoder smithyxml.NodeDecoder) error { 14737 if v == nil { 14738 return fmt.Errorf("unexpected nil of type %T", v) 14739 } 14740 var sv *types.CloudWatchAlarmConfiguration 14741 if *v == nil { 14742 sv = &types.CloudWatchAlarmConfiguration{} 14743 } else { 14744 sv = *v 14745 } 14746 14747 for { 14748 t, done, err := decoder.Token() 14749 if err != nil { 14750 return err 14751 } 14752 if done { 14753 break 14754 } 14755 originalDecoder := decoder 14756 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14757 switch { 14758 case strings.EqualFold("ComparisonOperator", t.Name.Local): 14759 val, err := decoder.Value() 14760 if err != nil { 14761 return err 14762 } 14763 if val == nil { 14764 break 14765 } 14766 { 14767 xtv := string(val) 14768 sv.ComparisonOperator = types.ComparisonOperator(xtv) 14769 } 14770 14771 case strings.EqualFold("Dimensions", t.Name.Local): 14772 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14773 if err := awsRestxml_deserializeDocumentDimensionList(&sv.Dimensions, nodeDecoder); err != nil { 14774 return err 14775 } 14776 14777 case strings.EqualFold("EvaluationPeriods", t.Name.Local): 14778 val, err := decoder.Value() 14779 if err != nil { 14780 return err 14781 } 14782 if val == nil { 14783 break 14784 } 14785 { 14786 xtv := string(val) 14787 i64, err := strconv.ParseInt(xtv, 10, 64) 14788 if err != nil { 14789 return err 14790 } 14791 sv.EvaluationPeriods = ptr.Int32(int32(i64)) 14792 } 14793 14794 case strings.EqualFold("MetricName", t.Name.Local): 14795 val, err := decoder.Value() 14796 if err != nil { 14797 return err 14798 } 14799 if val == nil { 14800 break 14801 } 14802 { 14803 xtv := string(val) 14804 sv.MetricName = ptr.String(xtv) 14805 } 14806 14807 case strings.EqualFold("Namespace", t.Name.Local): 14808 val, err := decoder.Value() 14809 if err != nil { 14810 return err 14811 } 14812 if val == nil { 14813 break 14814 } 14815 { 14816 xtv := string(val) 14817 sv.Namespace = ptr.String(xtv) 14818 } 14819 14820 case strings.EqualFold("Period", t.Name.Local): 14821 val, err := decoder.Value() 14822 if err != nil { 14823 return err 14824 } 14825 if val == nil { 14826 break 14827 } 14828 { 14829 xtv := string(val) 14830 i64, err := strconv.ParseInt(xtv, 10, 64) 14831 if err != nil { 14832 return err 14833 } 14834 sv.Period = ptr.Int32(int32(i64)) 14835 } 14836 14837 case strings.EqualFold("Statistic", t.Name.Local): 14838 val, err := decoder.Value() 14839 if err != nil { 14840 return err 14841 } 14842 if val == nil { 14843 break 14844 } 14845 { 14846 xtv := string(val) 14847 sv.Statistic = types.Statistic(xtv) 14848 } 14849 14850 case strings.EqualFold("Threshold", t.Name.Local): 14851 val, err := decoder.Value() 14852 if err != nil { 14853 return err 14854 } 14855 if val == nil { 14856 break 14857 } 14858 { 14859 xtv := string(val) 14860 f64, err := strconv.ParseFloat(xtv, 64) 14861 if err != nil { 14862 return err 14863 } 14864 sv.Threshold = ptr.Float64(f64) 14865 } 14866 14867 default: 14868 // Do nothing and ignore the unexpected tag element 14869 err = decoder.Decoder.Skip() 14870 if err != nil { 14871 return err 14872 } 14873 14874 } 14875 decoder = originalDecoder 14876 } 14877 *v = sv 14878 return nil 14879 } 14880 14881 func awsRestxml_deserializeDocumentCollectionSummaries(v *[]types.CollectionSummary, decoder smithyxml.NodeDecoder) error { 14882 if v == nil { 14883 return fmt.Errorf("unexpected nil of type %T", v) 14884 } 14885 var sv []types.CollectionSummary 14886 if *v == nil { 14887 sv = make([]types.CollectionSummary, 0) 14888 } else { 14889 sv = *v 14890 } 14891 14892 originalDecoder := decoder 14893 for { 14894 t, done, err := decoder.Token() 14895 if err != nil { 14896 return err 14897 } 14898 if done { 14899 break 14900 } 14901 switch { 14902 case strings.EqualFold("member", t.Name.Local): 14903 var col types.CollectionSummary 14904 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14905 destAddr := &col 14906 if err := awsRestxml_deserializeDocumentCollectionSummary(&destAddr, nodeDecoder); err != nil { 14907 return err 14908 } 14909 col = *destAddr 14910 sv = append(sv, col) 14911 14912 default: 14913 err = decoder.Decoder.Skip() 14914 if err != nil { 14915 return err 14916 } 14917 14918 } 14919 decoder = originalDecoder 14920 } 14921 *v = sv 14922 return nil 14923 } 14924 14925 func awsRestxml_deserializeDocumentCollectionSummariesUnwrapped(v *[]types.CollectionSummary, decoder smithyxml.NodeDecoder) error { 14926 var sv []types.CollectionSummary 14927 if *v == nil { 14928 sv = make([]types.CollectionSummary, 0) 14929 } else { 14930 sv = *v 14931 } 14932 14933 switch { 14934 default: 14935 var mv types.CollectionSummary 14936 t := decoder.StartEl 14937 _ = t 14938 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 14939 destAddr := &mv 14940 if err := awsRestxml_deserializeDocumentCollectionSummary(&destAddr, nodeDecoder); err != nil { 14941 return err 14942 } 14943 mv = *destAddr 14944 sv = append(sv, mv) 14945 } 14946 *v = sv 14947 return nil 14948 } 14949 func awsRestxml_deserializeDocumentCollectionSummary(v **types.CollectionSummary, decoder smithyxml.NodeDecoder) error { 14950 if v == nil { 14951 return fmt.Errorf("unexpected nil of type %T", v) 14952 } 14953 var sv *types.CollectionSummary 14954 if *v == nil { 14955 sv = &types.CollectionSummary{} 14956 } else { 14957 sv = *v 14958 } 14959 14960 for { 14961 t, done, err := decoder.Token() 14962 if err != nil { 14963 return err 14964 } 14965 if done { 14966 break 14967 } 14968 originalDecoder := decoder 14969 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 14970 switch { 14971 case strings.EqualFold("Arn", t.Name.Local): 14972 val, err := decoder.Value() 14973 if err != nil { 14974 return err 14975 } 14976 if val == nil { 14977 break 14978 } 14979 { 14980 xtv := string(val) 14981 sv.Arn = ptr.String(xtv) 14982 } 14983 14984 case strings.EqualFold("Id", t.Name.Local): 14985 val, err := decoder.Value() 14986 if err != nil { 14987 return err 14988 } 14989 if val == nil { 14990 break 14991 } 14992 { 14993 xtv := string(val) 14994 sv.Id = ptr.String(xtv) 14995 } 14996 14997 case strings.EqualFold("Name", t.Name.Local): 14998 val, err := decoder.Value() 14999 if err != nil { 15000 return err 15001 } 15002 if val == nil { 15003 break 15004 } 15005 { 15006 xtv := string(val) 15007 sv.Name = ptr.String(xtv) 15008 } 15009 15010 case strings.EqualFold("Version", t.Name.Local): 15011 val, err := decoder.Value() 15012 if err != nil { 15013 return err 15014 } 15015 if val == nil { 15016 break 15017 } 15018 { 15019 xtv := string(val) 15020 i64, err := strconv.ParseInt(xtv, 10, 64) 15021 if err != nil { 15022 return err 15023 } 15024 sv.Version = ptr.Int64(i64) 15025 } 15026 15027 default: 15028 // Do nothing and ignore the unexpected tag element 15029 err = decoder.Decoder.Skip() 15030 if err != nil { 15031 return err 15032 } 15033 15034 } 15035 decoder = originalDecoder 15036 } 15037 *v = sv 15038 return nil 15039 } 15040 15041 func awsRestxml_deserializeDocumentConcurrentModification(v **types.ConcurrentModification, decoder smithyxml.NodeDecoder) error { 15042 if v == nil { 15043 return fmt.Errorf("unexpected nil of type %T", v) 15044 } 15045 var sv *types.ConcurrentModification 15046 if *v == nil { 15047 sv = &types.ConcurrentModification{} 15048 } else { 15049 sv = *v 15050 } 15051 15052 for { 15053 t, done, err := decoder.Token() 15054 if err != nil { 15055 return err 15056 } 15057 if done { 15058 break 15059 } 15060 originalDecoder := decoder 15061 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15062 switch { 15063 case strings.EqualFold("message", t.Name.Local): 15064 val, err := decoder.Value() 15065 if err != nil { 15066 return err 15067 } 15068 if val == nil { 15069 break 15070 } 15071 { 15072 xtv := string(val) 15073 sv.Message = ptr.String(xtv) 15074 } 15075 15076 default: 15077 // Do nothing and ignore the unexpected tag element 15078 err = decoder.Decoder.Skip() 15079 if err != nil { 15080 return err 15081 } 15082 15083 } 15084 decoder = originalDecoder 15085 } 15086 *v = sv 15087 return nil 15088 } 15089 15090 func awsRestxml_deserializeDocumentConflictingDomainExists(v **types.ConflictingDomainExists, decoder smithyxml.NodeDecoder) error { 15091 if v == nil { 15092 return fmt.Errorf("unexpected nil of type %T", v) 15093 } 15094 var sv *types.ConflictingDomainExists 15095 if *v == nil { 15096 sv = &types.ConflictingDomainExists{} 15097 } else { 15098 sv = *v 15099 } 15100 15101 for { 15102 t, done, err := decoder.Token() 15103 if err != nil { 15104 return err 15105 } 15106 if done { 15107 break 15108 } 15109 originalDecoder := decoder 15110 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15111 switch { 15112 case strings.EqualFold("message", t.Name.Local): 15113 val, err := decoder.Value() 15114 if err != nil { 15115 return err 15116 } 15117 if val == nil { 15118 break 15119 } 15120 { 15121 xtv := string(val) 15122 sv.Message = ptr.String(xtv) 15123 } 15124 15125 default: 15126 // Do nothing and ignore the unexpected tag element 15127 err = decoder.Decoder.Skip() 15128 if err != nil { 15129 return err 15130 } 15131 15132 } 15133 decoder = originalDecoder 15134 } 15135 *v = sv 15136 return nil 15137 } 15138 15139 func awsRestxml_deserializeDocumentConflictingTypes(v **types.ConflictingTypes, decoder smithyxml.NodeDecoder) error { 15140 if v == nil { 15141 return fmt.Errorf("unexpected nil of type %T", v) 15142 } 15143 var sv *types.ConflictingTypes 15144 if *v == nil { 15145 sv = &types.ConflictingTypes{} 15146 } else { 15147 sv = *v 15148 } 15149 15150 for { 15151 t, done, err := decoder.Token() 15152 if err != nil { 15153 return err 15154 } 15155 if done { 15156 break 15157 } 15158 originalDecoder := decoder 15159 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15160 switch { 15161 case strings.EqualFold("message", t.Name.Local): 15162 val, err := decoder.Value() 15163 if err != nil { 15164 return err 15165 } 15166 if val == nil { 15167 break 15168 } 15169 { 15170 xtv := string(val) 15171 sv.Message = ptr.String(xtv) 15172 } 15173 15174 default: 15175 // Do nothing and ignore the unexpected tag element 15176 err = decoder.Decoder.Skip() 15177 if err != nil { 15178 return err 15179 } 15180 15181 } 15182 decoder = originalDecoder 15183 } 15184 *v = sv 15185 return nil 15186 } 15187 15188 func awsRestxml_deserializeDocumentCoordinates(v **types.Coordinates, decoder smithyxml.NodeDecoder) error { 15189 if v == nil { 15190 return fmt.Errorf("unexpected nil of type %T", v) 15191 } 15192 var sv *types.Coordinates 15193 if *v == nil { 15194 sv = &types.Coordinates{} 15195 } else { 15196 sv = *v 15197 } 15198 15199 for { 15200 t, done, err := decoder.Token() 15201 if err != nil { 15202 return err 15203 } 15204 if done { 15205 break 15206 } 15207 originalDecoder := decoder 15208 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15209 switch { 15210 case strings.EqualFold("Latitude", t.Name.Local): 15211 val, err := decoder.Value() 15212 if err != nil { 15213 return err 15214 } 15215 if val == nil { 15216 break 15217 } 15218 { 15219 xtv := string(val) 15220 sv.Latitude = ptr.String(xtv) 15221 } 15222 15223 case strings.EqualFold("Longitude", t.Name.Local): 15224 val, err := decoder.Value() 15225 if err != nil { 15226 return err 15227 } 15228 if val == nil { 15229 break 15230 } 15231 { 15232 xtv := string(val) 15233 sv.Longitude = ptr.String(xtv) 15234 } 15235 15236 default: 15237 // Do nothing and ignore the unexpected tag element 15238 err = decoder.Decoder.Skip() 15239 if err != nil { 15240 return err 15241 } 15242 15243 } 15244 decoder = originalDecoder 15245 } 15246 *v = sv 15247 return nil 15248 } 15249 15250 func awsRestxml_deserializeDocumentDelegationSet(v **types.DelegationSet, decoder smithyxml.NodeDecoder) error { 15251 if v == nil { 15252 return fmt.Errorf("unexpected nil of type %T", v) 15253 } 15254 var sv *types.DelegationSet 15255 if *v == nil { 15256 sv = &types.DelegationSet{} 15257 } else { 15258 sv = *v 15259 } 15260 15261 for { 15262 t, done, err := decoder.Token() 15263 if err != nil { 15264 return err 15265 } 15266 if done { 15267 break 15268 } 15269 originalDecoder := decoder 15270 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15271 switch { 15272 case strings.EqualFold("CallerReference", t.Name.Local): 15273 val, err := decoder.Value() 15274 if err != nil { 15275 return err 15276 } 15277 if val == nil { 15278 break 15279 } 15280 { 15281 xtv := string(val) 15282 sv.CallerReference = ptr.String(xtv) 15283 } 15284 15285 case strings.EqualFold("Id", t.Name.Local): 15286 val, err := decoder.Value() 15287 if err != nil { 15288 return err 15289 } 15290 if val == nil { 15291 break 15292 } 15293 { 15294 xtv := string(val) 15295 sv.Id = ptr.String(xtv) 15296 } 15297 15298 case strings.EqualFold("NameServers", t.Name.Local): 15299 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15300 if err := awsRestxml_deserializeDocumentDelegationSetNameServers(&sv.NameServers, nodeDecoder); err != nil { 15301 return err 15302 } 15303 15304 default: 15305 // Do nothing and ignore the unexpected tag element 15306 err = decoder.Decoder.Skip() 15307 if err != nil { 15308 return err 15309 } 15310 15311 } 15312 decoder = originalDecoder 15313 } 15314 *v = sv 15315 return nil 15316 } 15317 15318 func awsRestxml_deserializeDocumentDelegationSetAlreadyCreated(v **types.DelegationSetAlreadyCreated, decoder smithyxml.NodeDecoder) error { 15319 if v == nil { 15320 return fmt.Errorf("unexpected nil of type %T", v) 15321 } 15322 var sv *types.DelegationSetAlreadyCreated 15323 if *v == nil { 15324 sv = &types.DelegationSetAlreadyCreated{} 15325 } else { 15326 sv = *v 15327 } 15328 15329 for { 15330 t, done, err := decoder.Token() 15331 if err != nil { 15332 return err 15333 } 15334 if done { 15335 break 15336 } 15337 originalDecoder := decoder 15338 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15339 switch { 15340 case strings.EqualFold("message", t.Name.Local): 15341 val, err := decoder.Value() 15342 if err != nil { 15343 return err 15344 } 15345 if val == nil { 15346 break 15347 } 15348 { 15349 xtv := string(val) 15350 sv.Message = ptr.String(xtv) 15351 } 15352 15353 default: 15354 // Do nothing and ignore the unexpected tag element 15355 err = decoder.Decoder.Skip() 15356 if err != nil { 15357 return err 15358 } 15359 15360 } 15361 decoder = originalDecoder 15362 } 15363 *v = sv 15364 return nil 15365 } 15366 15367 func awsRestxml_deserializeDocumentDelegationSetAlreadyReusable(v **types.DelegationSetAlreadyReusable, decoder smithyxml.NodeDecoder) error { 15368 if v == nil { 15369 return fmt.Errorf("unexpected nil of type %T", v) 15370 } 15371 var sv *types.DelegationSetAlreadyReusable 15372 if *v == nil { 15373 sv = &types.DelegationSetAlreadyReusable{} 15374 } else { 15375 sv = *v 15376 } 15377 15378 for { 15379 t, done, err := decoder.Token() 15380 if err != nil { 15381 return err 15382 } 15383 if done { 15384 break 15385 } 15386 originalDecoder := decoder 15387 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15388 switch { 15389 case strings.EqualFold("message", t.Name.Local): 15390 val, err := decoder.Value() 15391 if err != nil { 15392 return err 15393 } 15394 if val == nil { 15395 break 15396 } 15397 { 15398 xtv := string(val) 15399 sv.Message = ptr.String(xtv) 15400 } 15401 15402 default: 15403 // Do nothing and ignore the unexpected tag element 15404 err = decoder.Decoder.Skip() 15405 if err != nil { 15406 return err 15407 } 15408 15409 } 15410 decoder = originalDecoder 15411 } 15412 *v = sv 15413 return nil 15414 } 15415 15416 func awsRestxml_deserializeDocumentDelegationSetInUse(v **types.DelegationSetInUse, decoder smithyxml.NodeDecoder) error { 15417 if v == nil { 15418 return fmt.Errorf("unexpected nil of type %T", v) 15419 } 15420 var sv *types.DelegationSetInUse 15421 if *v == nil { 15422 sv = &types.DelegationSetInUse{} 15423 } else { 15424 sv = *v 15425 } 15426 15427 for { 15428 t, done, err := decoder.Token() 15429 if err != nil { 15430 return err 15431 } 15432 if done { 15433 break 15434 } 15435 originalDecoder := decoder 15436 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15437 switch { 15438 case strings.EqualFold("message", t.Name.Local): 15439 val, err := decoder.Value() 15440 if err != nil { 15441 return err 15442 } 15443 if val == nil { 15444 break 15445 } 15446 { 15447 xtv := string(val) 15448 sv.Message = ptr.String(xtv) 15449 } 15450 15451 default: 15452 // Do nothing and ignore the unexpected tag element 15453 err = decoder.Decoder.Skip() 15454 if err != nil { 15455 return err 15456 } 15457 15458 } 15459 decoder = originalDecoder 15460 } 15461 *v = sv 15462 return nil 15463 } 15464 15465 func awsRestxml_deserializeDocumentDelegationSetNameServers(v *[]string, decoder smithyxml.NodeDecoder) error { 15466 if v == nil { 15467 return fmt.Errorf("unexpected nil of type %T", v) 15468 } 15469 var sv []string 15470 if *v == nil { 15471 sv = make([]string, 0) 15472 } else { 15473 sv = *v 15474 } 15475 15476 originalDecoder := decoder 15477 for { 15478 t, done, err := decoder.Token() 15479 if err != nil { 15480 return err 15481 } 15482 if done { 15483 break 15484 } 15485 memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15486 decoder = memberDecoder 15487 switch { 15488 case strings.EqualFold("NameServer", t.Name.Local): 15489 var col string 15490 val, err := decoder.Value() 15491 if err != nil { 15492 return err 15493 } 15494 if val == nil { 15495 break 15496 } 15497 { 15498 xtv := string(val) 15499 col = xtv 15500 } 15501 sv = append(sv, col) 15502 15503 default: 15504 err = decoder.Decoder.Skip() 15505 if err != nil { 15506 return err 15507 } 15508 15509 } 15510 decoder = originalDecoder 15511 } 15512 *v = sv 15513 return nil 15514 } 15515 15516 func awsRestxml_deserializeDocumentDelegationSetNameServersUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { 15517 var sv []string 15518 if *v == nil { 15519 sv = make([]string, 0) 15520 } else { 15521 sv = *v 15522 } 15523 15524 switch { 15525 default: 15526 var mv string 15527 t := decoder.StartEl 15528 _ = t 15529 val, err := decoder.Value() 15530 if err != nil { 15531 return err 15532 } 15533 if val == nil { 15534 break 15535 } 15536 { 15537 xtv := string(val) 15538 mv = xtv 15539 } 15540 sv = append(sv, mv) 15541 } 15542 *v = sv 15543 return nil 15544 } 15545 func awsRestxml_deserializeDocumentDelegationSetNotAvailable(v **types.DelegationSetNotAvailable, decoder smithyxml.NodeDecoder) error { 15546 if v == nil { 15547 return fmt.Errorf("unexpected nil of type %T", v) 15548 } 15549 var sv *types.DelegationSetNotAvailable 15550 if *v == nil { 15551 sv = &types.DelegationSetNotAvailable{} 15552 } else { 15553 sv = *v 15554 } 15555 15556 for { 15557 t, done, err := decoder.Token() 15558 if err != nil { 15559 return err 15560 } 15561 if done { 15562 break 15563 } 15564 originalDecoder := decoder 15565 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15566 switch { 15567 case strings.EqualFold("message", t.Name.Local): 15568 val, err := decoder.Value() 15569 if err != nil { 15570 return err 15571 } 15572 if val == nil { 15573 break 15574 } 15575 { 15576 xtv := string(val) 15577 sv.Message = ptr.String(xtv) 15578 } 15579 15580 default: 15581 // Do nothing and ignore the unexpected tag element 15582 err = decoder.Decoder.Skip() 15583 if err != nil { 15584 return err 15585 } 15586 15587 } 15588 decoder = originalDecoder 15589 } 15590 *v = sv 15591 return nil 15592 } 15593 15594 func awsRestxml_deserializeDocumentDelegationSetNotReusable(v **types.DelegationSetNotReusable, decoder smithyxml.NodeDecoder) error { 15595 if v == nil { 15596 return fmt.Errorf("unexpected nil of type %T", v) 15597 } 15598 var sv *types.DelegationSetNotReusable 15599 if *v == nil { 15600 sv = &types.DelegationSetNotReusable{} 15601 } else { 15602 sv = *v 15603 } 15604 15605 for { 15606 t, done, err := decoder.Token() 15607 if err != nil { 15608 return err 15609 } 15610 if done { 15611 break 15612 } 15613 originalDecoder := decoder 15614 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15615 switch { 15616 case strings.EqualFold("message", t.Name.Local): 15617 val, err := decoder.Value() 15618 if err != nil { 15619 return err 15620 } 15621 if val == nil { 15622 break 15623 } 15624 { 15625 xtv := string(val) 15626 sv.Message = ptr.String(xtv) 15627 } 15628 15629 default: 15630 // Do nothing and ignore the unexpected tag element 15631 err = decoder.Decoder.Skip() 15632 if err != nil { 15633 return err 15634 } 15635 15636 } 15637 decoder = originalDecoder 15638 } 15639 *v = sv 15640 return nil 15641 } 15642 15643 func awsRestxml_deserializeDocumentDelegationSets(v *[]types.DelegationSet, decoder smithyxml.NodeDecoder) error { 15644 if v == nil { 15645 return fmt.Errorf("unexpected nil of type %T", v) 15646 } 15647 var sv []types.DelegationSet 15648 if *v == nil { 15649 sv = make([]types.DelegationSet, 0) 15650 } else { 15651 sv = *v 15652 } 15653 15654 originalDecoder := decoder 15655 for { 15656 t, done, err := decoder.Token() 15657 if err != nil { 15658 return err 15659 } 15660 if done { 15661 break 15662 } 15663 switch { 15664 case strings.EqualFold("DelegationSet", t.Name.Local): 15665 var col types.DelegationSet 15666 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15667 destAddr := &col 15668 if err := awsRestxml_deserializeDocumentDelegationSet(&destAddr, nodeDecoder); err != nil { 15669 return err 15670 } 15671 col = *destAddr 15672 sv = append(sv, col) 15673 15674 default: 15675 err = decoder.Decoder.Skip() 15676 if err != nil { 15677 return err 15678 } 15679 15680 } 15681 decoder = originalDecoder 15682 } 15683 *v = sv 15684 return nil 15685 } 15686 15687 func awsRestxml_deserializeDocumentDelegationSetsUnwrapped(v *[]types.DelegationSet, decoder smithyxml.NodeDecoder) error { 15688 var sv []types.DelegationSet 15689 if *v == nil { 15690 sv = make([]types.DelegationSet, 0) 15691 } else { 15692 sv = *v 15693 } 15694 15695 switch { 15696 default: 15697 var mv types.DelegationSet 15698 t := decoder.StartEl 15699 _ = t 15700 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15701 destAddr := &mv 15702 if err := awsRestxml_deserializeDocumentDelegationSet(&destAddr, nodeDecoder); err != nil { 15703 return err 15704 } 15705 mv = *destAddr 15706 sv = append(sv, mv) 15707 } 15708 *v = sv 15709 return nil 15710 } 15711 func awsRestxml_deserializeDocumentDimension(v **types.Dimension, decoder smithyxml.NodeDecoder) error { 15712 if v == nil { 15713 return fmt.Errorf("unexpected nil of type %T", v) 15714 } 15715 var sv *types.Dimension 15716 if *v == nil { 15717 sv = &types.Dimension{} 15718 } else { 15719 sv = *v 15720 } 15721 15722 for { 15723 t, done, err := decoder.Token() 15724 if err != nil { 15725 return err 15726 } 15727 if done { 15728 break 15729 } 15730 originalDecoder := decoder 15731 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15732 switch { 15733 case strings.EqualFold("Name", t.Name.Local): 15734 val, err := decoder.Value() 15735 if err != nil { 15736 return err 15737 } 15738 if val == nil { 15739 break 15740 } 15741 { 15742 xtv := string(val) 15743 sv.Name = ptr.String(xtv) 15744 } 15745 15746 case strings.EqualFold("Value", t.Name.Local): 15747 val, err := decoder.Value() 15748 if err != nil { 15749 return err 15750 } 15751 if val == nil { 15752 break 15753 } 15754 { 15755 xtv := string(val) 15756 sv.Value = ptr.String(xtv) 15757 } 15758 15759 default: 15760 // Do nothing and ignore the unexpected tag element 15761 err = decoder.Decoder.Skip() 15762 if err != nil { 15763 return err 15764 } 15765 15766 } 15767 decoder = originalDecoder 15768 } 15769 *v = sv 15770 return nil 15771 } 15772 15773 func awsRestxml_deserializeDocumentDimensionList(v *[]types.Dimension, decoder smithyxml.NodeDecoder) error { 15774 if v == nil { 15775 return fmt.Errorf("unexpected nil of type %T", v) 15776 } 15777 var sv []types.Dimension 15778 if *v == nil { 15779 sv = make([]types.Dimension, 0) 15780 } else { 15781 sv = *v 15782 } 15783 15784 originalDecoder := decoder 15785 for { 15786 t, done, err := decoder.Token() 15787 if err != nil { 15788 return err 15789 } 15790 if done { 15791 break 15792 } 15793 switch { 15794 case strings.EqualFold("Dimension", t.Name.Local): 15795 var col types.Dimension 15796 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15797 destAddr := &col 15798 if err := awsRestxml_deserializeDocumentDimension(&destAddr, nodeDecoder); err != nil { 15799 return err 15800 } 15801 col = *destAddr 15802 sv = append(sv, col) 15803 15804 default: 15805 err = decoder.Decoder.Skip() 15806 if err != nil { 15807 return err 15808 } 15809 15810 } 15811 decoder = originalDecoder 15812 } 15813 *v = sv 15814 return nil 15815 } 15816 15817 func awsRestxml_deserializeDocumentDimensionListUnwrapped(v *[]types.Dimension, decoder smithyxml.NodeDecoder) error { 15818 var sv []types.Dimension 15819 if *v == nil { 15820 sv = make([]types.Dimension, 0) 15821 } else { 15822 sv = *v 15823 } 15824 15825 switch { 15826 default: 15827 var mv types.Dimension 15828 t := decoder.StartEl 15829 _ = t 15830 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15831 destAddr := &mv 15832 if err := awsRestxml_deserializeDocumentDimension(&destAddr, nodeDecoder); err != nil { 15833 return err 15834 } 15835 mv = *destAddr 15836 sv = append(sv, mv) 15837 } 15838 *v = sv 15839 return nil 15840 } 15841 func awsRestxml_deserializeDocumentDNSSECNotFound(v **types.DNSSECNotFound, decoder smithyxml.NodeDecoder) error { 15842 if v == nil { 15843 return fmt.Errorf("unexpected nil of type %T", v) 15844 } 15845 var sv *types.DNSSECNotFound 15846 if *v == nil { 15847 sv = &types.DNSSECNotFound{} 15848 } else { 15849 sv = *v 15850 } 15851 15852 for { 15853 t, done, err := decoder.Token() 15854 if err != nil { 15855 return err 15856 } 15857 if done { 15858 break 15859 } 15860 originalDecoder := decoder 15861 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15862 switch { 15863 case strings.EqualFold("message", t.Name.Local): 15864 val, err := decoder.Value() 15865 if err != nil { 15866 return err 15867 } 15868 if val == nil { 15869 break 15870 } 15871 { 15872 xtv := string(val) 15873 sv.Message = ptr.String(xtv) 15874 } 15875 15876 default: 15877 // Do nothing and ignore the unexpected tag element 15878 err = decoder.Decoder.Skip() 15879 if err != nil { 15880 return err 15881 } 15882 15883 } 15884 decoder = originalDecoder 15885 } 15886 *v = sv 15887 return nil 15888 } 15889 15890 func awsRestxml_deserializeDocumentDNSSECStatus(v **types.DNSSECStatus, decoder smithyxml.NodeDecoder) error { 15891 if v == nil { 15892 return fmt.Errorf("unexpected nil of type %T", v) 15893 } 15894 var sv *types.DNSSECStatus 15895 if *v == nil { 15896 sv = &types.DNSSECStatus{} 15897 } else { 15898 sv = *v 15899 } 15900 15901 for { 15902 t, done, err := decoder.Token() 15903 if err != nil { 15904 return err 15905 } 15906 if done { 15907 break 15908 } 15909 originalDecoder := decoder 15910 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 15911 switch { 15912 case strings.EqualFold("ServeSignature", t.Name.Local): 15913 val, err := decoder.Value() 15914 if err != nil { 15915 return err 15916 } 15917 if val == nil { 15918 break 15919 } 15920 { 15921 xtv := string(val) 15922 sv.ServeSignature = ptr.String(xtv) 15923 } 15924 15925 case strings.EqualFold("StatusMessage", t.Name.Local): 15926 val, err := decoder.Value() 15927 if err != nil { 15928 return err 15929 } 15930 if val == nil { 15931 break 15932 } 15933 { 15934 xtv := string(val) 15935 sv.StatusMessage = ptr.String(xtv) 15936 } 15937 15938 default: 15939 // Do nothing and ignore the unexpected tag element 15940 err = decoder.Decoder.Skip() 15941 if err != nil { 15942 return err 15943 } 15944 15945 } 15946 decoder = originalDecoder 15947 } 15948 *v = sv 15949 return nil 15950 } 15951 15952 func awsRestxml_deserializeDocumentErrorMessages(v *[]string, decoder smithyxml.NodeDecoder) error { 15953 if v == nil { 15954 return fmt.Errorf("unexpected nil of type %T", v) 15955 } 15956 var sv []string 15957 if *v == nil { 15958 sv = make([]string, 0) 15959 } else { 15960 sv = *v 15961 } 15962 15963 originalDecoder := decoder 15964 for { 15965 t, done, err := decoder.Token() 15966 if err != nil { 15967 return err 15968 } 15969 if done { 15970 break 15971 } 15972 memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 15973 decoder = memberDecoder 15974 switch { 15975 case strings.EqualFold("Message", t.Name.Local): 15976 var col string 15977 val, err := decoder.Value() 15978 if err != nil { 15979 return err 15980 } 15981 if val == nil { 15982 break 15983 } 15984 { 15985 xtv := string(val) 15986 col = xtv 15987 } 15988 sv = append(sv, col) 15989 15990 default: 15991 err = decoder.Decoder.Skip() 15992 if err != nil { 15993 return err 15994 } 15995 15996 } 15997 decoder = originalDecoder 15998 } 15999 *v = sv 16000 return nil 16001 } 16002 16003 func awsRestxml_deserializeDocumentErrorMessagesUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { 16004 var sv []string 16005 if *v == nil { 16006 sv = make([]string, 0) 16007 } else { 16008 sv = *v 16009 } 16010 16011 switch { 16012 default: 16013 var mv string 16014 t := decoder.StartEl 16015 _ = t 16016 val, err := decoder.Value() 16017 if err != nil { 16018 return err 16019 } 16020 if val == nil { 16021 break 16022 } 16023 { 16024 xtv := string(val) 16025 mv = xtv 16026 } 16027 sv = append(sv, mv) 16028 } 16029 *v = sv 16030 return nil 16031 } 16032 func awsRestxml_deserializeDocumentGeoLocation(v **types.GeoLocation, decoder smithyxml.NodeDecoder) error { 16033 if v == nil { 16034 return fmt.Errorf("unexpected nil of type %T", v) 16035 } 16036 var sv *types.GeoLocation 16037 if *v == nil { 16038 sv = &types.GeoLocation{} 16039 } else { 16040 sv = *v 16041 } 16042 16043 for { 16044 t, done, err := decoder.Token() 16045 if err != nil { 16046 return err 16047 } 16048 if done { 16049 break 16050 } 16051 originalDecoder := decoder 16052 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16053 switch { 16054 case strings.EqualFold("ContinentCode", t.Name.Local): 16055 val, err := decoder.Value() 16056 if err != nil { 16057 return err 16058 } 16059 if val == nil { 16060 break 16061 } 16062 { 16063 xtv := string(val) 16064 sv.ContinentCode = ptr.String(xtv) 16065 } 16066 16067 case strings.EqualFold("CountryCode", t.Name.Local): 16068 val, err := decoder.Value() 16069 if err != nil { 16070 return err 16071 } 16072 if val == nil { 16073 break 16074 } 16075 { 16076 xtv := string(val) 16077 sv.CountryCode = ptr.String(xtv) 16078 } 16079 16080 case strings.EqualFold("SubdivisionCode", t.Name.Local): 16081 val, err := decoder.Value() 16082 if err != nil { 16083 return err 16084 } 16085 if val == nil { 16086 break 16087 } 16088 { 16089 xtv := string(val) 16090 sv.SubdivisionCode = ptr.String(xtv) 16091 } 16092 16093 default: 16094 // Do nothing and ignore the unexpected tag element 16095 err = decoder.Decoder.Skip() 16096 if err != nil { 16097 return err 16098 } 16099 16100 } 16101 decoder = originalDecoder 16102 } 16103 *v = sv 16104 return nil 16105 } 16106 16107 func awsRestxml_deserializeDocumentGeoLocationDetails(v **types.GeoLocationDetails, decoder smithyxml.NodeDecoder) error { 16108 if v == nil { 16109 return fmt.Errorf("unexpected nil of type %T", v) 16110 } 16111 var sv *types.GeoLocationDetails 16112 if *v == nil { 16113 sv = &types.GeoLocationDetails{} 16114 } else { 16115 sv = *v 16116 } 16117 16118 for { 16119 t, done, err := decoder.Token() 16120 if err != nil { 16121 return err 16122 } 16123 if done { 16124 break 16125 } 16126 originalDecoder := decoder 16127 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16128 switch { 16129 case strings.EqualFold("ContinentCode", t.Name.Local): 16130 val, err := decoder.Value() 16131 if err != nil { 16132 return err 16133 } 16134 if val == nil { 16135 break 16136 } 16137 { 16138 xtv := string(val) 16139 sv.ContinentCode = ptr.String(xtv) 16140 } 16141 16142 case strings.EqualFold("ContinentName", t.Name.Local): 16143 val, err := decoder.Value() 16144 if err != nil { 16145 return err 16146 } 16147 if val == nil { 16148 break 16149 } 16150 { 16151 xtv := string(val) 16152 sv.ContinentName = ptr.String(xtv) 16153 } 16154 16155 case strings.EqualFold("CountryCode", t.Name.Local): 16156 val, err := decoder.Value() 16157 if err != nil { 16158 return err 16159 } 16160 if val == nil { 16161 break 16162 } 16163 { 16164 xtv := string(val) 16165 sv.CountryCode = ptr.String(xtv) 16166 } 16167 16168 case strings.EqualFold("CountryName", t.Name.Local): 16169 val, err := decoder.Value() 16170 if err != nil { 16171 return err 16172 } 16173 if val == nil { 16174 break 16175 } 16176 { 16177 xtv := string(val) 16178 sv.CountryName = ptr.String(xtv) 16179 } 16180 16181 case strings.EqualFold("SubdivisionCode", t.Name.Local): 16182 val, err := decoder.Value() 16183 if err != nil { 16184 return err 16185 } 16186 if val == nil { 16187 break 16188 } 16189 { 16190 xtv := string(val) 16191 sv.SubdivisionCode = ptr.String(xtv) 16192 } 16193 16194 case strings.EqualFold("SubdivisionName", t.Name.Local): 16195 val, err := decoder.Value() 16196 if err != nil { 16197 return err 16198 } 16199 if val == nil { 16200 break 16201 } 16202 { 16203 xtv := string(val) 16204 sv.SubdivisionName = ptr.String(xtv) 16205 } 16206 16207 default: 16208 // Do nothing and ignore the unexpected tag element 16209 err = decoder.Decoder.Skip() 16210 if err != nil { 16211 return err 16212 } 16213 16214 } 16215 decoder = originalDecoder 16216 } 16217 *v = sv 16218 return nil 16219 } 16220 16221 func awsRestxml_deserializeDocumentGeoLocationDetailsList(v *[]types.GeoLocationDetails, decoder smithyxml.NodeDecoder) error { 16222 if v == nil { 16223 return fmt.Errorf("unexpected nil of type %T", v) 16224 } 16225 var sv []types.GeoLocationDetails 16226 if *v == nil { 16227 sv = make([]types.GeoLocationDetails, 0) 16228 } else { 16229 sv = *v 16230 } 16231 16232 originalDecoder := decoder 16233 for { 16234 t, done, err := decoder.Token() 16235 if err != nil { 16236 return err 16237 } 16238 if done { 16239 break 16240 } 16241 switch { 16242 case strings.EqualFold("GeoLocationDetails", t.Name.Local): 16243 var col types.GeoLocationDetails 16244 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16245 destAddr := &col 16246 if err := awsRestxml_deserializeDocumentGeoLocationDetails(&destAddr, nodeDecoder); err != nil { 16247 return err 16248 } 16249 col = *destAddr 16250 sv = append(sv, col) 16251 16252 default: 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 16265 func awsRestxml_deserializeDocumentGeoLocationDetailsListUnwrapped(v *[]types.GeoLocationDetails, decoder smithyxml.NodeDecoder) error { 16266 var sv []types.GeoLocationDetails 16267 if *v == nil { 16268 sv = make([]types.GeoLocationDetails, 0) 16269 } else { 16270 sv = *v 16271 } 16272 16273 switch { 16274 default: 16275 var mv types.GeoLocationDetails 16276 t := decoder.StartEl 16277 _ = t 16278 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16279 destAddr := &mv 16280 if err := awsRestxml_deserializeDocumentGeoLocationDetails(&destAddr, nodeDecoder); err != nil { 16281 return err 16282 } 16283 mv = *destAddr 16284 sv = append(sv, mv) 16285 } 16286 *v = sv 16287 return nil 16288 } 16289 func awsRestxml_deserializeDocumentGeoProximityLocation(v **types.GeoProximityLocation, decoder smithyxml.NodeDecoder) error { 16290 if v == nil { 16291 return fmt.Errorf("unexpected nil of type %T", v) 16292 } 16293 var sv *types.GeoProximityLocation 16294 if *v == nil { 16295 sv = &types.GeoProximityLocation{} 16296 } else { 16297 sv = *v 16298 } 16299 16300 for { 16301 t, done, err := decoder.Token() 16302 if err != nil { 16303 return err 16304 } 16305 if done { 16306 break 16307 } 16308 originalDecoder := decoder 16309 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16310 switch { 16311 case strings.EqualFold("AWSRegion", t.Name.Local): 16312 val, err := decoder.Value() 16313 if err != nil { 16314 return err 16315 } 16316 if val == nil { 16317 break 16318 } 16319 { 16320 xtv := string(val) 16321 sv.AWSRegion = ptr.String(xtv) 16322 } 16323 16324 case strings.EqualFold("Bias", t.Name.Local): 16325 val, err := decoder.Value() 16326 if err != nil { 16327 return err 16328 } 16329 if val == nil { 16330 break 16331 } 16332 { 16333 xtv := string(val) 16334 i64, err := strconv.ParseInt(xtv, 10, 64) 16335 if err != nil { 16336 return err 16337 } 16338 sv.Bias = ptr.Int32(int32(i64)) 16339 } 16340 16341 case strings.EqualFold("Coordinates", t.Name.Local): 16342 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16343 if err := awsRestxml_deserializeDocumentCoordinates(&sv.Coordinates, nodeDecoder); err != nil { 16344 return err 16345 } 16346 16347 case strings.EqualFold("LocalZoneGroup", t.Name.Local): 16348 val, err := decoder.Value() 16349 if err != nil { 16350 return err 16351 } 16352 if val == nil { 16353 break 16354 } 16355 { 16356 xtv := string(val) 16357 sv.LocalZoneGroup = ptr.String(xtv) 16358 } 16359 16360 default: 16361 // Do nothing and ignore the unexpected tag element 16362 err = decoder.Decoder.Skip() 16363 if err != nil { 16364 return err 16365 } 16366 16367 } 16368 decoder = originalDecoder 16369 } 16370 *v = sv 16371 return nil 16372 } 16373 16374 func awsRestxml_deserializeDocumentHealthCheck(v **types.HealthCheck, decoder smithyxml.NodeDecoder) error { 16375 if v == nil { 16376 return fmt.Errorf("unexpected nil of type %T", v) 16377 } 16378 var sv *types.HealthCheck 16379 if *v == nil { 16380 sv = &types.HealthCheck{} 16381 } else { 16382 sv = *v 16383 } 16384 16385 for { 16386 t, done, err := decoder.Token() 16387 if err != nil { 16388 return err 16389 } 16390 if done { 16391 break 16392 } 16393 originalDecoder := decoder 16394 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16395 switch { 16396 case strings.EqualFold("CallerReference", t.Name.Local): 16397 val, err := decoder.Value() 16398 if err != nil { 16399 return err 16400 } 16401 if val == nil { 16402 break 16403 } 16404 { 16405 xtv := string(val) 16406 sv.CallerReference = ptr.String(xtv) 16407 } 16408 16409 case strings.EqualFold("CloudWatchAlarmConfiguration", t.Name.Local): 16410 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16411 if err := awsRestxml_deserializeDocumentCloudWatchAlarmConfiguration(&sv.CloudWatchAlarmConfiguration, nodeDecoder); err != nil { 16412 return err 16413 } 16414 16415 case strings.EqualFold("HealthCheckConfig", t.Name.Local): 16416 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16417 if err := awsRestxml_deserializeDocumentHealthCheckConfig(&sv.HealthCheckConfig, nodeDecoder); err != nil { 16418 return err 16419 } 16420 16421 case strings.EqualFold("HealthCheckVersion", t.Name.Local): 16422 val, err := decoder.Value() 16423 if err != nil { 16424 return err 16425 } 16426 if val == nil { 16427 break 16428 } 16429 { 16430 xtv := string(val) 16431 i64, err := strconv.ParseInt(xtv, 10, 64) 16432 if err != nil { 16433 return err 16434 } 16435 sv.HealthCheckVersion = ptr.Int64(i64) 16436 } 16437 16438 case strings.EqualFold("Id", t.Name.Local): 16439 val, err := decoder.Value() 16440 if err != nil { 16441 return err 16442 } 16443 if val == nil { 16444 break 16445 } 16446 { 16447 xtv := string(val) 16448 sv.Id = ptr.String(xtv) 16449 } 16450 16451 case strings.EqualFold("LinkedService", t.Name.Local): 16452 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16453 if err := awsRestxml_deserializeDocumentLinkedService(&sv.LinkedService, nodeDecoder); err != nil { 16454 return err 16455 } 16456 16457 default: 16458 // Do nothing and ignore the unexpected tag element 16459 err = decoder.Decoder.Skip() 16460 if err != nil { 16461 return err 16462 } 16463 16464 } 16465 decoder = originalDecoder 16466 } 16467 *v = sv 16468 return nil 16469 } 16470 16471 func awsRestxml_deserializeDocumentHealthCheckAlreadyExists(v **types.HealthCheckAlreadyExists, decoder smithyxml.NodeDecoder) error { 16472 if v == nil { 16473 return fmt.Errorf("unexpected nil of type %T", v) 16474 } 16475 var sv *types.HealthCheckAlreadyExists 16476 if *v == nil { 16477 sv = &types.HealthCheckAlreadyExists{} 16478 } else { 16479 sv = *v 16480 } 16481 16482 for { 16483 t, done, err := decoder.Token() 16484 if err != nil { 16485 return err 16486 } 16487 if done { 16488 break 16489 } 16490 originalDecoder := decoder 16491 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16492 switch { 16493 case strings.EqualFold("message", t.Name.Local): 16494 val, err := decoder.Value() 16495 if err != nil { 16496 return err 16497 } 16498 if val == nil { 16499 break 16500 } 16501 { 16502 xtv := string(val) 16503 sv.Message = ptr.String(xtv) 16504 } 16505 16506 default: 16507 // Do nothing and ignore the unexpected tag element 16508 err = decoder.Decoder.Skip() 16509 if err != nil { 16510 return err 16511 } 16512 16513 } 16514 decoder = originalDecoder 16515 } 16516 *v = sv 16517 return nil 16518 } 16519 16520 func awsRestxml_deserializeDocumentHealthCheckConfig(v **types.HealthCheckConfig, decoder smithyxml.NodeDecoder) error { 16521 if v == nil { 16522 return fmt.Errorf("unexpected nil of type %T", v) 16523 } 16524 var sv *types.HealthCheckConfig 16525 if *v == nil { 16526 sv = &types.HealthCheckConfig{} 16527 } else { 16528 sv = *v 16529 } 16530 16531 for { 16532 t, done, err := decoder.Token() 16533 if err != nil { 16534 return err 16535 } 16536 if done { 16537 break 16538 } 16539 originalDecoder := decoder 16540 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16541 switch { 16542 case strings.EqualFold("AlarmIdentifier", t.Name.Local): 16543 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16544 if err := awsRestxml_deserializeDocumentAlarmIdentifier(&sv.AlarmIdentifier, nodeDecoder); err != nil { 16545 return err 16546 } 16547 16548 case strings.EqualFold("ChildHealthChecks", t.Name.Local): 16549 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16550 if err := awsRestxml_deserializeDocumentChildHealthCheckList(&sv.ChildHealthChecks, nodeDecoder); err != nil { 16551 return err 16552 } 16553 16554 case strings.EqualFold("Disabled", t.Name.Local): 16555 val, err := decoder.Value() 16556 if err != nil { 16557 return err 16558 } 16559 if val == nil { 16560 break 16561 } 16562 { 16563 xtv, err := strconv.ParseBool(string(val)) 16564 if err != nil { 16565 return fmt.Errorf("expected Disabled to be of type *bool, got %T instead", val) 16566 } 16567 sv.Disabled = ptr.Bool(xtv) 16568 } 16569 16570 case strings.EqualFold("EnableSNI", t.Name.Local): 16571 val, err := decoder.Value() 16572 if err != nil { 16573 return err 16574 } 16575 if val == nil { 16576 break 16577 } 16578 { 16579 xtv, err := strconv.ParseBool(string(val)) 16580 if err != nil { 16581 return fmt.Errorf("expected EnableSNI to be of type *bool, got %T instead", val) 16582 } 16583 sv.EnableSNI = ptr.Bool(xtv) 16584 } 16585 16586 case strings.EqualFold("FailureThreshold", t.Name.Local): 16587 val, err := decoder.Value() 16588 if err != nil { 16589 return err 16590 } 16591 if val == nil { 16592 break 16593 } 16594 { 16595 xtv := string(val) 16596 i64, err := strconv.ParseInt(xtv, 10, 64) 16597 if err != nil { 16598 return err 16599 } 16600 sv.FailureThreshold = ptr.Int32(int32(i64)) 16601 } 16602 16603 case strings.EqualFold("FullyQualifiedDomainName", t.Name.Local): 16604 val, err := decoder.Value() 16605 if err != nil { 16606 return err 16607 } 16608 if val == nil { 16609 break 16610 } 16611 { 16612 xtv := string(val) 16613 sv.FullyQualifiedDomainName = ptr.String(xtv) 16614 } 16615 16616 case strings.EqualFold("HealthThreshold", t.Name.Local): 16617 val, err := decoder.Value() 16618 if err != nil { 16619 return err 16620 } 16621 if val == nil { 16622 break 16623 } 16624 { 16625 xtv := string(val) 16626 i64, err := strconv.ParseInt(xtv, 10, 64) 16627 if err != nil { 16628 return err 16629 } 16630 sv.HealthThreshold = ptr.Int32(int32(i64)) 16631 } 16632 16633 case strings.EqualFold("InsufficientDataHealthStatus", t.Name.Local): 16634 val, err := decoder.Value() 16635 if err != nil { 16636 return err 16637 } 16638 if val == nil { 16639 break 16640 } 16641 { 16642 xtv := string(val) 16643 sv.InsufficientDataHealthStatus = types.InsufficientDataHealthStatus(xtv) 16644 } 16645 16646 case strings.EqualFold("Inverted", t.Name.Local): 16647 val, err := decoder.Value() 16648 if err != nil { 16649 return err 16650 } 16651 if val == nil { 16652 break 16653 } 16654 { 16655 xtv, err := strconv.ParseBool(string(val)) 16656 if err != nil { 16657 return fmt.Errorf("expected Inverted to be of type *bool, got %T instead", val) 16658 } 16659 sv.Inverted = ptr.Bool(xtv) 16660 } 16661 16662 case strings.EqualFold("IPAddress", t.Name.Local): 16663 val, err := decoder.Value() 16664 if err != nil { 16665 return err 16666 } 16667 if val == nil { 16668 break 16669 } 16670 { 16671 xtv := string(val) 16672 sv.IPAddress = ptr.String(xtv) 16673 } 16674 16675 case strings.EqualFold("MeasureLatency", 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, err := strconv.ParseBool(string(val)) 16685 if err != nil { 16686 return fmt.Errorf("expected MeasureLatency to be of type *bool, got %T instead", val) 16687 } 16688 sv.MeasureLatency = ptr.Bool(xtv) 16689 } 16690 16691 case strings.EqualFold("Port", t.Name.Local): 16692 val, err := decoder.Value() 16693 if err != nil { 16694 return err 16695 } 16696 if val == nil { 16697 break 16698 } 16699 { 16700 xtv := string(val) 16701 i64, err := strconv.ParseInt(xtv, 10, 64) 16702 if err != nil { 16703 return err 16704 } 16705 sv.Port = ptr.Int32(int32(i64)) 16706 } 16707 16708 case strings.EqualFold("Regions", t.Name.Local): 16709 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16710 if err := awsRestxml_deserializeDocumentHealthCheckRegionList(&sv.Regions, nodeDecoder); err != nil { 16711 return err 16712 } 16713 16714 case strings.EqualFold("RequestInterval", t.Name.Local): 16715 val, err := decoder.Value() 16716 if err != nil { 16717 return err 16718 } 16719 if val == nil { 16720 break 16721 } 16722 { 16723 xtv := string(val) 16724 i64, err := strconv.ParseInt(xtv, 10, 64) 16725 if err != nil { 16726 return err 16727 } 16728 sv.RequestInterval = ptr.Int32(int32(i64)) 16729 } 16730 16731 case strings.EqualFold("ResourcePath", t.Name.Local): 16732 val, err := decoder.Value() 16733 if err != nil { 16734 return err 16735 } 16736 if val == nil { 16737 break 16738 } 16739 { 16740 xtv := string(val) 16741 sv.ResourcePath = ptr.String(xtv) 16742 } 16743 16744 case strings.EqualFold("RoutingControlArn", t.Name.Local): 16745 val, err := decoder.Value() 16746 if err != nil { 16747 return err 16748 } 16749 if val == nil { 16750 break 16751 } 16752 { 16753 xtv := string(val) 16754 sv.RoutingControlArn = ptr.String(xtv) 16755 } 16756 16757 case strings.EqualFold("SearchString", t.Name.Local): 16758 val, err := decoder.Value() 16759 if err != nil { 16760 return err 16761 } 16762 if val == nil { 16763 break 16764 } 16765 { 16766 xtv := string(val) 16767 sv.SearchString = ptr.String(xtv) 16768 } 16769 16770 case strings.EqualFold("Type", t.Name.Local): 16771 val, err := decoder.Value() 16772 if err != nil { 16773 return err 16774 } 16775 if val == nil { 16776 break 16777 } 16778 { 16779 xtv := string(val) 16780 sv.Type = types.HealthCheckType(xtv) 16781 } 16782 16783 default: 16784 // Do nothing and ignore the unexpected tag element 16785 err = decoder.Decoder.Skip() 16786 if err != nil { 16787 return err 16788 } 16789 16790 } 16791 decoder = originalDecoder 16792 } 16793 *v = sv 16794 return nil 16795 } 16796 16797 func awsRestxml_deserializeDocumentHealthCheckInUse(v **types.HealthCheckInUse, decoder smithyxml.NodeDecoder) error { 16798 if v == nil { 16799 return fmt.Errorf("unexpected nil of type %T", v) 16800 } 16801 var sv *types.HealthCheckInUse 16802 if *v == nil { 16803 sv = &types.HealthCheckInUse{} 16804 } else { 16805 sv = *v 16806 } 16807 16808 for { 16809 t, done, err := decoder.Token() 16810 if err != nil { 16811 return err 16812 } 16813 if done { 16814 break 16815 } 16816 originalDecoder := decoder 16817 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16818 switch { 16819 case strings.EqualFold("message", t.Name.Local): 16820 val, err := decoder.Value() 16821 if err != nil { 16822 return err 16823 } 16824 if val == nil { 16825 break 16826 } 16827 { 16828 xtv := string(val) 16829 sv.Message = ptr.String(xtv) 16830 } 16831 16832 default: 16833 // Do nothing and ignore the unexpected tag element 16834 err = decoder.Decoder.Skip() 16835 if err != nil { 16836 return err 16837 } 16838 16839 } 16840 decoder = originalDecoder 16841 } 16842 *v = sv 16843 return nil 16844 } 16845 16846 func awsRestxml_deserializeDocumentHealthCheckObservation(v **types.HealthCheckObservation, decoder smithyxml.NodeDecoder) error { 16847 if v == nil { 16848 return fmt.Errorf("unexpected nil of type %T", v) 16849 } 16850 var sv *types.HealthCheckObservation 16851 if *v == nil { 16852 sv = &types.HealthCheckObservation{} 16853 } else { 16854 sv = *v 16855 } 16856 16857 for { 16858 t, done, err := decoder.Token() 16859 if err != nil { 16860 return err 16861 } 16862 if done { 16863 break 16864 } 16865 originalDecoder := decoder 16866 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 16867 switch { 16868 case strings.EqualFold("IPAddress", t.Name.Local): 16869 val, err := decoder.Value() 16870 if err != nil { 16871 return err 16872 } 16873 if val == nil { 16874 break 16875 } 16876 { 16877 xtv := string(val) 16878 sv.IPAddress = ptr.String(xtv) 16879 } 16880 16881 case strings.EqualFold("Region", t.Name.Local): 16882 val, err := decoder.Value() 16883 if err != nil { 16884 return err 16885 } 16886 if val == nil { 16887 break 16888 } 16889 { 16890 xtv := string(val) 16891 sv.Region = types.HealthCheckRegion(xtv) 16892 } 16893 16894 case strings.EqualFold("StatusReport", t.Name.Local): 16895 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16896 if err := awsRestxml_deserializeDocumentStatusReport(&sv.StatusReport, nodeDecoder); err != nil { 16897 return err 16898 } 16899 16900 default: 16901 // Do nothing and ignore the unexpected tag element 16902 err = decoder.Decoder.Skip() 16903 if err != nil { 16904 return err 16905 } 16906 16907 } 16908 decoder = originalDecoder 16909 } 16910 *v = sv 16911 return nil 16912 } 16913 16914 func awsRestxml_deserializeDocumentHealthCheckObservations(v *[]types.HealthCheckObservation, decoder smithyxml.NodeDecoder) error { 16915 if v == nil { 16916 return fmt.Errorf("unexpected nil of type %T", v) 16917 } 16918 var sv []types.HealthCheckObservation 16919 if *v == nil { 16920 sv = make([]types.HealthCheckObservation, 0) 16921 } else { 16922 sv = *v 16923 } 16924 16925 originalDecoder := decoder 16926 for { 16927 t, done, err := decoder.Token() 16928 if err != nil { 16929 return err 16930 } 16931 if done { 16932 break 16933 } 16934 switch { 16935 case strings.EqualFold("HealthCheckObservation", t.Name.Local): 16936 var col types.HealthCheckObservation 16937 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16938 destAddr := &col 16939 if err := awsRestxml_deserializeDocumentHealthCheckObservation(&destAddr, nodeDecoder); err != nil { 16940 return err 16941 } 16942 col = *destAddr 16943 sv = append(sv, col) 16944 16945 default: 16946 err = decoder.Decoder.Skip() 16947 if err != nil { 16948 return err 16949 } 16950 16951 } 16952 decoder = originalDecoder 16953 } 16954 *v = sv 16955 return nil 16956 } 16957 16958 func awsRestxml_deserializeDocumentHealthCheckObservationsUnwrapped(v *[]types.HealthCheckObservation, decoder smithyxml.NodeDecoder) error { 16959 var sv []types.HealthCheckObservation 16960 if *v == nil { 16961 sv = make([]types.HealthCheckObservation, 0) 16962 } else { 16963 sv = *v 16964 } 16965 16966 switch { 16967 default: 16968 var mv types.HealthCheckObservation 16969 t := decoder.StartEl 16970 _ = t 16971 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 16972 destAddr := &mv 16973 if err := awsRestxml_deserializeDocumentHealthCheckObservation(&destAddr, nodeDecoder); err != nil { 16974 return err 16975 } 16976 mv = *destAddr 16977 sv = append(sv, mv) 16978 } 16979 *v = sv 16980 return nil 16981 } 16982 func awsRestxml_deserializeDocumentHealthCheckRegionList(v *[]types.HealthCheckRegion, decoder smithyxml.NodeDecoder) error { 16983 if v == nil { 16984 return fmt.Errorf("unexpected nil of type %T", v) 16985 } 16986 var sv []types.HealthCheckRegion 16987 if *v == nil { 16988 sv = make([]types.HealthCheckRegion, 0) 16989 } else { 16990 sv = *v 16991 } 16992 16993 originalDecoder := decoder 16994 for { 16995 t, done, err := decoder.Token() 16996 if err != nil { 16997 return err 16998 } 16999 if done { 17000 break 17001 } 17002 memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 17003 decoder = memberDecoder 17004 switch { 17005 case strings.EqualFold("Region", t.Name.Local): 17006 var col types.HealthCheckRegion 17007 val, err := decoder.Value() 17008 if err != nil { 17009 return err 17010 } 17011 if val == nil { 17012 break 17013 } 17014 { 17015 xtv := string(val) 17016 col = types.HealthCheckRegion(xtv) 17017 } 17018 sv = append(sv, col) 17019 17020 default: 17021 err = decoder.Decoder.Skip() 17022 if err != nil { 17023 return err 17024 } 17025 17026 } 17027 decoder = originalDecoder 17028 } 17029 *v = sv 17030 return nil 17031 } 17032 17033 func awsRestxml_deserializeDocumentHealthCheckRegionListUnwrapped(v *[]types.HealthCheckRegion, decoder smithyxml.NodeDecoder) error { 17034 var sv []types.HealthCheckRegion 17035 if *v == nil { 17036 sv = make([]types.HealthCheckRegion, 0) 17037 } else { 17038 sv = *v 17039 } 17040 17041 switch { 17042 default: 17043 var mv types.HealthCheckRegion 17044 t := decoder.StartEl 17045 _ = t 17046 val, err := decoder.Value() 17047 if err != nil { 17048 return err 17049 } 17050 if val == nil { 17051 break 17052 } 17053 { 17054 xtv := string(val) 17055 mv = types.HealthCheckRegion(xtv) 17056 } 17057 sv = append(sv, mv) 17058 } 17059 *v = sv 17060 return nil 17061 } 17062 func awsRestxml_deserializeDocumentHealthChecks(v *[]types.HealthCheck, decoder smithyxml.NodeDecoder) error { 17063 if v == nil { 17064 return fmt.Errorf("unexpected nil of type %T", v) 17065 } 17066 var sv []types.HealthCheck 17067 if *v == nil { 17068 sv = make([]types.HealthCheck, 0) 17069 } else { 17070 sv = *v 17071 } 17072 17073 originalDecoder := decoder 17074 for { 17075 t, done, err := decoder.Token() 17076 if err != nil { 17077 return err 17078 } 17079 if done { 17080 break 17081 } 17082 switch { 17083 case strings.EqualFold("HealthCheck", t.Name.Local): 17084 var col types.HealthCheck 17085 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 17086 destAddr := &col 17087 if err := awsRestxml_deserializeDocumentHealthCheck(&destAddr, nodeDecoder); err != nil { 17088 return err 17089 } 17090 col = *destAddr 17091 sv = append(sv, col) 17092 17093 default: 17094 err = decoder.Decoder.Skip() 17095 if err != nil { 17096 return err 17097 } 17098 17099 } 17100 decoder = originalDecoder 17101 } 17102 *v = sv 17103 return nil 17104 } 17105 17106 func awsRestxml_deserializeDocumentHealthChecksUnwrapped(v *[]types.HealthCheck, decoder smithyxml.NodeDecoder) error { 17107 var sv []types.HealthCheck 17108 if *v == nil { 17109 sv = make([]types.HealthCheck, 0) 17110 } else { 17111 sv = *v 17112 } 17113 17114 switch { 17115 default: 17116 var mv types.HealthCheck 17117 t := decoder.StartEl 17118 _ = t 17119 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 17120 destAddr := &mv 17121 if err := awsRestxml_deserializeDocumentHealthCheck(&destAddr, nodeDecoder); err != nil { 17122 return err 17123 } 17124 mv = *destAddr 17125 sv = append(sv, mv) 17126 } 17127 *v = sv 17128 return nil 17129 } 17130 func awsRestxml_deserializeDocumentHealthCheckVersionMismatch(v **types.HealthCheckVersionMismatch, decoder smithyxml.NodeDecoder) error { 17131 if v == nil { 17132 return fmt.Errorf("unexpected nil of type %T", v) 17133 } 17134 var sv *types.HealthCheckVersionMismatch 17135 if *v == nil { 17136 sv = &types.HealthCheckVersionMismatch{} 17137 } else { 17138 sv = *v 17139 } 17140 17141 for { 17142 t, done, err := decoder.Token() 17143 if err != nil { 17144 return err 17145 } 17146 if done { 17147 break 17148 } 17149 originalDecoder := decoder 17150 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17151 switch { 17152 case strings.EqualFold("message", t.Name.Local): 17153 val, err := decoder.Value() 17154 if err != nil { 17155 return err 17156 } 17157 if val == nil { 17158 break 17159 } 17160 { 17161 xtv := string(val) 17162 sv.Message = ptr.String(xtv) 17163 } 17164 17165 default: 17166 // Do nothing and ignore the unexpected tag element 17167 err = decoder.Decoder.Skip() 17168 if err != nil { 17169 return err 17170 } 17171 17172 } 17173 decoder = originalDecoder 17174 } 17175 *v = sv 17176 return nil 17177 } 17178 17179 func awsRestxml_deserializeDocumentHostedZone(v **types.HostedZone, decoder smithyxml.NodeDecoder) error { 17180 if v == nil { 17181 return fmt.Errorf("unexpected nil of type %T", v) 17182 } 17183 var sv *types.HostedZone 17184 if *v == nil { 17185 sv = &types.HostedZone{} 17186 } else { 17187 sv = *v 17188 } 17189 17190 for { 17191 t, done, err := decoder.Token() 17192 if err != nil { 17193 return err 17194 } 17195 if done { 17196 break 17197 } 17198 originalDecoder := decoder 17199 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17200 switch { 17201 case strings.EqualFold("CallerReference", t.Name.Local): 17202 val, err := decoder.Value() 17203 if err != nil { 17204 return err 17205 } 17206 if val == nil { 17207 break 17208 } 17209 { 17210 xtv := string(val) 17211 sv.CallerReference = ptr.String(xtv) 17212 } 17213 17214 case strings.EqualFold("Config", t.Name.Local): 17215 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 17216 if err := awsRestxml_deserializeDocumentHostedZoneConfig(&sv.Config, nodeDecoder); err != nil { 17217 return err 17218 } 17219 17220 case strings.EqualFold("Id", t.Name.Local): 17221 val, err := decoder.Value() 17222 if err != nil { 17223 return err 17224 } 17225 if val == nil { 17226 break 17227 } 17228 { 17229 xtv := string(val) 17230 sv.Id = ptr.String(xtv) 17231 } 17232 17233 case strings.EqualFold("LinkedService", t.Name.Local): 17234 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 17235 if err := awsRestxml_deserializeDocumentLinkedService(&sv.LinkedService, nodeDecoder); err != nil { 17236 return err 17237 } 17238 17239 case strings.EqualFold("Name", t.Name.Local): 17240 val, err := decoder.Value() 17241 if err != nil { 17242 return err 17243 } 17244 if val == nil { 17245 break 17246 } 17247 { 17248 xtv := string(val) 17249 sv.Name = ptr.String(xtv) 17250 } 17251 17252 case strings.EqualFold("ResourceRecordSetCount", t.Name.Local): 17253 val, err := decoder.Value() 17254 if err != nil { 17255 return err 17256 } 17257 if val == nil { 17258 break 17259 } 17260 { 17261 xtv := string(val) 17262 i64, err := strconv.ParseInt(xtv, 10, 64) 17263 if err != nil { 17264 return err 17265 } 17266 sv.ResourceRecordSetCount = ptr.Int64(i64) 17267 } 17268 17269 default: 17270 // Do nothing and ignore the unexpected tag element 17271 err = decoder.Decoder.Skip() 17272 if err != nil { 17273 return err 17274 } 17275 17276 } 17277 decoder = originalDecoder 17278 } 17279 *v = sv 17280 return nil 17281 } 17282 17283 func awsRestxml_deserializeDocumentHostedZoneAlreadyExists(v **types.HostedZoneAlreadyExists, decoder smithyxml.NodeDecoder) error { 17284 if v == nil { 17285 return fmt.Errorf("unexpected nil of type %T", v) 17286 } 17287 var sv *types.HostedZoneAlreadyExists 17288 if *v == nil { 17289 sv = &types.HostedZoneAlreadyExists{} 17290 } else { 17291 sv = *v 17292 } 17293 17294 for { 17295 t, done, err := decoder.Token() 17296 if err != nil { 17297 return err 17298 } 17299 if done { 17300 break 17301 } 17302 originalDecoder := decoder 17303 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17304 switch { 17305 case strings.EqualFold("message", t.Name.Local): 17306 val, err := decoder.Value() 17307 if err != nil { 17308 return err 17309 } 17310 if val == nil { 17311 break 17312 } 17313 { 17314 xtv := string(val) 17315 sv.Message = ptr.String(xtv) 17316 } 17317 17318 default: 17319 // Do nothing and ignore the unexpected tag element 17320 err = decoder.Decoder.Skip() 17321 if err != nil { 17322 return err 17323 } 17324 17325 } 17326 decoder = originalDecoder 17327 } 17328 *v = sv 17329 return nil 17330 } 17331 17332 func awsRestxml_deserializeDocumentHostedZoneConfig(v **types.HostedZoneConfig, decoder smithyxml.NodeDecoder) error { 17333 if v == nil { 17334 return fmt.Errorf("unexpected nil of type %T", v) 17335 } 17336 var sv *types.HostedZoneConfig 17337 if *v == nil { 17338 sv = &types.HostedZoneConfig{} 17339 } else { 17340 sv = *v 17341 } 17342 17343 for { 17344 t, done, err := decoder.Token() 17345 if err != nil { 17346 return err 17347 } 17348 if done { 17349 break 17350 } 17351 originalDecoder := decoder 17352 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17353 switch { 17354 case strings.EqualFold("Comment", t.Name.Local): 17355 val, err := decoder.Value() 17356 if err != nil { 17357 return err 17358 } 17359 if val == nil { 17360 break 17361 } 17362 { 17363 xtv := string(val) 17364 sv.Comment = ptr.String(xtv) 17365 } 17366 17367 case strings.EqualFold("PrivateZone", t.Name.Local): 17368 val, err := decoder.Value() 17369 if err != nil { 17370 return err 17371 } 17372 if val == nil { 17373 break 17374 } 17375 { 17376 xtv, err := strconv.ParseBool(string(val)) 17377 if err != nil { 17378 return fmt.Errorf("expected IsPrivateZone to be of type *bool, got %T instead", val) 17379 } 17380 sv.PrivateZone = xtv 17381 } 17382 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 17397 func awsRestxml_deserializeDocumentHostedZoneLimit(v **types.HostedZoneLimit, decoder smithyxml.NodeDecoder) error { 17398 if v == nil { 17399 return fmt.Errorf("unexpected nil of type %T", v) 17400 } 17401 var sv *types.HostedZoneLimit 17402 if *v == nil { 17403 sv = &types.HostedZoneLimit{} 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("Type", 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.Type = types.HostedZoneLimitType(xtv) 17430 } 17431 17432 case strings.EqualFold("Value", t.Name.Local): 17433 val, err := decoder.Value() 17434 if err != nil { 17435 return err 17436 } 17437 if val == nil { 17438 break 17439 } 17440 { 17441 xtv := string(val) 17442 i64, err := strconv.ParseInt(xtv, 10, 64) 17443 if err != nil { 17444 return err 17445 } 17446 sv.Value = ptr.Int64(i64) 17447 } 17448 17449 default: 17450 // Do nothing and ignore the unexpected tag element 17451 err = decoder.Decoder.Skip() 17452 if err != nil { 17453 return err 17454 } 17455 17456 } 17457 decoder = originalDecoder 17458 } 17459 *v = sv 17460 return nil 17461 } 17462 17463 func awsRestxml_deserializeDocumentHostedZoneNotEmpty(v **types.HostedZoneNotEmpty, decoder smithyxml.NodeDecoder) error { 17464 if v == nil { 17465 return fmt.Errorf("unexpected nil of type %T", v) 17466 } 17467 var sv *types.HostedZoneNotEmpty 17468 if *v == nil { 17469 sv = &types.HostedZoneNotEmpty{} 17470 } else { 17471 sv = *v 17472 } 17473 17474 for { 17475 t, done, err := decoder.Token() 17476 if err != nil { 17477 return err 17478 } 17479 if done { 17480 break 17481 } 17482 originalDecoder := decoder 17483 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17484 switch { 17485 case strings.EqualFold("message", t.Name.Local): 17486 val, err := decoder.Value() 17487 if err != nil { 17488 return err 17489 } 17490 if val == nil { 17491 break 17492 } 17493 { 17494 xtv := string(val) 17495 sv.Message = ptr.String(xtv) 17496 } 17497 17498 default: 17499 // Do nothing and ignore the unexpected tag element 17500 err = decoder.Decoder.Skip() 17501 if err != nil { 17502 return err 17503 } 17504 17505 } 17506 decoder = originalDecoder 17507 } 17508 *v = sv 17509 return nil 17510 } 17511 17512 func awsRestxml_deserializeDocumentHostedZoneNotFound(v **types.HostedZoneNotFound, decoder smithyxml.NodeDecoder) error { 17513 if v == nil { 17514 return fmt.Errorf("unexpected nil of type %T", v) 17515 } 17516 var sv *types.HostedZoneNotFound 17517 if *v == nil { 17518 sv = &types.HostedZoneNotFound{} 17519 } else { 17520 sv = *v 17521 } 17522 17523 for { 17524 t, done, err := decoder.Token() 17525 if err != nil { 17526 return err 17527 } 17528 if done { 17529 break 17530 } 17531 originalDecoder := decoder 17532 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17533 switch { 17534 case strings.EqualFold("message", t.Name.Local): 17535 val, err := decoder.Value() 17536 if err != nil { 17537 return err 17538 } 17539 if val == nil { 17540 break 17541 } 17542 { 17543 xtv := string(val) 17544 sv.Message = ptr.String(xtv) 17545 } 17546 17547 default: 17548 // Do nothing and ignore the unexpected tag element 17549 err = decoder.Decoder.Skip() 17550 if err != nil { 17551 return err 17552 } 17553 17554 } 17555 decoder = originalDecoder 17556 } 17557 *v = sv 17558 return nil 17559 } 17560 17561 func awsRestxml_deserializeDocumentHostedZoneNotPrivate(v **types.HostedZoneNotPrivate, decoder smithyxml.NodeDecoder) error { 17562 if v == nil { 17563 return fmt.Errorf("unexpected nil of type %T", v) 17564 } 17565 var sv *types.HostedZoneNotPrivate 17566 if *v == nil { 17567 sv = &types.HostedZoneNotPrivate{} 17568 } else { 17569 sv = *v 17570 } 17571 17572 for { 17573 t, done, err := decoder.Token() 17574 if err != nil { 17575 return err 17576 } 17577 if done { 17578 break 17579 } 17580 originalDecoder := decoder 17581 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17582 switch { 17583 case strings.EqualFold("message", t.Name.Local): 17584 val, err := decoder.Value() 17585 if err != nil { 17586 return err 17587 } 17588 if val == nil { 17589 break 17590 } 17591 { 17592 xtv := string(val) 17593 sv.Message = ptr.String(xtv) 17594 } 17595 17596 default: 17597 // Do nothing and ignore the unexpected tag element 17598 err = decoder.Decoder.Skip() 17599 if err != nil { 17600 return err 17601 } 17602 17603 } 17604 decoder = originalDecoder 17605 } 17606 *v = sv 17607 return nil 17608 } 17609 17610 func awsRestxml_deserializeDocumentHostedZoneOwner(v **types.HostedZoneOwner, decoder smithyxml.NodeDecoder) error { 17611 if v == nil { 17612 return fmt.Errorf("unexpected nil of type %T", v) 17613 } 17614 var sv *types.HostedZoneOwner 17615 if *v == nil { 17616 sv = &types.HostedZoneOwner{} 17617 } else { 17618 sv = *v 17619 } 17620 17621 for { 17622 t, done, err := decoder.Token() 17623 if err != nil { 17624 return err 17625 } 17626 if done { 17627 break 17628 } 17629 originalDecoder := decoder 17630 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17631 switch { 17632 case strings.EqualFold("OwningAccount", t.Name.Local): 17633 val, err := decoder.Value() 17634 if err != nil { 17635 return err 17636 } 17637 if val == nil { 17638 break 17639 } 17640 { 17641 xtv := string(val) 17642 sv.OwningAccount = ptr.String(xtv) 17643 } 17644 17645 case strings.EqualFold("OwningService", t.Name.Local): 17646 val, err := decoder.Value() 17647 if err != nil { 17648 return err 17649 } 17650 if val == nil { 17651 break 17652 } 17653 { 17654 xtv := string(val) 17655 sv.OwningService = ptr.String(xtv) 17656 } 17657 17658 default: 17659 // Do nothing and ignore the unexpected tag element 17660 err = decoder.Decoder.Skip() 17661 if err != nil { 17662 return err 17663 } 17664 17665 } 17666 decoder = originalDecoder 17667 } 17668 *v = sv 17669 return nil 17670 } 17671 17672 func awsRestxml_deserializeDocumentHostedZonePartiallyDelegated(v **types.HostedZonePartiallyDelegated, decoder smithyxml.NodeDecoder) error { 17673 if v == nil { 17674 return fmt.Errorf("unexpected nil of type %T", v) 17675 } 17676 var sv *types.HostedZonePartiallyDelegated 17677 if *v == nil { 17678 sv = &types.HostedZonePartiallyDelegated{} 17679 } else { 17680 sv = *v 17681 } 17682 17683 for { 17684 t, done, err := decoder.Token() 17685 if err != nil { 17686 return err 17687 } 17688 if done { 17689 break 17690 } 17691 originalDecoder := decoder 17692 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17693 switch { 17694 case strings.EqualFold("message", t.Name.Local): 17695 val, err := decoder.Value() 17696 if err != nil { 17697 return err 17698 } 17699 if val == nil { 17700 break 17701 } 17702 { 17703 xtv := string(val) 17704 sv.Message = ptr.String(xtv) 17705 } 17706 17707 default: 17708 // Do nothing and ignore the unexpected tag element 17709 err = decoder.Decoder.Skip() 17710 if err != nil { 17711 return err 17712 } 17713 17714 } 17715 decoder = originalDecoder 17716 } 17717 *v = sv 17718 return nil 17719 } 17720 17721 func awsRestxml_deserializeDocumentHostedZones(v *[]types.HostedZone, decoder smithyxml.NodeDecoder) error { 17722 if v == nil { 17723 return fmt.Errorf("unexpected nil of type %T", v) 17724 } 17725 var sv []types.HostedZone 17726 if *v == nil { 17727 sv = make([]types.HostedZone, 0) 17728 } else { 17729 sv = *v 17730 } 17731 17732 originalDecoder := decoder 17733 for { 17734 t, done, err := decoder.Token() 17735 if err != nil { 17736 return err 17737 } 17738 if done { 17739 break 17740 } 17741 switch { 17742 case strings.EqualFold("HostedZone", t.Name.Local): 17743 var col types.HostedZone 17744 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 17745 destAddr := &col 17746 if err := awsRestxml_deserializeDocumentHostedZone(&destAddr, nodeDecoder); err != nil { 17747 return err 17748 } 17749 col = *destAddr 17750 sv = append(sv, col) 17751 17752 default: 17753 err = decoder.Decoder.Skip() 17754 if err != nil { 17755 return err 17756 } 17757 17758 } 17759 decoder = originalDecoder 17760 } 17761 *v = sv 17762 return nil 17763 } 17764 17765 func awsRestxml_deserializeDocumentHostedZonesUnwrapped(v *[]types.HostedZone, decoder smithyxml.NodeDecoder) error { 17766 var sv []types.HostedZone 17767 if *v == nil { 17768 sv = make([]types.HostedZone, 0) 17769 } else { 17770 sv = *v 17771 } 17772 17773 switch { 17774 default: 17775 var mv types.HostedZone 17776 t := decoder.StartEl 17777 _ = t 17778 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 17779 destAddr := &mv 17780 if err := awsRestxml_deserializeDocumentHostedZone(&destAddr, nodeDecoder); err != nil { 17781 return err 17782 } 17783 mv = *destAddr 17784 sv = append(sv, mv) 17785 } 17786 *v = sv 17787 return nil 17788 } 17789 func awsRestxml_deserializeDocumentHostedZoneSummaries(v *[]types.HostedZoneSummary, decoder smithyxml.NodeDecoder) error { 17790 if v == nil { 17791 return fmt.Errorf("unexpected nil of type %T", v) 17792 } 17793 var sv []types.HostedZoneSummary 17794 if *v == nil { 17795 sv = make([]types.HostedZoneSummary, 0) 17796 } else { 17797 sv = *v 17798 } 17799 17800 originalDecoder := decoder 17801 for { 17802 t, done, err := decoder.Token() 17803 if err != nil { 17804 return err 17805 } 17806 if done { 17807 break 17808 } 17809 switch { 17810 case strings.EqualFold("HostedZoneSummary", t.Name.Local): 17811 var col types.HostedZoneSummary 17812 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 17813 destAddr := &col 17814 if err := awsRestxml_deserializeDocumentHostedZoneSummary(&destAddr, nodeDecoder); err != nil { 17815 return err 17816 } 17817 col = *destAddr 17818 sv = append(sv, col) 17819 17820 default: 17821 err = decoder.Decoder.Skip() 17822 if err != nil { 17823 return err 17824 } 17825 17826 } 17827 decoder = originalDecoder 17828 } 17829 *v = sv 17830 return nil 17831 } 17832 17833 func awsRestxml_deserializeDocumentHostedZoneSummariesUnwrapped(v *[]types.HostedZoneSummary, decoder smithyxml.NodeDecoder) error { 17834 var sv []types.HostedZoneSummary 17835 if *v == nil { 17836 sv = make([]types.HostedZoneSummary, 0) 17837 } else { 17838 sv = *v 17839 } 17840 17841 switch { 17842 default: 17843 var mv types.HostedZoneSummary 17844 t := decoder.StartEl 17845 _ = t 17846 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 17847 destAddr := &mv 17848 if err := awsRestxml_deserializeDocumentHostedZoneSummary(&destAddr, nodeDecoder); err != nil { 17849 return err 17850 } 17851 mv = *destAddr 17852 sv = append(sv, mv) 17853 } 17854 *v = sv 17855 return nil 17856 } 17857 func awsRestxml_deserializeDocumentHostedZoneSummary(v **types.HostedZoneSummary, decoder smithyxml.NodeDecoder) error { 17858 if v == nil { 17859 return fmt.Errorf("unexpected nil of type %T", v) 17860 } 17861 var sv *types.HostedZoneSummary 17862 if *v == nil { 17863 sv = &types.HostedZoneSummary{} 17864 } else { 17865 sv = *v 17866 } 17867 17868 for { 17869 t, done, err := decoder.Token() 17870 if err != nil { 17871 return err 17872 } 17873 if done { 17874 break 17875 } 17876 originalDecoder := decoder 17877 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17878 switch { 17879 case strings.EqualFold("HostedZoneId", t.Name.Local): 17880 val, err := decoder.Value() 17881 if err != nil { 17882 return err 17883 } 17884 if val == nil { 17885 break 17886 } 17887 { 17888 xtv := string(val) 17889 sv.HostedZoneId = ptr.String(xtv) 17890 } 17891 17892 case strings.EqualFold("Name", t.Name.Local): 17893 val, err := decoder.Value() 17894 if err != nil { 17895 return err 17896 } 17897 if val == nil { 17898 break 17899 } 17900 { 17901 xtv := string(val) 17902 sv.Name = ptr.String(xtv) 17903 } 17904 17905 case strings.EqualFold("Owner", t.Name.Local): 17906 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 17907 if err := awsRestxml_deserializeDocumentHostedZoneOwner(&sv.Owner, nodeDecoder); err != nil { 17908 return err 17909 } 17910 17911 default: 17912 // Do nothing and ignore the unexpected tag element 17913 err = decoder.Decoder.Skip() 17914 if err != nil { 17915 return err 17916 } 17917 17918 } 17919 decoder = originalDecoder 17920 } 17921 *v = sv 17922 return nil 17923 } 17924 17925 func awsRestxml_deserializeDocumentIncompatibleVersion(v **types.IncompatibleVersion, decoder smithyxml.NodeDecoder) error { 17926 if v == nil { 17927 return fmt.Errorf("unexpected nil of type %T", v) 17928 } 17929 var sv *types.IncompatibleVersion 17930 if *v == nil { 17931 sv = &types.IncompatibleVersion{} 17932 } else { 17933 sv = *v 17934 } 17935 17936 for { 17937 t, done, err := decoder.Token() 17938 if err != nil { 17939 return err 17940 } 17941 if done { 17942 break 17943 } 17944 originalDecoder := decoder 17945 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17946 switch { 17947 case strings.EqualFold("message", t.Name.Local): 17948 val, err := decoder.Value() 17949 if err != nil { 17950 return err 17951 } 17952 if val == nil { 17953 break 17954 } 17955 { 17956 xtv := string(val) 17957 sv.Message = ptr.String(xtv) 17958 } 17959 17960 default: 17961 // Do nothing and ignore the unexpected tag element 17962 err = decoder.Decoder.Skip() 17963 if err != nil { 17964 return err 17965 } 17966 17967 } 17968 decoder = originalDecoder 17969 } 17970 *v = sv 17971 return nil 17972 } 17973 17974 func awsRestxml_deserializeDocumentInsufficientCloudWatchLogsResourcePolicy(v **types.InsufficientCloudWatchLogsResourcePolicy, decoder smithyxml.NodeDecoder) error { 17975 if v == nil { 17976 return fmt.Errorf("unexpected nil of type %T", v) 17977 } 17978 var sv *types.InsufficientCloudWatchLogsResourcePolicy 17979 if *v == nil { 17980 sv = &types.InsufficientCloudWatchLogsResourcePolicy{} 17981 } else { 17982 sv = *v 17983 } 17984 17985 for { 17986 t, done, err := decoder.Token() 17987 if err != nil { 17988 return err 17989 } 17990 if done { 17991 break 17992 } 17993 originalDecoder := decoder 17994 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 17995 switch { 17996 case strings.EqualFold("message", t.Name.Local): 17997 val, err := decoder.Value() 17998 if err != nil { 17999 return err 18000 } 18001 if val == nil { 18002 break 18003 } 18004 { 18005 xtv := string(val) 18006 sv.Message = ptr.String(xtv) 18007 } 18008 18009 default: 18010 // Do nothing and ignore the unexpected tag element 18011 err = decoder.Decoder.Skip() 18012 if err != nil { 18013 return err 18014 } 18015 18016 } 18017 decoder = originalDecoder 18018 } 18019 *v = sv 18020 return nil 18021 } 18022 18023 func awsRestxml_deserializeDocumentInvalidArgument(v **types.InvalidArgument, decoder smithyxml.NodeDecoder) error { 18024 if v == nil { 18025 return fmt.Errorf("unexpected nil of type %T", v) 18026 } 18027 var sv *types.InvalidArgument 18028 if *v == nil { 18029 sv = &types.InvalidArgument{} 18030 } else { 18031 sv = *v 18032 } 18033 18034 for { 18035 t, done, err := decoder.Token() 18036 if err != nil { 18037 return err 18038 } 18039 if done { 18040 break 18041 } 18042 originalDecoder := decoder 18043 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18044 switch { 18045 case strings.EqualFold("message", t.Name.Local): 18046 val, err := decoder.Value() 18047 if err != nil { 18048 return err 18049 } 18050 if val == nil { 18051 break 18052 } 18053 { 18054 xtv := string(val) 18055 sv.Message = ptr.String(xtv) 18056 } 18057 18058 default: 18059 // Do nothing and ignore the unexpected tag element 18060 err = decoder.Decoder.Skip() 18061 if err != nil { 18062 return err 18063 } 18064 18065 } 18066 decoder = originalDecoder 18067 } 18068 *v = sv 18069 return nil 18070 } 18071 18072 func awsRestxml_deserializeDocumentInvalidChangeBatch(v **types.InvalidChangeBatch, decoder smithyxml.NodeDecoder) error { 18073 if v == nil { 18074 return fmt.Errorf("unexpected nil of type %T", v) 18075 } 18076 var sv *types.InvalidChangeBatch 18077 if *v == nil { 18078 sv = &types.InvalidChangeBatch{} 18079 } else { 18080 sv = *v 18081 } 18082 18083 for { 18084 t, done, err := decoder.Token() 18085 if err != nil { 18086 return err 18087 } 18088 if done { 18089 break 18090 } 18091 originalDecoder := decoder 18092 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18093 switch { 18094 case strings.EqualFold("message", t.Name.Local): 18095 val, err := decoder.Value() 18096 if err != nil { 18097 return err 18098 } 18099 if val == nil { 18100 break 18101 } 18102 { 18103 xtv := string(val) 18104 sv.Message = ptr.String(xtv) 18105 } 18106 18107 case strings.EqualFold("messages", t.Name.Local): 18108 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 18109 if err := awsRestxml_deserializeDocumentErrorMessages(&sv.Messages, nodeDecoder); err != nil { 18110 return err 18111 } 18112 18113 default: 18114 // Do nothing and ignore the unexpected tag element 18115 err = decoder.Decoder.Skip() 18116 if err != nil { 18117 return err 18118 } 18119 18120 } 18121 decoder = originalDecoder 18122 } 18123 *v = sv 18124 return nil 18125 } 18126 18127 func awsRestxml_deserializeDocumentInvalidDomainName(v **types.InvalidDomainName, decoder smithyxml.NodeDecoder) error { 18128 if v == nil { 18129 return fmt.Errorf("unexpected nil of type %T", v) 18130 } 18131 var sv *types.InvalidDomainName 18132 if *v == nil { 18133 sv = &types.InvalidDomainName{} 18134 } else { 18135 sv = *v 18136 } 18137 18138 for { 18139 t, done, err := decoder.Token() 18140 if err != nil { 18141 return err 18142 } 18143 if done { 18144 break 18145 } 18146 originalDecoder := decoder 18147 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18148 switch { 18149 case strings.EqualFold("message", t.Name.Local): 18150 val, err := decoder.Value() 18151 if err != nil { 18152 return err 18153 } 18154 if val == nil { 18155 break 18156 } 18157 { 18158 xtv := string(val) 18159 sv.Message = ptr.String(xtv) 18160 } 18161 18162 default: 18163 // Do nothing and ignore the unexpected tag element 18164 err = decoder.Decoder.Skip() 18165 if err != nil { 18166 return err 18167 } 18168 18169 } 18170 decoder = originalDecoder 18171 } 18172 *v = sv 18173 return nil 18174 } 18175 18176 func awsRestxml_deserializeDocumentInvalidInput(v **types.InvalidInput, decoder smithyxml.NodeDecoder) error { 18177 if v == nil { 18178 return fmt.Errorf("unexpected nil of type %T", v) 18179 } 18180 var sv *types.InvalidInput 18181 if *v == nil { 18182 sv = &types.InvalidInput{} 18183 } else { 18184 sv = *v 18185 } 18186 18187 for { 18188 t, done, err := decoder.Token() 18189 if err != nil { 18190 return err 18191 } 18192 if done { 18193 break 18194 } 18195 originalDecoder := decoder 18196 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18197 switch { 18198 case strings.EqualFold("message", t.Name.Local): 18199 val, err := decoder.Value() 18200 if err != nil { 18201 return err 18202 } 18203 if val == nil { 18204 break 18205 } 18206 { 18207 xtv := string(val) 18208 sv.Message = ptr.String(xtv) 18209 } 18210 18211 default: 18212 // Do nothing and ignore the unexpected tag element 18213 err = decoder.Decoder.Skip() 18214 if err != nil { 18215 return err 18216 } 18217 18218 } 18219 decoder = originalDecoder 18220 } 18221 *v = sv 18222 return nil 18223 } 18224 18225 func awsRestxml_deserializeDocumentInvalidKeySigningKeyName(v **types.InvalidKeySigningKeyName, decoder smithyxml.NodeDecoder) error { 18226 if v == nil { 18227 return fmt.Errorf("unexpected nil of type %T", v) 18228 } 18229 var sv *types.InvalidKeySigningKeyName 18230 if *v == nil { 18231 sv = &types.InvalidKeySigningKeyName{} 18232 } else { 18233 sv = *v 18234 } 18235 18236 for { 18237 t, done, err := decoder.Token() 18238 if err != nil { 18239 return err 18240 } 18241 if done { 18242 break 18243 } 18244 originalDecoder := decoder 18245 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18246 switch { 18247 case strings.EqualFold("message", t.Name.Local): 18248 val, err := decoder.Value() 18249 if err != nil { 18250 return err 18251 } 18252 if val == nil { 18253 break 18254 } 18255 { 18256 xtv := string(val) 18257 sv.Message = ptr.String(xtv) 18258 } 18259 18260 default: 18261 // Do nothing and ignore the unexpected tag element 18262 err = decoder.Decoder.Skip() 18263 if err != nil { 18264 return err 18265 } 18266 18267 } 18268 decoder = originalDecoder 18269 } 18270 *v = sv 18271 return nil 18272 } 18273 18274 func awsRestxml_deserializeDocumentInvalidKeySigningKeyStatus(v **types.InvalidKeySigningKeyStatus, decoder smithyxml.NodeDecoder) error { 18275 if v == nil { 18276 return fmt.Errorf("unexpected nil of type %T", v) 18277 } 18278 var sv *types.InvalidKeySigningKeyStatus 18279 if *v == nil { 18280 sv = &types.InvalidKeySigningKeyStatus{} 18281 } else { 18282 sv = *v 18283 } 18284 18285 for { 18286 t, done, err := decoder.Token() 18287 if err != nil { 18288 return err 18289 } 18290 if done { 18291 break 18292 } 18293 originalDecoder := decoder 18294 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18295 switch { 18296 case strings.EqualFold("message", t.Name.Local): 18297 val, err := decoder.Value() 18298 if err != nil { 18299 return err 18300 } 18301 if val == nil { 18302 break 18303 } 18304 { 18305 xtv := string(val) 18306 sv.Message = ptr.String(xtv) 18307 } 18308 18309 default: 18310 // Do nothing and ignore the unexpected tag element 18311 err = decoder.Decoder.Skip() 18312 if err != nil { 18313 return err 18314 } 18315 18316 } 18317 decoder = originalDecoder 18318 } 18319 *v = sv 18320 return nil 18321 } 18322 18323 func awsRestxml_deserializeDocumentInvalidKMSArn(v **types.InvalidKMSArn, decoder smithyxml.NodeDecoder) error { 18324 if v == nil { 18325 return fmt.Errorf("unexpected nil of type %T", v) 18326 } 18327 var sv *types.InvalidKMSArn 18328 if *v == nil { 18329 sv = &types.InvalidKMSArn{} 18330 } else { 18331 sv = *v 18332 } 18333 18334 for { 18335 t, done, err := decoder.Token() 18336 if err != nil { 18337 return err 18338 } 18339 if done { 18340 break 18341 } 18342 originalDecoder := decoder 18343 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18344 switch { 18345 case strings.EqualFold("message", t.Name.Local): 18346 val, err := decoder.Value() 18347 if err != nil { 18348 return err 18349 } 18350 if val == nil { 18351 break 18352 } 18353 { 18354 xtv := string(val) 18355 sv.Message = ptr.String(xtv) 18356 } 18357 18358 default: 18359 // Do nothing and ignore the unexpected tag element 18360 err = decoder.Decoder.Skip() 18361 if err != nil { 18362 return err 18363 } 18364 18365 } 18366 decoder = originalDecoder 18367 } 18368 *v = sv 18369 return nil 18370 } 18371 18372 func awsRestxml_deserializeDocumentInvalidPaginationToken(v **types.InvalidPaginationToken, decoder smithyxml.NodeDecoder) error { 18373 if v == nil { 18374 return fmt.Errorf("unexpected nil of type %T", v) 18375 } 18376 var sv *types.InvalidPaginationToken 18377 if *v == nil { 18378 sv = &types.InvalidPaginationToken{} 18379 } else { 18380 sv = *v 18381 } 18382 18383 for { 18384 t, done, err := decoder.Token() 18385 if err != nil { 18386 return err 18387 } 18388 if done { 18389 break 18390 } 18391 originalDecoder := decoder 18392 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18393 switch { 18394 case strings.EqualFold("message", t.Name.Local): 18395 val, err := decoder.Value() 18396 if err != nil { 18397 return err 18398 } 18399 if val == nil { 18400 break 18401 } 18402 { 18403 xtv := string(val) 18404 sv.Message = ptr.String(xtv) 18405 } 18406 18407 default: 18408 // Do nothing and ignore the unexpected tag element 18409 err = decoder.Decoder.Skip() 18410 if err != nil { 18411 return err 18412 } 18413 18414 } 18415 decoder = originalDecoder 18416 } 18417 *v = sv 18418 return nil 18419 } 18420 18421 func awsRestxml_deserializeDocumentInvalidSigningStatus(v **types.InvalidSigningStatus, decoder smithyxml.NodeDecoder) error { 18422 if v == nil { 18423 return fmt.Errorf("unexpected nil of type %T", v) 18424 } 18425 var sv *types.InvalidSigningStatus 18426 if *v == nil { 18427 sv = &types.InvalidSigningStatus{} 18428 } else { 18429 sv = *v 18430 } 18431 18432 for { 18433 t, done, err := decoder.Token() 18434 if err != nil { 18435 return err 18436 } 18437 if done { 18438 break 18439 } 18440 originalDecoder := decoder 18441 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18442 switch { 18443 case strings.EqualFold("message", t.Name.Local): 18444 val, err := decoder.Value() 18445 if err != nil { 18446 return err 18447 } 18448 if val == nil { 18449 break 18450 } 18451 { 18452 xtv := string(val) 18453 sv.Message = ptr.String(xtv) 18454 } 18455 18456 default: 18457 // Do nothing and ignore the unexpected tag element 18458 err = decoder.Decoder.Skip() 18459 if err != nil { 18460 return err 18461 } 18462 18463 } 18464 decoder = originalDecoder 18465 } 18466 *v = sv 18467 return nil 18468 } 18469 18470 func awsRestxml_deserializeDocumentInvalidTrafficPolicyDocument(v **types.InvalidTrafficPolicyDocument, decoder smithyxml.NodeDecoder) error { 18471 if v == nil { 18472 return fmt.Errorf("unexpected nil of type %T", v) 18473 } 18474 var sv *types.InvalidTrafficPolicyDocument 18475 if *v == nil { 18476 sv = &types.InvalidTrafficPolicyDocument{} 18477 } else { 18478 sv = *v 18479 } 18480 18481 for { 18482 t, done, err := decoder.Token() 18483 if err != nil { 18484 return err 18485 } 18486 if done { 18487 break 18488 } 18489 originalDecoder := decoder 18490 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18491 switch { 18492 case strings.EqualFold("message", t.Name.Local): 18493 val, err := decoder.Value() 18494 if err != nil { 18495 return err 18496 } 18497 if val == nil { 18498 break 18499 } 18500 { 18501 xtv := string(val) 18502 sv.Message = ptr.String(xtv) 18503 } 18504 18505 default: 18506 // Do nothing and ignore the unexpected tag element 18507 err = decoder.Decoder.Skip() 18508 if err != nil { 18509 return err 18510 } 18511 18512 } 18513 decoder = originalDecoder 18514 } 18515 *v = sv 18516 return nil 18517 } 18518 18519 func awsRestxml_deserializeDocumentInvalidVPCId(v **types.InvalidVPCId, decoder smithyxml.NodeDecoder) error { 18520 if v == nil { 18521 return fmt.Errorf("unexpected nil of type %T", v) 18522 } 18523 var sv *types.InvalidVPCId 18524 if *v == nil { 18525 sv = &types.InvalidVPCId{} 18526 } else { 18527 sv = *v 18528 } 18529 18530 for { 18531 t, done, err := decoder.Token() 18532 if err != nil { 18533 return err 18534 } 18535 if done { 18536 break 18537 } 18538 originalDecoder := decoder 18539 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18540 switch { 18541 case strings.EqualFold("message", t.Name.Local): 18542 val, err := decoder.Value() 18543 if err != nil { 18544 return err 18545 } 18546 if val == nil { 18547 break 18548 } 18549 { 18550 xtv := string(val) 18551 sv.Message = ptr.String(xtv) 18552 } 18553 18554 default: 18555 // Do nothing and ignore the unexpected tag element 18556 err = decoder.Decoder.Skip() 18557 if err != nil { 18558 return err 18559 } 18560 18561 } 18562 decoder = originalDecoder 18563 } 18564 *v = sv 18565 return nil 18566 } 18567 18568 func awsRestxml_deserializeDocumentKeySigningKey(v **types.KeySigningKey, decoder smithyxml.NodeDecoder) error { 18569 if v == nil { 18570 return fmt.Errorf("unexpected nil of type %T", v) 18571 } 18572 var sv *types.KeySigningKey 18573 if *v == nil { 18574 sv = &types.KeySigningKey{} 18575 } else { 18576 sv = *v 18577 } 18578 18579 for { 18580 t, done, err := decoder.Token() 18581 if err != nil { 18582 return err 18583 } 18584 if done { 18585 break 18586 } 18587 originalDecoder := decoder 18588 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18589 switch { 18590 case strings.EqualFold("CreatedDate", t.Name.Local): 18591 val, err := decoder.Value() 18592 if err != nil { 18593 return err 18594 } 18595 if val == nil { 18596 break 18597 } 18598 { 18599 xtv := string(val) 18600 t, err := smithytime.ParseDateTime(xtv) 18601 if err != nil { 18602 return err 18603 } 18604 sv.CreatedDate = ptr.Time(t) 18605 } 18606 18607 case strings.EqualFold("DigestAlgorithmMnemonic", t.Name.Local): 18608 val, err := decoder.Value() 18609 if err != nil { 18610 return err 18611 } 18612 if val == nil { 18613 break 18614 } 18615 { 18616 xtv := string(val) 18617 sv.DigestAlgorithmMnemonic = ptr.String(xtv) 18618 } 18619 18620 case strings.EqualFold("DigestAlgorithmType", t.Name.Local): 18621 val, err := decoder.Value() 18622 if err != nil { 18623 return err 18624 } 18625 if val == nil { 18626 break 18627 } 18628 { 18629 xtv := string(val) 18630 i64, err := strconv.ParseInt(xtv, 10, 64) 18631 if err != nil { 18632 return err 18633 } 18634 sv.DigestAlgorithmType = int32(i64) 18635 } 18636 18637 case strings.EqualFold("DigestValue", t.Name.Local): 18638 val, err := decoder.Value() 18639 if err != nil { 18640 return err 18641 } 18642 if val == nil { 18643 break 18644 } 18645 { 18646 xtv := string(val) 18647 sv.DigestValue = ptr.String(xtv) 18648 } 18649 18650 case strings.EqualFold("DNSKEYRecord", t.Name.Local): 18651 val, err := decoder.Value() 18652 if err != nil { 18653 return err 18654 } 18655 if val == nil { 18656 break 18657 } 18658 { 18659 xtv := string(val) 18660 sv.DNSKEYRecord = ptr.String(xtv) 18661 } 18662 18663 case strings.EqualFold("DSRecord", t.Name.Local): 18664 val, err := decoder.Value() 18665 if err != nil { 18666 return err 18667 } 18668 if val == nil { 18669 break 18670 } 18671 { 18672 xtv := string(val) 18673 sv.DSRecord = ptr.String(xtv) 18674 } 18675 18676 case strings.EqualFold("Flag", t.Name.Local): 18677 val, err := decoder.Value() 18678 if err != nil { 18679 return err 18680 } 18681 if val == nil { 18682 break 18683 } 18684 { 18685 xtv := string(val) 18686 i64, err := strconv.ParseInt(xtv, 10, 64) 18687 if err != nil { 18688 return err 18689 } 18690 sv.Flag = int32(i64) 18691 } 18692 18693 case strings.EqualFold("KeyTag", t.Name.Local): 18694 val, err := decoder.Value() 18695 if err != nil { 18696 return err 18697 } 18698 if val == nil { 18699 break 18700 } 18701 { 18702 xtv := string(val) 18703 i64, err := strconv.ParseInt(xtv, 10, 64) 18704 if err != nil { 18705 return err 18706 } 18707 sv.KeyTag = int32(i64) 18708 } 18709 18710 case strings.EqualFold("KmsArn", t.Name.Local): 18711 val, err := decoder.Value() 18712 if err != nil { 18713 return err 18714 } 18715 if val == nil { 18716 break 18717 } 18718 { 18719 xtv := string(val) 18720 sv.KmsArn = ptr.String(xtv) 18721 } 18722 18723 case strings.EqualFold("LastModifiedDate", t.Name.Local): 18724 val, err := decoder.Value() 18725 if err != nil { 18726 return err 18727 } 18728 if val == nil { 18729 break 18730 } 18731 { 18732 xtv := string(val) 18733 t, err := smithytime.ParseDateTime(xtv) 18734 if err != nil { 18735 return err 18736 } 18737 sv.LastModifiedDate = ptr.Time(t) 18738 } 18739 18740 case strings.EqualFold("Name", t.Name.Local): 18741 val, err := decoder.Value() 18742 if err != nil { 18743 return err 18744 } 18745 if val == nil { 18746 break 18747 } 18748 { 18749 xtv := string(val) 18750 sv.Name = ptr.String(xtv) 18751 } 18752 18753 case strings.EqualFold("PublicKey", t.Name.Local): 18754 val, err := decoder.Value() 18755 if err != nil { 18756 return err 18757 } 18758 if val == nil { 18759 break 18760 } 18761 { 18762 xtv := string(val) 18763 sv.PublicKey = ptr.String(xtv) 18764 } 18765 18766 case strings.EqualFold("SigningAlgorithmMnemonic", t.Name.Local): 18767 val, err := decoder.Value() 18768 if err != nil { 18769 return err 18770 } 18771 if val == nil { 18772 break 18773 } 18774 { 18775 xtv := string(val) 18776 sv.SigningAlgorithmMnemonic = ptr.String(xtv) 18777 } 18778 18779 case strings.EqualFold("SigningAlgorithmType", t.Name.Local): 18780 val, err := decoder.Value() 18781 if err != nil { 18782 return err 18783 } 18784 if val == nil { 18785 break 18786 } 18787 { 18788 xtv := string(val) 18789 i64, err := strconv.ParseInt(xtv, 10, 64) 18790 if err != nil { 18791 return err 18792 } 18793 sv.SigningAlgorithmType = int32(i64) 18794 } 18795 18796 case strings.EqualFold("Status", t.Name.Local): 18797 val, err := decoder.Value() 18798 if err != nil { 18799 return err 18800 } 18801 if val == nil { 18802 break 18803 } 18804 { 18805 xtv := string(val) 18806 sv.Status = ptr.String(xtv) 18807 } 18808 18809 case strings.EqualFold("StatusMessage", t.Name.Local): 18810 val, err := decoder.Value() 18811 if err != nil { 18812 return err 18813 } 18814 if val == nil { 18815 break 18816 } 18817 { 18818 xtv := string(val) 18819 sv.StatusMessage = ptr.String(xtv) 18820 } 18821 18822 default: 18823 // Do nothing and ignore the unexpected tag element 18824 err = decoder.Decoder.Skip() 18825 if err != nil { 18826 return err 18827 } 18828 18829 } 18830 decoder = originalDecoder 18831 } 18832 *v = sv 18833 return nil 18834 } 18835 18836 func awsRestxml_deserializeDocumentKeySigningKeyAlreadyExists(v **types.KeySigningKeyAlreadyExists, decoder smithyxml.NodeDecoder) error { 18837 if v == nil { 18838 return fmt.Errorf("unexpected nil of type %T", v) 18839 } 18840 var sv *types.KeySigningKeyAlreadyExists 18841 if *v == nil { 18842 sv = &types.KeySigningKeyAlreadyExists{} 18843 } else { 18844 sv = *v 18845 } 18846 18847 for { 18848 t, done, err := decoder.Token() 18849 if err != nil { 18850 return err 18851 } 18852 if done { 18853 break 18854 } 18855 originalDecoder := decoder 18856 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18857 switch { 18858 case strings.EqualFold("message", t.Name.Local): 18859 val, err := decoder.Value() 18860 if err != nil { 18861 return err 18862 } 18863 if val == nil { 18864 break 18865 } 18866 { 18867 xtv := string(val) 18868 sv.Message = ptr.String(xtv) 18869 } 18870 18871 default: 18872 // Do nothing and ignore the unexpected tag element 18873 err = decoder.Decoder.Skip() 18874 if err != nil { 18875 return err 18876 } 18877 18878 } 18879 decoder = originalDecoder 18880 } 18881 *v = sv 18882 return nil 18883 } 18884 18885 func awsRestxml_deserializeDocumentKeySigningKeyInParentDSRecord(v **types.KeySigningKeyInParentDSRecord, decoder smithyxml.NodeDecoder) error { 18886 if v == nil { 18887 return fmt.Errorf("unexpected nil of type %T", v) 18888 } 18889 var sv *types.KeySigningKeyInParentDSRecord 18890 if *v == nil { 18891 sv = &types.KeySigningKeyInParentDSRecord{} 18892 } else { 18893 sv = *v 18894 } 18895 18896 for { 18897 t, done, err := decoder.Token() 18898 if err != nil { 18899 return err 18900 } 18901 if done { 18902 break 18903 } 18904 originalDecoder := decoder 18905 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18906 switch { 18907 case strings.EqualFold("message", t.Name.Local): 18908 val, err := decoder.Value() 18909 if err != nil { 18910 return err 18911 } 18912 if val == nil { 18913 break 18914 } 18915 { 18916 xtv := string(val) 18917 sv.Message = ptr.String(xtv) 18918 } 18919 18920 default: 18921 // Do nothing and ignore the unexpected tag element 18922 err = decoder.Decoder.Skip() 18923 if err != nil { 18924 return err 18925 } 18926 18927 } 18928 decoder = originalDecoder 18929 } 18930 *v = sv 18931 return nil 18932 } 18933 18934 func awsRestxml_deserializeDocumentKeySigningKeyInUse(v **types.KeySigningKeyInUse, decoder smithyxml.NodeDecoder) error { 18935 if v == nil { 18936 return fmt.Errorf("unexpected nil of type %T", v) 18937 } 18938 var sv *types.KeySigningKeyInUse 18939 if *v == nil { 18940 sv = &types.KeySigningKeyInUse{} 18941 } else { 18942 sv = *v 18943 } 18944 18945 for { 18946 t, done, err := decoder.Token() 18947 if err != nil { 18948 return err 18949 } 18950 if done { 18951 break 18952 } 18953 originalDecoder := decoder 18954 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 18955 switch { 18956 case strings.EqualFold("message", t.Name.Local): 18957 val, err := decoder.Value() 18958 if err != nil { 18959 return err 18960 } 18961 if val == nil { 18962 break 18963 } 18964 { 18965 xtv := string(val) 18966 sv.Message = ptr.String(xtv) 18967 } 18968 18969 default: 18970 // Do nothing and ignore the unexpected tag element 18971 err = decoder.Decoder.Skip() 18972 if err != nil { 18973 return err 18974 } 18975 18976 } 18977 decoder = originalDecoder 18978 } 18979 *v = sv 18980 return nil 18981 } 18982 18983 func awsRestxml_deserializeDocumentKeySigningKeys(v *[]types.KeySigningKey, decoder smithyxml.NodeDecoder) error { 18984 if v == nil { 18985 return fmt.Errorf("unexpected nil of type %T", v) 18986 } 18987 var sv []types.KeySigningKey 18988 if *v == nil { 18989 sv = make([]types.KeySigningKey, 0) 18990 } else { 18991 sv = *v 18992 } 18993 18994 originalDecoder := decoder 18995 for { 18996 t, done, err := decoder.Token() 18997 if err != nil { 18998 return err 18999 } 19000 if done { 19001 break 19002 } 19003 switch { 19004 case strings.EqualFold("member", t.Name.Local): 19005 var col types.KeySigningKey 19006 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 19007 destAddr := &col 19008 if err := awsRestxml_deserializeDocumentKeySigningKey(&destAddr, nodeDecoder); err != nil { 19009 return err 19010 } 19011 col = *destAddr 19012 sv = append(sv, col) 19013 19014 default: 19015 err = decoder.Decoder.Skip() 19016 if err != nil { 19017 return err 19018 } 19019 19020 } 19021 decoder = originalDecoder 19022 } 19023 *v = sv 19024 return nil 19025 } 19026 19027 func awsRestxml_deserializeDocumentKeySigningKeysUnwrapped(v *[]types.KeySigningKey, decoder smithyxml.NodeDecoder) error { 19028 var sv []types.KeySigningKey 19029 if *v == nil { 19030 sv = make([]types.KeySigningKey, 0) 19031 } else { 19032 sv = *v 19033 } 19034 19035 switch { 19036 default: 19037 var mv types.KeySigningKey 19038 t := decoder.StartEl 19039 _ = t 19040 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 19041 destAddr := &mv 19042 if err := awsRestxml_deserializeDocumentKeySigningKey(&destAddr, nodeDecoder); err != nil { 19043 return err 19044 } 19045 mv = *destAddr 19046 sv = append(sv, mv) 19047 } 19048 *v = sv 19049 return nil 19050 } 19051 func awsRestxml_deserializeDocumentKeySigningKeyWithActiveStatusNotFound(v **types.KeySigningKeyWithActiveStatusNotFound, decoder smithyxml.NodeDecoder) error { 19052 if v == nil { 19053 return fmt.Errorf("unexpected nil of type %T", v) 19054 } 19055 var sv *types.KeySigningKeyWithActiveStatusNotFound 19056 if *v == nil { 19057 sv = &types.KeySigningKeyWithActiveStatusNotFound{} 19058 } else { 19059 sv = *v 19060 } 19061 19062 for { 19063 t, done, err := decoder.Token() 19064 if err != nil { 19065 return err 19066 } 19067 if done { 19068 break 19069 } 19070 originalDecoder := decoder 19071 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19072 switch { 19073 case strings.EqualFold("message", t.Name.Local): 19074 val, err := decoder.Value() 19075 if err != nil { 19076 return err 19077 } 19078 if val == nil { 19079 break 19080 } 19081 { 19082 xtv := string(val) 19083 sv.Message = ptr.String(xtv) 19084 } 19085 19086 default: 19087 // Do nothing and ignore the unexpected tag element 19088 err = decoder.Decoder.Skip() 19089 if err != nil { 19090 return err 19091 } 19092 19093 } 19094 decoder = originalDecoder 19095 } 19096 *v = sv 19097 return nil 19098 } 19099 19100 func awsRestxml_deserializeDocumentLastVPCAssociation(v **types.LastVPCAssociation, decoder smithyxml.NodeDecoder) error { 19101 if v == nil { 19102 return fmt.Errorf("unexpected nil of type %T", v) 19103 } 19104 var sv *types.LastVPCAssociation 19105 if *v == nil { 19106 sv = &types.LastVPCAssociation{} 19107 } else { 19108 sv = *v 19109 } 19110 19111 for { 19112 t, done, err := decoder.Token() 19113 if err != nil { 19114 return err 19115 } 19116 if done { 19117 break 19118 } 19119 originalDecoder := decoder 19120 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19121 switch { 19122 case strings.EqualFold("message", t.Name.Local): 19123 val, err := decoder.Value() 19124 if err != nil { 19125 return err 19126 } 19127 if val == nil { 19128 break 19129 } 19130 { 19131 xtv := string(val) 19132 sv.Message = ptr.String(xtv) 19133 } 19134 19135 default: 19136 // Do nothing and ignore the unexpected tag element 19137 err = decoder.Decoder.Skip() 19138 if err != nil { 19139 return err 19140 } 19141 19142 } 19143 decoder = originalDecoder 19144 } 19145 *v = sv 19146 return nil 19147 } 19148 19149 func awsRestxml_deserializeDocumentLimitsExceeded(v **types.LimitsExceeded, decoder smithyxml.NodeDecoder) error { 19150 if v == nil { 19151 return fmt.Errorf("unexpected nil of type %T", v) 19152 } 19153 var sv *types.LimitsExceeded 19154 if *v == nil { 19155 sv = &types.LimitsExceeded{} 19156 } else { 19157 sv = *v 19158 } 19159 19160 for { 19161 t, done, err := decoder.Token() 19162 if err != nil { 19163 return err 19164 } 19165 if done { 19166 break 19167 } 19168 originalDecoder := decoder 19169 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19170 switch { 19171 case strings.EqualFold("message", t.Name.Local): 19172 val, err := decoder.Value() 19173 if err != nil { 19174 return err 19175 } 19176 if val == nil { 19177 break 19178 } 19179 { 19180 xtv := string(val) 19181 sv.Message = ptr.String(xtv) 19182 } 19183 19184 default: 19185 // Do nothing and ignore the unexpected tag element 19186 err = decoder.Decoder.Skip() 19187 if err != nil { 19188 return err 19189 } 19190 19191 } 19192 decoder = originalDecoder 19193 } 19194 *v = sv 19195 return nil 19196 } 19197 19198 func awsRestxml_deserializeDocumentLinkedService(v **types.LinkedService, decoder smithyxml.NodeDecoder) error { 19199 if v == nil { 19200 return fmt.Errorf("unexpected nil of type %T", v) 19201 } 19202 var sv *types.LinkedService 19203 if *v == nil { 19204 sv = &types.LinkedService{} 19205 } else { 19206 sv = *v 19207 } 19208 19209 for { 19210 t, done, err := decoder.Token() 19211 if err != nil { 19212 return err 19213 } 19214 if done { 19215 break 19216 } 19217 originalDecoder := decoder 19218 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19219 switch { 19220 case strings.EqualFold("Description", t.Name.Local): 19221 val, err := decoder.Value() 19222 if err != nil { 19223 return err 19224 } 19225 if val == nil { 19226 break 19227 } 19228 { 19229 xtv := string(val) 19230 sv.Description = ptr.String(xtv) 19231 } 19232 19233 case strings.EqualFold("ServicePrincipal", t.Name.Local): 19234 val, err := decoder.Value() 19235 if err != nil { 19236 return err 19237 } 19238 if val == nil { 19239 break 19240 } 19241 { 19242 xtv := string(val) 19243 sv.ServicePrincipal = ptr.String(xtv) 19244 } 19245 19246 default: 19247 // Do nothing and ignore the unexpected tag element 19248 err = decoder.Decoder.Skip() 19249 if err != nil { 19250 return err 19251 } 19252 19253 } 19254 decoder = originalDecoder 19255 } 19256 *v = sv 19257 return nil 19258 } 19259 19260 func awsRestxml_deserializeDocumentLocationSummaries(v *[]types.LocationSummary, decoder smithyxml.NodeDecoder) error { 19261 if v == nil { 19262 return fmt.Errorf("unexpected nil of type %T", v) 19263 } 19264 var sv []types.LocationSummary 19265 if *v == nil { 19266 sv = make([]types.LocationSummary, 0) 19267 } else { 19268 sv = *v 19269 } 19270 19271 originalDecoder := decoder 19272 for { 19273 t, done, err := decoder.Token() 19274 if err != nil { 19275 return err 19276 } 19277 if done { 19278 break 19279 } 19280 switch { 19281 case strings.EqualFold("member", t.Name.Local): 19282 var col types.LocationSummary 19283 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 19284 destAddr := &col 19285 if err := awsRestxml_deserializeDocumentLocationSummary(&destAddr, nodeDecoder); err != nil { 19286 return err 19287 } 19288 col = *destAddr 19289 sv = append(sv, col) 19290 19291 default: 19292 err = decoder.Decoder.Skip() 19293 if err != nil { 19294 return err 19295 } 19296 19297 } 19298 decoder = originalDecoder 19299 } 19300 *v = sv 19301 return nil 19302 } 19303 19304 func awsRestxml_deserializeDocumentLocationSummariesUnwrapped(v *[]types.LocationSummary, decoder smithyxml.NodeDecoder) error { 19305 var sv []types.LocationSummary 19306 if *v == nil { 19307 sv = make([]types.LocationSummary, 0) 19308 } else { 19309 sv = *v 19310 } 19311 19312 switch { 19313 default: 19314 var mv types.LocationSummary 19315 t := decoder.StartEl 19316 _ = t 19317 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 19318 destAddr := &mv 19319 if err := awsRestxml_deserializeDocumentLocationSummary(&destAddr, nodeDecoder); err != nil { 19320 return err 19321 } 19322 mv = *destAddr 19323 sv = append(sv, mv) 19324 } 19325 *v = sv 19326 return nil 19327 } 19328 func awsRestxml_deserializeDocumentLocationSummary(v **types.LocationSummary, decoder smithyxml.NodeDecoder) error { 19329 if v == nil { 19330 return fmt.Errorf("unexpected nil of type %T", v) 19331 } 19332 var sv *types.LocationSummary 19333 if *v == nil { 19334 sv = &types.LocationSummary{} 19335 } else { 19336 sv = *v 19337 } 19338 19339 for { 19340 t, done, err := decoder.Token() 19341 if err != nil { 19342 return err 19343 } 19344 if done { 19345 break 19346 } 19347 originalDecoder := decoder 19348 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19349 switch { 19350 case strings.EqualFold("LocationName", t.Name.Local): 19351 val, err := decoder.Value() 19352 if err != nil { 19353 return err 19354 } 19355 if val == nil { 19356 break 19357 } 19358 { 19359 xtv := string(val) 19360 sv.LocationName = ptr.String(xtv) 19361 } 19362 19363 default: 19364 // Do nothing and ignore the unexpected tag element 19365 err = decoder.Decoder.Skip() 19366 if err != nil { 19367 return err 19368 } 19369 19370 } 19371 decoder = originalDecoder 19372 } 19373 *v = sv 19374 return nil 19375 } 19376 19377 func awsRestxml_deserializeDocumentNoSuchChange(v **types.NoSuchChange, decoder smithyxml.NodeDecoder) error { 19378 if v == nil { 19379 return fmt.Errorf("unexpected nil of type %T", v) 19380 } 19381 var sv *types.NoSuchChange 19382 if *v == nil { 19383 sv = &types.NoSuchChange{} 19384 } else { 19385 sv = *v 19386 } 19387 19388 for { 19389 t, done, err := decoder.Token() 19390 if err != nil { 19391 return err 19392 } 19393 if done { 19394 break 19395 } 19396 originalDecoder := decoder 19397 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19398 switch { 19399 case strings.EqualFold("message", t.Name.Local): 19400 val, err := decoder.Value() 19401 if err != nil { 19402 return err 19403 } 19404 if val == nil { 19405 break 19406 } 19407 { 19408 xtv := string(val) 19409 sv.Message = ptr.String(xtv) 19410 } 19411 19412 default: 19413 // Do nothing and ignore the unexpected tag element 19414 err = decoder.Decoder.Skip() 19415 if err != nil { 19416 return err 19417 } 19418 19419 } 19420 decoder = originalDecoder 19421 } 19422 *v = sv 19423 return nil 19424 } 19425 19426 func awsRestxml_deserializeDocumentNoSuchCidrCollectionException(v **types.NoSuchCidrCollectionException, decoder smithyxml.NodeDecoder) error { 19427 if v == nil { 19428 return fmt.Errorf("unexpected nil of type %T", v) 19429 } 19430 var sv *types.NoSuchCidrCollectionException 19431 if *v == nil { 19432 sv = &types.NoSuchCidrCollectionException{} 19433 } else { 19434 sv = *v 19435 } 19436 19437 for { 19438 t, done, err := decoder.Token() 19439 if err != nil { 19440 return err 19441 } 19442 if done { 19443 break 19444 } 19445 originalDecoder := decoder 19446 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19447 switch { 19448 case strings.EqualFold("Message", t.Name.Local): 19449 val, err := decoder.Value() 19450 if err != nil { 19451 return err 19452 } 19453 if val == nil { 19454 break 19455 } 19456 { 19457 xtv := string(val) 19458 sv.Message = ptr.String(xtv) 19459 } 19460 19461 default: 19462 // Do nothing and ignore the unexpected tag element 19463 err = decoder.Decoder.Skip() 19464 if err != nil { 19465 return err 19466 } 19467 19468 } 19469 decoder = originalDecoder 19470 } 19471 *v = sv 19472 return nil 19473 } 19474 19475 func awsRestxml_deserializeDocumentNoSuchCidrLocationException(v **types.NoSuchCidrLocationException, decoder smithyxml.NodeDecoder) error { 19476 if v == nil { 19477 return fmt.Errorf("unexpected nil of type %T", v) 19478 } 19479 var sv *types.NoSuchCidrLocationException 19480 if *v == nil { 19481 sv = &types.NoSuchCidrLocationException{} 19482 } else { 19483 sv = *v 19484 } 19485 19486 for { 19487 t, done, err := decoder.Token() 19488 if err != nil { 19489 return err 19490 } 19491 if done { 19492 break 19493 } 19494 originalDecoder := decoder 19495 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19496 switch { 19497 case strings.EqualFold("Message", t.Name.Local): 19498 val, err := decoder.Value() 19499 if err != nil { 19500 return err 19501 } 19502 if val == nil { 19503 break 19504 } 19505 { 19506 xtv := string(val) 19507 sv.Message = ptr.String(xtv) 19508 } 19509 19510 default: 19511 // Do nothing and ignore the unexpected tag element 19512 err = decoder.Decoder.Skip() 19513 if err != nil { 19514 return err 19515 } 19516 19517 } 19518 decoder = originalDecoder 19519 } 19520 *v = sv 19521 return nil 19522 } 19523 19524 func awsRestxml_deserializeDocumentNoSuchCloudWatchLogsLogGroup(v **types.NoSuchCloudWatchLogsLogGroup, decoder smithyxml.NodeDecoder) error { 19525 if v == nil { 19526 return fmt.Errorf("unexpected nil of type %T", v) 19527 } 19528 var sv *types.NoSuchCloudWatchLogsLogGroup 19529 if *v == nil { 19530 sv = &types.NoSuchCloudWatchLogsLogGroup{} 19531 } else { 19532 sv = *v 19533 } 19534 19535 for { 19536 t, done, err := decoder.Token() 19537 if err != nil { 19538 return err 19539 } 19540 if done { 19541 break 19542 } 19543 originalDecoder := decoder 19544 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19545 switch { 19546 case strings.EqualFold("message", t.Name.Local): 19547 val, err := decoder.Value() 19548 if err != nil { 19549 return err 19550 } 19551 if val == nil { 19552 break 19553 } 19554 { 19555 xtv := string(val) 19556 sv.Message = ptr.String(xtv) 19557 } 19558 19559 default: 19560 // Do nothing and ignore the unexpected tag element 19561 err = decoder.Decoder.Skip() 19562 if err != nil { 19563 return err 19564 } 19565 19566 } 19567 decoder = originalDecoder 19568 } 19569 *v = sv 19570 return nil 19571 } 19572 19573 func awsRestxml_deserializeDocumentNoSuchDelegationSet(v **types.NoSuchDelegationSet, decoder smithyxml.NodeDecoder) error { 19574 if v == nil { 19575 return fmt.Errorf("unexpected nil of type %T", v) 19576 } 19577 var sv *types.NoSuchDelegationSet 19578 if *v == nil { 19579 sv = &types.NoSuchDelegationSet{} 19580 } else { 19581 sv = *v 19582 } 19583 19584 for { 19585 t, done, err := decoder.Token() 19586 if err != nil { 19587 return err 19588 } 19589 if done { 19590 break 19591 } 19592 originalDecoder := decoder 19593 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19594 switch { 19595 case strings.EqualFold("message", t.Name.Local): 19596 val, err := decoder.Value() 19597 if err != nil { 19598 return err 19599 } 19600 if val == nil { 19601 break 19602 } 19603 { 19604 xtv := string(val) 19605 sv.Message = ptr.String(xtv) 19606 } 19607 19608 default: 19609 // Do nothing and ignore the unexpected tag element 19610 err = decoder.Decoder.Skip() 19611 if err != nil { 19612 return err 19613 } 19614 19615 } 19616 decoder = originalDecoder 19617 } 19618 *v = sv 19619 return nil 19620 } 19621 19622 func awsRestxml_deserializeDocumentNoSuchGeoLocation(v **types.NoSuchGeoLocation, decoder smithyxml.NodeDecoder) error { 19623 if v == nil { 19624 return fmt.Errorf("unexpected nil of type %T", v) 19625 } 19626 var sv *types.NoSuchGeoLocation 19627 if *v == nil { 19628 sv = &types.NoSuchGeoLocation{} 19629 } else { 19630 sv = *v 19631 } 19632 19633 for { 19634 t, done, err := decoder.Token() 19635 if err != nil { 19636 return err 19637 } 19638 if done { 19639 break 19640 } 19641 originalDecoder := decoder 19642 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19643 switch { 19644 case strings.EqualFold("message", t.Name.Local): 19645 val, err := decoder.Value() 19646 if err != nil { 19647 return err 19648 } 19649 if val == nil { 19650 break 19651 } 19652 { 19653 xtv := string(val) 19654 sv.Message = ptr.String(xtv) 19655 } 19656 19657 default: 19658 // Do nothing and ignore the unexpected tag element 19659 err = decoder.Decoder.Skip() 19660 if err != nil { 19661 return err 19662 } 19663 19664 } 19665 decoder = originalDecoder 19666 } 19667 *v = sv 19668 return nil 19669 } 19670 19671 func awsRestxml_deserializeDocumentNoSuchHealthCheck(v **types.NoSuchHealthCheck, decoder smithyxml.NodeDecoder) error { 19672 if v == nil { 19673 return fmt.Errorf("unexpected nil of type %T", v) 19674 } 19675 var sv *types.NoSuchHealthCheck 19676 if *v == nil { 19677 sv = &types.NoSuchHealthCheck{} 19678 } else { 19679 sv = *v 19680 } 19681 19682 for { 19683 t, done, err := decoder.Token() 19684 if err != nil { 19685 return err 19686 } 19687 if done { 19688 break 19689 } 19690 originalDecoder := decoder 19691 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19692 switch { 19693 case strings.EqualFold("message", t.Name.Local): 19694 val, err := decoder.Value() 19695 if err != nil { 19696 return err 19697 } 19698 if val == nil { 19699 break 19700 } 19701 { 19702 xtv := string(val) 19703 sv.Message = ptr.String(xtv) 19704 } 19705 19706 default: 19707 // Do nothing and ignore the unexpected tag element 19708 err = decoder.Decoder.Skip() 19709 if err != nil { 19710 return err 19711 } 19712 19713 } 19714 decoder = originalDecoder 19715 } 19716 *v = sv 19717 return nil 19718 } 19719 19720 func awsRestxml_deserializeDocumentNoSuchHostedZone(v **types.NoSuchHostedZone, decoder smithyxml.NodeDecoder) error { 19721 if v == nil { 19722 return fmt.Errorf("unexpected nil of type %T", v) 19723 } 19724 var sv *types.NoSuchHostedZone 19725 if *v == nil { 19726 sv = &types.NoSuchHostedZone{} 19727 } else { 19728 sv = *v 19729 } 19730 19731 for { 19732 t, done, err := decoder.Token() 19733 if err != nil { 19734 return err 19735 } 19736 if done { 19737 break 19738 } 19739 originalDecoder := decoder 19740 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19741 switch { 19742 case strings.EqualFold("message", t.Name.Local): 19743 val, err := decoder.Value() 19744 if err != nil { 19745 return err 19746 } 19747 if val == nil { 19748 break 19749 } 19750 { 19751 xtv := string(val) 19752 sv.Message = ptr.String(xtv) 19753 } 19754 19755 default: 19756 // Do nothing and ignore the unexpected tag element 19757 err = decoder.Decoder.Skip() 19758 if err != nil { 19759 return err 19760 } 19761 19762 } 19763 decoder = originalDecoder 19764 } 19765 *v = sv 19766 return nil 19767 } 19768 19769 func awsRestxml_deserializeDocumentNoSuchKeySigningKey(v **types.NoSuchKeySigningKey, decoder smithyxml.NodeDecoder) error { 19770 if v == nil { 19771 return fmt.Errorf("unexpected nil of type %T", v) 19772 } 19773 var sv *types.NoSuchKeySigningKey 19774 if *v == nil { 19775 sv = &types.NoSuchKeySigningKey{} 19776 } else { 19777 sv = *v 19778 } 19779 19780 for { 19781 t, done, err := decoder.Token() 19782 if err != nil { 19783 return err 19784 } 19785 if done { 19786 break 19787 } 19788 originalDecoder := decoder 19789 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19790 switch { 19791 case strings.EqualFold("message", t.Name.Local): 19792 val, err := decoder.Value() 19793 if err != nil { 19794 return err 19795 } 19796 if val == nil { 19797 break 19798 } 19799 { 19800 xtv := string(val) 19801 sv.Message = ptr.String(xtv) 19802 } 19803 19804 default: 19805 // Do nothing and ignore the unexpected tag element 19806 err = decoder.Decoder.Skip() 19807 if err != nil { 19808 return err 19809 } 19810 19811 } 19812 decoder = originalDecoder 19813 } 19814 *v = sv 19815 return nil 19816 } 19817 19818 func awsRestxml_deserializeDocumentNoSuchQueryLoggingConfig(v **types.NoSuchQueryLoggingConfig, decoder smithyxml.NodeDecoder) error { 19819 if v == nil { 19820 return fmt.Errorf("unexpected nil of type %T", v) 19821 } 19822 var sv *types.NoSuchQueryLoggingConfig 19823 if *v == nil { 19824 sv = &types.NoSuchQueryLoggingConfig{} 19825 } else { 19826 sv = *v 19827 } 19828 19829 for { 19830 t, done, err := decoder.Token() 19831 if err != nil { 19832 return err 19833 } 19834 if done { 19835 break 19836 } 19837 originalDecoder := decoder 19838 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19839 switch { 19840 case strings.EqualFold("message", t.Name.Local): 19841 val, err := decoder.Value() 19842 if err != nil { 19843 return err 19844 } 19845 if val == nil { 19846 break 19847 } 19848 { 19849 xtv := string(val) 19850 sv.Message = ptr.String(xtv) 19851 } 19852 19853 default: 19854 // Do nothing and ignore the unexpected tag element 19855 err = decoder.Decoder.Skip() 19856 if err != nil { 19857 return err 19858 } 19859 19860 } 19861 decoder = originalDecoder 19862 } 19863 *v = sv 19864 return nil 19865 } 19866 19867 func awsRestxml_deserializeDocumentNoSuchTrafficPolicy(v **types.NoSuchTrafficPolicy, decoder smithyxml.NodeDecoder) error { 19868 if v == nil { 19869 return fmt.Errorf("unexpected nil of type %T", v) 19870 } 19871 var sv *types.NoSuchTrafficPolicy 19872 if *v == nil { 19873 sv = &types.NoSuchTrafficPolicy{} 19874 } else { 19875 sv = *v 19876 } 19877 19878 for { 19879 t, done, err := decoder.Token() 19880 if err != nil { 19881 return err 19882 } 19883 if done { 19884 break 19885 } 19886 originalDecoder := decoder 19887 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19888 switch { 19889 case strings.EqualFold("message", t.Name.Local): 19890 val, err := decoder.Value() 19891 if err != nil { 19892 return err 19893 } 19894 if val == nil { 19895 break 19896 } 19897 { 19898 xtv := string(val) 19899 sv.Message = ptr.String(xtv) 19900 } 19901 19902 default: 19903 // Do nothing and ignore the unexpected tag element 19904 err = decoder.Decoder.Skip() 19905 if err != nil { 19906 return err 19907 } 19908 19909 } 19910 decoder = originalDecoder 19911 } 19912 *v = sv 19913 return nil 19914 } 19915 19916 func awsRestxml_deserializeDocumentNoSuchTrafficPolicyInstance(v **types.NoSuchTrafficPolicyInstance, decoder smithyxml.NodeDecoder) error { 19917 if v == nil { 19918 return fmt.Errorf("unexpected nil of type %T", v) 19919 } 19920 var sv *types.NoSuchTrafficPolicyInstance 19921 if *v == nil { 19922 sv = &types.NoSuchTrafficPolicyInstance{} 19923 } else { 19924 sv = *v 19925 } 19926 19927 for { 19928 t, done, err := decoder.Token() 19929 if err != nil { 19930 return err 19931 } 19932 if done { 19933 break 19934 } 19935 originalDecoder := decoder 19936 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19937 switch { 19938 case strings.EqualFold("message", t.Name.Local): 19939 val, err := decoder.Value() 19940 if err != nil { 19941 return err 19942 } 19943 if val == nil { 19944 break 19945 } 19946 { 19947 xtv := string(val) 19948 sv.Message = ptr.String(xtv) 19949 } 19950 19951 default: 19952 // Do nothing and ignore the unexpected tag element 19953 err = decoder.Decoder.Skip() 19954 if err != nil { 19955 return err 19956 } 19957 19958 } 19959 decoder = originalDecoder 19960 } 19961 *v = sv 19962 return nil 19963 } 19964 19965 func awsRestxml_deserializeDocumentNotAuthorizedException(v **types.NotAuthorizedException, decoder smithyxml.NodeDecoder) error { 19966 if v == nil { 19967 return fmt.Errorf("unexpected nil of type %T", v) 19968 } 19969 var sv *types.NotAuthorizedException 19970 if *v == nil { 19971 sv = &types.NotAuthorizedException{} 19972 } else { 19973 sv = *v 19974 } 19975 19976 for { 19977 t, done, err := decoder.Token() 19978 if err != nil { 19979 return err 19980 } 19981 if done { 19982 break 19983 } 19984 originalDecoder := decoder 19985 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 19986 switch { 19987 case strings.EqualFold("message", t.Name.Local): 19988 val, err := decoder.Value() 19989 if err != nil { 19990 return err 19991 } 19992 if val == nil { 19993 break 19994 } 19995 { 19996 xtv := string(val) 19997 sv.Message = ptr.String(xtv) 19998 } 19999 20000 default: 20001 // Do nothing and ignore the unexpected tag element 20002 err = decoder.Decoder.Skip() 20003 if err != nil { 20004 return err 20005 } 20006 20007 } 20008 decoder = originalDecoder 20009 } 20010 *v = sv 20011 return nil 20012 } 20013 20014 func awsRestxml_deserializeDocumentPriorRequestNotComplete(v **types.PriorRequestNotComplete, decoder smithyxml.NodeDecoder) error { 20015 if v == nil { 20016 return fmt.Errorf("unexpected nil of type %T", v) 20017 } 20018 var sv *types.PriorRequestNotComplete 20019 if *v == nil { 20020 sv = &types.PriorRequestNotComplete{} 20021 } else { 20022 sv = *v 20023 } 20024 20025 for { 20026 t, done, err := decoder.Token() 20027 if err != nil { 20028 return err 20029 } 20030 if done { 20031 break 20032 } 20033 originalDecoder := decoder 20034 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 20035 switch { 20036 case strings.EqualFold("message", t.Name.Local): 20037 val, err := decoder.Value() 20038 if err != nil { 20039 return err 20040 } 20041 if val == nil { 20042 break 20043 } 20044 { 20045 xtv := string(val) 20046 sv.Message = ptr.String(xtv) 20047 } 20048 20049 default: 20050 // Do nothing and ignore the unexpected tag element 20051 err = decoder.Decoder.Skip() 20052 if err != nil { 20053 return err 20054 } 20055 20056 } 20057 decoder = originalDecoder 20058 } 20059 *v = sv 20060 return nil 20061 } 20062 20063 func awsRestxml_deserializeDocumentPublicZoneVPCAssociation(v **types.PublicZoneVPCAssociation, decoder smithyxml.NodeDecoder) error { 20064 if v == nil { 20065 return fmt.Errorf("unexpected nil of type %T", v) 20066 } 20067 var sv *types.PublicZoneVPCAssociation 20068 if *v == nil { 20069 sv = &types.PublicZoneVPCAssociation{} 20070 } else { 20071 sv = *v 20072 } 20073 20074 for { 20075 t, done, err := decoder.Token() 20076 if err != nil { 20077 return err 20078 } 20079 if done { 20080 break 20081 } 20082 originalDecoder := decoder 20083 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 20084 switch { 20085 case strings.EqualFold("message", t.Name.Local): 20086 val, err := decoder.Value() 20087 if err != nil { 20088 return err 20089 } 20090 if val == nil { 20091 break 20092 } 20093 { 20094 xtv := string(val) 20095 sv.Message = ptr.String(xtv) 20096 } 20097 20098 default: 20099 // Do nothing and ignore the unexpected tag element 20100 err = decoder.Decoder.Skip() 20101 if err != nil { 20102 return err 20103 } 20104 20105 } 20106 decoder = originalDecoder 20107 } 20108 *v = sv 20109 return nil 20110 } 20111 20112 func awsRestxml_deserializeDocumentQueryLoggingConfig(v **types.QueryLoggingConfig, decoder smithyxml.NodeDecoder) error { 20113 if v == nil { 20114 return fmt.Errorf("unexpected nil of type %T", v) 20115 } 20116 var sv *types.QueryLoggingConfig 20117 if *v == nil { 20118 sv = &types.QueryLoggingConfig{} 20119 } else { 20120 sv = *v 20121 } 20122 20123 for { 20124 t, done, err := decoder.Token() 20125 if err != nil { 20126 return err 20127 } 20128 if done { 20129 break 20130 } 20131 originalDecoder := decoder 20132 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 20133 switch { 20134 case strings.EqualFold("CloudWatchLogsLogGroupArn", t.Name.Local): 20135 val, err := decoder.Value() 20136 if err != nil { 20137 return err 20138 } 20139 if val == nil { 20140 break 20141 } 20142 { 20143 xtv := string(val) 20144 sv.CloudWatchLogsLogGroupArn = ptr.String(xtv) 20145 } 20146 20147 case strings.EqualFold("HostedZoneId", t.Name.Local): 20148 val, err := decoder.Value() 20149 if err != nil { 20150 return err 20151 } 20152 if val == nil { 20153 break 20154 } 20155 { 20156 xtv := string(val) 20157 sv.HostedZoneId = ptr.String(xtv) 20158 } 20159 20160 case strings.EqualFold("Id", t.Name.Local): 20161 val, err := decoder.Value() 20162 if err != nil { 20163 return err 20164 } 20165 if val == nil { 20166 break 20167 } 20168 { 20169 xtv := string(val) 20170 sv.Id = ptr.String(xtv) 20171 } 20172 20173 default: 20174 // Do nothing and ignore the unexpected tag element 20175 err = decoder.Decoder.Skip() 20176 if err != nil { 20177 return err 20178 } 20179 20180 } 20181 decoder = originalDecoder 20182 } 20183 *v = sv 20184 return nil 20185 } 20186 20187 func awsRestxml_deserializeDocumentQueryLoggingConfigAlreadyExists(v **types.QueryLoggingConfigAlreadyExists, decoder smithyxml.NodeDecoder) error { 20188 if v == nil { 20189 return fmt.Errorf("unexpected nil of type %T", v) 20190 } 20191 var sv *types.QueryLoggingConfigAlreadyExists 20192 if *v == nil { 20193 sv = &types.QueryLoggingConfigAlreadyExists{} 20194 } else { 20195 sv = *v 20196 } 20197 20198 for { 20199 t, done, err := decoder.Token() 20200 if err != nil { 20201 return err 20202 } 20203 if done { 20204 break 20205 } 20206 originalDecoder := decoder 20207 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 20208 switch { 20209 case strings.EqualFold("message", t.Name.Local): 20210 val, err := decoder.Value() 20211 if err != nil { 20212 return err 20213 } 20214 if val == nil { 20215 break 20216 } 20217 { 20218 xtv := string(val) 20219 sv.Message = ptr.String(xtv) 20220 } 20221 20222 default: 20223 // Do nothing and ignore the unexpected tag element 20224 err = decoder.Decoder.Skip() 20225 if err != nil { 20226 return err 20227 } 20228 20229 } 20230 decoder = originalDecoder 20231 } 20232 *v = sv 20233 return nil 20234 } 20235 20236 func awsRestxml_deserializeDocumentQueryLoggingConfigs(v *[]types.QueryLoggingConfig, decoder smithyxml.NodeDecoder) error { 20237 if v == nil { 20238 return fmt.Errorf("unexpected nil of type %T", v) 20239 } 20240 var sv []types.QueryLoggingConfig 20241 if *v == nil { 20242 sv = make([]types.QueryLoggingConfig, 0) 20243 } else { 20244 sv = *v 20245 } 20246 20247 originalDecoder := decoder 20248 for { 20249 t, done, err := decoder.Token() 20250 if err != nil { 20251 return err 20252 } 20253 if done { 20254 break 20255 } 20256 switch { 20257 case strings.EqualFold("QueryLoggingConfig", t.Name.Local): 20258 var col types.QueryLoggingConfig 20259 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20260 destAddr := &col 20261 if err := awsRestxml_deserializeDocumentQueryLoggingConfig(&destAddr, nodeDecoder); err != nil { 20262 return err 20263 } 20264 col = *destAddr 20265 sv = append(sv, col) 20266 20267 default: 20268 err = decoder.Decoder.Skip() 20269 if err != nil { 20270 return err 20271 } 20272 20273 } 20274 decoder = originalDecoder 20275 } 20276 *v = sv 20277 return nil 20278 } 20279 20280 func awsRestxml_deserializeDocumentQueryLoggingConfigsUnwrapped(v *[]types.QueryLoggingConfig, decoder smithyxml.NodeDecoder) error { 20281 var sv []types.QueryLoggingConfig 20282 if *v == nil { 20283 sv = make([]types.QueryLoggingConfig, 0) 20284 } else { 20285 sv = *v 20286 } 20287 20288 switch { 20289 default: 20290 var mv types.QueryLoggingConfig 20291 t := decoder.StartEl 20292 _ = t 20293 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20294 destAddr := &mv 20295 if err := awsRestxml_deserializeDocumentQueryLoggingConfig(&destAddr, nodeDecoder); err != nil { 20296 return err 20297 } 20298 mv = *destAddr 20299 sv = append(sv, mv) 20300 } 20301 *v = sv 20302 return nil 20303 } 20304 func awsRestxml_deserializeDocumentRecordData(v *[]string, decoder smithyxml.NodeDecoder) error { 20305 if v == nil { 20306 return fmt.Errorf("unexpected nil of type %T", v) 20307 } 20308 var sv []string 20309 if *v == nil { 20310 sv = make([]string, 0) 20311 } else { 20312 sv = *v 20313 } 20314 20315 originalDecoder := decoder 20316 for { 20317 t, done, err := decoder.Token() 20318 if err != nil { 20319 return err 20320 } 20321 if done { 20322 break 20323 } 20324 memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20325 decoder = memberDecoder 20326 switch { 20327 case strings.EqualFold("RecordDataEntry", t.Name.Local): 20328 var col string 20329 val, err := decoder.Value() 20330 if err != nil { 20331 return err 20332 } 20333 if val == nil { 20334 break 20335 } 20336 { 20337 xtv := string(val) 20338 col = xtv 20339 } 20340 sv = append(sv, col) 20341 20342 default: 20343 err = decoder.Decoder.Skip() 20344 if err != nil { 20345 return err 20346 } 20347 20348 } 20349 decoder = originalDecoder 20350 } 20351 *v = sv 20352 return nil 20353 } 20354 20355 func awsRestxml_deserializeDocumentRecordDataUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { 20356 var sv []string 20357 if *v == nil { 20358 sv = make([]string, 0) 20359 } else { 20360 sv = *v 20361 } 20362 20363 switch { 20364 default: 20365 var mv string 20366 t := decoder.StartEl 20367 _ = t 20368 val, err := decoder.Value() 20369 if err != nil { 20370 return err 20371 } 20372 if val == nil { 20373 break 20374 } 20375 { 20376 xtv := string(val) 20377 mv = xtv 20378 } 20379 sv = append(sv, mv) 20380 } 20381 *v = sv 20382 return nil 20383 } 20384 func awsRestxml_deserializeDocumentResourceRecord(v **types.ResourceRecord, decoder smithyxml.NodeDecoder) error { 20385 if v == nil { 20386 return fmt.Errorf("unexpected nil of type %T", v) 20387 } 20388 var sv *types.ResourceRecord 20389 if *v == nil { 20390 sv = &types.ResourceRecord{} 20391 } else { 20392 sv = *v 20393 } 20394 20395 for { 20396 t, done, err := decoder.Token() 20397 if err != nil { 20398 return err 20399 } 20400 if done { 20401 break 20402 } 20403 originalDecoder := decoder 20404 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 20405 switch { 20406 case strings.EqualFold("Value", t.Name.Local): 20407 val, err := decoder.Value() 20408 if err != nil { 20409 return err 20410 } 20411 if val == nil { 20412 break 20413 } 20414 { 20415 xtv := string(val) 20416 sv.Value = ptr.String(xtv) 20417 } 20418 20419 default: 20420 // Do nothing and ignore the unexpected tag element 20421 err = decoder.Decoder.Skip() 20422 if err != nil { 20423 return err 20424 } 20425 20426 } 20427 decoder = originalDecoder 20428 } 20429 *v = sv 20430 return nil 20431 } 20432 20433 func awsRestxml_deserializeDocumentResourceRecords(v *[]types.ResourceRecord, decoder smithyxml.NodeDecoder) error { 20434 if v == nil { 20435 return fmt.Errorf("unexpected nil of type %T", v) 20436 } 20437 var sv []types.ResourceRecord 20438 if *v == nil { 20439 sv = make([]types.ResourceRecord, 0) 20440 } else { 20441 sv = *v 20442 } 20443 20444 originalDecoder := decoder 20445 for { 20446 t, done, err := decoder.Token() 20447 if err != nil { 20448 return err 20449 } 20450 if done { 20451 break 20452 } 20453 switch { 20454 case strings.EqualFold("ResourceRecord", t.Name.Local): 20455 var col types.ResourceRecord 20456 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20457 destAddr := &col 20458 if err := awsRestxml_deserializeDocumentResourceRecord(&destAddr, nodeDecoder); err != nil { 20459 return err 20460 } 20461 col = *destAddr 20462 sv = append(sv, col) 20463 20464 default: 20465 err = decoder.Decoder.Skip() 20466 if err != nil { 20467 return err 20468 } 20469 20470 } 20471 decoder = originalDecoder 20472 } 20473 *v = sv 20474 return nil 20475 } 20476 20477 func awsRestxml_deserializeDocumentResourceRecordsUnwrapped(v *[]types.ResourceRecord, decoder smithyxml.NodeDecoder) error { 20478 var sv []types.ResourceRecord 20479 if *v == nil { 20480 sv = make([]types.ResourceRecord, 0) 20481 } else { 20482 sv = *v 20483 } 20484 20485 switch { 20486 default: 20487 var mv types.ResourceRecord 20488 t := decoder.StartEl 20489 _ = t 20490 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20491 destAddr := &mv 20492 if err := awsRestxml_deserializeDocumentResourceRecord(&destAddr, nodeDecoder); err != nil { 20493 return err 20494 } 20495 mv = *destAddr 20496 sv = append(sv, mv) 20497 } 20498 *v = sv 20499 return nil 20500 } 20501 func awsRestxml_deserializeDocumentResourceRecordSet(v **types.ResourceRecordSet, decoder smithyxml.NodeDecoder) error { 20502 if v == nil { 20503 return fmt.Errorf("unexpected nil of type %T", v) 20504 } 20505 var sv *types.ResourceRecordSet 20506 if *v == nil { 20507 sv = &types.ResourceRecordSet{} 20508 } else { 20509 sv = *v 20510 } 20511 20512 for { 20513 t, done, err := decoder.Token() 20514 if err != nil { 20515 return err 20516 } 20517 if done { 20518 break 20519 } 20520 originalDecoder := decoder 20521 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 20522 switch { 20523 case strings.EqualFold("AliasTarget", t.Name.Local): 20524 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20525 if err := awsRestxml_deserializeDocumentAliasTarget(&sv.AliasTarget, nodeDecoder); err != nil { 20526 return err 20527 } 20528 20529 case strings.EqualFold("CidrRoutingConfig", t.Name.Local): 20530 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20531 if err := awsRestxml_deserializeDocumentCidrRoutingConfig(&sv.CidrRoutingConfig, nodeDecoder); err != nil { 20532 return err 20533 } 20534 20535 case strings.EqualFold("Failover", t.Name.Local): 20536 val, err := decoder.Value() 20537 if err != nil { 20538 return err 20539 } 20540 if val == nil { 20541 break 20542 } 20543 { 20544 xtv := string(val) 20545 sv.Failover = types.ResourceRecordSetFailover(xtv) 20546 } 20547 20548 case strings.EqualFold("GeoLocation", t.Name.Local): 20549 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20550 if err := awsRestxml_deserializeDocumentGeoLocation(&sv.GeoLocation, nodeDecoder); err != nil { 20551 return err 20552 } 20553 20554 case strings.EqualFold("GeoProximityLocation", t.Name.Local): 20555 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20556 if err := awsRestxml_deserializeDocumentGeoProximityLocation(&sv.GeoProximityLocation, nodeDecoder); err != nil { 20557 return err 20558 } 20559 20560 case strings.EqualFold("HealthCheckId", t.Name.Local): 20561 val, err := decoder.Value() 20562 if err != nil { 20563 return err 20564 } 20565 if val == nil { 20566 break 20567 } 20568 { 20569 xtv := string(val) 20570 sv.HealthCheckId = ptr.String(xtv) 20571 } 20572 20573 case strings.EqualFold("MultiValueAnswer", t.Name.Local): 20574 val, err := decoder.Value() 20575 if err != nil { 20576 return err 20577 } 20578 if val == nil { 20579 break 20580 } 20581 { 20582 xtv, err := strconv.ParseBool(string(val)) 20583 if err != nil { 20584 return fmt.Errorf("expected ResourceRecordSetMultiValueAnswer to be of type *bool, got %T instead", val) 20585 } 20586 sv.MultiValueAnswer = ptr.Bool(xtv) 20587 } 20588 20589 case strings.EqualFold("Name", t.Name.Local): 20590 val, err := decoder.Value() 20591 if err != nil { 20592 return err 20593 } 20594 if val == nil { 20595 break 20596 } 20597 { 20598 xtv := string(val) 20599 sv.Name = ptr.String(xtv) 20600 } 20601 20602 case strings.EqualFold("Region", t.Name.Local): 20603 val, err := decoder.Value() 20604 if err != nil { 20605 return err 20606 } 20607 if val == nil { 20608 break 20609 } 20610 { 20611 xtv := string(val) 20612 sv.Region = types.ResourceRecordSetRegion(xtv) 20613 } 20614 20615 case strings.EqualFold("ResourceRecords", t.Name.Local): 20616 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20617 if err := awsRestxml_deserializeDocumentResourceRecords(&sv.ResourceRecords, nodeDecoder); err != nil { 20618 return err 20619 } 20620 20621 case strings.EqualFold("SetIdentifier", t.Name.Local): 20622 val, err := decoder.Value() 20623 if err != nil { 20624 return err 20625 } 20626 if val == nil { 20627 break 20628 } 20629 { 20630 xtv := string(val) 20631 sv.SetIdentifier = ptr.String(xtv) 20632 } 20633 20634 case strings.EqualFold("TrafficPolicyInstanceId", t.Name.Local): 20635 val, err := decoder.Value() 20636 if err != nil { 20637 return err 20638 } 20639 if val == nil { 20640 break 20641 } 20642 { 20643 xtv := string(val) 20644 sv.TrafficPolicyInstanceId = ptr.String(xtv) 20645 } 20646 20647 case strings.EqualFold("TTL", t.Name.Local): 20648 val, err := decoder.Value() 20649 if err != nil { 20650 return err 20651 } 20652 if val == nil { 20653 break 20654 } 20655 { 20656 xtv := string(val) 20657 i64, err := strconv.ParseInt(xtv, 10, 64) 20658 if err != nil { 20659 return err 20660 } 20661 sv.TTL = ptr.Int64(i64) 20662 } 20663 20664 case strings.EqualFold("Type", t.Name.Local): 20665 val, err := decoder.Value() 20666 if err != nil { 20667 return err 20668 } 20669 if val == nil { 20670 break 20671 } 20672 { 20673 xtv := string(val) 20674 sv.Type = types.RRType(xtv) 20675 } 20676 20677 case strings.EqualFold("Weight", t.Name.Local): 20678 val, err := decoder.Value() 20679 if err != nil { 20680 return err 20681 } 20682 if val == nil { 20683 break 20684 } 20685 { 20686 xtv := string(val) 20687 i64, err := strconv.ParseInt(xtv, 10, 64) 20688 if err != nil { 20689 return err 20690 } 20691 sv.Weight = ptr.Int64(i64) 20692 } 20693 20694 default: 20695 // Do nothing and ignore the unexpected tag element 20696 err = decoder.Decoder.Skip() 20697 if err != nil { 20698 return err 20699 } 20700 20701 } 20702 decoder = originalDecoder 20703 } 20704 *v = sv 20705 return nil 20706 } 20707 20708 func awsRestxml_deserializeDocumentResourceRecordSets(v *[]types.ResourceRecordSet, decoder smithyxml.NodeDecoder) error { 20709 if v == nil { 20710 return fmt.Errorf("unexpected nil of type %T", v) 20711 } 20712 var sv []types.ResourceRecordSet 20713 if *v == nil { 20714 sv = make([]types.ResourceRecordSet, 0) 20715 } else { 20716 sv = *v 20717 } 20718 20719 originalDecoder := decoder 20720 for { 20721 t, done, err := decoder.Token() 20722 if err != nil { 20723 return err 20724 } 20725 if done { 20726 break 20727 } 20728 switch { 20729 case strings.EqualFold("ResourceRecordSet", t.Name.Local): 20730 var col types.ResourceRecordSet 20731 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20732 destAddr := &col 20733 if err := awsRestxml_deserializeDocumentResourceRecordSet(&destAddr, nodeDecoder); err != nil { 20734 return err 20735 } 20736 col = *destAddr 20737 sv = append(sv, col) 20738 20739 default: 20740 err = decoder.Decoder.Skip() 20741 if err != nil { 20742 return err 20743 } 20744 20745 } 20746 decoder = originalDecoder 20747 } 20748 *v = sv 20749 return nil 20750 } 20751 20752 func awsRestxml_deserializeDocumentResourceRecordSetsUnwrapped(v *[]types.ResourceRecordSet, decoder smithyxml.NodeDecoder) error { 20753 var sv []types.ResourceRecordSet 20754 if *v == nil { 20755 sv = make([]types.ResourceRecordSet, 0) 20756 } else { 20757 sv = *v 20758 } 20759 20760 switch { 20761 default: 20762 var mv types.ResourceRecordSet 20763 t := decoder.StartEl 20764 _ = t 20765 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20766 destAddr := &mv 20767 if err := awsRestxml_deserializeDocumentResourceRecordSet(&destAddr, nodeDecoder); err != nil { 20768 return err 20769 } 20770 mv = *destAddr 20771 sv = append(sv, mv) 20772 } 20773 *v = sv 20774 return nil 20775 } 20776 func awsRestxml_deserializeDocumentResourceTagSet(v **types.ResourceTagSet, decoder smithyxml.NodeDecoder) error { 20777 if v == nil { 20778 return fmt.Errorf("unexpected nil of type %T", v) 20779 } 20780 var sv *types.ResourceTagSet 20781 if *v == nil { 20782 sv = &types.ResourceTagSet{} 20783 } else { 20784 sv = *v 20785 } 20786 20787 for { 20788 t, done, err := decoder.Token() 20789 if err != nil { 20790 return err 20791 } 20792 if done { 20793 break 20794 } 20795 originalDecoder := decoder 20796 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 20797 switch { 20798 case strings.EqualFold("ResourceId", t.Name.Local): 20799 val, err := decoder.Value() 20800 if err != nil { 20801 return err 20802 } 20803 if val == nil { 20804 break 20805 } 20806 { 20807 xtv := string(val) 20808 sv.ResourceId = ptr.String(xtv) 20809 } 20810 20811 case strings.EqualFold("ResourceType", t.Name.Local): 20812 val, err := decoder.Value() 20813 if err != nil { 20814 return err 20815 } 20816 if val == nil { 20817 break 20818 } 20819 { 20820 xtv := string(val) 20821 sv.ResourceType = types.TagResourceType(xtv) 20822 } 20823 20824 case strings.EqualFold("Tags", t.Name.Local): 20825 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20826 if err := awsRestxml_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { 20827 return err 20828 } 20829 20830 default: 20831 // Do nothing and ignore the unexpected tag element 20832 err = decoder.Decoder.Skip() 20833 if err != nil { 20834 return err 20835 } 20836 20837 } 20838 decoder = originalDecoder 20839 } 20840 *v = sv 20841 return nil 20842 } 20843 20844 func awsRestxml_deserializeDocumentResourceTagSetList(v *[]types.ResourceTagSet, decoder smithyxml.NodeDecoder) error { 20845 if v == nil { 20846 return fmt.Errorf("unexpected nil of type %T", v) 20847 } 20848 var sv []types.ResourceTagSet 20849 if *v == nil { 20850 sv = make([]types.ResourceTagSet, 0) 20851 } else { 20852 sv = *v 20853 } 20854 20855 originalDecoder := decoder 20856 for { 20857 t, done, err := decoder.Token() 20858 if err != nil { 20859 return err 20860 } 20861 if done { 20862 break 20863 } 20864 switch { 20865 case strings.EqualFold("ResourceTagSet", t.Name.Local): 20866 var col types.ResourceTagSet 20867 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20868 destAddr := &col 20869 if err := awsRestxml_deserializeDocumentResourceTagSet(&destAddr, nodeDecoder); err != nil { 20870 return err 20871 } 20872 col = *destAddr 20873 sv = append(sv, col) 20874 20875 default: 20876 err = decoder.Decoder.Skip() 20877 if err != nil { 20878 return err 20879 } 20880 20881 } 20882 decoder = originalDecoder 20883 } 20884 *v = sv 20885 return nil 20886 } 20887 20888 func awsRestxml_deserializeDocumentResourceTagSetListUnwrapped(v *[]types.ResourceTagSet, decoder smithyxml.NodeDecoder) error { 20889 var sv []types.ResourceTagSet 20890 if *v == nil { 20891 sv = make([]types.ResourceTagSet, 0) 20892 } else { 20893 sv = *v 20894 } 20895 20896 switch { 20897 default: 20898 var mv types.ResourceTagSet 20899 t := decoder.StartEl 20900 _ = t 20901 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 20902 destAddr := &mv 20903 if err := awsRestxml_deserializeDocumentResourceTagSet(&destAddr, nodeDecoder); err != nil { 20904 return err 20905 } 20906 mv = *destAddr 20907 sv = append(sv, mv) 20908 } 20909 *v = sv 20910 return nil 20911 } 20912 func awsRestxml_deserializeDocumentReusableDelegationSetLimit(v **types.ReusableDelegationSetLimit, decoder smithyxml.NodeDecoder) error { 20913 if v == nil { 20914 return fmt.Errorf("unexpected nil of type %T", v) 20915 } 20916 var sv *types.ReusableDelegationSetLimit 20917 if *v == nil { 20918 sv = &types.ReusableDelegationSetLimit{} 20919 } else { 20920 sv = *v 20921 } 20922 20923 for { 20924 t, done, err := decoder.Token() 20925 if err != nil { 20926 return err 20927 } 20928 if done { 20929 break 20930 } 20931 originalDecoder := decoder 20932 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 20933 switch { 20934 case strings.EqualFold("Type", t.Name.Local): 20935 val, err := decoder.Value() 20936 if err != nil { 20937 return err 20938 } 20939 if val == nil { 20940 break 20941 } 20942 { 20943 xtv := string(val) 20944 sv.Type = types.ReusableDelegationSetLimitType(xtv) 20945 } 20946 20947 case strings.EqualFold("Value", t.Name.Local): 20948 val, err := decoder.Value() 20949 if err != nil { 20950 return err 20951 } 20952 if val == nil { 20953 break 20954 } 20955 { 20956 xtv := string(val) 20957 i64, err := strconv.ParseInt(xtv, 10, 64) 20958 if err != nil { 20959 return err 20960 } 20961 sv.Value = ptr.Int64(i64) 20962 } 20963 20964 default: 20965 // Do nothing and ignore the unexpected tag element 20966 err = decoder.Decoder.Skip() 20967 if err != nil { 20968 return err 20969 } 20970 20971 } 20972 decoder = originalDecoder 20973 } 20974 *v = sv 20975 return nil 20976 } 20977 20978 func awsRestxml_deserializeDocumentStatusReport(v **types.StatusReport, decoder smithyxml.NodeDecoder) error { 20979 if v == nil { 20980 return fmt.Errorf("unexpected nil of type %T", v) 20981 } 20982 var sv *types.StatusReport 20983 if *v == nil { 20984 sv = &types.StatusReport{} 20985 } else { 20986 sv = *v 20987 } 20988 20989 for { 20990 t, done, err := decoder.Token() 20991 if err != nil { 20992 return err 20993 } 20994 if done { 20995 break 20996 } 20997 originalDecoder := decoder 20998 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 20999 switch { 21000 case strings.EqualFold("CheckedTime", t.Name.Local): 21001 val, err := decoder.Value() 21002 if err != nil { 21003 return err 21004 } 21005 if val == nil { 21006 break 21007 } 21008 { 21009 xtv := string(val) 21010 t, err := smithytime.ParseDateTime(xtv) 21011 if err != nil { 21012 return err 21013 } 21014 sv.CheckedTime = ptr.Time(t) 21015 } 21016 21017 case strings.EqualFold("Status", t.Name.Local): 21018 val, err := decoder.Value() 21019 if err != nil { 21020 return err 21021 } 21022 if val == nil { 21023 break 21024 } 21025 { 21026 xtv := string(val) 21027 sv.Status = ptr.String(xtv) 21028 } 21029 21030 default: 21031 // Do nothing and ignore the unexpected tag element 21032 err = decoder.Decoder.Skip() 21033 if err != nil { 21034 return err 21035 } 21036 21037 } 21038 decoder = originalDecoder 21039 } 21040 *v = sv 21041 return nil 21042 } 21043 21044 func awsRestxml_deserializeDocumentTag(v **types.Tag, decoder smithyxml.NodeDecoder) error { 21045 if v == nil { 21046 return fmt.Errorf("unexpected nil of type %T", v) 21047 } 21048 var sv *types.Tag 21049 if *v == nil { 21050 sv = &types.Tag{} 21051 } else { 21052 sv = *v 21053 } 21054 21055 for { 21056 t, done, err := decoder.Token() 21057 if err != nil { 21058 return err 21059 } 21060 if done { 21061 break 21062 } 21063 originalDecoder := decoder 21064 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21065 switch { 21066 case strings.EqualFold("Key", t.Name.Local): 21067 val, err := decoder.Value() 21068 if err != nil { 21069 return err 21070 } 21071 if val == nil { 21072 break 21073 } 21074 { 21075 xtv := string(val) 21076 sv.Key = ptr.String(xtv) 21077 } 21078 21079 case strings.EqualFold("Value", t.Name.Local): 21080 val, err := decoder.Value() 21081 if err != nil { 21082 return err 21083 } 21084 if val == nil { 21085 break 21086 } 21087 { 21088 xtv := string(val) 21089 sv.Value = ptr.String(xtv) 21090 } 21091 21092 default: 21093 // Do nothing and ignore the unexpected tag element 21094 err = decoder.Decoder.Skip() 21095 if err != nil { 21096 return err 21097 } 21098 21099 } 21100 decoder = originalDecoder 21101 } 21102 *v = sv 21103 return nil 21104 } 21105 21106 func awsRestxml_deserializeDocumentTagList(v *[]types.Tag, decoder smithyxml.NodeDecoder) error { 21107 if v == nil { 21108 return fmt.Errorf("unexpected nil of type %T", v) 21109 } 21110 var sv []types.Tag 21111 if *v == nil { 21112 sv = make([]types.Tag, 0) 21113 } else { 21114 sv = *v 21115 } 21116 21117 originalDecoder := decoder 21118 for { 21119 t, done, err := decoder.Token() 21120 if err != nil { 21121 return err 21122 } 21123 if done { 21124 break 21125 } 21126 switch { 21127 case strings.EqualFold("Tag", t.Name.Local): 21128 var col types.Tag 21129 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 21130 destAddr := &col 21131 if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { 21132 return err 21133 } 21134 col = *destAddr 21135 sv = append(sv, col) 21136 21137 default: 21138 err = decoder.Decoder.Skip() 21139 if err != nil { 21140 return err 21141 } 21142 21143 } 21144 decoder = originalDecoder 21145 } 21146 *v = sv 21147 return nil 21148 } 21149 21150 func awsRestxml_deserializeDocumentTagListUnwrapped(v *[]types.Tag, decoder smithyxml.NodeDecoder) error { 21151 var sv []types.Tag 21152 if *v == nil { 21153 sv = make([]types.Tag, 0) 21154 } else { 21155 sv = *v 21156 } 21157 21158 switch { 21159 default: 21160 var mv types.Tag 21161 t := decoder.StartEl 21162 _ = t 21163 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 21164 destAddr := &mv 21165 if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { 21166 return err 21167 } 21168 mv = *destAddr 21169 sv = append(sv, mv) 21170 } 21171 *v = sv 21172 return nil 21173 } 21174 func awsRestxml_deserializeDocumentThrottlingException(v **types.ThrottlingException, decoder smithyxml.NodeDecoder) error { 21175 if v == nil { 21176 return fmt.Errorf("unexpected nil of type %T", v) 21177 } 21178 var sv *types.ThrottlingException 21179 if *v == nil { 21180 sv = &types.ThrottlingException{} 21181 } else { 21182 sv = *v 21183 } 21184 21185 for { 21186 t, done, err := decoder.Token() 21187 if err != nil { 21188 return err 21189 } 21190 if done { 21191 break 21192 } 21193 originalDecoder := decoder 21194 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21195 switch { 21196 case strings.EqualFold("message", t.Name.Local): 21197 val, err := decoder.Value() 21198 if err != nil { 21199 return err 21200 } 21201 if val == nil { 21202 break 21203 } 21204 { 21205 xtv := string(val) 21206 sv.Message = ptr.String(xtv) 21207 } 21208 21209 default: 21210 // Do nothing and ignore the unexpected tag element 21211 err = decoder.Decoder.Skip() 21212 if err != nil { 21213 return err 21214 } 21215 21216 } 21217 decoder = originalDecoder 21218 } 21219 *v = sv 21220 return nil 21221 } 21222 21223 func awsRestxml_deserializeDocumentTooManyHealthChecks(v **types.TooManyHealthChecks, decoder smithyxml.NodeDecoder) error { 21224 if v == nil { 21225 return fmt.Errorf("unexpected nil of type %T", v) 21226 } 21227 var sv *types.TooManyHealthChecks 21228 if *v == nil { 21229 sv = &types.TooManyHealthChecks{} 21230 } else { 21231 sv = *v 21232 } 21233 21234 for { 21235 t, done, err := decoder.Token() 21236 if err != nil { 21237 return err 21238 } 21239 if done { 21240 break 21241 } 21242 originalDecoder := decoder 21243 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21244 switch { 21245 case strings.EqualFold("message", t.Name.Local): 21246 val, err := decoder.Value() 21247 if err != nil { 21248 return err 21249 } 21250 if val == nil { 21251 break 21252 } 21253 { 21254 xtv := string(val) 21255 sv.Message = ptr.String(xtv) 21256 } 21257 21258 default: 21259 // Do nothing and ignore the unexpected tag element 21260 err = decoder.Decoder.Skip() 21261 if err != nil { 21262 return err 21263 } 21264 21265 } 21266 decoder = originalDecoder 21267 } 21268 *v = sv 21269 return nil 21270 } 21271 21272 func awsRestxml_deserializeDocumentTooManyHostedZones(v **types.TooManyHostedZones, decoder smithyxml.NodeDecoder) error { 21273 if v == nil { 21274 return fmt.Errorf("unexpected nil of type %T", v) 21275 } 21276 var sv *types.TooManyHostedZones 21277 if *v == nil { 21278 sv = &types.TooManyHostedZones{} 21279 } else { 21280 sv = *v 21281 } 21282 21283 for { 21284 t, done, err := decoder.Token() 21285 if err != nil { 21286 return err 21287 } 21288 if done { 21289 break 21290 } 21291 originalDecoder := decoder 21292 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21293 switch { 21294 case strings.EqualFold("message", t.Name.Local): 21295 val, err := decoder.Value() 21296 if err != nil { 21297 return err 21298 } 21299 if val == nil { 21300 break 21301 } 21302 { 21303 xtv := string(val) 21304 sv.Message = ptr.String(xtv) 21305 } 21306 21307 default: 21308 // Do nothing and ignore the unexpected tag element 21309 err = decoder.Decoder.Skip() 21310 if err != nil { 21311 return err 21312 } 21313 21314 } 21315 decoder = originalDecoder 21316 } 21317 *v = sv 21318 return nil 21319 } 21320 21321 func awsRestxml_deserializeDocumentTooManyKeySigningKeys(v **types.TooManyKeySigningKeys, decoder smithyxml.NodeDecoder) error { 21322 if v == nil { 21323 return fmt.Errorf("unexpected nil of type %T", v) 21324 } 21325 var sv *types.TooManyKeySigningKeys 21326 if *v == nil { 21327 sv = &types.TooManyKeySigningKeys{} 21328 } else { 21329 sv = *v 21330 } 21331 21332 for { 21333 t, done, err := decoder.Token() 21334 if err != nil { 21335 return err 21336 } 21337 if done { 21338 break 21339 } 21340 originalDecoder := decoder 21341 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21342 switch { 21343 case strings.EqualFold("message", t.Name.Local): 21344 val, err := decoder.Value() 21345 if err != nil { 21346 return err 21347 } 21348 if val == nil { 21349 break 21350 } 21351 { 21352 xtv := string(val) 21353 sv.Message = ptr.String(xtv) 21354 } 21355 21356 default: 21357 // Do nothing and ignore the unexpected tag element 21358 err = decoder.Decoder.Skip() 21359 if err != nil { 21360 return err 21361 } 21362 21363 } 21364 decoder = originalDecoder 21365 } 21366 *v = sv 21367 return nil 21368 } 21369 21370 func awsRestxml_deserializeDocumentTooManyTrafficPolicies(v **types.TooManyTrafficPolicies, decoder smithyxml.NodeDecoder) error { 21371 if v == nil { 21372 return fmt.Errorf("unexpected nil of type %T", v) 21373 } 21374 var sv *types.TooManyTrafficPolicies 21375 if *v == nil { 21376 sv = &types.TooManyTrafficPolicies{} 21377 } else { 21378 sv = *v 21379 } 21380 21381 for { 21382 t, done, err := decoder.Token() 21383 if err != nil { 21384 return err 21385 } 21386 if done { 21387 break 21388 } 21389 originalDecoder := decoder 21390 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21391 switch { 21392 case strings.EqualFold("message", t.Name.Local): 21393 val, err := decoder.Value() 21394 if err != nil { 21395 return err 21396 } 21397 if val == nil { 21398 break 21399 } 21400 { 21401 xtv := string(val) 21402 sv.Message = ptr.String(xtv) 21403 } 21404 21405 default: 21406 // Do nothing and ignore the unexpected tag element 21407 err = decoder.Decoder.Skip() 21408 if err != nil { 21409 return err 21410 } 21411 21412 } 21413 decoder = originalDecoder 21414 } 21415 *v = sv 21416 return nil 21417 } 21418 21419 func awsRestxml_deserializeDocumentTooManyTrafficPolicyInstances(v **types.TooManyTrafficPolicyInstances, decoder smithyxml.NodeDecoder) error { 21420 if v == nil { 21421 return fmt.Errorf("unexpected nil of type %T", v) 21422 } 21423 var sv *types.TooManyTrafficPolicyInstances 21424 if *v == nil { 21425 sv = &types.TooManyTrafficPolicyInstances{} 21426 } else { 21427 sv = *v 21428 } 21429 21430 for { 21431 t, done, err := decoder.Token() 21432 if err != nil { 21433 return err 21434 } 21435 if done { 21436 break 21437 } 21438 originalDecoder := decoder 21439 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21440 switch { 21441 case strings.EqualFold("message", t.Name.Local): 21442 val, err := decoder.Value() 21443 if err != nil { 21444 return err 21445 } 21446 if val == nil { 21447 break 21448 } 21449 { 21450 xtv := string(val) 21451 sv.Message = ptr.String(xtv) 21452 } 21453 21454 default: 21455 // Do nothing and ignore the unexpected tag element 21456 err = decoder.Decoder.Skip() 21457 if err != nil { 21458 return err 21459 } 21460 21461 } 21462 decoder = originalDecoder 21463 } 21464 *v = sv 21465 return nil 21466 } 21467 21468 func awsRestxml_deserializeDocumentTooManyTrafficPolicyVersionsForCurrentPolicy(v **types.TooManyTrafficPolicyVersionsForCurrentPolicy, decoder smithyxml.NodeDecoder) error { 21469 if v == nil { 21470 return fmt.Errorf("unexpected nil of type %T", v) 21471 } 21472 var sv *types.TooManyTrafficPolicyVersionsForCurrentPolicy 21473 if *v == nil { 21474 sv = &types.TooManyTrafficPolicyVersionsForCurrentPolicy{} 21475 } else { 21476 sv = *v 21477 } 21478 21479 for { 21480 t, done, err := decoder.Token() 21481 if err != nil { 21482 return err 21483 } 21484 if done { 21485 break 21486 } 21487 originalDecoder := decoder 21488 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21489 switch { 21490 case strings.EqualFold("message", t.Name.Local): 21491 val, err := decoder.Value() 21492 if err != nil { 21493 return err 21494 } 21495 if val == nil { 21496 break 21497 } 21498 { 21499 xtv := string(val) 21500 sv.Message = ptr.String(xtv) 21501 } 21502 21503 default: 21504 // Do nothing and ignore the unexpected tag element 21505 err = decoder.Decoder.Skip() 21506 if err != nil { 21507 return err 21508 } 21509 21510 } 21511 decoder = originalDecoder 21512 } 21513 *v = sv 21514 return nil 21515 } 21516 21517 func awsRestxml_deserializeDocumentTooManyVPCAssociationAuthorizations(v **types.TooManyVPCAssociationAuthorizations, decoder smithyxml.NodeDecoder) error { 21518 if v == nil { 21519 return fmt.Errorf("unexpected nil of type %T", v) 21520 } 21521 var sv *types.TooManyVPCAssociationAuthorizations 21522 if *v == nil { 21523 sv = &types.TooManyVPCAssociationAuthorizations{} 21524 } else { 21525 sv = *v 21526 } 21527 21528 for { 21529 t, done, err := decoder.Token() 21530 if err != nil { 21531 return err 21532 } 21533 if done { 21534 break 21535 } 21536 originalDecoder := decoder 21537 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21538 switch { 21539 case strings.EqualFold("message", t.Name.Local): 21540 val, err := decoder.Value() 21541 if err != nil { 21542 return err 21543 } 21544 if val == nil { 21545 break 21546 } 21547 { 21548 xtv := string(val) 21549 sv.Message = ptr.String(xtv) 21550 } 21551 21552 default: 21553 // Do nothing and ignore the unexpected tag element 21554 err = decoder.Decoder.Skip() 21555 if err != nil { 21556 return err 21557 } 21558 21559 } 21560 decoder = originalDecoder 21561 } 21562 *v = sv 21563 return nil 21564 } 21565 21566 func awsRestxml_deserializeDocumentTrafficPolicies(v *[]types.TrafficPolicy, decoder smithyxml.NodeDecoder) error { 21567 if v == nil { 21568 return fmt.Errorf("unexpected nil of type %T", v) 21569 } 21570 var sv []types.TrafficPolicy 21571 if *v == nil { 21572 sv = make([]types.TrafficPolicy, 0) 21573 } else { 21574 sv = *v 21575 } 21576 21577 originalDecoder := decoder 21578 for { 21579 t, done, err := decoder.Token() 21580 if err != nil { 21581 return err 21582 } 21583 if done { 21584 break 21585 } 21586 switch { 21587 case strings.EqualFold("TrafficPolicy", t.Name.Local): 21588 var col types.TrafficPolicy 21589 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 21590 destAddr := &col 21591 if err := awsRestxml_deserializeDocumentTrafficPolicy(&destAddr, nodeDecoder); err != nil { 21592 return err 21593 } 21594 col = *destAddr 21595 sv = append(sv, col) 21596 21597 default: 21598 err = decoder.Decoder.Skip() 21599 if err != nil { 21600 return err 21601 } 21602 21603 } 21604 decoder = originalDecoder 21605 } 21606 *v = sv 21607 return nil 21608 } 21609 21610 func awsRestxml_deserializeDocumentTrafficPoliciesUnwrapped(v *[]types.TrafficPolicy, decoder smithyxml.NodeDecoder) error { 21611 var sv []types.TrafficPolicy 21612 if *v == nil { 21613 sv = make([]types.TrafficPolicy, 0) 21614 } else { 21615 sv = *v 21616 } 21617 21618 switch { 21619 default: 21620 var mv types.TrafficPolicy 21621 t := decoder.StartEl 21622 _ = t 21623 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 21624 destAddr := &mv 21625 if err := awsRestxml_deserializeDocumentTrafficPolicy(&destAddr, nodeDecoder); err != nil { 21626 return err 21627 } 21628 mv = *destAddr 21629 sv = append(sv, mv) 21630 } 21631 *v = sv 21632 return nil 21633 } 21634 func awsRestxml_deserializeDocumentTrafficPolicy(v **types.TrafficPolicy, decoder smithyxml.NodeDecoder) error { 21635 if v == nil { 21636 return fmt.Errorf("unexpected nil of type %T", v) 21637 } 21638 var sv *types.TrafficPolicy 21639 if *v == nil { 21640 sv = &types.TrafficPolicy{} 21641 } else { 21642 sv = *v 21643 } 21644 21645 for { 21646 t, done, err := decoder.Token() 21647 if err != nil { 21648 return err 21649 } 21650 if done { 21651 break 21652 } 21653 originalDecoder := decoder 21654 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21655 switch { 21656 case strings.EqualFold("Comment", t.Name.Local): 21657 val, err := decoder.Value() 21658 if err != nil { 21659 return err 21660 } 21661 if val == nil { 21662 break 21663 } 21664 { 21665 xtv := string(val) 21666 sv.Comment = ptr.String(xtv) 21667 } 21668 21669 case strings.EqualFold("Document", t.Name.Local): 21670 val, err := decoder.Value() 21671 if err != nil { 21672 return err 21673 } 21674 if val == nil { 21675 break 21676 } 21677 { 21678 xtv := string(val) 21679 sv.Document = ptr.String(xtv) 21680 } 21681 21682 case strings.EqualFold("Id", t.Name.Local): 21683 val, err := decoder.Value() 21684 if err != nil { 21685 return err 21686 } 21687 if val == nil { 21688 break 21689 } 21690 { 21691 xtv := string(val) 21692 sv.Id = ptr.String(xtv) 21693 } 21694 21695 case strings.EqualFold("Name", t.Name.Local): 21696 val, err := decoder.Value() 21697 if err != nil { 21698 return err 21699 } 21700 if val == nil { 21701 break 21702 } 21703 { 21704 xtv := string(val) 21705 sv.Name = ptr.String(xtv) 21706 } 21707 21708 case strings.EqualFold("Type", t.Name.Local): 21709 val, err := decoder.Value() 21710 if err != nil { 21711 return err 21712 } 21713 if val == nil { 21714 break 21715 } 21716 { 21717 xtv := string(val) 21718 sv.Type = types.RRType(xtv) 21719 } 21720 21721 case strings.EqualFold("Version", t.Name.Local): 21722 val, err := decoder.Value() 21723 if err != nil { 21724 return err 21725 } 21726 if val == nil { 21727 break 21728 } 21729 { 21730 xtv := string(val) 21731 i64, err := strconv.ParseInt(xtv, 10, 64) 21732 if err != nil { 21733 return err 21734 } 21735 sv.Version = ptr.Int32(int32(i64)) 21736 } 21737 21738 default: 21739 // Do nothing and ignore the unexpected tag element 21740 err = decoder.Decoder.Skip() 21741 if err != nil { 21742 return err 21743 } 21744 21745 } 21746 decoder = originalDecoder 21747 } 21748 *v = sv 21749 return nil 21750 } 21751 21752 func awsRestxml_deserializeDocumentTrafficPolicyAlreadyExists(v **types.TrafficPolicyAlreadyExists, decoder smithyxml.NodeDecoder) error { 21753 if v == nil { 21754 return fmt.Errorf("unexpected nil of type %T", v) 21755 } 21756 var sv *types.TrafficPolicyAlreadyExists 21757 if *v == nil { 21758 sv = &types.TrafficPolicyAlreadyExists{} 21759 } else { 21760 sv = *v 21761 } 21762 21763 for { 21764 t, done, err := decoder.Token() 21765 if err != nil { 21766 return err 21767 } 21768 if done { 21769 break 21770 } 21771 originalDecoder := decoder 21772 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21773 switch { 21774 case strings.EqualFold("message", t.Name.Local): 21775 val, err := decoder.Value() 21776 if err != nil { 21777 return err 21778 } 21779 if val == nil { 21780 break 21781 } 21782 { 21783 xtv := string(val) 21784 sv.Message = ptr.String(xtv) 21785 } 21786 21787 default: 21788 // Do nothing and ignore the unexpected tag element 21789 err = decoder.Decoder.Skip() 21790 if err != nil { 21791 return err 21792 } 21793 21794 } 21795 decoder = originalDecoder 21796 } 21797 *v = sv 21798 return nil 21799 } 21800 21801 func awsRestxml_deserializeDocumentTrafficPolicyInstance(v **types.TrafficPolicyInstance, decoder smithyxml.NodeDecoder) error { 21802 if v == nil { 21803 return fmt.Errorf("unexpected nil of type %T", v) 21804 } 21805 var sv *types.TrafficPolicyInstance 21806 if *v == nil { 21807 sv = &types.TrafficPolicyInstance{} 21808 } else { 21809 sv = *v 21810 } 21811 21812 for { 21813 t, done, err := decoder.Token() 21814 if err != nil { 21815 return err 21816 } 21817 if done { 21818 break 21819 } 21820 originalDecoder := decoder 21821 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21822 switch { 21823 case strings.EqualFold("HostedZoneId", t.Name.Local): 21824 val, err := decoder.Value() 21825 if err != nil { 21826 return err 21827 } 21828 if val == nil { 21829 break 21830 } 21831 { 21832 xtv := string(val) 21833 sv.HostedZoneId = ptr.String(xtv) 21834 } 21835 21836 case strings.EqualFold("Id", t.Name.Local): 21837 val, err := decoder.Value() 21838 if err != nil { 21839 return err 21840 } 21841 if val == nil { 21842 break 21843 } 21844 { 21845 xtv := string(val) 21846 sv.Id = ptr.String(xtv) 21847 } 21848 21849 case strings.EqualFold("Message", t.Name.Local): 21850 val, err := decoder.Value() 21851 if err != nil { 21852 return err 21853 } 21854 if val == nil { 21855 break 21856 } 21857 { 21858 xtv := string(val) 21859 sv.Message = ptr.String(xtv) 21860 } 21861 21862 case strings.EqualFold("Name", t.Name.Local): 21863 val, err := decoder.Value() 21864 if err != nil { 21865 return err 21866 } 21867 if val == nil { 21868 break 21869 } 21870 { 21871 xtv := string(val) 21872 sv.Name = ptr.String(xtv) 21873 } 21874 21875 case strings.EqualFold("State", t.Name.Local): 21876 val, err := decoder.Value() 21877 if err != nil { 21878 return err 21879 } 21880 if val == nil { 21881 break 21882 } 21883 { 21884 xtv := string(val) 21885 sv.State = ptr.String(xtv) 21886 } 21887 21888 case strings.EqualFold("TrafficPolicyId", t.Name.Local): 21889 val, err := decoder.Value() 21890 if err != nil { 21891 return err 21892 } 21893 if val == nil { 21894 break 21895 } 21896 { 21897 xtv := string(val) 21898 sv.TrafficPolicyId = ptr.String(xtv) 21899 } 21900 21901 case strings.EqualFold("TrafficPolicyType", t.Name.Local): 21902 val, err := decoder.Value() 21903 if err != nil { 21904 return err 21905 } 21906 if val == nil { 21907 break 21908 } 21909 { 21910 xtv := string(val) 21911 sv.TrafficPolicyType = types.RRType(xtv) 21912 } 21913 21914 case strings.EqualFold("TrafficPolicyVersion", t.Name.Local): 21915 val, err := decoder.Value() 21916 if err != nil { 21917 return err 21918 } 21919 if val == nil { 21920 break 21921 } 21922 { 21923 xtv := string(val) 21924 i64, err := strconv.ParseInt(xtv, 10, 64) 21925 if err != nil { 21926 return err 21927 } 21928 sv.TrafficPolicyVersion = ptr.Int32(int32(i64)) 21929 } 21930 21931 case strings.EqualFold("TTL", t.Name.Local): 21932 val, err := decoder.Value() 21933 if err != nil { 21934 return err 21935 } 21936 if val == nil { 21937 break 21938 } 21939 { 21940 xtv := string(val) 21941 i64, err := strconv.ParseInt(xtv, 10, 64) 21942 if err != nil { 21943 return err 21944 } 21945 sv.TTL = ptr.Int64(i64) 21946 } 21947 21948 default: 21949 // Do nothing and ignore the unexpected tag element 21950 err = decoder.Decoder.Skip() 21951 if err != nil { 21952 return err 21953 } 21954 21955 } 21956 decoder = originalDecoder 21957 } 21958 *v = sv 21959 return nil 21960 } 21961 21962 func awsRestxml_deserializeDocumentTrafficPolicyInstanceAlreadyExists(v **types.TrafficPolicyInstanceAlreadyExists, decoder smithyxml.NodeDecoder) error { 21963 if v == nil { 21964 return fmt.Errorf("unexpected nil of type %T", v) 21965 } 21966 var sv *types.TrafficPolicyInstanceAlreadyExists 21967 if *v == nil { 21968 sv = &types.TrafficPolicyInstanceAlreadyExists{} 21969 } else { 21970 sv = *v 21971 } 21972 21973 for { 21974 t, done, err := decoder.Token() 21975 if err != nil { 21976 return err 21977 } 21978 if done { 21979 break 21980 } 21981 originalDecoder := decoder 21982 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 21983 switch { 21984 case strings.EqualFold("message", t.Name.Local): 21985 val, err := decoder.Value() 21986 if err != nil { 21987 return err 21988 } 21989 if val == nil { 21990 break 21991 } 21992 { 21993 xtv := string(val) 21994 sv.Message = ptr.String(xtv) 21995 } 21996 21997 default: 21998 // Do nothing and ignore the unexpected tag element 21999 err = decoder.Decoder.Skip() 22000 if err != nil { 22001 return err 22002 } 22003 22004 } 22005 decoder = originalDecoder 22006 } 22007 *v = sv 22008 return nil 22009 } 22010 22011 func awsRestxml_deserializeDocumentTrafficPolicyInstances(v *[]types.TrafficPolicyInstance, decoder smithyxml.NodeDecoder) error { 22012 if v == nil { 22013 return fmt.Errorf("unexpected nil of type %T", v) 22014 } 22015 var sv []types.TrafficPolicyInstance 22016 if *v == nil { 22017 sv = make([]types.TrafficPolicyInstance, 0) 22018 } else { 22019 sv = *v 22020 } 22021 22022 originalDecoder := decoder 22023 for { 22024 t, done, err := decoder.Token() 22025 if err != nil { 22026 return err 22027 } 22028 if done { 22029 break 22030 } 22031 switch { 22032 case strings.EqualFold("TrafficPolicyInstance", t.Name.Local): 22033 var col types.TrafficPolicyInstance 22034 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 22035 destAddr := &col 22036 if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&destAddr, nodeDecoder); err != nil { 22037 return err 22038 } 22039 col = *destAddr 22040 sv = append(sv, col) 22041 22042 default: 22043 err = decoder.Decoder.Skip() 22044 if err != nil { 22045 return err 22046 } 22047 22048 } 22049 decoder = originalDecoder 22050 } 22051 *v = sv 22052 return nil 22053 } 22054 22055 func awsRestxml_deserializeDocumentTrafficPolicyInstancesUnwrapped(v *[]types.TrafficPolicyInstance, decoder smithyxml.NodeDecoder) error { 22056 var sv []types.TrafficPolicyInstance 22057 if *v == nil { 22058 sv = make([]types.TrafficPolicyInstance, 0) 22059 } else { 22060 sv = *v 22061 } 22062 22063 switch { 22064 default: 22065 var mv types.TrafficPolicyInstance 22066 t := decoder.StartEl 22067 _ = t 22068 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 22069 destAddr := &mv 22070 if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&destAddr, nodeDecoder); err != nil { 22071 return err 22072 } 22073 mv = *destAddr 22074 sv = append(sv, mv) 22075 } 22076 *v = sv 22077 return nil 22078 } 22079 func awsRestxml_deserializeDocumentTrafficPolicyInUse(v **types.TrafficPolicyInUse, decoder smithyxml.NodeDecoder) error { 22080 if v == nil { 22081 return fmt.Errorf("unexpected nil of type %T", v) 22082 } 22083 var sv *types.TrafficPolicyInUse 22084 if *v == nil { 22085 sv = &types.TrafficPolicyInUse{} 22086 } else { 22087 sv = *v 22088 } 22089 22090 for { 22091 t, done, err := decoder.Token() 22092 if err != nil { 22093 return err 22094 } 22095 if done { 22096 break 22097 } 22098 originalDecoder := decoder 22099 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 22100 switch { 22101 case strings.EqualFold("message", t.Name.Local): 22102 val, err := decoder.Value() 22103 if err != nil { 22104 return err 22105 } 22106 if val == nil { 22107 break 22108 } 22109 { 22110 xtv := string(val) 22111 sv.Message = ptr.String(xtv) 22112 } 22113 22114 default: 22115 // Do nothing and ignore the unexpected tag element 22116 err = decoder.Decoder.Skip() 22117 if err != nil { 22118 return err 22119 } 22120 22121 } 22122 decoder = originalDecoder 22123 } 22124 *v = sv 22125 return nil 22126 } 22127 22128 func awsRestxml_deserializeDocumentTrafficPolicySummaries(v *[]types.TrafficPolicySummary, decoder smithyxml.NodeDecoder) error { 22129 if v == nil { 22130 return fmt.Errorf("unexpected nil of type %T", v) 22131 } 22132 var sv []types.TrafficPolicySummary 22133 if *v == nil { 22134 sv = make([]types.TrafficPolicySummary, 0) 22135 } else { 22136 sv = *v 22137 } 22138 22139 originalDecoder := decoder 22140 for { 22141 t, done, err := decoder.Token() 22142 if err != nil { 22143 return err 22144 } 22145 if done { 22146 break 22147 } 22148 switch { 22149 case strings.EqualFold("TrafficPolicySummary", t.Name.Local): 22150 var col types.TrafficPolicySummary 22151 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 22152 destAddr := &col 22153 if err := awsRestxml_deserializeDocumentTrafficPolicySummary(&destAddr, nodeDecoder); err != nil { 22154 return err 22155 } 22156 col = *destAddr 22157 sv = append(sv, col) 22158 22159 default: 22160 err = decoder.Decoder.Skip() 22161 if err != nil { 22162 return err 22163 } 22164 22165 } 22166 decoder = originalDecoder 22167 } 22168 *v = sv 22169 return nil 22170 } 22171 22172 func awsRestxml_deserializeDocumentTrafficPolicySummariesUnwrapped(v *[]types.TrafficPolicySummary, decoder smithyxml.NodeDecoder) error { 22173 var sv []types.TrafficPolicySummary 22174 if *v == nil { 22175 sv = make([]types.TrafficPolicySummary, 0) 22176 } else { 22177 sv = *v 22178 } 22179 22180 switch { 22181 default: 22182 var mv types.TrafficPolicySummary 22183 t := decoder.StartEl 22184 _ = t 22185 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 22186 destAddr := &mv 22187 if err := awsRestxml_deserializeDocumentTrafficPolicySummary(&destAddr, nodeDecoder); err != nil { 22188 return err 22189 } 22190 mv = *destAddr 22191 sv = append(sv, mv) 22192 } 22193 *v = sv 22194 return nil 22195 } 22196 func awsRestxml_deserializeDocumentTrafficPolicySummary(v **types.TrafficPolicySummary, decoder smithyxml.NodeDecoder) error { 22197 if v == nil { 22198 return fmt.Errorf("unexpected nil of type %T", v) 22199 } 22200 var sv *types.TrafficPolicySummary 22201 if *v == nil { 22202 sv = &types.TrafficPolicySummary{} 22203 } else { 22204 sv = *v 22205 } 22206 22207 for { 22208 t, done, err := decoder.Token() 22209 if err != nil { 22210 return err 22211 } 22212 if done { 22213 break 22214 } 22215 originalDecoder := decoder 22216 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 22217 switch { 22218 case strings.EqualFold("Id", t.Name.Local): 22219 val, err := decoder.Value() 22220 if err != nil { 22221 return err 22222 } 22223 if val == nil { 22224 break 22225 } 22226 { 22227 xtv := string(val) 22228 sv.Id = ptr.String(xtv) 22229 } 22230 22231 case strings.EqualFold("LatestVersion", t.Name.Local): 22232 val, err := decoder.Value() 22233 if err != nil { 22234 return err 22235 } 22236 if val == nil { 22237 break 22238 } 22239 { 22240 xtv := string(val) 22241 i64, err := strconv.ParseInt(xtv, 10, 64) 22242 if err != nil { 22243 return err 22244 } 22245 sv.LatestVersion = ptr.Int32(int32(i64)) 22246 } 22247 22248 case strings.EqualFold("Name", t.Name.Local): 22249 val, err := decoder.Value() 22250 if err != nil { 22251 return err 22252 } 22253 if val == nil { 22254 break 22255 } 22256 { 22257 xtv := string(val) 22258 sv.Name = ptr.String(xtv) 22259 } 22260 22261 case strings.EqualFold("TrafficPolicyCount", t.Name.Local): 22262 val, err := decoder.Value() 22263 if err != nil { 22264 return err 22265 } 22266 if val == nil { 22267 break 22268 } 22269 { 22270 xtv := string(val) 22271 i64, err := strconv.ParseInt(xtv, 10, 64) 22272 if err != nil { 22273 return err 22274 } 22275 sv.TrafficPolicyCount = ptr.Int32(int32(i64)) 22276 } 22277 22278 case strings.EqualFold("Type", t.Name.Local): 22279 val, err := decoder.Value() 22280 if err != nil { 22281 return err 22282 } 22283 if val == nil { 22284 break 22285 } 22286 { 22287 xtv := string(val) 22288 sv.Type = types.RRType(xtv) 22289 } 22290 22291 default: 22292 // Do nothing and ignore the unexpected tag element 22293 err = decoder.Decoder.Skip() 22294 if err != nil { 22295 return err 22296 } 22297 22298 } 22299 decoder = originalDecoder 22300 } 22301 *v = sv 22302 return nil 22303 } 22304 22305 func awsRestxml_deserializeDocumentVPC(v **types.VPC, decoder smithyxml.NodeDecoder) error { 22306 if v == nil { 22307 return fmt.Errorf("unexpected nil of type %T", v) 22308 } 22309 var sv *types.VPC 22310 if *v == nil { 22311 sv = &types.VPC{} 22312 } else { 22313 sv = *v 22314 } 22315 22316 for { 22317 t, done, err := decoder.Token() 22318 if err != nil { 22319 return err 22320 } 22321 if done { 22322 break 22323 } 22324 originalDecoder := decoder 22325 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 22326 switch { 22327 case strings.EqualFold("VPCId", t.Name.Local): 22328 val, err := decoder.Value() 22329 if err != nil { 22330 return err 22331 } 22332 if val == nil { 22333 break 22334 } 22335 { 22336 xtv := string(val) 22337 sv.VPCId = ptr.String(xtv) 22338 } 22339 22340 case strings.EqualFold("VPCRegion", t.Name.Local): 22341 val, err := decoder.Value() 22342 if err != nil { 22343 return err 22344 } 22345 if val == nil { 22346 break 22347 } 22348 { 22349 xtv := string(val) 22350 sv.VPCRegion = types.VPCRegion(xtv) 22351 } 22352 22353 default: 22354 // Do nothing and ignore the unexpected tag element 22355 err = decoder.Decoder.Skip() 22356 if err != nil { 22357 return err 22358 } 22359 22360 } 22361 decoder = originalDecoder 22362 } 22363 *v = sv 22364 return nil 22365 } 22366 22367 func awsRestxml_deserializeDocumentVPCAssociationAuthorizationNotFound(v **types.VPCAssociationAuthorizationNotFound, decoder smithyxml.NodeDecoder) error { 22368 if v == nil { 22369 return fmt.Errorf("unexpected nil of type %T", v) 22370 } 22371 var sv *types.VPCAssociationAuthorizationNotFound 22372 if *v == nil { 22373 sv = &types.VPCAssociationAuthorizationNotFound{} 22374 } else { 22375 sv = *v 22376 } 22377 22378 for { 22379 t, done, err := decoder.Token() 22380 if err != nil { 22381 return err 22382 } 22383 if done { 22384 break 22385 } 22386 originalDecoder := decoder 22387 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 22388 switch { 22389 case strings.EqualFold("message", t.Name.Local): 22390 val, err := decoder.Value() 22391 if err != nil { 22392 return err 22393 } 22394 if val == nil { 22395 break 22396 } 22397 { 22398 xtv := string(val) 22399 sv.Message = ptr.String(xtv) 22400 } 22401 22402 default: 22403 // Do nothing and ignore the unexpected tag element 22404 err = decoder.Decoder.Skip() 22405 if err != nil { 22406 return err 22407 } 22408 22409 } 22410 decoder = originalDecoder 22411 } 22412 *v = sv 22413 return nil 22414 } 22415 22416 func awsRestxml_deserializeDocumentVPCAssociationNotFound(v **types.VPCAssociationNotFound, decoder smithyxml.NodeDecoder) error { 22417 if v == nil { 22418 return fmt.Errorf("unexpected nil of type %T", v) 22419 } 22420 var sv *types.VPCAssociationNotFound 22421 if *v == nil { 22422 sv = &types.VPCAssociationNotFound{} 22423 } else { 22424 sv = *v 22425 } 22426 22427 for { 22428 t, done, err := decoder.Token() 22429 if err != nil { 22430 return err 22431 } 22432 if done { 22433 break 22434 } 22435 originalDecoder := decoder 22436 decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) 22437 switch { 22438 case strings.EqualFold("message", t.Name.Local): 22439 val, err := decoder.Value() 22440 if err != nil { 22441 return err 22442 } 22443 if val == nil { 22444 break 22445 } 22446 { 22447 xtv := string(val) 22448 sv.Message = ptr.String(xtv) 22449 } 22450 22451 default: 22452 // Do nothing and ignore the unexpected tag element 22453 err = decoder.Decoder.Skip() 22454 if err != nil { 22455 return err 22456 } 22457 22458 } 22459 decoder = originalDecoder 22460 } 22461 *v = sv 22462 return nil 22463 } 22464 22465 func awsRestxml_deserializeDocumentVPCs(v *[]types.VPC, decoder smithyxml.NodeDecoder) error { 22466 if v == nil { 22467 return fmt.Errorf("unexpected nil of type %T", v) 22468 } 22469 var sv []types.VPC 22470 if *v == nil { 22471 sv = make([]types.VPC, 0) 22472 } else { 22473 sv = *v 22474 } 22475 22476 originalDecoder := decoder 22477 for { 22478 t, done, err := decoder.Token() 22479 if err != nil { 22480 return err 22481 } 22482 if done { 22483 break 22484 } 22485 switch { 22486 case strings.EqualFold("VPC", t.Name.Local): 22487 var col types.VPC 22488 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 22489 destAddr := &col 22490 if err := awsRestxml_deserializeDocumentVPC(&destAddr, nodeDecoder); err != nil { 22491 return err 22492 } 22493 col = *destAddr 22494 sv = append(sv, col) 22495 22496 default: 22497 err = decoder.Decoder.Skip() 22498 if err != nil { 22499 return err 22500 } 22501 22502 } 22503 decoder = originalDecoder 22504 } 22505 *v = sv 22506 return nil 22507 } 22508 22509 func awsRestxml_deserializeDocumentVPCsUnwrapped(v *[]types.VPC, decoder smithyxml.NodeDecoder) error { 22510 var sv []types.VPC 22511 if *v == nil { 22512 sv = make([]types.VPC, 0) 22513 } else { 22514 sv = *v 22515 } 22516 22517 switch { 22518 default: 22519 var mv types.VPC 22520 t := decoder.StartEl 22521 _ = t 22522 nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) 22523 destAddr := &mv 22524 if err := awsRestxml_deserializeDocumentVPC(&destAddr, nodeDecoder); err != nil { 22525 return err 22526 } 22527 mv = *destAddr 22528 sv = append(sv, mv) 22529 } 22530 *v = sv 22531 return nil 22532 }