serializers.go (25964B)
1 // Code generated by smithy-go-codegen DO NOT EDIT. 2 3 package sts 4 5 import ( 6 "bytes" 7 "context" 8 "fmt" 9 "github.com/aws/aws-sdk-go-v2/aws/protocol/query" 10 "github.com/aws/aws-sdk-go-v2/service/sts/types" 11 smithy "github.com/aws/smithy-go" 12 "github.com/aws/smithy-go/encoding/httpbinding" 13 "github.com/aws/smithy-go/middleware" 14 smithyhttp "github.com/aws/smithy-go/transport/http" 15 "path" 16 ) 17 18 type awsAwsquery_serializeOpAssumeRole struct { 19 } 20 21 func (*awsAwsquery_serializeOpAssumeRole) ID() string { 22 return "OperationSerializer" 23 } 24 25 func (m *awsAwsquery_serializeOpAssumeRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 26 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 27 ) { 28 request, ok := in.Request.(*smithyhttp.Request) 29 if !ok { 30 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 31 } 32 33 input, ok := in.Parameters.(*AssumeRoleInput) 34 _ = input 35 if !ok { 36 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 37 } 38 39 operationPath := "/" 40 if len(request.Request.URL.Path) == 0 { 41 request.Request.URL.Path = operationPath 42 } else { 43 request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) 44 if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { 45 request.Request.URL.Path += "/" 46 } 47 } 48 request.Request.Method = "POST" 49 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 50 if err != nil { 51 return out, metadata, &smithy.SerializationError{Err: err} 52 } 53 httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") 54 55 bodyWriter := bytes.NewBuffer(nil) 56 bodyEncoder := query.NewEncoder(bodyWriter) 57 body := bodyEncoder.Object() 58 body.Key("Action").String("AssumeRole") 59 body.Key("Version").String("2011-06-15") 60 61 if err := awsAwsquery_serializeOpDocumentAssumeRoleInput(input, bodyEncoder.Value); err != nil { 62 return out, metadata, &smithy.SerializationError{Err: err} 63 } 64 65 err = bodyEncoder.Encode() 66 if err != nil { 67 return out, metadata, &smithy.SerializationError{Err: err} 68 } 69 70 if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { 71 return out, metadata, &smithy.SerializationError{Err: err} 72 } 73 74 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 75 return out, metadata, &smithy.SerializationError{Err: err} 76 } 77 in.Request = request 78 79 return next.HandleSerialize(ctx, in) 80 } 81 82 type awsAwsquery_serializeOpAssumeRoleWithSAML struct { 83 } 84 85 func (*awsAwsquery_serializeOpAssumeRoleWithSAML) ID() string { 86 return "OperationSerializer" 87 } 88 89 func (m *awsAwsquery_serializeOpAssumeRoleWithSAML) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 90 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 91 ) { 92 request, ok := in.Request.(*smithyhttp.Request) 93 if !ok { 94 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 95 } 96 97 input, ok := in.Parameters.(*AssumeRoleWithSAMLInput) 98 _ = input 99 if !ok { 100 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 101 } 102 103 operationPath := "/" 104 if len(request.Request.URL.Path) == 0 { 105 request.Request.URL.Path = operationPath 106 } else { 107 request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) 108 if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { 109 request.Request.URL.Path += "/" 110 } 111 } 112 request.Request.Method = "POST" 113 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 114 if err != nil { 115 return out, metadata, &smithy.SerializationError{Err: err} 116 } 117 httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") 118 119 bodyWriter := bytes.NewBuffer(nil) 120 bodyEncoder := query.NewEncoder(bodyWriter) 121 body := bodyEncoder.Object() 122 body.Key("Action").String("AssumeRoleWithSAML") 123 body.Key("Version").String("2011-06-15") 124 125 if err := awsAwsquery_serializeOpDocumentAssumeRoleWithSAMLInput(input, bodyEncoder.Value); err != nil { 126 return out, metadata, &smithy.SerializationError{Err: err} 127 } 128 129 err = bodyEncoder.Encode() 130 if err != nil { 131 return out, metadata, &smithy.SerializationError{Err: err} 132 } 133 134 if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { 135 return out, metadata, &smithy.SerializationError{Err: err} 136 } 137 138 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 139 return out, metadata, &smithy.SerializationError{Err: err} 140 } 141 in.Request = request 142 143 return next.HandleSerialize(ctx, in) 144 } 145 146 type awsAwsquery_serializeOpAssumeRoleWithWebIdentity struct { 147 } 148 149 func (*awsAwsquery_serializeOpAssumeRoleWithWebIdentity) ID() string { 150 return "OperationSerializer" 151 } 152 153 func (m *awsAwsquery_serializeOpAssumeRoleWithWebIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 154 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 155 ) { 156 request, ok := in.Request.(*smithyhttp.Request) 157 if !ok { 158 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 159 } 160 161 input, ok := in.Parameters.(*AssumeRoleWithWebIdentityInput) 162 _ = input 163 if !ok { 164 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 165 } 166 167 operationPath := "/" 168 if len(request.Request.URL.Path) == 0 { 169 request.Request.URL.Path = operationPath 170 } else { 171 request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) 172 if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { 173 request.Request.URL.Path += "/" 174 } 175 } 176 request.Request.Method = "POST" 177 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 178 if err != nil { 179 return out, metadata, &smithy.SerializationError{Err: err} 180 } 181 httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") 182 183 bodyWriter := bytes.NewBuffer(nil) 184 bodyEncoder := query.NewEncoder(bodyWriter) 185 body := bodyEncoder.Object() 186 body.Key("Action").String("AssumeRoleWithWebIdentity") 187 body.Key("Version").String("2011-06-15") 188 189 if err := awsAwsquery_serializeOpDocumentAssumeRoleWithWebIdentityInput(input, bodyEncoder.Value); err != nil { 190 return out, metadata, &smithy.SerializationError{Err: err} 191 } 192 193 err = bodyEncoder.Encode() 194 if err != nil { 195 return out, metadata, &smithy.SerializationError{Err: err} 196 } 197 198 if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { 199 return out, metadata, &smithy.SerializationError{Err: err} 200 } 201 202 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 203 return out, metadata, &smithy.SerializationError{Err: err} 204 } 205 in.Request = request 206 207 return next.HandleSerialize(ctx, in) 208 } 209 210 type awsAwsquery_serializeOpDecodeAuthorizationMessage struct { 211 } 212 213 func (*awsAwsquery_serializeOpDecodeAuthorizationMessage) ID() string { 214 return "OperationSerializer" 215 } 216 217 func (m *awsAwsquery_serializeOpDecodeAuthorizationMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 218 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 219 ) { 220 request, ok := in.Request.(*smithyhttp.Request) 221 if !ok { 222 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 223 } 224 225 input, ok := in.Parameters.(*DecodeAuthorizationMessageInput) 226 _ = input 227 if !ok { 228 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 229 } 230 231 operationPath := "/" 232 if len(request.Request.URL.Path) == 0 { 233 request.Request.URL.Path = operationPath 234 } else { 235 request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) 236 if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { 237 request.Request.URL.Path += "/" 238 } 239 } 240 request.Request.Method = "POST" 241 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 242 if err != nil { 243 return out, metadata, &smithy.SerializationError{Err: err} 244 } 245 httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") 246 247 bodyWriter := bytes.NewBuffer(nil) 248 bodyEncoder := query.NewEncoder(bodyWriter) 249 body := bodyEncoder.Object() 250 body.Key("Action").String("DecodeAuthorizationMessage") 251 body.Key("Version").String("2011-06-15") 252 253 if err := awsAwsquery_serializeOpDocumentDecodeAuthorizationMessageInput(input, bodyEncoder.Value); err != nil { 254 return out, metadata, &smithy.SerializationError{Err: err} 255 } 256 257 err = bodyEncoder.Encode() 258 if err != nil { 259 return out, metadata, &smithy.SerializationError{Err: err} 260 } 261 262 if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { 263 return out, metadata, &smithy.SerializationError{Err: err} 264 } 265 266 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 267 return out, metadata, &smithy.SerializationError{Err: err} 268 } 269 in.Request = request 270 271 return next.HandleSerialize(ctx, in) 272 } 273 274 type awsAwsquery_serializeOpGetAccessKeyInfo struct { 275 } 276 277 func (*awsAwsquery_serializeOpGetAccessKeyInfo) ID() string { 278 return "OperationSerializer" 279 } 280 281 func (m *awsAwsquery_serializeOpGetAccessKeyInfo) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 282 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 283 ) { 284 request, ok := in.Request.(*smithyhttp.Request) 285 if !ok { 286 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 287 } 288 289 input, ok := in.Parameters.(*GetAccessKeyInfoInput) 290 _ = input 291 if !ok { 292 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 293 } 294 295 operationPath := "/" 296 if len(request.Request.URL.Path) == 0 { 297 request.Request.URL.Path = operationPath 298 } else { 299 request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) 300 if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { 301 request.Request.URL.Path += "/" 302 } 303 } 304 request.Request.Method = "POST" 305 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 306 if err != nil { 307 return out, metadata, &smithy.SerializationError{Err: err} 308 } 309 httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") 310 311 bodyWriter := bytes.NewBuffer(nil) 312 bodyEncoder := query.NewEncoder(bodyWriter) 313 body := bodyEncoder.Object() 314 body.Key("Action").String("GetAccessKeyInfo") 315 body.Key("Version").String("2011-06-15") 316 317 if err := awsAwsquery_serializeOpDocumentGetAccessKeyInfoInput(input, bodyEncoder.Value); err != nil { 318 return out, metadata, &smithy.SerializationError{Err: err} 319 } 320 321 err = bodyEncoder.Encode() 322 if err != nil { 323 return out, metadata, &smithy.SerializationError{Err: err} 324 } 325 326 if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { 327 return out, metadata, &smithy.SerializationError{Err: err} 328 } 329 330 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 331 return out, metadata, &smithy.SerializationError{Err: err} 332 } 333 in.Request = request 334 335 return next.HandleSerialize(ctx, in) 336 } 337 338 type awsAwsquery_serializeOpGetCallerIdentity struct { 339 } 340 341 func (*awsAwsquery_serializeOpGetCallerIdentity) ID() string { 342 return "OperationSerializer" 343 } 344 345 func (m *awsAwsquery_serializeOpGetCallerIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 346 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 347 ) { 348 request, ok := in.Request.(*smithyhttp.Request) 349 if !ok { 350 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 351 } 352 353 input, ok := in.Parameters.(*GetCallerIdentityInput) 354 _ = input 355 if !ok { 356 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 357 } 358 359 operationPath := "/" 360 if len(request.Request.URL.Path) == 0 { 361 request.Request.URL.Path = operationPath 362 } else { 363 request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) 364 if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { 365 request.Request.URL.Path += "/" 366 } 367 } 368 request.Request.Method = "POST" 369 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 370 if err != nil { 371 return out, metadata, &smithy.SerializationError{Err: err} 372 } 373 httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") 374 375 bodyWriter := bytes.NewBuffer(nil) 376 bodyEncoder := query.NewEncoder(bodyWriter) 377 body := bodyEncoder.Object() 378 body.Key("Action").String("GetCallerIdentity") 379 body.Key("Version").String("2011-06-15") 380 381 err = bodyEncoder.Encode() 382 if err != nil { 383 return out, metadata, &smithy.SerializationError{Err: err} 384 } 385 386 if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { 387 return out, metadata, &smithy.SerializationError{Err: err} 388 } 389 390 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 391 return out, metadata, &smithy.SerializationError{Err: err} 392 } 393 in.Request = request 394 395 return next.HandleSerialize(ctx, in) 396 } 397 398 type awsAwsquery_serializeOpGetFederationToken struct { 399 } 400 401 func (*awsAwsquery_serializeOpGetFederationToken) ID() string { 402 return "OperationSerializer" 403 } 404 405 func (m *awsAwsquery_serializeOpGetFederationToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 406 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 407 ) { 408 request, ok := in.Request.(*smithyhttp.Request) 409 if !ok { 410 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 411 } 412 413 input, ok := in.Parameters.(*GetFederationTokenInput) 414 _ = input 415 if !ok { 416 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 417 } 418 419 operationPath := "/" 420 if len(request.Request.URL.Path) == 0 { 421 request.Request.URL.Path = operationPath 422 } else { 423 request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) 424 if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { 425 request.Request.URL.Path += "/" 426 } 427 } 428 request.Request.Method = "POST" 429 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 430 if err != nil { 431 return out, metadata, &smithy.SerializationError{Err: err} 432 } 433 httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") 434 435 bodyWriter := bytes.NewBuffer(nil) 436 bodyEncoder := query.NewEncoder(bodyWriter) 437 body := bodyEncoder.Object() 438 body.Key("Action").String("GetFederationToken") 439 body.Key("Version").String("2011-06-15") 440 441 if err := awsAwsquery_serializeOpDocumentGetFederationTokenInput(input, bodyEncoder.Value); err != nil { 442 return out, metadata, &smithy.SerializationError{Err: err} 443 } 444 445 err = bodyEncoder.Encode() 446 if err != nil { 447 return out, metadata, &smithy.SerializationError{Err: err} 448 } 449 450 if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { 451 return out, metadata, &smithy.SerializationError{Err: err} 452 } 453 454 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 455 return out, metadata, &smithy.SerializationError{Err: err} 456 } 457 in.Request = request 458 459 return next.HandleSerialize(ctx, in) 460 } 461 462 type awsAwsquery_serializeOpGetSessionToken struct { 463 } 464 465 func (*awsAwsquery_serializeOpGetSessionToken) ID() string { 466 return "OperationSerializer" 467 } 468 469 func (m *awsAwsquery_serializeOpGetSessionToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 470 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 471 ) { 472 request, ok := in.Request.(*smithyhttp.Request) 473 if !ok { 474 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 475 } 476 477 input, ok := in.Parameters.(*GetSessionTokenInput) 478 _ = input 479 if !ok { 480 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 481 } 482 483 operationPath := "/" 484 if len(request.Request.URL.Path) == 0 { 485 request.Request.URL.Path = operationPath 486 } else { 487 request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) 488 if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { 489 request.Request.URL.Path += "/" 490 } 491 } 492 request.Request.Method = "POST" 493 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 494 if err != nil { 495 return out, metadata, &smithy.SerializationError{Err: err} 496 } 497 httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") 498 499 bodyWriter := bytes.NewBuffer(nil) 500 bodyEncoder := query.NewEncoder(bodyWriter) 501 body := bodyEncoder.Object() 502 body.Key("Action").String("GetSessionToken") 503 body.Key("Version").String("2011-06-15") 504 505 if err := awsAwsquery_serializeOpDocumentGetSessionTokenInput(input, bodyEncoder.Value); err != nil { 506 return out, metadata, &smithy.SerializationError{Err: err} 507 } 508 509 err = bodyEncoder.Encode() 510 if err != nil { 511 return out, metadata, &smithy.SerializationError{Err: err} 512 } 513 514 if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { 515 return out, metadata, &smithy.SerializationError{Err: err} 516 } 517 518 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 519 return out, metadata, &smithy.SerializationError{Err: err} 520 } 521 in.Request = request 522 523 return next.HandleSerialize(ctx, in) 524 } 525 func awsAwsquery_serializeDocumentPolicyDescriptorListType(v []types.PolicyDescriptorType, value query.Value) error { 526 array := value.Array("member") 527 528 for i := range v { 529 av := array.Value() 530 if err := awsAwsquery_serializeDocumentPolicyDescriptorType(&v[i], av); err != nil { 531 return err 532 } 533 } 534 return nil 535 } 536 537 func awsAwsquery_serializeDocumentPolicyDescriptorType(v *types.PolicyDescriptorType, value query.Value) error { 538 object := value.Object() 539 _ = object 540 541 if v.Arn != nil { 542 objectKey := object.Key("arn") 543 objectKey.String(*v.Arn) 544 } 545 546 return nil 547 } 548 549 func awsAwsquery_serializeDocumentProvidedContext(v *types.ProvidedContext, value query.Value) error { 550 object := value.Object() 551 _ = object 552 553 if v.ContextAssertion != nil { 554 objectKey := object.Key("ContextAssertion") 555 objectKey.String(*v.ContextAssertion) 556 } 557 558 if v.ProviderArn != nil { 559 objectKey := object.Key("ProviderArn") 560 objectKey.String(*v.ProviderArn) 561 } 562 563 return nil 564 } 565 566 func awsAwsquery_serializeDocumentProvidedContextsListType(v []types.ProvidedContext, value query.Value) error { 567 array := value.Array("member") 568 569 for i := range v { 570 av := array.Value() 571 if err := awsAwsquery_serializeDocumentProvidedContext(&v[i], av); err != nil { 572 return err 573 } 574 } 575 return nil 576 } 577 578 func awsAwsquery_serializeDocumentTag(v *types.Tag, value query.Value) error { 579 object := value.Object() 580 _ = object 581 582 if v.Key != nil { 583 objectKey := object.Key("Key") 584 objectKey.String(*v.Key) 585 } 586 587 if v.Value != nil { 588 objectKey := object.Key("Value") 589 objectKey.String(*v.Value) 590 } 591 592 return nil 593 } 594 595 func awsAwsquery_serializeDocumentTagKeyListType(v []string, value query.Value) error { 596 array := value.Array("member") 597 598 for i := range v { 599 av := array.Value() 600 av.String(v[i]) 601 } 602 return nil 603 } 604 605 func awsAwsquery_serializeDocumentTagListType(v []types.Tag, value query.Value) error { 606 array := value.Array("member") 607 608 for i := range v { 609 av := array.Value() 610 if err := awsAwsquery_serializeDocumentTag(&v[i], av); err != nil { 611 return err 612 } 613 } 614 return nil 615 } 616 617 func awsAwsquery_serializeOpDocumentAssumeRoleInput(v *AssumeRoleInput, value query.Value) error { 618 object := value.Object() 619 _ = object 620 621 if v.DurationSeconds != nil { 622 objectKey := object.Key("DurationSeconds") 623 objectKey.Integer(*v.DurationSeconds) 624 } 625 626 if v.ExternalId != nil { 627 objectKey := object.Key("ExternalId") 628 objectKey.String(*v.ExternalId) 629 } 630 631 if v.Policy != nil { 632 objectKey := object.Key("Policy") 633 objectKey.String(*v.Policy) 634 } 635 636 if v.PolicyArns != nil { 637 objectKey := object.Key("PolicyArns") 638 if err := awsAwsquery_serializeDocumentPolicyDescriptorListType(v.PolicyArns, objectKey); err != nil { 639 return err 640 } 641 } 642 643 if v.ProvidedContexts != nil { 644 objectKey := object.Key("ProvidedContexts") 645 if err := awsAwsquery_serializeDocumentProvidedContextsListType(v.ProvidedContexts, objectKey); err != nil { 646 return err 647 } 648 } 649 650 if v.RoleArn != nil { 651 objectKey := object.Key("RoleArn") 652 objectKey.String(*v.RoleArn) 653 } 654 655 if v.RoleSessionName != nil { 656 objectKey := object.Key("RoleSessionName") 657 objectKey.String(*v.RoleSessionName) 658 } 659 660 if v.SerialNumber != nil { 661 objectKey := object.Key("SerialNumber") 662 objectKey.String(*v.SerialNumber) 663 } 664 665 if v.SourceIdentity != nil { 666 objectKey := object.Key("SourceIdentity") 667 objectKey.String(*v.SourceIdentity) 668 } 669 670 if v.Tags != nil { 671 objectKey := object.Key("Tags") 672 if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { 673 return err 674 } 675 } 676 677 if v.TokenCode != nil { 678 objectKey := object.Key("TokenCode") 679 objectKey.String(*v.TokenCode) 680 } 681 682 if v.TransitiveTagKeys != nil { 683 objectKey := object.Key("TransitiveTagKeys") 684 if err := awsAwsquery_serializeDocumentTagKeyListType(v.TransitiveTagKeys, objectKey); err != nil { 685 return err 686 } 687 } 688 689 return nil 690 } 691 692 func awsAwsquery_serializeOpDocumentAssumeRoleWithSAMLInput(v *AssumeRoleWithSAMLInput, value query.Value) error { 693 object := value.Object() 694 _ = object 695 696 if v.DurationSeconds != nil { 697 objectKey := object.Key("DurationSeconds") 698 objectKey.Integer(*v.DurationSeconds) 699 } 700 701 if v.Policy != nil { 702 objectKey := object.Key("Policy") 703 objectKey.String(*v.Policy) 704 } 705 706 if v.PolicyArns != nil { 707 objectKey := object.Key("PolicyArns") 708 if err := awsAwsquery_serializeDocumentPolicyDescriptorListType(v.PolicyArns, objectKey); err != nil { 709 return err 710 } 711 } 712 713 if v.PrincipalArn != nil { 714 objectKey := object.Key("PrincipalArn") 715 objectKey.String(*v.PrincipalArn) 716 } 717 718 if v.RoleArn != nil { 719 objectKey := object.Key("RoleArn") 720 objectKey.String(*v.RoleArn) 721 } 722 723 if v.SAMLAssertion != nil { 724 objectKey := object.Key("SAMLAssertion") 725 objectKey.String(*v.SAMLAssertion) 726 } 727 728 return nil 729 } 730 731 func awsAwsquery_serializeOpDocumentAssumeRoleWithWebIdentityInput(v *AssumeRoleWithWebIdentityInput, value query.Value) error { 732 object := value.Object() 733 _ = object 734 735 if v.DurationSeconds != nil { 736 objectKey := object.Key("DurationSeconds") 737 objectKey.Integer(*v.DurationSeconds) 738 } 739 740 if v.Policy != nil { 741 objectKey := object.Key("Policy") 742 objectKey.String(*v.Policy) 743 } 744 745 if v.PolicyArns != nil { 746 objectKey := object.Key("PolicyArns") 747 if err := awsAwsquery_serializeDocumentPolicyDescriptorListType(v.PolicyArns, objectKey); err != nil { 748 return err 749 } 750 } 751 752 if v.ProviderId != nil { 753 objectKey := object.Key("ProviderId") 754 objectKey.String(*v.ProviderId) 755 } 756 757 if v.RoleArn != nil { 758 objectKey := object.Key("RoleArn") 759 objectKey.String(*v.RoleArn) 760 } 761 762 if v.RoleSessionName != nil { 763 objectKey := object.Key("RoleSessionName") 764 objectKey.String(*v.RoleSessionName) 765 } 766 767 if v.WebIdentityToken != nil { 768 objectKey := object.Key("WebIdentityToken") 769 objectKey.String(*v.WebIdentityToken) 770 } 771 772 return nil 773 } 774 775 func awsAwsquery_serializeOpDocumentDecodeAuthorizationMessageInput(v *DecodeAuthorizationMessageInput, value query.Value) error { 776 object := value.Object() 777 _ = object 778 779 if v.EncodedMessage != nil { 780 objectKey := object.Key("EncodedMessage") 781 objectKey.String(*v.EncodedMessage) 782 } 783 784 return nil 785 } 786 787 func awsAwsquery_serializeOpDocumentGetAccessKeyInfoInput(v *GetAccessKeyInfoInput, value query.Value) error { 788 object := value.Object() 789 _ = object 790 791 if v.AccessKeyId != nil { 792 objectKey := object.Key("AccessKeyId") 793 objectKey.String(*v.AccessKeyId) 794 } 795 796 return nil 797 } 798 799 func awsAwsquery_serializeOpDocumentGetCallerIdentityInput(v *GetCallerIdentityInput, value query.Value) error { 800 object := value.Object() 801 _ = object 802 803 return nil 804 } 805 806 func awsAwsquery_serializeOpDocumentGetFederationTokenInput(v *GetFederationTokenInput, value query.Value) error { 807 object := value.Object() 808 _ = object 809 810 if v.DurationSeconds != nil { 811 objectKey := object.Key("DurationSeconds") 812 objectKey.Integer(*v.DurationSeconds) 813 } 814 815 if v.Name != nil { 816 objectKey := object.Key("Name") 817 objectKey.String(*v.Name) 818 } 819 820 if v.Policy != nil { 821 objectKey := object.Key("Policy") 822 objectKey.String(*v.Policy) 823 } 824 825 if v.PolicyArns != nil { 826 objectKey := object.Key("PolicyArns") 827 if err := awsAwsquery_serializeDocumentPolicyDescriptorListType(v.PolicyArns, objectKey); err != nil { 828 return err 829 } 830 } 831 832 if v.Tags != nil { 833 objectKey := object.Key("Tags") 834 if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { 835 return err 836 } 837 } 838 839 return nil 840 } 841 842 func awsAwsquery_serializeOpDocumentGetSessionTokenInput(v *GetSessionTokenInput, value query.Value) error { 843 object := value.Object() 844 _ = object 845 846 if v.DurationSeconds != nil { 847 objectKey := object.Key("DurationSeconds") 848 objectKey.Integer(*v.DurationSeconds) 849 } 850 851 if v.SerialNumber != nil { 852 objectKey := object.Key("SerialNumber") 853 objectKey.String(*v.SerialNumber) 854 } 855 856 if v.TokenCode != nil { 857 objectKey := object.Key("TokenCode") 858 objectKey.String(*v.TokenCode) 859 } 860 861 return nil 862 }