src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

deserializers.go (64774B)


      1 // Code generated by smithy-go-codegen DO NOT EDIT.
      2 
      3 package sts
      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/sts/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 awsAwsquery_deserializeOpAssumeRole struct {
     26 }
     27 
     28 func (*awsAwsquery_deserializeOpAssumeRole) ID() string {
     29 	return "OperationDeserializer"
     30 }
     31 
     32 func (m *awsAwsquery_deserializeOpAssumeRole) 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, awsAwsquery_deserializeOpErrorAssumeRole(response, &metadata)
     47 	}
     48 	output := &AssumeRoleOutput{}
     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 	t, err = decoder.GetElement("AssumeRoleResult")
     70 	if err != nil {
     71 		var snapshot bytes.Buffer
     72 		io.Copy(&snapshot, ringBuffer)
     73 		err = &smithy.DeserializationError{
     74 			Err:      fmt.Errorf("failed to decode response body, %w", err),
     75 			Snapshot: snapshot.Bytes(),
     76 		}
     77 		return out, metadata, err
     78 	}
     79 
     80 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
     81 	err = awsAwsquery_deserializeOpDocumentAssumeRoleOutput(&output, decoder)
     82 	if err != nil {
     83 		var snapshot bytes.Buffer
     84 		io.Copy(&snapshot, ringBuffer)
     85 		err = &smithy.DeserializationError{
     86 			Err:      fmt.Errorf("failed to decode response body, %w", err),
     87 			Snapshot: snapshot.Bytes(),
     88 		}
     89 		return out, metadata, err
     90 	}
     91 
     92 	return out, metadata, err
     93 }
     94 
     95 func awsAwsquery_deserializeOpErrorAssumeRole(response *smithyhttp.Response, metadata *middleware.Metadata) error {
     96 	var errorBuffer bytes.Buffer
     97 	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
     98 		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
     99 	}
    100 	errorBody := bytes.NewReader(errorBuffer.Bytes())
    101 
    102 	errorCode := "UnknownError"
    103 	errorMessage := errorCode
    104 
    105 	errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
    106 	if err != nil {
    107 		return err
    108 	}
    109 	if reqID := errorComponents.RequestID; len(reqID) != 0 {
    110 		awsmiddleware.SetRequestIDMetadata(metadata, reqID)
    111 	}
    112 	if len(errorComponents.Code) != 0 {
    113 		errorCode = errorComponents.Code
    114 	}
    115 	if len(errorComponents.Message) != 0 {
    116 		errorMessage = errorComponents.Message
    117 	}
    118 	errorBody.Seek(0, io.SeekStart)
    119 	switch {
    120 	case strings.EqualFold("ExpiredTokenException", errorCode):
    121 		return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody)
    122 
    123 	case strings.EqualFold("MalformedPolicyDocument", errorCode):
    124 		return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
    125 
    126 	case strings.EqualFold("PackedPolicyTooLarge", errorCode):
    127 		return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody)
    128 
    129 	case strings.EqualFold("RegionDisabledException", errorCode):
    130 		return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody)
    131 
    132 	default:
    133 		genericError := &smithy.GenericAPIError{
    134 			Code:    errorCode,
    135 			Message: errorMessage,
    136 		}
    137 		return genericError
    138 
    139 	}
    140 }
    141 
    142 type awsAwsquery_deserializeOpAssumeRoleWithSAML struct {
    143 }
    144 
    145 func (*awsAwsquery_deserializeOpAssumeRoleWithSAML) ID() string {
    146 	return "OperationDeserializer"
    147 }
    148 
    149 func (m *awsAwsquery_deserializeOpAssumeRoleWithSAML) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
    150 	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
    151 ) {
    152 	out, metadata, err = next.HandleDeserialize(ctx, in)
    153 	if err != nil {
    154 		return out, metadata, err
    155 	}
    156 
    157 	response, ok := out.RawResponse.(*smithyhttp.Response)
    158 	if !ok {
    159 		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
    160 	}
    161 
    162 	if response.StatusCode < 200 || response.StatusCode >= 300 {
    163 		return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoleWithSAML(response, &metadata)
    164 	}
    165 	output := &AssumeRoleWithSAMLOutput{}
    166 	out.Result = output
    167 
    168 	var buff [1024]byte
    169 	ringBuffer := smithyio.NewRingBuffer(buff[:])
    170 	body := io.TeeReader(response.Body, ringBuffer)
    171 	rootDecoder := xml.NewDecoder(body)
    172 	t, err := smithyxml.FetchRootElement(rootDecoder)
    173 	if err == io.EOF {
    174 		return out, metadata, nil
    175 	}
    176 	if err != nil {
    177 		var snapshot bytes.Buffer
    178 		io.Copy(&snapshot, ringBuffer)
    179 		return out, metadata, &smithy.DeserializationError{
    180 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    181 			Snapshot: snapshot.Bytes(),
    182 		}
    183 	}
    184 
    185 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
    186 	t, err = decoder.GetElement("AssumeRoleWithSAMLResult")
    187 	if err != nil {
    188 		var snapshot bytes.Buffer
    189 		io.Copy(&snapshot, ringBuffer)
    190 		err = &smithy.DeserializationError{
    191 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    192 			Snapshot: snapshot.Bytes(),
    193 		}
    194 		return out, metadata, err
    195 	}
    196 
    197 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
    198 	err = awsAwsquery_deserializeOpDocumentAssumeRoleWithSAMLOutput(&output, decoder)
    199 	if err != nil {
    200 		var snapshot bytes.Buffer
    201 		io.Copy(&snapshot, ringBuffer)
    202 		err = &smithy.DeserializationError{
    203 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    204 			Snapshot: snapshot.Bytes(),
    205 		}
    206 		return out, metadata, err
    207 	}
    208 
    209 	return out, metadata, err
    210 }
    211 
    212 func awsAwsquery_deserializeOpErrorAssumeRoleWithSAML(response *smithyhttp.Response, metadata *middleware.Metadata) error {
    213 	var errorBuffer bytes.Buffer
    214 	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
    215 		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
    216 	}
    217 	errorBody := bytes.NewReader(errorBuffer.Bytes())
    218 
    219 	errorCode := "UnknownError"
    220 	errorMessage := errorCode
    221 
    222 	errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
    223 	if err != nil {
    224 		return err
    225 	}
    226 	if reqID := errorComponents.RequestID; len(reqID) != 0 {
    227 		awsmiddleware.SetRequestIDMetadata(metadata, reqID)
    228 	}
    229 	if len(errorComponents.Code) != 0 {
    230 		errorCode = errorComponents.Code
    231 	}
    232 	if len(errorComponents.Message) != 0 {
    233 		errorMessage = errorComponents.Message
    234 	}
    235 	errorBody.Seek(0, io.SeekStart)
    236 	switch {
    237 	case strings.EqualFold("ExpiredTokenException", errorCode):
    238 		return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody)
    239 
    240 	case strings.EqualFold("IDPRejectedClaim", errorCode):
    241 		return awsAwsquery_deserializeErrorIDPRejectedClaimException(response, errorBody)
    242 
    243 	case strings.EqualFold("InvalidIdentityToken", errorCode):
    244 		return awsAwsquery_deserializeErrorInvalidIdentityTokenException(response, errorBody)
    245 
    246 	case strings.EqualFold("MalformedPolicyDocument", errorCode):
    247 		return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
    248 
    249 	case strings.EqualFold("PackedPolicyTooLarge", errorCode):
    250 		return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody)
    251 
    252 	case strings.EqualFold("RegionDisabledException", errorCode):
    253 		return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody)
    254 
    255 	default:
    256 		genericError := &smithy.GenericAPIError{
    257 			Code:    errorCode,
    258 			Message: errorMessage,
    259 		}
    260 		return genericError
    261 
    262 	}
    263 }
    264 
    265 type awsAwsquery_deserializeOpAssumeRoleWithWebIdentity struct {
    266 }
    267 
    268 func (*awsAwsquery_deserializeOpAssumeRoleWithWebIdentity) ID() string {
    269 	return "OperationDeserializer"
    270 }
    271 
    272 func (m *awsAwsquery_deserializeOpAssumeRoleWithWebIdentity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
    273 	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
    274 ) {
    275 	out, metadata, err = next.HandleDeserialize(ctx, in)
    276 	if err != nil {
    277 		return out, metadata, err
    278 	}
    279 
    280 	response, ok := out.RawResponse.(*smithyhttp.Response)
    281 	if !ok {
    282 		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
    283 	}
    284 
    285 	if response.StatusCode < 200 || response.StatusCode >= 300 {
    286 		return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoleWithWebIdentity(response, &metadata)
    287 	}
    288 	output := &AssumeRoleWithWebIdentityOutput{}
    289 	out.Result = output
    290 
    291 	var buff [1024]byte
    292 	ringBuffer := smithyio.NewRingBuffer(buff[:])
    293 	body := io.TeeReader(response.Body, ringBuffer)
    294 	rootDecoder := xml.NewDecoder(body)
    295 	t, err := smithyxml.FetchRootElement(rootDecoder)
    296 	if err == io.EOF {
    297 		return out, metadata, nil
    298 	}
    299 	if err != nil {
    300 		var snapshot bytes.Buffer
    301 		io.Copy(&snapshot, ringBuffer)
    302 		return out, metadata, &smithy.DeserializationError{
    303 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    304 			Snapshot: snapshot.Bytes(),
    305 		}
    306 	}
    307 
    308 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
    309 	t, err = decoder.GetElement("AssumeRoleWithWebIdentityResult")
    310 	if err != nil {
    311 		var snapshot bytes.Buffer
    312 		io.Copy(&snapshot, ringBuffer)
    313 		err = &smithy.DeserializationError{
    314 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    315 			Snapshot: snapshot.Bytes(),
    316 		}
    317 		return out, metadata, err
    318 	}
    319 
    320 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
    321 	err = awsAwsquery_deserializeOpDocumentAssumeRoleWithWebIdentityOutput(&output, decoder)
    322 	if err != nil {
    323 		var snapshot bytes.Buffer
    324 		io.Copy(&snapshot, ringBuffer)
    325 		err = &smithy.DeserializationError{
    326 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    327 			Snapshot: snapshot.Bytes(),
    328 		}
    329 		return out, metadata, err
    330 	}
    331 
    332 	return out, metadata, err
    333 }
    334 
    335 func awsAwsquery_deserializeOpErrorAssumeRoleWithWebIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error {
    336 	var errorBuffer bytes.Buffer
    337 	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
    338 		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
    339 	}
    340 	errorBody := bytes.NewReader(errorBuffer.Bytes())
    341 
    342 	errorCode := "UnknownError"
    343 	errorMessage := errorCode
    344 
    345 	errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
    346 	if err != nil {
    347 		return err
    348 	}
    349 	if reqID := errorComponents.RequestID; len(reqID) != 0 {
    350 		awsmiddleware.SetRequestIDMetadata(metadata, reqID)
    351 	}
    352 	if len(errorComponents.Code) != 0 {
    353 		errorCode = errorComponents.Code
    354 	}
    355 	if len(errorComponents.Message) != 0 {
    356 		errorMessage = errorComponents.Message
    357 	}
    358 	errorBody.Seek(0, io.SeekStart)
    359 	switch {
    360 	case strings.EqualFold("ExpiredTokenException", errorCode):
    361 		return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody)
    362 
    363 	case strings.EqualFold("IDPCommunicationError", errorCode):
    364 		return awsAwsquery_deserializeErrorIDPCommunicationErrorException(response, errorBody)
    365 
    366 	case strings.EqualFold("IDPRejectedClaim", errorCode):
    367 		return awsAwsquery_deserializeErrorIDPRejectedClaimException(response, errorBody)
    368 
    369 	case strings.EqualFold("InvalidIdentityToken", errorCode):
    370 		return awsAwsquery_deserializeErrorInvalidIdentityTokenException(response, errorBody)
    371 
    372 	case strings.EqualFold("MalformedPolicyDocument", errorCode):
    373 		return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
    374 
    375 	case strings.EqualFold("PackedPolicyTooLarge", errorCode):
    376 		return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody)
    377 
    378 	case strings.EqualFold("RegionDisabledException", errorCode):
    379 		return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody)
    380 
    381 	default:
    382 		genericError := &smithy.GenericAPIError{
    383 			Code:    errorCode,
    384 			Message: errorMessage,
    385 		}
    386 		return genericError
    387 
    388 	}
    389 }
    390 
    391 type awsAwsquery_deserializeOpDecodeAuthorizationMessage struct {
    392 }
    393 
    394 func (*awsAwsquery_deserializeOpDecodeAuthorizationMessage) ID() string {
    395 	return "OperationDeserializer"
    396 }
    397 
    398 func (m *awsAwsquery_deserializeOpDecodeAuthorizationMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
    399 	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
    400 ) {
    401 	out, metadata, err = next.HandleDeserialize(ctx, in)
    402 	if err != nil {
    403 		return out, metadata, err
    404 	}
    405 
    406 	response, ok := out.RawResponse.(*smithyhttp.Response)
    407 	if !ok {
    408 		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
    409 	}
    410 
    411 	if response.StatusCode < 200 || response.StatusCode >= 300 {
    412 		return out, metadata, awsAwsquery_deserializeOpErrorDecodeAuthorizationMessage(response, &metadata)
    413 	}
    414 	output := &DecodeAuthorizationMessageOutput{}
    415 	out.Result = output
    416 
    417 	var buff [1024]byte
    418 	ringBuffer := smithyio.NewRingBuffer(buff[:])
    419 	body := io.TeeReader(response.Body, ringBuffer)
    420 	rootDecoder := xml.NewDecoder(body)
    421 	t, err := smithyxml.FetchRootElement(rootDecoder)
    422 	if err == io.EOF {
    423 		return out, metadata, nil
    424 	}
    425 	if err != nil {
    426 		var snapshot bytes.Buffer
    427 		io.Copy(&snapshot, ringBuffer)
    428 		return out, metadata, &smithy.DeserializationError{
    429 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    430 			Snapshot: snapshot.Bytes(),
    431 		}
    432 	}
    433 
    434 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
    435 	t, err = decoder.GetElement("DecodeAuthorizationMessageResult")
    436 	if err != nil {
    437 		var snapshot bytes.Buffer
    438 		io.Copy(&snapshot, ringBuffer)
    439 		err = &smithy.DeserializationError{
    440 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    441 			Snapshot: snapshot.Bytes(),
    442 		}
    443 		return out, metadata, err
    444 	}
    445 
    446 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
    447 	err = awsAwsquery_deserializeOpDocumentDecodeAuthorizationMessageOutput(&output, decoder)
    448 	if err != nil {
    449 		var snapshot bytes.Buffer
    450 		io.Copy(&snapshot, ringBuffer)
    451 		err = &smithy.DeserializationError{
    452 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    453 			Snapshot: snapshot.Bytes(),
    454 		}
    455 		return out, metadata, err
    456 	}
    457 
    458 	return out, metadata, err
    459 }
    460 
    461 func awsAwsquery_deserializeOpErrorDecodeAuthorizationMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error {
    462 	var errorBuffer bytes.Buffer
    463 	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
    464 		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
    465 	}
    466 	errorBody := bytes.NewReader(errorBuffer.Bytes())
    467 
    468 	errorCode := "UnknownError"
    469 	errorMessage := errorCode
    470 
    471 	errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
    472 	if err != nil {
    473 		return err
    474 	}
    475 	if reqID := errorComponents.RequestID; len(reqID) != 0 {
    476 		awsmiddleware.SetRequestIDMetadata(metadata, reqID)
    477 	}
    478 	if len(errorComponents.Code) != 0 {
    479 		errorCode = errorComponents.Code
    480 	}
    481 	if len(errorComponents.Message) != 0 {
    482 		errorMessage = errorComponents.Message
    483 	}
    484 	errorBody.Seek(0, io.SeekStart)
    485 	switch {
    486 	case strings.EqualFold("InvalidAuthorizationMessageException", errorCode):
    487 		return awsAwsquery_deserializeErrorInvalidAuthorizationMessageException(response, errorBody)
    488 
    489 	default:
    490 		genericError := &smithy.GenericAPIError{
    491 			Code:    errorCode,
    492 			Message: errorMessage,
    493 		}
    494 		return genericError
    495 
    496 	}
    497 }
    498 
    499 type awsAwsquery_deserializeOpGetAccessKeyInfo struct {
    500 }
    501 
    502 func (*awsAwsquery_deserializeOpGetAccessKeyInfo) ID() string {
    503 	return "OperationDeserializer"
    504 }
    505 
    506 func (m *awsAwsquery_deserializeOpGetAccessKeyInfo) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
    507 	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
    508 ) {
    509 	out, metadata, err = next.HandleDeserialize(ctx, in)
    510 	if err != nil {
    511 		return out, metadata, err
    512 	}
    513 
    514 	response, ok := out.RawResponse.(*smithyhttp.Response)
    515 	if !ok {
    516 		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
    517 	}
    518 
    519 	if response.StatusCode < 200 || response.StatusCode >= 300 {
    520 		return out, metadata, awsAwsquery_deserializeOpErrorGetAccessKeyInfo(response, &metadata)
    521 	}
    522 	output := &GetAccessKeyInfoOutput{}
    523 	out.Result = output
    524 
    525 	var buff [1024]byte
    526 	ringBuffer := smithyio.NewRingBuffer(buff[:])
    527 	body := io.TeeReader(response.Body, ringBuffer)
    528 	rootDecoder := xml.NewDecoder(body)
    529 	t, err := smithyxml.FetchRootElement(rootDecoder)
    530 	if err == io.EOF {
    531 		return out, metadata, nil
    532 	}
    533 	if err != nil {
    534 		var snapshot bytes.Buffer
    535 		io.Copy(&snapshot, ringBuffer)
    536 		return out, metadata, &smithy.DeserializationError{
    537 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    538 			Snapshot: snapshot.Bytes(),
    539 		}
    540 	}
    541 
    542 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
    543 	t, err = decoder.GetElement("GetAccessKeyInfoResult")
    544 	if err != nil {
    545 		var snapshot bytes.Buffer
    546 		io.Copy(&snapshot, ringBuffer)
    547 		err = &smithy.DeserializationError{
    548 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    549 			Snapshot: snapshot.Bytes(),
    550 		}
    551 		return out, metadata, err
    552 	}
    553 
    554 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
    555 	err = awsAwsquery_deserializeOpDocumentGetAccessKeyInfoOutput(&output, decoder)
    556 	if err != nil {
    557 		var snapshot bytes.Buffer
    558 		io.Copy(&snapshot, ringBuffer)
    559 		err = &smithy.DeserializationError{
    560 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    561 			Snapshot: snapshot.Bytes(),
    562 		}
    563 		return out, metadata, err
    564 	}
    565 
    566 	return out, metadata, err
    567 }
    568 
    569 func awsAwsquery_deserializeOpErrorGetAccessKeyInfo(response *smithyhttp.Response, metadata *middleware.Metadata) error {
    570 	var errorBuffer bytes.Buffer
    571 	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
    572 		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
    573 	}
    574 	errorBody := bytes.NewReader(errorBuffer.Bytes())
    575 
    576 	errorCode := "UnknownError"
    577 	errorMessage := errorCode
    578 
    579 	errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
    580 	if err != nil {
    581 		return err
    582 	}
    583 	if reqID := errorComponents.RequestID; len(reqID) != 0 {
    584 		awsmiddleware.SetRequestIDMetadata(metadata, reqID)
    585 	}
    586 	if len(errorComponents.Code) != 0 {
    587 		errorCode = errorComponents.Code
    588 	}
    589 	if len(errorComponents.Message) != 0 {
    590 		errorMessage = errorComponents.Message
    591 	}
    592 	errorBody.Seek(0, io.SeekStart)
    593 	switch {
    594 	default:
    595 		genericError := &smithy.GenericAPIError{
    596 			Code:    errorCode,
    597 			Message: errorMessage,
    598 		}
    599 		return genericError
    600 
    601 	}
    602 }
    603 
    604 type awsAwsquery_deserializeOpGetCallerIdentity struct {
    605 }
    606 
    607 func (*awsAwsquery_deserializeOpGetCallerIdentity) ID() string {
    608 	return "OperationDeserializer"
    609 }
    610 
    611 func (m *awsAwsquery_deserializeOpGetCallerIdentity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
    612 	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
    613 ) {
    614 	out, metadata, err = next.HandleDeserialize(ctx, in)
    615 	if err != nil {
    616 		return out, metadata, err
    617 	}
    618 
    619 	response, ok := out.RawResponse.(*smithyhttp.Response)
    620 	if !ok {
    621 		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
    622 	}
    623 
    624 	if response.StatusCode < 200 || response.StatusCode >= 300 {
    625 		return out, metadata, awsAwsquery_deserializeOpErrorGetCallerIdentity(response, &metadata)
    626 	}
    627 	output := &GetCallerIdentityOutput{}
    628 	out.Result = output
    629 
    630 	var buff [1024]byte
    631 	ringBuffer := smithyio.NewRingBuffer(buff[:])
    632 	body := io.TeeReader(response.Body, ringBuffer)
    633 	rootDecoder := xml.NewDecoder(body)
    634 	t, err := smithyxml.FetchRootElement(rootDecoder)
    635 	if err == io.EOF {
    636 		return out, metadata, nil
    637 	}
    638 	if err != nil {
    639 		var snapshot bytes.Buffer
    640 		io.Copy(&snapshot, ringBuffer)
    641 		return out, metadata, &smithy.DeserializationError{
    642 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    643 			Snapshot: snapshot.Bytes(),
    644 		}
    645 	}
    646 
    647 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
    648 	t, err = decoder.GetElement("GetCallerIdentityResult")
    649 	if err != nil {
    650 		var snapshot bytes.Buffer
    651 		io.Copy(&snapshot, ringBuffer)
    652 		err = &smithy.DeserializationError{
    653 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    654 			Snapshot: snapshot.Bytes(),
    655 		}
    656 		return out, metadata, err
    657 	}
    658 
    659 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
    660 	err = awsAwsquery_deserializeOpDocumentGetCallerIdentityOutput(&output, decoder)
    661 	if err != nil {
    662 		var snapshot bytes.Buffer
    663 		io.Copy(&snapshot, ringBuffer)
    664 		err = &smithy.DeserializationError{
    665 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    666 			Snapshot: snapshot.Bytes(),
    667 		}
    668 		return out, metadata, err
    669 	}
    670 
    671 	return out, metadata, err
    672 }
    673 
    674 func awsAwsquery_deserializeOpErrorGetCallerIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error {
    675 	var errorBuffer bytes.Buffer
    676 	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
    677 		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
    678 	}
    679 	errorBody := bytes.NewReader(errorBuffer.Bytes())
    680 
    681 	errorCode := "UnknownError"
    682 	errorMessage := errorCode
    683 
    684 	errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
    685 	if err != nil {
    686 		return err
    687 	}
    688 	if reqID := errorComponents.RequestID; len(reqID) != 0 {
    689 		awsmiddleware.SetRequestIDMetadata(metadata, reqID)
    690 	}
    691 	if len(errorComponents.Code) != 0 {
    692 		errorCode = errorComponents.Code
    693 	}
    694 	if len(errorComponents.Message) != 0 {
    695 		errorMessage = errorComponents.Message
    696 	}
    697 	errorBody.Seek(0, io.SeekStart)
    698 	switch {
    699 	default:
    700 		genericError := &smithy.GenericAPIError{
    701 			Code:    errorCode,
    702 			Message: errorMessage,
    703 		}
    704 		return genericError
    705 
    706 	}
    707 }
    708 
    709 type awsAwsquery_deserializeOpGetFederationToken struct {
    710 }
    711 
    712 func (*awsAwsquery_deserializeOpGetFederationToken) ID() string {
    713 	return "OperationDeserializer"
    714 }
    715 
    716 func (m *awsAwsquery_deserializeOpGetFederationToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
    717 	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
    718 ) {
    719 	out, metadata, err = next.HandleDeserialize(ctx, in)
    720 	if err != nil {
    721 		return out, metadata, err
    722 	}
    723 
    724 	response, ok := out.RawResponse.(*smithyhttp.Response)
    725 	if !ok {
    726 		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
    727 	}
    728 
    729 	if response.StatusCode < 200 || response.StatusCode >= 300 {
    730 		return out, metadata, awsAwsquery_deserializeOpErrorGetFederationToken(response, &metadata)
    731 	}
    732 	output := &GetFederationTokenOutput{}
    733 	out.Result = output
    734 
    735 	var buff [1024]byte
    736 	ringBuffer := smithyio.NewRingBuffer(buff[:])
    737 	body := io.TeeReader(response.Body, ringBuffer)
    738 	rootDecoder := xml.NewDecoder(body)
    739 	t, err := smithyxml.FetchRootElement(rootDecoder)
    740 	if err == io.EOF {
    741 		return out, metadata, nil
    742 	}
    743 	if err != nil {
    744 		var snapshot bytes.Buffer
    745 		io.Copy(&snapshot, ringBuffer)
    746 		return out, metadata, &smithy.DeserializationError{
    747 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    748 			Snapshot: snapshot.Bytes(),
    749 		}
    750 	}
    751 
    752 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
    753 	t, err = decoder.GetElement("GetFederationTokenResult")
    754 	if err != nil {
    755 		var snapshot bytes.Buffer
    756 		io.Copy(&snapshot, ringBuffer)
    757 		err = &smithy.DeserializationError{
    758 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    759 			Snapshot: snapshot.Bytes(),
    760 		}
    761 		return out, metadata, err
    762 	}
    763 
    764 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
    765 	err = awsAwsquery_deserializeOpDocumentGetFederationTokenOutput(&output, decoder)
    766 	if err != nil {
    767 		var snapshot bytes.Buffer
    768 		io.Copy(&snapshot, ringBuffer)
    769 		err = &smithy.DeserializationError{
    770 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    771 			Snapshot: snapshot.Bytes(),
    772 		}
    773 		return out, metadata, err
    774 	}
    775 
    776 	return out, metadata, err
    777 }
    778 
    779 func awsAwsquery_deserializeOpErrorGetFederationToken(response *smithyhttp.Response, metadata *middleware.Metadata) error {
    780 	var errorBuffer bytes.Buffer
    781 	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
    782 		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
    783 	}
    784 	errorBody := bytes.NewReader(errorBuffer.Bytes())
    785 
    786 	errorCode := "UnknownError"
    787 	errorMessage := errorCode
    788 
    789 	errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
    790 	if err != nil {
    791 		return err
    792 	}
    793 	if reqID := errorComponents.RequestID; len(reqID) != 0 {
    794 		awsmiddleware.SetRequestIDMetadata(metadata, reqID)
    795 	}
    796 	if len(errorComponents.Code) != 0 {
    797 		errorCode = errorComponents.Code
    798 	}
    799 	if len(errorComponents.Message) != 0 {
    800 		errorMessage = errorComponents.Message
    801 	}
    802 	errorBody.Seek(0, io.SeekStart)
    803 	switch {
    804 	case strings.EqualFold("MalformedPolicyDocument", errorCode):
    805 		return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
    806 
    807 	case strings.EqualFold("PackedPolicyTooLarge", errorCode):
    808 		return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody)
    809 
    810 	case strings.EqualFold("RegionDisabledException", errorCode):
    811 		return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody)
    812 
    813 	default:
    814 		genericError := &smithy.GenericAPIError{
    815 			Code:    errorCode,
    816 			Message: errorMessage,
    817 		}
    818 		return genericError
    819 
    820 	}
    821 }
    822 
    823 type awsAwsquery_deserializeOpGetSessionToken struct {
    824 }
    825 
    826 func (*awsAwsquery_deserializeOpGetSessionToken) ID() string {
    827 	return "OperationDeserializer"
    828 }
    829 
    830 func (m *awsAwsquery_deserializeOpGetSessionToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
    831 	out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
    832 ) {
    833 	out, metadata, err = next.HandleDeserialize(ctx, in)
    834 	if err != nil {
    835 		return out, metadata, err
    836 	}
    837 
    838 	response, ok := out.RawResponse.(*smithyhttp.Response)
    839 	if !ok {
    840 		return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
    841 	}
    842 
    843 	if response.StatusCode < 200 || response.StatusCode >= 300 {
    844 		return out, metadata, awsAwsquery_deserializeOpErrorGetSessionToken(response, &metadata)
    845 	}
    846 	output := &GetSessionTokenOutput{}
    847 	out.Result = output
    848 
    849 	var buff [1024]byte
    850 	ringBuffer := smithyio.NewRingBuffer(buff[:])
    851 	body := io.TeeReader(response.Body, ringBuffer)
    852 	rootDecoder := xml.NewDecoder(body)
    853 	t, err := smithyxml.FetchRootElement(rootDecoder)
    854 	if err == io.EOF {
    855 		return out, metadata, nil
    856 	}
    857 	if err != nil {
    858 		var snapshot bytes.Buffer
    859 		io.Copy(&snapshot, ringBuffer)
    860 		return out, metadata, &smithy.DeserializationError{
    861 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    862 			Snapshot: snapshot.Bytes(),
    863 		}
    864 	}
    865 
    866 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
    867 	t, err = decoder.GetElement("GetSessionTokenResult")
    868 	if err != nil {
    869 		var snapshot bytes.Buffer
    870 		io.Copy(&snapshot, ringBuffer)
    871 		err = &smithy.DeserializationError{
    872 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    873 			Snapshot: snapshot.Bytes(),
    874 		}
    875 		return out, metadata, err
    876 	}
    877 
    878 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
    879 	err = awsAwsquery_deserializeOpDocumentGetSessionTokenOutput(&output, decoder)
    880 	if err != nil {
    881 		var snapshot bytes.Buffer
    882 		io.Copy(&snapshot, ringBuffer)
    883 		err = &smithy.DeserializationError{
    884 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    885 			Snapshot: snapshot.Bytes(),
    886 		}
    887 		return out, metadata, err
    888 	}
    889 
    890 	return out, metadata, err
    891 }
    892 
    893 func awsAwsquery_deserializeOpErrorGetSessionToken(response *smithyhttp.Response, metadata *middleware.Metadata) error {
    894 	var errorBuffer bytes.Buffer
    895 	if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
    896 		return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
    897 	}
    898 	errorBody := bytes.NewReader(errorBuffer.Bytes())
    899 
    900 	errorCode := "UnknownError"
    901 	errorMessage := errorCode
    902 
    903 	errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false)
    904 	if err != nil {
    905 		return err
    906 	}
    907 	if reqID := errorComponents.RequestID; len(reqID) != 0 {
    908 		awsmiddleware.SetRequestIDMetadata(metadata, reqID)
    909 	}
    910 	if len(errorComponents.Code) != 0 {
    911 		errorCode = errorComponents.Code
    912 	}
    913 	if len(errorComponents.Message) != 0 {
    914 		errorMessage = errorComponents.Message
    915 	}
    916 	errorBody.Seek(0, io.SeekStart)
    917 	switch {
    918 	case strings.EqualFold("RegionDisabledException", errorCode):
    919 		return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody)
    920 
    921 	default:
    922 		genericError := &smithy.GenericAPIError{
    923 			Code:    errorCode,
    924 			Message: errorMessage,
    925 		}
    926 		return genericError
    927 
    928 	}
    929 }
    930 
    931 func awsAwsquery_deserializeErrorExpiredTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
    932 	output := &types.ExpiredTokenException{}
    933 	var buff [1024]byte
    934 	ringBuffer := smithyio.NewRingBuffer(buff[:])
    935 	body := io.TeeReader(errorBody, ringBuffer)
    936 	rootDecoder := xml.NewDecoder(body)
    937 	t, err := smithyxml.FetchRootElement(rootDecoder)
    938 	if err == io.EOF {
    939 		return output
    940 	}
    941 	if err != nil {
    942 		var snapshot bytes.Buffer
    943 		io.Copy(&snapshot, ringBuffer)
    944 		return &smithy.DeserializationError{
    945 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    946 			Snapshot: snapshot.Bytes(),
    947 		}
    948 	}
    949 
    950 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
    951 	t, err = decoder.GetElement("Error")
    952 	if err != nil {
    953 		var snapshot bytes.Buffer
    954 		io.Copy(&snapshot, ringBuffer)
    955 		return &smithy.DeserializationError{
    956 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    957 			Snapshot: snapshot.Bytes(),
    958 		}
    959 	}
    960 
    961 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
    962 	err = awsAwsquery_deserializeDocumentExpiredTokenException(&output, decoder)
    963 	if err != nil {
    964 		var snapshot bytes.Buffer
    965 		io.Copy(&snapshot, ringBuffer)
    966 		return &smithy.DeserializationError{
    967 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    968 			Snapshot: snapshot.Bytes(),
    969 		}
    970 	}
    971 
    972 	return output
    973 }
    974 
    975 func awsAwsquery_deserializeErrorIDPCommunicationErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
    976 	output := &types.IDPCommunicationErrorException{}
    977 	var buff [1024]byte
    978 	ringBuffer := smithyio.NewRingBuffer(buff[:])
    979 	body := io.TeeReader(errorBody, ringBuffer)
    980 	rootDecoder := xml.NewDecoder(body)
    981 	t, err := smithyxml.FetchRootElement(rootDecoder)
    982 	if err == io.EOF {
    983 		return output
    984 	}
    985 	if err != nil {
    986 		var snapshot bytes.Buffer
    987 		io.Copy(&snapshot, ringBuffer)
    988 		return &smithy.DeserializationError{
    989 			Err:      fmt.Errorf("failed to decode response body, %w", err),
    990 			Snapshot: snapshot.Bytes(),
    991 		}
    992 	}
    993 
    994 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
    995 	t, err = decoder.GetElement("Error")
    996 	if err != nil {
    997 		var snapshot bytes.Buffer
    998 		io.Copy(&snapshot, ringBuffer)
    999 		return &smithy.DeserializationError{
   1000 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1001 			Snapshot: snapshot.Bytes(),
   1002 		}
   1003 	}
   1004 
   1005 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   1006 	err = awsAwsquery_deserializeDocumentIDPCommunicationErrorException(&output, decoder)
   1007 	if err != nil {
   1008 		var snapshot bytes.Buffer
   1009 		io.Copy(&snapshot, ringBuffer)
   1010 		return &smithy.DeserializationError{
   1011 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1012 			Snapshot: snapshot.Bytes(),
   1013 		}
   1014 	}
   1015 
   1016 	return output
   1017 }
   1018 
   1019 func awsAwsquery_deserializeErrorIDPRejectedClaimException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
   1020 	output := &types.IDPRejectedClaimException{}
   1021 	var buff [1024]byte
   1022 	ringBuffer := smithyio.NewRingBuffer(buff[:])
   1023 	body := io.TeeReader(errorBody, ringBuffer)
   1024 	rootDecoder := xml.NewDecoder(body)
   1025 	t, err := smithyxml.FetchRootElement(rootDecoder)
   1026 	if err == io.EOF {
   1027 		return output
   1028 	}
   1029 	if err != nil {
   1030 		var snapshot bytes.Buffer
   1031 		io.Copy(&snapshot, ringBuffer)
   1032 		return &smithy.DeserializationError{
   1033 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1034 			Snapshot: snapshot.Bytes(),
   1035 		}
   1036 	}
   1037 
   1038 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
   1039 	t, err = decoder.GetElement("Error")
   1040 	if err != nil {
   1041 		var snapshot bytes.Buffer
   1042 		io.Copy(&snapshot, ringBuffer)
   1043 		return &smithy.DeserializationError{
   1044 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1045 			Snapshot: snapshot.Bytes(),
   1046 		}
   1047 	}
   1048 
   1049 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   1050 	err = awsAwsquery_deserializeDocumentIDPRejectedClaimException(&output, decoder)
   1051 	if err != nil {
   1052 		var snapshot bytes.Buffer
   1053 		io.Copy(&snapshot, ringBuffer)
   1054 		return &smithy.DeserializationError{
   1055 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1056 			Snapshot: snapshot.Bytes(),
   1057 		}
   1058 	}
   1059 
   1060 	return output
   1061 }
   1062 
   1063 func awsAwsquery_deserializeErrorInvalidAuthorizationMessageException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
   1064 	output := &types.InvalidAuthorizationMessageException{}
   1065 	var buff [1024]byte
   1066 	ringBuffer := smithyio.NewRingBuffer(buff[:])
   1067 	body := io.TeeReader(errorBody, ringBuffer)
   1068 	rootDecoder := xml.NewDecoder(body)
   1069 	t, err := smithyxml.FetchRootElement(rootDecoder)
   1070 	if err == io.EOF {
   1071 		return output
   1072 	}
   1073 	if err != nil {
   1074 		var snapshot bytes.Buffer
   1075 		io.Copy(&snapshot, ringBuffer)
   1076 		return &smithy.DeserializationError{
   1077 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1078 			Snapshot: snapshot.Bytes(),
   1079 		}
   1080 	}
   1081 
   1082 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
   1083 	t, err = decoder.GetElement("Error")
   1084 	if err != nil {
   1085 		var snapshot bytes.Buffer
   1086 		io.Copy(&snapshot, ringBuffer)
   1087 		return &smithy.DeserializationError{
   1088 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1089 			Snapshot: snapshot.Bytes(),
   1090 		}
   1091 	}
   1092 
   1093 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   1094 	err = awsAwsquery_deserializeDocumentInvalidAuthorizationMessageException(&output, decoder)
   1095 	if err != nil {
   1096 		var snapshot bytes.Buffer
   1097 		io.Copy(&snapshot, ringBuffer)
   1098 		return &smithy.DeserializationError{
   1099 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1100 			Snapshot: snapshot.Bytes(),
   1101 		}
   1102 	}
   1103 
   1104 	return output
   1105 }
   1106 
   1107 func awsAwsquery_deserializeErrorInvalidIdentityTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
   1108 	output := &types.InvalidIdentityTokenException{}
   1109 	var buff [1024]byte
   1110 	ringBuffer := smithyio.NewRingBuffer(buff[:])
   1111 	body := io.TeeReader(errorBody, ringBuffer)
   1112 	rootDecoder := xml.NewDecoder(body)
   1113 	t, err := smithyxml.FetchRootElement(rootDecoder)
   1114 	if err == io.EOF {
   1115 		return output
   1116 	}
   1117 	if err != nil {
   1118 		var snapshot bytes.Buffer
   1119 		io.Copy(&snapshot, ringBuffer)
   1120 		return &smithy.DeserializationError{
   1121 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1122 			Snapshot: snapshot.Bytes(),
   1123 		}
   1124 	}
   1125 
   1126 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
   1127 	t, err = decoder.GetElement("Error")
   1128 	if err != nil {
   1129 		var snapshot bytes.Buffer
   1130 		io.Copy(&snapshot, ringBuffer)
   1131 		return &smithy.DeserializationError{
   1132 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1133 			Snapshot: snapshot.Bytes(),
   1134 		}
   1135 	}
   1136 
   1137 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   1138 	err = awsAwsquery_deserializeDocumentInvalidIdentityTokenException(&output, decoder)
   1139 	if err != nil {
   1140 		var snapshot bytes.Buffer
   1141 		io.Copy(&snapshot, ringBuffer)
   1142 		return &smithy.DeserializationError{
   1143 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1144 			Snapshot: snapshot.Bytes(),
   1145 		}
   1146 	}
   1147 
   1148 	return output
   1149 }
   1150 
   1151 func awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
   1152 	output := &types.MalformedPolicyDocumentException{}
   1153 	var buff [1024]byte
   1154 	ringBuffer := smithyio.NewRingBuffer(buff[:])
   1155 	body := io.TeeReader(errorBody, ringBuffer)
   1156 	rootDecoder := xml.NewDecoder(body)
   1157 	t, err := smithyxml.FetchRootElement(rootDecoder)
   1158 	if err == io.EOF {
   1159 		return output
   1160 	}
   1161 	if err != nil {
   1162 		var snapshot bytes.Buffer
   1163 		io.Copy(&snapshot, ringBuffer)
   1164 		return &smithy.DeserializationError{
   1165 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1166 			Snapshot: snapshot.Bytes(),
   1167 		}
   1168 	}
   1169 
   1170 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
   1171 	t, err = decoder.GetElement("Error")
   1172 	if err != nil {
   1173 		var snapshot bytes.Buffer
   1174 		io.Copy(&snapshot, ringBuffer)
   1175 		return &smithy.DeserializationError{
   1176 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1177 			Snapshot: snapshot.Bytes(),
   1178 		}
   1179 	}
   1180 
   1181 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   1182 	err = awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(&output, decoder)
   1183 	if err != nil {
   1184 		var snapshot bytes.Buffer
   1185 		io.Copy(&snapshot, ringBuffer)
   1186 		return &smithy.DeserializationError{
   1187 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1188 			Snapshot: snapshot.Bytes(),
   1189 		}
   1190 	}
   1191 
   1192 	return output
   1193 }
   1194 
   1195 func awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
   1196 	output := &types.PackedPolicyTooLargeException{}
   1197 	var buff [1024]byte
   1198 	ringBuffer := smithyio.NewRingBuffer(buff[:])
   1199 	body := io.TeeReader(errorBody, ringBuffer)
   1200 	rootDecoder := xml.NewDecoder(body)
   1201 	t, err := smithyxml.FetchRootElement(rootDecoder)
   1202 	if err == io.EOF {
   1203 		return output
   1204 	}
   1205 	if err != nil {
   1206 		var snapshot bytes.Buffer
   1207 		io.Copy(&snapshot, ringBuffer)
   1208 		return &smithy.DeserializationError{
   1209 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1210 			Snapshot: snapshot.Bytes(),
   1211 		}
   1212 	}
   1213 
   1214 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
   1215 	t, err = decoder.GetElement("Error")
   1216 	if err != nil {
   1217 		var snapshot bytes.Buffer
   1218 		io.Copy(&snapshot, ringBuffer)
   1219 		return &smithy.DeserializationError{
   1220 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1221 			Snapshot: snapshot.Bytes(),
   1222 		}
   1223 	}
   1224 
   1225 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   1226 	err = awsAwsquery_deserializeDocumentPackedPolicyTooLargeException(&output, decoder)
   1227 	if err != nil {
   1228 		var snapshot bytes.Buffer
   1229 		io.Copy(&snapshot, ringBuffer)
   1230 		return &smithy.DeserializationError{
   1231 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1232 			Snapshot: snapshot.Bytes(),
   1233 		}
   1234 	}
   1235 
   1236 	return output
   1237 }
   1238 
   1239 func awsAwsquery_deserializeErrorRegionDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
   1240 	output := &types.RegionDisabledException{}
   1241 	var buff [1024]byte
   1242 	ringBuffer := smithyio.NewRingBuffer(buff[:])
   1243 	body := io.TeeReader(errorBody, ringBuffer)
   1244 	rootDecoder := xml.NewDecoder(body)
   1245 	t, err := smithyxml.FetchRootElement(rootDecoder)
   1246 	if err == io.EOF {
   1247 		return output
   1248 	}
   1249 	if err != nil {
   1250 		var snapshot bytes.Buffer
   1251 		io.Copy(&snapshot, ringBuffer)
   1252 		return &smithy.DeserializationError{
   1253 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1254 			Snapshot: snapshot.Bytes(),
   1255 		}
   1256 	}
   1257 
   1258 	decoder := smithyxml.WrapNodeDecoder(rootDecoder, t)
   1259 	t, err = decoder.GetElement("Error")
   1260 	if err != nil {
   1261 		var snapshot bytes.Buffer
   1262 		io.Copy(&snapshot, ringBuffer)
   1263 		return &smithy.DeserializationError{
   1264 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1265 			Snapshot: snapshot.Bytes(),
   1266 		}
   1267 	}
   1268 
   1269 	decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   1270 	err = awsAwsquery_deserializeDocumentRegionDisabledException(&output, decoder)
   1271 	if err != nil {
   1272 		var snapshot bytes.Buffer
   1273 		io.Copy(&snapshot, ringBuffer)
   1274 		return &smithy.DeserializationError{
   1275 			Err:      fmt.Errorf("failed to decode response body, %w", err),
   1276 			Snapshot: snapshot.Bytes(),
   1277 		}
   1278 	}
   1279 
   1280 	return output
   1281 }
   1282 
   1283 func awsAwsquery_deserializeDocumentAssumedRoleUser(v **types.AssumedRoleUser, decoder smithyxml.NodeDecoder) error {
   1284 	if v == nil {
   1285 		return fmt.Errorf("unexpected nil of type %T", v)
   1286 	}
   1287 	var sv *types.AssumedRoleUser
   1288 	if *v == nil {
   1289 		sv = &types.AssumedRoleUser{}
   1290 	} else {
   1291 		sv = *v
   1292 	}
   1293 
   1294 	for {
   1295 		t, done, err := decoder.Token()
   1296 		if err != nil {
   1297 			return err
   1298 		}
   1299 		if done {
   1300 			break
   1301 		}
   1302 		originalDecoder := decoder
   1303 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1304 		switch {
   1305 		case strings.EqualFold("Arn", t.Name.Local):
   1306 			val, err := decoder.Value()
   1307 			if err != nil {
   1308 				return err
   1309 			}
   1310 			if val == nil {
   1311 				break
   1312 			}
   1313 			{
   1314 				xtv := string(val)
   1315 				sv.Arn = ptr.String(xtv)
   1316 			}
   1317 
   1318 		case strings.EqualFold("AssumedRoleId", t.Name.Local):
   1319 			val, err := decoder.Value()
   1320 			if err != nil {
   1321 				return err
   1322 			}
   1323 			if val == nil {
   1324 				break
   1325 			}
   1326 			{
   1327 				xtv := string(val)
   1328 				sv.AssumedRoleId = ptr.String(xtv)
   1329 			}
   1330 
   1331 		default:
   1332 			// Do nothing and ignore the unexpected tag element
   1333 			err = decoder.Decoder.Skip()
   1334 			if err != nil {
   1335 				return err
   1336 			}
   1337 
   1338 		}
   1339 		decoder = originalDecoder
   1340 	}
   1341 	*v = sv
   1342 	return nil
   1343 }
   1344 
   1345 func awsAwsquery_deserializeDocumentCredentials(v **types.Credentials, decoder smithyxml.NodeDecoder) error {
   1346 	if v == nil {
   1347 		return fmt.Errorf("unexpected nil of type %T", v)
   1348 	}
   1349 	var sv *types.Credentials
   1350 	if *v == nil {
   1351 		sv = &types.Credentials{}
   1352 	} else {
   1353 		sv = *v
   1354 	}
   1355 
   1356 	for {
   1357 		t, done, err := decoder.Token()
   1358 		if err != nil {
   1359 			return err
   1360 		}
   1361 		if done {
   1362 			break
   1363 		}
   1364 		originalDecoder := decoder
   1365 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1366 		switch {
   1367 		case strings.EqualFold("AccessKeyId", t.Name.Local):
   1368 			val, err := decoder.Value()
   1369 			if err != nil {
   1370 				return err
   1371 			}
   1372 			if val == nil {
   1373 				break
   1374 			}
   1375 			{
   1376 				xtv := string(val)
   1377 				sv.AccessKeyId = ptr.String(xtv)
   1378 			}
   1379 
   1380 		case strings.EqualFold("Expiration", t.Name.Local):
   1381 			val, err := decoder.Value()
   1382 			if err != nil {
   1383 				return err
   1384 			}
   1385 			if val == nil {
   1386 				break
   1387 			}
   1388 			{
   1389 				xtv := string(val)
   1390 				t, err := smithytime.ParseDateTime(xtv)
   1391 				if err != nil {
   1392 					return err
   1393 				}
   1394 				sv.Expiration = ptr.Time(t)
   1395 			}
   1396 
   1397 		case strings.EqualFold("SecretAccessKey", t.Name.Local):
   1398 			val, err := decoder.Value()
   1399 			if err != nil {
   1400 				return err
   1401 			}
   1402 			if val == nil {
   1403 				break
   1404 			}
   1405 			{
   1406 				xtv := string(val)
   1407 				sv.SecretAccessKey = ptr.String(xtv)
   1408 			}
   1409 
   1410 		case strings.EqualFold("SessionToken", t.Name.Local):
   1411 			val, err := decoder.Value()
   1412 			if err != nil {
   1413 				return err
   1414 			}
   1415 			if val == nil {
   1416 				break
   1417 			}
   1418 			{
   1419 				xtv := string(val)
   1420 				sv.SessionToken = ptr.String(xtv)
   1421 			}
   1422 
   1423 		default:
   1424 			// Do nothing and ignore the unexpected tag element
   1425 			err = decoder.Decoder.Skip()
   1426 			if err != nil {
   1427 				return err
   1428 			}
   1429 
   1430 		}
   1431 		decoder = originalDecoder
   1432 	}
   1433 	*v = sv
   1434 	return nil
   1435 }
   1436 
   1437 func awsAwsquery_deserializeDocumentExpiredTokenException(v **types.ExpiredTokenException, decoder smithyxml.NodeDecoder) error {
   1438 	if v == nil {
   1439 		return fmt.Errorf("unexpected nil of type %T", v)
   1440 	}
   1441 	var sv *types.ExpiredTokenException
   1442 	if *v == nil {
   1443 		sv = &types.ExpiredTokenException{}
   1444 	} else {
   1445 		sv = *v
   1446 	}
   1447 
   1448 	for {
   1449 		t, done, err := decoder.Token()
   1450 		if err != nil {
   1451 			return err
   1452 		}
   1453 		if done {
   1454 			break
   1455 		}
   1456 		originalDecoder := decoder
   1457 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1458 		switch {
   1459 		case strings.EqualFold("message", t.Name.Local):
   1460 			val, err := decoder.Value()
   1461 			if err != nil {
   1462 				return err
   1463 			}
   1464 			if val == nil {
   1465 				break
   1466 			}
   1467 			{
   1468 				xtv := string(val)
   1469 				sv.Message = ptr.String(xtv)
   1470 			}
   1471 
   1472 		default:
   1473 			// Do nothing and ignore the unexpected tag element
   1474 			err = decoder.Decoder.Skip()
   1475 			if err != nil {
   1476 				return err
   1477 			}
   1478 
   1479 		}
   1480 		decoder = originalDecoder
   1481 	}
   1482 	*v = sv
   1483 	return nil
   1484 }
   1485 
   1486 func awsAwsquery_deserializeDocumentFederatedUser(v **types.FederatedUser, decoder smithyxml.NodeDecoder) error {
   1487 	if v == nil {
   1488 		return fmt.Errorf("unexpected nil of type %T", v)
   1489 	}
   1490 	var sv *types.FederatedUser
   1491 	if *v == nil {
   1492 		sv = &types.FederatedUser{}
   1493 	} else {
   1494 		sv = *v
   1495 	}
   1496 
   1497 	for {
   1498 		t, done, err := decoder.Token()
   1499 		if err != nil {
   1500 			return err
   1501 		}
   1502 		if done {
   1503 			break
   1504 		}
   1505 		originalDecoder := decoder
   1506 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1507 		switch {
   1508 		case strings.EqualFold("Arn", t.Name.Local):
   1509 			val, err := decoder.Value()
   1510 			if err != nil {
   1511 				return err
   1512 			}
   1513 			if val == nil {
   1514 				break
   1515 			}
   1516 			{
   1517 				xtv := string(val)
   1518 				sv.Arn = ptr.String(xtv)
   1519 			}
   1520 
   1521 		case strings.EqualFold("FederatedUserId", t.Name.Local):
   1522 			val, err := decoder.Value()
   1523 			if err != nil {
   1524 				return err
   1525 			}
   1526 			if val == nil {
   1527 				break
   1528 			}
   1529 			{
   1530 				xtv := string(val)
   1531 				sv.FederatedUserId = ptr.String(xtv)
   1532 			}
   1533 
   1534 		default:
   1535 			// Do nothing and ignore the unexpected tag element
   1536 			err = decoder.Decoder.Skip()
   1537 			if err != nil {
   1538 				return err
   1539 			}
   1540 
   1541 		}
   1542 		decoder = originalDecoder
   1543 	}
   1544 	*v = sv
   1545 	return nil
   1546 }
   1547 
   1548 func awsAwsquery_deserializeDocumentIDPCommunicationErrorException(v **types.IDPCommunicationErrorException, decoder smithyxml.NodeDecoder) error {
   1549 	if v == nil {
   1550 		return fmt.Errorf("unexpected nil of type %T", v)
   1551 	}
   1552 	var sv *types.IDPCommunicationErrorException
   1553 	if *v == nil {
   1554 		sv = &types.IDPCommunicationErrorException{}
   1555 	} else {
   1556 		sv = *v
   1557 	}
   1558 
   1559 	for {
   1560 		t, done, err := decoder.Token()
   1561 		if err != nil {
   1562 			return err
   1563 		}
   1564 		if done {
   1565 			break
   1566 		}
   1567 		originalDecoder := decoder
   1568 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1569 		switch {
   1570 		case strings.EqualFold("message", t.Name.Local):
   1571 			val, err := decoder.Value()
   1572 			if err != nil {
   1573 				return err
   1574 			}
   1575 			if val == nil {
   1576 				break
   1577 			}
   1578 			{
   1579 				xtv := string(val)
   1580 				sv.Message = ptr.String(xtv)
   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 func awsAwsquery_deserializeDocumentIDPRejectedClaimException(v **types.IDPRejectedClaimException, decoder smithyxml.NodeDecoder) error {
   1598 	if v == nil {
   1599 		return fmt.Errorf("unexpected nil of type %T", v)
   1600 	}
   1601 	var sv *types.IDPRejectedClaimException
   1602 	if *v == nil {
   1603 		sv = &types.IDPRejectedClaimException{}
   1604 	} else {
   1605 		sv = *v
   1606 	}
   1607 
   1608 	for {
   1609 		t, done, err := decoder.Token()
   1610 		if err != nil {
   1611 			return err
   1612 		}
   1613 		if done {
   1614 			break
   1615 		}
   1616 		originalDecoder := decoder
   1617 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1618 		switch {
   1619 		case strings.EqualFold("message", t.Name.Local):
   1620 			val, err := decoder.Value()
   1621 			if err != nil {
   1622 				return err
   1623 			}
   1624 			if val == nil {
   1625 				break
   1626 			}
   1627 			{
   1628 				xtv := string(val)
   1629 				sv.Message = ptr.String(xtv)
   1630 			}
   1631 
   1632 		default:
   1633 			// Do nothing and ignore the unexpected tag element
   1634 			err = decoder.Decoder.Skip()
   1635 			if err != nil {
   1636 				return err
   1637 			}
   1638 
   1639 		}
   1640 		decoder = originalDecoder
   1641 	}
   1642 	*v = sv
   1643 	return nil
   1644 }
   1645 
   1646 func awsAwsquery_deserializeDocumentInvalidAuthorizationMessageException(v **types.InvalidAuthorizationMessageException, decoder smithyxml.NodeDecoder) error {
   1647 	if v == nil {
   1648 		return fmt.Errorf("unexpected nil of type %T", v)
   1649 	}
   1650 	var sv *types.InvalidAuthorizationMessageException
   1651 	if *v == nil {
   1652 		sv = &types.InvalidAuthorizationMessageException{}
   1653 	} else {
   1654 		sv = *v
   1655 	}
   1656 
   1657 	for {
   1658 		t, done, err := decoder.Token()
   1659 		if err != nil {
   1660 			return err
   1661 		}
   1662 		if done {
   1663 			break
   1664 		}
   1665 		originalDecoder := decoder
   1666 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1667 		switch {
   1668 		case strings.EqualFold("message", t.Name.Local):
   1669 			val, err := decoder.Value()
   1670 			if err != nil {
   1671 				return err
   1672 			}
   1673 			if val == nil {
   1674 				break
   1675 			}
   1676 			{
   1677 				xtv := string(val)
   1678 				sv.Message = ptr.String(xtv)
   1679 			}
   1680 
   1681 		default:
   1682 			// Do nothing and ignore the unexpected tag element
   1683 			err = decoder.Decoder.Skip()
   1684 			if err != nil {
   1685 				return err
   1686 			}
   1687 
   1688 		}
   1689 		decoder = originalDecoder
   1690 	}
   1691 	*v = sv
   1692 	return nil
   1693 }
   1694 
   1695 func awsAwsquery_deserializeDocumentInvalidIdentityTokenException(v **types.InvalidIdentityTokenException, decoder smithyxml.NodeDecoder) error {
   1696 	if v == nil {
   1697 		return fmt.Errorf("unexpected nil of type %T", v)
   1698 	}
   1699 	var sv *types.InvalidIdentityTokenException
   1700 	if *v == nil {
   1701 		sv = &types.InvalidIdentityTokenException{}
   1702 	} else {
   1703 		sv = *v
   1704 	}
   1705 
   1706 	for {
   1707 		t, done, err := decoder.Token()
   1708 		if err != nil {
   1709 			return err
   1710 		}
   1711 		if done {
   1712 			break
   1713 		}
   1714 		originalDecoder := decoder
   1715 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1716 		switch {
   1717 		case strings.EqualFold("message", t.Name.Local):
   1718 			val, err := decoder.Value()
   1719 			if err != nil {
   1720 				return err
   1721 			}
   1722 			if val == nil {
   1723 				break
   1724 			}
   1725 			{
   1726 				xtv := string(val)
   1727 				sv.Message = ptr.String(xtv)
   1728 			}
   1729 
   1730 		default:
   1731 			// Do nothing and ignore the unexpected tag element
   1732 			err = decoder.Decoder.Skip()
   1733 			if err != nil {
   1734 				return err
   1735 			}
   1736 
   1737 		}
   1738 		decoder = originalDecoder
   1739 	}
   1740 	*v = sv
   1741 	return nil
   1742 }
   1743 
   1744 func awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(v **types.MalformedPolicyDocumentException, decoder smithyxml.NodeDecoder) error {
   1745 	if v == nil {
   1746 		return fmt.Errorf("unexpected nil of type %T", v)
   1747 	}
   1748 	var sv *types.MalformedPolicyDocumentException
   1749 	if *v == nil {
   1750 		sv = &types.MalformedPolicyDocumentException{}
   1751 	} else {
   1752 		sv = *v
   1753 	}
   1754 
   1755 	for {
   1756 		t, done, err := decoder.Token()
   1757 		if err != nil {
   1758 			return err
   1759 		}
   1760 		if done {
   1761 			break
   1762 		}
   1763 		originalDecoder := decoder
   1764 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1765 		switch {
   1766 		case strings.EqualFold("message", t.Name.Local):
   1767 			val, err := decoder.Value()
   1768 			if err != nil {
   1769 				return err
   1770 			}
   1771 			if val == nil {
   1772 				break
   1773 			}
   1774 			{
   1775 				xtv := string(val)
   1776 				sv.Message = ptr.String(xtv)
   1777 			}
   1778 
   1779 		default:
   1780 			// Do nothing and ignore the unexpected tag element
   1781 			err = decoder.Decoder.Skip()
   1782 			if err != nil {
   1783 				return err
   1784 			}
   1785 
   1786 		}
   1787 		decoder = originalDecoder
   1788 	}
   1789 	*v = sv
   1790 	return nil
   1791 }
   1792 
   1793 func awsAwsquery_deserializeDocumentPackedPolicyTooLargeException(v **types.PackedPolicyTooLargeException, decoder smithyxml.NodeDecoder) error {
   1794 	if v == nil {
   1795 		return fmt.Errorf("unexpected nil of type %T", v)
   1796 	}
   1797 	var sv *types.PackedPolicyTooLargeException
   1798 	if *v == nil {
   1799 		sv = &types.PackedPolicyTooLargeException{}
   1800 	} else {
   1801 		sv = *v
   1802 	}
   1803 
   1804 	for {
   1805 		t, done, err := decoder.Token()
   1806 		if err != nil {
   1807 			return err
   1808 		}
   1809 		if done {
   1810 			break
   1811 		}
   1812 		originalDecoder := decoder
   1813 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1814 		switch {
   1815 		case strings.EqualFold("message", t.Name.Local):
   1816 			val, err := decoder.Value()
   1817 			if err != nil {
   1818 				return err
   1819 			}
   1820 			if val == nil {
   1821 				break
   1822 			}
   1823 			{
   1824 				xtv := string(val)
   1825 				sv.Message = ptr.String(xtv)
   1826 			}
   1827 
   1828 		default:
   1829 			// Do nothing and ignore the unexpected tag element
   1830 			err = decoder.Decoder.Skip()
   1831 			if err != nil {
   1832 				return err
   1833 			}
   1834 
   1835 		}
   1836 		decoder = originalDecoder
   1837 	}
   1838 	*v = sv
   1839 	return nil
   1840 }
   1841 
   1842 func awsAwsquery_deserializeDocumentRegionDisabledException(v **types.RegionDisabledException, decoder smithyxml.NodeDecoder) error {
   1843 	if v == nil {
   1844 		return fmt.Errorf("unexpected nil of type %T", v)
   1845 	}
   1846 	var sv *types.RegionDisabledException
   1847 	if *v == nil {
   1848 		sv = &types.RegionDisabledException{}
   1849 	} else {
   1850 		sv = *v
   1851 	}
   1852 
   1853 	for {
   1854 		t, done, err := decoder.Token()
   1855 		if err != nil {
   1856 			return err
   1857 		}
   1858 		if done {
   1859 			break
   1860 		}
   1861 		originalDecoder := decoder
   1862 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1863 		switch {
   1864 		case strings.EqualFold("message", t.Name.Local):
   1865 			val, err := decoder.Value()
   1866 			if err != nil {
   1867 				return err
   1868 			}
   1869 			if val == nil {
   1870 				break
   1871 			}
   1872 			{
   1873 				xtv := string(val)
   1874 				sv.Message = ptr.String(xtv)
   1875 			}
   1876 
   1877 		default:
   1878 			// Do nothing and ignore the unexpected tag element
   1879 			err = decoder.Decoder.Skip()
   1880 			if err != nil {
   1881 				return err
   1882 			}
   1883 
   1884 		}
   1885 		decoder = originalDecoder
   1886 	}
   1887 	*v = sv
   1888 	return nil
   1889 }
   1890 
   1891 func awsAwsquery_deserializeOpDocumentAssumeRoleOutput(v **AssumeRoleOutput, decoder smithyxml.NodeDecoder) error {
   1892 	if v == nil {
   1893 		return fmt.Errorf("unexpected nil of type %T", v)
   1894 	}
   1895 	var sv *AssumeRoleOutput
   1896 	if *v == nil {
   1897 		sv = &AssumeRoleOutput{}
   1898 	} else {
   1899 		sv = *v
   1900 	}
   1901 
   1902 	for {
   1903 		t, done, err := decoder.Token()
   1904 		if err != nil {
   1905 			return err
   1906 		}
   1907 		if done {
   1908 			break
   1909 		}
   1910 		originalDecoder := decoder
   1911 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1912 		switch {
   1913 		case strings.EqualFold("AssumedRoleUser", t.Name.Local):
   1914 			nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   1915 			if err := awsAwsquery_deserializeDocumentAssumedRoleUser(&sv.AssumedRoleUser, nodeDecoder); err != nil {
   1916 				return err
   1917 			}
   1918 
   1919 		case strings.EqualFold("Credentials", t.Name.Local):
   1920 			nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   1921 			if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil {
   1922 				return err
   1923 			}
   1924 
   1925 		case strings.EqualFold("PackedPolicySize", t.Name.Local):
   1926 			val, err := decoder.Value()
   1927 			if err != nil {
   1928 				return err
   1929 			}
   1930 			if val == nil {
   1931 				break
   1932 			}
   1933 			{
   1934 				xtv := string(val)
   1935 				i64, err := strconv.ParseInt(xtv, 10, 64)
   1936 				if err != nil {
   1937 					return err
   1938 				}
   1939 				sv.PackedPolicySize = ptr.Int32(int32(i64))
   1940 			}
   1941 
   1942 		case strings.EqualFold("SourceIdentity", t.Name.Local):
   1943 			val, err := decoder.Value()
   1944 			if err != nil {
   1945 				return err
   1946 			}
   1947 			if val == nil {
   1948 				break
   1949 			}
   1950 			{
   1951 				xtv := string(val)
   1952 				sv.SourceIdentity = ptr.String(xtv)
   1953 			}
   1954 
   1955 		default:
   1956 			// Do nothing and ignore the unexpected tag element
   1957 			err = decoder.Decoder.Skip()
   1958 			if err != nil {
   1959 				return err
   1960 			}
   1961 
   1962 		}
   1963 		decoder = originalDecoder
   1964 	}
   1965 	*v = sv
   1966 	return nil
   1967 }
   1968 
   1969 func awsAwsquery_deserializeOpDocumentAssumeRoleWithSAMLOutput(v **AssumeRoleWithSAMLOutput, decoder smithyxml.NodeDecoder) error {
   1970 	if v == nil {
   1971 		return fmt.Errorf("unexpected nil of type %T", v)
   1972 	}
   1973 	var sv *AssumeRoleWithSAMLOutput
   1974 	if *v == nil {
   1975 		sv = &AssumeRoleWithSAMLOutput{}
   1976 	} else {
   1977 		sv = *v
   1978 	}
   1979 
   1980 	for {
   1981 		t, done, err := decoder.Token()
   1982 		if err != nil {
   1983 			return err
   1984 		}
   1985 		if done {
   1986 			break
   1987 		}
   1988 		originalDecoder := decoder
   1989 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   1990 		switch {
   1991 		case strings.EqualFold("AssumedRoleUser", t.Name.Local):
   1992 			nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   1993 			if err := awsAwsquery_deserializeDocumentAssumedRoleUser(&sv.AssumedRoleUser, nodeDecoder); err != nil {
   1994 				return err
   1995 			}
   1996 
   1997 		case strings.EqualFold("Audience", t.Name.Local):
   1998 			val, err := decoder.Value()
   1999 			if err != nil {
   2000 				return err
   2001 			}
   2002 			if val == nil {
   2003 				break
   2004 			}
   2005 			{
   2006 				xtv := string(val)
   2007 				sv.Audience = ptr.String(xtv)
   2008 			}
   2009 
   2010 		case strings.EqualFold("Credentials", t.Name.Local):
   2011 			nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   2012 			if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil {
   2013 				return err
   2014 			}
   2015 
   2016 		case strings.EqualFold("Issuer", t.Name.Local):
   2017 			val, err := decoder.Value()
   2018 			if err != nil {
   2019 				return err
   2020 			}
   2021 			if val == nil {
   2022 				break
   2023 			}
   2024 			{
   2025 				xtv := string(val)
   2026 				sv.Issuer = ptr.String(xtv)
   2027 			}
   2028 
   2029 		case strings.EqualFold("NameQualifier", t.Name.Local):
   2030 			val, err := decoder.Value()
   2031 			if err != nil {
   2032 				return err
   2033 			}
   2034 			if val == nil {
   2035 				break
   2036 			}
   2037 			{
   2038 				xtv := string(val)
   2039 				sv.NameQualifier = ptr.String(xtv)
   2040 			}
   2041 
   2042 		case strings.EqualFold("PackedPolicySize", t.Name.Local):
   2043 			val, err := decoder.Value()
   2044 			if err != nil {
   2045 				return err
   2046 			}
   2047 			if val == nil {
   2048 				break
   2049 			}
   2050 			{
   2051 				xtv := string(val)
   2052 				i64, err := strconv.ParseInt(xtv, 10, 64)
   2053 				if err != nil {
   2054 					return err
   2055 				}
   2056 				sv.PackedPolicySize = ptr.Int32(int32(i64))
   2057 			}
   2058 
   2059 		case strings.EqualFold("SourceIdentity", t.Name.Local):
   2060 			val, err := decoder.Value()
   2061 			if err != nil {
   2062 				return err
   2063 			}
   2064 			if val == nil {
   2065 				break
   2066 			}
   2067 			{
   2068 				xtv := string(val)
   2069 				sv.SourceIdentity = ptr.String(xtv)
   2070 			}
   2071 
   2072 		case strings.EqualFold("Subject", t.Name.Local):
   2073 			val, err := decoder.Value()
   2074 			if err != nil {
   2075 				return err
   2076 			}
   2077 			if val == nil {
   2078 				break
   2079 			}
   2080 			{
   2081 				xtv := string(val)
   2082 				sv.Subject = ptr.String(xtv)
   2083 			}
   2084 
   2085 		case strings.EqualFold("SubjectType", t.Name.Local):
   2086 			val, err := decoder.Value()
   2087 			if err != nil {
   2088 				return err
   2089 			}
   2090 			if val == nil {
   2091 				break
   2092 			}
   2093 			{
   2094 				xtv := string(val)
   2095 				sv.SubjectType = ptr.String(xtv)
   2096 			}
   2097 
   2098 		default:
   2099 			// Do nothing and ignore the unexpected tag element
   2100 			err = decoder.Decoder.Skip()
   2101 			if err != nil {
   2102 				return err
   2103 			}
   2104 
   2105 		}
   2106 		decoder = originalDecoder
   2107 	}
   2108 	*v = sv
   2109 	return nil
   2110 }
   2111 
   2112 func awsAwsquery_deserializeOpDocumentAssumeRoleWithWebIdentityOutput(v **AssumeRoleWithWebIdentityOutput, decoder smithyxml.NodeDecoder) error {
   2113 	if v == nil {
   2114 		return fmt.Errorf("unexpected nil of type %T", v)
   2115 	}
   2116 	var sv *AssumeRoleWithWebIdentityOutput
   2117 	if *v == nil {
   2118 		sv = &AssumeRoleWithWebIdentityOutput{}
   2119 	} else {
   2120 		sv = *v
   2121 	}
   2122 
   2123 	for {
   2124 		t, done, err := decoder.Token()
   2125 		if err != nil {
   2126 			return err
   2127 		}
   2128 		if done {
   2129 			break
   2130 		}
   2131 		originalDecoder := decoder
   2132 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   2133 		switch {
   2134 		case strings.EqualFold("AssumedRoleUser", t.Name.Local):
   2135 			nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   2136 			if err := awsAwsquery_deserializeDocumentAssumedRoleUser(&sv.AssumedRoleUser, nodeDecoder); err != nil {
   2137 				return err
   2138 			}
   2139 
   2140 		case strings.EqualFold("Audience", t.Name.Local):
   2141 			val, err := decoder.Value()
   2142 			if err != nil {
   2143 				return err
   2144 			}
   2145 			if val == nil {
   2146 				break
   2147 			}
   2148 			{
   2149 				xtv := string(val)
   2150 				sv.Audience = ptr.String(xtv)
   2151 			}
   2152 
   2153 		case strings.EqualFold("Credentials", t.Name.Local):
   2154 			nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   2155 			if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil {
   2156 				return err
   2157 			}
   2158 
   2159 		case strings.EqualFold("PackedPolicySize", t.Name.Local):
   2160 			val, err := decoder.Value()
   2161 			if err != nil {
   2162 				return err
   2163 			}
   2164 			if val == nil {
   2165 				break
   2166 			}
   2167 			{
   2168 				xtv := string(val)
   2169 				i64, err := strconv.ParseInt(xtv, 10, 64)
   2170 				if err != nil {
   2171 					return err
   2172 				}
   2173 				sv.PackedPolicySize = ptr.Int32(int32(i64))
   2174 			}
   2175 
   2176 		case strings.EqualFold("Provider", t.Name.Local):
   2177 			val, err := decoder.Value()
   2178 			if err != nil {
   2179 				return err
   2180 			}
   2181 			if val == nil {
   2182 				break
   2183 			}
   2184 			{
   2185 				xtv := string(val)
   2186 				sv.Provider = ptr.String(xtv)
   2187 			}
   2188 
   2189 		case strings.EqualFold("SourceIdentity", t.Name.Local):
   2190 			val, err := decoder.Value()
   2191 			if err != nil {
   2192 				return err
   2193 			}
   2194 			if val == nil {
   2195 				break
   2196 			}
   2197 			{
   2198 				xtv := string(val)
   2199 				sv.SourceIdentity = ptr.String(xtv)
   2200 			}
   2201 
   2202 		case strings.EqualFold("SubjectFromWebIdentityToken", t.Name.Local):
   2203 			val, err := decoder.Value()
   2204 			if err != nil {
   2205 				return err
   2206 			}
   2207 			if val == nil {
   2208 				break
   2209 			}
   2210 			{
   2211 				xtv := string(val)
   2212 				sv.SubjectFromWebIdentityToken = ptr.String(xtv)
   2213 			}
   2214 
   2215 		default:
   2216 			// Do nothing and ignore the unexpected tag element
   2217 			err = decoder.Decoder.Skip()
   2218 			if err != nil {
   2219 				return err
   2220 			}
   2221 
   2222 		}
   2223 		decoder = originalDecoder
   2224 	}
   2225 	*v = sv
   2226 	return nil
   2227 }
   2228 
   2229 func awsAwsquery_deserializeOpDocumentDecodeAuthorizationMessageOutput(v **DecodeAuthorizationMessageOutput, decoder smithyxml.NodeDecoder) error {
   2230 	if v == nil {
   2231 		return fmt.Errorf("unexpected nil of type %T", v)
   2232 	}
   2233 	var sv *DecodeAuthorizationMessageOutput
   2234 	if *v == nil {
   2235 		sv = &DecodeAuthorizationMessageOutput{}
   2236 	} else {
   2237 		sv = *v
   2238 	}
   2239 
   2240 	for {
   2241 		t, done, err := decoder.Token()
   2242 		if err != nil {
   2243 			return err
   2244 		}
   2245 		if done {
   2246 			break
   2247 		}
   2248 		originalDecoder := decoder
   2249 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   2250 		switch {
   2251 		case strings.EqualFold("DecodedMessage", t.Name.Local):
   2252 			val, err := decoder.Value()
   2253 			if err != nil {
   2254 				return err
   2255 			}
   2256 			if val == nil {
   2257 				break
   2258 			}
   2259 			{
   2260 				xtv := string(val)
   2261 				sv.DecodedMessage = ptr.String(xtv)
   2262 			}
   2263 
   2264 		default:
   2265 			// Do nothing and ignore the unexpected tag element
   2266 			err = decoder.Decoder.Skip()
   2267 			if err != nil {
   2268 				return err
   2269 			}
   2270 
   2271 		}
   2272 		decoder = originalDecoder
   2273 	}
   2274 	*v = sv
   2275 	return nil
   2276 }
   2277 
   2278 func awsAwsquery_deserializeOpDocumentGetAccessKeyInfoOutput(v **GetAccessKeyInfoOutput, decoder smithyxml.NodeDecoder) error {
   2279 	if v == nil {
   2280 		return fmt.Errorf("unexpected nil of type %T", v)
   2281 	}
   2282 	var sv *GetAccessKeyInfoOutput
   2283 	if *v == nil {
   2284 		sv = &GetAccessKeyInfoOutput{}
   2285 	} else {
   2286 		sv = *v
   2287 	}
   2288 
   2289 	for {
   2290 		t, done, err := decoder.Token()
   2291 		if err != nil {
   2292 			return err
   2293 		}
   2294 		if done {
   2295 			break
   2296 		}
   2297 		originalDecoder := decoder
   2298 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   2299 		switch {
   2300 		case strings.EqualFold("Account", t.Name.Local):
   2301 			val, err := decoder.Value()
   2302 			if err != nil {
   2303 				return err
   2304 			}
   2305 			if val == nil {
   2306 				break
   2307 			}
   2308 			{
   2309 				xtv := string(val)
   2310 				sv.Account = ptr.String(xtv)
   2311 			}
   2312 
   2313 		default:
   2314 			// Do nothing and ignore the unexpected tag element
   2315 			err = decoder.Decoder.Skip()
   2316 			if err != nil {
   2317 				return err
   2318 			}
   2319 
   2320 		}
   2321 		decoder = originalDecoder
   2322 	}
   2323 	*v = sv
   2324 	return nil
   2325 }
   2326 
   2327 func awsAwsquery_deserializeOpDocumentGetCallerIdentityOutput(v **GetCallerIdentityOutput, decoder smithyxml.NodeDecoder) error {
   2328 	if v == nil {
   2329 		return fmt.Errorf("unexpected nil of type %T", v)
   2330 	}
   2331 	var sv *GetCallerIdentityOutput
   2332 	if *v == nil {
   2333 		sv = &GetCallerIdentityOutput{}
   2334 	} else {
   2335 		sv = *v
   2336 	}
   2337 
   2338 	for {
   2339 		t, done, err := decoder.Token()
   2340 		if err != nil {
   2341 			return err
   2342 		}
   2343 		if done {
   2344 			break
   2345 		}
   2346 		originalDecoder := decoder
   2347 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   2348 		switch {
   2349 		case strings.EqualFold("Account", t.Name.Local):
   2350 			val, err := decoder.Value()
   2351 			if err != nil {
   2352 				return err
   2353 			}
   2354 			if val == nil {
   2355 				break
   2356 			}
   2357 			{
   2358 				xtv := string(val)
   2359 				sv.Account = ptr.String(xtv)
   2360 			}
   2361 
   2362 		case strings.EqualFold("Arn", t.Name.Local):
   2363 			val, err := decoder.Value()
   2364 			if err != nil {
   2365 				return err
   2366 			}
   2367 			if val == nil {
   2368 				break
   2369 			}
   2370 			{
   2371 				xtv := string(val)
   2372 				sv.Arn = ptr.String(xtv)
   2373 			}
   2374 
   2375 		case strings.EqualFold("UserId", t.Name.Local):
   2376 			val, err := decoder.Value()
   2377 			if err != nil {
   2378 				return err
   2379 			}
   2380 			if val == nil {
   2381 				break
   2382 			}
   2383 			{
   2384 				xtv := string(val)
   2385 				sv.UserId = ptr.String(xtv)
   2386 			}
   2387 
   2388 		default:
   2389 			// Do nothing and ignore the unexpected tag element
   2390 			err = decoder.Decoder.Skip()
   2391 			if err != nil {
   2392 				return err
   2393 			}
   2394 
   2395 		}
   2396 		decoder = originalDecoder
   2397 	}
   2398 	*v = sv
   2399 	return nil
   2400 }
   2401 
   2402 func awsAwsquery_deserializeOpDocumentGetFederationTokenOutput(v **GetFederationTokenOutput, decoder smithyxml.NodeDecoder) error {
   2403 	if v == nil {
   2404 		return fmt.Errorf("unexpected nil of type %T", v)
   2405 	}
   2406 	var sv *GetFederationTokenOutput
   2407 	if *v == nil {
   2408 		sv = &GetFederationTokenOutput{}
   2409 	} else {
   2410 		sv = *v
   2411 	}
   2412 
   2413 	for {
   2414 		t, done, err := decoder.Token()
   2415 		if err != nil {
   2416 			return err
   2417 		}
   2418 		if done {
   2419 			break
   2420 		}
   2421 		originalDecoder := decoder
   2422 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   2423 		switch {
   2424 		case strings.EqualFold("Credentials", t.Name.Local):
   2425 			nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   2426 			if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil {
   2427 				return err
   2428 			}
   2429 
   2430 		case strings.EqualFold("FederatedUser", t.Name.Local):
   2431 			nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   2432 			if err := awsAwsquery_deserializeDocumentFederatedUser(&sv.FederatedUser, nodeDecoder); err != nil {
   2433 				return err
   2434 			}
   2435 
   2436 		case strings.EqualFold("PackedPolicySize", t.Name.Local):
   2437 			val, err := decoder.Value()
   2438 			if err != nil {
   2439 				return err
   2440 			}
   2441 			if val == nil {
   2442 				break
   2443 			}
   2444 			{
   2445 				xtv := string(val)
   2446 				i64, err := strconv.ParseInt(xtv, 10, 64)
   2447 				if err != nil {
   2448 					return err
   2449 				}
   2450 				sv.PackedPolicySize = ptr.Int32(int32(i64))
   2451 			}
   2452 
   2453 		default:
   2454 			// Do nothing and ignore the unexpected tag element
   2455 			err = decoder.Decoder.Skip()
   2456 			if err != nil {
   2457 				return err
   2458 			}
   2459 
   2460 		}
   2461 		decoder = originalDecoder
   2462 	}
   2463 	*v = sv
   2464 	return nil
   2465 }
   2466 
   2467 func awsAwsquery_deserializeOpDocumentGetSessionTokenOutput(v **GetSessionTokenOutput, decoder smithyxml.NodeDecoder) error {
   2468 	if v == nil {
   2469 		return fmt.Errorf("unexpected nil of type %T", v)
   2470 	}
   2471 	var sv *GetSessionTokenOutput
   2472 	if *v == nil {
   2473 		sv = &GetSessionTokenOutput{}
   2474 	} else {
   2475 		sv = *v
   2476 	}
   2477 
   2478 	for {
   2479 		t, done, err := decoder.Token()
   2480 		if err != nil {
   2481 			return err
   2482 		}
   2483 		if done {
   2484 			break
   2485 		}
   2486 		originalDecoder := decoder
   2487 		decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t)
   2488 		switch {
   2489 		case strings.EqualFold("Credentials", t.Name.Local):
   2490 			nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t)
   2491 			if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil {
   2492 				return err
   2493 			}
   2494 
   2495 		default:
   2496 			// Do nothing and ignore the unexpected tag element
   2497 			err = decoder.Decoder.Skip()
   2498 			if err != nil {
   2499 				return err
   2500 			}
   2501 
   2502 		}
   2503 		decoder = originalDecoder
   2504 	}
   2505 	*v = sv
   2506 	return nil
   2507 }