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