1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package appsync 4 5import ( 6 "bytes" 7 "context" 8 "fmt" 9 "github.com/aws/aws-sdk-go-v2/service/appsync/types" 10 smithy "github.com/aws/smithy-go" 11 "github.com/aws/smithy-go/encoding/httpbinding" 12 smithyjson "github.com/aws/smithy-go/encoding/json" 13 "github.com/aws/smithy-go/middleware" 14 smithyhttp "github.com/aws/smithy-go/transport/http" 15) 16 17type awsRestjson1_serializeOpCreateApiCache struct { 18} 19 20func (*awsRestjson1_serializeOpCreateApiCache) ID() string { 21 return "OperationSerializer" 22} 23 24func (m *awsRestjson1_serializeOpCreateApiCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 25 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 26) { 27 request, ok := in.Request.(*smithyhttp.Request) 28 if !ok { 29 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 30 } 31 32 input, ok := in.Parameters.(*CreateApiCacheInput) 33 _ = input 34 if !ok { 35 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 36 } 37 38 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/ApiCaches") 39 request.URL.Path = opPath 40 if len(request.URL.RawQuery) > 0 { 41 request.URL.RawQuery = "&" + opQuery 42 } else { 43 request.URL.RawQuery = opQuery 44 } 45 46 request.Method = "POST" 47 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 48 if err != nil { 49 return out, metadata, &smithy.SerializationError{Err: err} 50 } 51 52 if err := awsRestjson1_serializeOpHttpBindingsCreateApiCacheInput(input, restEncoder); err != nil { 53 return out, metadata, &smithy.SerializationError{Err: err} 54 } 55 56 restEncoder.SetHeader("Content-Type").String("application/json") 57 58 jsonEncoder := smithyjson.NewEncoder() 59 if err := awsRestjson1_serializeOpDocumentCreateApiCacheInput(input, jsonEncoder.Value); err != nil { 60 return out, metadata, &smithy.SerializationError{Err: err} 61 } 62 63 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 64 return out, metadata, &smithy.SerializationError{Err: err} 65 } 66 67 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 68 return out, metadata, &smithy.SerializationError{Err: err} 69 } 70 in.Request = request 71 72 return next.HandleSerialize(ctx, in) 73} 74func awsRestjson1_serializeOpHttpBindingsCreateApiCacheInput(v *CreateApiCacheInput, encoder *httpbinding.Encoder) error { 75 if v == nil { 76 return fmt.Errorf("unsupported serialization of nil %T", v) 77 } 78 79 if v.ApiId == nil || len(*v.ApiId) == 0 { 80 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 81 } 82 if v.ApiId != nil { 83 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 84 return err 85 } 86 } 87 88 return nil 89} 90 91func awsRestjson1_serializeOpDocumentCreateApiCacheInput(v *CreateApiCacheInput, value smithyjson.Value) error { 92 object := value.Object() 93 defer object.Close() 94 95 if len(v.ApiCachingBehavior) > 0 { 96 ok := object.Key("apiCachingBehavior") 97 ok.String(string(v.ApiCachingBehavior)) 98 } 99 100 if v.AtRestEncryptionEnabled { 101 ok := object.Key("atRestEncryptionEnabled") 102 ok.Boolean(v.AtRestEncryptionEnabled) 103 } 104 105 if v.TransitEncryptionEnabled { 106 ok := object.Key("transitEncryptionEnabled") 107 ok.Boolean(v.TransitEncryptionEnabled) 108 } 109 110 if v.Ttl != 0 { 111 ok := object.Key("ttl") 112 ok.Long(v.Ttl) 113 } 114 115 if len(v.Type) > 0 { 116 ok := object.Key("type") 117 ok.String(string(v.Type)) 118 } 119 120 return nil 121} 122 123type awsRestjson1_serializeOpCreateApiKey struct { 124} 125 126func (*awsRestjson1_serializeOpCreateApiKey) ID() string { 127 return "OperationSerializer" 128} 129 130func (m *awsRestjson1_serializeOpCreateApiKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 131 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 132) { 133 request, ok := in.Request.(*smithyhttp.Request) 134 if !ok { 135 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 136 } 137 138 input, ok := in.Parameters.(*CreateApiKeyInput) 139 _ = input 140 if !ok { 141 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 142 } 143 144 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/apikeys") 145 request.URL.Path = opPath 146 if len(request.URL.RawQuery) > 0 { 147 request.URL.RawQuery = "&" + opQuery 148 } else { 149 request.URL.RawQuery = opQuery 150 } 151 152 request.Method = "POST" 153 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 154 if err != nil { 155 return out, metadata, &smithy.SerializationError{Err: err} 156 } 157 158 if err := awsRestjson1_serializeOpHttpBindingsCreateApiKeyInput(input, restEncoder); err != nil { 159 return out, metadata, &smithy.SerializationError{Err: err} 160 } 161 162 restEncoder.SetHeader("Content-Type").String("application/json") 163 164 jsonEncoder := smithyjson.NewEncoder() 165 if err := awsRestjson1_serializeOpDocumentCreateApiKeyInput(input, jsonEncoder.Value); err != nil { 166 return out, metadata, &smithy.SerializationError{Err: err} 167 } 168 169 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 170 return out, metadata, &smithy.SerializationError{Err: err} 171 } 172 173 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 174 return out, metadata, &smithy.SerializationError{Err: err} 175 } 176 in.Request = request 177 178 return next.HandleSerialize(ctx, in) 179} 180func awsRestjson1_serializeOpHttpBindingsCreateApiKeyInput(v *CreateApiKeyInput, encoder *httpbinding.Encoder) error { 181 if v == nil { 182 return fmt.Errorf("unsupported serialization of nil %T", v) 183 } 184 185 if v.ApiId == nil || len(*v.ApiId) == 0 { 186 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 187 } 188 if v.ApiId != nil { 189 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 190 return err 191 } 192 } 193 194 return nil 195} 196 197func awsRestjson1_serializeOpDocumentCreateApiKeyInput(v *CreateApiKeyInput, value smithyjson.Value) error { 198 object := value.Object() 199 defer object.Close() 200 201 if v.Description != nil { 202 ok := object.Key("description") 203 ok.String(*v.Description) 204 } 205 206 if v.Expires != 0 { 207 ok := object.Key("expires") 208 ok.Long(v.Expires) 209 } 210 211 return nil 212} 213 214type awsRestjson1_serializeOpCreateDataSource struct { 215} 216 217func (*awsRestjson1_serializeOpCreateDataSource) ID() string { 218 return "OperationSerializer" 219} 220 221func (m *awsRestjson1_serializeOpCreateDataSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 222 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 223) { 224 request, ok := in.Request.(*smithyhttp.Request) 225 if !ok { 226 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 227 } 228 229 input, ok := in.Parameters.(*CreateDataSourceInput) 230 _ = input 231 if !ok { 232 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 233 } 234 235 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/datasources") 236 request.URL.Path = opPath 237 if len(request.URL.RawQuery) > 0 { 238 request.URL.RawQuery = "&" + opQuery 239 } else { 240 request.URL.RawQuery = opQuery 241 } 242 243 request.Method = "POST" 244 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 245 if err != nil { 246 return out, metadata, &smithy.SerializationError{Err: err} 247 } 248 249 if err := awsRestjson1_serializeOpHttpBindingsCreateDataSourceInput(input, restEncoder); err != nil { 250 return out, metadata, &smithy.SerializationError{Err: err} 251 } 252 253 restEncoder.SetHeader("Content-Type").String("application/json") 254 255 jsonEncoder := smithyjson.NewEncoder() 256 if err := awsRestjson1_serializeOpDocumentCreateDataSourceInput(input, jsonEncoder.Value); err != nil { 257 return out, metadata, &smithy.SerializationError{Err: err} 258 } 259 260 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 261 return out, metadata, &smithy.SerializationError{Err: err} 262 } 263 264 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 265 return out, metadata, &smithy.SerializationError{Err: err} 266 } 267 in.Request = request 268 269 return next.HandleSerialize(ctx, in) 270} 271func awsRestjson1_serializeOpHttpBindingsCreateDataSourceInput(v *CreateDataSourceInput, encoder *httpbinding.Encoder) error { 272 if v == nil { 273 return fmt.Errorf("unsupported serialization of nil %T", v) 274 } 275 276 if v.ApiId == nil || len(*v.ApiId) == 0 { 277 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 278 } 279 if v.ApiId != nil { 280 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 281 return err 282 } 283 } 284 285 return nil 286} 287 288func awsRestjson1_serializeOpDocumentCreateDataSourceInput(v *CreateDataSourceInput, value smithyjson.Value) error { 289 object := value.Object() 290 defer object.Close() 291 292 if v.Description != nil { 293 ok := object.Key("description") 294 ok.String(*v.Description) 295 } 296 297 if v.DynamodbConfig != nil { 298 ok := object.Key("dynamodbConfig") 299 if err := awsRestjson1_serializeDocumentDynamodbDataSourceConfig(v.DynamodbConfig, ok); err != nil { 300 return err 301 } 302 } 303 304 if v.ElasticsearchConfig != nil { 305 ok := object.Key("elasticsearchConfig") 306 if err := awsRestjson1_serializeDocumentElasticsearchDataSourceConfig(v.ElasticsearchConfig, ok); err != nil { 307 return err 308 } 309 } 310 311 if v.HttpConfig != nil { 312 ok := object.Key("httpConfig") 313 if err := awsRestjson1_serializeDocumentHttpDataSourceConfig(v.HttpConfig, ok); err != nil { 314 return err 315 } 316 } 317 318 if v.LambdaConfig != nil { 319 ok := object.Key("lambdaConfig") 320 if err := awsRestjson1_serializeDocumentLambdaDataSourceConfig(v.LambdaConfig, ok); err != nil { 321 return err 322 } 323 } 324 325 if v.Name != nil { 326 ok := object.Key("name") 327 ok.String(*v.Name) 328 } 329 330 if v.RelationalDatabaseConfig != nil { 331 ok := object.Key("relationalDatabaseConfig") 332 if err := awsRestjson1_serializeDocumentRelationalDatabaseDataSourceConfig(v.RelationalDatabaseConfig, ok); err != nil { 333 return err 334 } 335 } 336 337 if v.ServiceRoleArn != nil { 338 ok := object.Key("serviceRoleArn") 339 ok.String(*v.ServiceRoleArn) 340 } 341 342 if len(v.Type) > 0 { 343 ok := object.Key("type") 344 ok.String(string(v.Type)) 345 } 346 347 return nil 348} 349 350type awsRestjson1_serializeOpCreateFunction struct { 351} 352 353func (*awsRestjson1_serializeOpCreateFunction) ID() string { 354 return "OperationSerializer" 355} 356 357func (m *awsRestjson1_serializeOpCreateFunction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 358 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 359) { 360 request, ok := in.Request.(*smithyhttp.Request) 361 if !ok { 362 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 363 } 364 365 input, ok := in.Parameters.(*CreateFunctionInput) 366 _ = input 367 if !ok { 368 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 369 } 370 371 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/functions") 372 request.URL.Path = opPath 373 if len(request.URL.RawQuery) > 0 { 374 request.URL.RawQuery = "&" + opQuery 375 } else { 376 request.URL.RawQuery = opQuery 377 } 378 379 request.Method = "POST" 380 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 381 if err != nil { 382 return out, metadata, &smithy.SerializationError{Err: err} 383 } 384 385 if err := awsRestjson1_serializeOpHttpBindingsCreateFunctionInput(input, restEncoder); err != nil { 386 return out, metadata, &smithy.SerializationError{Err: err} 387 } 388 389 restEncoder.SetHeader("Content-Type").String("application/json") 390 391 jsonEncoder := smithyjson.NewEncoder() 392 if err := awsRestjson1_serializeOpDocumentCreateFunctionInput(input, jsonEncoder.Value); err != nil { 393 return out, metadata, &smithy.SerializationError{Err: err} 394 } 395 396 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 397 return out, metadata, &smithy.SerializationError{Err: err} 398 } 399 400 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 401 return out, metadata, &smithy.SerializationError{Err: err} 402 } 403 in.Request = request 404 405 return next.HandleSerialize(ctx, in) 406} 407func awsRestjson1_serializeOpHttpBindingsCreateFunctionInput(v *CreateFunctionInput, encoder *httpbinding.Encoder) error { 408 if v == nil { 409 return fmt.Errorf("unsupported serialization of nil %T", v) 410 } 411 412 if v.ApiId == nil || len(*v.ApiId) == 0 { 413 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 414 } 415 if v.ApiId != nil { 416 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 417 return err 418 } 419 } 420 421 return nil 422} 423 424func awsRestjson1_serializeOpDocumentCreateFunctionInput(v *CreateFunctionInput, value smithyjson.Value) error { 425 object := value.Object() 426 defer object.Close() 427 428 if v.DataSourceName != nil { 429 ok := object.Key("dataSourceName") 430 ok.String(*v.DataSourceName) 431 } 432 433 if v.Description != nil { 434 ok := object.Key("description") 435 ok.String(*v.Description) 436 } 437 438 if v.FunctionVersion != nil { 439 ok := object.Key("functionVersion") 440 ok.String(*v.FunctionVersion) 441 } 442 443 if v.Name != nil { 444 ok := object.Key("name") 445 ok.String(*v.Name) 446 } 447 448 if v.RequestMappingTemplate != nil { 449 ok := object.Key("requestMappingTemplate") 450 ok.String(*v.RequestMappingTemplate) 451 } 452 453 if v.ResponseMappingTemplate != nil { 454 ok := object.Key("responseMappingTemplate") 455 ok.String(*v.ResponseMappingTemplate) 456 } 457 458 return nil 459} 460 461type awsRestjson1_serializeOpCreateGraphqlApi struct { 462} 463 464func (*awsRestjson1_serializeOpCreateGraphqlApi) ID() string { 465 return "OperationSerializer" 466} 467 468func (m *awsRestjson1_serializeOpCreateGraphqlApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 469 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 470) { 471 request, ok := in.Request.(*smithyhttp.Request) 472 if !ok { 473 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 474 } 475 476 input, ok := in.Parameters.(*CreateGraphqlApiInput) 477 _ = input 478 if !ok { 479 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 480 } 481 482 opPath, opQuery := httpbinding.SplitURI("/apis") 483 request.URL.Path = opPath 484 if len(request.URL.RawQuery) > 0 { 485 request.URL.RawQuery = "&" + opQuery 486 } else { 487 request.URL.RawQuery = opQuery 488 } 489 490 request.Method = "POST" 491 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 492 if err != nil { 493 return out, metadata, &smithy.SerializationError{Err: err} 494 } 495 496 restEncoder.SetHeader("Content-Type").String("application/json") 497 498 jsonEncoder := smithyjson.NewEncoder() 499 if err := awsRestjson1_serializeOpDocumentCreateGraphqlApiInput(input, jsonEncoder.Value); err != nil { 500 return out, metadata, &smithy.SerializationError{Err: err} 501 } 502 503 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 504 return out, metadata, &smithy.SerializationError{Err: err} 505 } 506 507 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 508 return out, metadata, &smithy.SerializationError{Err: err} 509 } 510 in.Request = request 511 512 return next.HandleSerialize(ctx, in) 513} 514func awsRestjson1_serializeOpHttpBindingsCreateGraphqlApiInput(v *CreateGraphqlApiInput, encoder *httpbinding.Encoder) error { 515 if v == nil { 516 return fmt.Errorf("unsupported serialization of nil %T", v) 517 } 518 519 return nil 520} 521 522func awsRestjson1_serializeOpDocumentCreateGraphqlApiInput(v *CreateGraphqlApiInput, value smithyjson.Value) error { 523 object := value.Object() 524 defer object.Close() 525 526 if v.AdditionalAuthenticationProviders != nil { 527 ok := object.Key("additionalAuthenticationProviders") 528 if err := awsRestjson1_serializeDocumentAdditionalAuthenticationProviders(v.AdditionalAuthenticationProviders, ok); err != nil { 529 return err 530 } 531 } 532 533 if len(v.AuthenticationType) > 0 { 534 ok := object.Key("authenticationType") 535 ok.String(string(v.AuthenticationType)) 536 } 537 538 if v.LogConfig != nil { 539 ok := object.Key("logConfig") 540 if err := awsRestjson1_serializeDocumentLogConfig(v.LogConfig, ok); err != nil { 541 return err 542 } 543 } 544 545 if v.Name != nil { 546 ok := object.Key("name") 547 ok.String(*v.Name) 548 } 549 550 if v.OpenIDConnectConfig != nil { 551 ok := object.Key("openIDConnectConfig") 552 if err := awsRestjson1_serializeDocumentOpenIDConnectConfig(v.OpenIDConnectConfig, ok); err != nil { 553 return err 554 } 555 } 556 557 if v.Tags != nil { 558 ok := object.Key("tags") 559 if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { 560 return err 561 } 562 } 563 564 if v.UserPoolConfig != nil { 565 ok := object.Key("userPoolConfig") 566 if err := awsRestjson1_serializeDocumentUserPoolConfig(v.UserPoolConfig, ok); err != nil { 567 return err 568 } 569 } 570 571 if v.XrayEnabled { 572 ok := object.Key("xrayEnabled") 573 ok.Boolean(v.XrayEnabled) 574 } 575 576 return nil 577} 578 579type awsRestjson1_serializeOpCreateResolver struct { 580} 581 582func (*awsRestjson1_serializeOpCreateResolver) ID() string { 583 return "OperationSerializer" 584} 585 586func (m *awsRestjson1_serializeOpCreateResolver) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 587 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 588) { 589 request, ok := in.Request.(*smithyhttp.Request) 590 if !ok { 591 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 592 } 593 594 input, ok := in.Parameters.(*CreateResolverInput) 595 _ = input 596 if !ok { 597 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 598 } 599 600 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/types/{typeName}/resolvers") 601 request.URL.Path = opPath 602 if len(request.URL.RawQuery) > 0 { 603 request.URL.RawQuery = "&" + opQuery 604 } else { 605 request.URL.RawQuery = opQuery 606 } 607 608 request.Method = "POST" 609 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 610 if err != nil { 611 return out, metadata, &smithy.SerializationError{Err: err} 612 } 613 614 if err := awsRestjson1_serializeOpHttpBindingsCreateResolverInput(input, restEncoder); err != nil { 615 return out, metadata, &smithy.SerializationError{Err: err} 616 } 617 618 restEncoder.SetHeader("Content-Type").String("application/json") 619 620 jsonEncoder := smithyjson.NewEncoder() 621 if err := awsRestjson1_serializeOpDocumentCreateResolverInput(input, jsonEncoder.Value); err != nil { 622 return out, metadata, &smithy.SerializationError{Err: err} 623 } 624 625 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 626 return out, metadata, &smithy.SerializationError{Err: err} 627 } 628 629 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 630 return out, metadata, &smithy.SerializationError{Err: err} 631 } 632 in.Request = request 633 634 return next.HandleSerialize(ctx, in) 635} 636func awsRestjson1_serializeOpHttpBindingsCreateResolverInput(v *CreateResolverInput, encoder *httpbinding.Encoder) error { 637 if v == nil { 638 return fmt.Errorf("unsupported serialization of nil %T", v) 639 } 640 641 if v.ApiId == nil || len(*v.ApiId) == 0 { 642 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 643 } 644 if v.ApiId != nil { 645 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 646 return err 647 } 648 } 649 650 if v.TypeName == nil || len(*v.TypeName) == 0 { 651 return &smithy.SerializationError{Err: fmt.Errorf("input member typeName must not be empty")} 652 } 653 if v.TypeName != nil { 654 if err := encoder.SetURI("typeName").String(*v.TypeName); err != nil { 655 return err 656 } 657 } 658 659 return nil 660} 661 662func awsRestjson1_serializeOpDocumentCreateResolverInput(v *CreateResolverInput, value smithyjson.Value) error { 663 object := value.Object() 664 defer object.Close() 665 666 if v.CachingConfig != nil { 667 ok := object.Key("cachingConfig") 668 if err := awsRestjson1_serializeDocumentCachingConfig(v.CachingConfig, ok); err != nil { 669 return err 670 } 671 } 672 673 if v.DataSourceName != nil { 674 ok := object.Key("dataSourceName") 675 ok.String(*v.DataSourceName) 676 } 677 678 if v.FieldName != nil { 679 ok := object.Key("fieldName") 680 ok.String(*v.FieldName) 681 } 682 683 if len(v.Kind) > 0 { 684 ok := object.Key("kind") 685 ok.String(string(v.Kind)) 686 } 687 688 if v.PipelineConfig != nil { 689 ok := object.Key("pipelineConfig") 690 if err := awsRestjson1_serializeDocumentPipelineConfig(v.PipelineConfig, ok); err != nil { 691 return err 692 } 693 } 694 695 if v.RequestMappingTemplate != nil { 696 ok := object.Key("requestMappingTemplate") 697 ok.String(*v.RequestMappingTemplate) 698 } 699 700 if v.ResponseMappingTemplate != nil { 701 ok := object.Key("responseMappingTemplate") 702 ok.String(*v.ResponseMappingTemplate) 703 } 704 705 if v.SyncConfig != nil { 706 ok := object.Key("syncConfig") 707 if err := awsRestjson1_serializeDocumentSyncConfig(v.SyncConfig, ok); err != nil { 708 return err 709 } 710 } 711 712 return nil 713} 714 715type awsRestjson1_serializeOpCreateType struct { 716} 717 718func (*awsRestjson1_serializeOpCreateType) ID() string { 719 return "OperationSerializer" 720} 721 722func (m *awsRestjson1_serializeOpCreateType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 723 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 724) { 725 request, ok := in.Request.(*smithyhttp.Request) 726 if !ok { 727 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 728 } 729 730 input, ok := in.Parameters.(*CreateTypeInput) 731 _ = input 732 if !ok { 733 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 734 } 735 736 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/types") 737 request.URL.Path = opPath 738 if len(request.URL.RawQuery) > 0 { 739 request.URL.RawQuery = "&" + opQuery 740 } else { 741 request.URL.RawQuery = opQuery 742 } 743 744 request.Method = "POST" 745 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 746 if err != nil { 747 return out, metadata, &smithy.SerializationError{Err: err} 748 } 749 750 if err := awsRestjson1_serializeOpHttpBindingsCreateTypeInput(input, restEncoder); err != nil { 751 return out, metadata, &smithy.SerializationError{Err: err} 752 } 753 754 restEncoder.SetHeader("Content-Type").String("application/json") 755 756 jsonEncoder := smithyjson.NewEncoder() 757 if err := awsRestjson1_serializeOpDocumentCreateTypeInput(input, jsonEncoder.Value); err != nil { 758 return out, metadata, &smithy.SerializationError{Err: err} 759 } 760 761 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 762 return out, metadata, &smithy.SerializationError{Err: err} 763 } 764 765 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 766 return out, metadata, &smithy.SerializationError{Err: err} 767 } 768 in.Request = request 769 770 return next.HandleSerialize(ctx, in) 771} 772func awsRestjson1_serializeOpHttpBindingsCreateTypeInput(v *CreateTypeInput, encoder *httpbinding.Encoder) error { 773 if v == nil { 774 return fmt.Errorf("unsupported serialization of nil %T", v) 775 } 776 777 if v.ApiId == nil || len(*v.ApiId) == 0 { 778 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 779 } 780 if v.ApiId != nil { 781 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 782 return err 783 } 784 } 785 786 return nil 787} 788 789func awsRestjson1_serializeOpDocumentCreateTypeInput(v *CreateTypeInput, value smithyjson.Value) error { 790 object := value.Object() 791 defer object.Close() 792 793 if v.Definition != nil { 794 ok := object.Key("definition") 795 ok.String(*v.Definition) 796 } 797 798 if len(v.Format) > 0 { 799 ok := object.Key("format") 800 ok.String(string(v.Format)) 801 } 802 803 return nil 804} 805 806type awsRestjson1_serializeOpDeleteApiCache struct { 807} 808 809func (*awsRestjson1_serializeOpDeleteApiCache) ID() string { 810 return "OperationSerializer" 811} 812 813func (m *awsRestjson1_serializeOpDeleteApiCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 814 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 815) { 816 request, ok := in.Request.(*smithyhttp.Request) 817 if !ok { 818 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 819 } 820 821 input, ok := in.Parameters.(*DeleteApiCacheInput) 822 _ = input 823 if !ok { 824 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 825 } 826 827 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/ApiCaches") 828 request.URL.Path = opPath 829 if len(request.URL.RawQuery) > 0 { 830 request.URL.RawQuery = "&" + opQuery 831 } else { 832 request.URL.RawQuery = opQuery 833 } 834 835 request.Method = "DELETE" 836 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 837 if err != nil { 838 return out, metadata, &smithy.SerializationError{Err: err} 839 } 840 841 if err := awsRestjson1_serializeOpHttpBindingsDeleteApiCacheInput(input, restEncoder); err != nil { 842 return out, metadata, &smithy.SerializationError{Err: err} 843 } 844 845 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 846 return out, metadata, &smithy.SerializationError{Err: err} 847 } 848 in.Request = request 849 850 return next.HandleSerialize(ctx, in) 851} 852func awsRestjson1_serializeOpHttpBindingsDeleteApiCacheInput(v *DeleteApiCacheInput, encoder *httpbinding.Encoder) error { 853 if v == nil { 854 return fmt.Errorf("unsupported serialization of nil %T", v) 855 } 856 857 if v.ApiId == nil || len(*v.ApiId) == 0 { 858 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 859 } 860 if v.ApiId != nil { 861 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 862 return err 863 } 864 } 865 866 return nil 867} 868 869type awsRestjson1_serializeOpDeleteApiKey struct { 870} 871 872func (*awsRestjson1_serializeOpDeleteApiKey) ID() string { 873 return "OperationSerializer" 874} 875 876func (m *awsRestjson1_serializeOpDeleteApiKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 877 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 878) { 879 request, ok := in.Request.(*smithyhttp.Request) 880 if !ok { 881 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 882 } 883 884 input, ok := in.Parameters.(*DeleteApiKeyInput) 885 _ = input 886 if !ok { 887 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 888 } 889 890 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/apikeys/{id}") 891 request.URL.Path = opPath 892 if len(request.URL.RawQuery) > 0 { 893 request.URL.RawQuery = "&" + opQuery 894 } else { 895 request.URL.RawQuery = opQuery 896 } 897 898 request.Method = "DELETE" 899 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 900 if err != nil { 901 return out, metadata, &smithy.SerializationError{Err: err} 902 } 903 904 if err := awsRestjson1_serializeOpHttpBindingsDeleteApiKeyInput(input, restEncoder); err != nil { 905 return out, metadata, &smithy.SerializationError{Err: err} 906 } 907 908 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 909 return out, metadata, &smithy.SerializationError{Err: err} 910 } 911 in.Request = request 912 913 return next.HandleSerialize(ctx, in) 914} 915func awsRestjson1_serializeOpHttpBindingsDeleteApiKeyInput(v *DeleteApiKeyInput, encoder *httpbinding.Encoder) error { 916 if v == nil { 917 return fmt.Errorf("unsupported serialization of nil %T", v) 918 } 919 920 if v.ApiId == nil || len(*v.ApiId) == 0 { 921 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 922 } 923 if v.ApiId != nil { 924 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 925 return err 926 } 927 } 928 929 if v.Id == nil || len(*v.Id) == 0 { 930 return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} 931 } 932 if v.Id != nil { 933 if err := encoder.SetURI("id").String(*v.Id); err != nil { 934 return err 935 } 936 } 937 938 return nil 939} 940 941type awsRestjson1_serializeOpDeleteDataSource struct { 942} 943 944func (*awsRestjson1_serializeOpDeleteDataSource) ID() string { 945 return "OperationSerializer" 946} 947 948func (m *awsRestjson1_serializeOpDeleteDataSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 949 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 950) { 951 request, ok := in.Request.(*smithyhttp.Request) 952 if !ok { 953 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 954 } 955 956 input, ok := in.Parameters.(*DeleteDataSourceInput) 957 _ = input 958 if !ok { 959 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 960 } 961 962 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/datasources/{name}") 963 request.URL.Path = opPath 964 if len(request.URL.RawQuery) > 0 { 965 request.URL.RawQuery = "&" + opQuery 966 } else { 967 request.URL.RawQuery = opQuery 968 } 969 970 request.Method = "DELETE" 971 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 972 if err != nil { 973 return out, metadata, &smithy.SerializationError{Err: err} 974 } 975 976 if err := awsRestjson1_serializeOpHttpBindingsDeleteDataSourceInput(input, restEncoder); err != nil { 977 return out, metadata, &smithy.SerializationError{Err: err} 978 } 979 980 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 981 return out, metadata, &smithy.SerializationError{Err: err} 982 } 983 in.Request = request 984 985 return next.HandleSerialize(ctx, in) 986} 987func awsRestjson1_serializeOpHttpBindingsDeleteDataSourceInput(v *DeleteDataSourceInput, encoder *httpbinding.Encoder) error { 988 if v == nil { 989 return fmt.Errorf("unsupported serialization of nil %T", v) 990 } 991 992 if v.ApiId == nil || len(*v.ApiId) == 0 { 993 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 994 } 995 if v.ApiId != nil { 996 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 997 return err 998 } 999 } 1000 1001 if v.Name == nil || len(*v.Name) == 0 { 1002 return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} 1003 } 1004 if v.Name != nil { 1005 if err := encoder.SetURI("name").String(*v.Name); err != nil { 1006 return err 1007 } 1008 } 1009 1010 return nil 1011} 1012 1013type awsRestjson1_serializeOpDeleteFunction struct { 1014} 1015 1016func (*awsRestjson1_serializeOpDeleteFunction) ID() string { 1017 return "OperationSerializer" 1018} 1019 1020func (m *awsRestjson1_serializeOpDeleteFunction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1021 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1022) { 1023 request, ok := in.Request.(*smithyhttp.Request) 1024 if !ok { 1025 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1026 } 1027 1028 input, ok := in.Parameters.(*DeleteFunctionInput) 1029 _ = input 1030 if !ok { 1031 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1032 } 1033 1034 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/functions/{functionId}") 1035 request.URL.Path = opPath 1036 if len(request.URL.RawQuery) > 0 { 1037 request.URL.RawQuery = "&" + opQuery 1038 } else { 1039 request.URL.RawQuery = opQuery 1040 } 1041 1042 request.Method = "DELETE" 1043 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1044 if err != nil { 1045 return out, metadata, &smithy.SerializationError{Err: err} 1046 } 1047 1048 if err := awsRestjson1_serializeOpHttpBindingsDeleteFunctionInput(input, restEncoder); err != nil { 1049 return out, metadata, &smithy.SerializationError{Err: err} 1050 } 1051 1052 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1053 return out, metadata, &smithy.SerializationError{Err: err} 1054 } 1055 in.Request = request 1056 1057 return next.HandleSerialize(ctx, in) 1058} 1059func awsRestjson1_serializeOpHttpBindingsDeleteFunctionInput(v *DeleteFunctionInput, encoder *httpbinding.Encoder) error { 1060 if v == nil { 1061 return fmt.Errorf("unsupported serialization of nil %T", v) 1062 } 1063 1064 if v.ApiId == nil || len(*v.ApiId) == 0 { 1065 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1066 } 1067 if v.ApiId != nil { 1068 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1069 return err 1070 } 1071 } 1072 1073 if v.FunctionId == nil || len(*v.FunctionId) == 0 { 1074 return &smithy.SerializationError{Err: fmt.Errorf("input member functionId must not be empty")} 1075 } 1076 if v.FunctionId != nil { 1077 if err := encoder.SetURI("functionId").String(*v.FunctionId); err != nil { 1078 return err 1079 } 1080 } 1081 1082 return nil 1083} 1084 1085type awsRestjson1_serializeOpDeleteGraphqlApi struct { 1086} 1087 1088func (*awsRestjson1_serializeOpDeleteGraphqlApi) ID() string { 1089 return "OperationSerializer" 1090} 1091 1092func (m *awsRestjson1_serializeOpDeleteGraphqlApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1093 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1094) { 1095 request, ok := in.Request.(*smithyhttp.Request) 1096 if !ok { 1097 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1098 } 1099 1100 input, ok := in.Parameters.(*DeleteGraphqlApiInput) 1101 _ = input 1102 if !ok { 1103 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1104 } 1105 1106 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}") 1107 request.URL.Path = opPath 1108 if len(request.URL.RawQuery) > 0 { 1109 request.URL.RawQuery = "&" + opQuery 1110 } else { 1111 request.URL.RawQuery = opQuery 1112 } 1113 1114 request.Method = "DELETE" 1115 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1116 if err != nil { 1117 return out, metadata, &smithy.SerializationError{Err: err} 1118 } 1119 1120 if err := awsRestjson1_serializeOpHttpBindingsDeleteGraphqlApiInput(input, restEncoder); err != nil { 1121 return out, metadata, &smithy.SerializationError{Err: err} 1122 } 1123 1124 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1125 return out, metadata, &smithy.SerializationError{Err: err} 1126 } 1127 in.Request = request 1128 1129 return next.HandleSerialize(ctx, in) 1130} 1131func awsRestjson1_serializeOpHttpBindingsDeleteGraphqlApiInput(v *DeleteGraphqlApiInput, encoder *httpbinding.Encoder) error { 1132 if v == nil { 1133 return fmt.Errorf("unsupported serialization of nil %T", v) 1134 } 1135 1136 if v.ApiId == nil || len(*v.ApiId) == 0 { 1137 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1138 } 1139 if v.ApiId != nil { 1140 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1141 return err 1142 } 1143 } 1144 1145 return nil 1146} 1147 1148type awsRestjson1_serializeOpDeleteResolver struct { 1149} 1150 1151func (*awsRestjson1_serializeOpDeleteResolver) ID() string { 1152 return "OperationSerializer" 1153} 1154 1155func (m *awsRestjson1_serializeOpDeleteResolver) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1156 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1157) { 1158 request, ok := in.Request.(*smithyhttp.Request) 1159 if !ok { 1160 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1161 } 1162 1163 input, ok := in.Parameters.(*DeleteResolverInput) 1164 _ = input 1165 if !ok { 1166 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1167 } 1168 1169 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/types/{typeName}/resolvers/{fieldName}") 1170 request.URL.Path = opPath 1171 if len(request.URL.RawQuery) > 0 { 1172 request.URL.RawQuery = "&" + opQuery 1173 } else { 1174 request.URL.RawQuery = opQuery 1175 } 1176 1177 request.Method = "DELETE" 1178 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1179 if err != nil { 1180 return out, metadata, &smithy.SerializationError{Err: err} 1181 } 1182 1183 if err := awsRestjson1_serializeOpHttpBindingsDeleteResolverInput(input, restEncoder); err != nil { 1184 return out, metadata, &smithy.SerializationError{Err: err} 1185 } 1186 1187 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1188 return out, metadata, &smithy.SerializationError{Err: err} 1189 } 1190 in.Request = request 1191 1192 return next.HandleSerialize(ctx, in) 1193} 1194func awsRestjson1_serializeOpHttpBindingsDeleteResolverInput(v *DeleteResolverInput, encoder *httpbinding.Encoder) error { 1195 if v == nil { 1196 return fmt.Errorf("unsupported serialization of nil %T", v) 1197 } 1198 1199 if v.ApiId == nil || len(*v.ApiId) == 0 { 1200 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1201 } 1202 if v.ApiId != nil { 1203 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1204 return err 1205 } 1206 } 1207 1208 if v.FieldName == nil || len(*v.FieldName) == 0 { 1209 return &smithy.SerializationError{Err: fmt.Errorf("input member fieldName must not be empty")} 1210 } 1211 if v.FieldName != nil { 1212 if err := encoder.SetURI("fieldName").String(*v.FieldName); err != nil { 1213 return err 1214 } 1215 } 1216 1217 if v.TypeName == nil || len(*v.TypeName) == 0 { 1218 return &smithy.SerializationError{Err: fmt.Errorf("input member typeName must not be empty")} 1219 } 1220 if v.TypeName != nil { 1221 if err := encoder.SetURI("typeName").String(*v.TypeName); err != nil { 1222 return err 1223 } 1224 } 1225 1226 return nil 1227} 1228 1229type awsRestjson1_serializeOpDeleteType struct { 1230} 1231 1232func (*awsRestjson1_serializeOpDeleteType) ID() string { 1233 return "OperationSerializer" 1234} 1235 1236func (m *awsRestjson1_serializeOpDeleteType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1237 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1238) { 1239 request, ok := in.Request.(*smithyhttp.Request) 1240 if !ok { 1241 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1242 } 1243 1244 input, ok := in.Parameters.(*DeleteTypeInput) 1245 _ = input 1246 if !ok { 1247 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1248 } 1249 1250 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/types/{typeName}") 1251 request.URL.Path = opPath 1252 if len(request.URL.RawQuery) > 0 { 1253 request.URL.RawQuery = "&" + opQuery 1254 } else { 1255 request.URL.RawQuery = opQuery 1256 } 1257 1258 request.Method = "DELETE" 1259 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1260 if err != nil { 1261 return out, metadata, &smithy.SerializationError{Err: err} 1262 } 1263 1264 if err := awsRestjson1_serializeOpHttpBindingsDeleteTypeInput(input, restEncoder); err != nil { 1265 return out, metadata, &smithy.SerializationError{Err: err} 1266 } 1267 1268 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1269 return out, metadata, &smithy.SerializationError{Err: err} 1270 } 1271 in.Request = request 1272 1273 return next.HandleSerialize(ctx, in) 1274} 1275func awsRestjson1_serializeOpHttpBindingsDeleteTypeInput(v *DeleteTypeInput, encoder *httpbinding.Encoder) error { 1276 if v == nil { 1277 return fmt.Errorf("unsupported serialization of nil %T", v) 1278 } 1279 1280 if v.ApiId == nil || len(*v.ApiId) == 0 { 1281 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1282 } 1283 if v.ApiId != nil { 1284 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1285 return err 1286 } 1287 } 1288 1289 if v.TypeName == nil || len(*v.TypeName) == 0 { 1290 return &smithy.SerializationError{Err: fmt.Errorf("input member typeName must not be empty")} 1291 } 1292 if v.TypeName != nil { 1293 if err := encoder.SetURI("typeName").String(*v.TypeName); err != nil { 1294 return err 1295 } 1296 } 1297 1298 return nil 1299} 1300 1301type awsRestjson1_serializeOpFlushApiCache struct { 1302} 1303 1304func (*awsRestjson1_serializeOpFlushApiCache) ID() string { 1305 return "OperationSerializer" 1306} 1307 1308func (m *awsRestjson1_serializeOpFlushApiCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1309 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1310) { 1311 request, ok := in.Request.(*smithyhttp.Request) 1312 if !ok { 1313 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1314 } 1315 1316 input, ok := in.Parameters.(*FlushApiCacheInput) 1317 _ = input 1318 if !ok { 1319 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1320 } 1321 1322 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/FlushCache") 1323 request.URL.Path = opPath 1324 if len(request.URL.RawQuery) > 0 { 1325 request.URL.RawQuery = "&" + opQuery 1326 } else { 1327 request.URL.RawQuery = opQuery 1328 } 1329 1330 request.Method = "DELETE" 1331 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1332 if err != nil { 1333 return out, metadata, &smithy.SerializationError{Err: err} 1334 } 1335 1336 if err := awsRestjson1_serializeOpHttpBindingsFlushApiCacheInput(input, restEncoder); err != nil { 1337 return out, metadata, &smithy.SerializationError{Err: err} 1338 } 1339 1340 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1341 return out, metadata, &smithy.SerializationError{Err: err} 1342 } 1343 in.Request = request 1344 1345 return next.HandleSerialize(ctx, in) 1346} 1347func awsRestjson1_serializeOpHttpBindingsFlushApiCacheInput(v *FlushApiCacheInput, encoder *httpbinding.Encoder) error { 1348 if v == nil { 1349 return fmt.Errorf("unsupported serialization of nil %T", v) 1350 } 1351 1352 if v.ApiId == nil || len(*v.ApiId) == 0 { 1353 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1354 } 1355 if v.ApiId != nil { 1356 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1357 return err 1358 } 1359 } 1360 1361 return nil 1362} 1363 1364type awsRestjson1_serializeOpGetApiCache struct { 1365} 1366 1367func (*awsRestjson1_serializeOpGetApiCache) ID() string { 1368 return "OperationSerializer" 1369} 1370 1371func (m *awsRestjson1_serializeOpGetApiCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1372 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1373) { 1374 request, ok := in.Request.(*smithyhttp.Request) 1375 if !ok { 1376 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1377 } 1378 1379 input, ok := in.Parameters.(*GetApiCacheInput) 1380 _ = input 1381 if !ok { 1382 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1383 } 1384 1385 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/ApiCaches") 1386 request.URL.Path = opPath 1387 if len(request.URL.RawQuery) > 0 { 1388 request.URL.RawQuery = "&" + opQuery 1389 } else { 1390 request.URL.RawQuery = opQuery 1391 } 1392 1393 request.Method = "GET" 1394 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1395 if err != nil { 1396 return out, metadata, &smithy.SerializationError{Err: err} 1397 } 1398 1399 if err := awsRestjson1_serializeOpHttpBindingsGetApiCacheInput(input, restEncoder); err != nil { 1400 return out, metadata, &smithy.SerializationError{Err: err} 1401 } 1402 1403 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1404 return out, metadata, &smithy.SerializationError{Err: err} 1405 } 1406 in.Request = request 1407 1408 return next.HandleSerialize(ctx, in) 1409} 1410func awsRestjson1_serializeOpHttpBindingsGetApiCacheInput(v *GetApiCacheInput, encoder *httpbinding.Encoder) error { 1411 if v == nil { 1412 return fmt.Errorf("unsupported serialization of nil %T", v) 1413 } 1414 1415 if v.ApiId == nil || len(*v.ApiId) == 0 { 1416 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1417 } 1418 if v.ApiId != nil { 1419 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1420 return err 1421 } 1422 } 1423 1424 return nil 1425} 1426 1427type awsRestjson1_serializeOpGetDataSource struct { 1428} 1429 1430func (*awsRestjson1_serializeOpGetDataSource) ID() string { 1431 return "OperationSerializer" 1432} 1433 1434func (m *awsRestjson1_serializeOpGetDataSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1435 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1436) { 1437 request, ok := in.Request.(*smithyhttp.Request) 1438 if !ok { 1439 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1440 } 1441 1442 input, ok := in.Parameters.(*GetDataSourceInput) 1443 _ = input 1444 if !ok { 1445 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1446 } 1447 1448 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/datasources/{name}") 1449 request.URL.Path = opPath 1450 if len(request.URL.RawQuery) > 0 { 1451 request.URL.RawQuery = "&" + opQuery 1452 } else { 1453 request.URL.RawQuery = opQuery 1454 } 1455 1456 request.Method = "GET" 1457 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1458 if err != nil { 1459 return out, metadata, &smithy.SerializationError{Err: err} 1460 } 1461 1462 if err := awsRestjson1_serializeOpHttpBindingsGetDataSourceInput(input, restEncoder); err != nil { 1463 return out, metadata, &smithy.SerializationError{Err: err} 1464 } 1465 1466 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1467 return out, metadata, &smithy.SerializationError{Err: err} 1468 } 1469 in.Request = request 1470 1471 return next.HandleSerialize(ctx, in) 1472} 1473func awsRestjson1_serializeOpHttpBindingsGetDataSourceInput(v *GetDataSourceInput, encoder *httpbinding.Encoder) error { 1474 if v == nil { 1475 return fmt.Errorf("unsupported serialization of nil %T", v) 1476 } 1477 1478 if v.ApiId == nil || len(*v.ApiId) == 0 { 1479 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1480 } 1481 if v.ApiId != nil { 1482 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1483 return err 1484 } 1485 } 1486 1487 if v.Name == nil || len(*v.Name) == 0 { 1488 return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} 1489 } 1490 if v.Name != nil { 1491 if err := encoder.SetURI("name").String(*v.Name); err != nil { 1492 return err 1493 } 1494 } 1495 1496 return nil 1497} 1498 1499type awsRestjson1_serializeOpGetFunction struct { 1500} 1501 1502func (*awsRestjson1_serializeOpGetFunction) ID() string { 1503 return "OperationSerializer" 1504} 1505 1506func (m *awsRestjson1_serializeOpGetFunction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1507 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1508) { 1509 request, ok := in.Request.(*smithyhttp.Request) 1510 if !ok { 1511 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1512 } 1513 1514 input, ok := in.Parameters.(*GetFunctionInput) 1515 _ = input 1516 if !ok { 1517 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1518 } 1519 1520 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/functions/{functionId}") 1521 request.URL.Path = opPath 1522 if len(request.URL.RawQuery) > 0 { 1523 request.URL.RawQuery = "&" + opQuery 1524 } else { 1525 request.URL.RawQuery = opQuery 1526 } 1527 1528 request.Method = "GET" 1529 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1530 if err != nil { 1531 return out, metadata, &smithy.SerializationError{Err: err} 1532 } 1533 1534 if err := awsRestjson1_serializeOpHttpBindingsGetFunctionInput(input, restEncoder); err != nil { 1535 return out, metadata, &smithy.SerializationError{Err: err} 1536 } 1537 1538 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1539 return out, metadata, &smithy.SerializationError{Err: err} 1540 } 1541 in.Request = request 1542 1543 return next.HandleSerialize(ctx, in) 1544} 1545func awsRestjson1_serializeOpHttpBindingsGetFunctionInput(v *GetFunctionInput, encoder *httpbinding.Encoder) error { 1546 if v == nil { 1547 return fmt.Errorf("unsupported serialization of nil %T", v) 1548 } 1549 1550 if v.ApiId == nil || len(*v.ApiId) == 0 { 1551 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1552 } 1553 if v.ApiId != nil { 1554 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1555 return err 1556 } 1557 } 1558 1559 if v.FunctionId == nil || len(*v.FunctionId) == 0 { 1560 return &smithy.SerializationError{Err: fmt.Errorf("input member functionId must not be empty")} 1561 } 1562 if v.FunctionId != nil { 1563 if err := encoder.SetURI("functionId").String(*v.FunctionId); err != nil { 1564 return err 1565 } 1566 } 1567 1568 return nil 1569} 1570 1571type awsRestjson1_serializeOpGetGraphqlApi struct { 1572} 1573 1574func (*awsRestjson1_serializeOpGetGraphqlApi) ID() string { 1575 return "OperationSerializer" 1576} 1577 1578func (m *awsRestjson1_serializeOpGetGraphqlApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1579 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1580) { 1581 request, ok := in.Request.(*smithyhttp.Request) 1582 if !ok { 1583 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1584 } 1585 1586 input, ok := in.Parameters.(*GetGraphqlApiInput) 1587 _ = input 1588 if !ok { 1589 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1590 } 1591 1592 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}") 1593 request.URL.Path = opPath 1594 if len(request.URL.RawQuery) > 0 { 1595 request.URL.RawQuery = "&" + opQuery 1596 } else { 1597 request.URL.RawQuery = opQuery 1598 } 1599 1600 request.Method = "GET" 1601 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1602 if err != nil { 1603 return out, metadata, &smithy.SerializationError{Err: err} 1604 } 1605 1606 if err := awsRestjson1_serializeOpHttpBindingsGetGraphqlApiInput(input, restEncoder); err != nil { 1607 return out, metadata, &smithy.SerializationError{Err: err} 1608 } 1609 1610 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1611 return out, metadata, &smithy.SerializationError{Err: err} 1612 } 1613 in.Request = request 1614 1615 return next.HandleSerialize(ctx, in) 1616} 1617func awsRestjson1_serializeOpHttpBindingsGetGraphqlApiInput(v *GetGraphqlApiInput, encoder *httpbinding.Encoder) error { 1618 if v == nil { 1619 return fmt.Errorf("unsupported serialization of nil %T", v) 1620 } 1621 1622 if v.ApiId == nil || len(*v.ApiId) == 0 { 1623 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1624 } 1625 if v.ApiId != nil { 1626 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1627 return err 1628 } 1629 } 1630 1631 return nil 1632} 1633 1634type awsRestjson1_serializeOpGetIntrospectionSchema struct { 1635} 1636 1637func (*awsRestjson1_serializeOpGetIntrospectionSchema) ID() string { 1638 return "OperationSerializer" 1639} 1640 1641func (m *awsRestjson1_serializeOpGetIntrospectionSchema) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1642 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1643) { 1644 request, ok := in.Request.(*smithyhttp.Request) 1645 if !ok { 1646 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1647 } 1648 1649 input, ok := in.Parameters.(*GetIntrospectionSchemaInput) 1650 _ = input 1651 if !ok { 1652 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1653 } 1654 1655 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/schema") 1656 request.URL.Path = opPath 1657 if len(request.URL.RawQuery) > 0 { 1658 request.URL.RawQuery = "&" + opQuery 1659 } else { 1660 request.URL.RawQuery = opQuery 1661 } 1662 1663 request.Method = "GET" 1664 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1665 if err != nil { 1666 return out, metadata, &smithy.SerializationError{Err: err} 1667 } 1668 1669 if err := awsRestjson1_serializeOpHttpBindingsGetIntrospectionSchemaInput(input, restEncoder); err != nil { 1670 return out, metadata, &smithy.SerializationError{Err: err} 1671 } 1672 1673 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1674 return out, metadata, &smithy.SerializationError{Err: err} 1675 } 1676 in.Request = request 1677 1678 return next.HandleSerialize(ctx, in) 1679} 1680func awsRestjson1_serializeOpHttpBindingsGetIntrospectionSchemaInput(v *GetIntrospectionSchemaInput, encoder *httpbinding.Encoder) error { 1681 if v == nil { 1682 return fmt.Errorf("unsupported serialization of nil %T", v) 1683 } 1684 1685 if v.ApiId == nil || len(*v.ApiId) == 0 { 1686 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1687 } 1688 if v.ApiId != nil { 1689 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1690 return err 1691 } 1692 } 1693 1694 if len(v.Format) > 0 { 1695 encoder.SetQuery("format").String(string(v.Format)) 1696 } 1697 1698 if v.IncludeDirectives != nil { 1699 encoder.SetQuery("includeDirectives").Boolean(*v.IncludeDirectives) 1700 } 1701 1702 return nil 1703} 1704 1705type awsRestjson1_serializeOpGetResolver struct { 1706} 1707 1708func (*awsRestjson1_serializeOpGetResolver) ID() string { 1709 return "OperationSerializer" 1710} 1711 1712func (m *awsRestjson1_serializeOpGetResolver) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1713 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1714) { 1715 request, ok := in.Request.(*smithyhttp.Request) 1716 if !ok { 1717 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1718 } 1719 1720 input, ok := in.Parameters.(*GetResolverInput) 1721 _ = input 1722 if !ok { 1723 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1724 } 1725 1726 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/types/{typeName}/resolvers/{fieldName}") 1727 request.URL.Path = opPath 1728 if len(request.URL.RawQuery) > 0 { 1729 request.URL.RawQuery = "&" + opQuery 1730 } else { 1731 request.URL.RawQuery = opQuery 1732 } 1733 1734 request.Method = "GET" 1735 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1736 if err != nil { 1737 return out, metadata, &smithy.SerializationError{Err: err} 1738 } 1739 1740 if err := awsRestjson1_serializeOpHttpBindingsGetResolverInput(input, restEncoder); err != nil { 1741 return out, metadata, &smithy.SerializationError{Err: err} 1742 } 1743 1744 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1745 return out, metadata, &smithy.SerializationError{Err: err} 1746 } 1747 in.Request = request 1748 1749 return next.HandleSerialize(ctx, in) 1750} 1751func awsRestjson1_serializeOpHttpBindingsGetResolverInput(v *GetResolverInput, encoder *httpbinding.Encoder) error { 1752 if v == nil { 1753 return fmt.Errorf("unsupported serialization of nil %T", v) 1754 } 1755 1756 if v.ApiId == nil || len(*v.ApiId) == 0 { 1757 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1758 } 1759 if v.ApiId != nil { 1760 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1761 return err 1762 } 1763 } 1764 1765 if v.FieldName == nil || len(*v.FieldName) == 0 { 1766 return &smithy.SerializationError{Err: fmt.Errorf("input member fieldName must not be empty")} 1767 } 1768 if v.FieldName != nil { 1769 if err := encoder.SetURI("fieldName").String(*v.FieldName); err != nil { 1770 return err 1771 } 1772 } 1773 1774 if v.TypeName == nil || len(*v.TypeName) == 0 { 1775 return &smithy.SerializationError{Err: fmt.Errorf("input member typeName must not be empty")} 1776 } 1777 if v.TypeName != nil { 1778 if err := encoder.SetURI("typeName").String(*v.TypeName); err != nil { 1779 return err 1780 } 1781 } 1782 1783 return nil 1784} 1785 1786type awsRestjson1_serializeOpGetSchemaCreationStatus struct { 1787} 1788 1789func (*awsRestjson1_serializeOpGetSchemaCreationStatus) ID() string { 1790 return "OperationSerializer" 1791} 1792 1793func (m *awsRestjson1_serializeOpGetSchemaCreationStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1794 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1795) { 1796 request, ok := in.Request.(*smithyhttp.Request) 1797 if !ok { 1798 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1799 } 1800 1801 input, ok := in.Parameters.(*GetSchemaCreationStatusInput) 1802 _ = input 1803 if !ok { 1804 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1805 } 1806 1807 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/schemacreation") 1808 request.URL.Path = opPath 1809 if len(request.URL.RawQuery) > 0 { 1810 request.URL.RawQuery = "&" + opQuery 1811 } else { 1812 request.URL.RawQuery = opQuery 1813 } 1814 1815 request.Method = "GET" 1816 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1817 if err != nil { 1818 return out, metadata, &smithy.SerializationError{Err: err} 1819 } 1820 1821 if err := awsRestjson1_serializeOpHttpBindingsGetSchemaCreationStatusInput(input, restEncoder); err != nil { 1822 return out, metadata, &smithy.SerializationError{Err: err} 1823 } 1824 1825 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1826 return out, metadata, &smithy.SerializationError{Err: err} 1827 } 1828 in.Request = request 1829 1830 return next.HandleSerialize(ctx, in) 1831} 1832func awsRestjson1_serializeOpHttpBindingsGetSchemaCreationStatusInput(v *GetSchemaCreationStatusInput, encoder *httpbinding.Encoder) error { 1833 if v == nil { 1834 return fmt.Errorf("unsupported serialization of nil %T", v) 1835 } 1836 1837 if v.ApiId == nil || len(*v.ApiId) == 0 { 1838 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1839 } 1840 if v.ApiId != nil { 1841 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1842 return err 1843 } 1844 } 1845 1846 return nil 1847} 1848 1849type awsRestjson1_serializeOpGetType struct { 1850} 1851 1852func (*awsRestjson1_serializeOpGetType) ID() string { 1853 return "OperationSerializer" 1854} 1855 1856func (m *awsRestjson1_serializeOpGetType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1857 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1858) { 1859 request, ok := in.Request.(*smithyhttp.Request) 1860 if !ok { 1861 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1862 } 1863 1864 input, ok := in.Parameters.(*GetTypeInput) 1865 _ = input 1866 if !ok { 1867 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1868 } 1869 1870 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/types/{typeName}") 1871 request.URL.Path = opPath 1872 if len(request.URL.RawQuery) > 0 { 1873 request.URL.RawQuery = "&" + opQuery 1874 } else { 1875 request.URL.RawQuery = opQuery 1876 } 1877 1878 request.Method = "GET" 1879 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1880 if err != nil { 1881 return out, metadata, &smithy.SerializationError{Err: err} 1882 } 1883 1884 if err := awsRestjson1_serializeOpHttpBindingsGetTypeInput(input, restEncoder); err != nil { 1885 return out, metadata, &smithy.SerializationError{Err: err} 1886 } 1887 1888 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1889 return out, metadata, &smithy.SerializationError{Err: err} 1890 } 1891 in.Request = request 1892 1893 return next.HandleSerialize(ctx, in) 1894} 1895func awsRestjson1_serializeOpHttpBindingsGetTypeInput(v *GetTypeInput, encoder *httpbinding.Encoder) error { 1896 if v == nil { 1897 return fmt.Errorf("unsupported serialization of nil %T", v) 1898 } 1899 1900 if v.ApiId == nil || len(*v.ApiId) == 0 { 1901 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1902 } 1903 if v.ApiId != nil { 1904 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1905 return err 1906 } 1907 } 1908 1909 if len(v.Format) > 0 { 1910 encoder.SetQuery("format").String(string(v.Format)) 1911 } 1912 1913 if v.TypeName == nil || len(*v.TypeName) == 0 { 1914 return &smithy.SerializationError{Err: fmt.Errorf("input member typeName must not be empty")} 1915 } 1916 if v.TypeName != nil { 1917 if err := encoder.SetURI("typeName").String(*v.TypeName); err != nil { 1918 return err 1919 } 1920 } 1921 1922 return nil 1923} 1924 1925type awsRestjson1_serializeOpListApiKeys struct { 1926} 1927 1928func (*awsRestjson1_serializeOpListApiKeys) ID() string { 1929 return "OperationSerializer" 1930} 1931 1932func (m *awsRestjson1_serializeOpListApiKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1933 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1934) { 1935 request, ok := in.Request.(*smithyhttp.Request) 1936 if !ok { 1937 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1938 } 1939 1940 input, ok := in.Parameters.(*ListApiKeysInput) 1941 _ = input 1942 if !ok { 1943 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1944 } 1945 1946 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/apikeys") 1947 request.URL.Path = opPath 1948 if len(request.URL.RawQuery) > 0 { 1949 request.URL.RawQuery = "&" + opQuery 1950 } else { 1951 request.URL.RawQuery = opQuery 1952 } 1953 1954 request.Method = "GET" 1955 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1956 if err != nil { 1957 return out, metadata, &smithy.SerializationError{Err: err} 1958 } 1959 1960 if err := awsRestjson1_serializeOpHttpBindingsListApiKeysInput(input, restEncoder); err != nil { 1961 return out, metadata, &smithy.SerializationError{Err: err} 1962 } 1963 1964 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1965 return out, metadata, &smithy.SerializationError{Err: err} 1966 } 1967 in.Request = request 1968 1969 return next.HandleSerialize(ctx, in) 1970} 1971func awsRestjson1_serializeOpHttpBindingsListApiKeysInput(v *ListApiKeysInput, encoder *httpbinding.Encoder) error { 1972 if v == nil { 1973 return fmt.Errorf("unsupported serialization of nil %T", v) 1974 } 1975 1976 if v.ApiId == nil || len(*v.ApiId) == 0 { 1977 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 1978 } 1979 if v.ApiId != nil { 1980 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 1981 return err 1982 } 1983 } 1984 1985 if v.MaxResults != 0 { 1986 encoder.SetQuery("maxResults").Integer(v.MaxResults) 1987 } 1988 1989 if v.NextToken != nil { 1990 encoder.SetQuery("nextToken").String(*v.NextToken) 1991 } 1992 1993 return nil 1994} 1995 1996type awsRestjson1_serializeOpListDataSources struct { 1997} 1998 1999func (*awsRestjson1_serializeOpListDataSources) ID() string { 2000 return "OperationSerializer" 2001} 2002 2003func (m *awsRestjson1_serializeOpListDataSources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2004 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2005) { 2006 request, ok := in.Request.(*smithyhttp.Request) 2007 if !ok { 2008 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2009 } 2010 2011 input, ok := in.Parameters.(*ListDataSourcesInput) 2012 _ = input 2013 if !ok { 2014 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2015 } 2016 2017 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/datasources") 2018 request.URL.Path = opPath 2019 if len(request.URL.RawQuery) > 0 { 2020 request.URL.RawQuery = "&" + opQuery 2021 } else { 2022 request.URL.RawQuery = opQuery 2023 } 2024 2025 request.Method = "GET" 2026 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2027 if err != nil { 2028 return out, metadata, &smithy.SerializationError{Err: err} 2029 } 2030 2031 if err := awsRestjson1_serializeOpHttpBindingsListDataSourcesInput(input, restEncoder); err != nil { 2032 return out, metadata, &smithy.SerializationError{Err: err} 2033 } 2034 2035 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2036 return out, metadata, &smithy.SerializationError{Err: err} 2037 } 2038 in.Request = request 2039 2040 return next.HandleSerialize(ctx, in) 2041} 2042func awsRestjson1_serializeOpHttpBindingsListDataSourcesInput(v *ListDataSourcesInput, encoder *httpbinding.Encoder) error { 2043 if v == nil { 2044 return fmt.Errorf("unsupported serialization of nil %T", v) 2045 } 2046 2047 if v.ApiId == nil || len(*v.ApiId) == 0 { 2048 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 2049 } 2050 if v.ApiId != nil { 2051 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 2052 return err 2053 } 2054 } 2055 2056 if v.MaxResults != 0 { 2057 encoder.SetQuery("maxResults").Integer(v.MaxResults) 2058 } 2059 2060 if v.NextToken != nil { 2061 encoder.SetQuery("nextToken").String(*v.NextToken) 2062 } 2063 2064 return nil 2065} 2066 2067type awsRestjson1_serializeOpListFunctions struct { 2068} 2069 2070func (*awsRestjson1_serializeOpListFunctions) ID() string { 2071 return "OperationSerializer" 2072} 2073 2074func (m *awsRestjson1_serializeOpListFunctions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2075 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2076) { 2077 request, ok := in.Request.(*smithyhttp.Request) 2078 if !ok { 2079 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2080 } 2081 2082 input, ok := in.Parameters.(*ListFunctionsInput) 2083 _ = input 2084 if !ok { 2085 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2086 } 2087 2088 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/functions") 2089 request.URL.Path = opPath 2090 if len(request.URL.RawQuery) > 0 { 2091 request.URL.RawQuery = "&" + opQuery 2092 } else { 2093 request.URL.RawQuery = opQuery 2094 } 2095 2096 request.Method = "GET" 2097 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2098 if err != nil { 2099 return out, metadata, &smithy.SerializationError{Err: err} 2100 } 2101 2102 if err := awsRestjson1_serializeOpHttpBindingsListFunctionsInput(input, restEncoder); err != nil { 2103 return out, metadata, &smithy.SerializationError{Err: err} 2104 } 2105 2106 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2107 return out, metadata, &smithy.SerializationError{Err: err} 2108 } 2109 in.Request = request 2110 2111 return next.HandleSerialize(ctx, in) 2112} 2113func awsRestjson1_serializeOpHttpBindingsListFunctionsInput(v *ListFunctionsInput, encoder *httpbinding.Encoder) error { 2114 if v == nil { 2115 return fmt.Errorf("unsupported serialization of nil %T", v) 2116 } 2117 2118 if v.ApiId == nil || len(*v.ApiId) == 0 { 2119 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 2120 } 2121 if v.ApiId != nil { 2122 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 2123 return err 2124 } 2125 } 2126 2127 if v.MaxResults != 0 { 2128 encoder.SetQuery("maxResults").Integer(v.MaxResults) 2129 } 2130 2131 if v.NextToken != nil { 2132 encoder.SetQuery("nextToken").String(*v.NextToken) 2133 } 2134 2135 return nil 2136} 2137 2138type awsRestjson1_serializeOpListGraphqlApis struct { 2139} 2140 2141func (*awsRestjson1_serializeOpListGraphqlApis) ID() string { 2142 return "OperationSerializer" 2143} 2144 2145func (m *awsRestjson1_serializeOpListGraphqlApis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2146 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2147) { 2148 request, ok := in.Request.(*smithyhttp.Request) 2149 if !ok { 2150 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2151 } 2152 2153 input, ok := in.Parameters.(*ListGraphqlApisInput) 2154 _ = input 2155 if !ok { 2156 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2157 } 2158 2159 opPath, opQuery := httpbinding.SplitURI("/apis") 2160 request.URL.Path = opPath 2161 if len(request.URL.RawQuery) > 0 { 2162 request.URL.RawQuery = "&" + opQuery 2163 } else { 2164 request.URL.RawQuery = opQuery 2165 } 2166 2167 request.Method = "GET" 2168 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2169 if err != nil { 2170 return out, metadata, &smithy.SerializationError{Err: err} 2171 } 2172 2173 if err := awsRestjson1_serializeOpHttpBindingsListGraphqlApisInput(input, restEncoder); err != nil { 2174 return out, metadata, &smithy.SerializationError{Err: err} 2175 } 2176 2177 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2178 return out, metadata, &smithy.SerializationError{Err: err} 2179 } 2180 in.Request = request 2181 2182 return next.HandleSerialize(ctx, in) 2183} 2184func awsRestjson1_serializeOpHttpBindingsListGraphqlApisInput(v *ListGraphqlApisInput, encoder *httpbinding.Encoder) error { 2185 if v == nil { 2186 return fmt.Errorf("unsupported serialization of nil %T", v) 2187 } 2188 2189 if v.MaxResults != 0 { 2190 encoder.SetQuery("maxResults").Integer(v.MaxResults) 2191 } 2192 2193 if v.NextToken != nil { 2194 encoder.SetQuery("nextToken").String(*v.NextToken) 2195 } 2196 2197 return nil 2198} 2199 2200type awsRestjson1_serializeOpListResolvers struct { 2201} 2202 2203func (*awsRestjson1_serializeOpListResolvers) ID() string { 2204 return "OperationSerializer" 2205} 2206 2207func (m *awsRestjson1_serializeOpListResolvers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2208 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2209) { 2210 request, ok := in.Request.(*smithyhttp.Request) 2211 if !ok { 2212 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2213 } 2214 2215 input, ok := in.Parameters.(*ListResolversInput) 2216 _ = input 2217 if !ok { 2218 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2219 } 2220 2221 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/types/{typeName}/resolvers") 2222 request.URL.Path = opPath 2223 if len(request.URL.RawQuery) > 0 { 2224 request.URL.RawQuery = "&" + opQuery 2225 } else { 2226 request.URL.RawQuery = opQuery 2227 } 2228 2229 request.Method = "GET" 2230 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2231 if err != nil { 2232 return out, metadata, &smithy.SerializationError{Err: err} 2233 } 2234 2235 if err := awsRestjson1_serializeOpHttpBindingsListResolversInput(input, restEncoder); err != nil { 2236 return out, metadata, &smithy.SerializationError{Err: err} 2237 } 2238 2239 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2240 return out, metadata, &smithy.SerializationError{Err: err} 2241 } 2242 in.Request = request 2243 2244 return next.HandleSerialize(ctx, in) 2245} 2246func awsRestjson1_serializeOpHttpBindingsListResolversInput(v *ListResolversInput, encoder *httpbinding.Encoder) error { 2247 if v == nil { 2248 return fmt.Errorf("unsupported serialization of nil %T", v) 2249 } 2250 2251 if v.ApiId == nil || len(*v.ApiId) == 0 { 2252 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 2253 } 2254 if v.ApiId != nil { 2255 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 2256 return err 2257 } 2258 } 2259 2260 if v.MaxResults != 0 { 2261 encoder.SetQuery("maxResults").Integer(v.MaxResults) 2262 } 2263 2264 if v.NextToken != nil { 2265 encoder.SetQuery("nextToken").String(*v.NextToken) 2266 } 2267 2268 if v.TypeName == nil || len(*v.TypeName) == 0 { 2269 return &smithy.SerializationError{Err: fmt.Errorf("input member typeName must not be empty")} 2270 } 2271 if v.TypeName != nil { 2272 if err := encoder.SetURI("typeName").String(*v.TypeName); err != nil { 2273 return err 2274 } 2275 } 2276 2277 return nil 2278} 2279 2280type awsRestjson1_serializeOpListResolversByFunction struct { 2281} 2282 2283func (*awsRestjson1_serializeOpListResolversByFunction) ID() string { 2284 return "OperationSerializer" 2285} 2286 2287func (m *awsRestjson1_serializeOpListResolversByFunction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2288 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2289) { 2290 request, ok := in.Request.(*smithyhttp.Request) 2291 if !ok { 2292 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2293 } 2294 2295 input, ok := in.Parameters.(*ListResolversByFunctionInput) 2296 _ = input 2297 if !ok { 2298 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2299 } 2300 2301 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/functions/{functionId}/resolvers") 2302 request.URL.Path = opPath 2303 if len(request.URL.RawQuery) > 0 { 2304 request.URL.RawQuery = "&" + opQuery 2305 } else { 2306 request.URL.RawQuery = opQuery 2307 } 2308 2309 request.Method = "GET" 2310 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2311 if err != nil { 2312 return out, metadata, &smithy.SerializationError{Err: err} 2313 } 2314 2315 if err := awsRestjson1_serializeOpHttpBindingsListResolversByFunctionInput(input, restEncoder); err != nil { 2316 return out, metadata, &smithy.SerializationError{Err: err} 2317 } 2318 2319 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2320 return out, metadata, &smithy.SerializationError{Err: err} 2321 } 2322 in.Request = request 2323 2324 return next.HandleSerialize(ctx, in) 2325} 2326func awsRestjson1_serializeOpHttpBindingsListResolversByFunctionInput(v *ListResolversByFunctionInput, encoder *httpbinding.Encoder) error { 2327 if v == nil { 2328 return fmt.Errorf("unsupported serialization of nil %T", v) 2329 } 2330 2331 if v.ApiId == nil || len(*v.ApiId) == 0 { 2332 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 2333 } 2334 if v.ApiId != nil { 2335 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 2336 return err 2337 } 2338 } 2339 2340 if v.FunctionId == nil || len(*v.FunctionId) == 0 { 2341 return &smithy.SerializationError{Err: fmt.Errorf("input member functionId must not be empty")} 2342 } 2343 if v.FunctionId != nil { 2344 if err := encoder.SetURI("functionId").String(*v.FunctionId); err != nil { 2345 return err 2346 } 2347 } 2348 2349 if v.MaxResults != 0 { 2350 encoder.SetQuery("maxResults").Integer(v.MaxResults) 2351 } 2352 2353 if v.NextToken != nil { 2354 encoder.SetQuery("nextToken").String(*v.NextToken) 2355 } 2356 2357 return nil 2358} 2359 2360type awsRestjson1_serializeOpListTagsForResource struct { 2361} 2362 2363func (*awsRestjson1_serializeOpListTagsForResource) ID() string { 2364 return "OperationSerializer" 2365} 2366 2367func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2368 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2369) { 2370 request, ok := in.Request.(*smithyhttp.Request) 2371 if !ok { 2372 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2373 } 2374 2375 input, ok := in.Parameters.(*ListTagsForResourceInput) 2376 _ = input 2377 if !ok { 2378 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2379 } 2380 2381 opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") 2382 request.URL.Path = opPath 2383 if len(request.URL.RawQuery) > 0 { 2384 request.URL.RawQuery = "&" + opQuery 2385 } else { 2386 request.URL.RawQuery = opQuery 2387 } 2388 2389 request.Method = "GET" 2390 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2391 if err != nil { 2392 return out, metadata, &smithy.SerializationError{Err: err} 2393 } 2394 2395 if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { 2396 return out, metadata, &smithy.SerializationError{Err: err} 2397 } 2398 2399 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2400 return out, metadata, &smithy.SerializationError{Err: err} 2401 } 2402 in.Request = request 2403 2404 return next.HandleSerialize(ctx, in) 2405} 2406func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { 2407 if v == nil { 2408 return fmt.Errorf("unsupported serialization of nil %T", v) 2409 } 2410 2411 if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { 2412 return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} 2413 } 2414 if v.ResourceArn != nil { 2415 if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { 2416 return err 2417 } 2418 } 2419 2420 return nil 2421} 2422 2423type awsRestjson1_serializeOpListTypes struct { 2424} 2425 2426func (*awsRestjson1_serializeOpListTypes) ID() string { 2427 return "OperationSerializer" 2428} 2429 2430func (m *awsRestjson1_serializeOpListTypes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2431 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2432) { 2433 request, ok := in.Request.(*smithyhttp.Request) 2434 if !ok { 2435 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2436 } 2437 2438 input, ok := in.Parameters.(*ListTypesInput) 2439 _ = input 2440 if !ok { 2441 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2442 } 2443 2444 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/types") 2445 request.URL.Path = opPath 2446 if len(request.URL.RawQuery) > 0 { 2447 request.URL.RawQuery = "&" + opQuery 2448 } else { 2449 request.URL.RawQuery = opQuery 2450 } 2451 2452 request.Method = "GET" 2453 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2454 if err != nil { 2455 return out, metadata, &smithy.SerializationError{Err: err} 2456 } 2457 2458 if err := awsRestjson1_serializeOpHttpBindingsListTypesInput(input, restEncoder); err != nil { 2459 return out, metadata, &smithy.SerializationError{Err: err} 2460 } 2461 2462 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2463 return out, metadata, &smithy.SerializationError{Err: err} 2464 } 2465 in.Request = request 2466 2467 return next.HandleSerialize(ctx, in) 2468} 2469func awsRestjson1_serializeOpHttpBindingsListTypesInput(v *ListTypesInput, encoder *httpbinding.Encoder) error { 2470 if v == nil { 2471 return fmt.Errorf("unsupported serialization of nil %T", v) 2472 } 2473 2474 if v.ApiId == nil || len(*v.ApiId) == 0 { 2475 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 2476 } 2477 if v.ApiId != nil { 2478 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 2479 return err 2480 } 2481 } 2482 2483 if len(v.Format) > 0 { 2484 encoder.SetQuery("format").String(string(v.Format)) 2485 } 2486 2487 if v.MaxResults != 0 { 2488 encoder.SetQuery("maxResults").Integer(v.MaxResults) 2489 } 2490 2491 if v.NextToken != nil { 2492 encoder.SetQuery("nextToken").String(*v.NextToken) 2493 } 2494 2495 return nil 2496} 2497 2498type awsRestjson1_serializeOpStartSchemaCreation struct { 2499} 2500 2501func (*awsRestjson1_serializeOpStartSchemaCreation) ID() string { 2502 return "OperationSerializer" 2503} 2504 2505func (m *awsRestjson1_serializeOpStartSchemaCreation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2506 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2507) { 2508 request, ok := in.Request.(*smithyhttp.Request) 2509 if !ok { 2510 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2511 } 2512 2513 input, ok := in.Parameters.(*StartSchemaCreationInput) 2514 _ = input 2515 if !ok { 2516 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2517 } 2518 2519 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/schemacreation") 2520 request.URL.Path = opPath 2521 if len(request.URL.RawQuery) > 0 { 2522 request.URL.RawQuery = "&" + opQuery 2523 } else { 2524 request.URL.RawQuery = opQuery 2525 } 2526 2527 request.Method = "POST" 2528 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2529 if err != nil { 2530 return out, metadata, &smithy.SerializationError{Err: err} 2531 } 2532 2533 if err := awsRestjson1_serializeOpHttpBindingsStartSchemaCreationInput(input, restEncoder); err != nil { 2534 return out, metadata, &smithy.SerializationError{Err: err} 2535 } 2536 2537 restEncoder.SetHeader("Content-Type").String("application/json") 2538 2539 jsonEncoder := smithyjson.NewEncoder() 2540 if err := awsRestjson1_serializeOpDocumentStartSchemaCreationInput(input, jsonEncoder.Value); err != nil { 2541 return out, metadata, &smithy.SerializationError{Err: err} 2542 } 2543 2544 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 2545 return out, metadata, &smithy.SerializationError{Err: err} 2546 } 2547 2548 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2549 return out, metadata, &smithy.SerializationError{Err: err} 2550 } 2551 in.Request = request 2552 2553 return next.HandleSerialize(ctx, in) 2554} 2555func awsRestjson1_serializeOpHttpBindingsStartSchemaCreationInput(v *StartSchemaCreationInput, encoder *httpbinding.Encoder) error { 2556 if v == nil { 2557 return fmt.Errorf("unsupported serialization of nil %T", v) 2558 } 2559 2560 if v.ApiId == nil || len(*v.ApiId) == 0 { 2561 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 2562 } 2563 if v.ApiId != nil { 2564 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 2565 return err 2566 } 2567 } 2568 2569 return nil 2570} 2571 2572func awsRestjson1_serializeOpDocumentStartSchemaCreationInput(v *StartSchemaCreationInput, value smithyjson.Value) error { 2573 object := value.Object() 2574 defer object.Close() 2575 2576 if v.Definition != nil { 2577 ok := object.Key("definition") 2578 ok.Base64EncodeBytes(v.Definition) 2579 } 2580 2581 return nil 2582} 2583 2584type awsRestjson1_serializeOpTagResource struct { 2585} 2586 2587func (*awsRestjson1_serializeOpTagResource) ID() string { 2588 return "OperationSerializer" 2589} 2590 2591func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2592 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2593) { 2594 request, ok := in.Request.(*smithyhttp.Request) 2595 if !ok { 2596 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2597 } 2598 2599 input, ok := in.Parameters.(*TagResourceInput) 2600 _ = input 2601 if !ok { 2602 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2603 } 2604 2605 opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") 2606 request.URL.Path = opPath 2607 if len(request.URL.RawQuery) > 0 { 2608 request.URL.RawQuery = "&" + opQuery 2609 } else { 2610 request.URL.RawQuery = opQuery 2611 } 2612 2613 request.Method = "POST" 2614 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2615 if err != nil { 2616 return out, metadata, &smithy.SerializationError{Err: err} 2617 } 2618 2619 if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { 2620 return out, metadata, &smithy.SerializationError{Err: err} 2621 } 2622 2623 restEncoder.SetHeader("Content-Type").String("application/json") 2624 2625 jsonEncoder := smithyjson.NewEncoder() 2626 if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { 2627 return out, metadata, &smithy.SerializationError{Err: err} 2628 } 2629 2630 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 2631 return out, metadata, &smithy.SerializationError{Err: err} 2632 } 2633 2634 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2635 return out, metadata, &smithy.SerializationError{Err: err} 2636 } 2637 in.Request = request 2638 2639 return next.HandleSerialize(ctx, in) 2640} 2641func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { 2642 if v == nil { 2643 return fmt.Errorf("unsupported serialization of nil %T", v) 2644 } 2645 2646 if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { 2647 return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} 2648 } 2649 if v.ResourceArn != nil { 2650 if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { 2651 return err 2652 } 2653 } 2654 2655 return nil 2656} 2657 2658func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { 2659 object := value.Object() 2660 defer object.Close() 2661 2662 if v.Tags != nil { 2663 ok := object.Key("tags") 2664 if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { 2665 return err 2666 } 2667 } 2668 2669 return nil 2670} 2671 2672type awsRestjson1_serializeOpUntagResource struct { 2673} 2674 2675func (*awsRestjson1_serializeOpUntagResource) ID() string { 2676 return "OperationSerializer" 2677} 2678 2679func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2680 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2681) { 2682 request, ok := in.Request.(*smithyhttp.Request) 2683 if !ok { 2684 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2685 } 2686 2687 input, ok := in.Parameters.(*UntagResourceInput) 2688 _ = input 2689 if !ok { 2690 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2691 } 2692 2693 opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") 2694 request.URL.Path = opPath 2695 if len(request.URL.RawQuery) > 0 { 2696 request.URL.RawQuery = "&" + opQuery 2697 } else { 2698 request.URL.RawQuery = opQuery 2699 } 2700 2701 request.Method = "DELETE" 2702 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2703 if err != nil { 2704 return out, metadata, &smithy.SerializationError{Err: err} 2705 } 2706 2707 if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { 2708 return out, metadata, &smithy.SerializationError{Err: err} 2709 } 2710 2711 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2712 return out, metadata, &smithy.SerializationError{Err: err} 2713 } 2714 in.Request = request 2715 2716 return next.HandleSerialize(ctx, in) 2717} 2718func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { 2719 if v == nil { 2720 return fmt.Errorf("unsupported serialization of nil %T", v) 2721 } 2722 2723 if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { 2724 return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} 2725 } 2726 if v.ResourceArn != nil { 2727 if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { 2728 return err 2729 } 2730 } 2731 2732 if v.TagKeys != nil { 2733 for i := range v.TagKeys { 2734 encoder.AddQuery("tagKeys").String(v.TagKeys[i]) 2735 } 2736 } 2737 2738 return nil 2739} 2740 2741type awsRestjson1_serializeOpUpdateApiCache struct { 2742} 2743 2744func (*awsRestjson1_serializeOpUpdateApiCache) ID() string { 2745 return "OperationSerializer" 2746} 2747 2748func (m *awsRestjson1_serializeOpUpdateApiCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2749 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2750) { 2751 request, ok := in.Request.(*smithyhttp.Request) 2752 if !ok { 2753 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2754 } 2755 2756 input, ok := in.Parameters.(*UpdateApiCacheInput) 2757 _ = input 2758 if !ok { 2759 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2760 } 2761 2762 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/ApiCaches/update") 2763 request.URL.Path = opPath 2764 if len(request.URL.RawQuery) > 0 { 2765 request.URL.RawQuery = "&" + opQuery 2766 } else { 2767 request.URL.RawQuery = opQuery 2768 } 2769 2770 request.Method = "POST" 2771 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2772 if err != nil { 2773 return out, metadata, &smithy.SerializationError{Err: err} 2774 } 2775 2776 if err := awsRestjson1_serializeOpHttpBindingsUpdateApiCacheInput(input, restEncoder); err != nil { 2777 return out, metadata, &smithy.SerializationError{Err: err} 2778 } 2779 2780 restEncoder.SetHeader("Content-Type").String("application/json") 2781 2782 jsonEncoder := smithyjson.NewEncoder() 2783 if err := awsRestjson1_serializeOpDocumentUpdateApiCacheInput(input, jsonEncoder.Value); err != nil { 2784 return out, metadata, &smithy.SerializationError{Err: err} 2785 } 2786 2787 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 2788 return out, metadata, &smithy.SerializationError{Err: err} 2789 } 2790 2791 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2792 return out, metadata, &smithy.SerializationError{Err: err} 2793 } 2794 in.Request = request 2795 2796 return next.HandleSerialize(ctx, in) 2797} 2798func awsRestjson1_serializeOpHttpBindingsUpdateApiCacheInput(v *UpdateApiCacheInput, encoder *httpbinding.Encoder) error { 2799 if v == nil { 2800 return fmt.Errorf("unsupported serialization of nil %T", v) 2801 } 2802 2803 if v.ApiId == nil || len(*v.ApiId) == 0 { 2804 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 2805 } 2806 if v.ApiId != nil { 2807 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 2808 return err 2809 } 2810 } 2811 2812 return nil 2813} 2814 2815func awsRestjson1_serializeOpDocumentUpdateApiCacheInput(v *UpdateApiCacheInput, value smithyjson.Value) error { 2816 object := value.Object() 2817 defer object.Close() 2818 2819 if len(v.ApiCachingBehavior) > 0 { 2820 ok := object.Key("apiCachingBehavior") 2821 ok.String(string(v.ApiCachingBehavior)) 2822 } 2823 2824 if v.Ttl != 0 { 2825 ok := object.Key("ttl") 2826 ok.Long(v.Ttl) 2827 } 2828 2829 if len(v.Type) > 0 { 2830 ok := object.Key("type") 2831 ok.String(string(v.Type)) 2832 } 2833 2834 return nil 2835} 2836 2837type awsRestjson1_serializeOpUpdateApiKey struct { 2838} 2839 2840func (*awsRestjson1_serializeOpUpdateApiKey) ID() string { 2841 return "OperationSerializer" 2842} 2843 2844func (m *awsRestjson1_serializeOpUpdateApiKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2845 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2846) { 2847 request, ok := in.Request.(*smithyhttp.Request) 2848 if !ok { 2849 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2850 } 2851 2852 input, ok := in.Parameters.(*UpdateApiKeyInput) 2853 _ = input 2854 if !ok { 2855 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2856 } 2857 2858 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/apikeys/{id}") 2859 request.URL.Path = opPath 2860 if len(request.URL.RawQuery) > 0 { 2861 request.URL.RawQuery = "&" + opQuery 2862 } else { 2863 request.URL.RawQuery = opQuery 2864 } 2865 2866 request.Method = "POST" 2867 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2868 if err != nil { 2869 return out, metadata, &smithy.SerializationError{Err: err} 2870 } 2871 2872 if err := awsRestjson1_serializeOpHttpBindingsUpdateApiKeyInput(input, restEncoder); err != nil { 2873 return out, metadata, &smithy.SerializationError{Err: err} 2874 } 2875 2876 restEncoder.SetHeader("Content-Type").String("application/json") 2877 2878 jsonEncoder := smithyjson.NewEncoder() 2879 if err := awsRestjson1_serializeOpDocumentUpdateApiKeyInput(input, jsonEncoder.Value); err != nil { 2880 return out, metadata, &smithy.SerializationError{Err: err} 2881 } 2882 2883 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 2884 return out, metadata, &smithy.SerializationError{Err: err} 2885 } 2886 2887 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2888 return out, metadata, &smithy.SerializationError{Err: err} 2889 } 2890 in.Request = request 2891 2892 return next.HandleSerialize(ctx, in) 2893} 2894func awsRestjson1_serializeOpHttpBindingsUpdateApiKeyInput(v *UpdateApiKeyInput, encoder *httpbinding.Encoder) error { 2895 if v == nil { 2896 return fmt.Errorf("unsupported serialization of nil %T", v) 2897 } 2898 2899 if v.ApiId == nil || len(*v.ApiId) == 0 { 2900 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 2901 } 2902 if v.ApiId != nil { 2903 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 2904 return err 2905 } 2906 } 2907 2908 if v.Id == nil || len(*v.Id) == 0 { 2909 return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} 2910 } 2911 if v.Id != nil { 2912 if err := encoder.SetURI("id").String(*v.Id); err != nil { 2913 return err 2914 } 2915 } 2916 2917 return nil 2918} 2919 2920func awsRestjson1_serializeOpDocumentUpdateApiKeyInput(v *UpdateApiKeyInput, value smithyjson.Value) error { 2921 object := value.Object() 2922 defer object.Close() 2923 2924 if v.Description != nil { 2925 ok := object.Key("description") 2926 ok.String(*v.Description) 2927 } 2928 2929 if v.Expires != 0 { 2930 ok := object.Key("expires") 2931 ok.Long(v.Expires) 2932 } 2933 2934 return nil 2935} 2936 2937type awsRestjson1_serializeOpUpdateDataSource struct { 2938} 2939 2940func (*awsRestjson1_serializeOpUpdateDataSource) ID() string { 2941 return "OperationSerializer" 2942} 2943 2944func (m *awsRestjson1_serializeOpUpdateDataSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2945 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2946) { 2947 request, ok := in.Request.(*smithyhttp.Request) 2948 if !ok { 2949 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2950 } 2951 2952 input, ok := in.Parameters.(*UpdateDataSourceInput) 2953 _ = input 2954 if !ok { 2955 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2956 } 2957 2958 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/datasources/{name}") 2959 request.URL.Path = opPath 2960 if len(request.URL.RawQuery) > 0 { 2961 request.URL.RawQuery = "&" + opQuery 2962 } else { 2963 request.URL.RawQuery = opQuery 2964 } 2965 2966 request.Method = "POST" 2967 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2968 if err != nil { 2969 return out, metadata, &smithy.SerializationError{Err: err} 2970 } 2971 2972 if err := awsRestjson1_serializeOpHttpBindingsUpdateDataSourceInput(input, restEncoder); err != nil { 2973 return out, metadata, &smithy.SerializationError{Err: err} 2974 } 2975 2976 restEncoder.SetHeader("Content-Type").String("application/json") 2977 2978 jsonEncoder := smithyjson.NewEncoder() 2979 if err := awsRestjson1_serializeOpDocumentUpdateDataSourceInput(input, jsonEncoder.Value); err != nil { 2980 return out, metadata, &smithy.SerializationError{Err: err} 2981 } 2982 2983 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 2984 return out, metadata, &smithy.SerializationError{Err: err} 2985 } 2986 2987 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2988 return out, metadata, &smithy.SerializationError{Err: err} 2989 } 2990 in.Request = request 2991 2992 return next.HandleSerialize(ctx, in) 2993} 2994func awsRestjson1_serializeOpHttpBindingsUpdateDataSourceInput(v *UpdateDataSourceInput, encoder *httpbinding.Encoder) error { 2995 if v == nil { 2996 return fmt.Errorf("unsupported serialization of nil %T", v) 2997 } 2998 2999 if v.ApiId == nil || len(*v.ApiId) == 0 { 3000 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 3001 } 3002 if v.ApiId != nil { 3003 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 3004 return err 3005 } 3006 } 3007 3008 if v.Name == nil || len(*v.Name) == 0 { 3009 return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} 3010 } 3011 if v.Name != nil { 3012 if err := encoder.SetURI("name").String(*v.Name); err != nil { 3013 return err 3014 } 3015 } 3016 3017 return nil 3018} 3019 3020func awsRestjson1_serializeOpDocumentUpdateDataSourceInput(v *UpdateDataSourceInput, value smithyjson.Value) error { 3021 object := value.Object() 3022 defer object.Close() 3023 3024 if v.Description != nil { 3025 ok := object.Key("description") 3026 ok.String(*v.Description) 3027 } 3028 3029 if v.DynamodbConfig != nil { 3030 ok := object.Key("dynamodbConfig") 3031 if err := awsRestjson1_serializeDocumentDynamodbDataSourceConfig(v.DynamodbConfig, ok); err != nil { 3032 return err 3033 } 3034 } 3035 3036 if v.ElasticsearchConfig != nil { 3037 ok := object.Key("elasticsearchConfig") 3038 if err := awsRestjson1_serializeDocumentElasticsearchDataSourceConfig(v.ElasticsearchConfig, ok); err != nil { 3039 return err 3040 } 3041 } 3042 3043 if v.HttpConfig != nil { 3044 ok := object.Key("httpConfig") 3045 if err := awsRestjson1_serializeDocumentHttpDataSourceConfig(v.HttpConfig, ok); err != nil { 3046 return err 3047 } 3048 } 3049 3050 if v.LambdaConfig != nil { 3051 ok := object.Key("lambdaConfig") 3052 if err := awsRestjson1_serializeDocumentLambdaDataSourceConfig(v.LambdaConfig, ok); err != nil { 3053 return err 3054 } 3055 } 3056 3057 if v.RelationalDatabaseConfig != nil { 3058 ok := object.Key("relationalDatabaseConfig") 3059 if err := awsRestjson1_serializeDocumentRelationalDatabaseDataSourceConfig(v.RelationalDatabaseConfig, ok); err != nil { 3060 return err 3061 } 3062 } 3063 3064 if v.ServiceRoleArn != nil { 3065 ok := object.Key("serviceRoleArn") 3066 ok.String(*v.ServiceRoleArn) 3067 } 3068 3069 if len(v.Type) > 0 { 3070 ok := object.Key("type") 3071 ok.String(string(v.Type)) 3072 } 3073 3074 return nil 3075} 3076 3077type awsRestjson1_serializeOpUpdateFunction struct { 3078} 3079 3080func (*awsRestjson1_serializeOpUpdateFunction) ID() string { 3081 return "OperationSerializer" 3082} 3083 3084func (m *awsRestjson1_serializeOpUpdateFunction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3085 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3086) { 3087 request, ok := in.Request.(*smithyhttp.Request) 3088 if !ok { 3089 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3090 } 3091 3092 input, ok := in.Parameters.(*UpdateFunctionInput) 3093 _ = input 3094 if !ok { 3095 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3096 } 3097 3098 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/functions/{functionId}") 3099 request.URL.Path = opPath 3100 if len(request.URL.RawQuery) > 0 { 3101 request.URL.RawQuery = "&" + opQuery 3102 } else { 3103 request.URL.RawQuery = opQuery 3104 } 3105 3106 request.Method = "POST" 3107 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3108 if err != nil { 3109 return out, metadata, &smithy.SerializationError{Err: err} 3110 } 3111 3112 if err := awsRestjson1_serializeOpHttpBindingsUpdateFunctionInput(input, restEncoder); err != nil { 3113 return out, metadata, &smithy.SerializationError{Err: err} 3114 } 3115 3116 restEncoder.SetHeader("Content-Type").String("application/json") 3117 3118 jsonEncoder := smithyjson.NewEncoder() 3119 if err := awsRestjson1_serializeOpDocumentUpdateFunctionInput(input, jsonEncoder.Value); err != nil { 3120 return out, metadata, &smithy.SerializationError{Err: err} 3121 } 3122 3123 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 3124 return out, metadata, &smithy.SerializationError{Err: err} 3125 } 3126 3127 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3128 return out, metadata, &smithy.SerializationError{Err: err} 3129 } 3130 in.Request = request 3131 3132 return next.HandleSerialize(ctx, in) 3133} 3134func awsRestjson1_serializeOpHttpBindingsUpdateFunctionInput(v *UpdateFunctionInput, encoder *httpbinding.Encoder) error { 3135 if v == nil { 3136 return fmt.Errorf("unsupported serialization of nil %T", v) 3137 } 3138 3139 if v.ApiId == nil || len(*v.ApiId) == 0 { 3140 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 3141 } 3142 if v.ApiId != nil { 3143 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 3144 return err 3145 } 3146 } 3147 3148 if v.FunctionId == nil || len(*v.FunctionId) == 0 { 3149 return &smithy.SerializationError{Err: fmt.Errorf("input member functionId must not be empty")} 3150 } 3151 if v.FunctionId != nil { 3152 if err := encoder.SetURI("functionId").String(*v.FunctionId); err != nil { 3153 return err 3154 } 3155 } 3156 3157 return nil 3158} 3159 3160func awsRestjson1_serializeOpDocumentUpdateFunctionInput(v *UpdateFunctionInput, value smithyjson.Value) error { 3161 object := value.Object() 3162 defer object.Close() 3163 3164 if v.DataSourceName != nil { 3165 ok := object.Key("dataSourceName") 3166 ok.String(*v.DataSourceName) 3167 } 3168 3169 if v.Description != nil { 3170 ok := object.Key("description") 3171 ok.String(*v.Description) 3172 } 3173 3174 if v.FunctionVersion != nil { 3175 ok := object.Key("functionVersion") 3176 ok.String(*v.FunctionVersion) 3177 } 3178 3179 if v.Name != nil { 3180 ok := object.Key("name") 3181 ok.String(*v.Name) 3182 } 3183 3184 if v.RequestMappingTemplate != nil { 3185 ok := object.Key("requestMappingTemplate") 3186 ok.String(*v.RequestMappingTemplate) 3187 } 3188 3189 if v.ResponseMappingTemplate != nil { 3190 ok := object.Key("responseMappingTemplate") 3191 ok.String(*v.ResponseMappingTemplate) 3192 } 3193 3194 return nil 3195} 3196 3197type awsRestjson1_serializeOpUpdateGraphqlApi struct { 3198} 3199 3200func (*awsRestjson1_serializeOpUpdateGraphqlApi) ID() string { 3201 return "OperationSerializer" 3202} 3203 3204func (m *awsRestjson1_serializeOpUpdateGraphqlApi) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3205 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3206) { 3207 request, ok := in.Request.(*smithyhttp.Request) 3208 if !ok { 3209 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3210 } 3211 3212 input, ok := in.Parameters.(*UpdateGraphqlApiInput) 3213 _ = input 3214 if !ok { 3215 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3216 } 3217 3218 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}") 3219 request.URL.Path = opPath 3220 if len(request.URL.RawQuery) > 0 { 3221 request.URL.RawQuery = "&" + opQuery 3222 } else { 3223 request.URL.RawQuery = opQuery 3224 } 3225 3226 request.Method = "POST" 3227 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3228 if err != nil { 3229 return out, metadata, &smithy.SerializationError{Err: err} 3230 } 3231 3232 if err := awsRestjson1_serializeOpHttpBindingsUpdateGraphqlApiInput(input, restEncoder); err != nil { 3233 return out, metadata, &smithy.SerializationError{Err: err} 3234 } 3235 3236 restEncoder.SetHeader("Content-Type").String("application/json") 3237 3238 jsonEncoder := smithyjson.NewEncoder() 3239 if err := awsRestjson1_serializeOpDocumentUpdateGraphqlApiInput(input, jsonEncoder.Value); err != nil { 3240 return out, metadata, &smithy.SerializationError{Err: err} 3241 } 3242 3243 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 3244 return out, metadata, &smithy.SerializationError{Err: err} 3245 } 3246 3247 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3248 return out, metadata, &smithy.SerializationError{Err: err} 3249 } 3250 in.Request = request 3251 3252 return next.HandleSerialize(ctx, in) 3253} 3254func awsRestjson1_serializeOpHttpBindingsUpdateGraphqlApiInput(v *UpdateGraphqlApiInput, encoder *httpbinding.Encoder) error { 3255 if v == nil { 3256 return fmt.Errorf("unsupported serialization of nil %T", v) 3257 } 3258 3259 if v.ApiId == nil || len(*v.ApiId) == 0 { 3260 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 3261 } 3262 if v.ApiId != nil { 3263 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 3264 return err 3265 } 3266 } 3267 3268 return nil 3269} 3270 3271func awsRestjson1_serializeOpDocumentUpdateGraphqlApiInput(v *UpdateGraphqlApiInput, value smithyjson.Value) error { 3272 object := value.Object() 3273 defer object.Close() 3274 3275 if v.AdditionalAuthenticationProviders != nil { 3276 ok := object.Key("additionalAuthenticationProviders") 3277 if err := awsRestjson1_serializeDocumentAdditionalAuthenticationProviders(v.AdditionalAuthenticationProviders, ok); err != nil { 3278 return err 3279 } 3280 } 3281 3282 if len(v.AuthenticationType) > 0 { 3283 ok := object.Key("authenticationType") 3284 ok.String(string(v.AuthenticationType)) 3285 } 3286 3287 if v.LogConfig != nil { 3288 ok := object.Key("logConfig") 3289 if err := awsRestjson1_serializeDocumentLogConfig(v.LogConfig, ok); err != nil { 3290 return err 3291 } 3292 } 3293 3294 if v.Name != nil { 3295 ok := object.Key("name") 3296 ok.String(*v.Name) 3297 } 3298 3299 if v.OpenIDConnectConfig != nil { 3300 ok := object.Key("openIDConnectConfig") 3301 if err := awsRestjson1_serializeDocumentOpenIDConnectConfig(v.OpenIDConnectConfig, ok); err != nil { 3302 return err 3303 } 3304 } 3305 3306 if v.UserPoolConfig != nil { 3307 ok := object.Key("userPoolConfig") 3308 if err := awsRestjson1_serializeDocumentUserPoolConfig(v.UserPoolConfig, ok); err != nil { 3309 return err 3310 } 3311 } 3312 3313 if v.XrayEnabled { 3314 ok := object.Key("xrayEnabled") 3315 ok.Boolean(v.XrayEnabled) 3316 } 3317 3318 return nil 3319} 3320 3321type awsRestjson1_serializeOpUpdateResolver struct { 3322} 3323 3324func (*awsRestjson1_serializeOpUpdateResolver) ID() string { 3325 return "OperationSerializer" 3326} 3327 3328func (m *awsRestjson1_serializeOpUpdateResolver) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3329 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3330) { 3331 request, ok := in.Request.(*smithyhttp.Request) 3332 if !ok { 3333 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3334 } 3335 3336 input, ok := in.Parameters.(*UpdateResolverInput) 3337 _ = input 3338 if !ok { 3339 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3340 } 3341 3342 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/types/{typeName}/resolvers/{fieldName}") 3343 request.URL.Path = opPath 3344 if len(request.URL.RawQuery) > 0 { 3345 request.URL.RawQuery = "&" + opQuery 3346 } else { 3347 request.URL.RawQuery = opQuery 3348 } 3349 3350 request.Method = "POST" 3351 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3352 if err != nil { 3353 return out, metadata, &smithy.SerializationError{Err: err} 3354 } 3355 3356 if err := awsRestjson1_serializeOpHttpBindingsUpdateResolverInput(input, restEncoder); err != nil { 3357 return out, metadata, &smithy.SerializationError{Err: err} 3358 } 3359 3360 restEncoder.SetHeader("Content-Type").String("application/json") 3361 3362 jsonEncoder := smithyjson.NewEncoder() 3363 if err := awsRestjson1_serializeOpDocumentUpdateResolverInput(input, jsonEncoder.Value); err != nil { 3364 return out, metadata, &smithy.SerializationError{Err: err} 3365 } 3366 3367 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 3368 return out, metadata, &smithy.SerializationError{Err: err} 3369 } 3370 3371 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3372 return out, metadata, &smithy.SerializationError{Err: err} 3373 } 3374 in.Request = request 3375 3376 return next.HandleSerialize(ctx, in) 3377} 3378func awsRestjson1_serializeOpHttpBindingsUpdateResolverInput(v *UpdateResolverInput, encoder *httpbinding.Encoder) error { 3379 if v == nil { 3380 return fmt.Errorf("unsupported serialization of nil %T", v) 3381 } 3382 3383 if v.ApiId == nil || len(*v.ApiId) == 0 { 3384 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 3385 } 3386 if v.ApiId != nil { 3387 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 3388 return err 3389 } 3390 } 3391 3392 if v.FieldName == nil || len(*v.FieldName) == 0 { 3393 return &smithy.SerializationError{Err: fmt.Errorf("input member fieldName must not be empty")} 3394 } 3395 if v.FieldName != nil { 3396 if err := encoder.SetURI("fieldName").String(*v.FieldName); err != nil { 3397 return err 3398 } 3399 } 3400 3401 if v.TypeName == nil || len(*v.TypeName) == 0 { 3402 return &smithy.SerializationError{Err: fmt.Errorf("input member typeName must not be empty")} 3403 } 3404 if v.TypeName != nil { 3405 if err := encoder.SetURI("typeName").String(*v.TypeName); err != nil { 3406 return err 3407 } 3408 } 3409 3410 return nil 3411} 3412 3413func awsRestjson1_serializeOpDocumentUpdateResolverInput(v *UpdateResolverInput, value smithyjson.Value) error { 3414 object := value.Object() 3415 defer object.Close() 3416 3417 if v.CachingConfig != nil { 3418 ok := object.Key("cachingConfig") 3419 if err := awsRestjson1_serializeDocumentCachingConfig(v.CachingConfig, ok); err != nil { 3420 return err 3421 } 3422 } 3423 3424 if v.DataSourceName != nil { 3425 ok := object.Key("dataSourceName") 3426 ok.String(*v.DataSourceName) 3427 } 3428 3429 if len(v.Kind) > 0 { 3430 ok := object.Key("kind") 3431 ok.String(string(v.Kind)) 3432 } 3433 3434 if v.PipelineConfig != nil { 3435 ok := object.Key("pipelineConfig") 3436 if err := awsRestjson1_serializeDocumentPipelineConfig(v.PipelineConfig, ok); err != nil { 3437 return err 3438 } 3439 } 3440 3441 if v.RequestMappingTemplate != nil { 3442 ok := object.Key("requestMappingTemplate") 3443 ok.String(*v.RequestMappingTemplate) 3444 } 3445 3446 if v.ResponseMappingTemplate != nil { 3447 ok := object.Key("responseMappingTemplate") 3448 ok.String(*v.ResponseMappingTemplate) 3449 } 3450 3451 if v.SyncConfig != nil { 3452 ok := object.Key("syncConfig") 3453 if err := awsRestjson1_serializeDocumentSyncConfig(v.SyncConfig, ok); err != nil { 3454 return err 3455 } 3456 } 3457 3458 return nil 3459} 3460 3461type awsRestjson1_serializeOpUpdateType struct { 3462} 3463 3464func (*awsRestjson1_serializeOpUpdateType) ID() string { 3465 return "OperationSerializer" 3466} 3467 3468func (m *awsRestjson1_serializeOpUpdateType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3469 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3470) { 3471 request, ok := in.Request.(*smithyhttp.Request) 3472 if !ok { 3473 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3474 } 3475 3476 input, ok := in.Parameters.(*UpdateTypeInput) 3477 _ = input 3478 if !ok { 3479 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3480 } 3481 3482 opPath, opQuery := httpbinding.SplitURI("/apis/{apiId}/types/{typeName}") 3483 request.URL.Path = opPath 3484 if len(request.URL.RawQuery) > 0 { 3485 request.URL.RawQuery = "&" + opQuery 3486 } else { 3487 request.URL.RawQuery = opQuery 3488 } 3489 3490 request.Method = "POST" 3491 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3492 if err != nil { 3493 return out, metadata, &smithy.SerializationError{Err: err} 3494 } 3495 3496 if err := awsRestjson1_serializeOpHttpBindingsUpdateTypeInput(input, restEncoder); err != nil { 3497 return out, metadata, &smithy.SerializationError{Err: err} 3498 } 3499 3500 restEncoder.SetHeader("Content-Type").String("application/json") 3501 3502 jsonEncoder := smithyjson.NewEncoder() 3503 if err := awsRestjson1_serializeOpDocumentUpdateTypeInput(input, jsonEncoder.Value); err != nil { 3504 return out, metadata, &smithy.SerializationError{Err: err} 3505 } 3506 3507 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 3508 return out, metadata, &smithy.SerializationError{Err: err} 3509 } 3510 3511 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3512 return out, metadata, &smithy.SerializationError{Err: err} 3513 } 3514 in.Request = request 3515 3516 return next.HandleSerialize(ctx, in) 3517} 3518func awsRestjson1_serializeOpHttpBindingsUpdateTypeInput(v *UpdateTypeInput, encoder *httpbinding.Encoder) error { 3519 if v == nil { 3520 return fmt.Errorf("unsupported serialization of nil %T", v) 3521 } 3522 3523 if v.ApiId == nil || len(*v.ApiId) == 0 { 3524 return &smithy.SerializationError{Err: fmt.Errorf("input member apiId must not be empty")} 3525 } 3526 if v.ApiId != nil { 3527 if err := encoder.SetURI("apiId").String(*v.ApiId); err != nil { 3528 return err 3529 } 3530 } 3531 3532 if v.TypeName == nil || len(*v.TypeName) == 0 { 3533 return &smithy.SerializationError{Err: fmt.Errorf("input member typeName must not be empty")} 3534 } 3535 if v.TypeName != nil { 3536 if err := encoder.SetURI("typeName").String(*v.TypeName); err != nil { 3537 return err 3538 } 3539 } 3540 3541 return nil 3542} 3543 3544func awsRestjson1_serializeOpDocumentUpdateTypeInput(v *UpdateTypeInput, value smithyjson.Value) error { 3545 object := value.Object() 3546 defer object.Close() 3547 3548 if v.Definition != nil { 3549 ok := object.Key("definition") 3550 ok.String(*v.Definition) 3551 } 3552 3553 if len(v.Format) > 0 { 3554 ok := object.Key("format") 3555 ok.String(string(v.Format)) 3556 } 3557 3558 return nil 3559} 3560 3561func awsRestjson1_serializeDocumentAdditionalAuthenticationProvider(v *types.AdditionalAuthenticationProvider, value smithyjson.Value) error { 3562 object := value.Object() 3563 defer object.Close() 3564 3565 if len(v.AuthenticationType) > 0 { 3566 ok := object.Key("authenticationType") 3567 ok.String(string(v.AuthenticationType)) 3568 } 3569 3570 if v.OpenIDConnectConfig != nil { 3571 ok := object.Key("openIDConnectConfig") 3572 if err := awsRestjson1_serializeDocumentOpenIDConnectConfig(v.OpenIDConnectConfig, ok); err != nil { 3573 return err 3574 } 3575 } 3576 3577 if v.UserPoolConfig != nil { 3578 ok := object.Key("userPoolConfig") 3579 if err := awsRestjson1_serializeDocumentCognitoUserPoolConfig(v.UserPoolConfig, ok); err != nil { 3580 return err 3581 } 3582 } 3583 3584 return nil 3585} 3586 3587func awsRestjson1_serializeDocumentAdditionalAuthenticationProviders(v []types.AdditionalAuthenticationProvider, value smithyjson.Value) error { 3588 array := value.Array() 3589 defer array.Close() 3590 3591 for i := range v { 3592 av := array.Value() 3593 if err := awsRestjson1_serializeDocumentAdditionalAuthenticationProvider(&v[i], av); err != nil { 3594 return err 3595 } 3596 } 3597 return nil 3598} 3599 3600func awsRestjson1_serializeDocumentAuthorizationConfig(v *types.AuthorizationConfig, value smithyjson.Value) error { 3601 object := value.Object() 3602 defer object.Close() 3603 3604 if len(v.AuthorizationType) > 0 { 3605 ok := object.Key("authorizationType") 3606 ok.String(string(v.AuthorizationType)) 3607 } 3608 3609 if v.AwsIamConfig != nil { 3610 ok := object.Key("awsIamConfig") 3611 if err := awsRestjson1_serializeDocumentAwsIamConfig(v.AwsIamConfig, ok); err != nil { 3612 return err 3613 } 3614 } 3615 3616 return nil 3617} 3618 3619func awsRestjson1_serializeDocumentAwsIamConfig(v *types.AwsIamConfig, value smithyjson.Value) error { 3620 object := value.Object() 3621 defer object.Close() 3622 3623 if v.SigningRegion != nil { 3624 ok := object.Key("signingRegion") 3625 ok.String(*v.SigningRegion) 3626 } 3627 3628 if v.SigningServiceName != nil { 3629 ok := object.Key("signingServiceName") 3630 ok.String(*v.SigningServiceName) 3631 } 3632 3633 return nil 3634} 3635 3636func awsRestjson1_serializeDocumentCachingConfig(v *types.CachingConfig, value smithyjson.Value) error { 3637 object := value.Object() 3638 defer object.Close() 3639 3640 if v.CachingKeys != nil { 3641 ok := object.Key("cachingKeys") 3642 if err := awsRestjson1_serializeDocumentCachingKeys(v.CachingKeys, ok); err != nil { 3643 return err 3644 } 3645 } 3646 3647 if v.Ttl != 0 { 3648 ok := object.Key("ttl") 3649 ok.Long(v.Ttl) 3650 } 3651 3652 return nil 3653} 3654 3655func awsRestjson1_serializeDocumentCachingKeys(v []string, value smithyjson.Value) error { 3656 array := value.Array() 3657 defer array.Close() 3658 3659 for i := range v { 3660 av := array.Value() 3661 av.String(v[i]) 3662 } 3663 return nil 3664} 3665 3666func awsRestjson1_serializeDocumentCognitoUserPoolConfig(v *types.CognitoUserPoolConfig, value smithyjson.Value) error { 3667 object := value.Object() 3668 defer object.Close() 3669 3670 if v.AppIdClientRegex != nil { 3671 ok := object.Key("appIdClientRegex") 3672 ok.String(*v.AppIdClientRegex) 3673 } 3674 3675 if v.AwsRegion != nil { 3676 ok := object.Key("awsRegion") 3677 ok.String(*v.AwsRegion) 3678 } 3679 3680 if v.UserPoolId != nil { 3681 ok := object.Key("userPoolId") 3682 ok.String(*v.UserPoolId) 3683 } 3684 3685 return nil 3686} 3687 3688func awsRestjson1_serializeDocumentDeltaSyncConfig(v *types.DeltaSyncConfig, value smithyjson.Value) error { 3689 object := value.Object() 3690 defer object.Close() 3691 3692 if v.BaseTableTTL != 0 { 3693 ok := object.Key("baseTableTTL") 3694 ok.Long(v.BaseTableTTL) 3695 } 3696 3697 if v.DeltaSyncTableName != nil { 3698 ok := object.Key("deltaSyncTableName") 3699 ok.String(*v.DeltaSyncTableName) 3700 } 3701 3702 if v.DeltaSyncTableTTL != 0 { 3703 ok := object.Key("deltaSyncTableTTL") 3704 ok.Long(v.DeltaSyncTableTTL) 3705 } 3706 3707 return nil 3708} 3709 3710func awsRestjson1_serializeDocumentDynamodbDataSourceConfig(v *types.DynamodbDataSourceConfig, value smithyjson.Value) error { 3711 object := value.Object() 3712 defer object.Close() 3713 3714 if v.AwsRegion != nil { 3715 ok := object.Key("awsRegion") 3716 ok.String(*v.AwsRegion) 3717 } 3718 3719 if v.DeltaSyncConfig != nil { 3720 ok := object.Key("deltaSyncConfig") 3721 if err := awsRestjson1_serializeDocumentDeltaSyncConfig(v.DeltaSyncConfig, ok); err != nil { 3722 return err 3723 } 3724 } 3725 3726 if v.TableName != nil { 3727 ok := object.Key("tableName") 3728 ok.String(*v.TableName) 3729 } 3730 3731 if v.UseCallerCredentials { 3732 ok := object.Key("useCallerCredentials") 3733 ok.Boolean(v.UseCallerCredentials) 3734 } 3735 3736 if v.Versioned { 3737 ok := object.Key("versioned") 3738 ok.Boolean(v.Versioned) 3739 } 3740 3741 return nil 3742} 3743 3744func awsRestjson1_serializeDocumentElasticsearchDataSourceConfig(v *types.ElasticsearchDataSourceConfig, value smithyjson.Value) error { 3745 object := value.Object() 3746 defer object.Close() 3747 3748 if v.AwsRegion != nil { 3749 ok := object.Key("awsRegion") 3750 ok.String(*v.AwsRegion) 3751 } 3752 3753 if v.Endpoint != nil { 3754 ok := object.Key("endpoint") 3755 ok.String(*v.Endpoint) 3756 } 3757 3758 return nil 3759} 3760 3761func awsRestjson1_serializeDocumentFunctionsIds(v []string, value smithyjson.Value) error { 3762 array := value.Array() 3763 defer array.Close() 3764 3765 for i := range v { 3766 av := array.Value() 3767 av.String(v[i]) 3768 } 3769 return nil 3770} 3771 3772func awsRestjson1_serializeDocumentHttpDataSourceConfig(v *types.HttpDataSourceConfig, value smithyjson.Value) error { 3773 object := value.Object() 3774 defer object.Close() 3775 3776 if v.AuthorizationConfig != nil { 3777 ok := object.Key("authorizationConfig") 3778 if err := awsRestjson1_serializeDocumentAuthorizationConfig(v.AuthorizationConfig, ok); err != nil { 3779 return err 3780 } 3781 } 3782 3783 if v.Endpoint != nil { 3784 ok := object.Key("endpoint") 3785 ok.String(*v.Endpoint) 3786 } 3787 3788 return nil 3789} 3790 3791func awsRestjson1_serializeDocumentLambdaConflictHandlerConfig(v *types.LambdaConflictHandlerConfig, value smithyjson.Value) error { 3792 object := value.Object() 3793 defer object.Close() 3794 3795 if v.LambdaConflictHandlerArn != nil { 3796 ok := object.Key("lambdaConflictHandlerArn") 3797 ok.String(*v.LambdaConflictHandlerArn) 3798 } 3799 3800 return nil 3801} 3802 3803func awsRestjson1_serializeDocumentLambdaDataSourceConfig(v *types.LambdaDataSourceConfig, value smithyjson.Value) error { 3804 object := value.Object() 3805 defer object.Close() 3806 3807 if v.LambdaFunctionArn != nil { 3808 ok := object.Key("lambdaFunctionArn") 3809 ok.String(*v.LambdaFunctionArn) 3810 } 3811 3812 return nil 3813} 3814 3815func awsRestjson1_serializeDocumentLogConfig(v *types.LogConfig, value smithyjson.Value) error { 3816 object := value.Object() 3817 defer object.Close() 3818 3819 if v.CloudWatchLogsRoleArn != nil { 3820 ok := object.Key("cloudWatchLogsRoleArn") 3821 ok.String(*v.CloudWatchLogsRoleArn) 3822 } 3823 3824 if v.ExcludeVerboseContent { 3825 ok := object.Key("excludeVerboseContent") 3826 ok.Boolean(v.ExcludeVerboseContent) 3827 } 3828 3829 if len(v.FieldLogLevel) > 0 { 3830 ok := object.Key("fieldLogLevel") 3831 ok.String(string(v.FieldLogLevel)) 3832 } 3833 3834 return nil 3835} 3836 3837func awsRestjson1_serializeDocumentOpenIDConnectConfig(v *types.OpenIDConnectConfig, value smithyjson.Value) error { 3838 object := value.Object() 3839 defer object.Close() 3840 3841 if v.AuthTTL != 0 { 3842 ok := object.Key("authTTL") 3843 ok.Long(v.AuthTTL) 3844 } 3845 3846 if v.ClientId != nil { 3847 ok := object.Key("clientId") 3848 ok.String(*v.ClientId) 3849 } 3850 3851 if v.IatTTL != 0 { 3852 ok := object.Key("iatTTL") 3853 ok.Long(v.IatTTL) 3854 } 3855 3856 if v.Issuer != nil { 3857 ok := object.Key("issuer") 3858 ok.String(*v.Issuer) 3859 } 3860 3861 return nil 3862} 3863 3864func awsRestjson1_serializeDocumentPipelineConfig(v *types.PipelineConfig, value smithyjson.Value) error { 3865 object := value.Object() 3866 defer object.Close() 3867 3868 if v.Functions != nil { 3869 ok := object.Key("functions") 3870 if err := awsRestjson1_serializeDocumentFunctionsIds(v.Functions, ok); err != nil { 3871 return err 3872 } 3873 } 3874 3875 return nil 3876} 3877 3878func awsRestjson1_serializeDocumentRdsHttpEndpointConfig(v *types.RdsHttpEndpointConfig, value smithyjson.Value) error { 3879 object := value.Object() 3880 defer object.Close() 3881 3882 if v.AwsRegion != nil { 3883 ok := object.Key("awsRegion") 3884 ok.String(*v.AwsRegion) 3885 } 3886 3887 if v.AwsSecretStoreArn != nil { 3888 ok := object.Key("awsSecretStoreArn") 3889 ok.String(*v.AwsSecretStoreArn) 3890 } 3891 3892 if v.DatabaseName != nil { 3893 ok := object.Key("databaseName") 3894 ok.String(*v.DatabaseName) 3895 } 3896 3897 if v.DbClusterIdentifier != nil { 3898 ok := object.Key("dbClusterIdentifier") 3899 ok.String(*v.DbClusterIdentifier) 3900 } 3901 3902 if v.Schema != nil { 3903 ok := object.Key("schema") 3904 ok.String(*v.Schema) 3905 } 3906 3907 return nil 3908} 3909 3910func awsRestjson1_serializeDocumentRelationalDatabaseDataSourceConfig(v *types.RelationalDatabaseDataSourceConfig, value smithyjson.Value) error { 3911 object := value.Object() 3912 defer object.Close() 3913 3914 if v.RdsHttpEndpointConfig != nil { 3915 ok := object.Key("rdsHttpEndpointConfig") 3916 if err := awsRestjson1_serializeDocumentRdsHttpEndpointConfig(v.RdsHttpEndpointConfig, ok); err != nil { 3917 return err 3918 } 3919 } 3920 3921 if len(v.RelationalDatabaseSourceType) > 0 { 3922 ok := object.Key("relationalDatabaseSourceType") 3923 ok.String(string(v.RelationalDatabaseSourceType)) 3924 } 3925 3926 return nil 3927} 3928 3929func awsRestjson1_serializeDocumentSyncConfig(v *types.SyncConfig, value smithyjson.Value) error { 3930 object := value.Object() 3931 defer object.Close() 3932 3933 if len(v.ConflictDetection) > 0 { 3934 ok := object.Key("conflictDetection") 3935 ok.String(string(v.ConflictDetection)) 3936 } 3937 3938 if len(v.ConflictHandler) > 0 { 3939 ok := object.Key("conflictHandler") 3940 ok.String(string(v.ConflictHandler)) 3941 } 3942 3943 if v.LambdaConflictHandlerConfig != nil { 3944 ok := object.Key("lambdaConflictHandlerConfig") 3945 if err := awsRestjson1_serializeDocumentLambdaConflictHandlerConfig(v.LambdaConflictHandlerConfig, ok); err != nil { 3946 return err 3947 } 3948 } 3949 3950 return nil 3951} 3952 3953func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { 3954 object := value.Object() 3955 defer object.Close() 3956 3957 for key := range v { 3958 om := object.Key(key) 3959 om.String(v[key]) 3960 } 3961 return nil 3962} 3963 3964func awsRestjson1_serializeDocumentUserPoolConfig(v *types.UserPoolConfig, value smithyjson.Value) error { 3965 object := value.Object() 3966 defer object.Close() 3967 3968 if v.AppIdClientRegex != nil { 3969 ok := object.Key("appIdClientRegex") 3970 ok.String(*v.AppIdClientRegex) 3971 } 3972 3973 if v.AwsRegion != nil { 3974 ok := object.Key("awsRegion") 3975 ok.String(*v.AwsRegion) 3976 } 3977 3978 if len(v.DefaultAction) > 0 { 3979 ok := object.Key("defaultAction") 3980 ok.String(string(v.DefaultAction)) 3981 } 3982 3983 if v.UserPoolId != nil { 3984 ok := object.Key("userPoolId") 3985 ok.String(*v.UserPoolId) 3986 } 3987 3988 return nil 3989} 3990