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