1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package mediaconvert 4 5import ( 6 "bytes" 7 "context" 8 "fmt" 9 "github.com/aws/aws-sdk-go-v2/service/mediaconvert/types" 10 smithy "github.com/aws/smithy-go" 11 "github.com/aws/smithy-go/encoding/httpbinding" 12 smithyjson "github.com/aws/smithy-go/encoding/json" 13 "github.com/aws/smithy-go/middleware" 14 smithyhttp "github.com/aws/smithy-go/transport/http" 15) 16 17type awsRestjson1_serializeOpAssociateCertificate struct { 18} 19 20func (*awsRestjson1_serializeOpAssociateCertificate) ID() string { 21 return "OperationSerializer" 22} 23 24func (m *awsRestjson1_serializeOpAssociateCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 25 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 26) { 27 request, ok := in.Request.(*smithyhttp.Request) 28 if !ok { 29 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 30 } 31 32 input, ok := in.Parameters.(*AssociateCertificateInput) 33 _ = input 34 if !ok { 35 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 36 } 37 38 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/certificates") 39 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 40 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 41 request.Method = "POST" 42 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 43 if err != nil { 44 return out, metadata, &smithy.SerializationError{Err: err} 45 } 46 47 restEncoder.SetHeader("Content-Type").String("application/json") 48 49 jsonEncoder := smithyjson.NewEncoder() 50 if err := awsRestjson1_serializeOpDocumentAssociateCertificateInput(input, jsonEncoder.Value); err != nil { 51 return out, metadata, &smithy.SerializationError{Err: err} 52 } 53 54 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 55 return out, metadata, &smithy.SerializationError{Err: err} 56 } 57 58 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 59 return out, metadata, &smithy.SerializationError{Err: err} 60 } 61 in.Request = request 62 63 return next.HandleSerialize(ctx, in) 64} 65func awsRestjson1_serializeOpHttpBindingsAssociateCertificateInput(v *AssociateCertificateInput, encoder *httpbinding.Encoder) error { 66 if v == nil { 67 return fmt.Errorf("unsupported serialization of nil %T", v) 68 } 69 70 return nil 71} 72 73func awsRestjson1_serializeOpDocumentAssociateCertificateInput(v *AssociateCertificateInput, value smithyjson.Value) error { 74 object := value.Object() 75 defer object.Close() 76 77 if v.Arn != nil { 78 ok := object.Key("arn") 79 ok.String(*v.Arn) 80 } 81 82 return nil 83} 84 85type awsRestjson1_serializeOpCancelJob struct { 86} 87 88func (*awsRestjson1_serializeOpCancelJob) ID() string { 89 return "OperationSerializer" 90} 91 92func (m *awsRestjson1_serializeOpCancelJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 93 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 94) { 95 request, ok := in.Request.(*smithyhttp.Request) 96 if !ok { 97 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 98 } 99 100 input, ok := in.Parameters.(*CancelJobInput) 101 _ = input 102 if !ok { 103 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 104 } 105 106 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/jobs/{Id}") 107 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 108 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 109 request.Method = "DELETE" 110 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 111 if err != nil { 112 return out, metadata, &smithy.SerializationError{Err: err} 113 } 114 115 if err := awsRestjson1_serializeOpHttpBindingsCancelJobInput(input, restEncoder); err != nil { 116 return out, metadata, &smithy.SerializationError{Err: err} 117 } 118 119 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 120 return out, metadata, &smithy.SerializationError{Err: err} 121 } 122 in.Request = request 123 124 return next.HandleSerialize(ctx, in) 125} 126func awsRestjson1_serializeOpHttpBindingsCancelJobInput(v *CancelJobInput, encoder *httpbinding.Encoder) error { 127 if v == nil { 128 return fmt.Errorf("unsupported serialization of nil %T", v) 129 } 130 131 if v.Id == nil || len(*v.Id) == 0 { 132 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 133 } 134 if v.Id != nil { 135 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 136 return err 137 } 138 } 139 140 return nil 141} 142 143type awsRestjson1_serializeOpCreateJob struct { 144} 145 146func (*awsRestjson1_serializeOpCreateJob) ID() string { 147 return "OperationSerializer" 148} 149 150func (m *awsRestjson1_serializeOpCreateJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 151 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 152) { 153 request, ok := in.Request.(*smithyhttp.Request) 154 if !ok { 155 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 156 } 157 158 input, ok := in.Parameters.(*CreateJobInput) 159 _ = input 160 if !ok { 161 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 162 } 163 164 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/jobs") 165 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 166 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 167 request.Method = "POST" 168 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 169 if err != nil { 170 return out, metadata, &smithy.SerializationError{Err: err} 171 } 172 173 restEncoder.SetHeader("Content-Type").String("application/json") 174 175 jsonEncoder := smithyjson.NewEncoder() 176 if err := awsRestjson1_serializeOpDocumentCreateJobInput(input, jsonEncoder.Value); err != nil { 177 return out, metadata, &smithy.SerializationError{Err: err} 178 } 179 180 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 181 return out, metadata, &smithy.SerializationError{Err: err} 182 } 183 184 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 185 return out, metadata, &smithy.SerializationError{Err: err} 186 } 187 in.Request = request 188 189 return next.HandleSerialize(ctx, in) 190} 191func awsRestjson1_serializeOpHttpBindingsCreateJobInput(v *CreateJobInput, encoder *httpbinding.Encoder) error { 192 if v == nil { 193 return fmt.Errorf("unsupported serialization of nil %T", v) 194 } 195 196 return nil 197} 198 199func awsRestjson1_serializeOpDocumentCreateJobInput(v *CreateJobInput, value smithyjson.Value) error { 200 object := value.Object() 201 defer object.Close() 202 203 if v.AccelerationSettings != nil { 204 ok := object.Key("accelerationSettings") 205 if err := awsRestjson1_serializeDocumentAccelerationSettings(v.AccelerationSettings, ok); err != nil { 206 return err 207 } 208 } 209 210 if len(v.BillingTagsSource) > 0 { 211 ok := object.Key("billingTagsSource") 212 ok.String(string(v.BillingTagsSource)) 213 } 214 215 if v.ClientRequestToken != nil { 216 ok := object.Key("clientRequestToken") 217 ok.String(*v.ClientRequestToken) 218 } 219 220 if v.HopDestinations != nil { 221 ok := object.Key("hopDestinations") 222 if err := awsRestjson1_serializeDocument__listOfHopDestination(v.HopDestinations, ok); err != nil { 223 return err 224 } 225 } 226 227 if v.JobTemplate != nil { 228 ok := object.Key("jobTemplate") 229 ok.String(*v.JobTemplate) 230 } 231 232 if v.Priority != 0 { 233 ok := object.Key("priority") 234 ok.Integer(v.Priority) 235 } 236 237 if v.Queue != nil { 238 ok := object.Key("queue") 239 ok.String(*v.Queue) 240 } 241 242 if v.Role != nil { 243 ok := object.Key("role") 244 ok.String(*v.Role) 245 } 246 247 if v.Settings != nil { 248 ok := object.Key("settings") 249 if err := awsRestjson1_serializeDocumentJobSettings(v.Settings, ok); err != nil { 250 return err 251 } 252 } 253 254 if len(v.SimulateReservedQueue) > 0 { 255 ok := object.Key("simulateReservedQueue") 256 ok.String(string(v.SimulateReservedQueue)) 257 } 258 259 if len(v.StatusUpdateInterval) > 0 { 260 ok := object.Key("statusUpdateInterval") 261 ok.String(string(v.StatusUpdateInterval)) 262 } 263 264 if v.Tags != nil { 265 ok := object.Key("tags") 266 if err := awsRestjson1_serializeDocument__mapOf__string(v.Tags, ok); err != nil { 267 return err 268 } 269 } 270 271 if v.UserMetadata != nil { 272 ok := object.Key("userMetadata") 273 if err := awsRestjson1_serializeDocument__mapOf__string(v.UserMetadata, ok); err != nil { 274 return err 275 } 276 } 277 278 return nil 279} 280 281type awsRestjson1_serializeOpCreateJobTemplate struct { 282} 283 284func (*awsRestjson1_serializeOpCreateJobTemplate) ID() string { 285 return "OperationSerializer" 286} 287 288func (m *awsRestjson1_serializeOpCreateJobTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 289 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 290) { 291 request, ok := in.Request.(*smithyhttp.Request) 292 if !ok { 293 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 294 } 295 296 input, ok := in.Parameters.(*CreateJobTemplateInput) 297 _ = input 298 if !ok { 299 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 300 } 301 302 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/jobTemplates") 303 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 304 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 305 request.Method = "POST" 306 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 307 if err != nil { 308 return out, metadata, &smithy.SerializationError{Err: err} 309 } 310 311 restEncoder.SetHeader("Content-Type").String("application/json") 312 313 jsonEncoder := smithyjson.NewEncoder() 314 if err := awsRestjson1_serializeOpDocumentCreateJobTemplateInput(input, jsonEncoder.Value); err != nil { 315 return out, metadata, &smithy.SerializationError{Err: err} 316 } 317 318 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 319 return out, metadata, &smithy.SerializationError{Err: err} 320 } 321 322 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 323 return out, metadata, &smithy.SerializationError{Err: err} 324 } 325 in.Request = request 326 327 return next.HandleSerialize(ctx, in) 328} 329func awsRestjson1_serializeOpHttpBindingsCreateJobTemplateInput(v *CreateJobTemplateInput, encoder *httpbinding.Encoder) error { 330 if v == nil { 331 return fmt.Errorf("unsupported serialization of nil %T", v) 332 } 333 334 return nil 335} 336 337func awsRestjson1_serializeOpDocumentCreateJobTemplateInput(v *CreateJobTemplateInput, value smithyjson.Value) error { 338 object := value.Object() 339 defer object.Close() 340 341 if v.AccelerationSettings != nil { 342 ok := object.Key("accelerationSettings") 343 if err := awsRestjson1_serializeDocumentAccelerationSettings(v.AccelerationSettings, ok); err != nil { 344 return err 345 } 346 } 347 348 if v.Category != nil { 349 ok := object.Key("category") 350 ok.String(*v.Category) 351 } 352 353 if v.Description != nil { 354 ok := object.Key("description") 355 ok.String(*v.Description) 356 } 357 358 if v.HopDestinations != nil { 359 ok := object.Key("hopDestinations") 360 if err := awsRestjson1_serializeDocument__listOfHopDestination(v.HopDestinations, ok); err != nil { 361 return err 362 } 363 } 364 365 if v.Name != nil { 366 ok := object.Key("name") 367 ok.String(*v.Name) 368 } 369 370 if v.Priority != 0 { 371 ok := object.Key("priority") 372 ok.Integer(v.Priority) 373 } 374 375 if v.Queue != nil { 376 ok := object.Key("queue") 377 ok.String(*v.Queue) 378 } 379 380 if v.Settings != nil { 381 ok := object.Key("settings") 382 if err := awsRestjson1_serializeDocumentJobTemplateSettings(v.Settings, ok); err != nil { 383 return err 384 } 385 } 386 387 if len(v.StatusUpdateInterval) > 0 { 388 ok := object.Key("statusUpdateInterval") 389 ok.String(string(v.StatusUpdateInterval)) 390 } 391 392 if v.Tags != nil { 393 ok := object.Key("tags") 394 if err := awsRestjson1_serializeDocument__mapOf__string(v.Tags, ok); err != nil { 395 return err 396 } 397 } 398 399 return nil 400} 401 402type awsRestjson1_serializeOpCreatePreset struct { 403} 404 405func (*awsRestjson1_serializeOpCreatePreset) ID() string { 406 return "OperationSerializer" 407} 408 409func (m *awsRestjson1_serializeOpCreatePreset) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 410 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 411) { 412 request, ok := in.Request.(*smithyhttp.Request) 413 if !ok { 414 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 415 } 416 417 input, ok := in.Parameters.(*CreatePresetInput) 418 _ = input 419 if !ok { 420 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 421 } 422 423 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/presets") 424 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 425 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 426 request.Method = "POST" 427 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 428 if err != nil { 429 return out, metadata, &smithy.SerializationError{Err: err} 430 } 431 432 restEncoder.SetHeader("Content-Type").String("application/json") 433 434 jsonEncoder := smithyjson.NewEncoder() 435 if err := awsRestjson1_serializeOpDocumentCreatePresetInput(input, jsonEncoder.Value); err != nil { 436 return out, metadata, &smithy.SerializationError{Err: err} 437 } 438 439 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 440 return out, metadata, &smithy.SerializationError{Err: err} 441 } 442 443 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 444 return out, metadata, &smithy.SerializationError{Err: err} 445 } 446 in.Request = request 447 448 return next.HandleSerialize(ctx, in) 449} 450func awsRestjson1_serializeOpHttpBindingsCreatePresetInput(v *CreatePresetInput, encoder *httpbinding.Encoder) error { 451 if v == nil { 452 return fmt.Errorf("unsupported serialization of nil %T", v) 453 } 454 455 return nil 456} 457 458func awsRestjson1_serializeOpDocumentCreatePresetInput(v *CreatePresetInput, value smithyjson.Value) error { 459 object := value.Object() 460 defer object.Close() 461 462 if v.Category != nil { 463 ok := object.Key("category") 464 ok.String(*v.Category) 465 } 466 467 if v.Description != nil { 468 ok := object.Key("description") 469 ok.String(*v.Description) 470 } 471 472 if v.Name != nil { 473 ok := object.Key("name") 474 ok.String(*v.Name) 475 } 476 477 if v.Settings != nil { 478 ok := object.Key("settings") 479 if err := awsRestjson1_serializeDocumentPresetSettings(v.Settings, ok); err != nil { 480 return err 481 } 482 } 483 484 if v.Tags != nil { 485 ok := object.Key("tags") 486 if err := awsRestjson1_serializeDocument__mapOf__string(v.Tags, ok); err != nil { 487 return err 488 } 489 } 490 491 return nil 492} 493 494type awsRestjson1_serializeOpCreateQueue struct { 495} 496 497func (*awsRestjson1_serializeOpCreateQueue) ID() string { 498 return "OperationSerializer" 499} 500 501func (m *awsRestjson1_serializeOpCreateQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 502 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 503) { 504 request, ok := in.Request.(*smithyhttp.Request) 505 if !ok { 506 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 507 } 508 509 input, ok := in.Parameters.(*CreateQueueInput) 510 _ = input 511 if !ok { 512 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 513 } 514 515 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/queues") 516 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 517 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 518 request.Method = "POST" 519 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 520 if err != nil { 521 return out, metadata, &smithy.SerializationError{Err: err} 522 } 523 524 restEncoder.SetHeader("Content-Type").String("application/json") 525 526 jsonEncoder := smithyjson.NewEncoder() 527 if err := awsRestjson1_serializeOpDocumentCreateQueueInput(input, jsonEncoder.Value); err != nil { 528 return out, metadata, &smithy.SerializationError{Err: err} 529 } 530 531 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 532 return out, metadata, &smithy.SerializationError{Err: err} 533 } 534 535 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 536 return out, metadata, &smithy.SerializationError{Err: err} 537 } 538 in.Request = request 539 540 return next.HandleSerialize(ctx, in) 541} 542func awsRestjson1_serializeOpHttpBindingsCreateQueueInput(v *CreateQueueInput, encoder *httpbinding.Encoder) error { 543 if v == nil { 544 return fmt.Errorf("unsupported serialization of nil %T", v) 545 } 546 547 return nil 548} 549 550func awsRestjson1_serializeOpDocumentCreateQueueInput(v *CreateQueueInput, value smithyjson.Value) error { 551 object := value.Object() 552 defer object.Close() 553 554 if v.Description != nil { 555 ok := object.Key("description") 556 ok.String(*v.Description) 557 } 558 559 if v.Name != nil { 560 ok := object.Key("name") 561 ok.String(*v.Name) 562 } 563 564 if len(v.PricingPlan) > 0 { 565 ok := object.Key("pricingPlan") 566 ok.String(string(v.PricingPlan)) 567 } 568 569 if v.ReservationPlanSettings != nil { 570 ok := object.Key("reservationPlanSettings") 571 if err := awsRestjson1_serializeDocumentReservationPlanSettings(v.ReservationPlanSettings, ok); err != nil { 572 return err 573 } 574 } 575 576 if len(v.Status) > 0 { 577 ok := object.Key("status") 578 ok.String(string(v.Status)) 579 } 580 581 if v.Tags != nil { 582 ok := object.Key("tags") 583 if err := awsRestjson1_serializeDocument__mapOf__string(v.Tags, ok); err != nil { 584 return err 585 } 586 } 587 588 return nil 589} 590 591type awsRestjson1_serializeOpDeleteJobTemplate struct { 592} 593 594func (*awsRestjson1_serializeOpDeleteJobTemplate) ID() string { 595 return "OperationSerializer" 596} 597 598func (m *awsRestjson1_serializeOpDeleteJobTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 599 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 600) { 601 request, ok := in.Request.(*smithyhttp.Request) 602 if !ok { 603 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 604 } 605 606 input, ok := in.Parameters.(*DeleteJobTemplateInput) 607 _ = input 608 if !ok { 609 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 610 } 611 612 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/jobTemplates/{Name}") 613 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 614 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 615 request.Method = "DELETE" 616 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 617 if err != nil { 618 return out, metadata, &smithy.SerializationError{Err: err} 619 } 620 621 if err := awsRestjson1_serializeOpHttpBindingsDeleteJobTemplateInput(input, restEncoder); err != nil { 622 return out, metadata, &smithy.SerializationError{Err: err} 623 } 624 625 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 626 return out, metadata, &smithy.SerializationError{Err: err} 627 } 628 in.Request = request 629 630 return next.HandleSerialize(ctx, in) 631} 632func awsRestjson1_serializeOpHttpBindingsDeleteJobTemplateInput(v *DeleteJobTemplateInput, encoder *httpbinding.Encoder) error { 633 if v == nil { 634 return fmt.Errorf("unsupported serialization of nil %T", v) 635 } 636 637 if v.Name == nil || len(*v.Name) == 0 { 638 return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} 639 } 640 if v.Name != nil { 641 if err := encoder.SetURI("Name").String(*v.Name); err != nil { 642 return err 643 } 644 } 645 646 return nil 647} 648 649type awsRestjson1_serializeOpDeletePreset struct { 650} 651 652func (*awsRestjson1_serializeOpDeletePreset) ID() string { 653 return "OperationSerializer" 654} 655 656func (m *awsRestjson1_serializeOpDeletePreset) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 657 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 658) { 659 request, ok := in.Request.(*smithyhttp.Request) 660 if !ok { 661 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 662 } 663 664 input, ok := in.Parameters.(*DeletePresetInput) 665 _ = input 666 if !ok { 667 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 668 } 669 670 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/presets/{Name}") 671 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 672 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 673 request.Method = "DELETE" 674 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 675 if err != nil { 676 return out, metadata, &smithy.SerializationError{Err: err} 677 } 678 679 if err := awsRestjson1_serializeOpHttpBindingsDeletePresetInput(input, restEncoder); err != nil { 680 return out, metadata, &smithy.SerializationError{Err: err} 681 } 682 683 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 684 return out, metadata, &smithy.SerializationError{Err: err} 685 } 686 in.Request = request 687 688 return next.HandleSerialize(ctx, in) 689} 690func awsRestjson1_serializeOpHttpBindingsDeletePresetInput(v *DeletePresetInput, encoder *httpbinding.Encoder) error { 691 if v == nil { 692 return fmt.Errorf("unsupported serialization of nil %T", v) 693 } 694 695 if v.Name == nil || len(*v.Name) == 0 { 696 return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} 697 } 698 if v.Name != nil { 699 if err := encoder.SetURI("Name").String(*v.Name); err != nil { 700 return err 701 } 702 } 703 704 return nil 705} 706 707type awsRestjson1_serializeOpDeleteQueue struct { 708} 709 710func (*awsRestjson1_serializeOpDeleteQueue) ID() string { 711 return "OperationSerializer" 712} 713 714func (m *awsRestjson1_serializeOpDeleteQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 715 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 716) { 717 request, ok := in.Request.(*smithyhttp.Request) 718 if !ok { 719 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 720 } 721 722 input, ok := in.Parameters.(*DeleteQueueInput) 723 _ = input 724 if !ok { 725 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 726 } 727 728 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/queues/{Name}") 729 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 730 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 731 request.Method = "DELETE" 732 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 733 if err != nil { 734 return out, metadata, &smithy.SerializationError{Err: err} 735 } 736 737 if err := awsRestjson1_serializeOpHttpBindingsDeleteQueueInput(input, restEncoder); err != nil { 738 return out, metadata, &smithy.SerializationError{Err: err} 739 } 740 741 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 742 return out, metadata, &smithy.SerializationError{Err: err} 743 } 744 in.Request = request 745 746 return next.HandleSerialize(ctx, in) 747} 748func awsRestjson1_serializeOpHttpBindingsDeleteQueueInput(v *DeleteQueueInput, encoder *httpbinding.Encoder) error { 749 if v == nil { 750 return fmt.Errorf("unsupported serialization of nil %T", v) 751 } 752 753 if v.Name == nil || len(*v.Name) == 0 { 754 return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} 755 } 756 if v.Name != nil { 757 if err := encoder.SetURI("Name").String(*v.Name); err != nil { 758 return err 759 } 760 } 761 762 return nil 763} 764 765type awsRestjson1_serializeOpDescribeEndpoints struct { 766} 767 768func (*awsRestjson1_serializeOpDescribeEndpoints) ID() string { 769 return "OperationSerializer" 770} 771 772func (m *awsRestjson1_serializeOpDescribeEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 773 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 774) { 775 request, ok := in.Request.(*smithyhttp.Request) 776 if !ok { 777 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 778 } 779 780 input, ok := in.Parameters.(*DescribeEndpointsInput) 781 _ = input 782 if !ok { 783 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 784 } 785 786 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/endpoints") 787 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 788 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 789 request.Method = "POST" 790 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 791 if err != nil { 792 return out, metadata, &smithy.SerializationError{Err: err} 793 } 794 795 restEncoder.SetHeader("Content-Type").String("application/json") 796 797 jsonEncoder := smithyjson.NewEncoder() 798 if err := awsRestjson1_serializeOpDocumentDescribeEndpointsInput(input, jsonEncoder.Value); err != nil { 799 return out, metadata, &smithy.SerializationError{Err: err} 800 } 801 802 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 803 return out, metadata, &smithy.SerializationError{Err: err} 804 } 805 806 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 807 return out, metadata, &smithy.SerializationError{Err: err} 808 } 809 in.Request = request 810 811 return next.HandleSerialize(ctx, in) 812} 813func awsRestjson1_serializeOpHttpBindingsDescribeEndpointsInput(v *DescribeEndpointsInput, encoder *httpbinding.Encoder) error { 814 if v == nil { 815 return fmt.Errorf("unsupported serialization of nil %T", v) 816 } 817 818 return nil 819} 820 821func awsRestjson1_serializeOpDocumentDescribeEndpointsInput(v *DescribeEndpointsInput, value smithyjson.Value) error { 822 object := value.Object() 823 defer object.Close() 824 825 if v.MaxResults != 0 { 826 ok := object.Key("maxResults") 827 ok.Integer(v.MaxResults) 828 } 829 830 if len(v.Mode) > 0 { 831 ok := object.Key("mode") 832 ok.String(string(v.Mode)) 833 } 834 835 if v.NextToken != nil { 836 ok := object.Key("nextToken") 837 ok.String(*v.NextToken) 838 } 839 840 return nil 841} 842 843type awsRestjson1_serializeOpDisassociateCertificate struct { 844} 845 846func (*awsRestjson1_serializeOpDisassociateCertificate) ID() string { 847 return "OperationSerializer" 848} 849 850func (m *awsRestjson1_serializeOpDisassociateCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 851 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 852) { 853 request, ok := in.Request.(*smithyhttp.Request) 854 if !ok { 855 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 856 } 857 858 input, ok := in.Parameters.(*DisassociateCertificateInput) 859 _ = input 860 if !ok { 861 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 862 } 863 864 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/certificates/{Arn}") 865 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 866 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 867 request.Method = "DELETE" 868 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 869 if err != nil { 870 return out, metadata, &smithy.SerializationError{Err: err} 871 } 872 873 if err := awsRestjson1_serializeOpHttpBindingsDisassociateCertificateInput(input, restEncoder); err != nil { 874 return out, metadata, &smithy.SerializationError{Err: err} 875 } 876 877 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 878 return out, metadata, &smithy.SerializationError{Err: err} 879 } 880 in.Request = request 881 882 return next.HandleSerialize(ctx, in) 883} 884func awsRestjson1_serializeOpHttpBindingsDisassociateCertificateInput(v *DisassociateCertificateInput, encoder *httpbinding.Encoder) error { 885 if v == nil { 886 return fmt.Errorf("unsupported serialization of nil %T", v) 887 } 888 889 if v.Arn == nil || len(*v.Arn) == 0 { 890 return &smithy.SerializationError{Err: fmt.Errorf("input member Arn must not be empty")} 891 } 892 if v.Arn != nil { 893 if err := encoder.SetURI("Arn").String(*v.Arn); err != nil { 894 return err 895 } 896 } 897 898 return nil 899} 900 901type awsRestjson1_serializeOpGetJob struct { 902} 903 904func (*awsRestjson1_serializeOpGetJob) ID() string { 905 return "OperationSerializer" 906} 907 908func (m *awsRestjson1_serializeOpGetJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 909 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 910) { 911 request, ok := in.Request.(*smithyhttp.Request) 912 if !ok { 913 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 914 } 915 916 input, ok := in.Parameters.(*GetJobInput) 917 _ = input 918 if !ok { 919 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 920 } 921 922 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/jobs/{Id}") 923 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 924 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 925 request.Method = "GET" 926 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 927 if err != nil { 928 return out, metadata, &smithy.SerializationError{Err: err} 929 } 930 931 if err := awsRestjson1_serializeOpHttpBindingsGetJobInput(input, restEncoder); err != nil { 932 return out, metadata, &smithy.SerializationError{Err: err} 933 } 934 935 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 936 return out, metadata, &smithy.SerializationError{Err: err} 937 } 938 in.Request = request 939 940 return next.HandleSerialize(ctx, in) 941} 942func awsRestjson1_serializeOpHttpBindingsGetJobInput(v *GetJobInput, encoder *httpbinding.Encoder) error { 943 if v == nil { 944 return fmt.Errorf("unsupported serialization of nil %T", v) 945 } 946 947 if v.Id == nil || len(*v.Id) == 0 { 948 return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} 949 } 950 if v.Id != nil { 951 if err := encoder.SetURI("Id").String(*v.Id); err != nil { 952 return err 953 } 954 } 955 956 return nil 957} 958 959type awsRestjson1_serializeOpGetJobTemplate struct { 960} 961 962func (*awsRestjson1_serializeOpGetJobTemplate) ID() string { 963 return "OperationSerializer" 964} 965 966func (m *awsRestjson1_serializeOpGetJobTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 967 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 968) { 969 request, ok := in.Request.(*smithyhttp.Request) 970 if !ok { 971 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 972 } 973 974 input, ok := in.Parameters.(*GetJobTemplateInput) 975 _ = input 976 if !ok { 977 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 978 } 979 980 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/jobTemplates/{Name}") 981 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 982 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 983 request.Method = "GET" 984 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 985 if err != nil { 986 return out, metadata, &smithy.SerializationError{Err: err} 987 } 988 989 if err := awsRestjson1_serializeOpHttpBindingsGetJobTemplateInput(input, restEncoder); err != nil { 990 return out, metadata, &smithy.SerializationError{Err: err} 991 } 992 993 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 994 return out, metadata, &smithy.SerializationError{Err: err} 995 } 996 in.Request = request 997 998 return next.HandleSerialize(ctx, in) 999} 1000func awsRestjson1_serializeOpHttpBindingsGetJobTemplateInput(v *GetJobTemplateInput, encoder *httpbinding.Encoder) error { 1001 if v == nil { 1002 return fmt.Errorf("unsupported serialization of nil %T", v) 1003 } 1004 1005 if v.Name == nil || len(*v.Name) == 0 { 1006 return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} 1007 } 1008 if v.Name != nil { 1009 if err := encoder.SetURI("Name").String(*v.Name); err != nil { 1010 return err 1011 } 1012 } 1013 1014 return nil 1015} 1016 1017type awsRestjson1_serializeOpGetPreset struct { 1018} 1019 1020func (*awsRestjson1_serializeOpGetPreset) ID() string { 1021 return "OperationSerializer" 1022} 1023 1024func (m *awsRestjson1_serializeOpGetPreset) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1025 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1026) { 1027 request, ok := in.Request.(*smithyhttp.Request) 1028 if !ok { 1029 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1030 } 1031 1032 input, ok := in.Parameters.(*GetPresetInput) 1033 _ = input 1034 if !ok { 1035 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1036 } 1037 1038 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/presets/{Name}") 1039 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 1040 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 1041 request.Method = "GET" 1042 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1043 if err != nil { 1044 return out, metadata, &smithy.SerializationError{Err: err} 1045 } 1046 1047 if err := awsRestjson1_serializeOpHttpBindingsGetPresetInput(input, restEncoder); err != nil { 1048 return out, metadata, &smithy.SerializationError{Err: err} 1049 } 1050 1051 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1052 return out, metadata, &smithy.SerializationError{Err: err} 1053 } 1054 in.Request = request 1055 1056 return next.HandleSerialize(ctx, in) 1057} 1058func awsRestjson1_serializeOpHttpBindingsGetPresetInput(v *GetPresetInput, encoder *httpbinding.Encoder) error { 1059 if v == nil { 1060 return fmt.Errorf("unsupported serialization of nil %T", v) 1061 } 1062 1063 if v.Name == nil || len(*v.Name) == 0 { 1064 return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} 1065 } 1066 if v.Name != nil { 1067 if err := encoder.SetURI("Name").String(*v.Name); err != nil { 1068 return err 1069 } 1070 } 1071 1072 return nil 1073} 1074 1075type awsRestjson1_serializeOpGetQueue struct { 1076} 1077 1078func (*awsRestjson1_serializeOpGetQueue) ID() string { 1079 return "OperationSerializer" 1080} 1081 1082func (m *awsRestjson1_serializeOpGetQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1083 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1084) { 1085 request, ok := in.Request.(*smithyhttp.Request) 1086 if !ok { 1087 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1088 } 1089 1090 input, ok := in.Parameters.(*GetQueueInput) 1091 _ = input 1092 if !ok { 1093 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1094 } 1095 1096 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/queues/{Name}") 1097 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 1098 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 1099 request.Method = "GET" 1100 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1101 if err != nil { 1102 return out, metadata, &smithy.SerializationError{Err: err} 1103 } 1104 1105 if err := awsRestjson1_serializeOpHttpBindingsGetQueueInput(input, restEncoder); err != nil { 1106 return out, metadata, &smithy.SerializationError{Err: err} 1107 } 1108 1109 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1110 return out, metadata, &smithy.SerializationError{Err: err} 1111 } 1112 in.Request = request 1113 1114 return next.HandleSerialize(ctx, in) 1115} 1116func awsRestjson1_serializeOpHttpBindingsGetQueueInput(v *GetQueueInput, encoder *httpbinding.Encoder) error { 1117 if v == nil { 1118 return fmt.Errorf("unsupported serialization of nil %T", v) 1119 } 1120 1121 if v.Name == nil || len(*v.Name) == 0 { 1122 return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} 1123 } 1124 if v.Name != nil { 1125 if err := encoder.SetURI("Name").String(*v.Name); err != nil { 1126 return err 1127 } 1128 } 1129 1130 return nil 1131} 1132 1133type awsRestjson1_serializeOpListJobs struct { 1134} 1135 1136func (*awsRestjson1_serializeOpListJobs) ID() string { 1137 return "OperationSerializer" 1138} 1139 1140func (m *awsRestjson1_serializeOpListJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1141 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1142) { 1143 request, ok := in.Request.(*smithyhttp.Request) 1144 if !ok { 1145 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1146 } 1147 1148 input, ok := in.Parameters.(*ListJobsInput) 1149 _ = input 1150 if !ok { 1151 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1152 } 1153 1154 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/jobs") 1155 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 1156 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 1157 request.Method = "GET" 1158 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1159 if err != nil { 1160 return out, metadata, &smithy.SerializationError{Err: err} 1161 } 1162 1163 if err := awsRestjson1_serializeOpHttpBindingsListJobsInput(input, restEncoder); err != nil { 1164 return out, metadata, &smithy.SerializationError{Err: err} 1165 } 1166 1167 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1168 return out, metadata, &smithy.SerializationError{Err: err} 1169 } 1170 in.Request = request 1171 1172 return next.HandleSerialize(ctx, in) 1173} 1174func awsRestjson1_serializeOpHttpBindingsListJobsInput(v *ListJobsInput, encoder *httpbinding.Encoder) error { 1175 if v == nil { 1176 return fmt.Errorf("unsupported serialization of nil %T", v) 1177 } 1178 1179 if v.MaxResults != 0 { 1180 encoder.SetQuery("maxResults").Integer(v.MaxResults) 1181 } 1182 1183 if v.NextToken != nil { 1184 encoder.SetQuery("nextToken").String(*v.NextToken) 1185 } 1186 1187 if len(v.Order) > 0 { 1188 encoder.SetQuery("order").String(string(v.Order)) 1189 } 1190 1191 if v.Queue != nil { 1192 encoder.SetQuery("queue").String(*v.Queue) 1193 } 1194 1195 if len(v.Status) > 0 { 1196 encoder.SetQuery("status").String(string(v.Status)) 1197 } 1198 1199 return nil 1200} 1201 1202type awsRestjson1_serializeOpListJobTemplates struct { 1203} 1204 1205func (*awsRestjson1_serializeOpListJobTemplates) ID() string { 1206 return "OperationSerializer" 1207} 1208 1209func (m *awsRestjson1_serializeOpListJobTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1210 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1211) { 1212 request, ok := in.Request.(*smithyhttp.Request) 1213 if !ok { 1214 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1215 } 1216 1217 input, ok := in.Parameters.(*ListJobTemplatesInput) 1218 _ = input 1219 if !ok { 1220 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1221 } 1222 1223 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/jobTemplates") 1224 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 1225 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 1226 request.Method = "GET" 1227 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1228 if err != nil { 1229 return out, metadata, &smithy.SerializationError{Err: err} 1230 } 1231 1232 if err := awsRestjson1_serializeOpHttpBindingsListJobTemplatesInput(input, restEncoder); err != nil { 1233 return out, metadata, &smithy.SerializationError{Err: err} 1234 } 1235 1236 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1237 return out, metadata, &smithy.SerializationError{Err: err} 1238 } 1239 in.Request = request 1240 1241 return next.HandleSerialize(ctx, in) 1242} 1243func awsRestjson1_serializeOpHttpBindingsListJobTemplatesInput(v *ListJobTemplatesInput, encoder *httpbinding.Encoder) error { 1244 if v == nil { 1245 return fmt.Errorf("unsupported serialization of nil %T", v) 1246 } 1247 1248 if v.Category != nil { 1249 encoder.SetQuery("category").String(*v.Category) 1250 } 1251 1252 if len(v.ListBy) > 0 { 1253 encoder.SetQuery("listBy").String(string(v.ListBy)) 1254 } 1255 1256 if v.MaxResults != 0 { 1257 encoder.SetQuery("maxResults").Integer(v.MaxResults) 1258 } 1259 1260 if v.NextToken != nil { 1261 encoder.SetQuery("nextToken").String(*v.NextToken) 1262 } 1263 1264 if len(v.Order) > 0 { 1265 encoder.SetQuery("order").String(string(v.Order)) 1266 } 1267 1268 return nil 1269} 1270 1271type awsRestjson1_serializeOpListPresets struct { 1272} 1273 1274func (*awsRestjson1_serializeOpListPresets) ID() string { 1275 return "OperationSerializer" 1276} 1277 1278func (m *awsRestjson1_serializeOpListPresets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1279 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1280) { 1281 request, ok := in.Request.(*smithyhttp.Request) 1282 if !ok { 1283 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1284 } 1285 1286 input, ok := in.Parameters.(*ListPresetsInput) 1287 _ = input 1288 if !ok { 1289 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1290 } 1291 1292 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/presets") 1293 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 1294 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 1295 request.Method = "GET" 1296 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1297 if err != nil { 1298 return out, metadata, &smithy.SerializationError{Err: err} 1299 } 1300 1301 if err := awsRestjson1_serializeOpHttpBindingsListPresetsInput(input, restEncoder); err != nil { 1302 return out, metadata, &smithy.SerializationError{Err: err} 1303 } 1304 1305 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1306 return out, metadata, &smithy.SerializationError{Err: err} 1307 } 1308 in.Request = request 1309 1310 return next.HandleSerialize(ctx, in) 1311} 1312func awsRestjson1_serializeOpHttpBindingsListPresetsInput(v *ListPresetsInput, encoder *httpbinding.Encoder) error { 1313 if v == nil { 1314 return fmt.Errorf("unsupported serialization of nil %T", v) 1315 } 1316 1317 if v.Category != nil { 1318 encoder.SetQuery("category").String(*v.Category) 1319 } 1320 1321 if len(v.ListBy) > 0 { 1322 encoder.SetQuery("listBy").String(string(v.ListBy)) 1323 } 1324 1325 if v.MaxResults != 0 { 1326 encoder.SetQuery("maxResults").Integer(v.MaxResults) 1327 } 1328 1329 if v.NextToken != nil { 1330 encoder.SetQuery("nextToken").String(*v.NextToken) 1331 } 1332 1333 if len(v.Order) > 0 { 1334 encoder.SetQuery("order").String(string(v.Order)) 1335 } 1336 1337 return nil 1338} 1339 1340type awsRestjson1_serializeOpListQueues struct { 1341} 1342 1343func (*awsRestjson1_serializeOpListQueues) ID() string { 1344 return "OperationSerializer" 1345} 1346 1347func (m *awsRestjson1_serializeOpListQueues) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1348 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1349) { 1350 request, ok := in.Request.(*smithyhttp.Request) 1351 if !ok { 1352 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1353 } 1354 1355 input, ok := in.Parameters.(*ListQueuesInput) 1356 _ = input 1357 if !ok { 1358 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1359 } 1360 1361 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/queues") 1362 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 1363 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 1364 request.Method = "GET" 1365 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1366 if err != nil { 1367 return out, metadata, &smithy.SerializationError{Err: err} 1368 } 1369 1370 if err := awsRestjson1_serializeOpHttpBindingsListQueuesInput(input, restEncoder); err != nil { 1371 return out, metadata, &smithy.SerializationError{Err: err} 1372 } 1373 1374 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1375 return out, metadata, &smithy.SerializationError{Err: err} 1376 } 1377 in.Request = request 1378 1379 return next.HandleSerialize(ctx, in) 1380} 1381func awsRestjson1_serializeOpHttpBindingsListQueuesInput(v *ListQueuesInput, encoder *httpbinding.Encoder) error { 1382 if v == nil { 1383 return fmt.Errorf("unsupported serialization of nil %T", v) 1384 } 1385 1386 if len(v.ListBy) > 0 { 1387 encoder.SetQuery("listBy").String(string(v.ListBy)) 1388 } 1389 1390 if v.MaxResults != 0 { 1391 encoder.SetQuery("maxResults").Integer(v.MaxResults) 1392 } 1393 1394 if v.NextToken != nil { 1395 encoder.SetQuery("nextToken").String(*v.NextToken) 1396 } 1397 1398 if len(v.Order) > 0 { 1399 encoder.SetQuery("order").String(string(v.Order)) 1400 } 1401 1402 return nil 1403} 1404 1405type awsRestjson1_serializeOpListTagsForResource struct { 1406} 1407 1408func (*awsRestjson1_serializeOpListTagsForResource) ID() string { 1409 return "OperationSerializer" 1410} 1411 1412func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1413 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1414) { 1415 request, ok := in.Request.(*smithyhttp.Request) 1416 if !ok { 1417 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1418 } 1419 1420 input, ok := in.Parameters.(*ListTagsForResourceInput) 1421 _ = input 1422 if !ok { 1423 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1424 } 1425 1426 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/tags/{Arn}") 1427 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 1428 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 1429 request.Method = "GET" 1430 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1431 if err != nil { 1432 return out, metadata, &smithy.SerializationError{Err: err} 1433 } 1434 1435 if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { 1436 return out, metadata, &smithy.SerializationError{Err: err} 1437 } 1438 1439 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1440 return out, metadata, &smithy.SerializationError{Err: err} 1441 } 1442 in.Request = request 1443 1444 return next.HandleSerialize(ctx, in) 1445} 1446func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { 1447 if v == nil { 1448 return fmt.Errorf("unsupported serialization of nil %T", v) 1449 } 1450 1451 if v.Arn == nil || len(*v.Arn) == 0 { 1452 return &smithy.SerializationError{Err: fmt.Errorf("input member Arn must not be empty")} 1453 } 1454 if v.Arn != nil { 1455 if err := encoder.SetURI("Arn").String(*v.Arn); err != nil { 1456 return err 1457 } 1458 } 1459 1460 return nil 1461} 1462 1463type awsRestjson1_serializeOpTagResource struct { 1464} 1465 1466func (*awsRestjson1_serializeOpTagResource) ID() string { 1467 return "OperationSerializer" 1468} 1469 1470func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1471 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1472) { 1473 request, ok := in.Request.(*smithyhttp.Request) 1474 if !ok { 1475 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1476 } 1477 1478 input, ok := in.Parameters.(*TagResourceInput) 1479 _ = input 1480 if !ok { 1481 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1482 } 1483 1484 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/tags") 1485 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 1486 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 1487 request.Method = "POST" 1488 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1489 if err != nil { 1490 return out, metadata, &smithy.SerializationError{Err: err} 1491 } 1492 1493 restEncoder.SetHeader("Content-Type").String("application/json") 1494 1495 jsonEncoder := smithyjson.NewEncoder() 1496 if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { 1497 return out, metadata, &smithy.SerializationError{Err: err} 1498 } 1499 1500 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 1501 return out, metadata, &smithy.SerializationError{Err: err} 1502 } 1503 1504 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1505 return out, metadata, &smithy.SerializationError{Err: err} 1506 } 1507 in.Request = request 1508 1509 return next.HandleSerialize(ctx, in) 1510} 1511func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { 1512 if v == nil { 1513 return fmt.Errorf("unsupported serialization of nil %T", v) 1514 } 1515 1516 return nil 1517} 1518 1519func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { 1520 object := value.Object() 1521 defer object.Close() 1522 1523 if v.Arn != nil { 1524 ok := object.Key("arn") 1525 ok.String(*v.Arn) 1526 } 1527 1528 if v.Tags != nil { 1529 ok := object.Key("tags") 1530 if err := awsRestjson1_serializeDocument__mapOf__string(v.Tags, ok); err != nil { 1531 return err 1532 } 1533 } 1534 1535 return nil 1536} 1537 1538type awsRestjson1_serializeOpUntagResource struct { 1539} 1540 1541func (*awsRestjson1_serializeOpUntagResource) ID() string { 1542 return "OperationSerializer" 1543} 1544 1545func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1546 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1547) { 1548 request, ok := in.Request.(*smithyhttp.Request) 1549 if !ok { 1550 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1551 } 1552 1553 input, ok := in.Parameters.(*UntagResourceInput) 1554 _ = input 1555 if !ok { 1556 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1557 } 1558 1559 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/tags/{Arn}") 1560 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 1561 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 1562 request.Method = "PUT" 1563 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1564 if err != nil { 1565 return out, metadata, &smithy.SerializationError{Err: err} 1566 } 1567 1568 if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { 1569 return out, metadata, &smithy.SerializationError{Err: err} 1570 } 1571 1572 restEncoder.SetHeader("Content-Type").String("application/json") 1573 1574 jsonEncoder := smithyjson.NewEncoder() 1575 if err := awsRestjson1_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { 1576 return out, metadata, &smithy.SerializationError{Err: err} 1577 } 1578 1579 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 1580 return out, metadata, &smithy.SerializationError{Err: err} 1581 } 1582 1583 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1584 return out, metadata, &smithy.SerializationError{Err: err} 1585 } 1586 in.Request = request 1587 1588 return next.HandleSerialize(ctx, in) 1589} 1590func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { 1591 if v == nil { 1592 return fmt.Errorf("unsupported serialization of nil %T", v) 1593 } 1594 1595 if v.Arn == nil || len(*v.Arn) == 0 { 1596 return &smithy.SerializationError{Err: fmt.Errorf("input member Arn must not be empty")} 1597 } 1598 if v.Arn != nil { 1599 if err := encoder.SetURI("Arn").String(*v.Arn); err != nil { 1600 return err 1601 } 1602 } 1603 1604 return nil 1605} 1606 1607func awsRestjson1_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { 1608 object := value.Object() 1609 defer object.Close() 1610 1611 if v.TagKeys != nil { 1612 ok := object.Key("tagKeys") 1613 if err := awsRestjson1_serializeDocument__listOf__string(v.TagKeys, ok); err != nil { 1614 return err 1615 } 1616 } 1617 1618 return nil 1619} 1620 1621type awsRestjson1_serializeOpUpdateJobTemplate struct { 1622} 1623 1624func (*awsRestjson1_serializeOpUpdateJobTemplate) ID() string { 1625 return "OperationSerializer" 1626} 1627 1628func (m *awsRestjson1_serializeOpUpdateJobTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1629 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1630) { 1631 request, ok := in.Request.(*smithyhttp.Request) 1632 if !ok { 1633 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1634 } 1635 1636 input, ok := in.Parameters.(*UpdateJobTemplateInput) 1637 _ = input 1638 if !ok { 1639 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1640 } 1641 1642 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/jobTemplates/{Name}") 1643 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 1644 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 1645 request.Method = "PUT" 1646 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1647 if err != nil { 1648 return out, metadata, &smithy.SerializationError{Err: err} 1649 } 1650 1651 if err := awsRestjson1_serializeOpHttpBindingsUpdateJobTemplateInput(input, restEncoder); err != nil { 1652 return out, metadata, &smithy.SerializationError{Err: err} 1653 } 1654 1655 restEncoder.SetHeader("Content-Type").String("application/json") 1656 1657 jsonEncoder := smithyjson.NewEncoder() 1658 if err := awsRestjson1_serializeOpDocumentUpdateJobTemplateInput(input, jsonEncoder.Value); err != nil { 1659 return out, metadata, &smithy.SerializationError{Err: err} 1660 } 1661 1662 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 1663 return out, metadata, &smithy.SerializationError{Err: err} 1664 } 1665 1666 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1667 return out, metadata, &smithy.SerializationError{Err: err} 1668 } 1669 in.Request = request 1670 1671 return next.HandleSerialize(ctx, in) 1672} 1673func awsRestjson1_serializeOpHttpBindingsUpdateJobTemplateInput(v *UpdateJobTemplateInput, encoder *httpbinding.Encoder) error { 1674 if v == nil { 1675 return fmt.Errorf("unsupported serialization of nil %T", v) 1676 } 1677 1678 if v.Name == nil || len(*v.Name) == 0 { 1679 return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} 1680 } 1681 if v.Name != nil { 1682 if err := encoder.SetURI("Name").String(*v.Name); err != nil { 1683 return err 1684 } 1685 } 1686 1687 return nil 1688} 1689 1690func awsRestjson1_serializeOpDocumentUpdateJobTemplateInput(v *UpdateJobTemplateInput, value smithyjson.Value) error { 1691 object := value.Object() 1692 defer object.Close() 1693 1694 if v.AccelerationSettings != nil { 1695 ok := object.Key("accelerationSettings") 1696 if err := awsRestjson1_serializeDocumentAccelerationSettings(v.AccelerationSettings, ok); err != nil { 1697 return err 1698 } 1699 } 1700 1701 if v.Category != nil { 1702 ok := object.Key("category") 1703 ok.String(*v.Category) 1704 } 1705 1706 if v.Description != nil { 1707 ok := object.Key("description") 1708 ok.String(*v.Description) 1709 } 1710 1711 if v.HopDestinations != nil { 1712 ok := object.Key("hopDestinations") 1713 if err := awsRestjson1_serializeDocument__listOfHopDestination(v.HopDestinations, ok); err != nil { 1714 return err 1715 } 1716 } 1717 1718 if v.Priority != 0 { 1719 ok := object.Key("priority") 1720 ok.Integer(v.Priority) 1721 } 1722 1723 if v.Queue != nil { 1724 ok := object.Key("queue") 1725 ok.String(*v.Queue) 1726 } 1727 1728 if v.Settings != nil { 1729 ok := object.Key("settings") 1730 if err := awsRestjson1_serializeDocumentJobTemplateSettings(v.Settings, ok); err != nil { 1731 return err 1732 } 1733 } 1734 1735 if len(v.StatusUpdateInterval) > 0 { 1736 ok := object.Key("statusUpdateInterval") 1737 ok.String(string(v.StatusUpdateInterval)) 1738 } 1739 1740 return nil 1741} 1742 1743type awsRestjson1_serializeOpUpdatePreset struct { 1744} 1745 1746func (*awsRestjson1_serializeOpUpdatePreset) ID() string { 1747 return "OperationSerializer" 1748} 1749 1750func (m *awsRestjson1_serializeOpUpdatePreset) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1751 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1752) { 1753 request, ok := in.Request.(*smithyhttp.Request) 1754 if !ok { 1755 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1756 } 1757 1758 input, ok := in.Parameters.(*UpdatePresetInput) 1759 _ = input 1760 if !ok { 1761 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1762 } 1763 1764 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/presets/{Name}") 1765 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 1766 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 1767 request.Method = "PUT" 1768 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1769 if err != nil { 1770 return out, metadata, &smithy.SerializationError{Err: err} 1771 } 1772 1773 if err := awsRestjson1_serializeOpHttpBindingsUpdatePresetInput(input, restEncoder); err != nil { 1774 return out, metadata, &smithy.SerializationError{Err: err} 1775 } 1776 1777 restEncoder.SetHeader("Content-Type").String("application/json") 1778 1779 jsonEncoder := smithyjson.NewEncoder() 1780 if err := awsRestjson1_serializeOpDocumentUpdatePresetInput(input, jsonEncoder.Value); err != nil { 1781 return out, metadata, &smithy.SerializationError{Err: err} 1782 } 1783 1784 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 1785 return out, metadata, &smithy.SerializationError{Err: err} 1786 } 1787 1788 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1789 return out, metadata, &smithy.SerializationError{Err: err} 1790 } 1791 in.Request = request 1792 1793 return next.HandleSerialize(ctx, in) 1794} 1795func awsRestjson1_serializeOpHttpBindingsUpdatePresetInput(v *UpdatePresetInput, encoder *httpbinding.Encoder) error { 1796 if v == nil { 1797 return fmt.Errorf("unsupported serialization of nil %T", v) 1798 } 1799 1800 if v.Name == nil || len(*v.Name) == 0 { 1801 return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} 1802 } 1803 if v.Name != nil { 1804 if err := encoder.SetURI("Name").String(*v.Name); err != nil { 1805 return err 1806 } 1807 } 1808 1809 return nil 1810} 1811 1812func awsRestjson1_serializeOpDocumentUpdatePresetInput(v *UpdatePresetInput, value smithyjson.Value) error { 1813 object := value.Object() 1814 defer object.Close() 1815 1816 if v.Category != nil { 1817 ok := object.Key("category") 1818 ok.String(*v.Category) 1819 } 1820 1821 if v.Description != nil { 1822 ok := object.Key("description") 1823 ok.String(*v.Description) 1824 } 1825 1826 if v.Settings != nil { 1827 ok := object.Key("settings") 1828 if err := awsRestjson1_serializeDocumentPresetSettings(v.Settings, ok); err != nil { 1829 return err 1830 } 1831 } 1832 1833 return nil 1834} 1835 1836type awsRestjson1_serializeOpUpdateQueue struct { 1837} 1838 1839func (*awsRestjson1_serializeOpUpdateQueue) ID() string { 1840 return "OperationSerializer" 1841} 1842 1843func (m *awsRestjson1_serializeOpUpdateQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1844 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1845) { 1846 request, ok := in.Request.(*smithyhttp.Request) 1847 if !ok { 1848 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1849 } 1850 1851 input, ok := in.Parameters.(*UpdateQueueInput) 1852 _ = input 1853 if !ok { 1854 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1855 } 1856 1857 opPath, opQuery := httpbinding.SplitURI("/2017-08-29/queues/{Name}") 1858 request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) 1859 request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) 1860 request.Method = "PUT" 1861 restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1862 if err != nil { 1863 return out, metadata, &smithy.SerializationError{Err: err} 1864 } 1865 1866 if err := awsRestjson1_serializeOpHttpBindingsUpdateQueueInput(input, restEncoder); err != nil { 1867 return out, metadata, &smithy.SerializationError{Err: err} 1868 } 1869 1870 restEncoder.SetHeader("Content-Type").String("application/json") 1871 1872 jsonEncoder := smithyjson.NewEncoder() 1873 if err := awsRestjson1_serializeOpDocumentUpdateQueueInput(input, jsonEncoder.Value); err != nil { 1874 return out, metadata, &smithy.SerializationError{Err: err} 1875 } 1876 1877 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 1878 return out, metadata, &smithy.SerializationError{Err: err} 1879 } 1880 1881 if request.Request, err = restEncoder.Encode(request.Request); err != nil { 1882 return out, metadata, &smithy.SerializationError{Err: err} 1883 } 1884 in.Request = request 1885 1886 return next.HandleSerialize(ctx, in) 1887} 1888func awsRestjson1_serializeOpHttpBindingsUpdateQueueInput(v *UpdateQueueInput, encoder *httpbinding.Encoder) error { 1889 if v == nil { 1890 return fmt.Errorf("unsupported serialization of nil %T", v) 1891 } 1892 1893 if v.Name == nil || len(*v.Name) == 0 { 1894 return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} 1895 } 1896 if v.Name != nil { 1897 if err := encoder.SetURI("Name").String(*v.Name); err != nil { 1898 return err 1899 } 1900 } 1901 1902 return nil 1903} 1904 1905func awsRestjson1_serializeOpDocumentUpdateQueueInput(v *UpdateQueueInput, value smithyjson.Value) error { 1906 object := value.Object() 1907 defer object.Close() 1908 1909 if v.Description != nil { 1910 ok := object.Key("description") 1911 ok.String(*v.Description) 1912 } 1913 1914 if v.ReservationPlanSettings != nil { 1915 ok := object.Key("reservationPlanSettings") 1916 if err := awsRestjson1_serializeDocumentReservationPlanSettings(v.ReservationPlanSettings, ok); err != nil { 1917 return err 1918 } 1919 } 1920 1921 if len(v.Status) > 0 { 1922 ok := object.Key("status") 1923 ok.String(string(v.Status)) 1924 } 1925 1926 return nil 1927} 1928 1929func awsRestjson1_serializeDocument__listOf__doubleMinNegative60Max6(v []float64, value smithyjson.Value) error { 1930 array := value.Array() 1931 defer array.Close() 1932 1933 for i := range v { 1934 av := array.Value() 1935 av.Double(v[i]) 1936 } 1937 return nil 1938} 1939 1940func awsRestjson1_serializeDocument__listOf__integerMin1Max2147483647(v []int32, value smithyjson.Value) error { 1941 array := value.Array() 1942 defer array.Close() 1943 1944 for i := range v { 1945 av := array.Value() 1946 av.Integer(v[i]) 1947 } 1948 return nil 1949} 1950 1951func awsRestjson1_serializeDocument__listOf__integerMin32Max8182(v []int32, value smithyjson.Value) error { 1952 array := value.Array() 1953 defer array.Close() 1954 1955 for i := range v { 1956 av := array.Value() 1957 av.Integer(v[i]) 1958 } 1959 return nil 1960} 1961 1962func awsRestjson1_serializeDocument__listOf__integerMinNegative60Max6(v []int32, value smithyjson.Value) error { 1963 array := value.Array() 1964 defer array.Close() 1965 1966 for i := range v { 1967 av := array.Value() 1968 av.Integer(v[i]) 1969 } 1970 return nil 1971} 1972 1973func awsRestjson1_serializeDocument__listOf__string(v []string, value smithyjson.Value) error { 1974 array := value.Array() 1975 defer array.Close() 1976 1977 for i := range v { 1978 av := array.Value() 1979 av.String(v[i]) 1980 } 1981 return nil 1982} 1983 1984func awsRestjson1_serializeDocument__listOf__stringMin1(v []string, value smithyjson.Value) error { 1985 array := value.Array() 1986 defer array.Close() 1987 1988 for i := range v { 1989 av := array.Value() 1990 av.String(v[i]) 1991 } 1992 return nil 1993} 1994 1995func awsRestjson1_serializeDocument__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12(v []string, value smithyjson.Value) error { 1996 array := value.Array() 1997 defer array.Close() 1998 1999 for i := range v { 2000 av := array.Value() 2001 av.String(v[i]) 2002 } 2003 return nil 2004} 2005 2006func awsRestjson1_serializeDocument__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12(v []string, value smithyjson.Value) error { 2007 array := value.Array() 2008 defer array.Close() 2009 2010 for i := range v { 2011 av := array.Value() 2012 av.String(v[i]) 2013 } 2014 return nil 2015} 2016 2017func awsRestjson1_serializeDocument__listOf__stringPatternS3ASSETMAPXml(v []string, value smithyjson.Value) error { 2018 array := value.Array() 2019 defer array.Close() 2020 2021 for i := range v { 2022 av := array.Value() 2023 av.String(v[i]) 2024 } 2025 return nil 2026} 2027 2028func awsRestjson1_serializeDocument__listOfAudioDescription(v []types.AudioDescription, value smithyjson.Value) error { 2029 array := value.Array() 2030 defer array.Close() 2031 2032 for i := range v { 2033 av := array.Value() 2034 if err := awsRestjson1_serializeDocumentAudioDescription(&v[i], av); err != nil { 2035 return err 2036 } 2037 } 2038 return nil 2039} 2040 2041func awsRestjson1_serializeDocument__listOfCaptionDescription(v []types.CaptionDescription, value smithyjson.Value) error { 2042 array := value.Array() 2043 defer array.Close() 2044 2045 for i := range v { 2046 av := array.Value() 2047 if err := awsRestjson1_serializeDocumentCaptionDescription(&v[i], av); err != nil { 2048 return err 2049 } 2050 } 2051 return nil 2052} 2053 2054func awsRestjson1_serializeDocument__listOfCaptionDescriptionPreset(v []types.CaptionDescriptionPreset, value smithyjson.Value) error { 2055 array := value.Array() 2056 defer array.Close() 2057 2058 for i := range v { 2059 av := array.Value() 2060 if err := awsRestjson1_serializeDocumentCaptionDescriptionPreset(&v[i], av); err != nil { 2061 return err 2062 } 2063 } 2064 return nil 2065} 2066 2067func awsRestjson1_serializeDocument__listOfCmafAdditionalManifest(v []types.CmafAdditionalManifest, value smithyjson.Value) error { 2068 array := value.Array() 2069 defer array.Close() 2070 2071 for i := range v { 2072 av := array.Value() 2073 if err := awsRestjson1_serializeDocumentCmafAdditionalManifest(&v[i], av); err != nil { 2074 return err 2075 } 2076 } 2077 return nil 2078} 2079 2080func awsRestjson1_serializeDocument__listOfDashAdditionalManifest(v []types.DashAdditionalManifest, value smithyjson.Value) error { 2081 array := value.Array() 2082 defer array.Close() 2083 2084 for i := range v { 2085 av := array.Value() 2086 if err := awsRestjson1_serializeDocumentDashAdditionalManifest(&v[i], av); err != nil { 2087 return err 2088 } 2089 } 2090 return nil 2091} 2092 2093func awsRestjson1_serializeDocument__listOfHlsAdditionalManifest(v []types.HlsAdditionalManifest, value smithyjson.Value) error { 2094 array := value.Array() 2095 defer array.Close() 2096 2097 for i := range v { 2098 av := array.Value() 2099 if err := awsRestjson1_serializeDocumentHlsAdditionalManifest(&v[i], av); err != nil { 2100 return err 2101 } 2102 } 2103 return nil 2104} 2105 2106func awsRestjson1_serializeDocument__listOfHlsAdMarkers(v []types.HlsAdMarkers, value smithyjson.Value) error { 2107 array := value.Array() 2108 defer array.Close() 2109 2110 for i := range v { 2111 av := array.Value() 2112 av.String(string(v[i])) 2113 } 2114 return nil 2115} 2116 2117func awsRestjson1_serializeDocument__listOfHlsCaptionLanguageMapping(v []types.HlsCaptionLanguageMapping, value smithyjson.Value) error { 2118 array := value.Array() 2119 defer array.Close() 2120 2121 for i := range v { 2122 av := array.Value() 2123 if err := awsRestjson1_serializeDocumentHlsCaptionLanguageMapping(&v[i], av); err != nil { 2124 return err 2125 } 2126 } 2127 return nil 2128} 2129 2130func awsRestjson1_serializeDocument__listOfHopDestination(v []types.HopDestination, value smithyjson.Value) error { 2131 array := value.Array() 2132 defer array.Close() 2133 2134 for i := range v { 2135 av := array.Value() 2136 if err := awsRestjson1_serializeDocumentHopDestination(&v[i], av); err != nil { 2137 return err 2138 } 2139 } 2140 return nil 2141} 2142 2143func awsRestjson1_serializeDocument__listOfId3Insertion(v []types.Id3Insertion, value smithyjson.Value) error { 2144 array := value.Array() 2145 defer array.Close() 2146 2147 for i := range v { 2148 av := array.Value() 2149 if err := awsRestjson1_serializeDocumentId3Insertion(&v[i], av); err != nil { 2150 return err 2151 } 2152 } 2153 return nil 2154} 2155 2156func awsRestjson1_serializeDocument__listOfInput(v []types.Input, value smithyjson.Value) error { 2157 array := value.Array() 2158 defer array.Close() 2159 2160 for i := range v { 2161 av := array.Value() 2162 if err := awsRestjson1_serializeDocumentInput(&v[i], av); err != nil { 2163 return err 2164 } 2165 } 2166 return nil 2167} 2168 2169func awsRestjson1_serializeDocument__listOfInputClipping(v []types.InputClipping, value smithyjson.Value) error { 2170 array := value.Array() 2171 defer array.Close() 2172 2173 for i := range v { 2174 av := array.Value() 2175 if err := awsRestjson1_serializeDocumentInputClipping(&v[i], av); err != nil { 2176 return err 2177 } 2178 } 2179 return nil 2180} 2181 2182func awsRestjson1_serializeDocument__listOfInputTemplate(v []types.InputTemplate, value smithyjson.Value) error { 2183 array := value.Array() 2184 defer array.Close() 2185 2186 for i := range v { 2187 av := array.Value() 2188 if err := awsRestjson1_serializeDocumentInputTemplate(&v[i], av); err != nil { 2189 return err 2190 } 2191 } 2192 return nil 2193} 2194 2195func awsRestjson1_serializeDocument__listOfInsertableImage(v []types.InsertableImage, value smithyjson.Value) error { 2196 array := value.Array() 2197 defer array.Close() 2198 2199 for i := range v { 2200 av := array.Value() 2201 if err := awsRestjson1_serializeDocumentInsertableImage(&v[i], av); err != nil { 2202 return err 2203 } 2204 } 2205 return nil 2206} 2207 2208func awsRestjson1_serializeDocument__listOfMsSmoothAdditionalManifest(v []types.MsSmoothAdditionalManifest, value smithyjson.Value) error { 2209 array := value.Array() 2210 defer array.Close() 2211 2212 for i := range v { 2213 av := array.Value() 2214 if err := awsRestjson1_serializeDocumentMsSmoothAdditionalManifest(&v[i], av); err != nil { 2215 return err 2216 } 2217 } 2218 return nil 2219} 2220 2221func awsRestjson1_serializeDocument__listOfOutput(v []types.Output, value smithyjson.Value) error { 2222 array := value.Array() 2223 defer array.Close() 2224 2225 for i := range v { 2226 av := array.Value() 2227 if err := awsRestjson1_serializeDocumentOutput(&v[i], av); err != nil { 2228 return err 2229 } 2230 } 2231 return nil 2232} 2233 2234func awsRestjson1_serializeDocument__listOfOutputChannelMapping(v []types.OutputChannelMapping, value smithyjson.Value) error { 2235 array := value.Array() 2236 defer array.Close() 2237 2238 for i := range v { 2239 av := array.Value() 2240 if err := awsRestjson1_serializeDocumentOutputChannelMapping(&v[i], av); err != nil { 2241 return err 2242 } 2243 } 2244 return nil 2245} 2246 2247func awsRestjson1_serializeDocument__listOfOutputGroup(v []types.OutputGroup, value smithyjson.Value) error { 2248 array := value.Array() 2249 defer array.Close() 2250 2251 for i := range v { 2252 av := array.Value() 2253 if err := awsRestjson1_serializeDocumentOutputGroup(&v[i], av); err != nil { 2254 return err 2255 } 2256 } 2257 return nil 2258} 2259 2260func awsRestjson1_serializeDocument__listOfTeletextPageType(v []types.TeletextPageType, value smithyjson.Value) error { 2261 array := value.Array() 2262 defer array.Close() 2263 2264 for i := range v { 2265 av := array.Value() 2266 av.String(string(v[i])) 2267 } 2268 return nil 2269} 2270 2271func awsRestjson1_serializeDocument__mapOf__string(v map[string]string, value smithyjson.Value) error { 2272 object := value.Object() 2273 defer object.Close() 2274 2275 for key := range v { 2276 om := object.Key(key) 2277 om.String(v[key]) 2278 } 2279 return nil 2280} 2281 2282func awsRestjson1_serializeDocument__mapOfAudioSelector(v map[string]types.AudioSelector, value smithyjson.Value) error { 2283 object := value.Object() 2284 defer object.Close() 2285 2286 for key := range v { 2287 om := object.Key(key) 2288 mapVar := v[key] 2289 if err := awsRestjson1_serializeDocumentAudioSelector(&mapVar, om); err != nil { 2290 return err 2291 } 2292 } 2293 return nil 2294} 2295 2296func awsRestjson1_serializeDocument__mapOfAudioSelectorGroup(v map[string]types.AudioSelectorGroup, value smithyjson.Value) error { 2297 object := value.Object() 2298 defer object.Close() 2299 2300 for key := range v { 2301 om := object.Key(key) 2302 mapVar := v[key] 2303 if err := awsRestjson1_serializeDocumentAudioSelectorGroup(&mapVar, om); err != nil { 2304 return err 2305 } 2306 } 2307 return nil 2308} 2309 2310func awsRestjson1_serializeDocument__mapOfCaptionSelector(v map[string]types.CaptionSelector, value smithyjson.Value) error { 2311 object := value.Object() 2312 defer object.Close() 2313 2314 for key := range v { 2315 om := object.Key(key) 2316 mapVar := v[key] 2317 if err := awsRestjson1_serializeDocumentCaptionSelector(&mapVar, om); err != nil { 2318 return err 2319 } 2320 } 2321 return nil 2322} 2323 2324func awsRestjson1_serializeDocumentAacSettings(v *types.AacSettings, value smithyjson.Value) error { 2325 object := value.Object() 2326 defer object.Close() 2327 2328 if len(v.AudioDescriptionBroadcasterMix) > 0 { 2329 ok := object.Key("audioDescriptionBroadcasterMix") 2330 ok.String(string(v.AudioDescriptionBroadcasterMix)) 2331 } 2332 2333 if v.Bitrate != 0 { 2334 ok := object.Key("bitrate") 2335 ok.Integer(v.Bitrate) 2336 } 2337 2338 if len(v.CodecProfile) > 0 { 2339 ok := object.Key("codecProfile") 2340 ok.String(string(v.CodecProfile)) 2341 } 2342 2343 if len(v.CodingMode) > 0 { 2344 ok := object.Key("codingMode") 2345 ok.String(string(v.CodingMode)) 2346 } 2347 2348 if len(v.RateControlMode) > 0 { 2349 ok := object.Key("rateControlMode") 2350 ok.String(string(v.RateControlMode)) 2351 } 2352 2353 if len(v.RawFormat) > 0 { 2354 ok := object.Key("rawFormat") 2355 ok.String(string(v.RawFormat)) 2356 } 2357 2358 if v.SampleRate != 0 { 2359 ok := object.Key("sampleRate") 2360 ok.Integer(v.SampleRate) 2361 } 2362 2363 if len(v.Specification) > 0 { 2364 ok := object.Key("specification") 2365 ok.String(string(v.Specification)) 2366 } 2367 2368 if len(v.VbrQuality) > 0 { 2369 ok := object.Key("vbrQuality") 2370 ok.String(string(v.VbrQuality)) 2371 } 2372 2373 return nil 2374} 2375 2376func awsRestjson1_serializeDocumentAc3Settings(v *types.Ac3Settings, value smithyjson.Value) error { 2377 object := value.Object() 2378 defer object.Close() 2379 2380 if v.Bitrate != 0 { 2381 ok := object.Key("bitrate") 2382 ok.Integer(v.Bitrate) 2383 } 2384 2385 if len(v.BitstreamMode) > 0 { 2386 ok := object.Key("bitstreamMode") 2387 ok.String(string(v.BitstreamMode)) 2388 } 2389 2390 if len(v.CodingMode) > 0 { 2391 ok := object.Key("codingMode") 2392 ok.String(string(v.CodingMode)) 2393 } 2394 2395 if v.Dialnorm != 0 { 2396 ok := object.Key("dialnorm") 2397 ok.Integer(v.Dialnorm) 2398 } 2399 2400 if len(v.DynamicRangeCompressionLine) > 0 { 2401 ok := object.Key("dynamicRangeCompressionLine") 2402 ok.String(string(v.DynamicRangeCompressionLine)) 2403 } 2404 2405 if len(v.DynamicRangeCompressionProfile) > 0 { 2406 ok := object.Key("dynamicRangeCompressionProfile") 2407 ok.String(string(v.DynamicRangeCompressionProfile)) 2408 } 2409 2410 if len(v.DynamicRangeCompressionRf) > 0 { 2411 ok := object.Key("dynamicRangeCompressionRf") 2412 ok.String(string(v.DynamicRangeCompressionRf)) 2413 } 2414 2415 if len(v.LfeFilter) > 0 { 2416 ok := object.Key("lfeFilter") 2417 ok.String(string(v.LfeFilter)) 2418 } 2419 2420 if len(v.MetadataControl) > 0 { 2421 ok := object.Key("metadataControl") 2422 ok.String(string(v.MetadataControl)) 2423 } 2424 2425 if v.SampleRate != 0 { 2426 ok := object.Key("sampleRate") 2427 ok.Integer(v.SampleRate) 2428 } 2429 2430 return nil 2431} 2432 2433func awsRestjson1_serializeDocumentAccelerationSettings(v *types.AccelerationSettings, value smithyjson.Value) error { 2434 object := value.Object() 2435 defer object.Close() 2436 2437 if len(v.Mode) > 0 { 2438 ok := object.Key("mode") 2439 ok.String(string(v.Mode)) 2440 } 2441 2442 return nil 2443} 2444 2445func awsRestjson1_serializeDocumentAiffSettings(v *types.AiffSettings, value smithyjson.Value) error { 2446 object := value.Object() 2447 defer object.Close() 2448 2449 if v.BitDepth != 0 { 2450 ok := object.Key("bitDepth") 2451 ok.Integer(v.BitDepth) 2452 } 2453 2454 if v.Channels != 0 { 2455 ok := object.Key("channels") 2456 ok.Integer(v.Channels) 2457 } 2458 2459 if v.SampleRate != 0 { 2460 ok := object.Key("sampleRate") 2461 ok.Integer(v.SampleRate) 2462 } 2463 2464 return nil 2465} 2466 2467func awsRestjson1_serializeDocumentAncillarySourceSettings(v *types.AncillarySourceSettings, value smithyjson.Value) error { 2468 object := value.Object() 2469 defer object.Close() 2470 2471 if len(v.Convert608To708) > 0 { 2472 ok := object.Key("convert608To708") 2473 ok.String(string(v.Convert608To708)) 2474 } 2475 2476 if v.SourceAncillaryChannelNumber != 0 { 2477 ok := object.Key("sourceAncillaryChannelNumber") 2478 ok.Integer(v.SourceAncillaryChannelNumber) 2479 } 2480 2481 if len(v.TerminateCaptions) > 0 { 2482 ok := object.Key("terminateCaptions") 2483 ok.String(string(v.TerminateCaptions)) 2484 } 2485 2486 return nil 2487} 2488 2489func awsRestjson1_serializeDocumentAudioChannelTaggingSettings(v *types.AudioChannelTaggingSettings, value smithyjson.Value) error { 2490 object := value.Object() 2491 defer object.Close() 2492 2493 if len(v.ChannelTag) > 0 { 2494 ok := object.Key("channelTag") 2495 ok.String(string(v.ChannelTag)) 2496 } 2497 2498 return nil 2499} 2500 2501func awsRestjson1_serializeDocumentAudioCodecSettings(v *types.AudioCodecSettings, value smithyjson.Value) error { 2502 object := value.Object() 2503 defer object.Close() 2504 2505 if v.AacSettings != nil { 2506 ok := object.Key("aacSettings") 2507 if err := awsRestjson1_serializeDocumentAacSettings(v.AacSettings, ok); err != nil { 2508 return err 2509 } 2510 } 2511 2512 if v.Ac3Settings != nil { 2513 ok := object.Key("ac3Settings") 2514 if err := awsRestjson1_serializeDocumentAc3Settings(v.Ac3Settings, ok); err != nil { 2515 return err 2516 } 2517 } 2518 2519 if v.AiffSettings != nil { 2520 ok := object.Key("aiffSettings") 2521 if err := awsRestjson1_serializeDocumentAiffSettings(v.AiffSettings, ok); err != nil { 2522 return err 2523 } 2524 } 2525 2526 if len(v.Codec) > 0 { 2527 ok := object.Key("codec") 2528 ok.String(string(v.Codec)) 2529 } 2530 2531 if v.Eac3AtmosSettings != nil { 2532 ok := object.Key("eac3AtmosSettings") 2533 if err := awsRestjson1_serializeDocumentEac3AtmosSettings(v.Eac3AtmosSettings, ok); err != nil { 2534 return err 2535 } 2536 } 2537 2538 if v.Eac3Settings != nil { 2539 ok := object.Key("eac3Settings") 2540 if err := awsRestjson1_serializeDocumentEac3Settings(v.Eac3Settings, ok); err != nil { 2541 return err 2542 } 2543 } 2544 2545 if v.Mp2Settings != nil { 2546 ok := object.Key("mp2Settings") 2547 if err := awsRestjson1_serializeDocumentMp2Settings(v.Mp2Settings, ok); err != nil { 2548 return err 2549 } 2550 } 2551 2552 if v.Mp3Settings != nil { 2553 ok := object.Key("mp3Settings") 2554 if err := awsRestjson1_serializeDocumentMp3Settings(v.Mp3Settings, ok); err != nil { 2555 return err 2556 } 2557 } 2558 2559 if v.OpusSettings != nil { 2560 ok := object.Key("opusSettings") 2561 if err := awsRestjson1_serializeDocumentOpusSettings(v.OpusSettings, ok); err != nil { 2562 return err 2563 } 2564 } 2565 2566 if v.VorbisSettings != nil { 2567 ok := object.Key("vorbisSettings") 2568 if err := awsRestjson1_serializeDocumentVorbisSettings(v.VorbisSettings, ok); err != nil { 2569 return err 2570 } 2571 } 2572 2573 if v.WavSettings != nil { 2574 ok := object.Key("wavSettings") 2575 if err := awsRestjson1_serializeDocumentWavSettings(v.WavSettings, ok); err != nil { 2576 return err 2577 } 2578 } 2579 2580 return nil 2581} 2582 2583func awsRestjson1_serializeDocumentAudioDescription(v *types.AudioDescription, value smithyjson.Value) error { 2584 object := value.Object() 2585 defer object.Close() 2586 2587 if v.AudioChannelTaggingSettings != nil { 2588 ok := object.Key("audioChannelTaggingSettings") 2589 if err := awsRestjson1_serializeDocumentAudioChannelTaggingSettings(v.AudioChannelTaggingSettings, ok); err != nil { 2590 return err 2591 } 2592 } 2593 2594 if v.AudioNormalizationSettings != nil { 2595 ok := object.Key("audioNormalizationSettings") 2596 if err := awsRestjson1_serializeDocumentAudioNormalizationSettings(v.AudioNormalizationSettings, ok); err != nil { 2597 return err 2598 } 2599 } 2600 2601 if v.AudioSourceName != nil { 2602 ok := object.Key("audioSourceName") 2603 ok.String(*v.AudioSourceName) 2604 } 2605 2606 if v.AudioType != 0 { 2607 ok := object.Key("audioType") 2608 ok.Integer(v.AudioType) 2609 } 2610 2611 if len(v.AudioTypeControl) > 0 { 2612 ok := object.Key("audioTypeControl") 2613 ok.String(string(v.AudioTypeControl)) 2614 } 2615 2616 if v.CodecSettings != nil { 2617 ok := object.Key("codecSettings") 2618 if err := awsRestjson1_serializeDocumentAudioCodecSettings(v.CodecSettings, ok); err != nil { 2619 return err 2620 } 2621 } 2622 2623 if v.CustomLanguageCode != nil { 2624 ok := object.Key("customLanguageCode") 2625 ok.String(*v.CustomLanguageCode) 2626 } 2627 2628 if len(v.LanguageCode) > 0 { 2629 ok := object.Key("languageCode") 2630 ok.String(string(v.LanguageCode)) 2631 } 2632 2633 if len(v.LanguageCodeControl) > 0 { 2634 ok := object.Key("languageCodeControl") 2635 ok.String(string(v.LanguageCodeControl)) 2636 } 2637 2638 if v.RemixSettings != nil { 2639 ok := object.Key("remixSettings") 2640 if err := awsRestjson1_serializeDocumentRemixSettings(v.RemixSettings, ok); err != nil { 2641 return err 2642 } 2643 } 2644 2645 if v.StreamName != nil { 2646 ok := object.Key("streamName") 2647 ok.String(*v.StreamName) 2648 } 2649 2650 return nil 2651} 2652 2653func awsRestjson1_serializeDocumentAudioNormalizationSettings(v *types.AudioNormalizationSettings, value smithyjson.Value) error { 2654 object := value.Object() 2655 defer object.Close() 2656 2657 if len(v.Algorithm) > 0 { 2658 ok := object.Key("algorithm") 2659 ok.String(string(v.Algorithm)) 2660 } 2661 2662 if len(v.AlgorithmControl) > 0 { 2663 ok := object.Key("algorithmControl") 2664 ok.String(string(v.AlgorithmControl)) 2665 } 2666 2667 if v.CorrectionGateLevel != 0 { 2668 ok := object.Key("correctionGateLevel") 2669 ok.Integer(v.CorrectionGateLevel) 2670 } 2671 2672 if len(v.LoudnessLogging) > 0 { 2673 ok := object.Key("loudnessLogging") 2674 ok.String(string(v.LoudnessLogging)) 2675 } 2676 2677 if len(v.PeakCalculation) > 0 { 2678 ok := object.Key("peakCalculation") 2679 ok.String(string(v.PeakCalculation)) 2680 } 2681 2682 if v.TargetLkfs != 0 { 2683 ok := object.Key("targetLkfs") 2684 ok.Double(v.TargetLkfs) 2685 } 2686 2687 return nil 2688} 2689 2690func awsRestjson1_serializeDocumentAudioSelector(v *types.AudioSelector, value smithyjson.Value) error { 2691 object := value.Object() 2692 defer object.Close() 2693 2694 if v.CustomLanguageCode != nil { 2695 ok := object.Key("customLanguageCode") 2696 ok.String(*v.CustomLanguageCode) 2697 } 2698 2699 if len(v.DefaultSelection) > 0 { 2700 ok := object.Key("defaultSelection") 2701 ok.String(string(v.DefaultSelection)) 2702 } 2703 2704 if v.ExternalAudioFileInput != nil { 2705 ok := object.Key("externalAudioFileInput") 2706 ok.String(*v.ExternalAudioFileInput) 2707 } 2708 2709 if len(v.LanguageCode) > 0 { 2710 ok := object.Key("languageCode") 2711 ok.String(string(v.LanguageCode)) 2712 } 2713 2714 if v.Offset != 0 { 2715 ok := object.Key("offset") 2716 ok.Integer(v.Offset) 2717 } 2718 2719 if v.Pids != nil { 2720 ok := object.Key("pids") 2721 if err := awsRestjson1_serializeDocument__listOf__integerMin1Max2147483647(v.Pids, ok); err != nil { 2722 return err 2723 } 2724 } 2725 2726 if v.ProgramSelection != 0 { 2727 ok := object.Key("programSelection") 2728 ok.Integer(v.ProgramSelection) 2729 } 2730 2731 if v.RemixSettings != nil { 2732 ok := object.Key("remixSettings") 2733 if err := awsRestjson1_serializeDocumentRemixSettings(v.RemixSettings, ok); err != nil { 2734 return err 2735 } 2736 } 2737 2738 if len(v.SelectorType) > 0 { 2739 ok := object.Key("selectorType") 2740 ok.String(string(v.SelectorType)) 2741 } 2742 2743 if v.Tracks != nil { 2744 ok := object.Key("tracks") 2745 if err := awsRestjson1_serializeDocument__listOf__integerMin1Max2147483647(v.Tracks, ok); err != nil { 2746 return err 2747 } 2748 } 2749 2750 return nil 2751} 2752 2753func awsRestjson1_serializeDocumentAudioSelectorGroup(v *types.AudioSelectorGroup, value smithyjson.Value) error { 2754 object := value.Object() 2755 defer object.Close() 2756 2757 if v.AudioSelectorNames != nil { 2758 ok := object.Key("audioSelectorNames") 2759 if err := awsRestjson1_serializeDocument__listOf__stringMin1(v.AudioSelectorNames, ok); err != nil { 2760 return err 2761 } 2762 } 2763 2764 return nil 2765} 2766 2767func awsRestjson1_serializeDocumentAutomatedAbrSettings(v *types.AutomatedAbrSettings, value smithyjson.Value) error { 2768 object := value.Object() 2769 defer object.Close() 2770 2771 if v.MaxAbrBitrate != 0 { 2772 ok := object.Key("maxAbrBitrate") 2773 ok.Integer(v.MaxAbrBitrate) 2774 } 2775 2776 if v.MaxRenditions != 0 { 2777 ok := object.Key("maxRenditions") 2778 ok.Integer(v.MaxRenditions) 2779 } 2780 2781 if v.MinAbrBitrate != 0 { 2782 ok := object.Key("minAbrBitrate") 2783 ok.Integer(v.MinAbrBitrate) 2784 } 2785 2786 return nil 2787} 2788 2789func awsRestjson1_serializeDocumentAutomatedEncodingSettings(v *types.AutomatedEncodingSettings, value smithyjson.Value) error { 2790 object := value.Object() 2791 defer object.Close() 2792 2793 if v.AbrSettings != nil { 2794 ok := object.Key("abrSettings") 2795 if err := awsRestjson1_serializeDocumentAutomatedAbrSettings(v.AbrSettings, ok); err != nil { 2796 return err 2797 } 2798 } 2799 2800 return nil 2801} 2802 2803func awsRestjson1_serializeDocumentAv1QvbrSettings(v *types.Av1QvbrSettings, value smithyjson.Value) error { 2804 object := value.Object() 2805 defer object.Close() 2806 2807 if v.QvbrQualityLevel != 0 { 2808 ok := object.Key("qvbrQualityLevel") 2809 ok.Integer(v.QvbrQualityLevel) 2810 } 2811 2812 if v.QvbrQualityLevelFineTune != 0 { 2813 ok := object.Key("qvbrQualityLevelFineTune") 2814 ok.Double(v.QvbrQualityLevelFineTune) 2815 } 2816 2817 return nil 2818} 2819 2820func awsRestjson1_serializeDocumentAv1Settings(v *types.Av1Settings, value smithyjson.Value) error { 2821 object := value.Object() 2822 defer object.Close() 2823 2824 if len(v.AdaptiveQuantization) > 0 { 2825 ok := object.Key("adaptiveQuantization") 2826 ok.String(string(v.AdaptiveQuantization)) 2827 } 2828 2829 if len(v.FramerateControl) > 0 { 2830 ok := object.Key("framerateControl") 2831 ok.String(string(v.FramerateControl)) 2832 } 2833 2834 if len(v.FramerateConversionAlgorithm) > 0 { 2835 ok := object.Key("framerateConversionAlgorithm") 2836 ok.String(string(v.FramerateConversionAlgorithm)) 2837 } 2838 2839 if v.FramerateDenominator != 0 { 2840 ok := object.Key("framerateDenominator") 2841 ok.Integer(v.FramerateDenominator) 2842 } 2843 2844 if v.FramerateNumerator != 0 { 2845 ok := object.Key("framerateNumerator") 2846 ok.Integer(v.FramerateNumerator) 2847 } 2848 2849 if v.GopSize != 0 { 2850 ok := object.Key("gopSize") 2851 ok.Double(v.GopSize) 2852 } 2853 2854 if v.MaxBitrate != 0 { 2855 ok := object.Key("maxBitrate") 2856 ok.Integer(v.MaxBitrate) 2857 } 2858 2859 if v.NumberBFramesBetweenReferenceFrames != 0 { 2860 ok := object.Key("numberBFramesBetweenReferenceFrames") 2861 ok.Integer(v.NumberBFramesBetweenReferenceFrames) 2862 } 2863 2864 if v.QvbrSettings != nil { 2865 ok := object.Key("qvbrSettings") 2866 if err := awsRestjson1_serializeDocumentAv1QvbrSettings(v.QvbrSettings, ok); err != nil { 2867 return err 2868 } 2869 } 2870 2871 if len(v.RateControlMode) > 0 { 2872 ok := object.Key("rateControlMode") 2873 ok.String(string(v.RateControlMode)) 2874 } 2875 2876 if v.Slices != 0 { 2877 ok := object.Key("slices") 2878 ok.Integer(v.Slices) 2879 } 2880 2881 if len(v.SpatialAdaptiveQuantization) > 0 { 2882 ok := object.Key("spatialAdaptiveQuantization") 2883 ok.String(string(v.SpatialAdaptiveQuantization)) 2884 } 2885 2886 return nil 2887} 2888 2889func awsRestjson1_serializeDocumentAvailBlanking(v *types.AvailBlanking, value smithyjson.Value) error { 2890 object := value.Object() 2891 defer object.Close() 2892 2893 if v.AvailBlankingImage != nil { 2894 ok := object.Key("availBlankingImage") 2895 ok.String(*v.AvailBlankingImage) 2896 } 2897 2898 return nil 2899} 2900 2901func awsRestjson1_serializeDocumentAvcIntraSettings(v *types.AvcIntraSettings, value smithyjson.Value) error { 2902 object := value.Object() 2903 defer object.Close() 2904 2905 if len(v.AvcIntraClass) > 0 { 2906 ok := object.Key("avcIntraClass") 2907 ok.String(string(v.AvcIntraClass)) 2908 } 2909 2910 if v.AvcIntraUhdSettings != nil { 2911 ok := object.Key("avcIntraUhdSettings") 2912 if err := awsRestjson1_serializeDocumentAvcIntraUhdSettings(v.AvcIntraUhdSettings, ok); err != nil { 2913 return err 2914 } 2915 } 2916 2917 if len(v.FramerateControl) > 0 { 2918 ok := object.Key("framerateControl") 2919 ok.String(string(v.FramerateControl)) 2920 } 2921 2922 if len(v.FramerateConversionAlgorithm) > 0 { 2923 ok := object.Key("framerateConversionAlgorithm") 2924 ok.String(string(v.FramerateConversionAlgorithm)) 2925 } 2926 2927 if v.FramerateDenominator != 0 { 2928 ok := object.Key("framerateDenominator") 2929 ok.Integer(v.FramerateDenominator) 2930 } 2931 2932 if v.FramerateNumerator != 0 { 2933 ok := object.Key("framerateNumerator") 2934 ok.Integer(v.FramerateNumerator) 2935 } 2936 2937 if len(v.InterlaceMode) > 0 { 2938 ok := object.Key("interlaceMode") 2939 ok.String(string(v.InterlaceMode)) 2940 } 2941 2942 if len(v.ScanTypeConversionMode) > 0 { 2943 ok := object.Key("scanTypeConversionMode") 2944 ok.String(string(v.ScanTypeConversionMode)) 2945 } 2946 2947 if len(v.SlowPal) > 0 { 2948 ok := object.Key("slowPal") 2949 ok.String(string(v.SlowPal)) 2950 } 2951 2952 if len(v.Telecine) > 0 { 2953 ok := object.Key("telecine") 2954 ok.String(string(v.Telecine)) 2955 } 2956 2957 return nil 2958} 2959 2960func awsRestjson1_serializeDocumentAvcIntraUhdSettings(v *types.AvcIntraUhdSettings, value smithyjson.Value) error { 2961 object := value.Object() 2962 defer object.Close() 2963 2964 if len(v.QualityTuningLevel) > 0 { 2965 ok := object.Key("qualityTuningLevel") 2966 ok.String(string(v.QualityTuningLevel)) 2967 } 2968 2969 return nil 2970} 2971 2972func awsRestjson1_serializeDocumentBurninDestinationSettings(v *types.BurninDestinationSettings, value smithyjson.Value) error { 2973 object := value.Object() 2974 defer object.Close() 2975 2976 if len(v.Alignment) > 0 { 2977 ok := object.Key("alignment") 2978 ok.String(string(v.Alignment)) 2979 } 2980 2981 if len(v.BackgroundColor) > 0 { 2982 ok := object.Key("backgroundColor") 2983 ok.String(string(v.BackgroundColor)) 2984 } 2985 2986 if v.BackgroundOpacity != 0 { 2987 ok := object.Key("backgroundOpacity") 2988 ok.Integer(v.BackgroundOpacity) 2989 } 2990 2991 if len(v.FontColor) > 0 { 2992 ok := object.Key("fontColor") 2993 ok.String(string(v.FontColor)) 2994 } 2995 2996 if v.FontOpacity != 0 { 2997 ok := object.Key("fontOpacity") 2998 ok.Integer(v.FontOpacity) 2999 } 3000 3001 if v.FontResolution != 0 { 3002 ok := object.Key("fontResolution") 3003 ok.Integer(v.FontResolution) 3004 } 3005 3006 if len(v.FontScript) > 0 { 3007 ok := object.Key("fontScript") 3008 ok.String(string(v.FontScript)) 3009 } 3010 3011 if v.FontSize != 0 { 3012 ok := object.Key("fontSize") 3013 ok.Integer(v.FontSize) 3014 } 3015 3016 if len(v.OutlineColor) > 0 { 3017 ok := object.Key("outlineColor") 3018 ok.String(string(v.OutlineColor)) 3019 } 3020 3021 if v.OutlineSize != 0 { 3022 ok := object.Key("outlineSize") 3023 ok.Integer(v.OutlineSize) 3024 } 3025 3026 if len(v.ShadowColor) > 0 { 3027 ok := object.Key("shadowColor") 3028 ok.String(string(v.ShadowColor)) 3029 } 3030 3031 if v.ShadowOpacity != 0 { 3032 ok := object.Key("shadowOpacity") 3033 ok.Integer(v.ShadowOpacity) 3034 } 3035 3036 if v.ShadowXOffset != 0 { 3037 ok := object.Key("shadowXOffset") 3038 ok.Integer(v.ShadowXOffset) 3039 } 3040 3041 if v.ShadowYOffset != 0 { 3042 ok := object.Key("shadowYOffset") 3043 ok.Integer(v.ShadowYOffset) 3044 } 3045 3046 if len(v.TeletextSpacing) > 0 { 3047 ok := object.Key("teletextSpacing") 3048 ok.String(string(v.TeletextSpacing)) 3049 } 3050 3051 if v.XPosition != 0 { 3052 ok := object.Key("xPosition") 3053 ok.Integer(v.XPosition) 3054 } 3055 3056 if v.YPosition != 0 { 3057 ok := object.Key("yPosition") 3058 ok.Integer(v.YPosition) 3059 } 3060 3061 return nil 3062} 3063 3064func awsRestjson1_serializeDocumentCaptionDescription(v *types.CaptionDescription, value smithyjson.Value) error { 3065 object := value.Object() 3066 defer object.Close() 3067 3068 if v.CaptionSelectorName != nil { 3069 ok := object.Key("captionSelectorName") 3070 ok.String(*v.CaptionSelectorName) 3071 } 3072 3073 if v.CustomLanguageCode != nil { 3074 ok := object.Key("customLanguageCode") 3075 ok.String(*v.CustomLanguageCode) 3076 } 3077 3078 if v.DestinationSettings != nil { 3079 ok := object.Key("destinationSettings") 3080 if err := awsRestjson1_serializeDocumentCaptionDestinationSettings(v.DestinationSettings, ok); err != nil { 3081 return err 3082 } 3083 } 3084 3085 if len(v.LanguageCode) > 0 { 3086 ok := object.Key("languageCode") 3087 ok.String(string(v.LanguageCode)) 3088 } 3089 3090 if v.LanguageDescription != nil { 3091 ok := object.Key("languageDescription") 3092 ok.String(*v.LanguageDescription) 3093 } 3094 3095 return nil 3096} 3097 3098func awsRestjson1_serializeDocumentCaptionDescriptionPreset(v *types.CaptionDescriptionPreset, value smithyjson.Value) error { 3099 object := value.Object() 3100 defer object.Close() 3101 3102 if v.CustomLanguageCode != nil { 3103 ok := object.Key("customLanguageCode") 3104 ok.String(*v.CustomLanguageCode) 3105 } 3106 3107 if v.DestinationSettings != nil { 3108 ok := object.Key("destinationSettings") 3109 if err := awsRestjson1_serializeDocumentCaptionDestinationSettings(v.DestinationSettings, ok); err != nil { 3110 return err 3111 } 3112 } 3113 3114 if len(v.LanguageCode) > 0 { 3115 ok := object.Key("languageCode") 3116 ok.String(string(v.LanguageCode)) 3117 } 3118 3119 if v.LanguageDescription != nil { 3120 ok := object.Key("languageDescription") 3121 ok.String(*v.LanguageDescription) 3122 } 3123 3124 return nil 3125} 3126 3127func awsRestjson1_serializeDocumentCaptionDestinationSettings(v *types.CaptionDestinationSettings, value smithyjson.Value) error { 3128 object := value.Object() 3129 defer object.Close() 3130 3131 if v.BurninDestinationSettings != nil { 3132 ok := object.Key("burninDestinationSettings") 3133 if err := awsRestjson1_serializeDocumentBurninDestinationSettings(v.BurninDestinationSettings, ok); err != nil { 3134 return err 3135 } 3136 } 3137 3138 if len(v.DestinationType) > 0 { 3139 ok := object.Key("destinationType") 3140 ok.String(string(v.DestinationType)) 3141 } 3142 3143 if v.DvbSubDestinationSettings != nil { 3144 ok := object.Key("dvbSubDestinationSettings") 3145 if err := awsRestjson1_serializeDocumentDvbSubDestinationSettings(v.DvbSubDestinationSettings, ok); err != nil { 3146 return err 3147 } 3148 } 3149 3150 if v.EmbeddedDestinationSettings != nil { 3151 ok := object.Key("embeddedDestinationSettings") 3152 if err := awsRestjson1_serializeDocumentEmbeddedDestinationSettings(v.EmbeddedDestinationSettings, ok); err != nil { 3153 return err 3154 } 3155 } 3156 3157 if v.ImscDestinationSettings != nil { 3158 ok := object.Key("imscDestinationSettings") 3159 if err := awsRestjson1_serializeDocumentImscDestinationSettings(v.ImscDestinationSettings, ok); err != nil { 3160 return err 3161 } 3162 } 3163 3164 if v.SccDestinationSettings != nil { 3165 ok := object.Key("sccDestinationSettings") 3166 if err := awsRestjson1_serializeDocumentSccDestinationSettings(v.SccDestinationSettings, ok); err != nil { 3167 return err 3168 } 3169 } 3170 3171 if v.TeletextDestinationSettings != nil { 3172 ok := object.Key("teletextDestinationSettings") 3173 if err := awsRestjson1_serializeDocumentTeletextDestinationSettings(v.TeletextDestinationSettings, ok); err != nil { 3174 return err 3175 } 3176 } 3177 3178 if v.TtmlDestinationSettings != nil { 3179 ok := object.Key("ttmlDestinationSettings") 3180 if err := awsRestjson1_serializeDocumentTtmlDestinationSettings(v.TtmlDestinationSettings, ok); err != nil { 3181 return err 3182 } 3183 } 3184 3185 if v.WebvttDestinationSettings != nil { 3186 ok := object.Key("webvttDestinationSettings") 3187 if err := awsRestjson1_serializeDocumentWebvttDestinationSettings(v.WebvttDestinationSettings, ok); err != nil { 3188 return err 3189 } 3190 } 3191 3192 return nil 3193} 3194 3195func awsRestjson1_serializeDocumentCaptionSelector(v *types.CaptionSelector, value smithyjson.Value) error { 3196 object := value.Object() 3197 defer object.Close() 3198 3199 if v.CustomLanguageCode != nil { 3200 ok := object.Key("customLanguageCode") 3201 ok.String(*v.CustomLanguageCode) 3202 } 3203 3204 if len(v.LanguageCode) > 0 { 3205 ok := object.Key("languageCode") 3206 ok.String(string(v.LanguageCode)) 3207 } 3208 3209 if v.SourceSettings != nil { 3210 ok := object.Key("sourceSettings") 3211 if err := awsRestjson1_serializeDocumentCaptionSourceSettings(v.SourceSettings, ok); err != nil { 3212 return err 3213 } 3214 } 3215 3216 return nil 3217} 3218 3219func awsRestjson1_serializeDocumentCaptionSourceFramerate(v *types.CaptionSourceFramerate, value smithyjson.Value) error { 3220 object := value.Object() 3221 defer object.Close() 3222 3223 if v.FramerateDenominator != 0 { 3224 ok := object.Key("framerateDenominator") 3225 ok.Integer(v.FramerateDenominator) 3226 } 3227 3228 if v.FramerateNumerator != 0 { 3229 ok := object.Key("framerateNumerator") 3230 ok.Integer(v.FramerateNumerator) 3231 } 3232 3233 return nil 3234} 3235 3236func awsRestjson1_serializeDocumentCaptionSourceSettings(v *types.CaptionSourceSettings, value smithyjson.Value) error { 3237 object := value.Object() 3238 defer object.Close() 3239 3240 if v.AncillarySourceSettings != nil { 3241 ok := object.Key("ancillarySourceSettings") 3242 if err := awsRestjson1_serializeDocumentAncillarySourceSettings(v.AncillarySourceSettings, ok); err != nil { 3243 return err 3244 } 3245 } 3246 3247 if v.DvbSubSourceSettings != nil { 3248 ok := object.Key("dvbSubSourceSettings") 3249 if err := awsRestjson1_serializeDocumentDvbSubSourceSettings(v.DvbSubSourceSettings, ok); err != nil { 3250 return err 3251 } 3252 } 3253 3254 if v.EmbeddedSourceSettings != nil { 3255 ok := object.Key("embeddedSourceSettings") 3256 if err := awsRestjson1_serializeDocumentEmbeddedSourceSettings(v.EmbeddedSourceSettings, ok); err != nil { 3257 return err 3258 } 3259 } 3260 3261 if v.FileSourceSettings != nil { 3262 ok := object.Key("fileSourceSettings") 3263 if err := awsRestjson1_serializeDocumentFileSourceSettings(v.FileSourceSettings, ok); err != nil { 3264 return err 3265 } 3266 } 3267 3268 if len(v.SourceType) > 0 { 3269 ok := object.Key("sourceType") 3270 ok.String(string(v.SourceType)) 3271 } 3272 3273 if v.TeletextSourceSettings != nil { 3274 ok := object.Key("teletextSourceSettings") 3275 if err := awsRestjson1_serializeDocumentTeletextSourceSettings(v.TeletextSourceSettings, ok); err != nil { 3276 return err 3277 } 3278 } 3279 3280 if v.TrackSourceSettings != nil { 3281 ok := object.Key("trackSourceSettings") 3282 if err := awsRestjson1_serializeDocumentTrackSourceSettings(v.TrackSourceSettings, ok); err != nil { 3283 return err 3284 } 3285 } 3286 3287 return nil 3288} 3289 3290func awsRestjson1_serializeDocumentChannelMapping(v *types.ChannelMapping, value smithyjson.Value) error { 3291 object := value.Object() 3292 defer object.Close() 3293 3294 if v.OutputChannels != nil { 3295 ok := object.Key("outputChannels") 3296 if err := awsRestjson1_serializeDocument__listOfOutputChannelMapping(v.OutputChannels, ok); err != nil { 3297 return err 3298 } 3299 } 3300 3301 return nil 3302} 3303 3304func awsRestjson1_serializeDocumentCmafAdditionalManifest(v *types.CmafAdditionalManifest, value smithyjson.Value) error { 3305 object := value.Object() 3306 defer object.Close() 3307 3308 if v.ManifestNameModifier != nil { 3309 ok := object.Key("manifestNameModifier") 3310 ok.String(*v.ManifestNameModifier) 3311 } 3312 3313 if v.SelectedOutputs != nil { 3314 ok := object.Key("selectedOutputs") 3315 if err := awsRestjson1_serializeDocument__listOf__stringMin1(v.SelectedOutputs, ok); err != nil { 3316 return err 3317 } 3318 } 3319 3320 return nil 3321} 3322 3323func awsRestjson1_serializeDocumentCmafEncryptionSettings(v *types.CmafEncryptionSettings, value smithyjson.Value) error { 3324 object := value.Object() 3325 defer object.Close() 3326 3327 if v.ConstantInitializationVector != nil { 3328 ok := object.Key("constantInitializationVector") 3329 ok.String(*v.ConstantInitializationVector) 3330 } 3331 3332 if len(v.EncryptionMethod) > 0 { 3333 ok := object.Key("encryptionMethod") 3334 ok.String(string(v.EncryptionMethod)) 3335 } 3336 3337 if len(v.InitializationVectorInManifest) > 0 { 3338 ok := object.Key("initializationVectorInManifest") 3339 ok.String(string(v.InitializationVectorInManifest)) 3340 } 3341 3342 if v.SpekeKeyProvider != nil { 3343 ok := object.Key("spekeKeyProvider") 3344 if err := awsRestjson1_serializeDocumentSpekeKeyProviderCmaf(v.SpekeKeyProvider, ok); err != nil { 3345 return err 3346 } 3347 } 3348 3349 if v.StaticKeyProvider != nil { 3350 ok := object.Key("staticKeyProvider") 3351 if err := awsRestjson1_serializeDocumentStaticKeyProvider(v.StaticKeyProvider, ok); err != nil { 3352 return err 3353 } 3354 } 3355 3356 if len(v.Type) > 0 { 3357 ok := object.Key("type") 3358 ok.String(string(v.Type)) 3359 } 3360 3361 return nil 3362} 3363 3364func awsRestjson1_serializeDocumentCmafGroupSettings(v *types.CmafGroupSettings, value smithyjson.Value) error { 3365 object := value.Object() 3366 defer object.Close() 3367 3368 if v.AdditionalManifests != nil { 3369 ok := object.Key("additionalManifests") 3370 if err := awsRestjson1_serializeDocument__listOfCmafAdditionalManifest(v.AdditionalManifests, ok); err != nil { 3371 return err 3372 } 3373 } 3374 3375 if v.BaseUrl != nil { 3376 ok := object.Key("baseUrl") 3377 ok.String(*v.BaseUrl) 3378 } 3379 3380 if len(v.ClientCache) > 0 { 3381 ok := object.Key("clientCache") 3382 ok.String(string(v.ClientCache)) 3383 } 3384 3385 if len(v.CodecSpecification) > 0 { 3386 ok := object.Key("codecSpecification") 3387 ok.String(string(v.CodecSpecification)) 3388 } 3389 3390 if v.Destination != nil { 3391 ok := object.Key("destination") 3392 ok.String(*v.Destination) 3393 } 3394 3395 if v.DestinationSettings != nil { 3396 ok := object.Key("destinationSettings") 3397 if err := awsRestjson1_serializeDocumentDestinationSettings(v.DestinationSettings, ok); err != nil { 3398 return err 3399 } 3400 } 3401 3402 if v.Encryption != nil { 3403 ok := object.Key("encryption") 3404 if err := awsRestjson1_serializeDocumentCmafEncryptionSettings(v.Encryption, ok); err != nil { 3405 return err 3406 } 3407 } 3408 3409 if v.FragmentLength != 0 { 3410 ok := object.Key("fragmentLength") 3411 ok.Integer(v.FragmentLength) 3412 } 3413 3414 if len(v.ManifestCompression) > 0 { 3415 ok := object.Key("manifestCompression") 3416 ok.String(string(v.ManifestCompression)) 3417 } 3418 3419 if len(v.ManifestDurationFormat) > 0 { 3420 ok := object.Key("manifestDurationFormat") 3421 ok.String(string(v.ManifestDurationFormat)) 3422 } 3423 3424 if v.MinBufferTime != 0 { 3425 ok := object.Key("minBufferTime") 3426 ok.Integer(v.MinBufferTime) 3427 } 3428 3429 if v.MinFinalSegmentLength != 0 { 3430 ok := object.Key("minFinalSegmentLength") 3431 ok.Double(v.MinFinalSegmentLength) 3432 } 3433 3434 if len(v.MpdProfile) > 0 { 3435 ok := object.Key("mpdProfile") 3436 ok.String(string(v.MpdProfile)) 3437 } 3438 3439 if len(v.PtsOffsetHandlingForBFrames) > 0 { 3440 ok := object.Key("ptsOffsetHandlingForBFrames") 3441 ok.String(string(v.PtsOffsetHandlingForBFrames)) 3442 } 3443 3444 if len(v.SegmentControl) > 0 { 3445 ok := object.Key("segmentControl") 3446 ok.String(string(v.SegmentControl)) 3447 } 3448 3449 if v.SegmentLength != 0 { 3450 ok := object.Key("segmentLength") 3451 ok.Integer(v.SegmentLength) 3452 } 3453 3454 if len(v.StreamInfResolution) > 0 { 3455 ok := object.Key("streamInfResolution") 3456 ok.String(string(v.StreamInfResolution)) 3457 } 3458 3459 if len(v.WriteDashManifest) > 0 { 3460 ok := object.Key("writeDashManifest") 3461 ok.String(string(v.WriteDashManifest)) 3462 } 3463 3464 if len(v.WriteHlsManifest) > 0 { 3465 ok := object.Key("writeHlsManifest") 3466 ok.String(string(v.WriteHlsManifest)) 3467 } 3468 3469 if len(v.WriteSegmentTimelineInRepresentation) > 0 { 3470 ok := object.Key("writeSegmentTimelineInRepresentation") 3471 ok.String(string(v.WriteSegmentTimelineInRepresentation)) 3472 } 3473 3474 return nil 3475} 3476 3477func awsRestjson1_serializeDocumentCmfcSettings(v *types.CmfcSettings, value smithyjson.Value) error { 3478 object := value.Object() 3479 defer object.Close() 3480 3481 if len(v.AudioDuration) > 0 { 3482 ok := object.Key("audioDuration") 3483 ok.String(string(v.AudioDuration)) 3484 } 3485 3486 if v.AudioGroupId != nil { 3487 ok := object.Key("audioGroupId") 3488 ok.String(*v.AudioGroupId) 3489 } 3490 3491 if v.AudioRenditionSets != nil { 3492 ok := object.Key("audioRenditionSets") 3493 ok.String(*v.AudioRenditionSets) 3494 } 3495 3496 if len(v.AudioTrackType) > 0 { 3497 ok := object.Key("audioTrackType") 3498 ok.String(string(v.AudioTrackType)) 3499 } 3500 3501 if len(v.DescriptiveVideoServiceFlag) > 0 { 3502 ok := object.Key("descriptiveVideoServiceFlag") 3503 ok.String(string(v.DescriptiveVideoServiceFlag)) 3504 } 3505 3506 if len(v.IFrameOnlyManifest) > 0 { 3507 ok := object.Key("iFrameOnlyManifest") 3508 ok.String(string(v.IFrameOnlyManifest)) 3509 } 3510 3511 if len(v.Scte35Esam) > 0 { 3512 ok := object.Key("scte35Esam") 3513 ok.String(string(v.Scte35Esam)) 3514 } 3515 3516 if len(v.Scte35Source) > 0 { 3517 ok := object.Key("scte35Source") 3518 ok.String(string(v.Scte35Source)) 3519 } 3520 3521 return nil 3522} 3523 3524func awsRestjson1_serializeDocumentColorCorrector(v *types.ColorCorrector, value smithyjson.Value) error { 3525 object := value.Object() 3526 defer object.Close() 3527 3528 if v.Brightness != 0 { 3529 ok := object.Key("brightness") 3530 ok.Integer(v.Brightness) 3531 } 3532 3533 if len(v.ColorSpaceConversion) > 0 { 3534 ok := object.Key("colorSpaceConversion") 3535 ok.String(string(v.ColorSpaceConversion)) 3536 } 3537 3538 if v.Contrast != 0 { 3539 ok := object.Key("contrast") 3540 ok.Integer(v.Contrast) 3541 } 3542 3543 if v.Hdr10Metadata != nil { 3544 ok := object.Key("hdr10Metadata") 3545 if err := awsRestjson1_serializeDocumentHdr10Metadata(v.Hdr10Metadata, ok); err != nil { 3546 return err 3547 } 3548 } 3549 3550 if v.Hue != 0 { 3551 ok := object.Key("hue") 3552 ok.Integer(v.Hue) 3553 } 3554 3555 if v.Saturation != 0 { 3556 ok := object.Key("saturation") 3557 ok.Integer(v.Saturation) 3558 } 3559 3560 return nil 3561} 3562 3563func awsRestjson1_serializeDocumentContainerSettings(v *types.ContainerSettings, value smithyjson.Value) error { 3564 object := value.Object() 3565 defer object.Close() 3566 3567 if v.CmfcSettings != nil { 3568 ok := object.Key("cmfcSettings") 3569 if err := awsRestjson1_serializeDocumentCmfcSettings(v.CmfcSettings, ok); err != nil { 3570 return err 3571 } 3572 } 3573 3574 if len(v.Container) > 0 { 3575 ok := object.Key("container") 3576 ok.String(string(v.Container)) 3577 } 3578 3579 if v.F4vSettings != nil { 3580 ok := object.Key("f4vSettings") 3581 if err := awsRestjson1_serializeDocumentF4vSettings(v.F4vSettings, ok); err != nil { 3582 return err 3583 } 3584 } 3585 3586 if v.M2tsSettings != nil { 3587 ok := object.Key("m2tsSettings") 3588 if err := awsRestjson1_serializeDocumentM2tsSettings(v.M2tsSettings, ok); err != nil { 3589 return err 3590 } 3591 } 3592 3593 if v.M3u8Settings != nil { 3594 ok := object.Key("m3u8Settings") 3595 if err := awsRestjson1_serializeDocumentM3u8Settings(v.M3u8Settings, ok); err != nil { 3596 return err 3597 } 3598 } 3599 3600 if v.MovSettings != nil { 3601 ok := object.Key("movSettings") 3602 if err := awsRestjson1_serializeDocumentMovSettings(v.MovSettings, ok); err != nil { 3603 return err 3604 } 3605 } 3606 3607 if v.Mp4Settings != nil { 3608 ok := object.Key("mp4Settings") 3609 if err := awsRestjson1_serializeDocumentMp4Settings(v.Mp4Settings, ok); err != nil { 3610 return err 3611 } 3612 } 3613 3614 if v.MpdSettings != nil { 3615 ok := object.Key("mpdSettings") 3616 if err := awsRestjson1_serializeDocumentMpdSettings(v.MpdSettings, ok); err != nil { 3617 return err 3618 } 3619 } 3620 3621 if v.MxfSettings != nil { 3622 ok := object.Key("mxfSettings") 3623 if err := awsRestjson1_serializeDocumentMxfSettings(v.MxfSettings, ok); err != nil { 3624 return err 3625 } 3626 } 3627 3628 return nil 3629} 3630 3631func awsRestjson1_serializeDocumentDashAdditionalManifest(v *types.DashAdditionalManifest, value smithyjson.Value) error { 3632 object := value.Object() 3633 defer object.Close() 3634 3635 if v.ManifestNameModifier != nil { 3636 ok := object.Key("manifestNameModifier") 3637 ok.String(*v.ManifestNameModifier) 3638 } 3639 3640 if v.SelectedOutputs != nil { 3641 ok := object.Key("selectedOutputs") 3642 if err := awsRestjson1_serializeDocument__listOf__stringMin1(v.SelectedOutputs, ok); err != nil { 3643 return err 3644 } 3645 } 3646 3647 return nil 3648} 3649 3650func awsRestjson1_serializeDocumentDashIsoEncryptionSettings(v *types.DashIsoEncryptionSettings, value smithyjson.Value) error { 3651 object := value.Object() 3652 defer object.Close() 3653 3654 if len(v.PlaybackDeviceCompatibility) > 0 { 3655 ok := object.Key("playbackDeviceCompatibility") 3656 ok.String(string(v.PlaybackDeviceCompatibility)) 3657 } 3658 3659 if v.SpekeKeyProvider != nil { 3660 ok := object.Key("spekeKeyProvider") 3661 if err := awsRestjson1_serializeDocumentSpekeKeyProvider(v.SpekeKeyProvider, ok); err != nil { 3662 return err 3663 } 3664 } 3665 3666 return nil 3667} 3668 3669func awsRestjson1_serializeDocumentDashIsoGroupSettings(v *types.DashIsoGroupSettings, value smithyjson.Value) error { 3670 object := value.Object() 3671 defer object.Close() 3672 3673 if v.AdditionalManifests != nil { 3674 ok := object.Key("additionalManifests") 3675 if err := awsRestjson1_serializeDocument__listOfDashAdditionalManifest(v.AdditionalManifests, ok); err != nil { 3676 return err 3677 } 3678 } 3679 3680 if len(v.AudioChannelConfigSchemeIdUri) > 0 { 3681 ok := object.Key("audioChannelConfigSchemeIdUri") 3682 ok.String(string(v.AudioChannelConfigSchemeIdUri)) 3683 } 3684 3685 if v.BaseUrl != nil { 3686 ok := object.Key("baseUrl") 3687 ok.String(*v.BaseUrl) 3688 } 3689 3690 if v.Destination != nil { 3691 ok := object.Key("destination") 3692 ok.String(*v.Destination) 3693 } 3694 3695 if v.DestinationSettings != nil { 3696 ok := object.Key("destinationSettings") 3697 if err := awsRestjson1_serializeDocumentDestinationSettings(v.DestinationSettings, ok); err != nil { 3698 return err 3699 } 3700 } 3701 3702 if v.Encryption != nil { 3703 ok := object.Key("encryption") 3704 if err := awsRestjson1_serializeDocumentDashIsoEncryptionSettings(v.Encryption, ok); err != nil { 3705 return err 3706 } 3707 } 3708 3709 if v.FragmentLength != 0 { 3710 ok := object.Key("fragmentLength") 3711 ok.Integer(v.FragmentLength) 3712 } 3713 3714 if len(v.HbbtvCompliance) > 0 { 3715 ok := object.Key("hbbtvCompliance") 3716 ok.String(string(v.HbbtvCompliance)) 3717 } 3718 3719 if v.MinBufferTime != 0 { 3720 ok := object.Key("minBufferTime") 3721 ok.Integer(v.MinBufferTime) 3722 } 3723 3724 if v.MinFinalSegmentLength != 0 { 3725 ok := object.Key("minFinalSegmentLength") 3726 ok.Double(v.MinFinalSegmentLength) 3727 } 3728 3729 if len(v.MpdProfile) > 0 { 3730 ok := object.Key("mpdProfile") 3731 ok.String(string(v.MpdProfile)) 3732 } 3733 3734 if len(v.PtsOffsetHandlingForBFrames) > 0 { 3735 ok := object.Key("ptsOffsetHandlingForBFrames") 3736 ok.String(string(v.PtsOffsetHandlingForBFrames)) 3737 } 3738 3739 if len(v.SegmentControl) > 0 { 3740 ok := object.Key("segmentControl") 3741 ok.String(string(v.SegmentControl)) 3742 } 3743 3744 if v.SegmentLength != 0 { 3745 ok := object.Key("segmentLength") 3746 ok.Integer(v.SegmentLength) 3747 } 3748 3749 if len(v.WriteSegmentTimelineInRepresentation) > 0 { 3750 ok := object.Key("writeSegmentTimelineInRepresentation") 3751 ok.String(string(v.WriteSegmentTimelineInRepresentation)) 3752 } 3753 3754 return nil 3755} 3756 3757func awsRestjson1_serializeDocumentDeinterlacer(v *types.Deinterlacer, value smithyjson.Value) error { 3758 object := value.Object() 3759 defer object.Close() 3760 3761 if len(v.Algorithm) > 0 { 3762 ok := object.Key("algorithm") 3763 ok.String(string(v.Algorithm)) 3764 } 3765 3766 if len(v.Control) > 0 { 3767 ok := object.Key("control") 3768 ok.String(string(v.Control)) 3769 } 3770 3771 if len(v.Mode) > 0 { 3772 ok := object.Key("mode") 3773 ok.String(string(v.Mode)) 3774 } 3775 3776 return nil 3777} 3778 3779func awsRestjson1_serializeDocumentDestinationSettings(v *types.DestinationSettings, value smithyjson.Value) error { 3780 object := value.Object() 3781 defer object.Close() 3782 3783 if v.S3Settings != nil { 3784 ok := object.Key("s3Settings") 3785 if err := awsRestjson1_serializeDocumentS3DestinationSettings(v.S3Settings, ok); err != nil { 3786 return err 3787 } 3788 } 3789 3790 return nil 3791} 3792 3793func awsRestjson1_serializeDocumentDolbyVision(v *types.DolbyVision, value smithyjson.Value) error { 3794 object := value.Object() 3795 defer object.Close() 3796 3797 if v.L6Metadata != nil { 3798 ok := object.Key("l6Metadata") 3799 if err := awsRestjson1_serializeDocumentDolbyVisionLevel6Metadata(v.L6Metadata, ok); err != nil { 3800 return err 3801 } 3802 } 3803 3804 if len(v.L6Mode) > 0 { 3805 ok := object.Key("l6Mode") 3806 ok.String(string(v.L6Mode)) 3807 } 3808 3809 if len(v.Profile) > 0 { 3810 ok := object.Key("profile") 3811 ok.String(string(v.Profile)) 3812 } 3813 3814 return nil 3815} 3816 3817func awsRestjson1_serializeDocumentDolbyVisionLevel6Metadata(v *types.DolbyVisionLevel6Metadata, value smithyjson.Value) error { 3818 object := value.Object() 3819 defer object.Close() 3820 3821 if v.MaxCll != 0 { 3822 ok := object.Key("maxCll") 3823 ok.Integer(v.MaxCll) 3824 } 3825 3826 if v.MaxFall != 0 { 3827 ok := object.Key("maxFall") 3828 ok.Integer(v.MaxFall) 3829 } 3830 3831 return nil 3832} 3833 3834func awsRestjson1_serializeDocumentDvbNitSettings(v *types.DvbNitSettings, value smithyjson.Value) error { 3835 object := value.Object() 3836 defer object.Close() 3837 3838 if v.NetworkId != 0 { 3839 ok := object.Key("networkId") 3840 ok.Integer(v.NetworkId) 3841 } 3842 3843 if v.NetworkName != nil { 3844 ok := object.Key("networkName") 3845 ok.String(*v.NetworkName) 3846 } 3847 3848 if v.NitInterval != 0 { 3849 ok := object.Key("nitInterval") 3850 ok.Integer(v.NitInterval) 3851 } 3852 3853 return nil 3854} 3855 3856func awsRestjson1_serializeDocumentDvbSdtSettings(v *types.DvbSdtSettings, value smithyjson.Value) error { 3857 object := value.Object() 3858 defer object.Close() 3859 3860 if len(v.OutputSdt) > 0 { 3861 ok := object.Key("outputSdt") 3862 ok.String(string(v.OutputSdt)) 3863 } 3864 3865 if v.SdtInterval != 0 { 3866 ok := object.Key("sdtInterval") 3867 ok.Integer(v.SdtInterval) 3868 } 3869 3870 if v.ServiceName != nil { 3871 ok := object.Key("serviceName") 3872 ok.String(*v.ServiceName) 3873 } 3874 3875 if v.ServiceProviderName != nil { 3876 ok := object.Key("serviceProviderName") 3877 ok.String(*v.ServiceProviderName) 3878 } 3879 3880 return nil 3881} 3882 3883func awsRestjson1_serializeDocumentDvbSubDestinationSettings(v *types.DvbSubDestinationSettings, value smithyjson.Value) error { 3884 object := value.Object() 3885 defer object.Close() 3886 3887 if len(v.Alignment) > 0 { 3888 ok := object.Key("alignment") 3889 ok.String(string(v.Alignment)) 3890 } 3891 3892 if len(v.BackgroundColor) > 0 { 3893 ok := object.Key("backgroundColor") 3894 ok.String(string(v.BackgroundColor)) 3895 } 3896 3897 if v.BackgroundOpacity != 0 { 3898 ok := object.Key("backgroundOpacity") 3899 ok.Integer(v.BackgroundOpacity) 3900 } 3901 3902 if len(v.FontColor) > 0 { 3903 ok := object.Key("fontColor") 3904 ok.String(string(v.FontColor)) 3905 } 3906 3907 if v.FontOpacity != 0 { 3908 ok := object.Key("fontOpacity") 3909 ok.Integer(v.FontOpacity) 3910 } 3911 3912 if v.FontResolution != 0 { 3913 ok := object.Key("fontResolution") 3914 ok.Integer(v.FontResolution) 3915 } 3916 3917 if len(v.FontScript) > 0 { 3918 ok := object.Key("fontScript") 3919 ok.String(string(v.FontScript)) 3920 } 3921 3922 if v.FontSize != 0 { 3923 ok := object.Key("fontSize") 3924 ok.Integer(v.FontSize) 3925 } 3926 3927 if len(v.OutlineColor) > 0 { 3928 ok := object.Key("outlineColor") 3929 ok.String(string(v.OutlineColor)) 3930 } 3931 3932 if v.OutlineSize != 0 { 3933 ok := object.Key("outlineSize") 3934 ok.Integer(v.OutlineSize) 3935 } 3936 3937 if len(v.ShadowColor) > 0 { 3938 ok := object.Key("shadowColor") 3939 ok.String(string(v.ShadowColor)) 3940 } 3941 3942 if v.ShadowOpacity != 0 { 3943 ok := object.Key("shadowOpacity") 3944 ok.Integer(v.ShadowOpacity) 3945 } 3946 3947 if v.ShadowXOffset != 0 { 3948 ok := object.Key("shadowXOffset") 3949 ok.Integer(v.ShadowXOffset) 3950 } 3951 3952 if v.ShadowYOffset != 0 { 3953 ok := object.Key("shadowYOffset") 3954 ok.Integer(v.ShadowYOffset) 3955 } 3956 3957 if len(v.SubtitlingType) > 0 { 3958 ok := object.Key("subtitlingType") 3959 ok.String(string(v.SubtitlingType)) 3960 } 3961 3962 if len(v.TeletextSpacing) > 0 { 3963 ok := object.Key("teletextSpacing") 3964 ok.String(string(v.TeletextSpacing)) 3965 } 3966 3967 if v.XPosition != 0 { 3968 ok := object.Key("xPosition") 3969 ok.Integer(v.XPosition) 3970 } 3971 3972 if v.YPosition != 0 { 3973 ok := object.Key("yPosition") 3974 ok.Integer(v.YPosition) 3975 } 3976 3977 return nil 3978} 3979 3980func awsRestjson1_serializeDocumentDvbSubSourceSettings(v *types.DvbSubSourceSettings, value smithyjson.Value) error { 3981 object := value.Object() 3982 defer object.Close() 3983 3984 if v.Pid != 0 { 3985 ok := object.Key("pid") 3986 ok.Integer(v.Pid) 3987 } 3988 3989 return nil 3990} 3991 3992func awsRestjson1_serializeDocumentDvbTdtSettings(v *types.DvbTdtSettings, value smithyjson.Value) error { 3993 object := value.Object() 3994 defer object.Close() 3995 3996 if v.TdtInterval != 0 { 3997 ok := object.Key("tdtInterval") 3998 ok.Integer(v.TdtInterval) 3999 } 4000 4001 return nil 4002} 4003 4004func awsRestjson1_serializeDocumentEac3AtmosSettings(v *types.Eac3AtmosSettings, value smithyjson.Value) error { 4005 object := value.Object() 4006 defer object.Close() 4007 4008 if v.Bitrate != 0 { 4009 ok := object.Key("bitrate") 4010 ok.Integer(v.Bitrate) 4011 } 4012 4013 if len(v.BitstreamMode) > 0 { 4014 ok := object.Key("bitstreamMode") 4015 ok.String(string(v.BitstreamMode)) 4016 } 4017 4018 if len(v.CodingMode) > 0 { 4019 ok := object.Key("codingMode") 4020 ok.String(string(v.CodingMode)) 4021 } 4022 4023 if len(v.DialogueIntelligence) > 0 { 4024 ok := object.Key("dialogueIntelligence") 4025 ok.String(string(v.DialogueIntelligence)) 4026 } 4027 4028 if len(v.DynamicRangeCompressionLine) > 0 { 4029 ok := object.Key("dynamicRangeCompressionLine") 4030 ok.String(string(v.DynamicRangeCompressionLine)) 4031 } 4032 4033 if len(v.DynamicRangeCompressionRf) > 0 { 4034 ok := object.Key("dynamicRangeCompressionRf") 4035 ok.String(string(v.DynamicRangeCompressionRf)) 4036 } 4037 4038 if v.LoRoCenterMixLevel != 0 { 4039 ok := object.Key("loRoCenterMixLevel") 4040 ok.Double(v.LoRoCenterMixLevel) 4041 } 4042 4043 if v.LoRoSurroundMixLevel != 0 { 4044 ok := object.Key("loRoSurroundMixLevel") 4045 ok.Double(v.LoRoSurroundMixLevel) 4046 } 4047 4048 if v.LtRtCenterMixLevel != 0 { 4049 ok := object.Key("ltRtCenterMixLevel") 4050 ok.Double(v.LtRtCenterMixLevel) 4051 } 4052 4053 if v.LtRtSurroundMixLevel != 0 { 4054 ok := object.Key("ltRtSurroundMixLevel") 4055 ok.Double(v.LtRtSurroundMixLevel) 4056 } 4057 4058 if len(v.MeteringMode) > 0 { 4059 ok := object.Key("meteringMode") 4060 ok.String(string(v.MeteringMode)) 4061 } 4062 4063 if v.SampleRate != 0 { 4064 ok := object.Key("sampleRate") 4065 ok.Integer(v.SampleRate) 4066 } 4067 4068 if v.SpeechThreshold != 0 { 4069 ok := object.Key("speechThreshold") 4070 ok.Integer(v.SpeechThreshold) 4071 } 4072 4073 if len(v.StereoDownmix) > 0 { 4074 ok := object.Key("stereoDownmix") 4075 ok.String(string(v.StereoDownmix)) 4076 } 4077 4078 if len(v.SurroundExMode) > 0 { 4079 ok := object.Key("surroundExMode") 4080 ok.String(string(v.SurroundExMode)) 4081 } 4082 4083 return nil 4084} 4085 4086func awsRestjson1_serializeDocumentEac3Settings(v *types.Eac3Settings, value smithyjson.Value) error { 4087 object := value.Object() 4088 defer object.Close() 4089 4090 if len(v.AttenuationControl) > 0 { 4091 ok := object.Key("attenuationControl") 4092 ok.String(string(v.AttenuationControl)) 4093 } 4094 4095 if v.Bitrate != 0 { 4096 ok := object.Key("bitrate") 4097 ok.Integer(v.Bitrate) 4098 } 4099 4100 if len(v.BitstreamMode) > 0 { 4101 ok := object.Key("bitstreamMode") 4102 ok.String(string(v.BitstreamMode)) 4103 } 4104 4105 if len(v.CodingMode) > 0 { 4106 ok := object.Key("codingMode") 4107 ok.String(string(v.CodingMode)) 4108 } 4109 4110 if len(v.DcFilter) > 0 { 4111 ok := object.Key("dcFilter") 4112 ok.String(string(v.DcFilter)) 4113 } 4114 4115 if v.Dialnorm != 0 { 4116 ok := object.Key("dialnorm") 4117 ok.Integer(v.Dialnorm) 4118 } 4119 4120 if len(v.DynamicRangeCompressionLine) > 0 { 4121 ok := object.Key("dynamicRangeCompressionLine") 4122 ok.String(string(v.DynamicRangeCompressionLine)) 4123 } 4124 4125 if len(v.DynamicRangeCompressionRf) > 0 { 4126 ok := object.Key("dynamicRangeCompressionRf") 4127 ok.String(string(v.DynamicRangeCompressionRf)) 4128 } 4129 4130 if len(v.LfeControl) > 0 { 4131 ok := object.Key("lfeControl") 4132 ok.String(string(v.LfeControl)) 4133 } 4134 4135 if len(v.LfeFilter) > 0 { 4136 ok := object.Key("lfeFilter") 4137 ok.String(string(v.LfeFilter)) 4138 } 4139 4140 if v.LoRoCenterMixLevel != 0 { 4141 ok := object.Key("loRoCenterMixLevel") 4142 ok.Double(v.LoRoCenterMixLevel) 4143 } 4144 4145 if v.LoRoSurroundMixLevel != 0 { 4146 ok := object.Key("loRoSurroundMixLevel") 4147 ok.Double(v.LoRoSurroundMixLevel) 4148 } 4149 4150 if v.LtRtCenterMixLevel != 0 { 4151 ok := object.Key("ltRtCenterMixLevel") 4152 ok.Double(v.LtRtCenterMixLevel) 4153 } 4154 4155 if v.LtRtSurroundMixLevel != 0 { 4156 ok := object.Key("ltRtSurroundMixLevel") 4157 ok.Double(v.LtRtSurroundMixLevel) 4158 } 4159 4160 if len(v.MetadataControl) > 0 { 4161 ok := object.Key("metadataControl") 4162 ok.String(string(v.MetadataControl)) 4163 } 4164 4165 if len(v.PassthroughControl) > 0 { 4166 ok := object.Key("passthroughControl") 4167 ok.String(string(v.PassthroughControl)) 4168 } 4169 4170 if len(v.PhaseControl) > 0 { 4171 ok := object.Key("phaseControl") 4172 ok.String(string(v.PhaseControl)) 4173 } 4174 4175 if v.SampleRate != 0 { 4176 ok := object.Key("sampleRate") 4177 ok.Integer(v.SampleRate) 4178 } 4179 4180 if len(v.StereoDownmix) > 0 { 4181 ok := object.Key("stereoDownmix") 4182 ok.String(string(v.StereoDownmix)) 4183 } 4184 4185 if len(v.SurroundExMode) > 0 { 4186 ok := object.Key("surroundExMode") 4187 ok.String(string(v.SurroundExMode)) 4188 } 4189 4190 if len(v.SurroundMode) > 0 { 4191 ok := object.Key("surroundMode") 4192 ok.String(string(v.SurroundMode)) 4193 } 4194 4195 return nil 4196} 4197 4198func awsRestjson1_serializeDocumentEmbeddedDestinationSettings(v *types.EmbeddedDestinationSettings, value smithyjson.Value) error { 4199 object := value.Object() 4200 defer object.Close() 4201 4202 if v.Destination608ChannelNumber != 0 { 4203 ok := object.Key("destination608ChannelNumber") 4204 ok.Integer(v.Destination608ChannelNumber) 4205 } 4206 4207 if v.Destination708ServiceNumber != 0 { 4208 ok := object.Key("destination708ServiceNumber") 4209 ok.Integer(v.Destination708ServiceNumber) 4210 } 4211 4212 return nil 4213} 4214 4215func awsRestjson1_serializeDocumentEmbeddedSourceSettings(v *types.EmbeddedSourceSettings, value smithyjson.Value) error { 4216 object := value.Object() 4217 defer object.Close() 4218 4219 if len(v.Convert608To708) > 0 { 4220 ok := object.Key("convert608To708") 4221 ok.String(string(v.Convert608To708)) 4222 } 4223 4224 if v.Source608ChannelNumber != 0 { 4225 ok := object.Key("source608ChannelNumber") 4226 ok.Integer(v.Source608ChannelNumber) 4227 } 4228 4229 if v.Source608TrackNumber != 0 { 4230 ok := object.Key("source608TrackNumber") 4231 ok.Integer(v.Source608TrackNumber) 4232 } 4233 4234 if len(v.TerminateCaptions) > 0 { 4235 ok := object.Key("terminateCaptions") 4236 ok.String(string(v.TerminateCaptions)) 4237 } 4238 4239 return nil 4240} 4241 4242func awsRestjson1_serializeDocumentEsamManifestConfirmConditionNotification(v *types.EsamManifestConfirmConditionNotification, value smithyjson.Value) error { 4243 object := value.Object() 4244 defer object.Close() 4245 4246 if v.MccXml != nil { 4247 ok := object.Key("mccXml") 4248 ok.String(*v.MccXml) 4249 } 4250 4251 return nil 4252} 4253 4254func awsRestjson1_serializeDocumentEsamSettings(v *types.EsamSettings, value smithyjson.Value) error { 4255 object := value.Object() 4256 defer object.Close() 4257 4258 if v.ManifestConfirmConditionNotification != nil { 4259 ok := object.Key("manifestConfirmConditionNotification") 4260 if err := awsRestjson1_serializeDocumentEsamManifestConfirmConditionNotification(v.ManifestConfirmConditionNotification, ok); err != nil { 4261 return err 4262 } 4263 } 4264 4265 if v.ResponseSignalPreroll != 0 { 4266 ok := object.Key("responseSignalPreroll") 4267 ok.Integer(v.ResponseSignalPreroll) 4268 } 4269 4270 if v.SignalProcessingNotification != nil { 4271 ok := object.Key("signalProcessingNotification") 4272 if err := awsRestjson1_serializeDocumentEsamSignalProcessingNotification(v.SignalProcessingNotification, ok); err != nil { 4273 return err 4274 } 4275 } 4276 4277 return nil 4278} 4279 4280func awsRestjson1_serializeDocumentEsamSignalProcessingNotification(v *types.EsamSignalProcessingNotification, value smithyjson.Value) error { 4281 object := value.Object() 4282 defer object.Close() 4283 4284 if v.SccXml != nil { 4285 ok := object.Key("sccXml") 4286 ok.String(*v.SccXml) 4287 } 4288 4289 return nil 4290} 4291 4292func awsRestjson1_serializeDocumentF4vSettings(v *types.F4vSettings, value smithyjson.Value) error { 4293 object := value.Object() 4294 defer object.Close() 4295 4296 if len(v.MoovPlacement) > 0 { 4297 ok := object.Key("moovPlacement") 4298 ok.String(string(v.MoovPlacement)) 4299 } 4300 4301 return nil 4302} 4303 4304func awsRestjson1_serializeDocumentFileGroupSettings(v *types.FileGroupSettings, value smithyjson.Value) error { 4305 object := value.Object() 4306 defer object.Close() 4307 4308 if v.Destination != nil { 4309 ok := object.Key("destination") 4310 ok.String(*v.Destination) 4311 } 4312 4313 if v.DestinationSettings != nil { 4314 ok := object.Key("destinationSettings") 4315 if err := awsRestjson1_serializeDocumentDestinationSettings(v.DestinationSettings, ok); err != nil { 4316 return err 4317 } 4318 } 4319 4320 return nil 4321} 4322 4323func awsRestjson1_serializeDocumentFileSourceSettings(v *types.FileSourceSettings, value smithyjson.Value) error { 4324 object := value.Object() 4325 defer object.Close() 4326 4327 if len(v.Convert608To708) > 0 { 4328 ok := object.Key("convert608To708") 4329 ok.String(string(v.Convert608To708)) 4330 } 4331 4332 if v.Framerate != nil { 4333 ok := object.Key("framerate") 4334 if err := awsRestjson1_serializeDocumentCaptionSourceFramerate(v.Framerate, ok); err != nil { 4335 return err 4336 } 4337 } 4338 4339 if v.SourceFile != nil { 4340 ok := object.Key("sourceFile") 4341 ok.String(*v.SourceFile) 4342 } 4343 4344 if v.TimeDelta != 0 { 4345 ok := object.Key("timeDelta") 4346 ok.Integer(v.TimeDelta) 4347 } 4348 4349 return nil 4350} 4351 4352func awsRestjson1_serializeDocumentFrameCaptureSettings(v *types.FrameCaptureSettings, value smithyjson.Value) error { 4353 object := value.Object() 4354 defer object.Close() 4355 4356 if v.FramerateDenominator != 0 { 4357 ok := object.Key("framerateDenominator") 4358 ok.Integer(v.FramerateDenominator) 4359 } 4360 4361 if v.FramerateNumerator != 0 { 4362 ok := object.Key("framerateNumerator") 4363 ok.Integer(v.FramerateNumerator) 4364 } 4365 4366 if v.MaxCaptures != 0 { 4367 ok := object.Key("maxCaptures") 4368 ok.Integer(v.MaxCaptures) 4369 } 4370 4371 if v.Quality != 0 { 4372 ok := object.Key("quality") 4373 ok.Integer(v.Quality) 4374 } 4375 4376 return nil 4377} 4378 4379func awsRestjson1_serializeDocumentH264QvbrSettings(v *types.H264QvbrSettings, value smithyjson.Value) error { 4380 object := value.Object() 4381 defer object.Close() 4382 4383 if v.MaxAverageBitrate != 0 { 4384 ok := object.Key("maxAverageBitrate") 4385 ok.Integer(v.MaxAverageBitrate) 4386 } 4387 4388 if v.QvbrQualityLevel != 0 { 4389 ok := object.Key("qvbrQualityLevel") 4390 ok.Integer(v.QvbrQualityLevel) 4391 } 4392 4393 if v.QvbrQualityLevelFineTune != 0 { 4394 ok := object.Key("qvbrQualityLevelFineTune") 4395 ok.Double(v.QvbrQualityLevelFineTune) 4396 } 4397 4398 return nil 4399} 4400 4401func awsRestjson1_serializeDocumentH264Settings(v *types.H264Settings, value smithyjson.Value) error { 4402 object := value.Object() 4403 defer object.Close() 4404 4405 if len(v.AdaptiveQuantization) > 0 { 4406 ok := object.Key("adaptiveQuantization") 4407 ok.String(string(v.AdaptiveQuantization)) 4408 } 4409 4410 if v.Bitrate != 0 { 4411 ok := object.Key("bitrate") 4412 ok.Integer(v.Bitrate) 4413 } 4414 4415 if len(v.CodecLevel) > 0 { 4416 ok := object.Key("codecLevel") 4417 ok.String(string(v.CodecLevel)) 4418 } 4419 4420 if len(v.CodecProfile) > 0 { 4421 ok := object.Key("codecProfile") 4422 ok.String(string(v.CodecProfile)) 4423 } 4424 4425 if len(v.DynamicSubGop) > 0 { 4426 ok := object.Key("dynamicSubGop") 4427 ok.String(string(v.DynamicSubGop)) 4428 } 4429 4430 if len(v.EntropyEncoding) > 0 { 4431 ok := object.Key("entropyEncoding") 4432 ok.String(string(v.EntropyEncoding)) 4433 } 4434 4435 if len(v.FieldEncoding) > 0 { 4436 ok := object.Key("fieldEncoding") 4437 ok.String(string(v.FieldEncoding)) 4438 } 4439 4440 if len(v.FlickerAdaptiveQuantization) > 0 { 4441 ok := object.Key("flickerAdaptiveQuantization") 4442 ok.String(string(v.FlickerAdaptiveQuantization)) 4443 } 4444 4445 if len(v.FramerateControl) > 0 { 4446 ok := object.Key("framerateControl") 4447 ok.String(string(v.FramerateControl)) 4448 } 4449 4450 if len(v.FramerateConversionAlgorithm) > 0 { 4451 ok := object.Key("framerateConversionAlgorithm") 4452 ok.String(string(v.FramerateConversionAlgorithm)) 4453 } 4454 4455 if v.FramerateDenominator != 0 { 4456 ok := object.Key("framerateDenominator") 4457 ok.Integer(v.FramerateDenominator) 4458 } 4459 4460 if v.FramerateNumerator != 0 { 4461 ok := object.Key("framerateNumerator") 4462 ok.Integer(v.FramerateNumerator) 4463 } 4464 4465 if len(v.GopBReference) > 0 { 4466 ok := object.Key("gopBReference") 4467 ok.String(string(v.GopBReference)) 4468 } 4469 4470 if v.GopClosedCadence != 0 { 4471 ok := object.Key("gopClosedCadence") 4472 ok.Integer(v.GopClosedCadence) 4473 } 4474 4475 if v.GopSize != 0 { 4476 ok := object.Key("gopSize") 4477 ok.Double(v.GopSize) 4478 } 4479 4480 if len(v.GopSizeUnits) > 0 { 4481 ok := object.Key("gopSizeUnits") 4482 ok.String(string(v.GopSizeUnits)) 4483 } 4484 4485 if v.HrdBufferInitialFillPercentage != 0 { 4486 ok := object.Key("hrdBufferInitialFillPercentage") 4487 ok.Integer(v.HrdBufferInitialFillPercentage) 4488 } 4489 4490 if v.HrdBufferSize != 0 { 4491 ok := object.Key("hrdBufferSize") 4492 ok.Integer(v.HrdBufferSize) 4493 } 4494 4495 if len(v.InterlaceMode) > 0 { 4496 ok := object.Key("interlaceMode") 4497 ok.String(string(v.InterlaceMode)) 4498 } 4499 4500 if v.MaxBitrate != 0 { 4501 ok := object.Key("maxBitrate") 4502 ok.Integer(v.MaxBitrate) 4503 } 4504 4505 if v.MinIInterval != 0 { 4506 ok := object.Key("minIInterval") 4507 ok.Integer(v.MinIInterval) 4508 } 4509 4510 if v.NumberBFramesBetweenReferenceFrames != 0 { 4511 ok := object.Key("numberBFramesBetweenReferenceFrames") 4512 ok.Integer(v.NumberBFramesBetweenReferenceFrames) 4513 } 4514 4515 if v.NumberReferenceFrames != 0 { 4516 ok := object.Key("numberReferenceFrames") 4517 ok.Integer(v.NumberReferenceFrames) 4518 } 4519 4520 if len(v.ParControl) > 0 { 4521 ok := object.Key("parControl") 4522 ok.String(string(v.ParControl)) 4523 } 4524 4525 if v.ParDenominator != 0 { 4526 ok := object.Key("parDenominator") 4527 ok.Integer(v.ParDenominator) 4528 } 4529 4530 if v.ParNumerator != 0 { 4531 ok := object.Key("parNumerator") 4532 ok.Integer(v.ParNumerator) 4533 } 4534 4535 if len(v.QualityTuningLevel) > 0 { 4536 ok := object.Key("qualityTuningLevel") 4537 ok.String(string(v.QualityTuningLevel)) 4538 } 4539 4540 if v.QvbrSettings != nil { 4541 ok := object.Key("qvbrSettings") 4542 if err := awsRestjson1_serializeDocumentH264QvbrSettings(v.QvbrSettings, ok); err != nil { 4543 return err 4544 } 4545 } 4546 4547 if len(v.RateControlMode) > 0 { 4548 ok := object.Key("rateControlMode") 4549 ok.String(string(v.RateControlMode)) 4550 } 4551 4552 if len(v.RepeatPps) > 0 { 4553 ok := object.Key("repeatPps") 4554 ok.String(string(v.RepeatPps)) 4555 } 4556 4557 if len(v.ScanTypeConversionMode) > 0 { 4558 ok := object.Key("scanTypeConversionMode") 4559 ok.String(string(v.ScanTypeConversionMode)) 4560 } 4561 4562 if len(v.SceneChangeDetect) > 0 { 4563 ok := object.Key("sceneChangeDetect") 4564 ok.String(string(v.SceneChangeDetect)) 4565 } 4566 4567 if v.Slices != 0 { 4568 ok := object.Key("slices") 4569 ok.Integer(v.Slices) 4570 } 4571 4572 if len(v.SlowPal) > 0 { 4573 ok := object.Key("slowPal") 4574 ok.String(string(v.SlowPal)) 4575 } 4576 4577 if v.Softness != 0 { 4578 ok := object.Key("softness") 4579 ok.Integer(v.Softness) 4580 } 4581 4582 if len(v.SpatialAdaptiveQuantization) > 0 { 4583 ok := object.Key("spatialAdaptiveQuantization") 4584 ok.String(string(v.SpatialAdaptiveQuantization)) 4585 } 4586 4587 if len(v.Syntax) > 0 { 4588 ok := object.Key("syntax") 4589 ok.String(string(v.Syntax)) 4590 } 4591 4592 if len(v.Telecine) > 0 { 4593 ok := object.Key("telecine") 4594 ok.String(string(v.Telecine)) 4595 } 4596 4597 if len(v.TemporalAdaptiveQuantization) > 0 { 4598 ok := object.Key("temporalAdaptiveQuantization") 4599 ok.String(string(v.TemporalAdaptiveQuantization)) 4600 } 4601 4602 if len(v.UnregisteredSeiTimecode) > 0 { 4603 ok := object.Key("unregisteredSeiTimecode") 4604 ok.String(string(v.UnregisteredSeiTimecode)) 4605 } 4606 4607 return nil 4608} 4609 4610func awsRestjson1_serializeDocumentH265QvbrSettings(v *types.H265QvbrSettings, value smithyjson.Value) error { 4611 object := value.Object() 4612 defer object.Close() 4613 4614 if v.MaxAverageBitrate != 0 { 4615 ok := object.Key("maxAverageBitrate") 4616 ok.Integer(v.MaxAverageBitrate) 4617 } 4618 4619 if v.QvbrQualityLevel != 0 { 4620 ok := object.Key("qvbrQualityLevel") 4621 ok.Integer(v.QvbrQualityLevel) 4622 } 4623 4624 if v.QvbrQualityLevelFineTune != 0 { 4625 ok := object.Key("qvbrQualityLevelFineTune") 4626 ok.Double(v.QvbrQualityLevelFineTune) 4627 } 4628 4629 return nil 4630} 4631 4632func awsRestjson1_serializeDocumentH265Settings(v *types.H265Settings, value smithyjson.Value) error { 4633 object := value.Object() 4634 defer object.Close() 4635 4636 if len(v.AdaptiveQuantization) > 0 { 4637 ok := object.Key("adaptiveQuantization") 4638 ok.String(string(v.AdaptiveQuantization)) 4639 } 4640 4641 if len(v.AlternateTransferFunctionSei) > 0 { 4642 ok := object.Key("alternateTransferFunctionSei") 4643 ok.String(string(v.AlternateTransferFunctionSei)) 4644 } 4645 4646 if v.Bitrate != 0 { 4647 ok := object.Key("bitrate") 4648 ok.Integer(v.Bitrate) 4649 } 4650 4651 if len(v.CodecLevel) > 0 { 4652 ok := object.Key("codecLevel") 4653 ok.String(string(v.CodecLevel)) 4654 } 4655 4656 if len(v.CodecProfile) > 0 { 4657 ok := object.Key("codecProfile") 4658 ok.String(string(v.CodecProfile)) 4659 } 4660 4661 if len(v.DynamicSubGop) > 0 { 4662 ok := object.Key("dynamicSubGop") 4663 ok.String(string(v.DynamicSubGop)) 4664 } 4665 4666 if len(v.FlickerAdaptiveQuantization) > 0 { 4667 ok := object.Key("flickerAdaptiveQuantization") 4668 ok.String(string(v.FlickerAdaptiveQuantization)) 4669 } 4670 4671 if len(v.FramerateControl) > 0 { 4672 ok := object.Key("framerateControl") 4673 ok.String(string(v.FramerateControl)) 4674 } 4675 4676 if len(v.FramerateConversionAlgorithm) > 0 { 4677 ok := object.Key("framerateConversionAlgorithm") 4678 ok.String(string(v.FramerateConversionAlgorithm)) 4679 } 4680 4681 if v.FramerateDenominator != 0 { 4682 ok := object.Key("framerateDenominator") 4683 ok.Integer(v.FramerateDenominator) 4684 } 4685 4686 if v.FramerateNumerator != 0 { 4687 ok := object.Key("framerateNumerator") 4688 ok.Integer(v.FramerateNumerator) 4689 } 4690 4691 if len(v.GopBReference) > 0 { 4692 ok := object.Key("gopBReference") 4693 ok.String(string(v.GopBReference)) 4694 } 4695 4696 if v.GopClosedCadence != 0 { 4697 ok := object.Key("gopClosedCadence") 4698 ok.Integer(v.GopClosedCadence) 4699 } 4700 4701 if v.GopSize != 0 { 4702 ok := object.Key("gopSize") 4703 ok.Double(v.GopSize) 4704 } 4705 4706 if len(v.GopSizeUnits) > 0 { 4707 ok := object.Key("gopSizeUnits") 4708 ok.String(string(v.GopSizeUnits)) 4709 } 4710 4711 if v.HrdBufferInitialFillPercentage != 0 { 4712 ok := object.Key("hrdBufferInitialFillPercentage") 4713 ok.Integer(v.HrdBufferInitialFillPercentage) 4714 } 4715 4716 if v.HrdBufferSize != 0 { 4717 ok := object.Key("hrdBufferSize") 4718 ok.Integer(v.HrdBufferSize) 4719 } 4720 4721 if len(v.InterlaceMode) > 0 { 4722 ok := object.Key("interlaceMode") 4723 ok.String(string(v.InterlaceMode)) 4724 } 4725 4726 if v.MaxBitrate != 0 { 4727 ok := object.Key("maxBitrate") 4728 ok.Integer(v.MaxBitrate) 4729 } 4730 4731 if v.MinIInterval != 0 { 4732 ok := object.Key("minIInterval") 4733 ok.Integer(v.MinIInterval) 4734 } 4735 4736 if v.NumberBFramesBetweenReferenceFrames != 0 { 4737 ok := object.Key("numberBFramesBetweenReferenceFrames") 4738 ok.Integer(v.NumberBFramesBetweenReferenceFrames) 4739 } 4740 4741 if v.NumberReferenceFrames != 0 { 4742 ok := object.Key("numberReferenceFrames") 4743 ok.Integer(v.NumberReferenceFrames) 4744 } 4745 4746 if len(v.ParControl) > 0 { 4747 ok := object.Key("parControl") 4748 ok.String(string(v.ParControl)) 4749 } 4750 4751 if v.ParDenominator != 0 { 4752 ok := object.Key("parDenominator") 4753 ok.Integer(v.ParDenominator) 4754 } 4755 4756 if v.ParNumerator != 0 { 4757 ok := object.Key("parNumerator") 4758 ok.Integer(v.ParNumerator) 4759 } 4760 4761 if len(v.QualityTuningLevel) > 0 { 4762 ok := object.Key("qualityTuningLevel") 4763 ok.String(string(v.QualityTuningLevel)) 4764 } 4765 4766 if v.QvbrSettings != nil { 4767 ok := object.Key("qvbrSettings") 4768 if err := awsRestjson1_serializeDocumentH265QvbrSettings(v.QvbrSettings, ok); err != nil { 4769 return err 4770 } 4771 } 4772 4773 if len(v.RateControlMode) > 0 { 4774 ok := object.Key("rateControlMode") 4775 ok.String(string(v.RateControlMode)) 4776 } 4777 4778 if len(v.SampleAdaptiveOffsetFilterMode) > 0 { 4779 ok := object.Key("sampleAdaptiveOffsetFilterMode") 4780 ok.String(string(v.SampleAdaptiveOffsetFilterMode)) 4781 } 4782 4783 if len(v.ScanTypeConversionMode) > 0 { 4784 ok := object.Key("scanTypeConversionMode") 4785 ok.String(string(v.ScanTypeConversionMode)) 4786 } 4787 4788 if len(v.SceneChangeDetect) > 0 { 4789 ok := object.Key("sceneChangeDetect") 4790 ok.String(string(v.SceneChangeDetect)) 4791 } 4792 4793 if v.Slices != 0 { 4794 ok := object.Key("slices") 4795 ok.Integer(v.Slices) 4796 } 4797 4798 if len(v.SlowPal) > 0 { 4799 ok := object.Key("slowPal") 4800 ok.String(string(v.SlowPal)) 4801 } 4802 4803 if len(v.SpatialAdaptiveQuantization) > 0 { 4804 ok := object.Key("spatialAdaptiveQuantization") 4805 ok.String(string(v.SpatialAdaptiveQuantization)) 4806 } 4807 4808 if len(v.Telecine) > 0 { 4809 ok := object.Key("telecine") 4810 ok.String(string(v.Telecine)) 4811 } 4812 4813 if len(v.TemporalAdaptiveQuantization) > 0 { 4814 ok := object.Key("temporalAdaptiveQuantization") 4815 ok.String(string(v.TemporalAdaptiveQuantization)) 4816 } 4817 4818 if len(v.TemporalIds) > 0 { 4819 ok := object.Key("temporalIds") 4820 ok.String(string(v.TemporalIds)) 4821 } 4822 4823 if len(v.Tiles) > 0 { 4824 ok := object.Key("tiles") 4825 ok.String(string(v.Tiles)) 4826 } 4827 4828 if len(v.UnregisteredSeiTimecode) > 0 { 4829 ok := object.Key("unregisteredSeiTimecode") 4830 ok.String(string(v.UnregisteredSeiTimecode)) 4831 } 4832 4833 if len(v.WriteMp4PackagingType) > 0 { 4834 ok := object.Key("writeMp4PackagingType") 4835 ok.String(string(v.WriteMp4PackagingType)) 4836 } 4837 4838 return nil 4839} 4840 4841func awsRestjson1_serializeDocumentHdr10Metadata(v *types.Hdr10Metadata, value smithyjson.Value) error { 4842 object := value.Object() 4843 defer object.Close() 4844 4845 if v.BluePrimaryX != 0 { 4846 ok := object.Key("bluePrimaryX") 4847 ok.Integer(v.BluePrimaryX) 4848 } 4849 4850 if v.BluePrimaryY != 0 { 4851 ok := object.Key("bluePrimaryY") 4852 ok.Integer(v.BluePrimaryY) 4853 } 4854 4855 if v.GreenPrimaryX != 0 { 4856 ok := object.Key("greenPrimaryX") 4857 ok.Integer(v.GreenPrimaryX) 4858 } 4859 4860 if v.GreenPrimaryY != 0 { 4861 ok := object.Key("greenPrimaryY") 4862 ok.Integer(v.GreenPrimaryY) 4863 } 4864 4865 if v.MaxContentLightLevel != 0 { 4866 ok := object.Key("maxContentLightLevel") 4867 ok.Integer(v.MaxContentLightLevel) 4868 } 4869 4870 if v.MaxFrameAverageLightLevel != 0 { 4871 ok := object.Key("maxFrameAverageLightLevel") 4872 ok.Integer(v.MaxFrameAverageLightLevel) 4873 } 4874 4875 if v.MaxLuminance != 0 { 4876 ok := object.Key("maxLuminance") 4877 ok.Integer(v.MaxLuminance) 4878 } 4879 4880 if v.MinLuminance != 0 { 4881 ok := object.Key("minLuminance") 4882 ok.Integer(v.MinLuminance) 4883 } 4884 4885 if v.RedPrimaryX != 0 { 4886 ok := object.Key("redPrimaryX") 4887 ok.Integer(v.RedPrimaryX) 4888 } 4889 4890 if v.RedPrimaryY != 0 { 4891 ok := object.Key("redPrimaryY") 4892 ok.Integer(v.RedPrimaryY) 4893 } 4894 4895 if v.WhitePointX != 0 { 4896 ok := object.Key("whitePointX") 4897 ok.Integer(v.WhitePointX) 4898 } 4899 4900 if v.WhitePointY != 0 { 4901 ok := object.Key("whitePointY") 4902 ok.Integer(v.WhitePointY) 4903 } 4904 4905 return nil 4906} 4907 4908func awsRestjson1_serializeDocumentHlsAdditionalManifest(v *types.HlsAdditionalManifest, value smithyjson.Value) error { 4909 object := value.Object() 4910 defer object.Close() 4911 4912 if v.ManifestNameModifier != nil { 4913 ok := object.Key("manifestNameModifier") 4914 ok.String(*v.ManifestNameModifier) 4915 } 4916 4917 if v.SelectedOutputs != nil { 4918 ok := object.Key("selectedOutputs") 4919 if err := awsRestjson1_serializeDocument__listOf__stringMin1(v.SelectedOutputs, ok); err != nil { 4920 return err 4921 } 4922 } 4923 4924 return nil 4925} 4926 4927func awsRestjson1_serializeDocumentHlsCaptionLanguageMapping(v *types.HlsCaptionLanguageMapping, value smithyjson.Value) error { 4928 object := value.Object() 4929 defer object.Close() 4930 4931 if v.CaptionChannel != 0 { 4932 ok := object.Key("captionChannel") 4933 ok.Integer(v.CaptionChannel) 4934 } 4935 4936 if v.CustomLanguageCode != nil { 4937 ok := object.Key("customLanguageCode") 4938 ok.String(*v.CustomLanguageCode) 4939 } 4940 4941 if len(v.LanguageCode) > 0 { 4942 ok := object.Key("languageCode") 4943 ok.String(string(v.LanguageCode)) 4944 } 4945 4946 if v.LanguageDescription != nil { 4947 ok := object.Key("languageDescription") 4948 ok.String(*v.LanguageDescription) 4949 } 4950 4951 return nil 4952} 4953 4954func awsRestjson1_serializeDocumentHlsEncryptionSettings(v *types.HlsEncryptionSettings, value smithyjson.Value) error { 4955 object := value.Object() 4956 defer object.Close() 4957 4958 if v.ConstantInitializationVector != nil { 4959 ok := object.Key("constantInitializationVector") 4960 ok.String(*v.ConstantInitializationVector) 4961 } 4962 4963 if len(v.EncryptionMethod) > 0 { 4964 ok := object.Key("encryptionMethod") 4965 ok.String(string(v.EncryptionMethod)) 4966 } 4967 4968 if len(v.InitializationVectorInManifest) > 0 { 4969 ok := object.Key("initializationVectorInManifest") 4970 ok.String(string(v.InitializationVectorInManifest)) 4971 } 4972 4973 if len(v.OfflineEncrypted) > 0 { 4974 ok := object.Key("offlineEncrypted") 4975 ok.String(string(v.OfflineEncrypted)) 4976 } 4977 4978 if v.SpekeKeyProvider != nil { 4979 ok := object.Key("spekeKeyProvider") 4980 if err := awsRestjson1_serializeDocumentSpekeKeyProvider(v.SpekeKeyProvider, ok); err != nil { 4981 return err 4982 } 4983 } 4984 4985 if v.StaticKeyProvider != nil { 4986 ok := object.Key("staticKeyProvider") 4987 if err := awsRestjson1_serializeDocumentStaticKeyProvider(v.StaticKeyProvider, ok); err != nil { 4988 return err 4989 } 4990 } 4991 4992 if len(v.Type) > 0 { 4993 ok := object.Key("type") 4994 ok.String(string(v.Type)) 4995 } 4996 4997 return nil 4998} 4999 5000func awsRestjson1_serializeDocumentHlsGroupSettings(v *types.HlsGroupSettings, value smithyjson.Value) error { 5001 object := value.Object() 5002 defer object.Close() 5003 5004 if v.AdditionalManifests != nil { 5005 ok := object.Key("additionalManifests") 5006 if err := awsRestjson1_serializeDocument__listOfHlsAdditionalManifest(v.AdditionalManifests, ok); err != nil { 5007 return err 5008 } 5009 } 5010 5011 if v.AdMarkers != nil { 5012 ok := object.Key("adMarkers") 5013 if err := awsRestjson1_serializeDocument__listOfHlsAdMarkers(v.AdMarkers, ok); err != nil { 5014 return err 5015 } 5016 } 5017 5018 if len(v.AudioOnlyHeader) > 0 { 5019 ok := object.Key("audioOnlyHeader") 5020 ok.String(string(v.AudioOnlyHeader)) 5021 } 5022 5023 if v.BaseUrl != nil { 5024 ok := object.Key("baseUrl") 5025 ok.String(*v.BaseUrl) 5026 } 5027 5028 if v.CaptionLanguageMappings != nil { 5029 ok := object.Key("captionLanguageMappings") 5030 if err := awsRestjson1_serializeDocument__listOfHlsCaptionLanguageMapping(v.CaptionLanguageMappings, ok); err != nil { 5031 return err 5032 } 5033 } 5034 5035 if len(v.CaptionLanguageSetting) > 0 { 5036 ok := object.Key("captionLanguageSetting") 5037 ok.String(string(v.CaptionLanguageSetting)) 5038 } 5039 5040 if len(v.ClientCache) > 0 { 5041 ok := object.Key("clientCache") 5042 ok.String(string(v.ClientCache)) 5043 } 5044 5045 if len(v.CodecSpecification) > 0 { 5046 ok := object.Key("codecSpecification") 5047 ok.String(string(v.CodecSpecification)) 5048 } 5049 5050 if v.Destination != nil { 5051 ok := object.Key("destination") 5052 ok.String(*v.Destination) 5053 } 5054 5055 if v.DestinationSettings != nil { 5056 ok := object.Key("destinationSettings") 5057 if err := awsRestjson1_serializeDocumentDestinationSettings(v.DestinationSettings, ok); err != nil { 5058 return err 5059 } 5060 } 5061 5062 if len(v.DirectoryStructure) > 0 { 5063 ok := object.Key("directoryStructure") 5064 ok.String(string(v.DirectoryStructure)) 5065 } 5066 5067 if v.Encryption != nil { 5068 ok := object.Key("encryption") 5069 if err := awsRestjson1_serializeDocumentHlsEncryptionSettings(v.Encryption, ok); err != nil { 5070 return err 5071 } 5072 } 5073 5074 if len(v.ManifestCompression) > 0 { 5075 ok := object.Key("manifestCompression") 5076 ok.String(string(v.ManifestCompression)) 5077 } 5078 5079 if len(v.ManifestDurationFormat) > 0 { 5080 ok := object.Key("manifestDurationFormat") 5081 ok.String(string(v.ManifestDurationFormat)) 5082 } 5083 5084 if v.MinFinalSegmentLength != 0 { 5085 ok := object.Key("minFinalSegmentLength") 5086 ok.Double(v.MinFinalSegmentLength) 5087 } 5088 5089 if v.MinSegmentLength != 0 { 5090 ok := object.Key("minSegmentLength") 5091 ok.Integer(v.MinSegmentLength) 5092 } 5093 5094 if len(v.OutputSelection) > 0 { 5095 ok := object.Key("outputSelection") 5096 ok.String(string(v.OutputSelection)) 5097 } 5098 5099 if len(v.ProgramDateTime) > 0 { 5100 ok := object.Key("programDateTime") 5101 ok.String(string(v.ProgramDateTime)) 5102 } 5103 5104 if v.ProgramDateTimePeriod != 0 { 5105 ok := object.Key("programDateTimePeriod") 5106 ok.Integer(v.ProgramDateTimePeriod) 5107 } 5108 5109 if len(v.SegmentControl) > 0 { 5110 ok := object.Key("segmentControl") 5111 ok.String(string(v.SegmentControl)) 5112 } 5113 5114 if v.SegmentLength != 0 { 5115 ok := object.Key("segmentLength") 5116 ok.Integer(v.SegmentLength) 5117 } 5118 5119 if v.SegmentsPerSubdirectory != 0 { 5120 ok := object.Key("segmentsPerSubdirectory") 5121 ok.Integer(v.SegmentsPerSubdirectory) 5122 } 5123 5124 if len(v.StreamInfResolution) > 0 { 5125 ok := object.Key("streamInfResolution") 5126 ok.String(string(v.StreamInfResolution)) 5127 } 5128 5129 if len(v.TimedMetadataId3Frame) > 0 { 5130 ok := object.Key("timedMetadataId3Frame") 5131 ok.String(string(v.TimedMetadataId3Frame)) 5132 } 5133 5134 if v.TimedMetadataId3Period != 0 { 5135 ok := object.Key("timedMetadataId3Period") 5136 ok.Integer(v.TimedMetadataId3Period) 5137 } 5138 5139 if v.TimestampDeltaMilliseconds != 0 { 5140 ok := object.Key("timestampDeltaMilliseconds") 5141 ok.Integer(v.TimestampDeltaMilliseconds) 5142 } 5143 5144 return nil 5145} 5146 5147func awsRestjson1_serializeDocumentHlsSettings(v *types.HlsSettings, value smithyjson.Value) error { 5148 object := value.Object() 5149 defer object.Close() 5150 5151 if v.AudioGroupId != nil { 5152 ok := object.Key("audioGroupId") 5153 ok.String(*v.AudioGroupId) 5154 } 5155 5156 if len(v.AudioOnlyContainer) > 0 { 5157 ok := object.Key("audioOnlyContainer") 5158 ok.String(string(v.AudioOnlyContainer)) 5159 } 5160 5161 if v.AudioRenditionSets != nil { 5162 ok := object.Key("audioRenditionSets") 5163 ok.String(*v.AudioRenditionSets) 5164 } 5165 5166 if len(v.AudioTrackType) > 0 { 5167 ok := object.Key("audioTrackType") 5168 ok.String(string(v.AudioTrackType)) 5169 } 5170 5171 if len(v.DescriptiveVideoServiceFlag) > 0 { 5172 ok := object.Key("descriptiveVideoServiceFlag") 5173 ok.String(string(v.DescriptiveVideoServiceFlag)) 5174 } 5175 5176 if len(v.IFrameOnlyManifest) > 0 { 5177 ok := object.Key("iFrameOnlyManifest") 5178 ok.String(string(v.IFrameOnlyManifest)) 5179 } 5180 5181 if v.SegmentModifier != nil { 5182 ok := object.Key("segmentModifier") 5183 ok.String(*v.SegmentModifier) 5184 } 5185 5186 return nil 5187} 5188 5189func awsRestjson1_serializeDocumentHopDestination(v *types.HopDestination, value smithyjson.Value) error { 5190 object := value.Object() 5191 defer object.Close() 5192 5193 if v.Priority != 0 { 5194 ok := object.Key("priority") 5195 ok.Integer(v.Priority) 5196 } 5197 5198 if v.Queue != nil { 5199 ok := object.Key("queue") 5200 ok.String(*v.Queue) 5201 } 5202 5203 if v.WaitMinutes != 0 { 5204 ok := object.Key("waitMinutes") 5205 ok.Integer(v.WaitMinutes) 5206 } 5207 5208 return nil 5209} 5210 5211func awsRestjson1_serializeDocumentId3Insertion(v *types.Id3Insertion, value smithyjson.Value) error { 5212 object := value.Object() 5213 defer object.Close() 5214 5215 if v.Id3 != nil { 5216 ok := object.Key("id3") 5217 ok.String(*v.Id3) 5218 } 5219 5220 if v.Timecode != nil { 5221 ok := object.Key("timecode") 5222 ok.String(*v.Timecode) 5223 } 5224 5225 return nil 5226} 5227 5228func awsRestjson1_serializeDocumentImageInserter(v *types.ImageInserter, value smithyjson.Value) error { 5229 object := value.Object() 5230 defer object.Close() 5231 5232 if v.InsertableImages != nil { 5233 ok := object.Key("insertableImages") 5234 if err := awsRestjson1_serializeDocument__listOfInsertableImage(v.InsertableImages, ok); err != nil { 5235 return err 5236 } 5237 } 5238 5239 return nil 5240} 5241 5242func awsRestjson1_serializeDocumentImscDestinationSettings(v *types.ImscDestinationSettings, value smithyjson.Value) error { 5243 object := value.Object() 5244 defer object.Close() 5245 5246 if len(v.StylePassthrough) > 0 { 5247 ok := object.Key("stylePassthrough") 5248 ok.String(string(v.StylePassthrough)) 5249 } 5250 5251 return nil 5252} 5253 5254func awsRestjson1_serializeDocumentInput(v *types.Input, value smithyjson.Value) error { 5255 object := value.Object() 5256 defer object.Close() 5257 5258 if v.AudioSelectorGroups != nil { 5259 ok := object.Key("audioSelectorGroups") 5260 if err := awsRestjson1_serializeDocument__mapOfAudioSelectorGroup(v.AudioSelectorGroups, ok); err != nil { 5261 return err 5262 } 5263 } 5264 5265 if v.AudioSelectors != nil { 5266 ok := object.Key("audioSelectors") 5267 if err := awsRestjson1_serializeDocument__mapOfAudioSelector(v.AudioSelectors, ok); err != nil { 5268 return err 5269 } 5270 } 5271 5272 if v.CaptionSelectors != nil { 5273 ok := object.Key("captionSelectors") 5274 if err := awsRestjson1_serializeDocument__mapOfCaptionSelector(v.CaptionSelectors, ok); err != nil { 5275 return err 5276 } 5277 } 5278 5279 if v.Crop != nil { 5280 ok := object.Key("crop") 5281 if err := awsRestjson1_serializeDocumentRectangle(v.Crop, ok); err != nil { 5282 return err 5283 } 5284 } 5285 5286 if len(v.DeblockFilter) > 0 { 5287 ok := object.Key("deblockFilter") 5288 ok.String(string(v.DeblockFilter)) 5289 } 5290 5291 if v.DecryptionSettings != nil { 5292 ok := object.Key("decryptionSettings") 5293 if err := awsRestjson1_serializeDocumentInputDecryptionSettings(v.DecryptionSettings, ok); err != nil { 5294 return err 5295 } 5296 } 5297 5298 if len(v.DenoiseFilter) > 0 { 5299 ok := object.Key("denoiseFilter") 5300 ok.String(string(v.DenoiseFilter)) 5301 } 5302 5303 if v.FileInput != nil { 5304 ok := object.Key("fileInput") 5305 ok.String(*v.FileInput) 5306 } 5307 5308 if len(v.FilterEnable) > 0 { 5309 ok := object.Key("filterEnable") 5310 ok.String(string(v.FilterEnable)) 5311 } 5312 5313 if v.FilterStrength != 0 { 5314 ok := object.Key("filterStrength") 5315 ok.Integer(v.FilterStrength) 5316 } 5317 5318 if v.ImageInserter != nil { 5319 ok := object.Key("imageInserter") 5320 if err := awsRestjson1_serializeDocumentImageInserter(v.ImageInserter, ok); err != nil { 5321 return err 5322 } 5323 } 5324 5325 if v.InputClippings != nil { 5326 ok := object.Key("inputClippings") 5327 if err := awsRestjson1_serializeDocument__listOfInputClipping(v.InputClippings, ok); err != nil { 5328 return err 5329 } 5330 } 5331 5332 if len(v.InputScanType) > 0 { 5333 ok := object.Key("inputScanType") 5334 ok.String(string(v.InputScanType)) 5335 } 5336 5337 if v.Position != nil { 5338 ok := object.Key("position") 5339 if err := awsRestjson1_serializeDocumentRectangle(v.Position, ok); err != nil { 5340 return err 5341 } 5342 } 5343 5344 if v.ProgramNumber != 0 { 5345 ok := object.Key("programNumber") 5346 ok.Integer(v.ProgramNumber) 5347 } 5348 5349 if len(v.PsiControl) > 0 { 5350 ok := object.Key("psiControl") 5351 ok.String(string(v.PsiControl)) 5352 } 5353 5354 if v.SupplementalImps != nil { 5355 ok := object.Key("supplementalImps") 5356 if err := awsRestjson1_serializeDocument__listOf__stringPatternS3ASSETMAPXml(v.SupplementalImps, ok); err != nil { 5357 return err 5358 } 5359 } 5360 5361 if len(v.TimecodeSource) > 0 { 5362 ok := object.Key("timecodeSource") 5363 ok.String(string(v.TimecodeSource)) 5364 } 5365 5366 if v.TimecodeStart != nil { 5367 ok := object.Key("timecodeStart") 5368 ok.String(*v.TimecodeStart) 5369 } 5370 5371 if v.VideoSelector != nil { 5372 ok := object.Key("videoSelector") 5373 if err := awsRestjson1_serializeDocumentVideoSelector(v.VideoSelector, ok); err != nil { 5374 return err 5375 } 5376 } 5377 5378 return nil 5379} 5380 5381func awsRestjson1_serializeDocumentInputClipping(v *types.InputClipping, value smithyjson.Value) error { 5382 object := value.Object() 5383 defer object.Close() 5384 5385 if v.EndTimecode != nil { 5386 ok := object.Key("endTimecode") 5387 ok.String(*v.EndTimecode) 5388 } 5389 5390 if v.StartTimecode != nil { 5391 ok := object.Key("startTimecode") 5392 ok.String(*v.StartTimecode) 5393 } 5394 5395 return nil 5396} 5397 5398func awsRestjson1_serializeDocumentInputDecryptionSettings(v *types.InputDecryptionSettings, value smithyjson.Value) error { 5399 object := value.Object() 5400 defer object.Close() 5401 5402 if len(v.DecryptionMode) > 0 { 5403 ok := object.Key("decryptionMode") 5404 ok.String(string(v.DecryptionMode)) 5405 } 5406 5407 if v.EncryptedDecryptionKey != nil { 5408 ok := object.Key("encryptedDecryptionKey") 5409 ok.String(*v.EncryptedDecryptionKey) 5410 } 5411 5412 if v.InitializationVector != nil { 5413 ok := object.Key("initializationVector") 5414 ok.String(*v.InitializationVector) 5415 } 5416 5417 if v.KmsKeyRegion != nil { 5418 ok := object.Key("kmsKeyRegion") 5419 ok.String(*v.KmsKeyRegion) 5420 } 5421 5422 return nil 5423} 5424 5425func awsRestjson1_serializeDocumentInputTemplate(v *types.InputTemplate, value smithyjson.Value) error { 5426 object := value.Object() 5427 defer object.Close() 5428 5429 if v.AudioSelectorGroups != nil { 5430 ok := object.Key("audioSelectorGroups") 5431 if err := awsRestjson1_serializeDocument__mapOfAudioSelectorGroup(v.AudioSelectorGroups, ok); err != nil { 5432 return err 5433 } 5434 } 5435 5436 if v.AudioSelectors != nil { 5437 ok := object.Key("audioSelectors") 5438 if err := awsRestjson1_serializeDocument__mapOfAudioSelector(v.AudioSelectors, ok); err != nil { 5439 return err 5440 } 5441 } 5442 5443 if v.CaptionSelectors != nil { 5444 ok := object.Key("captionSelectors") 5445 if err := awsRestjson1_serializeDocument__mapOfCaptionSelector(v.CaptionSelectors, ok); err != nil { 5446 return err 5447 } 5448 } 5449 5450 if v.Crop != nil { 5451 ok := object.Key("crop") 5452 if err := awsRestjson1_serializeDocumentRectangle(v.Crop, ok); err != nil { 5453 return err 5454 } 5455 } 5456 5457 if len(v.DeblockFilter) > 0 { 5458 ok := object.Key("deblockFilter") 5459 ok.String(string(v.DeblockFilter)) 5460 } 5461 5462 if len(v.DenoiseFilter) > 0 { 5463 ok := object.Key("denoiseFilter") 5464 ok.String(string(v.DenoiseFilter)) 5465 } 5466 5467 if len(v.FilterEnable) > 0 { 5468 ok := object.Key("filterEnable") 5469 ok.String(string(v.FilterEnable)) 5470 } 5471 5472 if v.FilterStrength != 0 { 5473 ok := object.Key("filterStrength") 5474 ok.Integer(v.FilterStrength) 5475 } 5476 5477 if v.ImageInserter != nil { 5478 ok := object.Key("imageInserter") 5479 if err := awsRestjson1_serializeDocumentImageInserter(v.ImageInserter, ok); err != nil { 5480 return err 5481 } 5482 } 5483 5484 if v.InputClippings != nil { 5485 ok := object.Key("inputClippings") 5486 if err := awsRestjson1_serializeDocument__listOfInputClipping(v.InputClippings, ok); err != nil { 5487 return err 5488 } 5489 } 5490 5491 if len(v.InputScanType) > 0 { 5492 ok := object.Key("inputScanType") 5493 ok.String(string(v.InputScanType)) 5494 } 5495 5496 if v.Position != nil { 5497 ok := object.Key("position") 5498 if err := awsRestjson1_serializeDocumentRectangle(v.Position, ok); err != nil { 5499 return err 5500 } 5501 } 5502 5503 if v.ProgramNumber != 0 { 5504 ok := object.Key("programNumber") 5505 ok.Integer(v.ProgramNumber) 5506 } 5507 5508 if len(v.PsiControl) > 0 { 5509 ok := object.Key("psiControl") 5510 ok.String(string(v.PsiControl)) 5511 } 5512 5513 if len(v.TimecodeSource) > 0 { 5514 ok := object.Key("timecodeSource") 5515 ok.String(string(v.TimecodeSource)) 5516 } 5517 5518 if v.TimecodeStart != nil { 5519 ok := object.Key("timecodeStart") 5520 ok.String(*v.TimecodeStart) 5521 } 5522 5523 if v.VideoSelector != nil { 5524 ok := object.Key("videoSelector") 5525 if err := awsRestjson1_serializeDocumentVideoSelector(v.VideoSelector, ok); err != nil { 5526 return err 5527 } 5528 } 5529 5530 return nil 5531} 5532 5533func awsRestjson1_serializeDocumentInsertableImage(v *types.InsertableImage, value smithyjson.Value) error { 5534 object := value.Object() 5535 defer object.Close() 5536 5537 if v.Duration != 0 { 5538 ok := object.Key("duration") 5539 ok.Integer(v.Duration) 5540 } 5541 5542 if v.FadeIn != 0 { 5543 ok := object.Key("fadeIn") 5544 ok.Integer(v.FadeIn) 5545 } 5546 5547 if v.FadeOut != 0 { 5548 ok := object.Key("fadeOut") 5549 ok.Integer(v.FadeOut) 5550 } 5551 5552 if v.Height != 0 { 5553 ok := object.Key("height") 5554 ok.Integer(v.Height) 5555 } 5556 5557 if v.ImageInserterInput != nil { 5558 ok := object.Key("imageInserterInput") 5559 ok.String(*v.ImageInserterInput) 5560 } 5561 5562 if v.ImageX != 0 { 5563 ok := object.Key("imageX") 5564 ok.Integer(v.ImageX) 5565 } 5566 5567 if v.ImageY != 0 { 5568 ok := object.Key("imageY") 5569 ok.Integer(v.ImageY) 5570 } 5571 5572 if v.Layer != 0 { 5573 ok := object.Key("layer") 5574 ok.Integer(v.Layer) 5575 } 5576 5577 if v.Opacity != 0 { 5578 ok := object.Key("opacity") 5579 ok.Integer(v.Opacity) 5580 } 5581 5582 if v.StartTime != nil { 5583 ok := object.Key("startTime") 5584 ok.String(*v.StartTime) 5585 } 5586 5587 if v.Width != 0 { 5588 ok := object.Key("width") 5589 ok.Integer(v.Width) 5590 } 5591 5592 return nil 5593} 5594 5595func awsRestjson1_serializeDocumentJobSettings(v *types.JobSettings, value smithyjson.Value) error { 5596 object := value.Object() 5597 defer object.Close() 5598 5599 if v.AdAvailOffset != 0 { 5600 ok := object.Key("adAvailOffset") 5601 ok.Integer(v.AdAvailOffset) 5602 } 5603 5604 if v.AvailBlanking != nil { 5605 ok := object.Key("availBlanking") 5606 if err := awsRestjson1_serializeDocumentAvailBlanking(v.AvailBlanking, ok); err != nil { 5607 return err 5608 } 5609 } 5610 5611 if v.Esam != nil { 5612 ok := object.Key("esam") 5613 if err := awsRestjson1_serializeDocumentEsamSettings(v.Esam, ok); err != nil { 5614 return err 5615 } 5616 } 5617 5618 if v.Inputs != nil { 5619 ok := object.Key("inputs") 5620 if err := awsRestjson1_serializeDocument__listOfInput(v.Inputs, ok); err != nil { 5621 return err 5622 } 5623 } 5624 5625 if v.MotionImageInserter != nil { 5626 ok := object.Key("motionImageInserter") 5627 if err := awsRestjson1_serializeDocumentMotionImageInserter(v.MotionImageInserter, ok); err != nil { 5628 return err 5629 } 5630 } 5631 5632 if v.NielsenConfiguration != nil { 5633 ok := object.Key("nielsenConfiguration") 5634 if err := awsRestjson1_serializeDocumentNielsenConfiguration(v.NielsenConfiguration, ok); err != nil { 5635 return err 5636 } 5637 } 5638 5639 if v.NielsenNonLinearWatermark != nil { 5640 ok := object.Key("nielsenNonLinearWatermark") 5641 if err := awsRestjson1_serializeDocumentNielsenNonLinearWatermarkSettings(v.NielsenNonLinearWatermark, ok); err != nil { 5642 return err 5643 } 5644 } 5645 5646 if v.OutputGroups != nil { 5647 ok := object.Key("outputGroups") 5648 if err := awsRestjson1_serializeDocument__listOfOutputGroup(v.OutputGroups, ok); err != nil { 5649 return err 5650 } 5651 } 5652 5653 if v.TimecodeConfig != nil { 5654 ok := object.Key("timecodeConfig") 5655 if err := awsRestjson1_serializeDocumentTimecodeConfig(v.TimecodeConfig, ok); err != nil { 5656 return err 5657 } 5658 } 5659 5660 if v.TimedMetadataInsertion != nil { 5661 ok := object.Key("timedMetadataInsertion") 5662 if err := awsRestjson1_serializeDocumentTimedMetadataInsertion(v.TimedMetadataInsertion, ok); err != nil { 5663 return err 5664 } 5665 } 5666 5667 return nil 5668} 5669 5670func awsRestjson1_serializeDocumentJobTemplateSettings(v *types.JobTemplateSettings, value smithyjson.Value) error { 5671 object := value.Object() 5672 defer object.Close() 5673 5674 if v.AdAvailOffset != 0 { 5675 ok := object.Key("adAvailOffset") 5676 ok.Integer(v.AdAvailOffset) 5677 } 5678 5679 if v.AvailBlanking != nil { 5680 ok := object.Key("availBlanking") 5681 if err := awsRestjson1_serializeDocumentAvailBlanking(v.AvailBlanking, ok); err != nil { 5682 return err 5683 } 5684 } 5685 5686 if v.Esam != nil { 5687 ok := object.Key("esam") 5688 if err := awsRestjson1_serializeDocumentEsamSettings(v.Esam, ok); err != nil { 5689 return err 5690 } 5691 } 5692 5693 if v.Inputs != nil { 5694 ok := object.Key("inputs") 5695 if err := awsRestjson1_serializeDocument__listOfInputTemplate(v.Inputs, ok); err != nil { 5696 return err 5697 } 5698 } 5699 5700 if v.MotionImageInserter != nil { 5701 ok := object.Key("motionImageInserter") 5702 if err := awsRestjson1_serializeDocumentMotionImageInserter(v.MotionImageInserter, ok); err != nil { 5703 return err 5704 } 5705 } 5706 5707 if v.NielsenConfiguration != nil { 5708 ok := object.Key("nielsenConfiguration") 5709 if err := awsRestjson1_serializeDocumentNielsenConfiguration(v.NielsenConfiguration, ok); err != nil { 5710 return err 5711 } 5712 } 5713 5714 if v.NielsenNonLinearWatermark != nil { 5715 ok := object.Key("nielsenNonLinearWatermark") 5716 if err := awsRestjson1_serializeDocumentNielsenNonLinearWatermarkSettings(v.NielsenNonLinearWatermark, ok); err != nil { 5717 return err 5718 } 5719 } 5720 5721 if v.OutputGroups != nil { 5722 ok := object.Key("outputGroups") 5723 if err := awsRestjson1_serializeDocument__listOfOutputGroup(v.OutputGroups, ok); err != nil { 5724 return err 5725 } 5726 } 5727 5728 if v.TimecodeConfig != nil { 5729 ok := object.Key("timecodeConfig") 5730 if err := awsRestjson1_serializeDocumentTimecodeConfig(v.TimecodeConfig, ok); err != nil { 5731 return err 5732 } 5733 } 5734 5735 if v.TimedMetadataInsertion != nil { 5736 ok := object.Key("timedMetadataInsertion") 5737 if err := awsRestjson1_serializeDocumentTimedMetadataInsertion(v.TimedMetadataInsertion, ok); err != nil { 5738 return err 5739 } 5740 } 5741 5742 return nil 5743} 5744 5745func awsRestjson1_serializeDocumentM2tsScte35Esam(v *types.M2tsScte35Esam, value smithyjson.Value) error { 5746 object := value.Object() 5747 defer object.Close() 5748 5749 if v.Scte35EsamPid != 0 { 5750 ok := object.Key("scte35EsamPid") 5751 ok.Integer(v.Scte35EsamPid) 5752 } 5753 5754 return nil 5755} 5756 5757func awsRestjson1_serializeDocumentM2tsSettings(v *types.M2tsSettings, value smithyjson.Value) error { 5758 object := value.Object() 5759 defer object.Close() 5760 5761 if len(v.AudioBufferModel) > 0 { 5762 ok := object.Key("audioBufferModel") 5763 ok.String(string(v.AudioBufferModel)) 5764 } 5765 5766 if len(v.AudioDuration) > 0 { 5767 ok := object.Key("audioDuration") 5768 ok.String(string(v.AudioDuration)) 5769 } 5770 5771 if v.AudioFramesPerPes != 0 { 5772 ok := object.Key("audioFramesPerPes") 5773 ok.Integer(v.AudioFramesPerPes) 5774 } 5775 5776 if v.AudioPids != nil { 5777 ok := object.Key("audioPids") 5778 if err := awsRestjson1_serializeDocument__listOf__integerMin32Max8182(v.AudioPids, ok); err != nil { 5779 return err 5780 } 5781 } 5782 5783 if v.Bitrate != 0 { 5784 ok := object.Key("bitrate") 5785 ok.Integer(v.Bitrate) 5786 } 5787 5788 if len(v.BufferModel) > 0 { 5789 ok := object.Key("bufferModel") 5790 ok.String(string(v.BufferModel)) 5791 } 5792 5793 if v.DvbNitSettings != nil { 5794 ok := object.Key("dvbNitSettings") 5795 if err := awsRestjson1_serializeDocumentDvbNitSettings(v.DvbNitSettings, ok); err != nil { 5796 return err 5797 } 5798 } 5799 5800 if v.DvbSdtSettings != nil { 5801 ok := object.Key("dvbSdtSettings") 5802 if err := awsRestjson1_serializeDocumentDvbSdtSettings(v.DvbSdtSettings, ok); err != nil { 5803 return err 5804 } 5805 } 5806 5807 if v.DvbSubPids != nil { 5808 ok := object.Key("dvbSubPids") 5809 if err := awsRestjson1_serializeDocument__listOf__integerMin32Max8182(v.DvbSubPids, ok); err != nil { 5810 return err 5811 } 5812 } 5813 5814 if v.DvbTdtSettings != nil { 5815 ok := object.Key("dvbTdtSettings") 5816 if err := awsRestjson1_serializeDocumentDvbTdtSettings(v.DvbTdtSettings, ok); err != nil { 5817 return err 5818 } 5819 } 5820 5821 if v.DvbTeletextPid != 0 { 5822 ok := object.Key("dvbTeletextPid") 5823 ok.Integer(v.DvbTeletextPid) 5824 } 5825 5826 if len(v.EbpAudioInterval) > 0 { 5827 ok := object.Key("ebpAudioInterval") 5828 ok.String(string(v.EbpAudioInterval)) 5829 } 5830 5831 if len(v.EbpPlacement) > 0 { 5832 ok := object.Key("ebpPlacement") 5833 ok.String(string(v.EbpPlacement)) 5834 } 5835 5836 if len(v.EsRateInPes) > 0 { 5837 ok := object.Key("esRateInPes") 5838 ok.String(string(v.EsRateInPes)) 5839 } 5840 5841 if len(v.ForceTsVideoEbpOrder) > 0 { 5842 ok := object.Key("forceTsVideoEbpOrder") 5843 ok.String(string(v.ForceTsVideoEbpOrder)) 5844 } 5845 5846 if v.FragmentTime != 0 { 5847 ok := object.Key("fragmentTime") 5848 ok.Double(v.FragmentTime) 5849 } 5850 5851 if v.MaxPcrInterval != 0 { 5852 ok := object.Key("maxPcrInterval") 5853 ok.Integer(v.MaxPcrInterval) 5854 } 5855 5856 if v.MinEbpInterval != 0 { 5857 ok := object.Key("minEbpInterval") 5858 ok.Integer(v.MinEbpInterval) 5859 } 5860 5861 if len(v.NielsenId3) > 0 { 5862 ok := object.Key("nielsenId3") 5863 ok.String(string(v.NielsenId3)) 5864 } 5865 5866 if v.NullPacketBitrate != 0 { 5867 ok := object.Key("nullPacketBitrate") 5868 ok.Double(v.NullPacketBitrate) 5869 } 5870 5871 if v.PatInterval != 0 { 5872 ok := object.Key("patInterval") 5873 ok.Integer(v.PatInterval) 5874 } 5875 5876 if len(v.PcrControl) > 0 { 5877 ok := object.Key("pcrControl") 5878 ok.String(string(v.PcrControl)) 5879 } 5880 5881 if v.PcrPid != 0 { 5882 ok := object.Key("pcrPid") 5883 ok.Integer(v.PcrPid) 5884 } 5885 5886 if v.PmtInterval != 0 { 5887 ok := object.Key("pmtInterval") 5888 ok.Integer(v.PmtInterval) 5889 } 5890 5891 if v.PmtPid != 0 { 5892 ok := object.Key("pmtPid") 5893 ok.Integer(v.PmtPid) 5894 } 5895 5896 if v.PrivateMetadataPid != 0 { 5897 ok := object.Key("privateMetadataPid") 5898 ok.Integer(v.PrivateMetadataPid) 5899 } 5900 5901 if v.ProgramNumber != 0 { 5902 ok := object.Key("programNumber") 5903 ok.Integer(v.ProgramNumber) 5904 } 5905 5906 if len(v.RateMode) > 0 { 5907 ok := object.Key("rateMode") 5908 ok.String(string(v.RateMode)) 5909 } 5910 5911 if v.Scte35Esam != nil { 5912 ok := object.Key("scte35Esam") 5913 if err := awsRestjson1_serializeDocumentM2tsScte35Esam(v.Scte35Esam, ok); err != nil { 5914 return err 5915 } 5916 } 5917 5918 if v.Scte35Pid != 0 { 5919 ok := object.Key("scte35Pid") 5920 ok.Integer(v.Scte35Pid) 5921 } 5922 5923 if len(v.Scte35Source) > 0 { 5924 ok := object.Key("scte35Source") 5925 ok.String(string(v.Scte35Source)) 5926 } 5927 5928 if len(v.SegmentationMarkers) > 0 { 5929 ok := object.Key("segmentationMarkers") 5930 ok.String(string(v.SegmentationMarkers)) 5931 } 5932 5933 if len(v.SegmentationStyle) > 0 { 5934 ok := object.Key("segmentationStyle") 5935 ok.String(string(v.SegmentationStyle)) 5936 } 5937 5938 if v.SegmentationTime != 0 { 5939 ok := object.Key("segmentationTime") 5940 ok.Double(v.SegmentationTime) 5941 } 5942 5943 if v.TimedMetadataPid != 0 { 5944 ok := object.Key("timedMetadataPid") 5945 ok.Integer(v.TimedMetadataPid) 5946 } 5947 5948 if v.TransportStreamId != 0 { 5949 ok := object.Key("transportStreamId") 5950 ok.Integer(v.TransportStreamId) 5951 } 5952 5953 if v.VideoPid != 0 { 5954 ok := object.Key("videoPid") 5955 ok.Integer(v.VideoPid) 5956 } 5957 5958 return nil 5959} 5960 5961func awsRestjson1_serializeDocumentM3u8Settings(v *types.M3u8Settings, value smithyjson.Value) error { 5962 object := value.Object() 5963 defer object.Close() 5964 5965 if len(v.AudioDuration) > 0 { 5966 ok := object.Key("audioDuration") 5967 ok.String(string(v.AudioDuration)) 5968 } 5969 5970 if v.AudioFramesPerPes != 0 { 5971 ok := object.Key("audioFramesPerPes") 5972 ok.Integer(v.AudioFramesPerPes) 5973 } 5974 5975 if v.AudioPids != nil { 5976 ok := object.Key("audioPids") 5977 if err := awsRestjson1_serializeDocument__listOf__integerMin32Max8182(v.AudioPids, ok); err != nil { 5978 return err 5979 } 5980 } 5981 5982 if len(v.NielsenId3) > 0 { 5983 ok := object.Key("nielsenId3") 5984 ok.String(string(v.NielsenId3)) 5985 } 5986 5987 if v.PatInterval != 0 { 5988 ok := object.Key("patInterval") 5989 ok.Integer(v.PatInterval) 5990 } 5991 5992 if len(v.PcrControl) > 0 { 5993 ok := object.Key("pcrControl") 5994 ok.String(string(v.PcrControl)) 5995 } 5996 5997 if v.PcrPid != 0 { 5998 ok := object.Key("pcrPid") 5999 ok.Integer(v.PcrPid) 6000 } 6001 6002 if v.PmtInterval != 0 { 6003 ok := object.Key("pmtInterval") 6004 ok.Integer(v.PmtInterval) 6005 } 6006 6007 if v.PmtPid != 0 { 6008 ok := object.Key("pmtPid") 6009 ok.Integer(v.PmtPid) 6010 } 6011 6012 if v.PrivateMetadataPid != 0 { 6013 ok := object.Key("privateMetadataPid") 6014 ok.Integer(v.PrivateMetadataPid) 6015 } 6016 6017 if v.ProgramNumber != 0 { 6018 ok := object.Key("programNumber") 6019 ok.Integer(v.ProgramNumber) 6020 } 6021 6022 if v.Scte35Pid != 0 { 6023 ok := object.Key("scte35Pid") 6024 ok.Integer(v.Scte35Pid) 6025 } 6026 6027 if len(v.Scte35Source) > 0 { 6028 ok := object.Key("scte35Source") 6029 ok.String(string(v.Scte35Source)) 6030 } 6031 6032 if len(v.TimedMetadata) > 0 { 6033 ok := object.Key("timedMetadata") 6034 ok.String(string(v.TimedMetadata)) 6035 } 6036 6037 if v.TimedMetadataPid != 0 { 6038 ok := object.Key("timedMetadataPid") 6039 ok.Integer(v.TimedMetadataPid) 6040 } 6041 6042 if v.TransportStreamId != 0 { 6043 ok := object.Key("transportStreamId") 6044 ok.Integer(v.TransportStreamId) 6045 } 6046 6047 if v.VideoPid != 0 { 6048 ok := object.Key("videoPid") 6049 ok.Integer(v.VideoPid) 6050 } 6051 6052 return nil 6053} 6054 6055func awsRestjson1_serializeDocumentMotionImageInserter(v *types.MotionImageInserter, value smithyjson.Value) error { 6056 object := value.Object() 6057 defer object.Close() 6058 6059 if v.Framerate != nil { 6060 ok := object.Key("framerate") 6061 if err := awsRestjson1_serializeDocumentMotionImageInsertionFramerate(v.Framerate, ok); err != nil { 6062 return err 6063 } 6064 } 6065 6066 if v.Input != nil { 6067 ok := object.Key("input") 6068 ok.String(*v.Input) 6069 } 6070 6071 if len(v.InsertionMode) > 0 { 6072 ok := object.Key("insertionMode") 6073 ok.String(string(v.InsertionMode)) 6074 } 6075 6076 if v.Offset != nil { 6077 ok := object.Key("offset") 6078 if err := awsRestjson1_serializeDocumentMotionImageInsertionOffset(v.Offset, ok); err != nil { 6079 return err 6080 } 6081 } 6082 6083 if len(v.Playback) > 0 { 6084 ok := object.Key("playback") 6085 ok.String(string(v.Playback)) 6086 } 6087 6088 if v.StartTime != nil { 6089 ok := object.Key("startTime") 6090 ok.String(*v.StartTime) 6091 } 6092 6093 return nil 6094} 6095 6096func awsRestjson1_serializeDocumentMotionImageInsertionFramerate(v *types.MotionImageInsertionFramerate, value smithyjson.Value) error { 6097 object := value.Object() 6098 defer object.Close() 6099 6100 if v.FramerateDenominator != 0 { 6101 ok := object.Key("framerateDenominator") 6102 ok.Integer(v.FramerateDenominator) 6103 } 6104 6105 if v.FramerateNumerator != 0 { 6106 ok := object.Key("framerateNumerator") 6107 ok.Integer(v.FramerateNumerator) 6108 } 6109 6110 return nil 6111} 6112 6113func awsRestjson1_serializeDocumentMotionImageInsertionOffset(v *types.MotionImageInsertionOffset, value smithyjson.Value) error { 6114 object := value.Object() 6115 defer object.Close() 6116 6117 if v.ImageX != 0 { 6118 ok := object.Key("imageX") 6119 ok.Integer(v.ImageX) 6120 } 6121 6122 if v.ImageY != 0 { 6123 ok := object.Key("imageY") 6124 ok.Integer(v.ImageY) 6125 } 6126 6127 return nil 6128} 6129 6130func awsRestjson1_serializeDocumentMovSettings(v *types.MovSettings, value smithyjson.Value) error { 6131 object := value.Object() 6132 defer object.Close() 6133 6134 if len(v.ClapAtom) > 0 { 6135 ok := object.Key("clapAtom") 6136 ok.String(string(v.ClapAtom)) 6137 } 6138 6139 if len(v.CslgAtom) > 0 { 6140 ok := object.Key("cslgAtom") 6141 ok.String(string(v.CslgAtom)) 6142 } 6143 6144 if len(v.Mpeg2FourCCControl) > 0 { 6145 ok := object.Key("mpeg2FourCCControl") 6146 ok.String(string(v.Mpeg2FourCCControl)) 6147 } 6148 6149 if len(v.PaddingControl) > 0 { 6150 ok := object.Key("paddingControl") 6151 ok.String(string(v.PaddingControl)) 6152 } 6153 6154 if len(v.Reference) > 0 { 6155 ok := object.Key("reference") 6156 ok.String(string(v.Reference)) 6157 } 6158 6159 return nil 6160} 6161 6162func awsRestjson1_serializeDocumentMp2Settings(v *types.Mp2Settings, value smithyjson.Value) error { 6163 object := value.Object() 6164 defer object.Close() 6165 6166 if v.Bitrate != 0 { 6167 ok := object.Key("bitrate") 6168 ok.Integer(v.Bitrate) 6169 } 6170 6171 if v.Channels != 0 { 6172 ok := object.Key("channels") 6173 ok.Integer(v.Channels) 6174 } 6175 6176 if v.SampleRate != 0 { 6177 ok := object.Key("sampleRate") 6178 ok.Integer(v.SampleRate) 6179 } 6180 6181 return nil 6182} 6183 6184func awsRestjson1_serializeDocumentMp3Settings(v *types.Mp3Settings, value smithyjson.Value) error { 6185 object := value.Object() 6186 defer object.Close() 6187 6188 if v.Bitrate != 0 { 6189 ok := object.Key("bitrate") 6190 ok.Integer(v.Bitrate) 6191 } 6192 6193 if v.Channels != 0 { 6194 ok := object.Key("channels") 6195 ok.Integer(v.Channels) 6196 } 6197 6198 if len(v.RateControlMode) > 0 { 6199 ok := object.Key("rateControlMode") 6200 ok.String(string(v.RateControlMode)) 6201 } 6202 6203 if v.SampleRate != 0 { 6204 ok := object.Key("sampleRate") 6205 ok.Integer(v.SampleRate) 6206 } 6207 6208 if v.VbrQuality != 0 { 6209 ok := object.Key("vbrQuality") 6210 ok.Integer(v.VbrQuality) 6211 } 6212 6213 return nil 6214} 6215 6216func awsRestjson1_serializeDocumentMp4Settings(v *types.Mp4Settings, value smithyjson.Value) error { 6217 object := value.Object() 6218 defer object.Close() 6219 6220 if len(v.AudioDuration) > 0 { 6221 ok := object.Key("audioDuration") 6222 ok.String(string(v.AudioDuration)) 6223 } 6224 6225 if len(v.CslgAtom) > 0 { 6226 ok := object.Key("cslgAtom") 6227 ok.String(string(v.CslgAtom)) 6228 } 6229 6230 if v.CttsVersion != 0 { 6231 ok := object.Key("cttsVersion") 6232 ok.Integer(v.CttsVersion) 6233 } 6234 6235 if len(v.FreeSpaceBox) > 0 { 6236 ok := object.Key("freeSpaceBox") 6237 ok.String(string(v.FreeSpaceBox)) 6238 } 6239 6240 if len(v.MoovPlacement) > 0 { 6241 ok := object.Key("moovPlacement") 6242 ok.String(string(v.MoovPlacement)) 6243 } 6244 6245 if v.Mp4MajorBrand != nil { 6246 ok := object.Key("mp4MajorBrand") 6247 ok.String(*v.Mp4MajorBrand) 6248 } 6249 6250 return nil 6251} 6252 6253func awsRestjson1_serializeDocumentMpdSettings(v *types.MpdSettings, value smithyjson.Value) error { 6254 object := value.Object() 6255 defer object.Close() 6256 6257 if len(v.AccessibilityCaptionHints) > 0 { 6258 ok := object.Key("accessibilityCaptionHints") 6259 ok.String(string(v.AccessibilityCaptionHints)) 6260 } 6261 6262 if len(v.AudioDuration) > 0 { 6263 ok := object.Key("audioDuration") 6264 ok.String(string(v.AudioDuration)) 6265 } 6266 6267 if len(v.CaptionContainerType) > 0 { 6268 ok := object.Key("captionContainerType") 6269 ok.String(string(v.CaptionContainerType)) 6270 } 6271 6272 if len(v.Scte35Esam) > 0 { 6273 ok := object.Key("scte35Esam") 6274 ok.String(string(v.Scte35Esam)) 6275 } 6276 6277 if len(v.Scte35Source) > 0 { 6278 ok := object.Key("scte35Source") 6279 ok.String(string(v.Scte35Source)) 6280 } 6281 6282 return nil 6283} 6284 6285func awsRestjson1_serializeDocumentMpeg2Settings(v *types.Mpeg2Settings, value smithyjson.Value) error { 6286 object := value.Object() 6287 defer object.Close() 6288 6289 if len(v.AdaptiveQuantization) > 0 { 6290 ok := object.Key("adaptiveQuantization") 6291 ok.String(string(v.AdaptiveQuantization)) 6292 } 6293 6294 if v.Bitrate != 0 { 6295 ok := object.Key("bitrate") 6296 ok.Integer(v.Bitrate) 6297 } 6298 6299 if len(v.CodecLevel) > 0 { 6300 ok := object.Key("codecLevel") 6301 ok.String(string(v.CodecLevel)) 6302 } 6303 6304 if len(v.CodecProfile) > 0 { 6305 ok := object.Key("codecProfile") 6306 ok.String(string(v.CodecProfile)) 6307 } 6308 6309 if len(v.DynamicSubGop) > 0 { 6310 ok := object.Key("dynamicSubGop") 6311 ok.String(string(v.DynamicSubGop)) 6312 } 6313 6314 if len(v.FramerateControl) > 0 { 6315 ok := object.Key("framerateControl") 6316 ok.String(string(v.FramerateControl)) 6317 } 6318 6319 if len(v.FramerateConversionAlgorithm) > 0 { 6320 ok := object.Key("framerateConversionAlgorithm") 6321 ok.String(string(v.FramerateConversionAlgorithm)) 6322 } 6323 6324 if v.FramerateDenominator != 0 { 6325 ok := object.Key("framerateDenominator") 6326 ok.Integer(v.FramerateDenominator) 6327 } 6328 6329 if v.FramerateNumerator != 0 { 6330 ok := object.Key("framerateNumerator") 6331 ok.Integer(v.FramerateNumerator) 6332 } 6333 6334 if v.GopClosedCadence != 0 { 6335 ok := object.Key("gopClosedCadence") 6336 ok.Integer(v.GopClosedCadence) 6337 } 6338 6339 if v.GopSize != 0 { 6340 ok := object.Key("gopSize") 6341 ok.Double(v.GopSize) 6342 } 6343 6344 if len(v.GopSizeUnits) > 0 { 6345 ok := object.Key("gopSizeUnits") 6346 ok.String(string(v.GopSizeUnits)) 6347 } 6348 6349 if v.HrdBufferInitialFillPercentage != 0 { 6350 ok := object.Key("hrdBufferInitialFillPercentage") 6351 ok.Integer(v.HrdBufferInitialFillPercentage) 6352 } 6353 6354 if v.HrdBufferSize != 0 { 6355 ok := object.Key("hrdBufferSize") 6356 ok.Integer(v.HrdBufferSize) 6357 } 6358 6359 if len(v.InterlaceMode) > 0 { 6360 ok := object.Key("interlaceMode") 6361 ok.String(string(v.InterlaceMode)) 6362 } 6363 6364 if len(v.IntraDcPrecision) > 0 { 6365 ok := object.Key("intraDcPrecision") 6366 ok.String(string(v.IntraDcPrecision)) 6367 } 6368 6369 if v.MaxBitrate != 0 { 6370 ok := object.Key("maxBitrate") 6371 ok.Integer(v.MaxBitrate) 6372 } 6373 6374 if v.MinIInterval != 0 { 6375 ok := object.Key("minIInterval") 6376 ok.Integer(v.MinIInterval) 6377 } 6378 6379 if v.NumberBFramesBetweenReferenceFrames != 0 { 6380 ok := object.Key("numberBFramesBetweenReferenceFrames") 6381 ok.Integer(v.NumberBFramesBetweenReferenceFrames) 6382 } 6383 6384 if len(v.ParControl) > 0 { 6385 ok := object.Key("parControl") 6386 ok.String(string(v.ParControl)) 6387 } 6388 6389 if v.ParDenominator != 0 { 6390 ok := object.Key("parDenominator") 6391 ok.Integer(v.ParDenominator) 6392 } 6393 6394 if v.ParNumerator != 0 { 6395 ok := object.Key("parNumerator") 6396 ok.Integer(v.ParNumerator) 6397 } 6398 6399 if len(v.QualityTuningLevel) > 0 { 6400 ok := object.Key("qualityTuningLevel") 6401 ok.String(string(v.QualityTuningLevel)) 6402 } 6403 6404 if len(v.RateControlMode) > 0 { 6405 ok := object.Key("rateControlMode") 6406 ok.String(string(v.RateControlMode)) 6407 } 6408 6409 if len(v.ScanTypeConversionMode) > 0 { 6410 ok := object.Key("scanTypeConversionMode") 6411 ok.String(string(v.ScanTypeConversionMode)) 6412 } 6413 6414 if len(v.SceneChangeDetect) > 0 { 6415 ok := object.Key("sceneChangeDetect") 6416 ok.String(string(v.SceneChangeDetect)) 6417 } 6418 6419 if len(v.SlowPal) > 0 { 6420 ok := object.Key("slowPal") 6421 ok.String(string(v.SlowPal)) 6422 } 6423 6424 if v.Softness != 0 { 6425 ok := object.Key("softness") 6426 ok.Integer(v.Softness) 6427 } 6428 6429 if len(v.SpatialAdaptiveQuantization) > 0 { 6430 ok := object.Key("spatialAdaptiveQuantization") 6431 ok.String(string(v.SpatialAdaptiveQuantization)) 6432 } 6433 6434 if len(v.Syntax) > 0 { 6435 ok := object.Key("syntax") 6436 ok.String(string(v.Syntax)) 6437 } 6438 6439 if len(v.Telecine) > 0 { 6440 ok := object.Key("telecine") 6441 ok.String(string(v.Telecine)) 6442 } 6443 6444 if len(v.TemporalAdaptiveQuantization) > 0 { 6445 ok := object.Key("temporalAdaptiveQuantization") 6446 ok.String(string(v.TemporalAdaptiveQuantization)) 6447 } 6448 6449 return nil 6450} 6451 6452func awsRestjson1_serializeDocumentMsSmoothAdditionalManifest(v *types.MsSmoothAdditionalManifest, value smithyjson.Value) error { 6453 object := value.Object() 6454 defer object.Close() 6455 6456 if v.ManifestNameModifier != nil { 6457 ok := object.Key("manifestNameModifier") 6458 ok.String(*v.ManifestNameModifier) 6459 } 6460 6461 if v.SelectedOutputs != nil { 6462 ok := object.Key("selectedOutputs") 6463 if err := awsRestjson1_serializeDocument__listOf__stringMin1(v.SelectedOutputs, ok); err != nil { 6464 return err 6465 } 6466 } 6467 6468 return nil 6469} 6470 6471func awsRestjson1_serializeDocumentMsSmoothEncryptionSettings(v *types.MsSmoothEncryptionSettings, value smithyjson.Value) error { 6472 object := value.Object() 6473 defer object.Close() 6474 6475 if v.SpekeKeyProvider != nil { 6476 ok := object.Key("spekeKeyProvider") 6477 if err := awsRestjson1_serializeDocumentSpekeKeyProvider(v.SpekeKeyProvider, ok); err != nil { 6478 return err 6479 } 6480 } 6481 6482 return nil 6483} 6484 6485func awsRestjson1_serializeDocumentMsSmoothGroupSettings(v *types.MsSmoothGroupSettings, value smithyjson.Value) error { 6486 object := value.Object() 6487 defer object.Close() 6488 6489 if v.AdditionalManifests != nil { 6490 ok := object.Key("additionalManifests") 6491 if err := awsRestjson1_serializeDocument__listOfMsSmoothAdditionalManifest(v.AdditionalManifests, ok); err != nil { 6492 return err 6493 } 6494 } 6495 6496 if len(v.AudioDeduplication) > 0 { 6497 ok := object.Key("audioDeduplication") 6498 ok.String(string(v.AudioDeduplication)) 6499 } 6500 6501 if v.Destination != nil { 6502 ok := object.Key("destination") 6503 ok.String(*v.Destination) 6504 } 6505 6506 if v.DestinationSettings != nil { 6507 ok := object.Key("destinationSettings") 6508 if err := awsRestjson1_serializeDocumentDestinationSettings(v.DestinationSettings, ok); err != nil { 6509 return err 6510 } 6511 } 6512 6513 if v.Encryption != nil { 6514 ok := object.Key("encryption") 6515 if err := awsRestjson1_serializeDocumentMsSmoothEncryptionSettings(v.Encryption, ok); err != nil { 6516 return err 6517 } 6518 } 6519 6520 if v.FragmentLength != 0 { 6521 ok := object.Key("fragmentLength") 6522 ok.Integer(v.FragmentLength) 6523 } 6524 6525 if len(v.ManifestEncoding) > 0 { 6526 ok := object.Key("manifestEncoding") 6527 ok.String(string(v.ManifestEncoding)) 6528 } 6529 6530 return nil 6531} 6532 6533func awsRestjson1_serializeDocumentMxfSettings(v *types.MxfSettings, value smithyjson.Value) error { 6534 object := value.Object() 6535 defer object.Close() 6536 6537 if len(v.AfdSignaling) > 0 { 6538 ok := object.Key("afdSignaling") 6539 ok.String(string(v.AfdSignaling)) 6540 } 6541 6542 if len(v.Profile) > 0 { 6543 ok := object.Key("profile") 6544 ok.String(string(v.Profile)) 6545 } 6546 6547 return nil 6548} 6549 6550func awsRestjson1_serializeDocumentNexGuardFileMarkerSettings(v *types.NexGuardFileMarkerSettings, value smithyjson.Value) error { 6551 object := value.Object() 6552 defer object.Close() 6553 6554 if v.License != nil { 6555 ok := object.Key("license") 6556 ok.String(*v.License) 6557 } 6558 6559 if v.Payload != 0 { 6560 ok := object.Key("payload") 6561 ok.Integer(v.Payload) 6562 } 6563 6564 if v.Preset != nil { 6565 ok := object.Key("preset") 6566 ok.String(*v.Preset) 6567 } 6568 6569 if len(v.Strength) > 0 { 6570 ok := object.Key("strength") 6571 ok.String(string(v.Strength)) 6572 } 6573 6574 return nil 6575} 6576 6577func awsRestjson1_serializeDocumentNielsenConfiguration(v *types.NielsenConfiguration, value smithyjson.Value) error { 6578 object := value.Object() 6579 defer object.Close() 6580 6581 if v.BreakoutCode != 0 { 6582 ok := object.Key("breakoutCode") 6583 ok.Integer(v.BreakoutCode) 6584 } 6585 6586 if v.DistributorId != nil { 6587 ok := object.Key("distributorId") 6588 ok.String(*v.DistributorId) 6589 } 6590 6591 return nil 6592} 6593 6594func awsRestjson1_serializeDocumentNielsenNonLinearWatermarkSettings(v *types.NielsenNonLinearWatermarkSettings, value smithyjson.Value) error { 6595 object := value.Object() 6596 defer object.Close() 6597 6598 if len(v.ActiveWatermarkProcess) > 0 { 6599 ok := object.Key("activeWatermarkProcess") 6600 ok.String(string(v.ActiveWatermarkProcess)) 6601 } 6602 6603 if v.AdiFilename != nil { 6604 ok := object.Key("adiFilename") 6605 ok.String(*v.AdiFilename) 6606 } 6607 6608 if v.AssetId != nil { 6609 ok := object.Key("assetId") 6610 ok.String(*v.AssetId) 6611 } 6612 6613 if v.AssetName != nil { 6614 ok := object.Key("assetName") 6615 ok.String(*v.AssetName) 6616 } 6617 6618 if v.CbetSourceId != nil { 6619 ok := object.Key("cbetSourceId") 6620 ok.String(*v.CbetSourceId) 6621 } 6622 6623 if v.EpisodeId != nil { 6624 ok := object.Key("episodeId") 6625 ok.String(*v.EpisodeId) 6626 } 6627 6628 if v.MetadataDestination != nil { 6629 ok := object.Key("metadataDestination") 6630 ok.String(*v.MetadataDestination) 6631 } 6632 6633 if v.SourceId != 0 { 6634 ok := object.Key("sourceId") 6635 ok.Integer(v.SourceId) 6636 } 6637 6638 if len(v.SourceWatermarkStatus) > 0 { 6639 ok := object.Key("sourceWatermarkStatus") 6640 ok.String(string(v.SourceWatermarkStatus)) 6641 } 6642 6643 if v.TicServerUrl != nil { 6644 ok := object.Key("ticServerUrl") 6645 ok.String(*v.TicServerUrl) 6646 } 6647 6648 if len(v.UniqueTicPerAudioTrack) > 0 { 6649 ok := object.Key("uniqueTicPerAudioTrack") 6650 ok.String(string(v.UniqueTicPerAudioTrack)) 6651 } 6652 6653 return nil 6654} 6655 6656func awsRestjson1_serializeDocumentNoiseReducer(v *types.NoiseReducer, value smithyjson.Value) error { 6657 object := value.Object() 6658 defer object.Close() 6659 6660 if len(v.Filter) > 0 { 6661 ok := object.Key("filter") 6662 ok.String(string(v.Filter)) 6663 } 6664 6665 if v.FilterSettings != nil { 6666 ok := object.Key("filterSettings") 6667 if err := awsRestjson1_serializeDocumentNoiseReducerFilterSettings(v.FilterSettings, ok); err != nil { 6668 return err 6669 } 6670 } 6671 6672 if v.SpatialFilterSettings != nil { 6673 ok := object.Key("spatialFilterSettings") 6674 if err := awsRestjson1_serializeDocumentNoiseReducerSpatialFilterSettings(v.SpatialFilterSettings, ok); err != nil { 6675 return err 6676 } 6677 } 6678 6679 if v.TemporalFilterSettings != nil { 6680 ok := object.Key("temporalFilterSettings") 6681 if err := awsRestjson1_serializeDocumentNoiseReducerTemporalFilterSettings(v.TemporalFilterSettings, ok); err != nil { 6682 return err 6683 } 6684 } 6685 6686 return nil 6687} 6688 6689func awsRestjson1_serializeDocumentNoiseReducerFilterSettings(v *types.NoiseReducerFilterSettings, value smithyjson.Value) error { 6690 object := value.Object() 6691 defer object.Close() 6692 6693 if v.Strength != 0 { 6694 ok := object.Key("strength") 6695 ok.Integer(v.Strength) 6696 } 6697 6698 return nil 6699} 6700 6701func awsRestjson1_serializeDocumentNoiseReducerSpatialFilterSettings(v *types.NoiseReducerSpatialFilterSettings, value smithyjson.Value) error { 6702 object := value.Object() 6703 defer object.Close() 6704 6705 if v.PostFilterSharpenStrength != 0 { 6706 ok := object.Key("postFilterSharpenStrength") 6707 ok.Integer(v.PostFilterSharpenStrength) 6708 } 6709 6710 if v.Speed != 0 { 6711 ok := object.Key("speed") 6712 ok.Integer(v.Speed) 6713 } 6714 6715 if v.Strength != 0 { 6716 ok := object.Key("strength") 6717 ok.Integer(v.Strength) 6718 } 6719 6720 return nil 6721} 6722 6723func awsRestjson1_serializeDocumentNoiseReducerTemporalFilterSettings(v *types.NoiseReducerTemporalFilterSettings, value smithyjson.Value) error { 6724 object := value.Object() 6725 defer object.Close() 6726 6727 if v.AggressiveMode != 0 { 6728 ok := object.Key("aggressiveMode") 6729 ok.Integer(v.AggressiveMode) 6730 } 6731 6732 if len(v.PostTemporalSharpening) > 0 { 6733 ok := object.Key("postTemporalSharpening") 6734 ok.String(string(v.PostTemporalSharpening)) 6735 } 6736 6737 if v.Speed != 0 { 6738 ok := object.Key("speed") 6739 ok.Integer(v.Speed) 6740 } 6741 6742 if v.Strength != 0 { 6743 ok := object.Key("strength") 6744 ok.Integer(v.Strength) 6745 } 6746 6747 return nil 6748} 6749 6750func awsRestjson1_serializeDocumentOpusSettings(v *types.OpusSettings, value smithyjson.Value) error { 6751 object := value.Object() 6752 defer object.Close() 6753 6754 if v.Bitrate != 0 { 6755 ok := object.Key("bitrate") 6756 ok.Integer(v.Bitrate) 6757 } 6758 6759 if v.Channels != 0 { 6760 ok := object.Key("channels") 6761 ok.Integer(v.Channels) 6762 } 6763 6764 if v.SampleRate != 0 { 6765 ok := object.Key("sampleRate") 6766 ok.Integer(v.SampleRate) 6767 } 6768 6769 return nil 6770} 6771 6772func awsRestjson1_serializeDocumentOutput(v *types.Output, value smithyjson.Value) error { 6773 object := value.Object() 6774 defer object.Close() 6775 6776 if v.AudioDescriptions != nil { 6777 ok := object.Key("audioDescriptions") 6778 if err := awsRestjson1_serializeDocument__listOfAudioDescription(v.AudioDescriptions, ok); err != nil { 6779 return err 6780 } 6781 } 6782 6783 if v.CaptionDescriptions != nil { 6784 ok := object.Key("captionDescriptions") 6785 if err := awsRestjson1_serializeDocument__listOfCaptionDescription(v.CaptionDescriptions, ok); err != nil { 6786 return err 6787 } 6788 } 6789 6790 if v.ContainerSettings != nil { 6791 ok := object.Key("containerSettings") 6792 if err := awsRestjson1_serializeDocumentContainerSettings(v.ContainerSettings, ok); err != nil { 6793 return err 6794 } 6795 } 6796 6797 if v.Extension != nil { 6798 ok := object.Key("extension") 6799 ok.String(*v.Extension) 6800 } 6801 6802 if v.NameModifier != nil { 6803 ok := object.Key("nameModifier") 6804 ok.String(*v.NameModifier) 6805 } 6806 6807 if v.OutputSettings != nil { 6808 ok := object.Key("outputSettings") 6809 if err := awsRestjson1_serializeDocumentOutputSettings(v.OutputSettings, ok); err != nil { 6810 return err 6811 } 6812 } 6813 6814 if v.Preset != nil { 6815 ok := object.Key("preset") 6816 ok.String(*v.Preset) 6817 } 6818 6819 if v.VideoDescription != nil { 6820 ok := object.Key("videoDescription") 6821 if err := awsRestjson1_serializeDocumentVideoDescription(v.VideoDescription, ok); err != nil { 6822 return err 6823 } 6824 } 6825 6826 return nil 6827} 6828 6829func awsRestjson1_serializeDocumentOutputChannelMapping(v *types.OutputChannelMapping, value smithyjson.Value) error { 6830 object := value.Object() 6831 defer object.Close() 6832 6833 if v.InputChannels != nil { 6834 ok := object.Key("inputChannels") 6835 if err := awsRestjson1_serializeDocument__listOf__integerMinNegative60Max6(v.InputChannels, ok); err != nil { 6836 return err 6837 } 6838 } 6839 6840 if v.InputChannelsFineTune != nil { 6841 ok := object.Key("inputChannelsFineTune") 6842 if err := awsRestjson1_serializeDocument__listOf__doubleMinNegative60Max6(v.InputChannelsFineTune, ok); err != nil { 6843 return err 6844 } 6845 } 6846 6847 return nil 6848} 6849 6850func awsRestjson1_serializeDocumentOutputGroup(v *types.OutputGroup, value smithyjson.Value) error { 6851 object := value.Object() 6852 defer object.Close() 6853 6854 if v.AutomatedEncodingSettings != nil { 6855 ok := object.Key("automatedEncodingSettings") 6856 if err := awsRestjson1_serializeDocumentAutomatedEncodingSettings(v.AutomatedEncodingSettings, ok); err != nil { 6857 return err 6858 } 6859 } 6860 6861 if v.CustomName != nil { 6862 ok := object.Key("customName") 6863 ok.String(*v.CustomName) 6864 } 6865 6866 if v.Name != nil { 6867 ok := object.Key("name") 6868 ok.String(*v.Name) 6869 } 6870 6871 if v.OutputGroupSettings != nil { 6872 ok := object.Key("outputGroupSettings") 6873 if err := awsRestjson1_serializeDocumentOutputGroupSettings(v.OutputGroupSettings, ok); err != nil { 6874 return err 6875 } 6876 } 6877 6878 if v.Outputs != nil { 6879 ok := object.Key("outputs") 6880 if err := awsRestjson1_serializeDocument__listOfOutput(v.Outputs, ok); err != nil { 6881 return err 6882 } 6883 } 6884 6885 return nil 6886} 6887 6888func awsRestjson1_serializeDocumentOutputGroupSettings(v *types.OutputGroupSettings, value smithyjson.Value) error { 6889 object := value.Object() 6890 defer object.Close() 6891 6892 if v.CmafGroupSettings != nil { 6893 ok := object.Key("cmafGroupSettings") 6894 if err := awsRestjson1_serializeDocumentCmafGroupSettings(v.CmafGroupSettings, ok); err != nil { 6895 return err 6896 } 6897 } 6898 6899 if v.DashIsoGroupSettings != nil { 6900 ok := object.Key("dashIsoGroupSettings") 6901 if err := awsRestjson1_serializeDocumentDashIsoGroupSettings(v.DashIsoGroupSettings, ok); err != nil { 6902 return err 6903 } 6904 } 6905 6906 if v.FileGroupSettings != nil { 6907 ok := object.Key("fileGroupSettings") 6908 if err := awsRestjson1_serializeDocumentFileGroupSettings(v.FileGroupSettings, ok); err != nil { 6909 return err 6910 } 6911 } 6912 6913 if v.HlsGroupSettings != nil { 6914 ok := object.Key("hlsGroupSettings") 6915 if err := awsRestjson1_serializeDocumentHlsGroupSettings(v.HlsGroupSettings, ok); err != nil { 6916 return err 6917 } 6918 } 6919 6920 if v.MsSmoothGroupSettings != nil { 6921 ok := object.Key("msSmoothGroupSettings") 6922 if err := awsRestjson1_serializeDocumentMsSmoothGroupSettings(v.MsSmoothGroupSettings, ok); err != nil { 6923 return err 6924 } 6925 } 6926 6927 if len(v.Type) > 0 { 6928 ok := object.Key("type") 6929 ok.String(string(v.Type)) 6930 } 6931 6932 return nil 6933} 6934 6935func awsRestjson1_serializeDocumentOutputSettings(v *types.OutputSettings, value smithyjson.Value) error { 6936 object := value.Object() 6937 defer object.Close() 6938 6939 if v.HlsSettings != nil { 6940 ok := object.Key("hlsSettings") 6941 if err := awsRestjson1_serializeDocumentHlsSettings(v.HlsSettings, ok); err != nil { 6942 return err 6943 } 6944 } 6945 6946 return nil 6947} 6948 6949func awsRestjson1_serializeDocumentPartnerWatermarking(v *types.PartnerWatermarking, value smithyjson.Value) error { 6950 object := value.Object() 6951 defer object.Close() 6952 6953 if v.NexguardFileMarkerSettings != nil { 6954 ok := object.Key("nexguardFileMarkerSettings") 6955 if err := awsRestjson1_serializeDocumentNexGuardFileMarkerSettings(v.NexguardFileMarkerSettings, ok); err != nil { 6956 return err 6957 } 6958 } 6959 6960 return nil 6961} 6962 6963func awsRestjson1_serializeDocumentPresetSettings(v *types.PresetSettings, value smithyjson.Value) error { 6964 object := value.Object() 6965 defer object.Close() 6966 6967 if v.AudioDescriptions != nil { 6968 ok := object.Key("audioDescriptions") 6969 if err := awsRestjson1_serializeDocument__listOfAudioDescription(v.AudioDescriptions, ok); err != nil { 6970 return err 6971 } 6972 } 6973 6974 if v.CaptionDescriptions != nil { 6975 ok := object.Key("captionDescriptions") 6976 if err := awsRestjson1_serializeDocument__listOfCaptionDescriptionPreset(v.CaptionDescriptions, ok); err != nil { 6977 return err 6978 } 6979 } 6980 6981 if v.ContainerSettings != nil { 6982 ok := object.Key("containerSettings") 6983 if err := awsRestjson1_serializeDocumentContainerSettings(v.ContainerSettings, ok); err != nil { 6984 return err 6985 } 6986 } 6987 6988 if v.VideoDescription != nil { 6989 ok := object.Key("videoDescription") 6990 if err := awsRestjson1_serializeDocumentVideoDescription(v.VideoDescription, ok); err != nil { 6991 return err 6992 } 6993 } 6994 6995 return nil 6996} 6997 6998func awsRestjson1_serializeDocumentProresSettings(v *types.ProresSettings, value smithyjson.Value) error { 6999 object := value.Object() 7000 defer object.Close() 7001 7002 if len(v.CodecProfile) > 0 { 7003 ok := object.Key("codecProfile") 7004 ok.String(string(v.CodecProfile)) 7005 } 7006 7007 if len(v.FramerateControl) > 0 { 7008 ok := object.Key("framerateControl") 7009 ok.String(string(v.FramerateControl)) 7010 } 7011 7012 if len(v.FramerateConversionAlgorithm) > 0 { 7013 ok := object.Key("framerateConversionAlgorithm") 7014 ok.String(string(v.FramerateConversionAlgorithm)) 7015 } 7016 7017 if v.FramerateDenominator != 0 { 7018 ok := object.Key("framerateDenominator") 7019 ok.Integer(v.FramerateDenominator) 7020 } 7021 7022 if v.FramerateNumerator != 0 { 7023 ok := object.Key("framerateNumerator") 7024 ok.Integer(v.FramerateNumerator) 7025 } 7026 7027 if len(v.InterlaceMode) > 0 { 7028 ok := object.Key("interlaceMode") 7029 ok.String(string(v.InterlaceMode)) 7030 } 7031 7032 if len(v.ParControl) > 0 { 7033 ok := object.Key("parControl") 7034 ok.String(string(v.ParControl)) 7035 } 7036 7037 if v.ParDenominator != 0 { 7038 ok := object.Key("parDenominator") 7039 ok.Integer(v.ParDenominator) 7040 } 7041 7042 if v.ParNumerator != 0 { 7043 ok := object.Key("parNumerator") 7044 ok.Integer(v.ParNumerator) 7045 } 7046 7047 if len(v.ScanTypeConversionMode) > 0 { 7048 ok := object.Key("scanTypeConversionMode") 7049 ok.String(string(v.ScanTypeConversionMode)) 7050 } 7051 7052 if len(v.SlowPal) > 0 { 7053 ok := object.Key("slowPal") 7054 ok.String(string(v.SlowPal)) 7055 } 7056 7057 if len(v.Telecine) > 0 { 7058 ok := object.Key("telecine") 7059 ok.String(string(v.Telecine)) 7060 } 7061 7062 return nil 7063} 7064 7065func awsRestjson1_serializeDocumentRectangle(v *types.Rectangle, value smithyjson.Value) error { 7066 object := value.Object() 7067 defer object.Close() 7068 7069 if v.Height != 0 { 7070 ok := object.Key("height") 7071 ok.Integer(v.Height) 7072 } 7073 7074 if v.Width != 0 { 7075 ok := object.Key("width") 7076 ok.Integer(v.Width) 7077 } 7078 7079 if v.X != 0 { 7080 ok := object.Key("x") 7081 ok.Integer(v.X) 7082 } 7083 7084 if v.Y != 0 { 7085 ok := object.Key("y") 7086 ok.Integer(v.Y) 7087 } 7088 7089 return nil 7090} 7091 7092func awsRestjson1_serializeDocumentRemixSettings(v *types.RemixSettings, value smithyjson.Value) error { 7093 object := value.Object() 7094 defer object.Close() 7095 7096 if v.ChannelMapping != nil { 7097 ok := object.Key("channelMapping") 7098 if err := awsRestjson1_serializeDocumentChannelMapping(v.ChannelMapping, ok); err != nil { 7099 return err 7100 } 7101 } 7102 7103 if v.ChannelsIn != 0 { 7104 ok := object.Key("channelsIn") 7105 ok.Integer(v.ChannelsIn) 7106 } 7107 7108 if v.ChannelsOut != 0 { 7109 ok := object.Key("channelsOut") 7110 ok.Integer(v.ChannelsOut) 7111 } 7112 7113 return nil 7114} 7115 7116func awsRestjson1_serializeDocumentReservationPlanSettings(v *types.ReservationPlanSettings, value smithyjson.Value) error { 7117 object := value.Object() 7118 defer object.Close() 7119 7120 if len(v.Commitment) > 0 { 7121 ok := object.Key("commitment") 7122 ok.String(string(v.Commitment)) 7123 } 7124 7125 if len(v.RenewalType) > 0 { 7126 ok := object.Key("renewalType") 7127 ok.String(string(v.RenewalType)) 7128 } 7129 7130 { 7131 ok := object.Key("reservedSlots") 7132 ok.Integer(v.ReservedSlots) 7133 } 7134 7135 return nil 7136} 7137 7138func awsRestjson1_serializeDocumentS3DestinationAccessControl(v *types.S3DestinationAccessControl, value smithyjson.Value) error { 7139 object := value.Object() 7140 defer object.Close() 7141 7142 if len(v.CannedAcl) > 0 { 7143 ok := object.Key("cannedAcl") 7144 ok.String(string(v.CannedAcl)) 7145 } 7146 7147 return nil 7148} 7149 7150func awsRestjson1_serializeDocumentS3DestinationSettings(v *types.S3DestinationSettings, value smithyjson.Value) error { 7151 object := value.Object() 7152 defer object.Close() 7153 7154 if v.AccessControl != nil { 7155 ok := object.Key("accessControl") 7156 if err := awsRestjson1_serializeDocumentS3DestinationAccessControl(v.AccessControl, ok); err != nil { 7157 return err 7158 } 7159 } 7160 7161 if v.Encryption != nil { 7162 ok := object.Key("encryption") 7163 if err := awsRestjson1_serializeDocumentS3EncryptionSettings(v.Encryption, ok); err != nil { 7164 return err 7165 } 7166 } 7167 7168 return nil 7169} 7170 7171func awsRestjson1_serializeDocumentS3EncryptionSettings(v *types.S3EncryptionSettings, value smithyjson.Value) error { 7172 object := value.Object() 7173 defer object.Close() 7174 7175 if len(v.EncryptionType) > 0 { 7176 ok := object.Key("encryptionType") 7177 ok.String(string(v.EncryptionType)) 7178 } 7179 7180 if v.KmsKeyArn != nil { 7181 ok := object.Key("kmsKeyArn") 7182 ok.String(*v.KmsKeyArn) 7183 } 7184 7185 return nil 7186} 7187 7188func awsRestjson1_serializeDocumentSccDestinationSettings(v *types.SccDestinationSettings, value smithyjson.Value) error { 7189 object := value.Object() 7190 defer object.Close() 7191 7192 if len(v.Framerate) > 0 { 7193 ok := object.Key("framerate") 7194 ok.String(string(v.Framerate)) 7195 } 7196 7197 return nil 7198} 7199 7200func awsRestjson1_serializeDocumentSpekeKeyProvider(v *types.SpekeKeyProvider, value smithyjson.Value) error { 7201 object := value.Object() 7202 defer object.Close() 7203 7204 if v.CertificateArn != nil { 7205 ok := object.Key("certificateArn") 7206 ok.String(*v.CertificateArn) 7207 } 7208 7209 if v.ResourceId != nil { 7210 ok := object.Key("resourceId") 7211 ok.String(*v.ResourceId) 7212 } 7213 7214 if v.SystemIds != nil { 7215 ok := object.Key("systemIds") 7216 if err := awsRestjson1_serializeDocument__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12(v.SystemIds, ok); err != nil { 7217 return err 7218 } 7219 } 7220 7221 if v.Url != nil { 7222 ok := object.Key("url") 7223 ok.String(*v.Url) 7224 } 7225 7226 return nil 7227} 7228 7229func awsRestjson1_serializeDocumentSpekeKeyProviderCmaf(v *types.SpekeKeyProviderCmaf, value smithyjson.Value) error { 7230 object := value.Object() 7231 defer object.Close() 7232 7233 if v.CertificateArn != nil { 7234 ok := object.Key("certificateArn") 7235 ok.String(*v.CertificateArn) 7236 } 7237 7238 if v.DashSignaledSystemIds != nil { 7239 ok := object.Key("dashSignaledSystemIds") 7240 if err := awsRestjson1_serializeDocument__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12(v.DashSignaledSystemIds, ok); err != nil { 7241 return err 7242 } 7243 } 7244 7245 if v.HlsSignaledSystemIds != nil { 7246 ok := object.Key("hlsSignaledSystemIds") 7247 if err := awsRestjson1_serializeDocument__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12(v.HlsSignaledSystemIds, ok); err != nil { 7248 return err 7249 } 7250 } 7251 7252 if v.ResourceId != nil { 7253 ok := object.Key("resourceId") 7254 ok.String(*v.ResourceId) 7255 } 7256 7257 if v.Url != nil { 7258 ok := object.Key("url") 7259 ok.String(*v.Url) 7260 } 7261 7262 return nil 7263} 7264 7265func awsRestjson1_serializeDocumentStaticKeyProvider(v *types.StaticKeyProvider, value smithyjson.Value) error { 7266 object := value.Object() 7267 defer object.Close() 7268 7269 if v.KeyFormat != nil { 7270 ok := object.Key("keyFormat") 7271 ok.String(*v.KeyFormat) 7272 } 7273 7274 if v.KeyFormatVersions != nil { 7275 ok := object.Key("keyFormatVersions") 7276 ok.String(*v.KeyFormatVersions) 7277 } 7278 7279 if v.StaticKeyValue != nil { 7280 ok := object.Key("staticKeyValue") 7281 ok.String(*v.StaticKeyValue) 7282 } 7283 7284 if v.Url != nil { 7285 ok := object.Key("url") 7286 ok.String(*v.Url) 7287 } 7288 7289 return nil 7290} 7291 7292func awsRestjson1_serializeDocumentTeletextDestinationSettings(v *types.TeletextDestinationSettings, value smithyjson.Value) error { 7293 object := value.Object() 7294 defer object.Close() 7295 7296 if v.PageNumber != nil { 7297 ok := object.Key("pageNumber") 7298 ok.String(*v.PageNumber) 7299 } 7300 7301 if v.PageTypes != nil { 7302 ok := object.Key("pageTypes") 7303 if err := awsRestjson1_serializeDocument__listOfTeletextPageType(v.PageTypes, ok); err != nil { 7304 return err 7305 } 7306 } 7307 7308 return nil 7309} 7310 7311func awsRestjson1_serializeDocumentTeletextSourceSettings(v *types.TeletextSourceSettings, value smithyjson.Value) error { 7312 object := value.Object() 7313 defer object.Close() 7314 7315 if v.PageNumber != nil { 7316 ok := object.Key("pageNumber") 7317 ok.String(*v.PageNumber) 7318 } 7319 7320 return nil 7321} 7322 7323func awsRestjson1_serializeDocumentTimecodeBurnin(v *types.TimecodeBurnin, value smithyjson.Value) error { 7324 object := value.Object() 7325 defer object.Close() 7326 7327 if v.FontSize != 0 { 7328 ok := object.Key("fontSize") 7329 ok.Integer(v.FontSize) 7330 } 7331 7332 if len(v.Position) > 0 { 7333 ok := object.Key("position") 7334 ok.String(string(v.Position)) 7335 } 7336 7337 if v.Prefix != nil { 7338 ok := object.Key("prefix") 7339 ok.String(*v.Prefix) 7340 } 7341 7342 return nil 7343} 7344 7345func awsRestjson1_serializeDocumentTimecodeConfig(v *types.TimecodeConfig, value smithyjson.Value) error { 7346 object := value.Object() 7347 defer object.Close() 7348 7349 if v.Anchor != nil { 7350 ok := object.Key("anchor") 7351 ok.String(*v.Anchor) 7352 } 7353 7354 if len(v.Source) > 0 { 7355 ok := object.Key("source") 7356 ok.String(string(v.Source)) 7357 } 7358 7359 if v.Start != nil { 7360 ok := object.Key("start") 7361 ok.String(*v.Start) 7362 } 7363 7364 if v.TimestampOffset != nil { 7365 ok := object.Key("timestampOffset") 7366 ok.String(*v.TimestampOffset) 7367 } 7368 7369 return nil 7370} 7371 7372func awsRestjson1_serializeDocumentTimedMetadataInsertion(v *types.TimedMetadataInsertion, value smithyjson.Value) error { 7373 object := value.Object() 7374 defer object.Close() 7375 7376 if v.Id3Insertions != nil { 7377 ok := object.Key("id3Insertions") 7378 if err := awsRestjson1_serializeDocument__listOfId3Insertion(v.Id3Insertions, ok); err != nil { 7379 return err 7380 } 7381 } 7382 7383 return nil 7384} 7385 7386func awsRestjson1_serializeDocumentTrackSourceSettings(v *types.TrackSourceSettings, value smithyjson.Value) error { 7387 object := value.Object() 7388 defer object.Close() 7389 7390 if v.TrackNumber != 0 { 7391 ok := object.Key("trackNumber") 7392 ok.Integer(v.TrackNumber) 7393 } 7394 7395 return nil 7396} 7397 7398func awsRestjson1_serializeDocumentTtmlDestinationSettings(v *types.TtmlDestinationSettings, value smithyjson.Value) error { 7399 object := value.Object() 7400 defer object.Close() 7401 7402 if len(v.StylePassthrough) > 0 { 7403 ok := object.Key("stylePassthrough") 7404 ok.String(string(v.StylePassthrough)) 7405 } 7406 7407 return nil 7408} 7409 7410func awsRestjson1_serializeDocumentVc3Settings(v *types.Vc3Settings, value smithyjson.Value) error { 7411 object := value.Object() 7412 defer object.Close() 7413 7414 if len(v.FramerateControl) > 0 { 7415 ok := object.Key("framerateControl") 7416 ok.String(string(v.FramerateControl)) 7417 } 7418 7419 if len(v.FramerateConversionAlgorithm) > 0 { 7420 ok := object.Key("framerateConversionAlgorithm") 7421 ok.String(string(v.FramerateConversionAlgorithm)) 7422 } 7423 7424 if v.FramerateDenominator != 0 { 7425 ok := object.Key("framerateDenominator") 7426 ok.Integer(v.FramerateDenominator) 7427 } 7428 7429 if v.FramerateNumerator != 0 { 7430 ok := object.Key("framerateNumerator") 7431 ok.Integer(v.FramerateNumerator) 7432 } 7433 7434 if len(v.InterlaceMode) > 0 { 7435 ok := object.Key("interlaceMode") 7436 ok.String(string(v.InterlaceMode)) 7437 } 7438 7439 if len(v.ScanTypeConversionMode) > 0 { 7440 ok := object.Key("scanTypeConversionMode") 7441 ok.String(string(v.ScanTypeConversionMode)) 7442 } 7443 7444 if len(v.SlowPal) > 0 { 7445 ok := object.Key("slowPal") 7446 ok.String(string(v.SlowPal)) 7447 } 7448 7449 if len(v.Telecine) > 0 { 7450 ok := object.Key("telecine") 7451 ok.String(string(v.Telecine)) 7452 } 7453 7454 if len(v.Vc3Class) > 0 { 7455 ok := object.Key("vc3Class") 7456 ok.String(string(v.Vc3Class)) 7457 } 7458 7459 return nil 7460} 7461 7462func awsRestjson1_serializeDocumentVideoCodecSettings(v *types.VideoCodecSettings, value smithyjson.Value) error { 7463 object := value.Object() 7464 defer object.Close() 7465 7466 if v.Av1Settings != nil { 7467 ok := object.Key("av1Settings") 7468 if err := awsRestjson1_serializeDocumentAv1Settings(v.Av1Settings, ok); err != nil { 7469 return err 7470 } 7471 } 7472 7473 if v.AvcIntraSettings != nil { 7474 ok := object.Key("avcIntraSettings") 7475 if err := awsRestjson1_serializeDocumentAvcIntraSettings(v.AvcIntraSettings, ok); err != nil { 7476 return err 7477 } 7478 } 7479 7480 if len(v.Codec) > 0 { 7481 ok := object.Key("codec") 7482 ok.String(string(v.Codec)) 7483 } 7484 7485 if v.FrameCaptureSettings != nil { 7486 ok := object.Key("frameCaptureSettings") 7487 if err := awsRestjson1_serializeDocumentFrameCaptureSettings(v.FrameCaptureSettings, ok); err != nil { 7488 return err 7489 } 7490 } 7491 7492 if v.H264Settings != nil { 7493 ok := object.Key("h264Settings") 7494 if err := awsRestjson1_serializeDocumentH264Settings(v.H264Settings, ok); err != nil { 7495 return err 7496 } 7497 } 7498 7499 if v.H265Settings != nil { 7500 ok := object.Key("h265Settings") 7501 if err := awsRestjson1_serializeDocumentH265Settings(v.H265Settings, ok); err != nil { 7502 return err 7503 } 7504 } 7505 7506 if v.Mpeg2Settings != nil { 7507 ok := object.Key("mpeg2Settings") 7508 if err := awsRestjson1_serializeDocumentMpeg2Settings(v.Mpeg2Settings, ok); err != nil { 7509 return err 7510 } 7511 } 7512 7513 if v.ProresSettings != nil { 7514 ok := object.Key("proresSettings") 7515 if err := awsRestjson1_serializeDocumentProresSettings(v.ProresSettings, ok); err != nil { 7516 return err 7517 } 7518 } 7519 7520 if v.Vc3Settings != nil { 7521 ok := object.Key("vc3Settings") 7522 if err := awsRestjson1_serializeDocumentVc3Settings(v.Vc3Settings, ok); err != nil { 7523 return err 7524 } 7525 } 7526 7527 if v.Vp8Settings != nil { 7528 ok := object.Key("vp8Settings") 7529 if err := awsRestjson1_serializeDocumentVp8Settings(v.Vp8Settings, ok); err != nil { 7530 return err 7531 } 7532 } 7533 7534 if v.Vp9Settings != nil { 7535 ok := object.Key("vp9Settings") 7536 if err := awsRestjson1_serializeDocumentVp9Settings(v.Vp9Settings, ok); err != nil { 7537 return err 7538 } 7539 } 7540 7541 return nil 7542} 7543 7544func awsRestjson1_serializeDocumentVideoDescription(v *types.VideoDescription, value smithyjson.Value) error { 7545 object := value.Object() 7546 defer object.Close() 7547 7548 if len(v.AfdSignaling) > 0 { 7549 ok := object.Key("afdSignaling") 7550 ok.String(string(v.AfdSignaling)) 7551 } 7552 7553 if len(v.AntiAlias) > 0 { 7554 ok := object.Key("antiAlias") 7555 ok.String(string(v.AntiAlias)) 7556 } 7557 7558 if v.CodecSettings != nil { 7559 ok := object.Key("codecSettings") 7560 if err := awsRestjson1_serializeDocumentVideoCodecSettings(v.CodecSettings, ok); err != nil { 7561 return err 7562 } 7563 } 7564 7565 if len(v.ColorMetadata) > 0 { 7566 ok := object.Key("colorMetadata") 7567 ok.String(string(v.ColorMetadata)) 7568 } 7569 7570 if v.Crop != nil { 7571 ok := object.Key("crop") 7572 if err := awsRestjson1_serializeDocumentRectangle(v.Crop, ok); err != nil { 7573 return err 7574 } 7575 } 7576 7577 if len(v.DropFrameTimecode) > 0 { 7578 ok := object.Key("dropFrameTimecode") 7579 ok.String(string(v.DropFrameTimecode)) 7580 } 7581 7582 if v.FixedAfd != 0 { 7583 ok := object.Key("fixedAfd") 7584 ok.Integer(v.FixedAfd) 7585 } 7586 7587 if v.Height != 0 { 7588 ok := object.Key("height") 7589 ok.Integer(v.Height) 7590 } 7591 7592 if v.Position != nil { 7593 ok := object.Key("position") 7594 if err := awsRestjson1_serializeDocumentRectangle(v.Position, ok); err != nil { 7595 return err 7596 } 7597 } 7598 7599 if len(v.RespondToAfd) > 0 { 7600 ok := object.Key("respondToAfd") 7601 ok.String(string(v.RespondToAfd)) 7602 } 7603 7604 if len(v.ScalingBehavior) > 0 { 7605 ok := object.Key("scalingBehavior") 7606 ok.String(string(v.ScalingBehavior)) 7607 } 7608 7609 if v.Sharpness != 0 { 7610 ok := object.Key("sharpness") 7611 ok.Integer(v.Sharpness) 7612 } 7613 7614 if len(v.TimecodeInsertion) > 0 { 7615 ok := object.Key("timecodeInsertion") 7616 ok.String(string(v.TimecodeInsertion)) 7617 } 7618 7619 if v.VideoPreprocessors != nil { 7620 ok := object.Key("videoPreprocessors") 7621 if err := awsRestjson1_serializeDocumentVideoPreprocessor(v.VideoPreprocessors, ok); err != nil { 7622 return err 7623 } 7624 } 7625 7626 if v.Width != 0 { 7627 ok := object.Key("width") 7628 ok.Integer(v.Width) 7629 } 7630 7631 return nil 7632} 7633 7634func awsRestjson1_serializeDocumentVideoPreprocessor(v *types.VideoPreprocessor, value smithyjson.Value) error { 7635 object := value.Object() 7636 defer object.Close() 7637 7638 if v.ColorCorrector != nil { 7639 ok := object.Key("colorCorrector") 7640 if err := awsRestjson1_serializeDocumentColorCorrector(v.ColorCorrector, ok); err != nil { 7641 return err 7642 } 7643 } 7644 7645 if v.Deinterlacer != nil { 7646 ok := object.Key("deinterlacer") 7647 if err := awsRestjson1_serializeDocumentDeinterlacer(v.Deinterlacer, ok); err != nil { 7648 return err 7649 } 7650 } 7651 7652 if v.DolbyVision != nil { 7653 ok := object.Key("dolbyVision") 7654 if err := awsRestjson1_serializeDocumentDolbyVision(v.DolbyVision, ok); err != nil { 7655 return err 7656 } 7657 } 7658 7659 if v.ImageInserter != nil { 7660 ok := object.Key("imageInserter") 7661 if err := awsRestjson1_serializeDocumentImageInserter(v.ImageInserter, ok); err != nil { 7662 return err 7663 } 7664 } 7665 7666 if v.NoiseReducer != nil { 7667 ok := object.Key("noiseReducer") 7668 if err := awsRestjson1_serializeDocumentNoiseReducer(v.NoiseReducer, ok); err != nil { 7669 return err 7670 } 7671 } 7672 7673 if v.PartnerWatermarking != nil { 7674 ok := object.Key("partnerWatermarking") 7675 if err := awsRestjson1_serializeDocumentPartnerWatermarking(v.PartnerWatermarking, ok); err != nil { 7676 return err 7677 } 7678 } 7679 7680 if v.TimecodeBurnin != nil { 7681 ok := object.Key("timecodeBurnin") 7682 if err := awsRestjson1_serializeDocumentTimecodeBurnin(v.TimecodeBurnin, ok); err != nil { 7683 return err 7684 } 7685 } 7686 7687 return nil 7688} 7689 7690func awsRestjson1_serializeDocumentVideoSelector(v *types.VideoSelector, value smithyjson.Value) error { 7691 object := value.Object() 7692 defer object.Close() 7693 7694 if len(v.AlphaBehavior) > 0 { 7695 ok := object.Key("alphaBehavior") 7696 ok.String(string(v.AlphaBehavior)) 7697 } 7698 7699 if len(v.ColorSpace) > 0 { 7700 ok := object.Key("colorSpace") 7701 ok.String(string(v.ColorSpace)) 7702 } 7703 7704 if len(v.ColorSpaceUsage) > 0 { 7705 ok := object.Key("colorSpaceUsage") 7706 ok.String(string(v.ColorSpaceUsage)) 7707 } 7708 7709 if v.Hdr10Metadata != nil { 7710 ok := object.Key("hdr10Metadata") 7711 if err := awsRestjson1_serializeDocumentHdr10Metadata(v.Hdr10Metadata, ok); err != nil { 7712 return err 7713 } 7714 } 7715 7716 if v.Pid != 0 { 7717 ok := object.Key("pid") 7718 ok.Integer(v.Pid) 7719 } 7720 7721 if v.ProgramNumber != 0 { 7722 ok := object.Key("programNumber") 7723 ok.Integer(v.ProgramNumber) 7724 } 7725 7726 if len(v.Rotate) > 0 { 7727 ok := object.Key("rotate") 7728 ok.String(string(v.Rotate)) 7729 } 7730 7731 return nil 7732} 7733 7734func awsRestjson1_serializeDocumentVorbisSettings(v *types.VorbisSettings, value smithyjson.Value) error { 7735 object := value.Object() 7736 defer object.Close() 7737 7738 if v.Channels != 0 { 7739 ok := object.Key("channels") 7740 ok.Integer(v.Channels) 7741 } 7742 7743 if v.SampleRate != 0 { 7744 ok := object.Key("sampleRate") 7745 ok.Integer(v.SampleRate) 7746 } 7747 7748 if v.VbrQuality != 0 { 7749 ok := object.Key("vbrQuality") 7750 ok.Integer(v.VbrQuality) 7751 } 7752 7753 return nil 7754} 7755 7756func awsRestjson1_serializeDocumentVp8Settings(v *types.Vp8Settings, value smithyjson.Value) error { 7757 object := value.Object() 7758 defer object.Close() 7759 7760 if v.Bitrate != 0 { 7761 ok := object.Key("bitrate") 7762 ok.Integer(v.Bitrate) 7763 } 7764 7765 if len(v.FramerateControl) > 0 { 7766 ok := object.Key("framerateControl") 7767 ok.String(string(v.FramerateControl)) 7768 } 7769 7770 if len(v.FramerateConversionAlgorithm) > 0 { 7771 ok := object.Key("framerateConversionAlgorithm") 7772 ok.String(string(v.FramerateConversionAlgorithm)) 7773 } 7774 7775 if v.FramerateDenominator != 0 { 7776 ok := object.Key("framerateDenominator") 7777 ok.Integer(v.FramerateDenominator) 7778 } 7779 7780 if v.FramerateNumerator != 0 { 7781 ok := object.Key("framerateNumerator") 7782 ok.Integer(v.FramerateNumerator) 7783 } 7784 7785 if v.GopSize != 0 { 7786 ok := object.Key("gopSize") 7787 ok.Double(v.GopSize) 7788 } 7789 7790 if v.HrdBufferSize != 0 { 7791 ok := object.Key("hrdBufferSize") 7792 ok.Integer(v.HrdBufferSize) 7793 } 7794 7795 if v.MaxBitrate != 0 { 7796 ok := object.Key("maxBitrate") 7797 ok.Integer(v.MaxBitrate) 7798 } 7799 7800 if len(v.ParControl) > 0 { 7801 ok := object.Key("parControl") 7802 ok.String(string(v.ParControl)) 7803 } 7804 7805 if v.ParDenominator != 0 { 7806 ok := object.Key("parDenominator") 7807 ok.Integer(v.ParDenominator) 7808 } 7809 7810 if v.ParNumerator != 0 { 7811 ok := object.Key("parNumerator") 7812 ok.Integer(v.ParNumerator) 7813 } 7814 7815 if len(v.QualityTuningLevel) > 0 { 7816 ok := object.Key("qualityTuningLevel") 7817 ok.String(string(v.QualityTuningLevel)) 7818 } 7819 7820 if len(v.RateControlMode) > 0 { 7821 ok := object.Key("rateControlMode") 7822 ok.String(string(v.RateControlMode)) 7823 } 7824 7825 return nil 7826} 7827 7828func awsRestjson1_serializeDocumentVp9Settings(v *types.Vp9Settings, value smithyjson.Value) error { 7829 object := value.Object() 7830 defer object.Close() 7831 7832 if v.Bitrate != 0 { 7833 ok := object.Key("bitrate") 7834 ok.Integer(v.Bitrate) 7835 } 7836 7837 if len(v.FramerateControl) > 0 { 7838 ok := object.Key("framerateControl") 7839 ok.String(string(v.FramerateControl)) 7840 } 7841 7842 if len(v.FramerateConversionAlgorithm) > 0 { 7843 ok := object.Key("framerateConversionAlgorithm") 7844 ok.String(string(v.FramerateConversionAlgorithm)) 7845 } 7846 7847 if v.FramerateDenominator != 0 { 7848 ok := object.Key("framerateDenominator") 7849 ok.Integer(v.FramerateDenominator) 7850 } 7851 7852 if v.FramerateNumerator != 0 { 7853 ok := object.Key("framerateNumerator") 7854 ok.Integer(v.FramerateNumerator) 7855 } 7856 7857 if v.GopSize != 0 { 7858 ok := object.Key("gopSize") 7859 ok.Double(v.GopSize) 7860 } 7861 7862 if v.HrdBufferSize != 0 { 7863 ok := object.Key("hrdBufferSize") 7864 ok.Integer(v.HrdBufferSize) 7865 } 7866 7867 if v.MaxBitrate != 0 { 7868 ok := object.Key("maxBitrate") 7869 ok.Integer(v.MaxBitrate) 7870 } 7871 7872 if len(v.ParControl) > 0 { 7873 ok := object.Key("parControl") 7874 ok.String(string(v.ParControl)) 7875 } 7876 7877 if v.ParDenominator != 0 { 7878 ok := object.Key("parDenominator") 7879 ok.Integer(v.ParDenominator) 7880 } 7881 7882 if v.ParNumerator != 0 { 7883 ok := object.Key("parNumerator") 7884 ok.Integer(v.ParNumerator) 7885 } 7886 7887 if len(v.QualityTuningLevel) > 0 { 7888 ok := object.Key("qualityTuningLevel") 7889 ok.String(string(v.QualityTuningLevel)) 7890 } 7891 7892 if len(v.RateControlMode) > 0 { 7893 ok := object.Key("rateControlMode") 7894 ok.String(string(v.RateControlMode)) 7895 } 7896 7897 return nil 7898} 7899 7900func awsRestjson1_serializeDocumentWavSettings(v *types.WavSettings, value smithyjson.Value) error { 7901 object := value.Object() 7902 defer object.Close() 7903 7904 if v.BitDepth != 0 { 7905 ok := object.Key("bitDepth") 7906 ok.Integer(v.BitDepth) 7907 } 7908 7909 if v.Channels != 0 { 7910 ok := object.Key("channels") 7911 ok.Integer(v.Channels) 7912 } 7913 7914 if len(v.Format) > 0 { 7915 ok := object.Key("format") 7916 ok.String(string(v.Format)) 7917 } 7918 7919 if v.SampleRate != 0 { 7920 ok := object.Key("sampleRate") 7921 ok.Integer(v.SampleRate) 7922 } 7923 7924 return nil 7925} 7926 7927func awsRestjson1_serializeDocumentWebvttDestinationSettings(v *types.WebvttDestinationSettings, value smithyjson.Value) error { 7928 object := value.Object() 7929 defer object.Close() 7930 7931 if len(v.StylePassthrough) > 0 { 7932 ok := object.Key("stylePassthrough") 7933 ok.String(string(v.StylePassthrough)) 7934 } 7935 7936 return nil 7937} 7938