1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package route53 4 5import ( 6 "bytes" 7 "context" 8 "fmt" 9 "github.com/aws/aws-sdk-go-v2/service/route53/types" 10 smithy "github.com/aws/smithy-go" 11 "github.com/aws/smithy-go/encoding/httpbinding" 12 smithyxml "github.com/aws/smithy-go/encoding/xml" 13 "github.com/aws/smithy-go/middleware" 14 smithyhttp "github.com/aws/smithy-go/transport/http" 15) 16 17type awsRestxml_serializeOpActivateKeySigningKey struct { 18} 19 20func (*awsRestxml_serializeOpActivateKeySigningKey) ID() string { 21 return "OperationSerializer" 22} 23 24func (m *awsRestxml_serializeOpActivateKeySigningKey) 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.(*ActivateKeySigningKeyInput) 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("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate") 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 := awsRestxml_serializeOpHttpBindingsActivateKeySigningKeyInput(input, restEncoder); err != nil { 53 return out, metadata, &smithy.SerializationError{Err: err} 54 } 55 56 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 57 return out, metadata, &smithy.SerializationError{Err: err} 58 } 59 in.Request = request 60 61 return next.HandleSerialize(ctx, in) 62} 63func awsRestxml_serializeOpHttpBindingsActivateKeySigningKeyInput(v *ActivateKeySigningKeyInput, encoder *httpbinding.Encoder) error { 64 if v == nil { 65 return fmt.Errorf("unsupported serialization of nil %T", v) 66 } 67 68 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 69 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 70 } 71 if v.HostedZoneId != nil { 72 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 73 return err 74 } 75 } 76 77 if v.Name == nil || len(*v.Name) == 0 { 78 return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} 79 } 80 if v.Name != nil { 81 if err := encoder.SetURI("Name").String(*v.Name); err != nil { 82 return err 83 } 84 } 85 86 return nil 87} 88 89type awsRestxml_serializeOpAssociateVPCWithHostedZone struct { 90} 91 92func (*awsRestxml_serializeOpAssociateVPCWithHostedZone) ID() string { 93 return "OperationSerializer" 94} 95 96func (m *awsRestxml_serializeOpAssociateVPCWithHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 97 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 98) { 99 request, ok := in.Request.(*smithyhttp.Request) 100 if !ok { 101 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 102 } 103 104 input, ok := in.Parameters.(*AssociateVPCWithHostedZoneInput) 105 _ = input 106 if !ok { 107 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 108 } 109 110 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc") 111 request.URL.Path = opPath 112 if len(request.URL.RawQuery) > 0 { 113 request.URL.RawQuery = "&" + opQuery 114 } else { 115 request.URL.RawQuery = opQuery 116 } 117 118 request.Method = "POST" 119 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 120 if err != nil { 121 return out, metadata, &smithy.SerializationError{Err: err} 122 } 123 124 if err := awsRestxml_serializeOpHttpBindingsAssociateVPCWithHostedZoneInput(input, restEncoder); err != nil { 125 return out, metadata, &smithy.SerializationError{Err: err} 126 } 127 128 restEncoder.SetHeader("Content-Type").String("application/xml") 129 130 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 131 rootAttr := []smithyxml.Attr{} 132 root := smithyxml.StartElement{ 133 Name: smithyxml.Name{ 134 Local: "AssociateVPCWithHostedZoneRequest", 135 }, 136 Attr: rootAttr, 137 } 138 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 139 if err := awsRestxml_serializeOpDocumentAssociateVPCWithHostedZoneInput(input, xmlEncoder.RootElement(root)); err != nil { 140 return out, metadata, &smithy.SerializationError{Err: err} 141 } 142 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 143 return out, metadata, &smithy.SerializationError{Err: err} 144 } 145 146 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 147 return out, metadata, &smithy.SerializationError{Err: err} 148 } 149 in.Request = request 150 151 return next.HandleSerialize(ctx, in) 152} 153func awsRestxml_serializeOpHttpBindingsAssociateVPCWithHostedZoneInput(v *AssociateVPCWithHostedZoneInput, encoder *httpbinding.Encoder) error { 154 if v == nil { 155 return fmt.Errorf("unsupported serialization of nil %T", v) 156 } 157 158 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 159 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 160 } 161 if v.HostedZoneId != nil { 162 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 163 return err 164 } 165 } 166 167 return nil 168} 169 170func awsRestxml_serializeOpDocumentAssociateVPCWithHostedZoneInput(v *AssociateVPCWithHostedZoneInput, value smithyxml.Value) error { 171 defer value.Close() 172 if v.Comment != nil { 173 rootAttr := []smithyxml.Attr{} 174 root := smithyxml.StartElement{ 175 Name: smithyxml.Name{ 176 Local: "Comment", 177 }, 178 Attr: rootAttr, 179 } 180 el := value.MemberElement(root) 181 el.String(*v.Comment) 182 } 183 if v.VPC != nil { 184 rootAttr := []smithyxml.Attr{} 185 root := smithyxml.StartElement{ 186 Name: smithyxml.Name{ 187 Local: "VPC", 188 }, 189 Attr: rootAttr, 190 } 191 el := value.MemberElement(root) 192 if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { 193 return err 194 } 195 } 196 return nil 197} 198 199type awsRestxml_serializeOpChangeResourceRecordSets struct { 200} 201 202func (*awsRestxml_serializeOpChangeResourceRecordSets) ID() string { 203 return "OperationSerializer" 204} 205 206func (m *awsRestxml_serializeOpChangeResourceRecordSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 207 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 208) { 209 request, ok := in.Request.(*smithyhttp.Request) 210 if !ok { 211 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 212 } 213 214 input, ok := in.Parameters.(*ChangeResourceRecordSetsInput) 215 _ = input 216 if !ok { 217 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 218 } 219 220 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/rrset") 221 request.URL.Path = opPath 222 if len(request.URL.RawQuery) > 0 { 223 request.URL.RawQuery = "&" + opQuery 224 } else { 225 request.URL.RawQuery = opQuery 226 } 227 228 request.Method = "POST" 229 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 230 if err != nil { 231 return out, metadata, &smithy.SerializationError{Err: err} 232 } 233 234 if err := awsRestxml_serializeOpHttpBindingsChangeResourceRecordSetsInput(input, restEncoder); err != nil { 235 return out, metadata, &smithy.SerializationError{Err: err} 236 } 237 238 restEncoder.SetHeader("Content-Type").String("application/xml") 239 240 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 241 rootAttr := []smithyxml.Attr{} 242 root := smithyxml.StartElement{ 243 Name: smithyxml.Name{ 244 Local: "ChangeResourceRecordSetsRequest", 245 }, 246 Attr: rootAttr, 247 } 248 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 249 if err := awsRestxml_serializeOpDocumentChangeResourceRecordSetsInput(input, xmlEncoder.RootElement(root)); err != nil { 250 return out, metadata, &smithy.SerializationError{Err: err} 251 } 252 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 253 return out, metadata, &smithy.SerializationError{Err: err} 254 } 255 256 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 257 return out, metadata, &smithy.SerializationError{Err: err} 258 } 259 in.Request = request 260 261 return next.HandleSerialize(ctx, in) 262} 263func awsRestxml_serializeOpHttpBindingsChangeResourceRecordSetsInput(v *ChangeResourceRecordSetsInput, encoder *httpbinding.Encoder) error { 264 if v == nil { 265 return fmt.Errorf("unsupported serialization of nil %T", v) 266 } 267 268 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 269 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 270 } 271 if v.HostedZoneId != nil { 272 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 273 return err 274 } 275 } 276 277 return nil 278} 279 280func awsRestxml_serializeOpDocumentChangeResourceRecordSetsInput(v *ChangeResourceRecordSetsInput, value smithyxml.Value) error { 281 defer value.Close() 282 if v.ChangeBatch != nil { 283 rootAttr := []smithyxml.Attr{} 284 root := smithyxml.StartElement{ 285 Name: smithyxml.Name{ 286 Local: "ChangeBatch", 287 }, 288 Attr: rootAttr, 289 } 290 el := value.MemberElement(root) 291 if err := awsRestxml_serializeDocumentChangeBatch(v.ChangeBatch, el); err != nil { 292 return err 293 } 294 } 295 return nil 296} 297 298type awsRestxml_serializeOpChangeTagsForResource struct { 299} 300 301func (*awsRestxml_serializeOpChangeTagsForResource) ID() string { 302 return "OperationSerializer" 303} 304 305func (m *awsRestxml_serializeOpChangeTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 306 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 307) { 308 request, ok := in.Request.(*smithyhttp.Request) 309 if !ok { 310 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 311 } 312 313 input, ok := in.Parameters.(*ChangeTagsForResourceInput) 314 _ = input 315 if !ok { 316 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 317 } 318 319 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/tags/{ResourceType}/{ResourceId}") 320 request.URL.Path = opPath 321 if len(request.URL.RawQuery) > 0 { 322 request.URL.RawQuery = "&" + opQuery 323 } else { 324 request.URL.RawQuery = opQuery 325 } 326 327 request.Method = "POST" 328 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 329 if err != nil { 330 return out, metadata, &smithy.SerializationError{Err: err} 331 } 332 333 if err := awsRestxml_serializeOpHttpBindingsChangeTagsForResourceInput(input, restEncoder); err != nil { 334 return out, metadata, &smithy.SerializationError{Err: err} 335 } 336 337 restEncoder.SetHeader("Content-Type").String("application/xml") 338 339 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 340 rootAttr := []smithyxml.Attr{} 341 root := smithyxml.StartElement{ 342 Name: smithyxml.Name{ 343 Local: "ChangeTagsForResourceRequest", 344 }, 345 Attr: rootAttr, 346 } 347 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 348 if err := awsRestxml_serializeOpDocumentChangeTagsForResourceInput(input, xmlEncoder.RootElement(root)); err != nil { 349 return out, metadata, &smithy.SerializationError{Err: err} 350 } 351 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 352 return out, metadata, &smithy.SerializationError{Err: err} 353 } 354 355 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 356 return out, metadata, &smithy.SerializationError{Err: err} 357 } 358 in.Request = request 359 360 return next.HandleSerialize(ctx, in) 361} 362func awsRestxml_serializeOpHttpBindingsChangeTagsForResourceInput(v *ChangeTagsForResourceInput, encoder *httpbinding.Encoder) error { 363 if v == nil { 364 return fmt.Errorf("unsupported serialization of nil %T", v) 365 } 366 367 if v.ResourceId == nil || len(*v.ResourceId) == 0 { 368 return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceId must not be empty")} 369 } 370 if v.ResourceId != nil { 371 if err := encoder.SetURI("ResourceId").String(*v.ResourceId); err != nil { 372 return err 373 } 374 } 375 376 if len(v.ResourceType) == 0 { 377 return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceType must not be empty")} 378 } 379 if len(v.ResourceType) > 0 { 380 if err := encoder.SetURI("ResourceType").String(string(v.ResourceType)); err != nil { 381 return err 382 } 383 } 384 385 return nil 386} 387 388func awsRestxml_serializeOpDocumentChangeTagsForResourceInput(v *ChangeTagsForResourceInput, value smithyxml.Value) error { 389 defer value.Close() 390 if v.AddTags != nil { 391 rootAttr := []smithyxml.Attr{} 392 root := smithyxml.StartElement{ 393 Name: smithyxml.Name{ 394 Local: "AddTags", 395 }, 396 Attr: rootAttr, 397 } 398 el := value.MemberElement(root) 399 if err := awsRestxml_serializeDocumentTagList(v.AddTags, el); err != nil { 400 return err 401 } 402 } 403 if v.RemoveTagKeys != nil { 404 rootAttr := []smithyxml.Attr{} 405 root := smithyxml.StartElement{ 406 Name: smithyxml.Name{ 407 Local: "RemoveTagKeys", 408 }, 409 Attr: rootAttr, 410 } 411 el := value.MemberElement(root) 412 if err := awsRestxml_serializeDocumentTagKeyList(v.RemoveTagKeys, el); err != nil { 413 return err 414 } 415 } 416 return nil 417} 418 419type awsRestxml_serializeOpCreateHealthCheck struct { 420} 421 422func (*awsRestxml_serializeOpCreateHealthCheck) ID() string { 423 return "OperationSerializer" 424} 425 426func (m *awsRestxml_serializeOpCreateHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 427 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 428) { 429 request, ok := in.Request.(*smithyhttp.Request) 430 if !ok { 431 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 432 } 433 434 input, ok := in.Parameters.(*CreateHealthCheckInput) 435 _ = input 436 if !ok { 437 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 438 } 439 440 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck") 441 request.URL.Path = opPath 442 if len(request.URL.RawQuery) > 0 { 443 request.URL.RawQuery = "&" + opQuery 444 } else { 445 request.URL.RawQuery = opQuery 446 } 447 448 request.Method = "POST" 449 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 450 if err != nil { 451 return out, metadata, &smithy.SerializationError{Err: err} 452 } 453 454 restEncoder.SetHeader("Content-Type").String("application/xml") 455 456 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 457 rootAttr := []smithyxml.Attr{} 458 root := smithyxml.StartElement{ 459 Name: smithyxml.Name{ 460 Local: "CreateHealthCheckRequest", 461 }, 462 Attr: rootAttr, 463 } 464 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 465 if err := awsRestxml_serializeOpDocumentCreateHealthCheckInput(input, xmlEncoder.RootElement(root)); err != nil { 466 return out, metadata, &smithy.SerializationError{Err: err} 467 } 468 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 469 return out, metadata, &smithy.SerializationError{Err: err} 470 } 471 472 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 473 return out, metadata, &smithy.SerializationError{Err: err} 474 } 475 in.Request = request 476 477 return next.HandleSerialize(ctx, in) 478} 479func awsRestxml_serializeOpHttpBindingsCreateHealthCheckInput(v *CreateHealthCheckInput, encoder *httpbinding.Encoder) error { 480 if v == nil { 481 return fmt.Errorf("unsupported serialization of nil %T", v) 482 } 483 484 return nil 485} 486 487func awsRestxml_serializeOpDocumentCreateHealthCheckInput(v *CreateHealthCheckInput, value smithyxml.Value) error { 488 defer value.Close() 489 if v.CallerReference != nil { 490 rootAttr := []smithyxml.Attr{} 491 root := smithyxml.StartElement{ 492 Name: smithyxml.Name{ 493 Local: "CallerReference", 494 }, 495 Attr: rootAttr, 496 } 497 el := value.MemberElement(root) 498 el.String(*v.CallerReference) 499 } 500 if v.HealthCheckConfig != nil { 501 rootAttr := []smithyxml.Attr{} 502 root := smithyxml.StartElement{ 503 Name: smithyxml.Name{ 504 Local: "HealthCheckConfig", 505 }, 506 Attr: rootAttr, 507 } 508 el := value.MemberElement(root) 509 if err := awsRestxml_serializeDocumentHealthCheckConfig(v.HealthCheckConfig, el); err != nil { 510 return err 511 } 512 } 513 return nil 514} 515 516type awsRestxml_serializeOpCreateHostedZone struct { 517} 518 519func (*awsRestxml_serializeOpCreateHostedZone) ID() string { 520 return "OperationSerializer" 521} 522 523func (m *awsRestxml_serializeOpCreateHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 524 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 525) { 526 request, ok := in.Request.(*smithyhttp.Request) 527 if !ok { 528 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 529 } 530 531 input, ok := in.Parameters.(*CreateHostedZoneInput) 532 _ = input 533 if !ok { 534 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 535 } 536 537 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone") 538 request.URL.Path = opPath 539 if len(request.URL.RawQuery) > 0 { 540 request.URL.RawQuery = "&" + opQuery 541 } else { 542 request.URL.RawQuery = opQuery 543 } 544 545 request.Method = "POST" 546 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 547 if err != nil { 548 return out, metadata, &smithy.SerializationError{Err: err} 549 } 550 551 restEncoder.SetHeader("Content-Type").String("application/xml") 552 553 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 554 rootAttr := []smithyxml.Attr{} 555 root := smithyxml.StartElement{ 556 Name: smithyxml.Name{ 557 Local: "CreateHostedZoneRequest", 558 }, 559 Attr: rootAttr, 560 } 561 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 562 if err := awsRestxml_serializeOpDocumentCreateHostedZoneInput(input, xmlEncoder.RootElement(root)); err != nil { 563 return out, metadata, &smithy.SerializationError{Err: err} 564 } 565 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 566 return out, metadata, &smithy.SerializationError{Err: err} 567 } 568 569 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 570 return out, metadata, &smithy.SerializationError{Err: err} 571 } 572 in.Request = request 573 574 return next.HandleSerialize(ctx, in) 575} 576func awsRestxml_serializeOpHttpBindingsCreateHostedZoneInput(v *CreateHostedZoneInput, encoder *httpbinding.Encoder) error { 577 if v == nil { 578 return fmt.Errorf("unsupported serialization of nil %T", v) 579 } 580 581 return nil 582} 583 584func awsRestxml_serializeOpDocumentCreateHostedZoneInput(v *CreateHostedZoneInput, value smithyxml.Value) error { 585 defer value.Close() 586 if v.CallerReference != nil { 587 rootAttr := []smithyxml.Attr{} 588 root := smithyxml.StartElement{ 589 Name: smithyxml.Name{ 590 Local: "CallerReference", 591 }, 592 Attr: rootAttr, 593 } 594 el := value.MemberElement(root) 595 el.String(*v.CallerReference) 596 } 597 if v.DelegationSetId != nil { 598 rootAttr := []smithyxml.Attr{} 599 root := smithyxml.StartElement{ 600 Name: smithyxml.Name{ 601 Local: "DelegationSetId", 602 }, 603 Attr: rootAttr, 604 } 605 el := value.MemberElement(root) 606 el.String(*v.DelegationSetId) 607 } 608 if v.HostedZoneConfig != nil { 609 rootAttr := []smithyxml.Attr{} 610 root := smithyxml.StartElement{ 611 Name: smithyxml.Name{ 612 Local: "HostedZoneConfig", 613 }, 614 Attr: rootAttr, 615 } 616 el := value.MemberElement(root) 617 if err := awsRestxml_serializeDocumentHostedZoneConfig(v.HostedZoneConfig, el); err != nil { 618 return err 619 } 620 } 621 if v.Name != nil { 622 rootAttr := []smithyxml.Attr{} 623 root := smithyxml.StartElement{ 624 Name: smithyxml.Name{ 625 Local: "Name", 626 }, 627 Attr: rootAttr, 628 } 629 el := value.MemberElement(root) 630 el.String(*v.Name) 631 } 632 if v.VPC != nil { 633 rootAttr := []smithyxml.Attr{} 634 root := smithyxml.StartElement{ 635 Name: smithyxml.Name{ 636 Local: "VPC", 637 }, 638 Attr: rootAttr, 639 } 640 el := value.MemberElement(root) 641 if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { 642 return err 643 } 644 } 645 return nil 646} 647 648type awsRestxml_serializeOpCreateKeySigningKey struct { 649} 650 651func (*awsRestxml_serializeOpCreateKeySigningKey) ID() string { 652 return "OperationSerializer" 653} 654 655func (m *awsRestxml_serializeOpCreateKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 656 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 657) { 658 request, ok := in.Request.(*smithyhttp.Request) 659 if !ok { 660 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 661 } 662 663 input, ok := in.Parameters.(*CreateKeySigningKeyInput) 664 _ = input 665 if !ok { 666 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 667 } 668 669 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey") 670 request.URL.Path = opPath 671 if len(request.URL.RawQuery) > 0 { 672 request.URL.RawQuery = "&" + opQuery 673 } else { 674 request.URL.RawQuery = opQuery 675 } 676 677 request.Method = "POST" 678 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 679 if err != nil { 680 return out, metadata, &smithy.SerializationError{Err: err} 681 } 682 683 restEncoder.SetHeader("Content-Type").String("application/xml") 684 685 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 686 rootAttr := []smithyxml.Attr{} 687 root := smithyxml.StartElement{ 688 Name: smithyxml.Name{ 689 Local: "CreateKeySigningKeyRequest", 690 }, 691 Attr: rootAttr, 692 } 693 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 694 if err := awsRestxml_serializeOpDocumentCreateKeySigningKeyInput(input, xmlEncoder.RootElement(root)); err != nil { 695 return out, metadata, &smithy.SerializationError{Err: err} 696 } 697 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 698 return out, metadata, &smithy.SerializationError{Err: err} 699 } 700 701 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 702 return out, metadata, &smithy.SerializationError{Err: err} 703 } 704 in.Request = request 705 706 return next.HandleSerialize(ctx, in) 707} 708func awsRestxml_serializeOpHttpBindingsCreateKeySigningKeyInput(v *CreateKeySigningKeyInput, encoder *httpbinding.Encoder) error { 709 if v == nil { 710 return fmt.Errorf("unsupported serialization of nil %T", v) 711 } 712 713 return nil 714} 715 716func awsRestxml_serializeOpDocumentCreateKeySigningKeyInput(v *CreateKeySigningKeyInput, value smithyxml.Value) error { 717 defer value.Close() 718 if v.CallerReference != nil { 719 rootAttr := []smithyxml.Attr{} 720 root := smithyxml.StartElement{ 721 Name: smithyxml.Name{ 722 Local: "CallerReference", 723 }, 724 Attr: rootAttr, 725 } 726 el := value.MemberElement(root) 727 el.String(*v.CallerReference) 728 } 729 if v.HostedZoneId != nil { 730 rootAttr := []smithyxml.Attr{} 731 root := smithyxml.StartElement{ 732 Name: smithyxml.Name{ 733 Local: "HostedZoneId", 734 }, 735 Attr: rootAttr, 736 } 737 el := value.MemberElement(root) 738 el.String(*v.HostedZoneId) 739 } 740 if v.KeyManagementServiceArn != nil { 741 rootAttr := []smithyxml.Attr{} 742 root := smithyxml.StartElement{ 743 Name: smithyxml.Name{ 744 Local: "KeyManagementServiceArn", 745 }, 746 Attr: rootAttr, 747 } 748 el := value.MemberElement(root) 749 el.String(*v.KeyManagementServiceArn) 750 } 751 if v.Name != nil { 752 rootAttr := []smithyxml.Attr{} 753 root := smithyxml.StartElement{ 754 Name: smithyxml.Name{ 755 Local: "Name", 756 }, 757 Attr: rootAttr, 758 } 759 el := value.MemberElement(root) 760 el.String(*v.Name) 761 } 762 if v.Status != nil { 763 rootAttr := []smithyxml.Attr{} 764 root := smithyxml.StartElement{ 765 Name: smithyxml.Name{ 766 Local: "Status", 767 }, 768 Attr: rootAttr, 769 } 770 el := value.MemberElement(root) 771 el.String(*v.Status) 772 } 773 return nil 774} 775 776type awsRestxml_serializeOpCreateQueryLoggingConfig struct { 777} 778 779func (*awsRestxml_serializeOpCreateQueryLoggingConfig) ID() string { 780 return "OperationSerializer" 781} 782 783func (m *awsRestxml_serializeOpCreateQueryLoggingConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 784 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 785) { 786 request, ok := in.Request.(*smithyhttp.Request) 787 if !ok { 788 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 789 } 790 791 input, ok := in.Parameters.(*CreateQueryLoggingConfigInput) 792 _ = input 793 if !ok { 794 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 795 } 796 797 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig") 798 request.URL.Path = opPath 799 if len(request.URL.RawQuery) > 0 { 800 request.URL.RawQuery = "&" + opQuery 801 } else { 802 request.URL.RawQuery = opQuery 803 } 804 805 request.Method = "POST" 806 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 807 if err != nil { 808 return out, metadata, &smithy.SerializationError{Err: err} 809 } 810 811 restEncoder.SetHeader("Content-Type").String("application/xml") 812 813 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 814 rootAttr := []smithyxml.Attr{} 815 root := smithyxml.StartElement{ 816 Name: smithyxml.Name{ 817 Local: "CreateQueryLoggingConfigRequest", 818 }, 819 Attr: rootAttr, 820 } 821 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 822 if err := awsRestxml_serializeOpDocumentCreateQueryLoggingConfigInput(input, xmlEncoder.RootElement(root)); err != nil { 823 return out, metadata, &smithy.SerializationError{Err: err} 824 } 825 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 826 return out, metadata, &smithy.SerializationError{Err: err} 827 } 828 829 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 830 return out, metadata, &smithy.SerializationError{Err: err} 831 } 832 in.Request = request 833 834 return next.HandleSerialize(ctx, in) 835} 836func awsRestxml_serializeOpHttpBindingsCreateQueryLoggingConfigInput(v *CreateQueryLoggingConfigInput, encoder *httpbinding.Encoder) error { 837 if v == nil { 838 return fmt.Errorf("unsupported serialization of nil %T", v) 839 } 840 841 return nil 842} 843 844func awsRestxml_serializeOpDocumentCreateQueryLoggingConfigInput(v *CreateQueryLoggingConfigInput, value smithyxml.Value) error { 845 defer value.Close() 846 if v.CloudWatchLogsLogGroupArn != nil { 847 rootAttr := []smithyxml.Attr{} 848 root := smithyxml.StartElement{ 849 Name: smithyxml.Name{ 850 Local: "CloudWatchLogsLogGroupArn", 851 }, 852 Attr: rootAttr, 853 } 854 el := value.MemberElement(root) 855 el.String(*v.CloudWatchLogsLogGroupArn) 856 } 857 if v.HostedZoneId != nil { 858 rootAttr := []smithyxml.Attr{} 859 root := smithyxml.StartElement{ 860 Name: smithyxml.Name{ 861 Local: "HostedZoneId", 862 }, 863 Attr: rootAttr, 864 } 865 el := value.MemberElement(root) 866 el.String(*v.HostedZoneId) 867 } 868 return nil 869} 870 871type awsRestxml_serializeOpCreateReusableDelegationSet struct { 872} 873 874func (*awsRestxml_serializeOpCreateReusableDelegationSet) ID() string { 875 return "OperationSerializer" 876} 877 878func (m *awsRestxml_serializeOpCreateReusableDelegationSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 879 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 880) { 881 request, ok := in.Request.(*smithyhttp.Request) 882 if !ok { 883 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 884 } 885 886 input, ok := in.Parameters.(*CreateReusableDelegationSetInput) 887 _ = input 888 if !ok { 889 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 890 } 891 892 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset") 893 request.URL.Path = opPath 894 if len(request.URL.RawQuery) > 0 { 895 request.URL.RawQuery = "&" + opQuery 896 } else { 897 request.URL.RawQuery = opQuery 898 } 899 900 request.Method = "POST" 901 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 902 if err != nil { 903 return out, metadata, &smithy.SerializationError{Err: err} 904 } 905 906 restEncoder.SetHeader("Content-Type").String("application/xml") 907 908 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 909 rootAttr := []smithyxml.Attr{} 910 root := smithyxml.StartElement{ 911 Name: smithyxml.Name{ 912 Local: "CreateReusableDelegationSetRequest", 913 }, 914 Attr: rootAttr, 915 } 916 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 917 if err := awsRestxml_serializeOpDocumentCreateReusableDelegationSetInput(input, xmlEncoder.RootElement(root)); err != nil { 918 return out, metadata, &smithy.SerializationError{Err: err} 919 } 920 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 921 return out, metadata, &smithy.SerializationError{Err: err} 922 } 923 924 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 925 return out, metadata, &smithy.SerializationError{Err: err} 926 } 927 in.Request = request 928 929 return next.HandleSerialize(ctx, in) 930} 931func awsRestxml_serializeOpHttpBindingsCreateReusableDelegationSetInput(v *CreateReusableDelegationSetInput, encoder *httpbinding.Encoder) error { 932 if v == nil { 933 return fmt.Errorf("unsupported serialization of nil %T", v) 934 } 935 936 return nil 937} 938 939func awsRestxml_serializeOpDocumentCreateReusableDelegationSetInput(v *CreateReusableDelegationSetInput, value smithyxml.Value) error { 940 defer value.Close() 941 if v.CallerReference != nil { 942 rootAttr := []smithyxml.Attr{} 943 root := smithyxml.StartElement{ 944 Name: smithyxml.Name{ 945 Local: "CallerReference", 946 }, 947 Attr: rootAttr, 948 } 949 el := value.MemberElement(root) 950 el.String(*v.CallerReference) 951 } 952 if v.HostedZoneId != nil { 953 rootAttr := []smithyxml.Attr{} 954 root := smithyxml.StartElement{ 955 Name: smithyxml.Name{ 956 Local: "HostedZoneId", 957 }, 958 Attr: rootAttr, 959 } 960 el := value.MemberElement(root) 961 el.String(*v.HostedZoneId) 962 } 963 return nil 964} 965 966type awsRestxml_serializeOpCreateTrafficPolicy struct { 967} 968 969func (*awsRestxml_serializeOpCreateTrafficPolicy) ID() string { 970 return "OperationSerializer" 971} 972 973func (m *awsRestxml_serializeOpCreateTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 974 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 975) { 976 request, ok := in.Request.(*smithyhttp.Request) 977 if !ok { 978 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 979 } 980 981 input, ok := in.Parameters.(*CreateTrafficPolicyInput) 982 _ = input 983 if !ok { 984 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 985 } 986 987 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy") 988 request.URL.Path = opPath 989 if len(request.URL.RawQuery) > 0 { 990 request.URL.RawQuery = "&" + opQuery 991 } else { 992 request.URL.RawQuery = opQuery 993 } 994 995 request.Method = "POST" 996 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 997 if err != nil { 998 return out, metadata, &smithy.SerializationError{Err: err} 999 } 1000 1001 restEncoder.SetHeader("Content-Type").String("application/xml") 1002 1003 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 1004 rootAttr := []smithyxml.Attr{} 1005 root := smithyxml.StartElement{ 1006 Name: smithyxml.Name{ 1007 Local: "CreateTrafficPolicyRequest", 1008 }, 1009 Attr: rootAttr, 1010 } 1011 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 1012 if err := awsRestxml_serializeOpDocumentCreateTrafficPolicyInput(input, xmlEncoder.RootElement(root)); err != nil { 1013 return out, metadata, &smithy.SerializationError{Err: err} 1014 } 1015 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 1016 return out, metadata, &smithy.SerializationError{Err: err} 1017 } 1018 1019 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1020 return out, metadata, &smithy.SerializationError{Err: err} 1021 } 1022 in.Request = request 1023 1024 return next.HandleSerialize(ctx, in) 1025} 1026func awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyInput(v *CreateTrafficPolicyInput, encoder *httpbinding.Encoder) error { 1027 if v == nil { 1028 return fmt.Errorf("unsupported serialization of nil %T", v) 1029 } 1030 1031 return nil 1032} 1033 1034func awsRestxml_serializeOpDocumentCreateTrafficPolicyInput(v *CreateTrafficPolicyInput, value smithyxml.Value) error { 1035 defer value.Close() 1036 if v.Comment != nil { 1037 rootAttr := []smithyxml.Attr{} 1038 root := smithyxml.StartElement{ 1039 Name: smithyxml.Name{ 1040 Local: "Comment", 1041 }, 1042 Attr: rootAttr, 1043 } 1044 el := value.MemberElement(root) 1045 el.String(*v.Comment) 1046 } 1047 if v.Document != nil { 1048 rootAttr := []smithyxml.Attr{} 1049 root := smithyxml.StartElement{ 1050 Name: smithyxml.Name{ 1051 Local: "Document", 1052 }, 1053 Attr: rootAttr, 1054 } 1055 el := value.MemberElement(root) 1056 el.String(*v.Document) 1057 } 1058 if v.Name != nil { 1059 rootAttr := []smithyxml.Attr{} 1060 root := smithyxml.StartElement{ 1061 Name: smithyxml.Name{ 1062 Local: "Name", 1063 }, 1064 Attr: rootAttr, 1065 } 1066 el := value.MemberElement(root) 1067 el.String(*v.Name) 1068 } 1069 return nil 1070} 1071 1072type awsRestxml_serializeOpCreateTrafficPolicyInstance struct { 1073} 1074 1075func (*awsRestxml_serializeOpCreateTrafficPolicyInstance) ID() string { 1076 return "OperationSerializer" 1077} 1078 1079func (m *awsRestxml_serializeOpCreateTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1080 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1081) { 1082 request, ok := in.Request.(*smithyhttp.Request) 1083 if !ok { 1084 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1085 } 1086 1087 input, ok := in.Parameters.(*CreateTrafficPolicyInstanceInput) 1088 _ = input 1089 if !ok { 1090 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1091 } 1092 1093 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance") 1094 request.URL.Path = opPath 1095 if len(request.URL.RawQuery) > 0 { 1096 request.URL.RawQuery = "&" + opQuery 1097 } else { 1098 request.URL.RawQuery = opQuery 1099 } 1100 1101 request.Method = "POST" 1102 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1103 if err != nil { 1104 return out, metadata, &smithy.SerializationError{Err: err} 1105 } 1106 1107 restEncoder.SetHeader("Content-Type").String("application/xml") 1108 1109 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 1110 rootAttr := []smithyxml.Attr{} 1111 root := smithyxml.StartElement{ 1112 Name: smithyxml.Name{ 1113 Local: "CreateTrafficPolicyInstanceRequest", 1114 }, 1115 Attr: rootAttr, 1116 } 1117 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 1118 if err := awsRestxml_serializeOpDocumentCreateTrafficPolicyInstanceInput(input, xmlEncoder.RootElement(root)); err != nil { 1119 return out, metadata, &smithy.SerializationError{Err: err} 1120 } 1121 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 1122 return out, metadata, &smithy.SerializationError{Err: err} 1123 } 1124 1125 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1126 return out, metadata, &smithy.SerializationError{Err: err} 1127 } 1128 in.Request = request 1129 1130 return next.HandleSerialize(ctx, in) 1131} 1132func awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyInstanceInput(v *CreateTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error { 1133 if v == nil { 1134 return fmt.Errorf("unsupported serialization of nil %T", v) 1135 } 1136 1137 return nil 1138} 1139 1140func awsRestxml_serializeOpDocumentCreateTrafficPolicyInstanceInput(v *CreateTrafficPolicyInstanceInput, value smithyxml.Value) error { 1141 defer value.Close() 1142 if v.HostedZoneId != nil { 1143 rootAttr := []smithyxml.Attr{} 1144 root := smithyxml.StartElement{ 1145 Name: smithyxml.Name{ 1146 Local: "HostedZoneId", 1147 }, 1148 Attr: rootAttr, 1149 } 1150 el := value.MemberElement(root) 1151 el.String(*v.HostedZoneId) 1152 } 1153 if v.Name != nil { 1154 rootAttr := []smithyxml.Attr{} 1155 root := smithyxml.StartElement{ 1156 Name: smithyxml.Name{ 1157 Local: "Name", 1158 }, 1159 Attr: rootAttr, 1160 } 1161 el := value.MemberElement(root) 1162 el.String(*v.Name) 1163 } 1164 if v.TrafficPolicyId != nil { 1165 rootAttr := []smithyxml.Attr{} 1166 root := smithyxml.StartElement{ 1167 Name: smithyxml.Name{ 1168 Local: "TrafficPolicyId", 1169 }, 1170 Attr: rootAttr, 1171 } 1172 el := value.MemberElement(root) 1173 el.String(*v.TrafficPolicyId) 1174 } 1175 if v.TrafficPolicyVersion != nil { 1176 rootAttr := []smithyxml.Attr{} 1177 root := smithyxml.StartElement{ 1178 Name: smithyxml.Name{ 1179 Local: "TrafficPolicyVersion", 1180 }, 1181 Attr: rootAttr, 1182 } 1183 el := value.MemberElement(root) 1184 el.Integer(*v.TrafficPolicyVersion) 1185 } 1186 if v.TTL != nil { 1187 rootAttr := []smithyxml.Attr{} 1188 root := smithyxml.StartElement{ 1189 Name: smithyxml.Name{ 1190 Local: "TTL", 1191 }, 1192 Attr: rootAttr, 1193 } 1194 el := value.MemberElement(root) 1195 el.Long(*v.TTL) 1196 } 1197 return nil 1198} 1199 1200type awsRestxml_serializeOpCreateTrafficPolicyVersion struct { 1201} 1202 1203func (*awsRestxml_serializeOpCreateTrafficPolicyVersion) ID() string { 1204 return "OperationSerializer" 1205} 1206 1207func (m *awsRestxml_serializeOpCreateTrafficPolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1208 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1209) { 1210 request, ok := in.Request.(*smithyhttp.Request) 1211 if !ok { 1212 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1213 } 1214 1215 input, ok := in.Parameters.(*CreateTrafficPolicyVersionInput) 1216 _ = input 1217 if !ok { 1218 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1219 } 1220 1221 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}") 1222 request.URL.Path = opPath 1223 if len(request.URL.RawQuery) > 0 { 1224 request.URL.RawQuery = "&" + opQuery 1225 } else { 1226 request.URL.RawQuery = opQuery 1227 } 1228 1229 request.Method = "POST" 1230 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1231 if err != nil { 1232 return out, metadata, &smithy.SerializationError{Err: err} 1233 } 1234 1235 if err := awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyVersionInput(input, restEncoder); err != nil { 1236 return out, metadata, &smithy.SerializationError{Err: err} 1237 } 1238 1239 restEncoder.SetHeader("Content-Type").String("application/xml") 1240 1241 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 1242 rootAttr := []smithyxml.Attr{} 1243 root := smithyxml.StartElement{ 1244 Name: smithyxml.Name{ 1245 Local: "CreateTrafficPolicyVersionRequest", 1246 }, 1247 Attr: rootAttr, 1248 } 1249 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 1250 if err := awsRestxml_serializeOpDocumentCreateTrafficPolicyVersionInput(input, xmlEncoder.RootElement(root)); err != nil { 1251 return out, metadata, &smithy.SerializationError{Err: err} 1252 } 1253 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 1254 return out, metadata, &smithy.SerializationError{Err: err} 1255 } 1256 1257 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1258 return out, metadata, &smithy.SerializationError{Err: err} 1259 } 1260 in.Request = request 1261 1262 return next.HandleSerialize(ctx, in) 1263} 1264func awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyVersionInput(v *CreateTrafficPolicyVersionInput, encoder *httpbinding.Encoder) error { 1265 if v == nil { 1266 return fmt.Errorf("unsupported serialization of nil %T", v) 1267 } 1268 1269 if v.Id == nil || len(*v.Id) == 0 { 1270 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 1271 } 1272 if v.Id != nil { 1273 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 1274 return err 1275 } 1276 } 1277 1278 return nil 1279} 1280 1281func awsRestxml_serializeOpDocumentCreateTrafficPolicyVersionInput(v *CreateTrafficPolicyVersionInput, value smithyxml.Value) error { 1282 defer value.Close() 1283 if v.Comment != nil { 1284 rootAttr := []smithyxml.Attr{} 1285 root := smithyxml.StartElement{ 1286 Name: smithyxml.Name{ 1287 Local: "Comment", 1288 }, 1289 Attr: rootAttr, 1290 } 1291 el := value.MemberElement(root) 1292 el.String(*v.Comment) 1293 } 1294 if v.Document != nil { 1295 rootAttr := []smithyxml.Attr{} 1296 root := smithyxml.StartElement{ 1297 Name: smithyxml.Name{ 1298 Local: "Document", 1299 }, 1300 Attr: rootAttr, 1301 } 1302 el := value.MemberElement(root) 1303 el.String(*v.Document) 1304 } 1305 return nil 1306} 1307 1308type awsRestxml_serializeOpCreateVPCAssociationAuthorization struct { 1309} 1310 1311func (*awsRestxml_serializeOpCreateVPCAssociationAuthorization) ID() string { 1312 return "OperationSerializer" 1313} 1314 1315func (m *awsRestxml_serializeOpCreateVPCAssociationAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1316 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1317) { 1318 request, ok := in.Request.(*smithyhttp.Request) 1319 if !ok { 1320 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1321 } 1322 1323 input, ok := in.Parameters.(*CreateVPCAssociationAuthorizationInput) 1324 _ = input 1325 if !ok { 1326 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1327 } 1328 1329 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation") 1330 request.URL.Path = opPath 1331 if len(request.URL.RawQuery) > 0 { 1332 request.URL.RawQuery = "&" + opQuery 1333 } else { 1334 request.URL.RawQuery = opQuery 1335 } 1336 1337 request.Method = "POST" 1338 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1339 if err != nil { 1340 return out, metadata, &smithy.SerializationError{Err: err} 1341 } 1342 1343 if err := awsRestxml_serializeOpHttpBindingsCreateVPCAssociationAuthorizationInput(input, restEncoder); err != nil { 1344 return out, metadata, &smithy.SerializationError{Err: err} 1345 } 1346 1347 restEncoder.SetHeader("Content-Type").String("application/xml") 1348 1349 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 1350 rootAttr := []smithyxml.Attr{} 1351 root := smithyxml.StartElement{ 1352 Name: smithyxml.Name{ 1353 Local: "CreateVPCAssociationAuthorizationRequest", 1354 }, 1355 Attr: rootAttr, 1356 } 1357 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 1358 if err := awsRestxml_serializeOpDocumentCreateVPCAssociationAuthorizationInput(input, xmlEncoder.RootElement(root)); err != nil { 1359 return out, metadata, &smithy.SerializationError{Err: err} 1360 } 1361 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 1362 return out, metadata, &smithy.SerializationError{Err: err} 1363 } 1364 1365 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1366 return out, metadata, &smithy.SerializationError{Err: err} 1367 } 1368 in.Request = request 1369 1370 return next.HandleSerialize(ctx, in) 1371} 1372func awsRestxml_serializeOpHttpBindingsCreateVPCAssociationAuthorizationInput(v *CreateVPCAssociationAuthorizationInput, encoder *httpbinding.Encoder) error { 1373 if v == nil { 1374 return fmt.Errorf("unsupported serialization of nil %T", v) 1375 } 1376 1377 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 1378 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 1379 } 1380 if v.HostedZoneId != nil { 1381 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 1382 return err 1383 } 1384 } 1385 1386 return nil 1387} 1388 1389func awsRestxml_serializeOpDocumentCreateVPCAssociationAuthorizationInput(v *CreateVPCAssociationAuthorizationInput, value smithyxml.Value) error { 1390 defer value.Close() 1391 if v.VPC != nil { 1392 rootAttr := []smithyxml.Attr{} 1393 root := smithyxml.StartElement{ 1394 Name: smithyxml.Name{ 1395 Local: "VPC", 1396 }, 1397 Attr: rootAttr, 1398 } 1399 el := value.MemberElement(root) 1400 if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { 1401 return err 1402 } 1403 } 1404 return nil 1405} 1406 1407type awsRestxml_serializeOpDeactivateKeySigningKey struct { 1408} 1409 1410func (*awsRestxml_serializeOpDeactivateKeySigningKey) ID() string { 1411 return "OperationSerializer" 1412} 1413 1414func (m *awsRestxml_serializeOpDeactivateKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1415 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1416) { 1417 request, ok := in.Request.(*smithyhttp.Request) 1418 if !ok { 1419 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1420 } 1421 1422 input, ok := in.Parameters.(*DeactivateKeySigningKeyInput) 1423 _ = input 1424 if !ok { 1425 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1426 } 1427 1428 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate") 1429 request.URL.Path = opPath 1430 if len(request.URL.RawQuery) > 0 { 1431 request.URL.RawQuery = "&" + opQuery 1432 } else { 1433 request.URL.RawQuery = opQuery 1434 } 1435 1436 request.Method = "POST" 1437 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1438 if err != nil { 1439 return out, metadata, &smithy.SerializationError{Err: err} 1440 } 1441 1442 if err := awsRestxml_serializeOpHttpBindingsDeactivateKeySigningKeyInput(input, restEncoder); err != nil { 1443 return out, metadata, &smithy.SerializationError{Err: err} 1444 } 1445 1446 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1447 return out, metadata, &smithy.SerializationError{Err: err} 1448 } 1449 in.Request = request 1450 1451 return next.HandleSerialize(ctx, in) 1452} 1453func awsRestxml_serializeOpHttpBindingsDeactivateKeySigningKeyInput(v *DeactivateKeySigningKeyInput, encoder *httpbinding.Encoder) error { 1454 if v == nil { 1455 return fmt.Errorf("unsupported serialization of nil %T", v) 1456 } 1457 1458 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 1459 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 1460 } 1461 if v.HostedZoneId != nil { 1462 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 1463 return err 1464 } 1465 } 1466 1467 if v.Name == nil || len(*v.Name) == 0 { 1468 return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} 1469 } 1470 if v.Name != nil { 1471 if err := encoder.SetURI("Name").String(*v.Name); err != nil { 1472 return err 1473 } 1474 } 1475 1476 return nil 1477} 1478 1479type awsRestxml_serializeOpDeleteHealthCheck struct { 1480} 1481 1482func (*awsRestxml_serializeOpDeleteHealthCheck) ID() string { 1483 return "OperationSerializer" 1484} 1485 1486func (m *awsRestxml_serializeOpDeleteHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1487 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1488) { 1489 request, ok := in.Request.(*smithyhttp.Request) 1490 if !ok { 1491 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1492 } 1493 1494 input, ok := in.Parameters.(*DeleteHealthCheckInput) 1495 _ = input 1496 if !ok { 1497 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1498 } 1499 1500 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}") 1501 request.URL.Path = opPath 1502 if len(request.URL.RawQuery) > 0 { 1503 request.URL.RawQuery = "&" + opQuery 1504 } else { 1505 request.URL.RawQuery = opQuery 1506 } 1507 1508 request.Method = "DELETE" 1509 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1510 if err != nil { 1511 return out, metadata, &smithy.SerializationError{Err: err} 1512 } 1513 1514 if err := awsRestxml_serializeOpHttpBindingsDeleteHealthCheckInput(input, restEncoder); err != nil { 1515 return out, metadata, &smithy.SerializationError{Err: err} 1516 } 1517 1518 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1519 return out, metadata, &smithy.SerializationError{Err: err} 1520 } 1521 in.Request = request 1522 1523 return next.HandleSerialize(ctx, in) 1524} 1525func awsRestxml_serializeOpHttpBindingsDeleteHealthCheckInput(v *DeleteHealthCheckInput, encoder *httpbinding.Encoder) error { 1526 if v == nil { 1527 return fmt.Errorf("unsupported serialization of nil %T", v) 1528 } 1529 1530 if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { 1531 return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} 1532 } 1533 if v.HealthCheckId != nil { 1534 if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { 1535 return err 1536 } 1537 } 1538 1539 return nil 1540} 1541 1542type awsRestxml_serializeOpDeleteHostedZone struct { 1543} 1544 1545func (*awsRestxml_serializeOpDeleteHostedZone) ID() string { 1546 return "OperationSerializer" 1547} 1548 1549func (m *awsRestxml_serializeOpDeleteHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1550 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1551) { 1552 request, ok := in.Request.(*smithyhttp.Request) 1553 if !ok { 1554 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1555 } 1556 1557 input, ok := in.Parameters.(*DeleteHostedZoneInput) 1558 _ = input 1559 if !ok { 1560 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1561 } 1562 1563 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{Id}") 1564 request.URL.Path = opPath 1565 if len(request.URL.RawQuery) > 0 { 1566 request.URL.RawQuery = "&" + opQuery 1567 } else { 1568 request.URL.RawQuery = opQuery 1569 } 1570 1571 request.Method = "DELETE" 1572 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1573 if err != nil { 1574 return out, metadata, &smithy.SerializationError{Err: err} 1575 } 1576 1577 if err := awsRestxml_serializeOpHttpBindingsDeleteHostedZoneInput(input, restEncoder); err != nil { 1578 return out, metadata, &smithy.SerializationError{Err: err} 1579 } 1580 1581 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1582 return out, metadata, &smithy.SerializationError{Err: err} 1583 } 1584 in.Request = request 1585 1586 return next.HandleSerialize(ctx, in) 1587} 1588func awsRestxml_serializeOpHttpBindingsDeleteHostedZoneInput(v *DeleteHostedZoneInput, encoder *httpbinding.Encoder) error { 1589 if v == nil { 1590 return fmt.Errorf("unsupported serialization of nil %T", v) 1591 } 1592 1593 if v.Id == nil || len(*v.Id) == 0 { 1594 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 1595 } 1596 if v.Id != nil { 1597 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 1598 return err 1599 } 1600 } 1601 1602 return nil 1603} 1604 1605type awsRestxml_serializeOpDeleteKeySigningKey struct { 1606} 1607 1608func (*awsRestxml_serializeOpDeleteKeySigningKey) ID() string { 1609 return "OperationSerializer" 1610} 1611 1612func (m *awsRestxml_serializeOpDeleteKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1613 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1614) { 1615 request, ok := in.Request.(*smithyhttp.Request) 1616 if !ok { 1617 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1618 } 1619 1620 input, ok := in.Parameters.(*DeleteKeySigningKeyInput) 1621 _ = input 1622 if !ok { 1623 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1624 } 1625 1626 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}") 1627 request.URL.Path = opPath 1628 if len(request.URL.RawQuery) > 0 { 1629 request.URL.RawQuery = "&" + opQuery 1630 } else { 1631 request.URL.RawQuery = opQuery 1632 } 1633 1634 request.Method = "DELETE" 1635 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1636 if err != nil { 1637 return out, metadata, &smithy.SerializationError{Err: err} 1638 } 1639 1640 if err := awsRestxml_serializeOpHttpBindingsDeleteKeySigningKeyInput(input, restEncoder); err != nil { 1641 return out, metadata, &smithy.SerializationError{Err: err} 1642 } 1643 1644 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1645 return out, metadata, &smithy.SerializationError{Err: err} 1646 } 1647 in.Request = request 1648 1649 return next.HandleSerialize(ctx, in) 1650} 1651func awsRestxml_serializeOpHttpBindingsDeleteKeySigningKeyInput(v *DeleteKeySigningKeyInput, encoder *httpbinding.Encoder) error { 1652 if v == nil { 1653 return fmt.Errorf("unsupported serialization of nil %T", v) 1654 } 1655 1656 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 1657 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 1658 } 1659 if v.HostedZoneId != nil { 1660 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 1661 return err 1662 } 1663 } 1664 1665 if v.Name == nil || len(*v.Name) == 0 { 1666 return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} 1667 } 1668 if v.Name != nil { 1669 if err := encoder.SetURI("Name").String(*v.Name); err != nil { 1670 return err 1671 } 1672 } 1673 1674 return nil 1675} 1676 1677type awsRestxml_serializeOpDeleteQueryLoggingConfig struct { 1678} 1679 1680func (*awsRestxml_serializeOpDeleteQueryLoggingConfig) ID() string { 1681 return "OperationSerializer" 1682} 1683 1684func (m *awsRestxml_serializeOpDeleteQueryLoggingConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1685 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1686) { 1687 request, ok := in.Request.(*smithyhttp.Request) 1688 if !ok { 1689 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1690 } 1691 1692 input, ok := in.Parameters.(*DeleteQueryLoggingConfigInput) 1693 _ = input 1694 if !ok { 1695 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1696 } 1697 1698 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig/{Id}") 1699 request.URL.Path = opPath 1700 if len(request.URL.RawQuery) > 0 { 1701 request.URL.RawQuery = "&" + opQuery 1702 } else { 1703 request.URL.RawQuery = opQuery 1704 } 1705 1706 request.Method = "DELETE" 1707 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1708 if err != nil { 1709 return out, metadata, &smithy.SerializationError{Err: err} 1710 } 1711 1712 if err := awsRestxml_serializeOpHttpBindingsDeleteQueryLoggingConfigInput(input, restEncoder); err != nil { 1713 return out, metadata, &smithy.SerializationError{Err: err} 1714 } 1715 1716 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1717 return out, metadata, &smithy.SerializationError{Err: err} 1718 } 1719 in.Request = request 1720 1721 return next.HandleSerialize(ctx, in) 1722} 1723func awsRestxml_serializeOpHttpBindingsDeleteQueryLoggingConfigInput(v *DeleteQueryLoggingConfigInput, encoder *httpbinding.Encoder) error { 1724 if v == nil { 1725 return fmt.Errorf("unsupported serialization of nil %T", v) 1726 } 1727 1728 if v.Id == nil || len(*v.Id) == 0 { 1729 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 1730 } 1731 if v.Id != nil { 1732 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 1733 return err 1734 } 1735 } 1736 1737 return nil 1738} 1739 1740type awsRestxml_serializeOpDeleteReusableDelegationSet struct { 1741} 1742 1743func (*awsRestxml_serializeOpDeleteReusableDelegationSet) ID() string { 1744 return "OperationSerializer" 1745} 1746 1747func (m *awsRestxml_serializeOpDeleteReusableDelegationSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1748 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1749) { 1750 request, ok := in.Request.(*smithyhttp.Request) 1751 if !ok { 1752 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1753 } 1754 1755 input, ok := in.Parameters.(*DeleteReusableDelegationSetInput) 1756 _ = input 1757 if !ok { 1758 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1759 } 1760 1761 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset/{Id}") 1762 request.URL.Path = opPath 1763 if len(request.URL.RawQuery) > 0 { 1764 request.URL.RawQuery = "&" + opQuery 1765 } else { 1766 request.URL.RawQuery = opQuery 1767 } 1768 1769 request.Method = "DELETE" 1770 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1771 if err != nil { 1772 return out, metadata, &smithy.SerializationError{Err: err} 1773 } 1774 1775 if err := awsRestxml_serializeOpHttpBindingsDeleteReusableDelegationSetInput(input, restEncoder); err != nil { 1776 return out, metadata, &smithy.SerializationError{Err: err} 1777 } 1778 1779 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1780 return out, metadata, &smithy.SerializationError{Err: err} 1781 } 1782 in.Request = request 1783 1784 return next.HandleSerialize(ctx, in) 1785} 1786func awsRestxml_serializeOpHttpBindingsDeleteReusableDelegationSetInput(v *DeleteReusableDelegationSetInput, encoder *httpbinding.Encoder) error { 1787 if v == nil { 1788 return fmt.Errorf("unsupported serialization of nil %T", v) 1789 } 1790 1791 if v.Id == nil || len(*v.Id) == 0 { 1792 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 1793 } 1794 if v.Id != nil { 1795 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 1796 return err 1797 } 1798 } 1799 1800 return nil 1801} 1802 1803type awsRestxml_serializeOpDeleteTrafficPolicy struct { 1804} 1805 1806func (*awsRestxml_serializeOpDeleteTrafficPolicy) ID() string { 1807 return "OperationSerializer" 1808} 1809 1810func (m *awsRestxml_serializeOpDeleteTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1811 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1812) { 1813 request, ok := in.Request.(*smithyhttp.Request) 1814 if !ok { 1815 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1816 } 1817 1818 input, ok := in.Parameters.(*DeleteTrafficPolicyInput) 1819 _ = input 1820 if !ok { 1821 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1822 } 1823 1824 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}/{Version}") 1825 request.URL.Path = opPath 1826 if len(request.URL.RawQuery) > 0 { 1827 request.URL.RawQuery = "&" + opQuery 1828 } else { 1829 request.URL.RawQuery = opQuery 1830 } 1831 1832 request.Method = "DELETE" 1833 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1834 if err != nil { 1835 return out, metadata, &smithy.SerializationError{Err: err} 1836 } 1837 1838 if err := awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInput(input, restEncoder); err != nil { 1839 return out, metadata, &smithy.SerializationError{Err: err} 1840 } 1841 1842 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1843 return out, metadata, &smithy.SerializationError{Err: err} 1844 } 1845 in.Request = request 1846 1847 return next.HandleSerialize(ctx, in) 1848} 1849func awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInput(v *DeleteTrafficPolicyInput, encoder *httpbinding.Encoder) error { 1850 if v == nil { 1851 return fmt.Errorf("unsupported serialization of nil %T", v) 1852 } 1853 1854 if v.Id == nil || len(*v.Id) == 0 { 1855 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 1856 } 1857 if v.Id != nil { 1858 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 1859 return err 1860 } 1861 } 1862 1863 if v.Version == nil { 1864 return &smithy.SerializationError{Err: fmt.Errorf("input member Version must not be empty")} 1865 } 1866 if v.Version != nil { 1867 if err := encoder.SetURI("Version").Integer(*v.Version); err != nil { 1868 return err 1869 } 1870 } 1871 1872 return nil 1873} 1874 1875type awsRestxml_serializeOpDeleteTrafficPolicyInstance struct { 1876} 1877 1878func (*awsRestxml_serializeOpDeleteTrafficPolicyInstance) ID() string { 1879 return "OperationSerializer" 1880} 1881 1882func (m *awsRestxml_serializeOpDeleteTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1883 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1884) { 1885 request, ok := in.Request.(*smithyhttp.Request) 1886 if !ok { 1887 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1888 } 1889 1890 input, ok := in.Parameters.(*DeleteTrafficPolicyInstanceInput) 1891 _ = input 1892 if !ok { 1893 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1894 } 1895 1896 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance/{Id}") 1897 request.URL.Path = opPath 1898 if len(request.URL.RawQuery) > 0 { 1899 request.URL.RawQuery = "&" + opQuery 1900 } else { 1901 request.URL.RawQuery = opQuery 1902 } 1903 1904 request.Method = "DELETE" 1905 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1906 if err != nil { 1907 return out, metadata, &smithy.SerializationError{Err: err} 1908 } 1909 1910 if err := awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInstanceInput(input, restEncoder); err != nil { 1911 return out, metadata, &smithy.SerializationError{Err: err} 1912 } 1913 1914 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1915 return out, metadata, &smithy.SerializationError{Err: err} 1916 } 1917 in.Request = request 1918 1919 return next.HandleSerialize(ctx, in) 1920} 1921func awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInstanceInput(v *DeleteTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error { 1922 if v == nil { 1923 return fmt.Errorf("unsupported serialization of nil %T", v) 1924 } 1925 1926 if v.Id == nil || len(*v.Id) == 0 { 1927 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 1928 } 1929 if v.Id != nil { 1930 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 1931 return err 1932 } 1933 } 1934 1935 return nil 1936} 1937 1938type awsRestxml_serializeOpDeleteVPCAssociationAuthorization struct { 1939} 1940 1941func (*awsRestxml_serializeOpDeleteVPCAssociationAuthorization) ID() string { 1942 return "OperationSerializer" 1943} 1944 1945func (m *awsRestxml_serializeOpDeleteVPCAssociationAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1946 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1947) { 1948 request, ok := in.Request.(*smithyhttp.Request) 1949 if !ok { 1950 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1951 } 1952 1953 input, ok := in.Parameters.(*DeleteVPCAssociationAuthorizationInput) 1954 _ = input 1955 if !ok { 1956 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1957 } 1958 1959 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation") 1960 request.URL.Path = opPath 1961 if len(request.URL.RawQuery) > 0 { 1962 request.URL.RawQuery = "&" + opQuery 1963 } else { 1964 request.URL.RawQuery = opQuery 1965 } 1966 1967 request.Method = "POST" 1968 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1969 if err != nil { 1970 return out, metadata, &smithy.SerializationError{Err: err} 1971 } 1972 1973 if err := awsRestxml_serializeOpHttpBindingsDeleteVPCAssociationAuthorizationInput(input, restEncoder); err != nil { 1974 return out, metadata, &smithy.SerializationError{Err: err} 1975 } 1976 1977 restEncoder.SetHeader("Content-Type").String("application/xml") 1978 1979 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 1980 rootAttr := []smithyxml.Attr{} 1981 root := smithyxml.StartElement{ 1982 Name: smithyxml.Name{ 1983 Local: "DeleteVPCAssociationAuthorizationRequest", 1984 }, 1985 Attr: rootAttr, 1986 } 1987 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 1988 if err := awsRestxml_serializeOpDocumentDeleteVPCAssociationAuthorizationInput(input, xmlEncoder.RootElement(root)); err != nil { 1989 return out, metadata, &smithy.SerializationError{Err: err} 1990 } 1991 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 1992 return out, metadata, &smithy.SerializationError{Err: err} 1993 } 1994 1995 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1996 return out, metadata, &smithy.SerializationError{Err: err} 1997 } 1998 in.Request = request 1999 2000 return next.HandleSerialize(ctx, in) 2001} 2002func awsRestxml_serializeOpHttpBindingsDeleteVPCAssociationAuthorizationInput(v *DeleteVPCAssociationAuthorizationInput, encoder *httpbinding.Encoder) error { 2003 if v == nil { 2004 return fmt.Errorf("unsupported serialization of nil %T", v) 2005 } 2006 2007 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 2008 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 2009 } 2010 if v.HostedZoneId != nil { 2011 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 2012 return err 2013 } 2014 } 2015 2016 return nil 2017} 2018 2019func awsRestxml_serializeOpDocumentDeleteVPCAssociationAuthorizationInput(v *DeleteVPCAssociationAuthorizationInput, value smithyxml.Value) error { 2020 defer value.Close() 2021 if v.VPC != nil { 2022 rootAttr := []smithyxml.Attr{} 2023 root := smithyxml.StartElement{ 2024 Name: smithyxml.Name{ 2025 Local: "VPC", 2026 }, 2027 Attr: rootAttr, 2028 } 2029 el := value.MemberElement(root) 2030 if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { 2031 return err 2032 } 2033 } 2034 return nil 2035} 2036 2037type awsRestxml_serializeOpDisableHostedZoneDNSSEC struct { 2038} 2039 2040func (*awsRestxml_serializeOpDisableHostedZoneDNSSEC) ID() string { 2041 return "OperationSerializer" 2042} 2043 2044func (m *awsRestxml_serializeOpDisableHostedZoneDNSSEC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2045 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2046) { 2047 request, ok := in.Request.(*smithyhttp.Request) 2048 if !ok { 2049 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2050 } 2051 2052 input, ok := in.Parameters.(*DisableHostedZoneDNSSECInput) 2053 _ = input 2054 if !ok { 2055 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2056 } 2057 2058 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec") 2059 request.URL.Path = opPath 2060 if len(request.URL.RawQuery) > 0 { 2061 request.URL.RawQuery = "&" + opQuery 2062 } else { 2063 request.URL.RawQuery = opQuery 2064 } 2065 2066 request.Method = "POST" 2067 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2068 if err != nil { 2069 return out, metadata, &smithy.SerializationError{Err: err} 2070 } 2071 2072 if err := awsRestxml_serializeOpHttpBindingsDisableHostedZoneDNSSECInput(input, restEncoder); err != nil { 2073 return out, metadata, &smithy.SerializationError{Err: err} 2074 } 2075 2076 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2077 return out, metadata, &smithy.SerializationError{Err: err} 2078 } 2079 in.Request = request 2080 2081 return next.HandleSerialize(ctx, in) 2082} 2083func awsRestxml_serializeOpHttpBindingsDisableHostedZoneDNSSECInput(v *DisableHostedZoneDNSSECInput, encoder *httpbinding.Encoder) error { 2084 if v == nil { 2085 return fmt.Errorf("unsupported serialization of nil %T", v) 2086 } 2087 2088 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 2089 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 2090 } 2091 if v.HostedZoneId != nil { 2092 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 2093 return err 2094 } 2095 } 2096 2097 return nil 2098} 2099 2100type awsRestxml_serializeOpDisassociateVPCFromHostedZone struct { 2101} 2102 2103func (*awsRestxml_serializeOpDisassociateVPCFromHostedZone) ID() string { 2104 return "OperationSerializer" 2105} 2106 2107func (m *awsRestxml_serializeOpDisassociateVPCFromHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2108 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2109) { 2110 request, ok := in.Request.(*smithyhttp.Request) 2111 if !ok { 2112 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2113 } 2114 2115 input, ok := in.Parameters.(*DisassociateVPCFromHostedZoneInput) 2116 _ = input 2117 if !ok { 2118 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2119 } 2120 2121 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc") 2122 request.URL.Path = opPath 2123 if len(request.URL.RawQuery) > 0 { 2124 request.URL.RawQuery = "&" + opQuery 2125 } else { 2126 request.URL.RawQuery = opQuery 2127 } 2128 2129 request.Method = "POST" 2130 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2131 if err != nil { 2132 return out, metadata, &smithy.SerializationError{Err: err} 2133 } 2134 2135 if err := awsRestxml_serializeOpHttpBindingsDisassociateVPCFromHostedZoneInput(input, restEncoder); err != nil { 2136 return out, metadata, &smithy.SerializationError{Err: err} 2137 } 2138 2139 restEncoder.SetHeader("Content-Type").String("application/xml") 2140 2141 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 2142 rootAttr := []smithyxml.Attr{} 2143 root := smithyxml.StartElement{ 2144 Name: smithyxml.Name{ 2145 Local: "DisassociateVPCFromHostedZoneRequest", 2146 }, 2147 Attr: rootAttr, 2148 } 2149 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 2150 if err := awsRestxml_serializeOpDocumentDisassociateVPCFromHostedZoneInput(input, xmlEncoder.RootElement(root)); err != nil { 2151 return out, metadata, &smithy.SerializationError{Err: err} 2152 } 2153 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 2154 return out, metadata, &smithy.SerializationError{Err: err} 2155 } 2156 2157 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2158 return out, metadata, &smithy.SerializationError{Err: err} 2159 } 2160 in.Request = request 2161 2162 return next.HandleSerialize(ctx, in) 2163} 2164func awsRestxml_serializeOpHttpBindingsDisassociateVPCFromHostedZoneInput(v *DisassociateVPCFromHostedZoneInput, encoder *httpbinding.Encoder) error { 2165 if v == nil { 2166 return fmt.Errorf("unsupported serialization of nil %T", v) 2167 } 2168 2169 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 2170 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 2171 } 2172 if v.HostedZoneId != nil { 2173 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 2174 return err 2175 } 2176 } 2177 2178 return nil 2179} 2180 2181func awsRestxml_serializeOpDocumentDisassociateVPCFromHostedZoneInput(v *DisassociateVPCFromHostedZoneInput, value smithyxml.Value) error { 2182 defer value.Close() 2183 if v.Comment != nil { 2184 rootAttr := []smithyxml.Attr{} 2185 root := smithyxml.StartElement{ 2186 Name: smithyxml.Name{ 2187 Local: "Comment", 2188 }, 2189 Attr: rootAttr, 2190 } 2191 el := value.MemberElement(root) 2192 el.String(*v.Comment) 2193 } 2194 if v.VPC != nil { 2195 rootAttr := []smithyxml.Attr{} 2196 root := smithyxml.StartElement{ 2197 Name: smithyxml.Name{ 2198 Local: "VPC", 2199 }, 2200 Attr: rootAttr, 2201 } 2202 el := value.MemberElement(root) 2203 if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { 2204 return err 2205 } 2206 } 2207 return nil 2208} 2209 2210type awsRestxml_serializeOpEnableHostedZoneDNSSEC struct { 2211} 2212 2213func (*awsRestxml_serializeOpEnableHostedZoneDNSSEC) ID() string { 2214 return "OperationSerializer" 2215} 2216 2217func (m *awsRestxml_serializeOpEnableHostedZoneDNSSEC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2218 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2219) { 2220 request, ok := in.Request.(*smithyhttp.Request) 2221 if !ok { 2222 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2223 } 2224 2225 input, ok := in.Parameters.(*EnableHostedZoneDNSSECInput) 2226 _ = input 2227 if !ok { 2228 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2229 } 2230 2231 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec") 2232 request.URL.Path = opPath 2233 if len(request.URL.RawQuery) > 0 { 2234 request.URL.RawQuery = "&" + opQuery 2235 } else { 2236 request.URL.RawQuery = opQuery 2237 } 2238 2239 request.Method = "POST" 2240 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2241 if err != nil { 2242 return out, metadata, &smithy.SerializationError{Err: err} 2243 } 2244 2245 if err := awsRestxml_serializeOpHttpBindingsEnableHostedZoneDNSSECInput(input, restEncoder); err != nil { 2246 return out, metadata, &smithy.SerializationError{Err: err} 2247 } 2248 2249 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2250 return out, metadata, &smithy.SerializationError{Err: err} 2251 } 2252 in.Request = request 2253 2254 return next.HandleSerialize(ctx, in) 2255} 2256func awsRestxml_serializeOpHttpBindingsEnableHostedZoneDNSSECInput(v *EnableHostedZoneDNSSECInput, encoder *httpbinding.Encoder) error { 2257 if v == nil { 2258 return fmt.Errorf("unsupported serialization of nil %T", v) 2259 } 2260 2261 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 2262 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 2263 } 2264 if v.HostedZoneId != nil { 2265 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 2266 return err 2267 } 2268 } 2269 2270 return nil 2271} 2272 2273type awsRestxml_serializeOpGetAccountLimit struct { 2274} 2275 2276func (*awsRestxml_serializeOpGetAccountLimit) ID() string { 2277 return "OperationSerializer" 2278} 2279 2280func (m *awsRestxml_serializeOpGetAccountLimit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2281 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2282) { 2283 request, ok := in.Request.(*smithyhttp.Request) 2284 if !ok { 2285 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2286 } 2287 2288 input, ok := in.Parameters.(*GetAccountLimitInput) 2289 _ = input 2290 if !ok { 2291 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2292 } 2293 2294 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/accountlimit/{Type}") 2295 request.URL.Path = opPath 2296 if len(request.URL.RawQuery) > 0 { 2297 request.URL.RawQuery = "&" + opQuery 2298 } else { 2299 request.URL.RawQuery = opQuery 2300 } 2301 2302 request.Method = "GET" 2303 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2304 if err != nil { 2305 return out, metadata, &smithy.SerializationError{Err: err} 2306 } 2307 2308 if err := awsRestxml_serializeOpHttpBindingsGetAccountLimitInput(input, restEncoder); err != nil { 2309 return out, metadata, &smithy.SerializationError{Err: err} 2310 } 2311 2312 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2313 return out, metadata, &smithy.SerializationError{Err: err} 2314 } 2315 in.Request = request 2316 2317 return next.HandleSerialize(ctx, in) 2318} 2319func awsRestxml_serializeOpHttpBindingsGetAccountLimitInput(v *GetAccountLimitInput, encoder *httpbinding.Encoder) error { 2320 if v == nil { 2321 return fmt.Errorf("unsupported serialization of nil %T", v) 2322 } 2323 2324 if len(v.Type) == 0 { 2325 return &smithy.SerializationError{Err: fmt.Errorf("input member Type must not be empty")} 2326 } 2327 if len(v.Type) > 0 { 2328 if err := encoder.SetURI("Type").String(string(v.Type)); err != nil { 2329 return err 2330 } 2331 } 2332 2333 return nil 2334} 2335 2336type awsRestxml_serializeOpGetChange struct { 2337} 2338 2339func (*awsRestxml_serializeOpGetChange) ID() string { 2340 return "OperationSerializer" 2341} 2342 2343func (m *awsRestxml_serializeOpGetChange) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2344 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2345) { 2346 request, ok := in.Request.(*smithyhttp.Request) 2347 if !ok { 2348 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2349 } 2350 2351 input, ok := in.Parameters.(*GetChangeInput) 2352 _ = input 2353 if !ok { 2354 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2355 } 2356 2357 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/change/{Id}") 2358 request.URL.Path = opPath 2359 if len(request.URL.RawQuery) > 0 { 2360 request.URL.RawQuery = "&" + opQuery 2361 } else { 2362 request.URL.RawQuery = opQuery 2363 } 2364 2365 request.Method = "GET" 2366 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2367 if err != nil { 2368 return out, metadata, &smithy.SerializationError{Err: err} 2369 } 2370 2371 if err := awsRestxml_serializeOpHttpBindingsGetChangeInput(input, restEncoder); err != nil { 2372 return out, metadata, &smithy.SerializationError{Err: err} 2373 } 2374 2375 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2376 return out, metadata, &smithy.SerializationError{Err: err} 2377 } 2378 in.Request = request 2379 2380 return next.HandleSerialize(ctx, in) 2381} 2382func awsRestxml_serializeOpHttpBindingsGetChangeInput(v *GetChangeInput, encoder *httpbinding.Encoder) error { 2383 if v == nil { 2384 return fmt.Errorf("unsupported serialization of nil %T", v) 2385 } 2386 2387 if v.Id == nil || len(*v.Id) == 0 { 2388 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 2389 } 2390 if v.Id != nil { 2391 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 2392 return err 2393 } 2394 } 2395 2396 return nil 2397} 2398 2399type awsRestxml_serializeOpGetCheckerIpRanges struct { 2400} 2401 2402func (*awsRestxml_serializeOpGetCheckerIpRanges) ID() string { 2403 return "OperationSerializer" 2404} 2405 2406func (m *awsRestxml_serializeOpGetCheckerIpRanges) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2407 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2408) { 2409 request, ok := in.Request.(*smithyhttp.Request) 2410 if !ok { 2411 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2412 } 2413 2414 input, ok := in.Parameters.(*GetCheckerIpRangesInput) 2415 _ = input 2416 if !ok { 2417 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2418 } 2419 2420 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/checkeripranges") 2421 request.URL.Path = opPath 2422 if len(request.URL.RawQuery) > 0 { 2423 request.URL.RawQuery = "&" + opQuery 2424 } else { 2425 request.URL.RawQuery = opQuery 2426 } 2427 2428 request.Method = "GET" 2429 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2430 if err != nil { 2431 return out, metadata, &smithy.SerializationError{Err: err} 2432 } 2433 2434 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2435 return out, metadata, &smithy.SerializationError{Err: err} 2436 } 2437 in.Request = request 2438 2439 return next.HandleSerialize(ctx, in) 2440} 2441func awsRestxml_serializeOpHttpBindingsGetCheckerIpRangesInput(v *GetCheckerIpRangesInput, encoder *httpbinding.Encoder) error { 2442 if v == nil { 2443 return fmt.Errorf("unsupported serialization of nil %T", v) 2444 } 2445 2446 return nil 2447} 2448 2449type awsRestxml_serializeOpGetDNSSEC struct { 2450} 2451 2452func (*awsRestxml_serializeOpGetDNSSEC) ID() string { 2453 return "OperationSerializer" 2454} 2455 2456func (m *awsRestxml_serializeOpGetDNSSEC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2457 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2458) { 2459 request, ok := in.Request.(*smithyhttp.Request) 2460 if !ok { 2461 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2462 } 2463 2464 input, ok := in.Parameters.(*GetDNSSECInput) 2465 _ = input 2466 if !ok { 2467 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2468 } 2469 2470 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/dnssec") 2471 request.URL.Path = opPath 2472 if len(request.URL.RawQuery) > 0 { 2473 request.URL.RawQuery = "&" + opQuery 2474 } else { 2475 request.URL.RawQuery = opQuery 2476 } 2477 2478 request.Method = "GET" 2479 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2480 if err != nil { 2481 return out, metadata, &smithy.SerializationError{Err: err} 2482 } 2483 2484 if err := awsRestxml_serializeOpHttpBindingsGetDNSSECInput(input, restEncoder); err != nil { 2485 return out, metadata, &smithy.SerializationError{Err: err} 2486 } 2487 2488 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2489 return out, metadata, &smithy.SerializationError{Err: err} 2490 } 2491 in.Request = request 2492 2493 return next.HandleSerialize(ctx, in) 2494} 2495func awsRestxml_serializeOpHttpBindingsGetDNSSECInput(v *GetDNSSECInput, encoder *httpbinding.Encoder) error { 2496 if v == nil { 2497 return fmt.Errorf("unsupported serialization of nil %T", v) 2498 } 2499 2500 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 2501 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 2502 } 2503 if v.HostedZoneId != nil { 2504 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 2505 return err 2506 } 2507 } 2508 2509 return nil 2510} 2511 2512type awsRestxml_serializeOpGetGeoLocation struct { 2513} 2514 2515func (*awsRestxml_serializeOpGetGeoLocation) ID() string { 2516 return "OperationSerializer" 2517} 2518 2519func (m *awsRestxml_serializeOpGetGeoLocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2520 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2521) { 2522 request, ok := in.Request.(*smithyhttp.Request) 2523 if !ok { 2524 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2525 } 2526 2527 input, ok := in.Parameters.(*GetGeoLocationInput) 2528 _ = input 2529 if !ok { 2530 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2531 } 2532 2533 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/geolocation") 2534 request.URL.Path = opPath 2535 if len(request.URL.RawQuery) > 0 { 2536 request.URL.RawQuery = "&" + opQuery 2537 } else { 2538 request.URL.RawQuery = opQuery 2539 } 2540 2541 request.Method = "GET" 2542 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2543 if err != nil { 2544 return out, metadata, &smithy.SerializationError{Err: err} 2545 } 2546 2547 if err := awsRestxml_serializeOpHttpBindingsGetGeoLocationInput(input, restEncoder); err != nil { 2548 return out, metadata, &smithy.SerializationError{Err: err} 2549 } 2550 2551 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2552 return out, metadata, &smithy.SerializationError{Err: err} 2553 } 2554 in.Request = request 2555 2556 return next.HandleSerialize(ctx, in) 2557} 2558func awsRestxml_serializeOpHttpBindingsGetGeoLocationInput(v *GetGeoLocationInput, encoder *httpbinding.Encoder) error { 2559 if v == nil { 2560 return fmt.Errorf("unsupported serialization of nil %T", v) 2561 } 2562 2563 if v.ContinentCode != nil { 2564 encoder.SetQuery("continentcode").String(*v.ContinentCode) 2565 } 2566 2567 if v.CountryCode != nil { 2568 encoder.SetQuery("countrycode").String(*v.CountryCode) 2569 } 2570 2571 if v.SubdivisionCode != nil { 2572 encoder.SetQuery("subdivisioncode").String(*v.SubdivisionCode) 2573 } 2574 2575 return nil 2576} 2577 2578type awsRestxml_serializeOpGetHealthCheck struct { 2579} 2580 2581func (*awsRestxml_serializeOpGetHealthCheck) ID() string { 2582 return "OperationSerializer" 2583} 2584 2585func (m *awsRestxml_serializeOpGetHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2586 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2587) { 2588 request, ok := in.Request.(*smithyhttp.Request) 2589 if !ok { 2590 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2591 } 2592 2593 input, ok := in.Parameters.(*GetHealthCheckInput) 2594 _ = input 2595 if !ok { 2596 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2597 } 2598 2599 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}") 2600 request.URL.Path = opPath 2601 if len(request.URL.RawQuery) > 0 { 2602 request.URL.RawQuery = "&" + opQuery 2603 } else { 2604 request.URL.RawQuery = opQuery 2605 } 2606 2607 request.Method = "GET" 2608 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2609 if err != nil { 2610 return out, metadata, &smithy.SerializationError{Err: err} 2611 } 2612 2613 if err := awsRestxml_serializeOpHttpBindingsGetHealthCheckInput(input, restEncoder); err != nil { 2614 return out, metadata, &smithy.SerializationError{Err: err} 2615 } 2616 2617 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2618 return out, metadata, &smithy.SerializationError{Err: err} 2619 } 2620 in.Request = request 2621 2622 return next.HandleSerialize(ctx, in) 2623} 2624func awsRestxml_serializeOpHttpBindingsGetHealthCheckInput(v *GetHealthCheckInput, encoder *httpbinding.Encoder) error { 2625 if v == nil { 2626 return fmt.Errorf("unsupported serialization of nil %T", v) 2627 } 2628 2629 if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { 2630 return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} 2631 } 2632 if v.HealthCheckId != nil { 2633 if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { 2634 return err 2635 } 2636 } 2637 2638 return nil 2639} 2640 2641type awsRestxml_serializeOpGetHealthCheckCount struct { 2642} 2643 2644func (*awsRestxml_serializeOpGetHealthCheckCount) ID() string { 2645 return "OperationSerializer" 2646} 2647 2648func (m *awsRestxml_serializeOpGetHealthCheckCount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2649 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2650) { 2651 request, ok := in.Request.(*smithyhttp.Request) 2652 if !ok { 2653 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2654 } 2655 2656 input, ok := in.Parameters.(*GetHealthCheckCountInput) 2657 _ = input 2658 if !ok { 2659 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2660 } 2661 2662 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheckcount") 2663 request.URL.Path = opPath 2664 if len(request.URL.RawQuery) > 0 { 2665 request.URL.RawQuery = "&" + opQuery 2666 } else { 2667 request.URL.RawQuery = opQuery 2668 } 2669 2670 request.Method = "GET" 2671 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2672 if err != nil { 2673 return out, metadata, &smithy.SerializationError{Err: err} 2674 } 2675 2676 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2677 return out, metadata, &smithy.SerializationError{Err: err} 2678 } 2679 in.Request = request 2680 2681 return next.HandleSerialize(ctx, in) 2682} 2683func awsRestxml_serializeOpHttpBindingsGetHealthCheckCountInput(v *GetHealthCheckCountInput, encoder *httpbinding.Encoder) error { 2684 if v == nil { 2685 return fmt.Errorf("unsupported serialization of nil %T", v) 2686 } 2687 2688 return nil 2689} 2690 2691type awsRestxml_serializeOpGetHealthCheckLastFailureReason struct { 2692} 2693 2694func (*awsRestxml_serializeOpGetHealthCheckLastFailureReason) ID() string { 2695 return "OperationSerializer" 2696} 2697 2698func (m *awsRestxml_serializeOpGetHealthCheckLastFailureReason) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2699 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2700) { 2701 request, ok := in.Request.(*smithyhttp.Request) 2702 if !ok { 2703 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2704 } 2705 2706 input, ok := in.Parameters.(*GetHealthCheckLastFailureReasonInput) 2707 _ = input 2708 if !ok { 2709 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2710 } 2711 2712 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason") 2713 request.URL.Path = opPath 2714 if len(request.URL.RawQuery) > 0 { 2715 request.URL.RawQuery = "&" + opQuery 2716 } else { 2717 request.URL.RawQuery = opQuery 2718 } 2719 2720 request.Method = "GET" 2721 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2722 if err != nil { 2723 return out, metadata, &smithy.SerializationError{Err: err} 2724 } 2725 2726 if err := awsRestxml_serializeOpHttpBindingsGetHealthCheckLastFailureReasonInput(input, restEncoder); err != nil { 2727 return out, metadata, &smithy.SerializationError{Err: err} 2728 } 2729 2730 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2731 return out, metadata, &smithy.SerializationError{Err: err} 2732 } 2733 in.Request = request 2734 2735 return next.HandleSerialize(ctx, in) 2736} 2737func awsRestxml_serializeOpHttpBindingsGetHealthCheckLastFailureReasonInput(v *GetHealthCheckLastFailureReasonInput, encoder *httpbinding.Encoder) error { 2738 if v == nil { 2739 return fmt.Errorf("unsupported serialization of nil %T", v) 2740 } 2741 2742 if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { 2743 return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} 2744 } 2745 if v.HealthCheckId != nil { 2746 if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { 2747 return err 2748 } 2749 } 2750 2751 return nil 2752} 2753 2754type awsRestxml_serializeOpGetHealthCheckStatus struct { 2755} 2756 2757func (*awsRestxml_serializeOpGetHealthCheckStatus) ID() string { 2758 return "OperationSerializer" 2759} 2760 2761func (m *awsRestxml_serializeOpGetHealthCheckStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2762 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2763) { 2764 request, ok := in.Request.(*smithyhttp.Request) 2765 if !ok { 2766 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2767 } 2768 2769 input, ok := in.Parameters.(*GetHealthCheckStatusInput) 2770 _ = input 2771 if !ok { 2772 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2773 } 2774 2775 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}/status") 2776 request.URL.Path = opPath 2777 if len(request.URL.RawQuery) > 0 { 2778 request.URL.RawQuery = "&" + opQuery 2779 } else { 2780 request.URL.RawQuery = opQuery 2781 } 2782 2783 request.Method = "GET" 2784 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2785 if err != nil { 2786 return out, metadata, &smithy.SerializationError{Err: err} 2787 } 2788 2789 if err := awsRestxml_serializeOpHttpBindingsGetHealthCheckStatusInput(input, restEncoder); err != nil { 2790 return out, metadata, &smithy.SerializationError{Err: err} 2791 } 2792 2793 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2794 return out, metadata, &smithy.SerializationError{Err: err} 2795 } 2796 in.Request = request 2797 2798 return next.HandleSerialize(ctx, in) 2799} 2800func awsRestxml_serializeOpHttpBindingsGetHealthCheckStatusInput(v *GetHealthCheckStatusInput, encoder *httpbinding.Encoder) error { 2801 if v == nil { 2802 return fmt.Errorf("unsupported serialization of nil %T", v) 2803 } 2804 2805 if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { 2806 return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} 2807 } 2808 if v.HealthCheckId != nil { 2809 if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { 2810 return err 2811 } 2812 } 2813 2814 return nil 2815} 2816 2817type awsRestxml_serializeOpGetHostedZone struct { 2818} 2819 2820func (*awsRestxml_serializeOpGetHostedZone) ID() string { 2821 return "OperationSerializer" 2822} 2823 2824func (m *awsRestxml_serializeOpGetHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2825 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2826) { 2827 request, ok := in.Request.(*smithyhttp.Request) 2828 if !ok { 2829 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2830 } 2831 2832 input, ok := in.Parameters.(*GetHostedZoneInput) 2833 _ = input 2834 if !ok { 2835 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2836 } 2837 2838 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{Id}") 2839 request.URL.Path = opPath 2840 if len(request.URL.RawQuery) > 0 { 2841 request.URL.RawQuery = "&" + opQuery 2842 } else { 2843 request.URL.RawQuery = opQuery 2844 } 2845 2846 request.Method = "GET" 2847 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2848 if err != nil { 2849 return out, metadata, &smithy.SerializationError{Err: err} 2850 } 2851 2852 if err := awsRestxml_serializeOpHttpBindingsGetHostedZoneInput(input, restEncoder); err != nil { 2853 return out, metadata, &smithy.SerializationError{Err: err} 2854 } 2855 2856 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2857 return out, metadata, &smithy.SerializationError{Err: err} 2858 } 2859 in.Request = request 2860 2861 return next.HandleSerialize(ctx, in) 2862} 2863func awsRestxml_serializeOpHttpBindingsGetHostedZoneInput(v *GetHostedZoneInput, encoder *httpbinding.Encoder) error { 2864 if v == nil { 2865 return fmt.Errorf("unsupported serialization of nil %T", v) 2866 } 2867 2868 if v.Id == nil || len(*v.Id) == 0 { 2869 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 2870 } 2871 if v.Id != nil { 2872 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 2873 return err 2874 } 2875 } 2876 2877 return nil 2878} 2879 2880type awsRestxml_serializeOpGetHostedZoneCount struct { 2881} 2882 2883func (*awsRestxml_serializeOpGetHostedZoneCount) ID() string { 2884 return "OperationSerializer" 2885} 2886 2887func (m *awsRestxml_serializeOpGetHostedZoneCount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2888 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2889) { 2890 request, ok := in.Request.(*smithyhttp.Request) 2891 if !ok { 2892 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2893 } 2894 2895 input, ok := in.Parameters.(*GetHostedZoneCountInput) 2896 _ = input 2897 if !ok { 2898 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2899 } 2900 2901 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonecount") 2902 request.URL.Path = opPath 2903 if len(request.URL.RawQuery) > 0 { 2904 request.URL.RawQuery = "&" + opQuery 2905 } else { 2906 request.URL.RawQuery = opQuery 2907 } 2908 2909 request.Method = "GET" 2910 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2911 if err != nil { 2912 return out, metadata, &smithy.SerializationError{Err: err} 2913 } 2914 2915 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2916 return out, metadata, &smithy.SerializationError{Err: err} 2917 } 2918 in.Request = request 2919 2920 return next.HandleSerialize(ctx, in) 2921} 2922func awsRestxml_serializeOpHttpBindingsGetHostedZoneCountInput(v *GetHostedZoneCountInput, encoder *httpbinding.Encoder) error { 2923 if v == nil { 2924 return fmt.Errorf("unsupported serialization of nil %T", v) 2925 } 2926 2927 return nil 2928} 2929 2930type awsRestxml_serializeOpGetHostedZoneLimit struct { 2931} 2932 2933func (*awsRestxml_serializeOpGetHostedZoneLimit) ID() string { 2934 return "OperationSerializer" 2935} 2936 2937func (m *awsRestxml_serializeOpGetHostedZoneLimit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 2938 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 2939) { 2940 request, ok := in.Request.(*smithyhttp.Request) 2941 if !ok { 2942 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 2943 } 2944 2945 input, ok := in.Parameters.(*GetHostedZoneLimitInput) 2946 _ = input 2947 if !ok { 2948 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 2949 } 2950 2951 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}") 2952 request.URL.Path = opPath 2953 if len(request.URL.RawQuery) > 0 { 2954 request.URL.RawQuery = "&" + opQuery 2955 } else { 2956 request.URL.RawQuery = opQuery 2957 } 2958 2959 request.Method = "GET" 2960 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 2961 if err != nil { 2962 return out, metadata, &smithy.SerializationError{Err: err} 2963 } 2964 2965 if err := awsRestxml_serializeOpHttpBindingsGetHostedZoneLimitInput(input, restEncoder); err != nil { 2966 return out, metadata, &smithy.SerializationError{Err: err} 2967 } 2968 2969 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 2970 return out, metadata, &smithy.SerializationError{Err: err} 2971 } 2972 in.Request = request 2973 2974 return next.HandleSerialize(ctx, in) 2975} 2976func awsRestxml_serializeOpHttpBindingsGetHostedZoneLimitInput(v *GetHostedZoneLimitInput, encoder *httpbinding.Encoder) error { 2977 if v == nil { 2978 return fmt.Errorf("unsupported serialization of nil %T", v) 2979 } 2980 2981 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 2982 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 2983 } 2984 if v.HostedZoneId != nil { 2985 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 2986 return err 2987 } 2988 } 2989 2990 if len(v.Type) == 0 { 2991 return &smithy.SerializationError{Err: fmt.Errorf("input member Type must not be empty")} 2992 } 2993 if len(v.Type) > 0 { 2994 if err := encoder.SetURI("Type").String(string(v.Type)); err != nil { 2995 return err 2996 } 2997 } 2998 2999 return nil 3000} 3001 3002type awsRestxml_serializeOpGetQueryLoggingConfig struct { 3003} 3004 3005func (*awsRestxml_serializeOpGetQueryLoggingConfig) ID() string { 3006 return "OperationSerializer" 3007} 3008 3009func (m *awsRestxml_serializeOpGetQueryLoggingConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3010 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3011) { 3012 request, ok := in.Request.(*smithyhttp.Request) 3013 if !ok { 3014 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3015 } 3016 3017 input, ok := in.Parameters.(*GetQueryLoggingConfigInput) 3018 _ = input 3019 if !ok { 3020 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3021 } 3022 3023 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig/{Id}") 3024 request.URL.Path = opPath 3025 if len(request.URL.RawQuery) > 0 { 3026 request.URL.RawQuery = "&" + opQuery 3027 } else { 3028 request.URL.RawQuery = opQuery 3029 } 3030 3031 request.Method = "GET" 3032 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3033 if err != nil { 3034 return out, metadata, &smithy.SerializationError{Err: err} 3035 } 3036 3037 if err := awsRestxml_serializeOpHttpBindingsGetQueryLoggingConfigInput(input, restEncoder); err != nil { 3038 return out, metadata, &smithy.SerializationError{Err: err} 3039 } 3040 3041 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3042 return out, metadata, &smithy.SerializationError{Err: err} 3043 } 3044 in.Request = request 3045 3046 return next.HandleSerialize(ctx, in) 3047} 3048func awsRestxml_serializeOpHttpBindingsGetQueryLoggingConfigInput(v *GetQueryLoggingConfigInput, encoder *httpbinding.Encoder) error { 3049 if v == nil { 3050 return fmt.Errorf("unsupported serialization of nil %T", v) 3051 } 3052 3053 if v.Id == nil || len(*v.Id) == 0 { 3054 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 3055 } 3056 if v.Id != nil { 3057 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 3058 return err 3059 } 3060 } 3061 3062 return nil 3063} 3064 3065type awsRestxml_serializeOpGetReusableDelegationSet struct { 3066} 3067 3068func (*awsRestxml_serializeOpGetReusableDelegationSet) ID() string { 3069 return "OperationSerializer" 3070} 3071 3072func (m *awsRestxml_serializeOpGetReusableDelegationSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3073 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3074) { 3075 request, ok := in.Request.(*smithyhttp.Request) 3076 if !ok { 3077 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3078 } 3079 3080 input, ok := in.Parameters.(*GetReusableDelegationSetInput) 3081 _ = input 3082 if !ok { 3083 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3084 } 3085 3086 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset/{Id}") 3087 request.URL.Path = opPath 3088 if len(request.URL.RawQuery) > 0 { 3089 request.URL.RawQuery = "&" + opQuery 3090 } else { 3091 request.URL.RawQuery = opQuery 3092 } 3093 3094 request.Method = "GET" 3095 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3096 if err != nil { 3097 return out, metadata, &smithy.SerializationError{Err: err} 3098 } 3099 3100 if err := awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetInput(input, restEncoder); err != nil { 3101 return out, metadata, &smithy.SerializationError{Err: err} 3102 } 3103 3104 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3105 return out, metadata, &smithy.SerializationError{Err: err} 3106 } 3107 in.Request = request 3108 3109 return next.HandleSerialize(ctx, in) 3110} 3111func awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetInput(v *GetReusableDelegationSetInput, encoder *httpbinding.Encoder) error { 3112 if v == nil { 3113 return fmt.Errorf("unsupported serialization of nil %T", v) 3114 } 3115 3116 if v.Id == nil || len(*v.Id) == 0 { 3117 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 3118 } 3119 if v.Id != nil { 3120 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 3121 return err 3122 } 3123 } 3124 3125 return nil 3126} 3127 3128type awsRestxml_serializeOpGetReusableDelegationSetLimit struct { 3129} 3130 3131func (*awsRestxml_serializeOpGetReusableDelegationSetLimit) ID() string { 3132 return "OperationSerializer" 3133} 3134 3135func (m *awsRestxml_serializeOpGetReusableDelegationSetLimit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3136 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3137) { 3138 request, ok := in.Request.(*smithyhttp.Request) 3139 if !ok { 3140 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3141 } 3142 3143 input, ok := in.Parameters.(*GetReusableDelegationSetLimitInput) 3144 _ = input 3145 if !ok { 3146 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3147 } 3148 3149 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}") 3150 request.URL.Path = opPath 3151 if len(request.URL.RawQuery) > 0 { 3152 request.URL.RawQuery = "&" + opQuery 3153 } else { 3154 request.URL.RawQuery = opQuery 3155 } 3156 3157 request.Method = "GET" 3158 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3159 if err != nil { 3160 return out, metadata, &smithy.SerializationError{Err: err} 3161 } 3162 3163 if err := awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetLimitInput(input, restEncoder); err != nil { 3164 return out, metadata, &smithy.SerializationError{Err: err} 3165 } 3166 3167 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3168 return out, metadata, &smithy.SerializationError{Err: err} 3169 } 3170 in.Request = request 3171 3172 return next.HandleSerialize(ctx, in) 3173} 3174func awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetLimitInput(v *GetReusableDelegationSetLimitInput, encoder *httpbinding.Encoder) error { 3175 if v == nil { 3176 return fmt.Errorf("unsupported serialization of nil %T", v) 3177 } 3178 3179 if v.DelegationSetId == nil || len(*v.DelegationSetId) == 0 { 3180 return &smithy.SerializationError{Err: fmt.Errorf("input member DelegationSetId must not be empty")} 3181 } 3182 if v.DelegationSetId != nil { 3183 if err := encoder.SetURI("DelegationSetId").String(*v.DelegationSetId); err != nil { 3184 return err 3185 } 3186 } 3187 3188 if len(v.Type) == 0 { 3189 return &smithy.SerializationError{Err: fmt.Errorf("input member Type must not be empty")} 3190 } 3191 if len(v.Type) > 0 { 3192 if err := encoder.SetURI("Type").String(string(v.Type)); err != nil { 3193 return err 3194 } 3195 } 3196 3197 return nil 3198} 3199 3200type awsRestxml_serializeOpGetTrafficPolicy struct { 3201} 3202 3203func (*awsRestxml_serializeOpGetTrafficPolicy) ID() string { 3204 return "OperationSerializer" 3205} 3206 3207func (m *awsRestxml_serializeOpGetTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3208 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3209) { 3210 request, ok := in.Request.(*smithyhttp.Request) 3211 if !ok { 3212 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3213 } 3214 3215 input, ok := in.Parameters.(*GetTrafficPolicyInput) 3216 _ = input 3217 if !ok { 3218 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3219 } 3220 3221 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}/{Version}") 3222 request.URL.Path = opPath 3223 if len(request.URL.RawQuery) > 0 { 3224 request.URL.RawQuery = "&" + opQuery 3225 } else { 3226 request.URL.RawQuery = opQuery 3227 } 3228 3229 request.Method = "GET" 3230 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3231 if err != nil { 3232 return out, metadata, &smithy.SerializationError{Err: err} 3233 } 3234 3235 if err := awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInput(input, restEncoder); err != nil { 3236 return out, metadata, &smithy.SerializationError{Err: err} 3237 } 3238 3239 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3240 return out, metadata, &smithy.SerializationError{Err: err} 3241 } 3242 in.Request = request 3243 3244 return next.HandleSerialize(ctx, in) 3245} 3246func awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInput(v *GetTrafficPolicyInput, encoder *httpbinding.Encoder) error { 3247 if v == nil { 3248 return fmt.Errorf("unsupported serialization of nil %T", v) 3249 } 3250 3251 if v.Id == nil || len(*v.Id) == 0 { 3252 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 3253 } 3254 if v.Id != nil { 3255 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 3256 return err 3257 } 3258 } 3259 3260 if v.Version == nil { 3261 return &smithy.SerializationError{Err: fmt.Errorf("input member Version must not be empty")} 3262 } 3263 if v.Version != nil { 3264 if err := encoder.SetURI("Version").Integer(*v.Version); err != nil { 3265 return err 3266 } 3267 } 3268 3269 return nil 3270} 3271 3272type awsRestxml_serializeOpGetTrafficPolicyInstance struct { 3273} 3274 3275func (*awsRestxml_serializeOpGetTrafficPolicyInstance) ID() string { 3276 return "OperationSerializer" 3277} 3278 3279func (m *awsRestxml_serializeOpGetTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3280 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3281) { 3282 request, ok := in.Request.(*smithyhttp.Request) 3283 if !ok { 3284 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3285 } 3286 3287 input, ok := in.Parameters.(*GetTrafficPolicyInstanceInput) 3288 _ = input 3289 if !ok { 3290 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3291 } 3292 3293 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance/{Id}") 3294 request.URL.Path = opPath 3295 if len(request.URL.RawQuery) > 0 { 3296 request.URL.RawQuery = "&" + opQuery 3297 } else { 3298 request.URL.RawQuery = opQuery 3299 } 3300 3301 request.Method = "GET" 3302 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3303 if err != nil { 3304 return out, metadata, &smithy.SerializationError{Err: err} 3305 } 3306 3307 if err := awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInstanceInput(input, restEncoder); err != nil { 3308 return out, metadata, &smithy.SerializationError{Err: err} 3309 } 3310 3311 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3312 return out, metadata, &smithy.SerializationError{Err: err} 3313 } 3314 in.Request = request 3315 3316 return next.HandleSerialize(ctx, in) 3317} 3318func awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInstanceInput(v *GetTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error { 3319 if v == nil { 3320 return fmt.Errorf("unsupported serialization of nil %T", v) 3321 } 3322 3323 if v.Id == nil || len(*v.Id) == 0 { 3324 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 3325 } 3326 if v.Id != nil { 3327 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 3328 return err 3329 } 3330 } 3331 3332 return nil 3333} 3334 3335type awsRestxml_serializeOpGetTrafficPolicyInstanceCount struct { 3336} 3337 3338func (*awsRestxml_serializeOpGetTrafficPolicyInstanceCount) ID() string { 3339 return "OperationSerializer" 3340} 3341 3342func (m *awsRestxml_serializeOpGetTrafficPolicyInstanceCount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3343 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3344) { 3345 request, ok := in.Request.(*smithyhttp.Request) 3346 if !ok { 3347 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3348 } 3349 3350 input, ok := in.Parameters.(*GetTrafficPolicyInstanceCountInput) 3351 _ = input 3352 if !ok { 3353 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3354 } 3355 3356 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstancecount") 3357 request.URL.Path = opPath 3358 if len(request.URL.RawQuery) > 0 { 3359 request.URL.RawQuery = "&" + opQuery 3360 } else { 3361 request.URL.RawQuery = opQuery 3362 } 3363 3364 request.Method = "GET" 3365 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3366 if err != nil { 3367 return out, metadata, &smithy.SerializationError{Err: err} 3368 } 3369 3370 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3371 return out, metadata, &smithy.SerializationError{Err: err} 3372 } 3373 in.Request = request 3374 3375 return next.HandleSerialize(ctx, in) 3376} 3377func awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInstanceCountInput(v *GetTrafficPolicyInstanceCountInput, encoder *httpbinding.Encoder) error { 3378 if v == nil { 3379 return fmt.Errorf("unsupported serialization of nil %T", v) 3380 } 3381 3382 return nil 3383} 3384 3385type awsRestxml_serializeOpListGeoLocations struct { 3386} 3387 3388func (*awsRestxml_serializeOpListGeoLocations) ID() string { 3389 return "OperationSerializer" 3390} 3391 3392func (m *awsRestxml_serializeOpListGeoLocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3393 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3394) { 3395 request, ok := in.Request.(*smithyhttp.Request) 3396 if !ok { 3397 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3398 } 3399 3400 input, ok := in.Parameters.(*ListGeoLocationsInput) 3401 _ = input 3402 if !ok { 3403 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3404 } 3405 3406 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/geolocations") 3407 request.URL.Path = opPath 3408 if len(request.URL.RawQuery) > 0 { 3409 request.URL.RawQuery = "&" + opQuery 3410 } else { 3411 request.URL.RawQuery = opQuery 3412 } 3413 3414 request.Method = "GET" 3415 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3416 if err != nil { 3417 return out, metadata, &smithy.SerializationError{Err: err} 3418 } 3419 3420 if err := awsRestxml_serializeOpHttpBindingsListGeoLocationsInput(input, restEncoder); err != nil { 3421 return out, metadata, &smithy.SerializationError{Err: err} 3422 } 3423 3424 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3425 return out, metadata, &smithy.SerializationError{Err: err} 3426 } 3427 in.Request = request 3428 3429 return next.HandleSerialize(ctx, in) 3430} 3431func awsRestxml_serializeOpHttpBindingsListGeoLocationsInput(v *ListGeoLocationsInput, encoder *httpbinding.Encoder) error { 3432 if v == nil { 3433 return fmt.Errorf("unsupported serialization of nil %T", v) 3434 } 3435 3436 if v.MaxItems != nil { 3437 encoder.SetQuery("maxitems").Integer(*v.MaxItems) 3438 } 3439 3440 if v.StartContinentCode != nil { 3441 encoder.SetQuery("startcontinentcode").String(*v.StartContinentCode) 3442 } 3443 3444 if v.StartCountryCode != nil { 3445 encoder.SetQuery("startcountrycode").String(*v.StartCountryCode) 3446 } 3447 3448 if v.StartSubdivisionCode != nil { 3449 encoder.SetQuery("startsubdivisioncode").String(*v.StartSubdivisionCode) 3450 } 3451 3452 return nil 3453} 3454 3455type awsRestxml_serializeOpListHealthChecks struct { 3456} 3457 3458func (*awsRestxml_serializeOpListHealthChecks) ID() string { 3459 return "OperationSerializer" 3460} 3461 3462func (m *awsRestxml_serializeOpListHealthChecks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3463 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3464) { 3465 request, ok := in.Request.(*smithyhttp.Request) 3466 if !ok { 3467 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3468 } 3469 3470 input, ok := in.Parameters.(*ListHealthChecksInput) 3471 _ = input 3472 if !ok { 3473 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3474 } 3475 3476 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck") 3477 request.URL.Path = opPath 3478 if len(request.URL.RawQuery) > 0 { 3479 request.URL.RawQuery = "&" + opQuery 3480 } else { 3481 request.URL.RawQuery = opQuery 3482 } 3483 3484 request.Method = "GET" 3485 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3486 if err != nil { 3487 return out, metadata, &smithy.SerializationError{Err: err} 3488 } 3489 3490 if err := awsRestxml_serializeOpHttpBindingsListHealthChecksInput(input, restEncoder); err != nil { 3491 return out, metadata, &smithy.SerializationError{Err: err} 3492 } 3493 3494 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3495 return out, metadata, &smithy.SerializationError{Err: err} 3496 } 3497 in.Request = request 3498 3499 return next.HandleSerialize(ctx, in) 3500} 3501func awsRestxml_serializeOpHttpBindingsListHealthChecksInput(v *ListHealthChecksInput, encoder *httpbinding.Encoder) error { 3502 if v == nil { 3503 return fmt.Errorf("unsupported serialization of nil %T", v) 3504 } 3505 3506 if v.Marker != nil { 3507 encoder.SetQuery("marker").String(*v.Marker) 3508 } 3509 3510 if v.MaxItems != nil { 3511 encoder.SetQuery("maxitems").Integer(*v.MaxItems) 3512 } 3513 3514 return nil 3515} 3516 3517type awsRestxml_serializeOpListHostedZones struct { 3518} 3519 3520func (*awsRestxml_serializeOpListHostedZones) ID() string { 3521 return "OperationSerializer" 3522} 3523 3524func (m *awsRestxml_serializeOpListHostedZones) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3525 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3526) { 3527 request, ok := in.Request.(*smithyhttp.Request) 3528 if !ok { 3529 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3530 } 3531 3532 input, ok := in.Parameters.(*ListHostedZonesInput) 3533 _ = input 3534 if !ok { 3535 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3536 } 3537 3538 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone") 3539 request.URL.Path = opPath 3540 if len(request.URL.RawQuery) > 0 { 3541 request.URL.RawQuery = "&" + opQuery 3542 } else { 3543 request.URL.RawQuery = opQuery 3544 } 3545 3546 request.Method = "GET" 3547 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3548 if err != nil { 3549 return out, metadata, &smithy.SerializationError{Err: err} 3550 } 3551 3552 if err := awsRestxml_serializeOpHttpBindingsListHostedZonesInput(input, restEncoder); err != nil { 3553 return out, metadata, &smithy.SerializationError{Err: err} 3554 } 3555 3556 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3557 return out, metadata, &smithy.SerializationError{Err: err} 3558 } 3559 in.Request = request 3560 3561 return next.HandleSerialize(ctx, in) 3562} 3563func awsRestxml_serializeOpHttpBindingsListHostedZonesInput(v *ListHostedZonesInput, encoder *httpbinding.Encoder) error { 3564 if v == nil { 3565 return fmt.Errorf("unsupported serialization of nil %T", v) 3566 } 3567 3568 if v.DelegationSetId != nil { 3569 encoder.SetQuery("delegationsetid").String(*v.DelegationSetId) 3570 } 3571 3572 if v.Marker != nil { 3573 encoder.SetQuery("marker").String(*v.Marker) 3574 } 3575 3576 if v.MaxItems != nil { 3577 encoder.SetQuery("maxitems").Integer(*v.MaxItems) 3578 } 3579 3580 return nil 3581} 3582 3583type awsRestxml_serializeOpListHostedZonesByName struct { 3584} 3585 3586func (*awsRestxml_serializeOpListHostedZonesByName) ID() string { 3587 return "OperationSerializer" 3588} 3589 3590func (m *awsRestxml_serializeOpListHostedZonesByName) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3591 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3592) { 3593 request, ok := in.Request.(*smithyhttp.Request) 3594 if !ok { 3595 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3596 } 3597 3598 input, ok := in.Parameters.(*ListHostedZonesByNameInput) 3599 _ = input 3600 if !ok { 3601 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3602 } 3603 3604 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonesbyname") 3605 request.URL.Path = opPath 3606 if len(request.URL.RawQuery) > 0 { 3607 request.URL.RawQuery = "&" + opQuery 3608 } else { 3609 request.URL.RawQuery = opQuery 3610 } 3611 3612 request.Method = "GET" 3613 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3614 if err != nil { 3615 return out, metadata, &smithy.SerializationError{Err: err} 3616 } 3617 3618 if err := awsRestxml_serializeOpHttpBindingsListHostedZonesByNameInput(input, restEncoder); err != nil { 3619 return out, metadata, &smithy.SerializationError{Err: err} 3620 } 3621 3622 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3623 return out, metadata, &smithy.SerializationError{Err: err} 3624 } 3625 in.Request = request 3626 3627 return next.HandleSerialize(ctx, in) 3628} 3629func awsRestxml_serializeOpHttpBindingsListHostedZonesByNameInput(v *ListHostedZonesByNameInput, encoder *httpbinding.Encoder) error { 3630 if v == nil { 3631 return fmt.Errorf("unsupported serialization of nil %T", v) 3632 } 3633 3634 if v.DNSName != nil { 3635 encoder.SetQuery("dnsname").String(*v.DNSName) 3636 } 3637 3638 if v.HostedZoneId != nil { 3639 encoder.SetQuery("hostedzoneid").String(*v.HostedZoneId) 3640 } 3641 3642 if v.MaxItems != nil { 3643 encoder.SetQuery("maxitems").Integer(*v.MaxItems) 3644 } 3645 3646 return nil 3647} 3648 3649type awsRestxml_serializeOpListHostedZonesByVPC struct { 3650} 3651 3652func (*awsRestxml_serializeOpListHostedZonesByVPC) ID() string { 3653 return "OperationSerializer" 3654} 3655 3656func (m *awsRestxml_serializeOpListHostedZonesByVPC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3657 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3658) { 3659 request, ok := in.Request.(*smithyhttp.Request) 3660 if !ok { 3661 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3662 } 3663 3664 input, ok := in.Parameters.(*ListHostedZonesByVPCInput) 3665 _ = input 3666 if !ok { 3667 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3668 } 3669 3670 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonesbyvpc") 3671 request.URL.Path = opPath 3672 if len(request.URL.RawQuery) > 0 { 3673 request.URL.RawQuery = "&" + opQuery 3674 } else { 3675 request.URL.RawQuery = opQuery 3676 } 3677 3678 request.Method = "GET" 3679 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3680 if err != nil { 3681 return out, metadata, &smithy.SerializationError{Err: err} 3682 } 3683 3684 if err := awsRestxml_serializeOpHttpBindingsListHostedZonesByVPCInput(input, restEncoder); err != nil { 3685 return out, metadata, &smithy.SerializationError{Err: err} 3686 } 3687 3688 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3689 return out, metadata, &smithy.SerializationError{Err: err} 3690 } 3691 in.Request = request 3692 3693 return next.HandleSerialize(ctx, in) 3694} 3695func awsRestxml_serializeOpHttpBindingsListHostedZonesByVPCInput(v *ListHostedZonesByVPCInput, encoder *httpbinding.Encoder) error { 3696 if v == nil { 3697 return fmt.Errorf("unsupported serialization of nil %T", v) 3698 } 3699 3700 if v.MaxItems != nil { 3701 encoder.SetQuery("maxitems").Integer(*v.MaxItems) 3702 } 3703 3704 if v.NextToken != nil { 3705 encoder.SetQuery("nexttoken").String(*v.NextToken) 3706 } 3707 3708 if v.VPCId != nil { 3709 encoder.SetQuery("vpcid").String(*v.VPCId) 3710 } 3711 3712 if len(v.VPCRegion) > 0 { 3713 encoder.SetQuery("vpcregion").String(string(v.VPCRegion)) 3714 } 3715 3716 return nil 3717} 3718 3719type awsRestxml_serializeOpListQueryLoggingConfigs struct { 3720} 3721 3722func (*awsRestxml_serializeOpListQueryLoggingConfigs) ID() string { 3723 return "OperationSerializer" 3724} 3725 3726func (m *awsRestxml_serializeOpListQueryLoggingConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3727 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3728) { 3729 request, ok := in.Request.(*smithyhttp.Request) 3730 if !ok { 3731 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3732 } 3733 3734 input, ok := in.Parameters.(*ListQueryLoggingConfigsInput) 3735 _ = input 3736 if !ok { 3737 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3738 } 3739 3740 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig") 3741 request.URL.Path = opPath 3742 if len(request.URL.RawQuery) > 0 { 3743 request.URL.RawQuery = "&" + opQuery 3744 } else { 3745 request.URL.RawQuery = opQuery 3746 } 3747 3748 request.Method = "GET" 3749 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3750 if err != nil { 3751 return out, metadata, &smithy.SerializationError{Err: err} 3752 } 3753 3754 if err := awsRestxml_serializeOpHttpBindingsListQueryLoggingConfigsInput(input, restEncoder); err != nil { 3755 return out, metadata, &smithy.SerializationError{Err: err} 3756 } 3757 3758 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3759 return out, metadata, &smithy.SerializationError{Err: err} 3760 } 3761 in.Request = request 3762 3763 return next.HandleSerialize(ctx, in) 3764} 3765func awsRestxml_serializeOpHttpBindingsListQueryLoggingConfigsInput(v *ListQueryLoggingConfigsInput, encoder *httpbinding.Encoder) error { 3766 if v == nil { 3767 return fmt.Errorf("unsupported serialization of nil %T", v) 3768 } 3769 3770 if v.HostedZoneId != nil { 3771 encoder.SetQuery("hostedzoneid").String(*v.HostedZoneId) 3772 } 3773 3774 if v.MaxResults != nil { 3775 encoder.SetQuery("maxresults").Integer(*v.MaxResults) 3776 } 3777 3778 if v.NextToken != nil { 3779 encoder.SetQuery("nexttoken").String(*v.NextToken) 3780 } 3781 3782 return nil 3783} 3784 3785type awsRestxml_serializeOpListResourceRecordSets struct { 3786} 3787 3788func (*awsRestxml_serializeOpListResourceRecordSets) ID() string { 3789 return "OperationSerializer" 3790} 3791 3792func (m *awsRestxml_serializeOpListResourceRecordSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3793 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3794) { 3795 request, ok := in.Request.(*smithyhttp.Request) 3796 if !ok { 3797 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3798 } 3799 3800 input, ok := in.Parameters.(*ListResourceRecordSetsInput) 3801 _ = input 3802 if !ok { 3803 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3804 } 3805 3806 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/rrset") 3807 request.URL.Path = opPath 3808 if len(request.URL.RawQuery) > 0 { 3809 request.URL.RawQuery = "&" + opQuery 3810 } else { 3811 request.URL.RawQuery = opQuery 3812 } 3813 3814 request.Method = "GET" 3815 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3816 if err != nil { 3817 return out, metadata, &smithy.SerializationError{Err: err} 3818 } 3819 3820 if err := awsRestxml_serializeOpHttpBindingsListResourceRecordSetsInput(input, restEncoder); err != nil { 3821 return out, metadata, &smithy.SerializationError{Err: err} 3822 } 3823 3824 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3825 return out, metadata, &smithy.SerializationError{Err: err} 3826 } 3827 in.Request = request 3828 3829 return next.HandleSerialize(ctx, in) 3830} 3831func awsRestxml_serializeOpHttpBindingsListResourceRecordSetsInput(v *ListResourceRecordSetsInput, encoder *httpbinding.Encoder) error { 3832 if v == nil { 3833 return fmt.Errorf("unsupported serialization of nil %T", v) 3834 } 3835 3836 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 3837 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 3838 } 3839 if v.HostedZoneId != nil { 3840 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 3841 return err 3842 } 3843 } 3844 3845 if v.MaxItems != nil { 3846 encoder.SetQuery("maxitems").Integer(*v.MaxItems) 3847 } 3848 3849 if v.StartRecordIdentifier != nil { 3850 encoder.SetQuery("identifier").String(*v.StartRecordIdentifier) 3851 } 3852 3853 if v.StartRecordName != nil { 3854 encoder.SetQuery("name").String(*v.StartRecordName) 3855 } 3856 3857 if len(v.StartRecordType) > 0 { 3858 encoder.SetQuery("type").String(string(v.StartRecordType)) 3859 } 3860 3861 return nil 3862} 3863 3864type awsRestxml_serializeOpListReusableDelegationSets struct { 3865} 3866 3867func (*awsRestxml_serializeOpListReusableDelegationSets) ID() string { 3868 return "OperationSerializer" 3869} 3870 3871func (m *awsRestxml_serializeOpListReusableDelegationSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3872 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3873) { 3874 request, ok := in.Request.(*smithyhttp.Request) 3875 if !ok { 3876 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3877 } 3878 3879 input, ok := in.Parameters.(*ListReusableDelegationSetsInput) 3880 _ = input 3881 if !ok { 3882 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3883 } 3884 3885 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset") 3886 request.URL.Path = opPath 3887 if len(request.URL.RawQuery) > 0 { 3888 request.URL.RawQuery = "&" + opQuery 3889 } else { 3890 request.URL.RawQuery = opQuery 3891 } 3892 3893 request.Method = "GET" 3894 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3895 if err != nil { 3896 return out, metadata, &smithy.SerializationError{Err: err} 3897 } 3898 3899 if err := awsRestxml_serializeOpHttpBindingsListReusableDelegationSetsInput(input, restEncoder); err != nil { 3900 return out, metadata, &smithy.SerializationError{Err: err} 3901 } 3902 3903 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3904 return out, metadata, &smithy.SerializationError{Err: err} 3905 } 3906 in.Request = request 3907 3908 return next.HandleSerialize(ctx, in) 3909} 3910func awsRestxml_serializeOpHttpBindingsListReusableDelegationSetsInput(v *ListReusableDelegationSetsInput, encoder *httpbinding.Encoder) error { 3911 if v == nil { 3912 return fmt.Errorf("unsupported serialization of nil %T", v) 3913 } 3914 3915 if v.Marker != nil { 3916 encoder.SetQuery("marker").String(*v.Marker) 3917 } 3918 3919 if v.MaxItems != nil { 3920 encoder.SetQuery("maxitems").Integer(*v.MaxItems) 3921 } 3922 3923 return nil 3924} 3925 3926type awsRestxml_serializeOpListTagsForResource struct { 3927} 3928 3929func (*awsRestxml_serializeOpListTagsForResource) ID() string { 3930 return "OperationSerializer" 3931} 3932 3933func (m *awsRestxml_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 3934 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 3935) { 3936 request, ok := in.Request.(*smithyhttp.Request) 3937 if !ok { 3938 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 3939 } 3940 3941 input, ok := in.Parameters.(*ListTagsForResourceInput) 3942 _ = input 3943 if !ok { 3944 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 3945 } 3946 3947 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/tags/{ResourceType}/{ResourceId}") 3948 request.URL.Path = opPath 3949 if len(request.URL.RawQuery) > 0 { 3950 request.URL.RawQuery = "&" + opQuery 3951 } else { 3952 request.URL.RawQuery = opQuery 3953 } 3954 3955 request.Method = "GET" 3956 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 3957 if err != nil { 3958 return out, metadata, &smithy.SerializationError{Err: err} 3959 } 3960 3961 if err := awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { 3962 return out, metadata, &smithy.SerializationError{Err: err} 3963 } 3964 3965 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 3966 return out, metadata, &smithy.SerializationError{Err: err} 3967 } 3968 in.Request = request 3969 3970 return next.HandleSerialize(ctx, in) 3971} 3972func awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { 3973 if v == nil { 3974 return fmt.Errorf("unsupported serialization of nil %T", v) 3975 } 3976 3977 if v.ResourceId == nil || len(*v.ResourceId) == 0 { 3978 return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceId must not be empty")} 3979 } 3980 if v.ResourceId != nil { 3981 if err := encoder.SetURI("ResourceId").String(*v.ResourceId); err != nil { 3982 return err 3983 } 3984 } 3985 3986 if len(v.ResourceType) == 0 { 3987 return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceType must not be empty")} 3988 } 3989 if len(v.ResourceType) > 0 { 3990 if err := encoder.SetURI("ResourceType").String(string(v.ResourceType)); err != nil { 3991 return err 3992 } 3993 } 3994 3995 return nil 3996} 3997 3998type awsRestxml_serializeOpListTagsForResources struct { 3999} 4000 4001func (*awsRestxml_serializeOpListTagsForResources) ID() string { 4002 return "OperationSerializer" 4003} 4004 4005func (m *awsRestxml_serializeOpListTagsForResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 4006 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 4007) { 4008 request, ok := in.Request.(*smithyhttp.Request) 4009 if !ok { 4010 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 4011 } 4012 4013 input, ok := in.Parameters.(*ListTagsForResourcesInput) 4014 _ = input 4015 if !ok { 4016 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 4017 } 4018 4019 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/tags/{ResourceType}") 4020 request.URL.Path = opPath 4021 if len(request.URL.RawQuery) > 0 { 4022 request.URL.RawQuery = "&" + opQuery 4023 } else { 4024 request.URL.RawQuery = opQuery 4025 } 4026 4027 request.Method = "POST" 4028 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 4029 if err != nil { 4030 return out, metadata, &smithy.SerializationError{Err: err} 4031 } 4032 4033 if err := awsRestxml_serializeOpHttpBindingsListTagsForResourcesInput(input, restEncoder); err != nil { 4034 return out, metadata, &smithy.SerializationError{Err: err} 4035 } 4036 4037 restEncoder.SetHeader("Content-Type").String("application/xml") 4038 4039 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 4040 rootAttr := []smithyxml.Attr{} 4041 root := smithyxml.StartElement{ 4042 Name: smithyxml.Name{ 4043 Local: "ListTagsForResourcesRequest", 4044 }, 4045 Attr: rootAttr, 4046 } 4047 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 4048 if err := awsRestxml_serializeOpDocumentListTagsForResourcesInput(input, xmlEncoder.RootElement(root)); err != nil { 4049 return out, metadata, &smithy.SerializationError{Err: err} 4050 } 4051 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 4052 return out, metadata, &smithy.SerializationError{Err: err} 4053 } 4054 4055 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 4056 return out, metadata, &smithy.SerializationError{Err: err} 4057 } 4058 in.Request = request 4059 4060 return next.HandleSerialize(ctx, in) 4061} 4062func awsRestxml_serializeOpHttpBindingsListTagsForResourcesInput(v *ListTagsForResourcesInput, encoder *httpbinding.Encoder) error { 4063 if v == nil { 4064 return fmt.Errorf("unsupported serialization of nil %T", v) 4065 } 4066 4067 if len(v.ResourceType) == 0 { 4068 return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceType must not be empty")} 4069 } 4070 if len(v.ResourceType) > 0 { 4071 if err := encoder.SetURI("ResourceType").String(string(v.ResourceType)); err != nil { 4072 return err 4073 } 4074 } 4075 4076 return nil 4077} 4078 4079func awsRestxml_serializeOpDocumentListTagsForResourcesInput(v *ListTagsForResourcesInput, value smithyxml.Value) error { 4080 defer value.Close() 4081 if v.ResourceIds != nil { 4082 rootAttr := []smithyxml.Attr{} 4083 root := smithyxml.StartElement{ 4084 Name: smithyxml.Name{ 4085 Local: "ResourceIds", 4086 }, 4087 Attr: rootAttr, 4088 } 4089 el := value.MemberElement(root) 4090 if err := awsRestxml_serializeDocumentTagResourceIdList(v.ResourceIds, el); err != nil { 4091 return err 4092 } 4093 } 4094 return nil 4095} 4096 4097type awsRestxml_serializeOpListTrafficPolicies struct { 4098} 4099 4100func (*awsRestxml_serializeOpListTrafficPolicies) ID() string { 4101 return "OperationSerializer" 4102} 4103 4104func (m *awsRestxml_serializeOpListTrafficPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 4105 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 4106) { 4107 request, ok := in.Request.(*smithyhttp.Request) 4108 if !ok { 4109 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 4110 } 4111 4112 input, ok := in.Parameters.(*ListTrafficPoliciesInput) 4113 _ = input 4114 if !ok { 4115 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 4116 } 4117 4118 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicies") 4119 request.URL.Path = opPath 4120 if len(request.URL.RawQuery) > 0 { 4121 request.URL.RawQuery = "&" + opQuery 4122 } else { 4123 request.URL.RawQuery = opQuery 4124 } 4125 4126 request.Method = "GET" 4127 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 4128 if err != nil { 4129 return out, metadata, &smithy.SerializationError{Err: err} 4130 } 4131 4132 if err := awsRestxml_serializeOpHttpBindingsListTrafficPoliciesInput(input, restEncoder); err != nil { 4133 return out, metadata, &smithy.SerializationError{Err: err} 4134 } 4135 4136 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 4137 return out, metadata, &smithy.SerializationError{Err: err} 4138 } 4139 in.Request = request 4140 4141 return next.HandleSerialize(ctx, in) 4142} 4143func awsRestxml_serializeOpHttpBindingsListTrafficPoliciesInput(v *ListTrafficPoliciesInput, encoder *httpbinding.Encoder) error { 4144 if v == nil { 4145 return fmt.Errorf("unsupported serialization of nil %T", v) 4146 } 4147 4148 if v.MaxItems != nil { 4149 encoder.SetQuery("maxitems").Integer(*v.MaxItems) 4150 } 4151 4152 if v.TrafficPolicyIdMarker != nil { 4153 encoder.SetQuery("trafficpolicyid").String(*v.TrafficPolicyIdMarker) 4154 } 4155 4156 return nil 4157} 4158 4159type awsRestxml_serializeOpListTrafficPolicyInstances struct { 4160} 4161 4162func (*awsRestxml_serializeOpListTrafficPolicyInstances) ID() string { 4163 return "OperationSerializer" 4164} 4165 4166func (m *awsRestxml_serializeOpListTrafficPolicyInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 4167 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 4168) { 4169 request, ok := in.Request.(*smithyhttp.Request) 4170 if !ok { 4171 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 4172 } 4173 4174 input, ok := in.Parameters.(*ListTrafficPolicyInstancesInput) 4175 _ = input 4176 if !ok { 4177 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 4178 } 4179 4180 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstances") 4181 request.URL.Path = opPath 4182 if len(request.URL.RawQuery) > 0 { 4183 request.URL.RawQuery = "&" + opQuery 4184 } else { 4185 request.URL.RawQuery = opQuery 4186 } 4187 4188 request.Method = "GET" 4189 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 4190 if err != nil { 4191 return out, metadata, &smithy.SerializationError{Err: err} 4192 } 4193 4194 if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesInput(input, restEncoder); err != nil { 4195 return out, metadata, &smithy.SerializationError{Err: err} 4196 } 4197 4198 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 4199 return out, metadata, &smithy.SerializationError{Err: err} 4200 } 4201 in.Request = request 4202 4203 return next.HandleSerialize(ctx, in) 4204} 4205func awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesInput(v *ListTrafficPolicyInstancesInput, encoder *httpbinding.Encoder) error { 4206 if v == nil { 4207 return fmt.Errorf("unsupported serialization of nil %T", v) 4208 } 4209 4210 if v.HostedZoneIdMarker != nil { 4211 encoder.SetQuery("hostedzoneid").String(*v.HostedZoneIdMarker) 4212 } 4213 4214 if v.MaxItems != nil { 4215 encoder.SetQuery("maxitems").Integer(*v.MaxItems) 4216 } 4217 4218 if v.TrafficPolicyInstanceNameMarker != nil { 4219 encoder.SetQuery("trafficpolicyinstancename").String(*v.TrafficPolicyInstanceNameMarker) 4220 } 4221 4222 if len(v.TrafficPolicyInstanceTypeMarker) > 0 { 4223 encoder.SetQuery("trafficpolicyinstancetype").String(string(v.TrafficPolicyInstanceTypeMarker)) 4224 } 4225 4226 return nil 4227} 4228 4229type awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone struct { 4230} 4231 4232func (*awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone) ID() string { 4233 return "OperationSerializer" 4234} 4235 4236func (m *awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 4237 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 4238) { 4239 request, ok := in.Request.(*smithyhttp.Request) 4240 if !ok { 4241 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 4242 } 4243 4244 input, ok := in.Parameters.(*ListTrafficPolicyInstancesByHostedZoneInput) 4245 _ = input 4246 if !ok { 4247 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 4248 } 4249 4250 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstances/hostedzone") 4251 request.URL.Path = opPath 4252 if len(request.URL.RawQuery) > 0 { 4253 request.URL.RawQuery = "&" + opQuery 4254 } else { 4255 request.URL.RawQuery = opQuery 4256 } 4257 4258 request.Method = "GET" 4259 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 4260 if err != nil { 4261 return out, metadata, &smithy.SerializationError{Err: err} 4262 } 4263 4264 if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByHostedZoneInput(input, restEncoder); err != nil { 4265 return out, metadata, &smithy.SerializationError{Err: err} 4266 } 4267 4268 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 4269 return out, metadata, &smithy.SerializationError{Err: err} 4270 } 4271 in.Request = request 4272 4273 return next.HandleSerialize(ctx, in) 4274} 4275func awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByHostedZoneInput(v *ListTrafficPolicyInstancesByHostedZoneInput, encoder *httpbinding.Encoder) error { 4276 if v == nil { 4277 return fmt.Errorf("unsupported serialization of nil %T", v) 4278 } 4279 4280 if v.HostedZoneId != nil { 4281 encoder.SetQuery("id").String(*v.HostedZoneId) 4282 } 4283 4284 if v.MaxItems != nil { 4285 encoder.SetQuery("maxitems").Integer(*v.MaxItems) 4286 } 4287 4288 if v.TrafficPolicyInstanceNameMarker != nil { 4289 encoder.SetQuery("trafficpolicyinstancename").String(*v.TrafficPolicyInstanceNameMarker) 4290 } 4291 4292 if len(v.TrafficPolicyInstanceTypeMarker) > 0 { 4293 encoder.SetQuery("trafficpolicyinstancetype").String(string(v.TrafficPolicyInstanceTypeMarker)) 4294 } 4295 4296 return nil 4297} 4298 4299type awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy struct { 4300} 4301 4302func (*awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy) ID() string { 4303 return "OperationSerializer" 4304} 4305 4306func (m *awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 4307 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 4308) { 4309 request, ok := in.Request.(*smithyhttp.Request) 4310 if !ok { 4311 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 4312 } 4313 4314 input, ok := in.Parameters.(*ListTrafficPolicyInstancesByPolicyInput) 4315 _ = input 4316 if !ok { 4317 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 4318 } 4319 4320 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstances/trafficpolicy") 4321 request.URL.Path = opPath 4322 if len(request.URL.RawQuery) > 0 { 4323 request.URL.RawQuery = "&" + opQuery 4324 } else { 4325 request.URL.RawQuery = opQuery 4326 } 4327 4328 request.Method = "GET" 4329 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 4330 if err != nil { 4331 return out, metadata, &smithy.SerializationError{Err: err} 4332 } 4333 4334 if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByPolicyInput(input, restEncoder); err != nil { 4335 return out, metadata, &smithy.SerializationError{Err: err} 4336 } 4337 4338 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 4339 return out, metadata, &smithy.SerializationError{Err: err} 4340 } 4341 in.Request = request 4342 4343 return next.HandleSerialize(ctx, in) 4344} 4345func awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByPolicyInput(v *ListTrafficPolicyInstancesByPolicyInput, encoder *httpbinding.Encoder) error { 4346 if v == nil { 4347 return fmt.Errorf("unsupported serialization of nil %T", v) 4348 } 4349 4350 if v.HostedZoneIdMarker != nil { 4351 encoder.SetQuery("hostedzoneid").String(*v.HostedZoneIdMarker) 4352 } 4353 4354 if v.MaxItems != nil { 4355 encoder.SetQuery("maxitems").Integer(*v.MaxItems) 4356 } 4357 4358 if v.TrafficPolicyId != nil { 4359 encoder.SetQuery("id").String(*v.TrafficPolicyId) 4360 } 4361 4362 if v.TrafficPolicyInstanceNameMarker != nil { 4363 encoder.SetQuery("trafficpolicyinstancename").String(*v.TrafficPolicyInstanceNameMarker) 4364 } 4365 4366 if len(v.TrafficPolicyInstanceTypeMarker) > 0 { 4367 encoder.SetQuery("trafficpolicyinstancetype").String(string(v.TrafficPolicyInstanceTypeMarker)) 4368 } 4369 4370 if v.TrafficPolicyVersion != nil { 4371 encoder.SetQuery("version").Integer(*v.TrafficPolicyVersion) 4372 } 4373 4374 return nil 4375} 4376 4377type awsRestxml_serializeOpListTrafficPolicyVersions struct { 4378} 4379 4380func (*awsRestxml_serializeOpListTrafficPolicyVersions) ID() string { 4381 return "OperationSerializer" 4382} 4383 4384func (m *awsRestxml_serializeOpListTrafficPolicyVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 4385 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 4386) { 4387 request, ok := in.Request.(*smithyhttp.Request) 4388 if !ok { 4389 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 4390 } 4391 4392 input, ok := in.Parameters.(*ListTrafficPolicyVersionsInput) 4393 _ = input 4394 if !ok { 4395 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 4396 } 4397 4398 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicies/{Id}/versions") 4399 request.URL.Path = opPath 4400 if len(request.URL.RawQuery) > 0 { 4401 request.URL.RawQuery = "&" + opQuery 4402 } else { 4403 request.URL.RawQuery = opQuery 4404 } 4405 4406 request.Method = "GET" 4407 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 4408 if err != nil { 4409 return out, metadata, &smithy.SerializationError{Err: err} 4410 } 4411 4412 if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyVersionsInput(input, restEncoder); err != nil { 4413 return out, metadata, &smithy.SerializationError{Err: err} 4414 } 4415 4416 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 4417 return out, metadata, &smithy.SerializationError{Err: err} 4418 } 4419 in.Request = request 4420 4421 return next.HandleSerialize(ctx, in) 4422} 4423func awsRestxml_serializeOpHttpBindingsListTrafficPolicyVersionsInput(v *ListTrafficPolicyVersionsInput, encoder *httpbinding.Encoder) error { 4424 if v == nil { 4425 return fmt.Errorf("unsupported serialization of nil %T", v) 4426 } 4427 4428 if v.Id == nil || len(*v.Id) == 0 { 4429 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 4430 } 4431 if v.Id != nil { 4432 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 4433 return err 4434 } 4435 } 4436 4437 if v.MaxItems != nil { 4438 encoder.SetQuery("maxitems").Integer(*v.MaxItems) 4439 } 4440 4441 if v.TrafficPolicyVersionMarker != nil { 4442 encoder.SetQuery("trafficpolicyversion").String(*v.TrafficPolicyVersionMarker) 4443 } 4444 4445 return nil 4446} 4447 4448type awsRestxml_serializeOpListVPCAssociationAuthorizations struct { 4449} 4450 4451func (*awsRestxml_serializeOpListVPCAssociationAuthorizations) ID() string { 4452 return "OperationSerializer" 4453} 4454 4455func (m *awsRestxml_serializeOpListVPCAssociationAuthorizations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 4456 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 4457) { 4458 request, ok := in.Request.(*smithyhttp.Request) 4459 if !ok { 4460 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 4461 } 4462 4463 input, ok := in.Parameters.(*ListVPCAssociationAuthorizationsInput) 4464 _ = input 4465 if !ok { 4466 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 4467 } 4468 4469 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation") 4470 request.URL.Path = opPath 4471 if len(request.URL.RawQuery) > 0 { 4472 request.URL.RawQuery = "&" + opQuery 4473 } else { 4474 request.URL.RawQuery = opQuery 4475 } 4476 4477 request.Method = "GET" 4478 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 4479 if err != nil { 4480 return out, metadata, &smithy.SerializationError{Err: err} 4481 } 4482 4483 if err := awsRestxml_serializeOpHttpBindingsListVPCAssociationAuthorizationsInput(input, restEncoder); err != nil { 4484 return out, metadata, &smithy.SerializationError{Err: err} 4485 } 4486 4487 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 4488 return out, metadata, &smithy.SerializationError{Err: err} 4489 } 4490 in.Request = request 4491 4492 return next.HandleSerialize(ctx, in) 4493} 4494func awsRestxml_serializeOpHttpBindingsListVPCAssociationAuthorizationsInput(v *ListVPCAssociationAuthorizationsInput, encoder *httpbinding.Encoder) error { 4495 if v == nil { 4496 return fmt.Errorf("unsupported serialization of nil %T", v) 4497 } 4498 4499 if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { 4500 return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} 4501 } 4502 if v.HostedZoneId != nil { 4503 if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { 4504 return err 4505 } 4506 } 4507 4508 if v.MaxResults != nil { 4509 encoder.SetQuery("maxresults").Integer(*v.MaxResults) 4510 } 4511 4512 if v.NextToken != nil { 4513 encoder.SetQuery("nexttoken").String(*v.NextToken) 4514 } 4515 4516 return nil 4517} 4518 4519type awsRestxml_serializeOpTestDNSAnswer struct { 4520} 4521 4522func (*awsRestxml_serializeOpTestDNSAnswer) ID() string { 4523 return "OperationSerializer" 4524} 4525 4526func (m *awsRestxml_serializeOpTestDNSAnswer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 4527 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 4528) { 4529 request, ok := in.Request.(*smithyhttp.Request) 4530 if !ok { 4531 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 4532 } 4533 4534 input, ok := in.Parameters.(*TestDNSAnswerInput) 4535 _ = input 4536 if !ok { 4537 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 4538 } 4539 4540 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/testdnsanswer") 4541 request.URL.Path = opPath 4542 if len(request.URL.RawQuery) > 0 { 4543 request.URL.RawQuery = "&" + opQuery 4544 } else { 4545 request.URL.RawQuery = opQuery 4546 } 4547 4548 request.Method = "GET" 4549 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 4550 if err != nil { 4551 return out, metadata, &smithy.SerializationError{Err: err} 4552 } 4553 4554 if err := awsRestxml_serializeOpHttpBindingsTestDNSAnswerInput(input, restEncoder); err != nil { 4555 return out, metadata, &smithy.SerializationError{Err: err} 4556 } 4557 4558 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 4559 return out, metadata, &smithy.SerializationError{Err: err} 4560 } 4561 in.Request = request 4562 4563 return next.HandleSerialize(ctx, in) 4564} 4565func awsRestxml_serializeOpHttpBindingsTestDNSAnswerInput(v *TestDNSAnswerInput, encoder *httpbinding.Encoder) error { 4566 if v == nil { 4567 return fmt.Errorf("unsupported serialization of nil %T", v) 4568 } 4569 4570 if v.EDNS0ClientSubnetIP != nil { 4571 encoder.SetQuery("edns0clientsubnetip").String(*v.EDNS0ClientSubnetIP) 4572 } 4573 4574 if v.EDNS0ClientSubnetMask != nil { 4575 encoder.SetQuery("edns0clientsubnetmask").String(*v.EDNS0ClientSubnetMask) 4576 } 4577 4578 if v.HostedZoneId != nil { 4579 encoder.SetQuery("hostedzoneid").String(*v.HostedZoneId) 4580 } 4581 4582 if v.RecordName != nil { 4583 encoder.SetQuery("recordname").String(*v.RecordName) 4584 } 4585 4586 if len(v.RecordType) > 0 { 4587 encoder.SetQuery("recordtype").String(string(v.RecordType)) 4588 } 4589 4590 if v.ResolverIP != nil { 4591 encoder.SetQuery("resolverip").String(*v.ResolverIP) 4592 } 4593 4594 return nil 4595} 4596 4597type awsRestxml_serializeOpUpdateHealthCheck struct { 4598} 4599 4600func (*awsRestxml_serializeOpUpdateHealthCheck) ID() string { 4601 return "OperationSerializer" 4602} 4603 4604func (m *awsRestxml_serializeOpUpdateHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 4605 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 4606) { 4607 request, ok := in.Request.(*smithyhttp.Request) 4608 if !ok { 4609 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 4610 } 4611 4612 input, ok := in.Parameters.(*UpdateHealthCheckInput) 4613 _ = input 4614 if !ok { 4615 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 4616 } 4617 4618 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}") 4619 request.URL.Path = opPath 4620 if len(request.URL.RawQuery) > 0 { 4621 request.URL.RawQuery = "&" + opQuery 4622 } else { 4623 request.URL.RawQuery = opQuery 4624 } 4625 4626 request.Method = "POST" 4627 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 4628 if err != nil { 4629 return out, metadata, &smithy.SerializationError{Err: err} 4630 } 4631 4632 if err := awsRestxml_serializeOpHttpBindingsUpdateHealthCheckInput(input, restEncoder); err != nil { 4633 return out, metadata, &smithy.SerializationError{Err: err} 4634 } 4635 4636 restEncoder.SetHeader("Content-Type").String("application/xml") 4637 4638 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 4639 rootAttr := []smithyxml.Attr{} 4640 root := smithyxml.StartElement{ 4641 Name: smithyxml.Name{ 4642 Local: "UpdateHealthCheckRequest", 4643 }, 4644 Attr: rootAttr, 4645 } 4646 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 4647 if err := awsRestxml_serializeOpDocumentUpdateHealthCheckInput(input, xmlEncoder.RootElement(root)); err != nil { 4648 return out, metadata, &smithy.SerializationError{Err: err} 4649 } 4650 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 4651 return out, metadata, &smithy.SerializationError{Err: err} 4652 } 4653 4654 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 4655 return out, metadata, &smithy.SerializationError{Err: err} 4656 } 4657 in.Request = request 4658 4659 return next.HandleSerialize(ctx, in) 4660} 4661func awsRestxml_serializeOpHttpBindingsUpdateHealthCheckInput(v *UpdateHealthCheckInput, encoder *httpbinding.Encoder) error { 4662 if v == nil { 4663 return fmt.Errorf("unsupported serialization of nil %T", v) 4664 } 4665 4666 if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { 4667 return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} 4668 } 4669 if v.HealthCheckId != nil { 4670 if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { 4671 return err 4672 } 4673 } 4674 4675 return nil 4676} 4677 4678func awsRestxml_serializeOpDocumentUpdateHealthCheckInput(v *UpdateHealthCheckInput, value smithyxml.Value) error { 4679 defer value.Close() 4680 if v.AlarmIdentifier != nil { 4681 rootAttr := []smithyxml.Attr{} 4682 root := smithyxml.StartElement{ 4683 Name: smithyxml.Name{ 4684 Local: "AlarmIdentifier", 4685 }, 4686 Attr: rootAttr, 4687 } 4688 el := value.MemberElement(root) 4689 if err := awsRestxml_serializeDocumentAlarmIdentifier(v.AlarmIdentifier, el); err != nil { 4690 return err 4691 } 4692 } 4693 if v.ChildHealthChecks != nil { 4694 rootAttr := []smithyxml.Attr{} 4695 root := smithyxml.StartElement{ 4696 Name: smithyxml.Name{ 4697 Local: "ChildHealthChecks", 4698 }, 4699 Attr: rootAttr, 4700 } 4701 el := value.MemberElement(root) 4702 if err := awsRestxml_serializeDocumentChildHealthCheckList(v.ChildHealthChecks, el); err != nil { 4703 return err 4704 } 4705 } 4706 if v.Disabled != nil { 4707 rootAttr := []smithyxml.Attr{} 4708 root := smithyxml.StartElement{ 4709 Name: smithyxml.Name{ 4710 Local: "Disabled", 4711 }, 4712 Attr: rootAttr, 4713 } 4714 el := value.MemberElement(root) 4715 el.Boolean(*v.Disabled) 4716 } 4717 if v.EnableSNI != nil { 4718 rootAttr := []smithyxml.Attr{} 4719 root := smithyxml.StartElement{ 4720 Name: smithyxml.Name{ 4721 Local: "EnableSNI", 4722 }, 4723 Attr: rootAttr, 4724 } 4725 el := value.MemberElement(root) 4726 el.Boolean(*v.EnableSNI) 4727 } 4728 if v.FailureThreshold != nil { 4729 rootAttr := []smithyxml.Attr{} 4730 root := smithyxml.StartElement{ 4731 Name: smithyxml.Name{ 4732 Local: "FailureThreshold", 4733 }, 4734 Attr: rootAttr, 4735 } 4736 el := value.MemberElement(root) 4737 el.Integer(*v.FailureThreshold) 4738 } 4739 if v.FullyQualifiedDomainName != nil { 4740 rootAttr := []smithyxml.Attr{} 4741 root := smithyxml.StartElement{ 4742 Name: smithyxml.Name{ 4743 Local: "FullyQualifiedDomainName", 4744 }, 4745 Attr: rootAttr, 4746 } 4747 el := value.MemberElement(root) 4748 el.String(*v.FullyQualifiedDomainName) 4749 } 4750 if v.HealthCheckVersion != nil { 4751 rootAttr := []smithyxml.Attr{} 4752 root := smithyxml.StartElement{ 4753 Name: smithyxml.Name{ 4754 Local: "HealthCheckVersion", 4755 }, 4756 Attr: rootAttr, 4757 } 4758 el := value.MemberElement(root) 4759 el.Long(*v.HealthCheckVersion) 4760 } 4761 if v.HealthThreshold != nil { 4762 rootAttr := []smithyxml.Attr{} 4763 root := smithyxml.StartElement{ 4764 Name: smithyxml.Name{ 4765 Local: "HealthThreshold", 4766 }, 4767 Attr: rootAttr, 4768 } 4769 el := value.MemberElement(root) 4770 el.Integer(*v.HealthThreshold) 4771 } 4772 if len(v.InsufficientDataHealthStatus) > 0 { 4773 rootAttr := []smithyxml.Attr{} 4774 root := smithyxml.StartElement{ 4775 Name: smithyxml.Name{ 4776 Local: "InsufficientDataHealthStatus", 4777 }, 4778 Attr: rootAttr, 4779 } 4780 el := value.MemberElement(root) 4781 el.String(string(v.InsufficientDataHealthStatus)) 4782 } 4783 if v.Inverted != nil { 4784 rootAttr := []smithyxml.Attr{} 4785 root := smithyxml.StartElement{ 4786 Name: smithyxml.Name{ 4787 Local: "Inverted", 4788 }, 4789 Attr: rootAttr, 4790 } 4791 el := value.MemberElement(root) 4792 el.Boolean(*v.Inverted) 4793 } 4794 if v.IPAddress != nil { 4795 rootAttr := []smithyxml.Attr{} 4796 root := smithyxml.StartElement{ 4797 Name: smithyxml.Name{ 4798 Local: "IPAddress", 4799 }, 4800 Attr: rootAttr, 4801 } 4802 el := value.MemberElement(root) 4803 el.String(*v.IPAddress) 4804 } 4805 if v.Port != nil { 4806 rootAttr := []smithyxml.Attr{} 4807 root := smithyxml.StartElement{ 4808 Name: smithyxml.Name{ 4809 Local: "Port", 4810 }, 4811 Attr: rootAttr, 4812 } 4813 el := value.MemberElement(root) 4814 el.Integer(*v.Port) 4815 } 4816 if v.Regions != nil { 4817 rootAttr := []smithyxml.Attr{} 4818 root := smithyxml.StartElement{ 4819 Name: smithyxml.Name{ 4820 Local: "Regions", 4821 }, 4822 Attr: rootAttr, 4823 } 4824 el := value.MemberElement(root) 4825 if err := awsRestxml_serializeDocumentHealthCheckRegionList(v.Regions, el); err != nil { 4826 return err 4827 } 4828 } 4829 if v.ResetElements != nil { 4830 rootAttr := []smithyxml.Attr{} 4831 root := smithyxml.StartElement{ 4832 Name: smithyxml.Name{ 4833 Local: "ResetElements", 4834 }, 4835 Attr: rootAttr, 4836 } 4837 el := value.MemberElement(root) 4838 if err := awsRestxml_serializeDocumentResettableElementNameList(v.ResetElements, el); err != nil { 4839 return err 4840 } 4841 } 4842 if v.ResourcePath != nil { 4843 rootAttr := []smithyxml.Attr{} 4844 root := smithyxml.StartElement{ 4845 Name: smithyxml.Name{ 4846 Local: "ResourcePath", 4847 }, 4848 Attr: rootAttr, 4849 } 4850 el := value.MemberElement(root) 4851 el.String(*v.ResourcePath) 4852 } 4853 if v.SearchString != nil { 4854 rootAttr := []smithyxml.Attr{} 4855 root := smithyxml.StartElement{ 4856 Name: smithyxml.Name{ 4857 Local: "SearchString", 4858 }, 4859 Attr: rootAttr, 4860 } 4861 el := value.MemberElement(root) 4862 el.String(*v.SearchString) 4863 } 4864 return nil 4865} 4866 4867type awsRestxml_serializeOpUpdateHostedZoneComment struct { 4868} 4869 4870func (*awsRestxml_serializeOpUpdateHostedZoneComment) ID() string { 4871 return "OperationSerializer" 4872} 4873 4874func (m *awsRestxml_serializeOpUpdateHostedZoneComment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 4875 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 4876) { 4877 request, ok := in.Request.(*smithyhttp.Request) 4878 if !ok { 4879 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 4880 } 4881 4882 input, ok := in.Parameters.(*UpdateHostedZoneCommentInput) 4883 _ = input 4884 if !ok { 4885 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 4886 } 4887 4888 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{Id}") 4889 request.URL.Path = opPath 4890 if len(request.URL.RawQuery) > 0 { 4891 request.URL.RawQuery = "&" + opQuery 4892 } else { 4893 request.URL.RawQuery = opQuery 4894 } 4895 4896 request.Method = "POST" 4897 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 4898 if err != nil { 4899 return out, metadata, &smithy.SerializationError{Err: err} 4900 } 4901 4902 if err := awsRestxml_serializeOpHttpBindingsUpdateHostedZoneCommentInput(input, restEncoder); err != nil { 4903 return out, metadata, &smithy.SerializationError{Err: err} 4904 } 4905 4906 restEncoder.SetHeader("Content-Type").String("application/xml") 4907 4908 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 4909 rootAttr := []smithyxml.Attr{} 4910 root := smithyxml.StartElement{ 4911 Name: smithyxml.Name{ 4912 Local: "UpdateHostedZoneCommentRequest", 4913 }, 4914 Attr: rootAttr, 4915 } 4916 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 4917 if err := awsRestxml_serializeOpDocumentUpdateHostedZoneCommentInput(input, xmlEncoder.RootElement(root)); err != nil { 4918 return out, metadata, &smithy.SerializationError{Err: err} 4919 } 4920 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 4921 return out, metadata, &smithy.SerializationError{Err: err} 4922 } 4923 4924 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 4925 return out, metadata, &smithy.SerializationError{Err: err} 4926 } 4927 in.Request = request 4928 4929 return next.HandleSerialize(ctx, in) 4930} 4931func awsRestxml_serializeOpHttpBindingsUpdateHostedZoneCommentInput(v *UpdateHostedZoneCommentInput, encoder *httpbinding.Encoder) error { 4932 if v == nil { 4933 return fmt.Errorf("unsupported serialization of nil %T", v) 4934 } 4935 4936 if v.Id == nil || len(*v.Id) == 0 { 4937 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 4938 } 4939 if v.Id != nil { 4940 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 4941 return err 4942 } 4943 } 4944 4945 return nil 4946} 4947 4948func awsRestxml_serializeOpDocumentUpdateHostedZoneCommentInput(v *UpdateHostedZoneCommentInput, value smithyxml.Value) error { 4949 defer value.Close() 4950 if v.Comment != nil { 4951 rootAttr := []smithyxml.Attr{} 4952 root := smithyxml.StartElement{ 4953 Name: smithyxml.Name{ 4954 Local: "Comment", 4955 }, 4956 Attr: rootAttr, 4957 } 4958 el := value.MemberElement(root) 4959 el.String(*v.Comment) 4960 } 4961 return nil 4962} 4963 4964type awsRestxml_serializeOpUpdateTrafficPolicyComment struct { 4965} 4966 4967func (*awsRestxml_serializeOpUpdateTrafficPolicyComment) ID() string { 4968 return "OperationSerializer" 4969} 4970 4971func (m *awsRestxml_serializeOpUpdateTrafficPolicyComment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 4972 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 4973) { 4974 request, ok := in.Request.(*smithyhttp.Request) 4975 if !ok { 4976 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 4977 } 4978 4979 input, ok := in.Parameters.(*UpdateTrafficPolicyCommentInput) 4980 _ = input 4981 if !ok { 4982 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 4983 } 4984 4985 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}/{Version}") 4986 request.URL.Path = opPath 4987 if len(request.URL.RawQuery) > 0 { 4988 request.URL.RawQuery = "&" + opQuery 4989 } else { 4990 request.URL.RawQuery = opQuery 4991 } 4992 4993 request.Method = "POST" 4994 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 4995 if err != nil { 4996 return out, metadata, &smithy.SerializationError{Err: err} 4997 } 4998 4999 if err := awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyCommentInput(input, restEncoder); err != nil { 5000 return out, metadata, &smithy.SerializationError{Err: err} 5001 } 5002 5003 restEncoder.SetHeader("Content-Type").String("application/xml") 5004 5005 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 5006 rootAttr := []smithyxml.Attr{} 5007 root := smithyxml.StartElement{ 5008 Name: smithyxml.Name{ 5009 Local: "UpdateTrafficPolicyCommentRequest", 5010 }, 5011 Attr: rootAttr, 5012 } 5013 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 5014 if err := awsRestxml_serializeOpDocumentUpdateTrafficPolicyCommentInput(input, xmlEncoder.RootElement(root)); err != nil { 5015 return out, metadata, &smithy.SerializationError{Err: err} 5016 } 5017 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 5018 return out, metadata, &smithy.SerializationError{Err: err} 5019 } 5020 5021 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 5022 return out, metadata, &smithy.SerializationError{Err: err} 5023 } 5024 in.Request = request 5025 5026 return next.HandleSerialize(ctx, in) 5027} 5028func awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyCommentInput(v *UpdateTrafficPolicyCommentInput, encoder *httpbinding.Encoder) error { 5029 if v == nil { 5030 return fmt.Errorf("unsupported serialization of nil %T", v) 5031 } 5032 5033 if v.Id == nil || len(*v.Id) == 0 { 5034 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 5035 } 5036 if v.Id != nil { 5037 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 5038 return err 5039 } 5040 } 5041 5042 if v.Version == nil { 5043 return &smithy.SerializationError{Err: fmt.Errorf("input member Version must not be empty")} 5044 } 5045 if v.Version != nil { 5046 if err := encoder.SetURI("Version").Integer(*v.Version); err != nil { 5047 return err 5048 } 5049 } 5050 5051 return nil 5052} 5053 5054func awsRestxml_serializeOpDocumentUpdateTrafficPolicyCommentInput(v *UpdateTrafficPolicyCommentInput, value smithyxml.Value) error { 5055 defer value.Close() 5056 if v.Comment != nil { 5057 rootAttr := []smithyxml.Attr{} 5058 root := smithyxml.StartElement{ 5059 Name: smithyxml.Name{ 5060 Local: "Comment", 5061 }, 5062 Attr: rootAttr, 5063 } 5064 el := value.MemberElement(root) 5065 el.String(*v.Comment) 5066 } 5067 return nil 5068} 5069 5070type awsRestxml_serializeOpUpdateTrafficPolicyInstance struct { 5071} 5072 5073func (*awsRestxml_serializeOpUpdateTrafficPolicyInstance) ID() string { 5074 return "OperationSerializer" 5075} 5076 5077func (m *awsRestxml_serializeOpUpdateTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 5078 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 5079) { 5080 request, ok := in.Request.(*smithyhttp.Request) 5081 if !ok { 5082 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 5083 } 5084 5085 input, ok := in.Parameters.(*UpdateTrafficPolicyInstanceInput) 5086 _ = input 5087 if !ok { 5088 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 5089 } 5090 5091 opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance/{Id}") 5092 request.URL.Path = opPath 5093 if len(request.URL.RawQuery) > 0 { 5094 request.URL.RawQuery = "&" + opQuery 5095 } else { 5096 request.URL.RawQuery = opQuery 5097 } 5098 5099 request.Method = "POST" 5100 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 5101 if err != nil { 5102 return out, metadata, &smithy.SerializationError{Err: err} 5103 } 5104 5105 if err := awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyInstanceInput(input, restEncoder); err != nil { 5106 return out, metadata, &smithy.SerializationError{Err: err} 5107 } 5108 5109 restEncoder.SetHeader("Content-Type").String("application/xml") 5110 5111 xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) 5112 rootAttr := []smithyxml.Attr{} 5113 root := smithyxml.StartElement{ 5114 Name: smithyxml.Name{ 5115 Local: "UpdateTrafficPolicyInstanceRequest", 5116 }, 5117 Attr: rootAttr, 5118 } 5119 root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) 5120 if err := awsRestxml_serializeOpDocumentUpdateTrafficPolicyInstanceInput(input, xmlEncoder.RootElement(root)); err != nil { 5121 return out, metadata, &smithy.SerializationError{Err: err} 5122 } 5123 if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { 5124 return out, metadata, &smithy.SerializationError{Err: err} 5125 } 5126 5127 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 5128 return out, metadata, &smithy.SerializationError{Err: err} 5129 } 5130 in.Request = request 5131 5132 return next.HandleSerialize(ctx, in) 5133} 5134func awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyInstanceInput(v *UpdateTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error { 5135 if v == nil { 5136 return fmt.Errorf("unsupported serialization of nil %T", v) 5137 } 5138 5139 if v.Id == nil || len(*v.Id) == 0 { 5140 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 5141 } 5142 if v.Id != nil { 5143 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 5144 return err 5145 } 5146 } 5147 5148 return nil 5149} 5150 5151func awsRestxml_serializeOpDocumentUpdateTrafficPolicyInstanceInput(v *UpdateTrafficPolicyInstanceInput, value smithyxml.Value) error { 5152 defer value.Close() 5153 if v.TrafficPolicyId != nil { 5154 rootAttr := []smithyxml.Attr{} 5155 root := smithyxml.StartElement{ 5156 Name: smithyxml.Name{ 5157 Local: "TrafficPolicyId", 5158 }, 5159 Attr: rootAttr, 5160 } 5161 el := value.MemberElement(root) 5162 el.String(*v.TrafficPolicyId) 5163 } 5164 if v.TrafficPolicyVersion != nil { 5165 rootAttr := []smithyxml.Attr{} 5166 root := smithyxml.StartElement{ 5167 Name: smithyxml.Name{ 5168 Local: "TrafficPolicyVersion", 5169 }, 5170 Attr: rootAttr, 5171 } 5172 el := value.MemberElement(root) 5173 el.Integer(*v.TrafficPolicyVersion) 5174 } 5175 if v.TTL != nil { 5176 rootAttr := []smithyxml.Attr{} 5177 root := smithyxml.StartElement{ 5178 Name: smithyxml.Name{ 5179 Local: "TTL", 5180 }, 5181 Attr: rootAttr, 5182 } 5183 el := value.MemberElement(root) 5184 el.Long(*v.TTL) 5185 } 5186 return nil 5187} 5188 5189func awsRestxml_serializeDocumentAlarmIdentifier(v *types.AlarmIdentifier, value smithyxml.Value) error { 5190 defer value.Close() 5191 if v.Name != nil { 5192 rootAttr := []smithyxml.Attr{} 5193 root := smithyxml.StartElement{ 5194 Name: smithyxml.Name{ 5195 Local: "Name", 5196 }, 5197 Attr: rootAttr, 5198 } 5199 el := value.MemberElement(root) 5200 el.String(*v.Name) 5201 } 5202 if len(v.Region) > 0 { 5203 rootAttr := []smithyxml.Attr{} 5204 root := smithyxml.StartElement{ 5205 Name: smithyxml.Name{ 5206 Local: "Region", 5207 }, 5208 Attr: rootAttr, 5209 } 5210 el := value.MemberElement(root) 5211 el.String(string(v.Region)) 5212 } 5213 return nil 5214} 5215 5216func awsRestxml_serializeDocumentAliasTarget(v *types.AliasTarget, value smithyxml.Value) error { 5217 defer value.Close() 5218 if v.DNSName != nil { 5219 rootAttr := []smithyxml.Attr{} 5220 root := smithyxml.StartElement{ 5221 Name: smithyxml.Name{ 5222 Local: "DNSName", 5223 }, 5224 Attr: rootAttr, 5225 } 5226 el := value.MemberElement(root) 5227 el.String(*v.DNSName) 5228 } 5229 if v.EvaluateTargetHealth { 5230 rootAttr := []smithyxml.Attr{} 5231 root := smithyxml.StartElement{ 5232 Name: smithyxml.Name{ 5233 Local: "EvaluateTargetHealth", 5234 }, 5235 Attr: rootAttr, 5236 } 5237 el := value.MemberElement(root) 5238 el.Boolean(v.EvaluateTargetHealth) 5239 } 5240 if v.HostedZoneId != nil { 5241 rootAttr := []smithyxml.Attr{} 5242 root := smithyxml.StartElement{ 5243 Name: smithyxml.Name{ 5244 Local: "HostedZoneId", 5245 }, 5246 Attr: rootAttr, 5247 } 5248 el := value.MemberElement(root) 5249 el.String(*v.HostedZoneId) 5250 } 5251 return nil 5252} 5253 5254func awsRestxml_serializeDocumentChange(v *types.Change, value smithyxml.Value) error { 5255 defer value.Close() 5256 if len(v.Action) > 0 { 5257 rootAttr := []smithyxml.Attr{} 5258 root := smithyxml.StartElement{ 5259 Name: smithyxml.Name{ 5260 Local: "Action", 5261 }, 5262 Attr: rootAttr, 5263 } 5264 el := value.MemberElement(root) 5265 el.String(string(v.Action)) 5266 } 5267 if v.ResourceRecordSet != nil { 5268 rootAttr := []smithyxml.Attr{} 5269 root := smithyxml.StartElement{ 5270 Name: smithyxml.Name{ 5271 Local: "ResourceRecordSet", 5272 }, 5273 Attr: rootAttr, 5274 } 5275 el := value.MemberElement(root) 5276 if err := awsRestxml_serializeDocumentResourceRecordSet(v.ResourceRecordSet, el); err != nil { 5277 return err 5278 } 5279 } 5280 return nil 5281} 5282 5283func awsRestxml_serializeDocumentChangeBatch(v *types.ChangeBatch, value smithyxml.Value) error { 5284 defer value.Close() 5285 if v.Changes != nil { 5286 rootAttr := []smithyxml.Attr{} 5287 root := smithyxml.StartElement{ 5288 Name: smithyxml.Name{ 5289 Local: "Changes", 5290 }, 5291 Attr: rootAttr, 5292 } 5293 el := value.MemberElement(root) 5294 if err := awsRestxml_serializeDocumentChanges(v.Changes, el); err != nil { 5295 return err 5296 } 5297 } 5298 if v.Comment != nil { 5299 rootAttr := []smithyxml.Attr{} 5300 root := smithyxml.StartElement{ 5301 Name: smithyxml.Name{ 5302 Local: "Comment", 5303 }, 5304 Attr: rootAttr, 5305 } 5306 el := value.MemberElement(root) 5307 el.String(*v.Comment) 5308 } 5309 return nil 5310} 5311 5312func awsRestxml_serializeDocumentChanges(v []types.Change, value smithyxml.Value) error { 5313 var array *smithyxml.Array 5314 if !value.IsFlattened() { 5315 defer value.Close() 5316 } 5317 customMemberNameAttr := []smithyxml.Attr{} 5318 customMemberName := smithyxml.StartElement{ 5319 Name: smithyxml.Name{ 5320 Local: "Change", 5321 }, 5322 Attr: customMemberNameAttr, 5323 } 5324 array = value.ArrayWithCustomName(customMemberName) 5325 for i := range v { 5326 am := array.Member() 5327 if err := awsRestxml_serializeDocumentChange(&v[i], am); err != nil { 5328 return err 5329 } 5330 } 5331 return nil 5332} 5333 5334func awsRestxml_serializeDocumentChildHealthCheckList(v []string, value smithyxml.Value) error { 5335 var array *smithyxml.Array 5336 if !value.IsFlattened() { 5337 defer value.Close() 5338 } 5339 customMemberNameAttr := []smithyxml.Attr{} 5340 customMemberName := smithyxml.StartElement{ 5341 Name: smithyxml.Name{ 5342 Local: "ChildHealthCheck", 5343 }, 5344 Attr: customMemberNameAttr, 5345 } 5346 array = value.ArrayWithCustomName(customMemberName) 5347 for i := range v { 5348 am := array.Member() 5349 am.String(v[i]) 5350 } 5351 return nil 5352} 5353 5354func awsRestxml_serializeDocumentGeoLocation(v *types.GeoLocation, value smithyxml.Value) error { 5355 defer value.Close() 5356 if v.ContinentCode != nil { 5357 rootAttr := []smithyxml.Attr{} 5358 root := smithyxml.StartElement{ 5359 Name: smithyxml.Name{ 5360 Local: "ContinentCode", 5361 }, 5362 Attr: rootAttr, 5363 } 5364 el := value.MemberElement(root) 5365 el.String(*v.ContinentCode) 5366 } 5367 if v.CountryCode != nil { 5368 rootAttr := []smithyxml.Attr{} 5369 root := smithyxml.StartElement{ 5370 Name: smithyxml.Name{ 5371 Local: "CountryCode", 5372 }, 5373 Attr: rootAttr, 5374 } 5375 el := value.MemberElement(root) 5376 el.String(*v.CountryCode) 5377 } 5378 if v.SubdivisionCode != nil { 5379 rootAttr := []smithyxml.Attr{} 5380 root := smithyxml.StartElement{ 5381 Name: smithyxml.Name{ 5382 Local: "SubdivisionCode", 5383 }, 5384 Attr: rootAttr, 5385 } 5386 el := value.MemberElement(root) 5387 el.String(*v.SubdivisionCode) 5388 } 5389 return nil 5390} 5391 5392func awsRestxml_serializeDocumentHealthCheckConfig(v *types.HealthCheckConfig, value smithyxml.Value) error { 5393 defer value.Close() 5394 if v.AlarmIdentifier != nil { 5395 rootAttr := []smithyxml.Attr{} 5396 root := smithyxml.StartElement{ 5397 Name: smithyxml.Name{ 5398 Local: "AlarmIdentifier", 5399 }, 5400 Attr: rootAttr, 5401 } 5402 el := value.MemberElement(root) 5403 if err := awsRestxml_serializeDocumentAlarmIdentifier(v.AlarmIdentifier, el); err != nil { 5404 return err 5405 } 5406 } 5407 if v.ChildHealthChecks != nil { 5408 rootAttr := []smithyxml.Attr{} 5409 root := smithyxml.StartElement{ 5410 Name: smithyxml.Name{ 5411 Local: "ChildHealthChecks", 5412 }, 5413 Attr: rootAttr, 5414 } 5415 el := value.MemberElement(root) 5416 if err := awsRestxml_serializeDocumentChildHealthCheckList(v.ChildHealthChecks, el); err != nil { 5417 return err 5418 } 5419 } 5420 if v.Disabled != nil { 5421 rootAttr := []smithyxml.Attr{} 5422 root := smithyxml.StartElement{ 5423 Name: smithyxml.Name{ 5424 Local: "Disabled", 5425 }, 5426 Attr: rootAttr, 5427 } 5428 el := value.MemberElement(root) 5429 el.Boolean(*v.Disabled) 5430 } 5431 if v.EnableSNI != nil { 5432 rootAttr := []smithyxml.Attr{} 5433 root := smithyxml.StartElement{ 5434 Name: smithyxml.Name{ 5435 Local: "EnableSNI", 5436 }, 5437 Attr: rootAttr, 5438 } 5439 el := value.MemberElement(root) 5440 el.Boolean(*v.EnableSNI) 5441 } 5442 if v.FailureThreshold != nil { 5443 rootAttr := []smithyxml.Attr{} 5444 root := smithyxml.StartElement{ 5445 Name: smithyxml.Name{ 5446 Local: "FailureThreshold", 5447 }, 5448 Attr: rootAttr, 5449 } 5450 el := value.MemberElement(root) 5451 el.Integer(*v.FailureThreshold) 5452 } 5453 if v.FullyQualifiedDomainName != nil { 5454 rootAttr := []smithyxml.Attr{} 5455 root := smithyxml.StartElement{ 5456 Name: smithyxml.Name{ 5457 Local: "FullyQualifiedDomainName", 5458 }, 5459 Attr: rootAttr, 5460 } 5461 el := value.MemberElement(root) 5462 el.String(*v.FullyQualifiedDomainName) 5463 } 5464 if v.HealthThreshold != nil { 5465 rootAttr := []smithyxml.Attr{} 5466 root := smithyxml.StartElement{ 5467 Name: smithyxml.Name{ 5468 Local: "HealthThreshold", 5469 }, 5470 Attr: rootAttr, 5471 } 5472 el := value.MemberElement(root) 5473 el.Integer(*v.HealthThreshold) 5474 } 5475 if len(v.InsufficientDataHealthStatus) > 0 { 5476 rootAttr := []smithyxml.Attr{} 5477 root := smithyxml.StartElement{ 5478 Name: smithyxml.Name{ 5479 Local: "InsufficientDataHealthStatus", 5480 }, 5481 Attr: rootAttr, 5482 } 5483 el := value.MemberElement(root) 5484 el.String(string(v.InsufficientDataHealthStatus)) 5485 } 5486 if v.Inverted != nil { 5487 rootAttr := []smithyxml.Attr{} 5488 root := smithyxml.StartElement{ 5489 Name: smithyxml.Name{ 5490 Local: "Inverted", 5491 }, 5492 Attr: rootAttr, 5493 } 5494 el := value.MemberElement(root) 5495 el.Boolean(*v.Inverted) 5496 } 5497 if v.IPAddress != nil { 5498 rootAttr := []smithyxml.Attr{} 5499 root := smithyxml.StartElement{ 5500 Name: smithyxml.Name{ 5501 Local: "IPAddress", 5502 }, 5503 Attr: rootAttr, 5504 } 5505 el := value.MemberElement(root) 5506 el.String(*v.IPAddress) 5507 } 5508 if v.MeasureLatency != nil { 5509 rootAttr := []smithyxml.Attr{} 5510 root := smithyxml.StartElement{ 5511 Name: smithyxml.Name{ 5512 Local: "MeasureLatency", 5513 }, 5514 Attr: rootAttr, 5515 } 5516 el := value.MemberElement(root) 5517 el.Boolean(*v.MeasureLatency) 5518 } 5519 if v.Port != nil { 5520 rootAttr := []smithyxml.Attr{} 5521 root := smithyxml.StartElement{ 5522 Name: smithyxml.Name{ 5523 Local: "Port", 5524 }, 5525 Attr: rootAttr, 5526 } 5527 el := value.MemberElement(root) 5528 el.Integer(*v.Port) 5529 } 5530 if v.Regions != nil { 5531 rootAttr := []smithyxml.Attr{} 5532 root := smithyxml.StartElement{ 5533 Name: smithyxml.Name{ 5534 Local: "Regions", 5535 }, 5536 Attr: rootAttr, 5537 } 5538 el := value.MemberElement(root) 5539 if err := awsRestxml_serializeDocumentHealthCheckRegionList(v.Regions, el); err != nil { 5540 return err 5541 } 5542 } 5543 if v.RequestInterval != nil { 5544 rootAttr := []smithyxml.Attr{} 5545 root := smithyxml.StartElement{ 5546 Name: smithyxml.Name{ 5547 Local: "RequestInterval", 5548 }, 5549 Attr: rootAttr, 5550 } 5551 el := value.MemberElement(root) 5552 el.Integer(*v.RequestInterval) 5553 } 5554 if v.ResourcePath != nil { 5555 rootAttr := []smithyxml.Attr{} 5556 root := smithyxml.StartElement{ 5557 Name: smithyxml.Name{ 5558 Local: "ResourcePath", 5559 }, 5560 Attr: rootAttr, 5561 } 5562 el := value.MemberElement(root) 5563 el.String(*v.ResourcePath) 5564 } 5565 if v.SearchString != nil { 5566 rootAttr := []smithyxml.Attr{} 5567 root := smithyxml.StartElement{ 5568 Name: smithyxml.Name{ 5569 Local: "SearchString", 5570 }, 5571 Attr: rootAttr, 5572 } 5573 el := value.MemberElement(root) 5574 el.String(*v.SearchString) 5575 } 5576 if len(v.Type) > 0 { 5577 rootAttr := []smithyxml.Attr{} 5578 root := smithyxml.StartElement{ 5579 Name: smithyxml.Name{ 5580 Local: "Type", 5581 }, 5582 Attr: rootAttr, 5583 } 5584 el := value.MemberElement(root) 5585 el.String(string(v.Type)) 5586 } 5587 return nil 5588} 5589 5590func awsRestxml_serializeDocumentHealthCheckRegionList(v []types.HealthCheckRegion, value smithyxml.Value) error { 5591 var array *smithyxml.Array 5592 if !value.IsFlattened() { 5593 defer value.Close() 5594 } 5595 customMemberNameAttr := []smithyxml.Attr{} 5596 customMemberName := smithyxml.StartElement{ 5597 Name: smithyxml.Name{ 5598 Local: "Region", 5599 }, 5600 Attr: customMemberNameAttr, 5601 } 5602 array = value.ArrayWithCustomName(customMemberName) 5603 for i := range v { 5604 am := array.Member() 5605 am.String(string(v[i])) 5606 } 5607 return nil 5608} 5609 5610func awsRestxml_serializeDocumentHostedZoneConfig(v *types.HostedZoneConfig, value smithyxml.Value) error { 5611 defer value.Close() 5612 if v.Comment != nil { 5613 rootAttr := []smithyxml.Attr{} 5614 root := smithyxml.StartElement{ 5615 Name: smithyxml.Name{ 5616 Local: "Comment", 5617 }, 5618 Attr: rootAttr, 5619 } 5620 el := value.MemberElement(root) 5621 el.String(*v.Comment) 5622 } 5623 if v.PrivateZone { 5624 rootAttr := []smithyxml.Attr{} 5625 root := smithyxml.StartElement{ 5626 Name: smithyxml.Name{ 5627 Local: "PrivateZone", 5628 }, 5629 Attr: rootAttr, 5630 } 5631 el := value.MemberElement(root) 5632 el.Boolean(v.PrivateZone) 5633 } 5634 return nil 5635} 5636 5637func awsRestxml_serializeDocumentResettableElementNameList(v []types.ResettableElementName, value smithyxml.Value) error { 5638 var array *smithyxml.Array 5639 if !value.IsFlattened() { 5640 defer value.Close() 5641 } 5642 customMemberNameAttr := []smithyxml.Attr{} 5643 customMemberName := smithyxml.StartElement{ 5644 Name: smithyxml.Name{ 5645 Local: "ResettableElementName", 5646 }, 5647 Attr: customMemberNameAttr, 5648 } 5649 array = value.ArrayWithCustomName(customMemberName) 5650 for i := range v { 5651 am := array.Member() 5652 am.String(string(v[i])) 5653 } 5654 return nil 5655} 5656 5657func awsRestxml_serializeDocumentResourceRecord(v *types.ResourceRecord, value smithyxml.Value) error { 5658 defer value.Close() 5659 if v.Value != nil { 5660 rootAttr := []smithyxml.Attr{} 5661 root := smithyxml.StartElement{ 5662 Name: smithyxml.Name{ 5663 Local: "Value", 5664 }, 5665 Attr: rootAttr, 5666 } 5667 el := value.MemberElement(root) 5668 el.String(*v.Value) 5669 } 5670 return nil 5671} 5672 5673func awsRestxml_serializeDocumentResourceRecords(v []types.ResourceRecord, value smithyxml.Value) error { 5674 var array *smithyxml.Array 5675 if !value.IsFlattened() { 5676 defer value.Close() 5677 } 5678 customMemberNameAttr := []smithyxml.Attr{} 5679 customMemberName := smithyxml.StartElement{ 5680 Name: smithyxml.Name{ 5681 Local: "ResourceRecord", 5682 }, 5683 Attr: customMemberNameAttr, 5684 } 5685 array = value.ArrayWithCustomName(customMemberName) 5686 for i := range v { 5687 am := array.Member() 5688 if err := awsRestxml_serializeDocumentResourceRecord(&v[i], am); err != nil { 5689 return err 5690 } 5691 } 5692 return nil 5693} 5694 5695func awsRestxml_serializeDocumentResourceRecordSet(v *types.ResourceRecordSet, value smithyxml.Value) error { 5696 defer value.Close() 5697 if v.AliasTarget != nil { 5698 rootAttr := []smithyxml.Attr{} 5699 root := smithyxml.StartElement{ 5700 Name: smithyxml.Name{ 5701 Local: "AliasTarget", 5702 }, 5703 Attr: rootAttr, 5704 } 5705 el := value.MemberElement(root) 5706 if err := awsRestxml_serializeDocumentAliasTarget(v.AliasTarget, el); err != nil { 5707 return err 5708 } 5709 } 5710 if len(v.Failover) > 0 { 5711 rootAttr := []smithyxml.Attr{} 5712 root := smithyxml.StartElement{ 5713 Name: smithyxml.Name{ 5714 Local: "Failover", 5715 }, 5716 Attr: rootAttr, 5717 } 5718 el := value.MemberElement(root) 5719 el.String(string(v.Failover)) 5720 } 5721 if v.GeoLocation != nil { 5722 rootAttr := []smithyxml.Attr{} 5723 root := smithyxml.StartElement{ 5724 Name: smithyxml.Name{ 5725 Local: "GeoLocation", 5726 }, 5727 Attr: rootAttr, 5728 } 5729 el := value.MemberElement(root) 5730 if err := awsRestxml_serializeDocumentGeoLocation(v.GeoLocation, el); err != nil { 5731 return err 5732 } 5733 } 5734 if v.HealthCheckId != nil { 5735 rootAttr := []smithyxml.Attr{} 5736 root := smithyxml.StartElement{ 5737 Name: smithyxml.Name{ 5738 Local: "HealthCheckId", 5739 }, 5740 Attr: rootAttr, 5741 } 5742 el := value.MemberElement(root) 5743 el.String(*v.HealthCheckId) 5744 } 5745 if v.MultiValueAnswer != nil { 5746 rootAttr := []smithyxml.Attr{} 5747 root := smithyxml.StartElement{ 5748 Name: smithyxml.Name{ 5749 Local: "MultiValueAnswer", 5750 }, 5751 Attr: rootAttr, 5752 } 5753 el := value.MemberElement(root) 5754 el.Boolean(*v.MultiValueAnswer) 5755 } 5756 if v.Name != nil { 5757 rootAttr := []smithyxml.Attr{} 5758 root := smithyxml.StartElement{ 5759 Name: smithyxml.Name{ 5760 Local: "Name", 5761 }, 5762 Attr: rootAttr, 5763 } 5764 el := value.MemberElement(root) 5765 el.String(*v.Name) 5766 } 5767 if len(v.Region) > 0 { 5768 rootAttr := []smithyxml.Attr{} 5769 root := smithyxml.StartElement{ 5770 Name: smithyxml.Name{ 5771 Local: "Region", 5772 }, 5773 Attr: rootAttr, 5774 } 5775 el := value.MemberElement(root) 5776 el.String(string(v.Region)) 5777 } 5778 if v.ResourceRecords != nil { 5779 rootAttr := []smithyxml.Attr{} 5780 root := smithyxml.StartElement{ 5781 Name: smithyxml.Name{ 5782 Local: "ResourceRecords", 5783 }, 5784 Attr: rootAttr, 5785 } 5786 el := value.MemberElement(root) 5787 if err := awsRestxml_serializeDocumentResourceRecords(v.ResourceRecords, el); err != nil { 5788 return err 5789 } 5790 } 5791 if v.SetIdentifier != nil { 5792 rootAttr := []smithyxml.Attr{} 5793 root := smithyxml.StartElement{ 5794 Name: smithyxml.Name{ 5795 Local: "SetIdentifier", 5796 }, 5797 Attr: rootAttr, 5798 } 5799 el := value.MemberElement(root) 5800 el.String(*v.SetIdentifier) 5801 } 5802 if v.TrafficPolicyInstanceId != nil { 5803 rootAttr := []smithyxml.Attr{} 5804 root := smithyxml.StartElement{ 5805 Name: smithyxml.Name{ 5806 Local: "TrafficPolicyInstanceId", 5807 }, 5808 Attr: rootAttr, 5809 } 5810 el := value.MemberElement(root) 5811 el.String(*v.TrafficPolicyInstanceId) 5812 } 5813 if v.TTL != nil { 5814 rootAttr := []smithyxml.Attr{} 5815 root := smithyxml.StartElement{ 5816 Name: smithyxml.Name{ 5817 Local: "TTL", 5818 }, 5819 Attr: rootAttr, 5820 } 5821 el := value.MemberElement(root) 5822 el.Long(*v.TTL) 5823 } 5824 if len(v.Type) > 0 { 5825 rootAttr := []smithyxml.Attr{} 5826 root := smithyxml.StartElement{ 5827 Name: smithyxml.Name{ 5828 Local: "Type", 5829 }, 5830 Attr: rootAttr, 5831 } 5832 el := value.MemberElement(root) 5833 el.String(string(v.Type)) 5834 } 5835 if v.Weight != nil { 5836 rootAttr := []smithyxml.Attr{} 5837 root := smithyxml.StartElement{ 5838 Name: smithyxml.Name{ 5839 Local: "Weight", 5840 }, 5841 Attr: rootAttr, 5842 } 5843 el := value.MemberElement(root) 5844 el.Long(*v.Weight) 5845 } 5846 return nil 5847} 5848 5849func awsRestxml_serializeDocumentTag(v *types.Tag, value smithyxml.Value) error { 5850 defer value.Close() 5851 if v.Key != nil { 5852 rootAttr := []smithyxml.Attr{} 5853 root := smithyxml.StartElement{ 5854 Name: smithyxml.Name{ 5855 Local: "Key", 5856 }, 5857 Attr: rootAttr, 5858 } 5859 el := value.MemberElement(root) 5860 el.String(*v.Key) 5861 } 5862 if v.Value != nil { 5863 rootAttr := []smithyxml.Attr{} 5864 root := smithyxml.StartElement{ 5865 Name: smithyxml.Name{ 5866 Local: "Value", 5867 }, 5868 Attr: rootAttr, 5869 } 5870 el := value.MemberElement(root) 5871 el.String(*v.Value) 5872 } 5873 return nil 5874} 5875 5876func awsRestxml_serializeDocumentTagKeyList(v []string, value smithyxml.Value) error { 5877 var array *smithyxml.Array 5878 if !value.IsFlattened() { 5879 defer value.Close() 5880 } 5881 customMemberNameAttr := []smithyxml.Attr{} 5882 customMemberName := smithyxml.StartElement{ 5883 Name: smithyxml.Name{ 5884 Local: "Key", 5885 }, 5886 Attr: customMemberNameAttr, 5887 } 5888 array = value.ArrayWithCustomName(customMemberName) 5889 for i := range v { 5890 am := array.Member() 5891 am.String(v[i]) 5892 } 5893 return nil 5894} 5895 5896func awsRestxml_serializeDocumentTagList(v []types.Tag, value smithyxml.Value) error { 5897 var array *smithyxml.Array 5898 if !value.IsFlattened() { 5899 defer value.Close() 5900 } 5901 customMemberNameAttr := []smithyxml.Attr{} 5902 customMemberName := smithyxml.StartElement{ 5903 Name: smithyxml.Name{ 5904 Local: "Tag", 5905 }, 5906 Attr: customMemberNameAttr, 5907 } 5908 array = value.ArrayWithCustomName(customMemberName) 5909 for i := range v { 5910 am := array.Member() 5911 if err := awsRestxml_serializeDocumentTag(&v[i], am); err != nil { 5912 return err 5913 } 5914 } 5915 return nil 5916} 5917 5918func awsRestxml_serializeDocumentTagResourceIdList(v []string, value smithyxml.Value) error { 5919 var array *smithyxml.Array 5920 if !value.IsFlattened() { 5921 defer value.Close() 5922 } 5923 customMemberNameAttr := []smithyxml.Attr{} 5924 customMemberName := smithyxml.StartElement{ 5925 Name: smithyxml.Name{ 5926 Local: "ResourceId", 5927 }, 5928 Attr: customMemberNameAttr, 5929 } 5930 array = value.ArrayWithCustomName(customMemberName) 5931 for i := range v { 5932 am := array.Member() 5933 am.String(v[i]) 5934 } 5935 return nil 5936} 5937 5938func awsRestxml_serializeDocumentVPC(v *types.VPC, value smithyxml.Value) error { 5939 defer value.Close() 5940 if v.VPCId != nil { 5941 rootAttr := []smithyxml.Attr{} 5942 root := smithyxml.StartElement{ 5943 Name: smithyxml.Name{ 5944 Local: "VPCId", 5945 }, 5946 Attr: rootAttr, 5947 } 5948 el := value.MemberElement(root) 5949 el.String(*v.VPCId) 5950 } 5951 if len(v.VPCRegion) > 0 { 5952 rootAttr := []smithyxml.Attr{} 5953 root := smithyxml.StartElement{ 5954 Name: smithyxml.Name{ 5955 Local: "VPCRegion", 5956 }, 5957 Attr: rootAttr, 5958 } 5959 el := value.MemberElement(root) 5960 el.String(string(v.VPCRegion)) 5961 } 5962 return nil 5963} 5964