1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package firehose 4 5import ( 6 "bytes" 7 "context" 8 "fmt" 9 "github.com/aws/aws-sdk-go-v2/service/firehose/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 awsAwsjson11_serializeOpCreateDeliveryStream struct { 18} 19 20func (*awsAwsjson11_serializeOpCreateDeliveryStream) ID() string { 21 return "OperationSerializer" 22} 23 24func (m *awsAwsjson11_serializeOpCreateDeliveryStream) 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.(*CreateDeliveryStreamInput) 33 _ = input 34 if !ok { 35 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 36 } 37 38 request.Request.URL.Path = "/" 39 request.Request.Method = "POST" 40 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 41 if err != nil { 42 return out, metadata, &smithy.SerializationError{Err: err} 43 } 44 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 45 httpBindingEncoder.SetHeader("X-Amz-Target").String("Firehose_20150804.CreateDeliveryStream") 46 47 jsonEncoder := smithyjson.NewEncoder() 48 if err := awsAwsjson11_serializeOpDocumentCreateDeliveryStreamInput(input, jsonEncoder.Value); err != nil { 49 return out, metadata, &smithy.SerializationError{Err: err} 50 } 51 52 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 53 return out, metadata, &smithy.SerializationError{Err: err} 54 } 55 56 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 57 return out, metadata, &smithy.SerializationError{Err: err} 58 } 59 in.Request = request 60 61 return next.HandleSerialize(ctx, in) 62} 63 64type awsAwsjson11_serializeOpDeleteDeliveryStream struct { 65} 66 67func (*awsAwsjson11_serializeOpDeleteDeliveryStream) ID() string { 68 return "OperationSerializer" 69} 70 71func (m *awsAwsjson11_serializeOpDeleteDeliveryStream) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 72 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 73) { 74 request, ok := in.Request.(*smithyhttp.Request) 75 if !ok { 76 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 77 } 78 79 input, ok := in.Parameters.(*DeleteDeliveryStreamInput) 80 _ = input 81 if !ok { 82 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 83 } 84 85 request.Request.URL.Path = "/" 86 request.Request.Method = "POST" 87 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 88 if err != nil { 89 return out, metadata, &smithy.SerializationError{Err: err} 90 } 91 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 92 httpBindingEncoder.SetHeader("X-Amz-Target").String("Firehose_20150804.DeleteDeliveryStream") 93 94 jsonEncoder := smithyjson.NewEncoder() 95 if err := awsAwsjson11_serializeOpDocumentDeleteDeliveryStreamInput(input, jsonEncoder.Value); err != nil { 96 return out, metadata, &smithy.SerializationError{Err: err} 97 } 98 99 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 100 return out, metadata, &smithy.SerializationError{Err: err} 101 } 102 103 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 104 return out, metadata, &smithy.SerializationError{Err: err} 105 } 106 in.Request = request 107 108 return next.HandleSerialize(ctx, in) 109} 110 111type awsAwsjson11_serializeOpDescribeDeliveryStream struct { 112} 113 114func (*awsAwsjson11_serializeOpDescribeDeliveryStream) ID() string { 115 return "OperationSerializer" 116} 117 118func (m *awsAwsjson11_serializeOpDescribeDeliveryStream) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 119 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 120) { 121 request, ok := in.Request.(*smithyhttp.Request) 122 if !ok { 123 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 124 } 125 126 input, ok := in.Parameters.(*DescribeDeliveryStreamInput) 127 _ = input 128 if !ok { 129 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 130 } 131 132 request.Request.URL.Path = "/" 133 request.Request.Method = "POST" 134 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 135 if err != nil { 136 return out, metadata, &smithy.SerializationError{Err: err} 137 } 138 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 139 httpBindingEncoder.SetHeader("X-Amz-Target").String("Firehose_20150804.DescribeDeliveryStream") 140 141 jsonEncoder := smithyjson.NewEncoder() 142 if err := awsAwsjson11_serializeOpDocumentDescribeDeliveryStreamInput(input, jsonEncoder.Value); err != nil { 143 return out, metadata, &smithy.SerializationError{Err: err} 144 } 145 146 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 147 return out, metadata, &smithy.SerializationError{Err: err} 148 } 149 150 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 151 return out, metadata, &smithy.SerializationError{Err: err} 152 } 153 in.Request = request 154 155 return next.HandleSerialize(ctx, in) 156} 157 158type awsAwsjson11_serializeOpListDeliveryStreams struct { 159} 160 161func (*awsAwsjson11_serializeOpListDeliveryStreams) ID() string { 162 return "OperationSerializer" 163} 164 165func (m *awsAwsjson11_serializeOpListDeliveryStreams) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 166 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 167) { 168 request, ok := in.Request.(*smithyhttp.Request) 169 if !ok { 170 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 171 } 172 173 input, ok := in.Parameters.(*ListDeliveryStreamsInput) 174 _ = input 175 if !ok { 176 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 177 } 178 179 request.Request.URL.Path = "/" 180 request.Request.Method = "POST" 181 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 182 if err != nil { 183 return out, metadata, &smithy.SerializationError{Err: err} 184 } 185 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 186 httpBindingEncoder.SetHeader("X-Amz-Target").String("Firehose_20150804.ListDeliveryStreams") 187 188 jsonEncoder := smithyjson.NewEncoder() 189 if err := awsAwsjson11_serializeOpDocumentListDeliveryStreamsInput(input, jsonEncoder.Value); err != nil { 190 return out, metadata, &smithy.SerializationError{Err: err} 191 } 192 193 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 194 return out, metadata, &smithy.SerializationError{Err: err} 195 } 196 197 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 198 return out, metadata, &smithy.SerializationError{Err: err} 199 } 200 in.Request = request 201 202 return next.HandleSerialize(ctx, in) 203} 204 205type awsAwsjson11_serializeOpListTagsForDeliveryStream struct { 206} 207 208func (*awsAwsjson11_serializeOpListTagsForDeliveryStream) ID() string { 209 return "OperationSerializer" 210} 211 212func (m *awsAwsjson11_serializeOpListTagsForDeliveryStream) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 213 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 214) { 215 request, ok := in.Request.(*smithyhttp.Request) 216 if !ok { 217 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 218 } 219 220 input, ok := in.Parameters.(*ListTagsForDeliveryStreamInput) 221 _ = input 222 if !ok { 223 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 224 } 225 226 request.Request.URL.Path = "/" 227 request.Request.Method = "POST" 228 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 229 if err != nil { 230 return out, metadata, &smithy.SerializationError{Err: err} 231 } 232 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 233 httpBindingEncoder.SetHeader("X-Amz-Target").String("Firehose_20150804.ListTagsForDeliveryStream") 234 235 jsonEncoder := smithyjson.NewEncoder() 236 if err := awsAwsjson11_serializeOpDocumentListTagsForDeliveryStreamInput(input, jsonEncoder.Value); err != nil { 237 return out, metadata, &smithy.SerializationError{Err: err} 238 } 239 240 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 241 return out, metadata, &smithy.SerializationError{Err: err} 242 } 243 244 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 245 return out, metadata, &smithy.SerializationError{Err: err} 246 } 247 in.Request = request 248 249 return next.HandleSerialize(ctx, in) 250} 251 252type awsAwsjson11_serializeOpPutRecord struct { 253} 254 255func (*awsAwsjson11_serializeOpPutRecord) ID() string { 256 return "OperationSerializer" 257} 258 259func (m *awsAwsjson11_serializeOpPutRecord) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 260 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 261) { 262 request, ok := in.Request.(*smithyhttp.Request) 263 if !ok { 264 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 265 } 266 267 input, ok := in.Parameters.(*PutRecordInput) 268 _ = input 269 if !ok { 270 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 271 } 272 273 request.Request.URL.Path = "/" 274 request.Request.Method = "POST" 275 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 276 if err != nil { 277 return out, metadata, &smithy.SerializationError{Err: err} 278 } 279 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 280 httpBindingEncoder.SetHeader("X-Amz-Target").String("Firehose_20150804.PutRecord") 281 282 jsonEncoder := smithyjson.NewEncoder() 283 if err := awsAwsjson11_serializeOpDocumentPutRecordInput(input, jsonEncoder.Value); err != nil { 284 return out, metadata, &smithy.SerializationError{Err: err} 285 } 286 287 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 288 return out, metadata, &smithy.SerializationError{Err: err} 289 } 290 291 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 292 return out, metadata, &smithy.SerializationError{Err: err} 293 } 294 in.Request = request 295 296 return next.HandleSerialize(ctx, in) 297} 298 299type awsAwsjson11_serializeOpPutRecordBatch struct { 300} 301 302func (*awsAwsjson11_serializeOpPutRecordBatch) ID() string { 303 return "OperationSerializer" 304} 305 306func (m *awsAwsjson11_serializeOpPutRecordBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 307 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 308) { 309 request, ok := in.Request.(*smithyhttp.Request) 310 if !ok { 311 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 312 } 313 314 input, ok := in.Parameters.(*PutRecordBatchInput) 315 _ = input 316 if !ok { 317 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 318 } 319 320 request.Request.URL.Path = "/" 321 request.Request.Method = "POST" 322 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 323 if err != nil { 324 return out, metadata, &smithy.SerializationError{Err: err} 325 } 326 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 327 httpBindingEncoder.SetHeader("X-Amz-Target").String("Firehose_20150804.PutRecordBatch") 328 329 jsonEncoder := smithyjson.NewEncoder() 330 if err := awsAwsjson11_serializeOpDocumentPutRecordBatchInput(input, jsonEncoder.Value); err != nil { 331 return out, metadata, &smithy.SerializationError{Err: err} 332 } 333 334 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 335 return out, metadata, &smithy.SerializationError{Err: err} 336 } 337 338 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 339 return out, metadata, &smithy.SerializationError{Err: err} 340 } 341 in.Request = request 342 343 return next.HandleSerialize(ctx, in) 344} 345 346type awsAwsjson11_serializeOpStartDeliveryStreamEncryption struct { 347} 348 349func (*awsAwsjson11_serializeOpStartDeliveryStreamEncryption) ID() string { 350 return "OperationSerializer" 351} 352 353func (m *awsAwsjson11_serializeOpStartDeliveryStreamEncryption) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 354 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 355) { 356 request, ok := in.Request.(*smithyhttp.Request) 357 if !ok { 358 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 359 } 360 361 input, ok := in.Parameters.(*StartDeliveryStreamEncryptionInput) 362 _ = input 363 if !ok { 364 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 365 } 366 367 request.Request.URL.Path = "/" 368 request.Request.Method = "POST" 369 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 370 if err != nil { 371 return out, metadata, &smithy.SerializationError{Err: err} 372 } 373 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 374 httpBindingEncoder.SetHeader("X-Amz-Target").String("Firehose_20150804.StartDeliveryStreamEncryption") 375 376 jsonEncoder := smithyjson.NewEncoder() 377 if err := awsAwsjson11_serializeOpDocumentStartDeliveryStreamEncryptionInput(input, jsonEncoder.Value); err != nil { 378 return out, metadata, &smithy.SerializationError{Err: err} 379 } 380 381 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 382 return out, metadata, &smithy.SerializationError{Err: err} 383 } 384 385 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 386 return out, metadata, &smithy.SerializationError{Err: err} 387 } 388 in.Request = request 389 390 return next.HandleSerialize(ctx, in) 391} 392 393type awsAwsjson11_serializeOpStopDeliveryStreamEncryption struct { 394} 395 396func (*awsAwsjson11_serializeOpStopDeliveryStreamEncryption) ID() string { 397 return "OperationSerializer" 398} 399 400func (m *awsAwsjson11_serializeOpStopDeliveryStreamEncryption) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 401 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 402) { 403 request, ok := in.Request.(*smithyhttp.Request) 404 if !ok { 405 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 406 } 407 408 input, ok := in.Parameters.(*StopDeliveryStreamEncryptionInput) 409 _ = input 410 if !ok { 411 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 412 } 413 414 request.Request.URL.Path = "/" 415 request.Request.Method = "POST" 416 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 417 if err != nil { 418 return out, metadata, &smithy.SerializationError{Err: err} 419 } 420 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 421 httpBindingEncoder.SetHeader("X-Amz-Target").String("Firehose_20150804.StopDeliveryStreamEncryption") 422 423 jsonEncoder := smithyjson.NewEncoder() 424 if err := awsAwsjson11_serializeOpDocumentStopDeliveryStreamEncryptionInput(input, jsonEncoder.Value); err != nil { 425 return out, metadata, &smithy.SerializationError{Err: err} 426 } 427 428 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 429 return out, metadata, &smithy.SerializationError{Err: err} 430 } 431 432 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 433 return out, metadata, &smithy.SerializationError{Err: err} 434 } 435 in.Request = request 436 437 return next.HandleSerialize(ctx, in) 438} 439 440type awsAwsjson11_serializeOpTagDeliveryStream struct { 441} 442 443func (*awsAwsjson11_serializeOpTagDeliveryStream) ID() string { 444 return "OperationSerializer" 445} 446 447func (m *awsAwsjson11_serializeOpTagDeliveryStream) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 448 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 449) { 450 request, ok := in.Request.(*smithyhttp.Request) 451 if !ok { 452 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 453 } 454 455 input, ok := in.Parameters.(*TagDeliveryStreamInput) 456 _ = input 457 if !ok { 458 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 459 } 460 461 request.Request.URL.Path = "/" 462 request.Request.Method = "POST" 463 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 464 if err != nil { 465 return out, metadata, &smithy.SerializationError{Err: err} 466 } 467 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 468 httpBindingEncoder.SetHeader("X-Amz-Target").String("Firehose_20150804.TagDeliveryStream") 469 470 jsonEncoder := smithyjson.NewEncoder() 471 if err := awsAwsjson11_serializeOpDocumentTagDeliveryStreamInput(input, jsonEncoder.Value); err != nil { 472 return out, metadata, &smithy.SerializationError{Err: err} 473 } 474 475 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 476 return out, metadata, &smithy.SerializationError{Err: err} 477 } 478 479 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 480 return out, metadata, &smithy.SerializationError{Err: err} 481 } 482 in.Request = request 483 484 return next.HandleSerialize(ctx, in) 485} 486 487type awsAwsjson11_serializeOpUntagDeliveryStream struct { 488} 489 490func (*awsAwsjson11_serializeOpUntagDeliveryStream) ID() string { 491 return "OperationSerializer" 492} 493 494func (m *awsAwsjson11_serializeOpUntagDeliveryStream) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 495 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 496) { 497 request, ok := in.Request.(*smithyhttp.Request) 498 if !ok { 499 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 500 } 501 502 input, ok := in.Parameters.(*UntagDeliveryStreamInput) 503 _ = input 504 if !ok { 505 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 506 } 507 508 request.Request.URL.Path = "/" 509 request.Request.Method = "POST" 510 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 511 if err != nil { 512 return out, metadata, &smithy.SerializationError{Err: err} 513 } 514 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 515 httpBindingEncoder.SetHeader("X-Amz-Target").String("Firehose_20150804.UntagDeliveryStream") 516 517 jsonEncoder := smithyjson.NewEncoder() 518 if err := awsAwsjson11_serializeOpDocumentUntagDeliveryStreamInput(input, jsonEncoder.Value); err != nil { 519 return out, metadata, &smithy.SerializationError{Err: err} 520 } 521 522 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 523 return out, metadata, &smithy.SerializationError{Err: err} 524 } 525 526 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 527 return out, metadata, &smithy.SerializationError{Err: err} 528 } 529 in.Request = request 530 531 return next.HandleSerialize(ctx, in) 532} 533 534type awsAwsjson11_serializeOpUpdateDestination struct { 535} 536 537func (*awsAwsjson11_serializeOpUpdateDestination) ID() string { 538 return "OperationSerializer" 539} 540 541func (m *awsAwsjson11_serializeOpUpdateDestination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 542 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 543) { 544 request, ok := in.Request.(*smithyhttp.Request) 545 if !ok { 546 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 547 } 548 549 input, ok := in.Parameters.(*UpdateDestinationInput) 550 _ = input 551 if !ok { 552 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 553 } 554 555 request.Request.URL.Path = "/" 556 request.Request.Method = "POST" 557 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 558 if err != nil { 559 return out, metadata, &smithy.SerializationError{Err: err} 560 } 561 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 562 httpBindingEncoder.SetHeader("X-Amz-Target").String("Firehose_20150804.UpdateDestination") 563 564 jsonEncoder := smithyjson.NewEncoder() 565 if err := awsAwsjson11_serializeOpDocumentUpdateDestinationInput(input, jsonEncoder.Value); err != nil { 566 return out, metadata, &smithy.SerializationError{Err: err} 567 } 568 569 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 570 return out, metadata, &smithy.SerializationError{Err: err} 571 } 572 573 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 574 return out, metadata, &smithy.SerializationError{Err: err} 575 } 576 in.Request = request 577 578 return next.HandleSerialize(ctx, in) 579} 580func awsAwsjson11_serializeDocumentBufferingHints(v *types.BufferingHints, value smithyjson.Value) error { 581 object := value.Object() 582 defer object.Close() 583 584 if v.IntervalInSeconds != nil { 585 ok := object.Key("IntervalInSeconds") 586 ok.Integer(*v.IntervalInSeconds) 587 } 588 589 if v.SizeInMBs != nil { 590 ok := object.Key("SizeInMBs") 591 ok.Integer(*v.SizeInMBs) 592 } 593 594 return nil 595} 596 597func awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v *types.CloudWatchLoggingOptions, value smithyjson.Value) error { 598 object := value.Object() 599 defer object.Close() 600 601 if v.Enabled != nil { 602 ok := object.Key("Enabled") 603 ok.Boolean(*v.Enabled) 604 } 605 606 if v.LogGroupName != nil { 607 ok := object.Key("LogGroupName") 608 ok.String(*v.LogGroupName) 609 } 610 611 if v.LogStreamName != nil { 612 ok := object.Key("LogStreamName") 613 ok.String(*v.LogStreamName) 614 } 615 616 return nil 617} 618 619func awsAwsjson11_serializeDocumentColumnToJsonKeyMappings(v map[string]string, value smithyjson.Value) error { 620 object := value.Object() 621 defer object.Close() 622 623 for key := range v { 624 om := object.Key(key) 625 om.String(v[key]) 626 } 627 return nil 628} 629 630func awsAwsjson11_serializeDocumentCopyCommand(v *types.CopyCommand, value smithyjson.Value) error { 631 object := value.Object() 632 defer object.Close() 633 634 if v.CopyOptions != nil { 635 ok := object.Key("CopyOptions") 636 ok.String(*v.CopyOptions) 637 } 638 639 if v.DataTableColumns != nil { 640 ok := object.Key("DataTableColumns") 641 ok.String(*v.DataTableColumns) 642 } 643 644 if v.DataTableName != nil { 645 ok := object.Key("DataTableName") 646 ok.String(*v.DataTableName) 647 } 648 649 return nil 650} 651 652func awsAwsjson11_serializeDocumentDataFormatConversionConfiguration(v *types.DataFormatConversionConfiguration, value smithyjson.Value) error { 653 object := value.Object() 654 defer object.Close() 655 656 if v.Enabled != nil { 657 ok := object.Key("Enabled") 658 ok.Boolean(*v.Enabled) 659 } 660 661 if v.InputFormatConfiguration != nil { 662 ok := object.Key("InputFormatConfiguration") 663 if err := awsAwsjson11_serializeDocumentInputFormatConfiguration(v.InputFormatConfiguration, ok); err != nil { 664 return err 665 } 666 } 667 668 if v.OutputFormatConfiguration != nil { 669 ok := object.Key("OutputFormatConfiguration") 670 if err := awsAwsjson11_serializeDocumentOutputFormatConfiguration(v.OutputFormatConfiguration, ok); err != nil { 671 return err 672 } 673 } 674 675 if v.SchemaConfiguration != nil { 676 ok := object.Key("SchemaConfiguration") 677 if err := awsAwsjson11_serializeDocumentSchemaConfiguration(v.SchemaConfiguration, ok); err != nil { 678 return err 679 } 680 } 681 682 return nil 683} 684 685func awsAwsjson11_serializeDocumentDeliveryStreamEncryptionConfigurationInput(v *types.DeliveryStreamEncryptionConfigurationInput, value smithyjson.Value) error { 686 object := value.Object() 687 defer object.Close() 688 689 if v.KeyARN != nil { 690 ok := object.Key("KeyARN") 691 ok.String(*v.KeyARN) 692 } 693 694 if len(v.KeyType) > 0 { 695 ok := object.Key("KeyType") 696 ok.String(string(v.KeyType)) 697 } 698 699 return nil 700} 701 702func awsAwsjson11_serializeDocumentDeserializer(v *types.Deserializer, value smithyjson.Value) error { 703 object := value.Object() 704 defer object.Close() 705 706 if v.HiveJsonSerDe != nil { 707 ok := object.Key("HiveJsonSerDe") 708 if err := awsAwsjson11_serializeDocumentHiveJsonSerDe(v.HiveJsonSerDe, ok); err != nil { 709 return err 710 } 711 } 712 713 if v.OpenXJsonSerDe != nil { 714 ok := object.Key("OpenXJsonSerDe") 715 if err := awsAwsjson11_serializeDocumentOpenXJsonSerDe(v.OpenXJsonSerDe, ok); err != nil { 716 return err 717 } 718 } 719 720 return nil 721} 722 723func awsAwsjson11_serializeDocumentElasticsearchBufferingHints(v *types.ElasticsearchBufferingHints, value smithyjson.Value) error { 724 object := value.Object() 725 defer object.Close() 726 727 if v.IntervalInSeconds != nil { 728 ok := object.Key("IntervalInSeconds") 729 ok.Integer(*v.IntervalInSeconds) 730 } 731 732 if v.SizeInMBs != nil { 733 ok := object.Key("SizeInMBs") 734 ok.Integer(*v.SizeInMBs) 735 } 736 737 return nil 738} 739 740func awsAwsjson11_serializeDocumentElasticsearchDestinationConfiguration(v *types.ElasticsearchDestinationConfiguration, value smithyjson.Value) error { 741 object := value.Object() 742 defer object.Close() 743 744 if v.BufferingHints != nil { 745 ok := object.Key("BufferingHints") 746 if err := awsAwsjson11_serializeDocumentElasticsearchBufferingHints(v.BufferingHints, ok); err != nil { 747 return err 748 } 749 } 750 751 if v.CloudWatchLoggingOptions != nil { 752 ok := object.Key("CloudWatchLoggingOptions") 753 if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { 754 return err 755 } 756 } 757 758 if v.ClusterEndpoint != nil { 759 ok := object.Key("ClusterEndpoint") 760 ok.String(*v.ClusterEndpoint) 761 } 762 763 if v.DomainARN != nil { 764 ok := object.Key("DomainARN") 765 ok.String(*v.DomainARN) 766 } 767 768 if v.IndexName != nil { 769 ok := object.Key("IndexName") 770 ok.String(*v.IndexName) 771 } 772 773 if len(v.IndexRotationPeriod) > 0 { 774 ok := object.Key("IndexRotationPeriod") 775 ok.String(string(v.IndexRotationPeriod)) 776 } 777 778 if v.ProcessingConfiguration != nil { 779 ok := object.Key("ProcessingConfiguration") 780 if err := awsAwsjson11_serializeDocumentProcessingConfiguration(v.ProcessingConfiguration, ok); err != nil { 781 return err 782 } 783 } 784 785 if v.RetryOptions != nil { 786 ok := object.Key("RetryOptions") 787 if err := awsAwsjson11_serializeDocumentElasticsearchRetryOptions(v.RetryOptions, ok); err != nil { 788 return err 789 } 790 } 791 792 if v.RoleARN != nil { 793 ok := object.Key("RoleARN") 794 ok.String(*v.RoleARN) 795 } 796 797 if len(v.S3BackupMode) > 0 { 798 ok := object.Key("S3BackupMode") 799 ok.String(string(v.S3BackupMode)) 800 } 801 802 if v.S3Configuration != nil { 803 ok := object.Key("S3Configuration") 804 if err := awsAwsjson11_serializeDocumentS3DestinationConfiguration(v.S3Configuration, ok); err != nil { 805 return err 806 } 807 } 808 809 if v.TypeName != nil { 810 ok := object.Key("TypeName") 811 ok.String(*v.TypeName) 812 } 813 814 if v.VpcConfiguration != nil { 815 ok := object.Key("VpcConfiguration") 816 if err := awsAwsjson11_serializeDocumentVpcConfiguration(v.VpcConfiguration, ok); err != nil { 817 return err 818 } 819 } 820 821 return nil 822} 823 824func awsAwsjson11_serializeDocumentElasticsearchDestinationUpdate(v *types.ElasticsearchDestinationUpdate, value smithyjson.Value) error { 825 object := value.Object() 826 defer object.Close() 827 828 if v.BufferingHints != nil { 829 ok := object.Key("BufferingHints") 830 if err := awsAwsjson11_serializeDocumentElasticsearchBufferingHints(v.BufferingHints, ok); err != nil { 831 return err 832 } 833 } 834 835 if v.CloudWatchLoggingOptions != nil { 836 ok := object.Key("CloudWatchLoggingOptions") 837 if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { 838 return err 839 } 840 } 841 842 if v.ClusterEndpoint != nil { 843 ok := object.Key("ClusterEndpoint") 844 ok.String(*v.ClusterEndpoint) 845 } 846 847 if v.DomainARN != nil { 848 ok := object.Key("DomainARN") 849 ok.String(*v.DomainARN) 850 } 851 852 if v.IndexName != nil { 853 ok := object.Key("IndexName") 854 ok.String(*v.IndexName) 855 } 856 857 if len(v.IndexRotationPeriod) > 0 { 858 ok := object.Key("IndexRotationPeriod") 859 ok.String(string(v.IndexRotationPeriod)) 860 } 861 862 if v.ProcessingConfiguration != nil { 863 ok := object.Key("ProcessingConfiguration") 864 if err := awsAwsjson11_serializeDocumentProcessingConfiguration(v.ProcessingConfiguration, ok); err != nil { 865 return err 866 } 867 } 868 869 if v.RetryOptions != nil { 870 ok := object.Key("RetryOptions") 871 if err := awsAwsjson11_serializeDocumentElasticsearchRetryOptions(v.RetryOptions, ok); err != nil { 872 return err 873 } 874 } 875 876 if v.RoleARN != nil { 877 ok := object.Key("RoleARN") 878 ok.String(*v.RoleARN) 879 } 880 881 if v.S3Update != nil { 882 ok := object.Key("S3Update") 883 if err := awsAwsjson11_serializeDocumentS3DestinationUpdate(v.S3Update, ok); err != nil { 884 return err 885 } 886 } 887 888 if v.TypeName != nil { 889 ok := object.Key("TypeName") 890 ok.String(*v.TypeName) 891 } 892 893 return nil 894} 895 896func awsAwsjson11_serializeDocumentElasticsearchRetryOptions(v *types.ElasticsearchRetryOptions, value smithyjson.Value) error { 897 object := value.Object() 898 defer object.Close() 899 900 if v.DurationInSeconds != nil { 901 ok := object.Key("DurationInSeconds") 902 ok.Integer(*v.DurationInSeconds) 903 } 904 905 return nil 906} 907 908func awsAwsjson11_serializeDocumentEncryptionConfiguration(v *types.EncryptionConfiguration, value smithyjson.Value) error { 909 object := value.Object() 910 defer object.Close() 911 912 if v.KMSEncryptionConfig != nil { 913 ok := object.Key("KMSEncryptionConfig") 914 if err := awsAwsjson11_serializeDocumentKMSEncryptionConfig(v.KMSEncryptionConfig, ok); err != nil { 915 return err 916 } 917 } 918 919 if len(v.NoEncryptionConfig) > 0 { 920 ok := object.Key("NoEncryptionConfig") 921 ok.String(string(v.NoEncryptionConfig)) 922 } 923 924 return nil 925} 926 927func awsAwsjson11_serializeDocumentExtendedS3DestinationConfiguration(v *types.ExtendedS3DestinationConfiguration, value smithyjson.Value) error { 928 object := value.Object() 929 defer object.Close() 930 931 if v.BucketARN != nil { 932 ok := object.Key("BucketARN") 933 ok.String(*v.BucketARN) 934 } 935 936 if v.BufferingHints != nil { 937 ok := object.Key("BufferingHints") 938 if err := awsAwsjson11_serializeDocumentBufferingHints(v.BufferingHints, ok); err != nil { 939 return err 940 } 941 } 942 943 if v.CloudWatchLoggingOptions != nil { 944 ok := object.Key("CloudWatchLoggingOptions") 945 if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { 946 return err 947 } 948 } 949 950 if len(v.CompressionFormat) > 0 { 951 ok := object.Key("CompressionFormat") 952 ok.String(string(v.CompressionFormat)) 953 } 954 955 if v.DataFormatConversionConfiguration != nil { 956 ok := object.Key("DataFormatConversionConfiguration") 957 if err := awsAwsjson11_serializeDocumentDataFormatConversionConfiguration(v.DataFormatConversionConfiguration, ok); err != nil { 958 return err 959 } 960 } 961 962 if v.EncryptionConfiguration != nil { 963 ok := object.Key("EncryptionConfiguration") 964 if err := awsAwsjson11_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { 965 return err 966 } 967 } 968 969 if v.ErrorOutputPrefix != nil { 970 ok := object.Key("ErrorOutputPrefix") 971 ok.String(*v.ErrorOutputPrefix) 972 } 973 974 if v.Prefix != nil { 975 ok := object.Key("Prefix") 976 ok.String(*v.Prefix) 977 } 978 979 if v.ProcessingConfiguration != nil { 980 ok := object.Key("ProcessingConfiguration") 981 if err := awsAwsjson11_serializeDocumentProcessingConfiguration(v.ProcessingConfiguration, ok); err != nil { 982 return err 983 } 984 } 985 986 if v.RoleARN != nil { 987 ok := object.Key("RoleARN") 988 ok.String(*v.RoleARN) 989 } 990 991 if v.S3BackupConfiguration != nil { 992 ok := object.Key("S3BackupConfiguration") 993 if err := awsAwsjson11_serializeDocumentS3DestinationConfiguration(v.S3BackupConfiguration, ok); err != nil { 994 return err 995 } 996 } 997 998 if len(v.S3BackupMode) > 0 { 999 ok := object.Key("S3BackupMode") 1000 ok.String(string(v.S3BackupMode)) 1001 } 1002 1003 return nil 1004} 1005 1006func awsAwsjson11_serializeDocumentExtendedS3DestinationUpdate(v *types.ExtendedS3DestinationUpdate, value smithyjson.Value) error { 1007 object := value.Object() 1008 defer object.Close() 1009 1010 if v.BucketARN != nil { 1011 ok := object.Key("BucketARN") 1012 ok.String(*v.BucketARN) 1013 } 1014 1015 if v.BufferingHints != nil { 1016 ok := object.Key("BufferingHints") 1017 if err := awsAwsjson11_serializeDocumentBufferingHints(v.BufferingHints, ok); err != nil { 1018 return err 1019 } 1020 } 1021 1022 if v.CloudWatchLoggingOptions != nil { 1023 ok := object.Key("CloudWatchLoggingOptions") 1024 if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { 1025 return err 1026 } 1027 } 1028 1029 if len(v.CompressionFormat) > 0 { 1030 ok := object.Key("CompressionFormat") 1031 ok.String(string(v.CompressionFormat)) 1032 } 1033 1034 if v.DataFormatConversionConfiguration != nil { 1035 ok := object.Key("DataFormatConversionConfiguration") 1036 if err := awsAwsjson11_serializeDocumentDataFormatConversionConfiguration(v.DataFormatConversionConfiguration, ok); err != nil { 1037 return err 1038 } 1039 } 1040 1041 if v.EncryptionConfiguration != nil { 1042 ok := object.Key("EncryptionConfiguration") 1043 if err := awsAwsjson11_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { 1044 return err 1045 } 1046 } 1047 1048 if v.ErrorOutputPrefix != nil { 1049 ok := object.Key("ErrorOutputPrefix") 1050 ok.String(*v.ErrorOutputPrefix) 1051 } 1052 1053 if v.Prefix != nil { 1054 ok := object.Key("Prefix") 1055 ok.String(*v.Prefix) 1056 } 1057 1058 if v.ProcessingConfiguration != nil { 1059 ok := object.Key("ProcessingConfiguration") 1060 if err := awsAwsjson11_serializeDocumentProcessingConfiguration(v.ProcessingConfiguration, ok); err != nil { 1061 return err 1062 } 1063 } 1064 1065 if v.RoleARN != nil { 1066 ok := object.Key("RoleARN") 1067 ok.String(*v.RoleARN) 1068 } 1069 1070 if len(v.S3BackupMode) > 0 { 1071 ok := object.Key("S3BackupMode") 1072 ok.String(string(v.S3BackupMode)) 1073 } 1074 1075 if v.S3BackupUpdate != nil { 1076 ok := object.Key("S3BackupUpdate") 1077 if err := awsAwsjson11_serializeDocumentS3DestinationUpdate(v.S3BackupUpdate, ok); err != nil { 1078 return err 1079 } 1080 } 1081 1082 return nil 1083} 1084 1085func awsAwsjson11_serializeDocumentHiveJsonSerDe(v *types.HiveJsonSerDe, value smithyjson.Value) error { 1086 object := value.Object() 1087 defer object.Close() 1088 1089 if v.TimestampFormats != nil { 1090 ok := object.Key("TimestampFormats") 1091 if err := awsAwsjson11_serializeDocumentListOfNonEmptyStrings(v.TimestampFormats, ok); err != nil { 1092 return err 1093 } 1094 } 1095 1096 return nil 1097} 1098 1099func awsAwsjson11_serializeDocumentHttpEndpointBufferingHints(v *types.HttpEndpointBufferingHints, value smithyjson.Value) error { 1100 object := value.Object() 1101 defer object.Close() 1102 1103 if v.IntervalInSeconds != nil { 1104 ok := object.Key("IntervalInSeconds") 1105 ok.Integer(*v.IntervalInSeconds) 1106 } 1107 1108 if v.SizeInMBs != nil { 1109 ok := object.Key("SizeInMBs") 1110 ok.Integer(*v.SizeInMBs) 1111 } 1112 1113 return nil 1114} 1115 1116func awsAwsjson11_serializeDocumentHttpEndpointCommonAttribute(v *types.HttpEndpointCommonAttribute, value smithyjson.Value) error { 1117 object := value.Object() 1118 defer object.Close() 1119 1120 if v.AttributeName != nil { 1121 ok := object.Key("AttributeName") 1122 ok.String(*v.AttributeName) 1123 } 1124 1125 if v.AttributeValue != nil { 1126 ok := object.Key("AttributeValue") 1127 ok.String(*v.AttributeValue) 1128 } 1129 1130 return nil 1131} 1132 1133func awsAwsjson11_serializeDocumentHttpEndpointCommonAttributesList(v []types.HttpEndpointCommonAttribute, value smithyjson.Value) error { 1134 array := value.Array() 1135 defer array.Close() 1136 1137 for i := range v { 1138 av := array.Value() 1139 if err := awsAwsjson11_serializeDocumentHttpEndpointCommonAttribute(&v[i], av); err != nil { 1140 return err 1141 } 1142 } 1143 return nil 1144} 1145 1146func awsAwsjson11_serializeDocumentHttpEndpointConfiguration(v *types.HttpEndpointConfiguration, value smithyjson.Value) error { 1147 object := value.Object() 1148 defer object.Close() 1149 1150 if v.AccessKey != nil { 1151 ok := object.Key("AccessKey") 1152 ok.String(*v.AccessKey) 1153 } 1154 1155 if v.Name != nil { 1156 ok := object.Key("Name") 1157 ok.String(*v.Name) 1158 } 1159 1160 if v.Url != nil { 1161 ok := object.Key("Url") 1162 ok.String(*v.Url) 1163 } 1164 1165 return nil 1166} 1167 1168func awsAwsjson11_serializeDocumentHttpEndpointDestinationConfiguration(v *types.HttpEndpointDestinationConfiguration, value smithyjson.Value) error { 1169 object := value.Object() 1170 defer object.Close() 1171 1172 if v.BufferingHints != nil { 1173 ok := object.Key("BufferingHints") 1174 if err := awsAwsjson11_serializeDocumentHttpEndpointBufferingHints(v.BufferingHints, ok); err != nil { 1175 return err 1176 } 1177 } 1178 1179 if v.CloudWatchLoggingOptions != nil { 1180 ok := object.Key("CloudWatchLoggingOptions") 1181 if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { 1182 return err 1183 } 1184 } 1185 1186 if v.EndpointConfiguration != nil { 1187 ok := object.Key("EndpointConfiguration") 1188 if err := awsAwsjson11_serializeDocumentHttpEndpointConfiguration(v.EndpointConfiguration, ok); err != nil { 1189 return err 1190 } 1191 } 1192 1193 if v.ProcessingConfiguration != nil { 1194 ok := object.Key("ProcessingConfiguration") 1195 if err := awsAwsjson11_serializeDocumentProcessingConfiguration(v.ProcessingConfiguration, ok); err != nil { 1196 return err 1197 } 1198 } 1199 1200 if v.RequestConfiguration != nil { 1201 ok := object.Key("RequestConfiguration") 1202 if err := awsAwsjson11_serializeDocumentHttpEndpointRequestConfiguration(v.RequestConfiguration, ok); err != nil { 1203 return err 1204 } 1205 } 1206 1207 if v.RetryOptions != nil { 1208 ok := object.Key("RetryOptions") 1209 if err := awsAwsjson11_serializeDocumentHttpEndpointRetryOptions(v.RetryOptions, ok); err != nil { 1210 return err 1211 } 1212 } 1213 1214 if v.RoleARN != nil { 1215 ok := object.Key("RoleARN") 1216 ok.String(*v.RoleARN) 1217 } 1218 1219 if len(v.S3BackupMode) > 0 { 1220 ok := object.Key("S3BackupMode") 1221 ok.String(string(v.S3BackupMode)) 1222 } 1223 1224 if v.S3Configuration != nil { 1225 ok := object.Key("S3Configuration") 1226 if err := awsAwsjson11_serializeDocumentS3DestinationConfiguration(v.S3Configuration, ok); err != nil { 1227 return err 1228 } 1229 } 1230 1231 return nil 1232} 1233 1234func awsAwsjson11_serializeDocumentHttpEndpointDestinationUpdate(v *types.HttpEndpointDestinationUpdate, value smithyjson.Value) error { 1235 object := value.Object() 1236 defer object.Close() 1237 1238 if v.BufferingHints != nil { 1239 ok := object.Key("BufferingHints") 1240 if err := awsAwsjson11_serializeDocumentHttpEndpointBufferingHints(v.BufferingHints, ok); err != nil { 1241 return err 1242 } 1243 } 1244 1245 if v.CloudWatchLoggingOptions != nil { 1246 ok := object.Key("CloudWatchLoggingOptions") 1247 if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { 1248 return err 1249 } 1250 } 1251 1252 if v.EndpointConfiguration != nil { 1253 ok := object.Key("EndpointConfiguration") 1254 if err := awsAwsjson11_serializeDocumentHttpEndpointConfiguration(v.EndpointConfiguration, ok); err != nil { 1255 return err 1256 } 1257 } 1258 1259 if v.ProcessingConfiguration != nil { 1260 ok := object.Key("ProcessingConfiguration") 1261 if err := awsAwsjson11_serializeDocumentProcessingConfiguration(v.ProcessingConfiguration, ok); err != nil { 1262 return err 1263 } 1264 } 1265 1266 if v.RequestConfiguration != nil { 1267 ok := object.Key("RequestConfiguration") 1268 if err := awsAwsjson11_serializeDocumentHttpEndpointRequestConfiguration(v.RequestConfiguration, ok); err != nil { 1269 return err 1270 } 1271 } 1272 1273 if v.RetryOptions != nil { 1274 ok := object.Key("RetryOptions") 1275 if err := awsAwsjson11_serializeDocumentHttpEndpointRetryOptions(v.RetryOptions, ok); err != nil { 1276 return err 1277 } 1278 } 1279 1280 if v.RoleARN != nil { 1281 ok := object.Key("RoleARN") 1282 ok.String(*v.RoleARN) 1283 } 1284 1285 if len(v.S3BackupMode) > 0 { 1286 ok := object.Key("S3BackupMode") 1287 ok.String(string(v.S3BackupMode)) 1288 } 1289 1290 if v.S3Update != nil { 1291 ok := object.Key("S3Update") 1292 if err := awsAwsjson11_serializeDocumentS3DestinationUpdate(v.S3Update, ok); err != nil { 1293 return err 1294 } 1295 } 1296 1297 return nil 1298} 1299 1300func awsAwsjson11_serializeDocumentHttpEndpointRequestConfiguration(v *types.HttpEndpointRequestConfiguration, value smithyjson.Value) error { 1301 object := value.Object() 1302 defer object.Close() 1303 1304 if v.CommonAttributes != nil { 1305 ok := object.Key("CommonAttributes") 1306 if err := awsAwsjson11_serializeDocumentHttpEndpointCommonAttributesList(v.CommonAttributes, ok); err != nil { 1307 return err 1308 } 1309 } 1310 1311 if len(v.ContentEncoding) > 0 { 1312 ok := object.Key("ContentEncoding") 1313 ok.String(string(v.ContentEncoding)) 1314 } 1315 1316 return nil 1317} 1318 1319func awsAwsjson11_serializeDocumentHttpEndpointRetryOptions(v *types.HttpEndpointRetryOptions, value smithyjson.Value) error { 1320 object := value.Object() 1321 defer object.Close() 1322 1323 if v.DurationInSeconds != nil { 1324 ok := object.Key("DurationInSeconds") 1325 ok.Integer(*v.DurationInSeconds) 1326 } 1327 1328 return nil 1329} 1330 1331func awsAwsjson11_serializeDocumentInputFormatConfiguration(v *types.InputFormatConfiguration, value smithyjson.Value) error { 1332 object := value.Object() 1333 defer object.Close() 1334 1335 if v.Deserializer != nil { 1336 ok := object.Key("Deserializer") 1337 if err := awsAwsjson11_serializeDocumentDeserializer(v.Deserializer, ok); err != nil { 1338 return err 1339 } 1340 } 1341 1342 return nil 1343} 1344 1345func awsAwsjson11_serializeDocumentKinesisStreamSourceConfiguration(v *types.KinesisStreamSourceConfiguration, value smithyjson.Value) error { 1346 object := value.Object() 1347 defer object.Close() 1348 1349 if v.KinesisStreamARN != nil { 1350 ok := object.Key("KinesisStreamARN") 1351 ok.String(*v.KinesisStreamARN) 1352 } 1353 1354 if v.RoleARN != nil { 1355 ok := object.Key("RoleARN") 1356 ok.String(*v.RoleARN) 1357 } 1358 1359 return nil 1360} 1361 1362func awsAwsjson11_serializeDocumentKMSEncryptionConfig(v *types.KMSEncryptionConfig, value smithyjson.Value) error { 1363 object := value.Object() 1364 defer object.Close() 1365 1366 if v.AWSKMSKeyARN != nil { 1367 ok := object.Key("AWSKMSKeyARN") 1368 ok.String(*v.AWSKMSKeyARN) 1369 } 1370 1371 return nil 1372} 1373 1374func awsAwsjson11_serializeDocumentListOfNonEmptyStrings(v []string, value smithyjson.Value) error { 1375 array := value.Array() 1376 defer array.Close() 1377 1378 for i := range v { 1379 av := array.Value() 1380 av.String(v[i]) 1381 } 1382 return nil 1383} 1384 1385func awsAwsjson11_serializeDocumentListOfNonEmptyStringsWithoutWhitespace(v []string, value smithyjson.Value) error { 1386 array := value.Array() 1387 defer array.Close() 1388 1389 for i := range v { 1390 av := array.Value() 1391 av.String(v[i]) 1392 } 1393 return nil 1394} 1395 1396func awsAwsjson11_serializeDocumentOpenXJsonSerDe(v *types.OpenXJsonSerDe, value smithyjson.Value) error { 1397 object := value.Object() 1398 defer object.Close() 1399 1400 if v.CaseInsensitive != nil { 1401 ok := object.Key("CaseInsensitive") 1402 ok.Boolean(*v.CaseInsensitive) 1403 } 1404 1405 if v.ColumnToJsonKeyMappings != nil { 1406 ok := object.Key("ColumnToJsonKeyMappings") 1407 if err := awsAwsjson11_serializeDocumentColumnToJsonKeyMappings(v.ColumnToJsonKeyMappings, ok); err != nil { 1408 return err 1409 } 1410 } 1411 1412 if v.ConvertDotsInJsonKeysToUnderscores != nil { 1413 ok := object.Key("ConvertDotsInJsonKeysToUnderscores") 1414 ok.Boolean(*v.ConvertDotsInJsonKeysToUnderscores) 1415 } 1416 1417 return nil 1418} 1419 1420func awsAwsjson11_serializeDocumentOrcSerDe(v *types.OrcSerDe, value smithyjson.Value) error { 1421 object := value.Object() 1422 defer object.Close() 1423 1424 if v.BlockSizeBytes != nil { 1425 ok := object.Key("BlockSizeBytes") 1426 ok.Integer(*v.BlockSizeBytes) 1427 } 1428 1429 if v.BloomFilterColumns != nil { 1430 ok := object.Key("BloomFilterColumns") 1431 if err := awsAwsjson11_serializeDocumentListOfNonEmptyStringsWithoutWhitespace(v.BloomFilterColumns, ok); err != nil { 1432 return err 1433 } 1434 } 1435 1436 if v.BloomFilterFalsePositiveProbability != nil { 1437 ok := object.Key("BloomFilterFalsePositiveProbability") 1438 ok.Double(*v.BloomFilterFalsePositiveProbability) 1439 } 1440 1441 if len(v.Compression) > 0 { 1442 ok := object.Key("Compression") 1443 ok.String(string(v.Compression)) 1444 } 1445 1446 if v.DictionaryKeyThreshold != nil { 1447 ok := object.Key("DictionaryKeyThreshold") 1448 ok.Double(*v.DictionaryKeyThreshold) 1449 } 1450 1451 if v.EnablePadding != nil { 1452 ok := object.Key("EnablePadding") 1453 ok.Boolean(*v.EnablePadding) 1454 } 1455 1456 if len(v.FormatVersion) > 0 { 1457 ok := object.Key("FormatVersion") 1458 ok.String(string(v.FormatVersion)) 1459 } 1460 1461 if v.PaddingTolerance != nil { 1462 ok := object.Key("PaddingTolerance") 1463 ok.Double(*v.PaddingTolerance) 1464 } 1465 1466 if v.RowIndexStride != nil { 1467 ok := object.Key("RowIndexStride") 1468 ok.Integer(*v.RowIndexStride) 1469 } 1470 1471 if v.StripeSizeBytes != nil { 1472 ok := object.Key("StripeSizeBytes") 1473 ok.Integer(*v.StripeSizeBytes) 1474 } 1475 1476 return nil 1477} 1478 1479func awsAwsjson11_serializeDocumentOutputFormatConfiguration(v *types.OutputFormatConfiguration, value smithyjson.Value) error { 1480 object := value.Object() 1481 defer object.Close() 1482 1483 if v.Serializer != nil { 1484 ok := object.Key("Serializer") 1485 if err := awsAwsjson11_serializeDocumentSerializer(v.Serializer, ok); err != nil { 1486 return err 1487 } 1488 } 1489 1490 return nil 1491} 1492 1493func awsAwsjson11_serializeDocumentParquetSerDe(v *types.ParquetSerDe, value smithyjson.Value) error { 1494 object := value.Object() 1495 defer object.Close() 1496 1497 if v.BlockSizeBytes != nil { 1498 ok := object.Key("BlockSizeBytes") 1499 ok.Integer(*v.BlockSizeBytes) 1500 } 1501 1502 if len(v.Compression) > 0 { 1503 ok := object.Key("Compression") 1504 ok.String(string(v.Compression)) 1505 } 1506 1507 if v.EnableDictionaryCompression != nil { 1508 ok := object.Key("EnableDictionaryCompression") 1509 ok.Boolean(*v.EnableDictionaryCompression) 1510 } 1511 1512 if v.MaxPaddingBytes != nil { 1513 ok := object.Key("MaxPaddingBytes") 1514 ok.Integer(*v.MaxPaddingBytes) 1515 } 1516 1517 if v.PageSizeBytes != nil { 1518 ok := object.Key("PageSizeBytes") 1519 ok.Integer(*v.PageSizeBytes) 1520 } 1521 1522 if len(v.WriterVersion) > 0 { 1523 ok := object.Key("WriterVersion") 1524 ok.String(string(v.WriterVersion)) 1525 } 1526 1527 return nil 1528} 1529 1530func awsAwsjson11_serializeDocumentProcessingConfiguration(v *types.ProcessingConfiguration, value smithyjson.Value) error { 1531 object := value.Object() 1532 defer object.Close() 1533 1534 if v.Enabled != nil { 1535 ok := object.Key("Enabled") 1536 ok.Boolean(*v.Enabled) 1537 } 1538 1539 if v.Processors != nil { 1540 ok := object.Key("Processors") 1541 if err := awsAwsjson11_serializeDocumentProcessorList(v.Processors, ok); err != nil { 1542 return err 1543 } 1544 } 1545 1546 return nil 1547} 1548 1549func awsAwsjson11_serializeDocumentProcessor(v *types.Processor, value smithyjson.Value) error { 1550 object := value.Object() 1551 defer object.Close() 1552 1553 if v.Parameters != nil { 1554 ok := object.Key("Parameters") 1555 if err := awsAwsjson11_serializeDocumentProcessorParameterList(v.Parameters, ok); err != nil { 1556 return err 1557 } 1558 } 1559 1560 if len(v.Type) > 0 { 1561 ok := object.Key("Type") 1562 ok.String(string(v.Type)) 1563 } 1564 1565 return nil 1566} 1567 1568func awsAwsjson11_serializeDocumentProcessorList(v []types.Processor, value smithyjson.Value) error { 1569 array := value.Array() 1570 defer array.Close() 1571 1572 for i := range v { 1573 av := array.Value() 1574 if err := awsAwsjson11_serializeDocumentProcessor(&v[i], av); err != nil { 1575 return err 1576 } 1577 } 1578 return nil 1579} 1580 1581func awsAwsjson11_serializeDocumentProcessorParameter(v *types.ProcessorParameter, value smithyjson.Value) error { 1582 object := value.Object() 1583 defer object.Close() 1584 1585 if len(v.ParameterName) > 0 { 1586 ok := object.Key("ParameterName") 1587 ok.String(string(v.ParameterName)) 1588 } 1589 1590 if v.ParameterValue != nil { 1591 ok := object.Key("ParameterValue") 1592 ok.String(*v.ParameterValue) 1593 } 1594 1595 return nil 1596} 1597 1598func awsAwsjson11_serializeDocumentProcessorParameterList(v []types.ProcessorParameter, value smithyjson.Value) error { 1599 array := value.Array() 1600 defer array.Close() 1601 1602 for i := range v { 1603 av := array.Value() 1604 if err := awsAwsjson11_serializeDocumentProcessorParameter(&v[i], av); err != nil { 1605 return err 1606 } 1607 } 1608 return nil 1609} 1610 1611func awsAwsjson11_serializeDocumentPutRecordBatchRequestEntryList(v []types.Record, value smithyjson.Value) error { 1612 array := value.Array() 1613 defer array.Close() 1614 1615 for i := range v { 1616 av := array.Value() 1617 if err := awsAwsjson11_serializeDocumentRecord(&v[i], av); err != nil { 1618 return err 1619 } 1620 } 1621 return nil 1622} 1623 1624func awsAwsjson11_serializeDocumentRecord(v *types.Record, value smithyjson.Value) error { 1625 object := value.Object() 1626 defer object.Close() 1627 1628 if v.Data != nil { 1629 ok := object.Key("Data") 1630 ok.Base64EncodeBytes(v.Data) 1631 } 1632 1633 return nil 1634} 1635 1636func awsAwsjson11_serializeDocumentRedshiftDestinationConfiguration(v *types.RedshiftDestinationConfiguration, value smithyjson.Value) error { 1637 object := value.Object() 1638 defer object.Close() 1639 1640 if v.CloudWatchLoggingOptions != nil { 1641 ok := object.Key("CloudWatchLoggingOptions") 1642 if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { 1643 return err 1644 } 1645 } 1646 1647 if v.ClusterJDBCURL != nil { 1648 ok := object.Key("ClusterJDBCURL") 1649 ok.String(*v.ClusterJDBCURL) 1650 } 1651 1652 if v.CopyCommand != nil { 1653 ok := object.Key("CopyCommand") 1654 if err := awsAwsjson11_serializeDocumentCopyCommand(v.CopyCommand, ok); err != nil { 1655 return err 1656 } 1657 } 1658 1659 if v.Password != nil { 1660 ok := object.Key("Password") 1661 ok.String(*v.Password) 1662 } 1663 1664 if v.ProcessingConfiguration != nil { 1665 ok := object.Key("ProcessingConfiguration") 1666 if err := awsAwsjson11_serializeDocumentProcessingConfiguration(v.ProcessingConfiguration, ok); err != nil { 1667 return err 1668 } 1669 } 1670 1671 if v.RetryOptions != nil { 1672 ok := object.Key("RetryOptions") 1673 if err := awsAwsjson11_serializeDocumentRedshiftRetryOptions(v.RetryOptions, ok); err != nil { 1674 return err 1675 } 1676 } 1677 1678 if v.RoleARN != nil { 1679 ok := object.Key("RoleARN") 1680 ok.String(*v.RoleARN) 1681 } 1682 1683 if v.S3BackupConfiguration != nil { 1684 ok := object.Key("S3BackupConfiguration") 1685 if err := awsAwsjson11_serializeDocumentS3DestinationConfiguration(v.S3BackupConfiguration, ok); err != nil { 1686 return err 1687 } 1688 } 1689 1690 if len(v.S3BackupMode) > 0 { 1691 ok := object.Key("S3BackupMode") 1692 ok.String(string(v.S3BackupMode)) 1693 } 1694 1695 if v.S3Configuration != nil { 1696 ok := object.Key("S3Configuration") 1697 if err := awsAwsjson11_serializeDocumentS3DestinationConfiguration(v.S3Configuration, ok); err != nil { 1698 return err 1699 } 1700 } 1701 1702 if v.Username != nil { 1703 ok := object.Key("Username") 1704 ok.String(*v.Username) 1705 } 1706 1707 return nil 1708} 1709 1710func awsAwsjson11_serializeDocumentRedshiftDestinationUpdate(v *types.RedshiftDestinationUpdate, value smithyjson.Value) error { 1711 object := value.Object() 1712 defer object.Close() 1713 1714 if v.CloudWatchLoggingOptions != nil { 1715 ok := object.Key("CloudWatchLoggingOptions") 1716 if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { 1717 return err 1718 } 1719 } 1720 1721 if v.ClusterJDBCURL != nil { 1722 ok := object.Key("ClusterJDBCURL") 1723 ok.String(*v.ClusterJDBCURL) 1724 } 1725 1726 if v.CopyCommand != nil { 1727 ok := object.Key("CopyCommand") 1728 if err := awsAwsjson11_serializeDocumentCopyCommand(v.CopyCommand, ok); err != nil { 1729 return err 1730 } 1731 } 1732 1733 if v.Password != nil { 1734 ok := object.Key("Password") 1735 ok.String(*v.Password) 1736 } 1737 1738 if v.ProcessingConfiguration != nil { 1739 ok := object.Key("ProcessingConfiguration") 1740 if err := awsAwsjson11_serializeDocumentProcessingConfiguration(v.ProcessingConfiguration, ok); err != nil { 1741 return err 1742 } 1743 } 1744 1745 if v.RetryOptions != nil { 1746 ok := object.Key("RetryOptions") 1747 if err := awsAwsjson11_serializeDocumentRedshiftRetryOptions(v.RetryOptions, ok); err != nil { 1748 return err 1749 } 1750 } 1751 1752 if v.RoleARN != nil { 1753 ok := object.Key("RoleARN") 1754 ok.String(*v.RoleARN) 1755 } 1756 1757 if len(v.S3BackupMode) > 0 { 1758 ok := object.Key("S3BackupMode") 1759 ok.String(string(v.S3BackupMode)) 1760 } 1761 1762 if v.S3BackupUpdate != nil { 1763 ok := object.Key("S3BackupUpdate") 1764 if err := awsAwsjson11_serializeDocumentS3DestinationUpdate(v.S3BackupUpdate, ok); err != nil { 1765 return err 1766 } 1767 } 1768 1769 if v.S3Update != nil { 1770 ok := object.Key("S3Update") 1771 if err := awsAwsjson11_serializeDocumentS3DestinationUpdate(v.S3Update, ok); err != nil { 1772 return err 1773 } 1774 } 1775 1776 if v.Username != nil { 1777 ok := object.Key("Username") 1778 ok.String(*v.Username) 1779 } 1780 1781 return nil 1782} 1783 1784func awsAwsjson11_serializeDocumentRedshiftRetryOptions(v *types.RedshiftRetryOptions, value smithyjson.Value) error { 1785 object := value.Object() 1786 defer object.Close() 1787 1788 if v.DurationInSeconds != nil { 1789 ok := object.Key("DurationInSeconds") 1790 ok.Integer(*v.DurationInSeconds) 1791 } 1792 1793 return nil 1794} 1795 1796func awsAwsjson11_serializeDocumentS3DestinationConfiguration(v *types.S3DestinationConfiguration, value smithyjson.Value) error { 1797 object := value.Object() 1798 defer object.Close() 1799 1800 if v.BucketARN != nil { 1801 ok := object.Key("BucketARN") 1802 ok.String(*v.BucketARN) 1803 } 1804 1805 if v.BufferingHints != nil { 1806 ok := object.Key("BufferingHints") 1807 if err := awsAwsjson11_serializeDocumentBufferingHints(v.BufferingHints, ok); err != nil { 1808 return err 1809 } 1810 } 1811 1812 if v.CloudWatchLoggingOptions != nil { 1813 ok := object.Key("CloudWatchLoggingOptions") 1814 if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { 1815 return err 1816 } 1817 } 1818 1819 if len(v.CompressionFormat) > 0 { 1820 ok := object.Key("CompressionFormat") 1821 ok.String(string(v.CompressionFormat)) 1822 } 1823 1824 if v.EncryptionConfiguration != nil { 1825 ok := object.Key("EncryptionConfiguration") 1826 if err := awsAwsjson11_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { 1827 return err 1828 } 1829 } 1830 1831 if v.ErrorOutputPrefix != nil { 1832 ok := object.Key("ErrorOutputPrefix") 1833 ok.String(*v.ErrorOutputPrefix) 1834 } 1835 1836 if v.Prefix != nil { 1837 ok := object.Key("Prefix") 1838 ok.String(*v.Prefix) 1839 } 1840 1841 if v.RoleARN != nil { 1842 ok := object.Key("RoleARN") 1843 ok.String(*v.RoleARN) 1844 } 1845 1846 return nil 1847} 1848 1849func awsAwsjson11_serializeDocumentS3DestinationUpdate(v *types.S3DestinationUpdate, value smithyjson.Value) error { 1850 object := value.Object() 1851 defer object.Close() 1852 1853 if v.BucketARN != nil { 1854 ok := object.Key("BucketARN") 1855 ok.String(*v.BucketARN) 1856 } 1857 1858 if v.BufferingHints != nil { 1859 ok := object.Key("BufferingHints") 1860 if err := awsAwsjson11_serializeDocumentBufferingHints(v.BufferingHints, ok); err != nil { 1861 return err 1862 } 1863 } 1864 1865 if v.CloudWatchLoggingOptions != nil { 1866 ok := object.Key("CloudWatchLoggingOptions") 1867 if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { 1868 return err 1869 } 1870 } 1871 1872 if len(v.CompressionFormat) > 0 { 1873 ok := object.Key("CompressionFormat") 1874 ok.String(string(v.CompressionFormat)) 1875 } 1876 1877 if v.EncryptionConfiguration != nil { 1878 ok := object.Key("EncryptionConfiguration") 1879 if err := awsAwsjson11_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { 1880 return err 1881 } 1882 } 1883 1884 if v.ErrorOutputPrefix != nil { 1885 ok := object.Key("ErrorOutputPrefix") 1886 ok.String(*v.ErrorOutputPrefix) 1887 } 1888 1889 if v.Prefix != nil { 1890 ok := object.Key("Prefix") 1891 ok.String(*v.Prefix) 1892 } 1893 1894 if v.RoleARN != nil { 1895 ok := object.Key("RoleARN") 1896 ok.String(*v.RoleARN) 1897 } 1898 1899 return nil 1900} 1901 1902func awsAwsjson11_serializeDocumentSchemaConfiguration(v *types.SchemaConfiguration, value smithyjson.Value) error { 1903 object := value.Object() 1904 defer object.Close() 1905 1906 if v.CatalogId != nil { 1907 ok := object.Key("CatalogId") 1908 ok.String(*v.CatalogId) 1909 } 1910 1911 if v.DatabaseName != nil { 1912 ok := object.Key("DatabaseName") 1913 ok.String(*v.DatabaseName) 1914 } 1915 1916 if v.Region != nil { 1917 ok := object.Key("Region") 1918 ok.String(*v.Region) 1919 } 1920 1921 if v.RoleARN != nil { 1922 ok := object.Key("RoleARN") 1923 ok.String(*v.RoleARN) 1924 } 1925 1926 if v.TableName != nil { 1927 ok := object.Key("TableName") 1928 ok.String(*v.TableName) 1929 } 1930 1931 if v.VersionId != nil { 1932 ok := object.Key("VersionId") 1933 ok.String(*v.VersionId) 1934 } 1935 1936 return nil 1937} 1938 1939func awsAwsjson11_serializeDocumentSecurityGroupIdList(v []string, value smithyjson.Value) error { 1940 array := value.Array() 1941 defer array.Close() 1942 1943 for i := range v { 1944 av := array.Value() 1945 av.String(v[i]) 1946 } 1947 return nil 1948} 1949 1950func awsAwsjson11_serializeDocumentSerializer(v *types.Serializer, value smithyjson.Value) error { 1951 object := value.Object() 1952 defer object.Close() 1953 1954 if v.OrcSerDe != nil { 1955 ok := object.Key("OrcSerDe") 1956 if err := awsAwsjson11_serializeDocumentOrcSerDe(v.OrcSerDe, ok); err != nil { 1957 return err 1958 } 1959 } 1960 1961 if v.ParquetSerDe != nil { 1962 ok := object.Key("ParquetSerDe") 1963 if err := awsAwsjson11_serializeDocumentParquetSerDe(v.ParquetSerDe, ok); err != nil { 1964 return err 1965 } 1966 } 1967 1968 return nil 1969} 1970 1971func awsAwsjson11_serializeDocumentSplunkDestinationConfiguration(v *types.SplunkDestinationConfiguration, value smithyjson.Value) error { 1972 object := value.Object() 1973 defer object.Close() 1974 1975 if v.CloudWatchLoggingOptions != nil { 1976 ok := object.Key("CloudWatchLoggingOptions") 1977 if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { 1978 return err 1979 } 1980 } 1981 1982 if v.HECAcknowledgmentTimeoutInSeconds != nil { 1983 ok := object.Key("HECAcknowledgmentTimeoutInSeconds") 1984 ok.Integer(*v.HECAcknowledgmentTimeoutInSeconds) 1985 } 1986 1987 if v.HECEndpoint != nil { 1988 ok := object.Key("HECEndpoint") 1989 ok.String(*v.HECEndpoint) 1990 } 1991 1992 if len(v.HECEndpointType) > 0 { 1993 ok := object.Key("HECEndpointType") 1994 ok.String(string(v.HECEndpointType)) 1995 } 1996 1997 if v.HECToken != nil { 1998 ok := object.Key("HECToken") 1999 ok.String(*v.HECToken) 2000 } 2001 2002 if v.ProcessingConfiguration != nil { 2003 ok := object.Key("ProcessingConfiguration") 2004 if err := awsAwsjson11_serializeDocumentProcessingConfiguration(v.ProcessingConfiguration, ok); err != nil { 2005 return err 2006 } 2007 } 2008 2009 if v.RetryOptions != nil { 2010 ok := object.Key("RetryOptions") 2011 if err := awsAwsjson11_serializeDocumentSplunkRetryOptions(v.RetryOptions, ok); err != nil { 2012 return err 2013 } 2014 } 2015 2016 if len(v.S3BackupMode) > 0 { 2017 ok := object.Key("S3BackupMode") 2018 ok.String(string(v.S3BackupMode)) 2019 } 2020 2021 if v.S3Configuration != nil { 2022 ok := object.Key("S3Configuration") 2023 if err := awsAwsjson11_serializeDocumentS3DestinationConfiguration(v.S3Configuration, ok); err != nil { 2024 return err 2025 } 2026 } 2027 2028 return nil 2029} 2030 2031func awsAwsjson11_serializeDocumentSplunkDestinationUpdate(v *types.SplunkDestinationUpdate, value smithyjson.Value) error { 2032 object := value.Object() 2033 defer object.Close() 2034 2035 if v.CloudWatchLoggingOptions != nil { 2036 ok := object.Key("CloudWatchLoggingOptions") 2037 if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { 2038 return err 2039 } 2040 } 2041 2042 if v.HECAcknowledgmentTimeoutInSeconds != nil { 2043 ok := object.Key("HECAcknowledgmentTimeoutInSeconds") 2044 ok.Integer(*v.HECAcknowledgmentTimeoutInSeconds) 2045 } 2046 2047 if v.HECEndpoint != nil { 2048 ok := object.Key("HECEndpoint") 2049 ok.String(*v.HECEndpoint) 2050 } 2051 2052 if len(v.HECEndpointType) > 0 { 2053 ok := object.Key("HECEndpointType") 2054 ok.String(string(v.HECEndpointType)) 2055 } 2056 2057 if v.HECToken != nil { 2058 ok := object.Key("HECToken") 2059 ok.String(*v.HECToken) 2060 } 2061 2062 if v.ProcessingConfiguration != nil { 2063 ok := object.Key("ProcessingConfiguration") 2064 if err := awsAwsjson11_serializeDocumentProcessingConfiguration(v.ProcessingConfiguration, ok); err != nil { 2065 return err 2066 } 2067 } 2068 2069 if v.RetryOptions != nil { 2070 ok := object.Key("RetryOptions") 2071 if err := awsAwsjson11_serializeDocumentSplunkRetryOptions(v.RetryOptions, ok); err != nil { 2072 return err 2073 } 2074 } 2075 2076 if len(v.S3BackupMode) > 0 { 2077 ok := object.Key("S3BackupMode") 2078 ok.String(string(v.S3BackupMode)) 2079 } 2080 2081 if v.S3Update != nil { 2082 ok := object.Key("S3Update") 2083 if err := awsAwsjson11_serializeDocumentS3DestinationUpdate(v.S3Update, ok); err != nil { 2084 return err 2085 } 2086 } 2087 2088 return nil 2089} 2090 2091func awsAwsjson11_serializeDocumentSplunkRetryOptions(v *types.SplunkRetryOptions, value smithyjson.Value) error { 2092 object := value.Object() 2093 defer object.Close() 2094 2095 if v.DurationInSeconds != nil { 2096 ok := object.Key("DurationInSeconds") 2097 ok.Integer(*v.DurationInSeconds) 2098 } 2099 2100 return nil 2101} 2102 2103func awsAwsjson11_serializeDocumentSubnetIdList(v []string, value smithyjson.Value) error { 2104 array := value.Array() 2105 defer array.Close() 2106 2107 for i := range v { 2108 av := array.Value() 2109 av.String(v[i]) 2110 } 2111 return nil 2112} 2113 2114func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { 2115 object := value.Object() 2116 defer object.Close() 2117 2118 if v.Key != nil { 2119 ok := object.Key("Key") 2120 ok.String(*v.Key) 2121 } 2122 2123 if v.Value != nil { 2124 ok := object.Key("Value") 2125 ok.String(*v.Value) 2126 } 2127 2128 return nil 2129} 2130 2131func awsAwsjson11_serializeDocumentTagDeliveryStreamInputTagList(v []types.Tag, value smithyjson.Value) error { 2132 array := value.Array() 2133 defer array.Close() 2134 2135 for i := range v { 2136 av := array.Value() 2137 if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { 2138 return err 2139 } 2140 } 2141 return nil 2142} 2143 2144func awsAwsjson11_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error { 2145 array := value.Array() 2146 defer array.Close() 2147 2148 for i := range v { 2149 av := array.Value() 2150 av.String(v[i]) 2151 } 2152 return nil 2153} 2154 2155func awsAwsjson11_serializeDocumentVpcConfiguration(v *types.VpcConfiguration, value smithyjson.Value) error { 2156 object := value.Object() 2157 defer object.Close() 2158 2159 if v.RoleARN != nil { 2160 ok := object.Key("RoleARN") 2161 ok.String(*v.RoleARN) 2162 } 2163 2164 if v.SecurityGroupIds != nil { 2165 ok := object.Key("SecurityGroupIds") 2166 if err := awsAwsjson11_serializeDocumentSecurityGroupIdList(v.SecurityGroupIds, ok); err != nil { 2167 return err 2168 } 2169 } 2170 2171 if v.SubnetIds != nil { 2172 ok := object.Key("SubnetIds") 2173 if err := awsAwsjson11_serializeDocumentSubnetIdList(v.SubnetIds, ok); err != nil { 2174 return err 2175 } 2176 } 2177 2178 return nil 2179} 2180 2181func awsAwsjson11_serializeOpDocumentCreateDeliveryStreamInput(v *CreateDeliveryStreamInput, value smithyjson.Value) error { 2182 object := value.Object() 2183 defer object.Close() 2184 2185 if v.DeliveryStreamEncryptionConfigurationInput != nil { 2186 ok := object.Key("DeliveryStreamEncryptionConfigurationInput") 2187 if err := awsAwsjson11_serializeDocumentDeliveryStreamEncryptionConfigurationInput(v.DeliveryStreamEncryptionConfigurationInput, ok); err != nil { 2188 return err 2189 } 2190 } 2191 2192 if v.DeliveryStreamName != nil { 2193 ok := object.Key("DeliveryStreamName") 2194 ok.String(*v.DeliveryStreamName) 2195 } 2196 2197 if len(v.DeliveryStreamType) > 0 { 2198 ok := object.Key("DeliveryStreamType") 2199 ok.String(string(v.DeliveryStreamType)) 2200 } 2201 2202 if v.ElasticsearchDestinationConfiguration != nil { 2203 ok := object.Key("ElasticsearchDestinationConfiguration") 2204 if err := awsAwsjson11_serializeDocumentElasticsearchDestinationConfiguration(v.ElasticsearchDestinationConfiguration, ok); err != nil { 2205 return err 2206 } 2207 } 2208 2209 if v.ExtendedS3DestinationConfiguration != nil { 2210 ok := object.Key("ExtendedS3DestinationConfiguration") 2211 if err := awsAwsjson11_serializeDocumentExtendedS3DestinationConfiguration(v.ExtendedS3DestinationConfiguration, ok); err != nil { 2212 return err 2213 } 2214 } 2215 2216 if v.HttpEndpointDestinationConfiguration != nil { 2217 ok := object.Key("HttpEndpointDestinationConfiguration") 2218 if err := awsAwsjson11_serializeDocumentHttpEndpointDestinationConfiguration(v.HttpEndpointDestinationConfiguration, ok); err != nil { 2219 return err 2220 } 2221 } 2222 2223 if v.KinesisStreamSourceConfiguration != nil { 2224 ok := object.Key("KinesisStreamSourceConfiguration") 2225 if err := awsAwsjson11_serializeDocumentKinesisStreamSourceConfiguration(v.KinesisStreamSourceConfiguration, ok); err != nil { 2226 return err 2227 } 2228 } 2229 2230 if v.RedshiftDestinationConfiguration != nil { 2231 ok := object.Key("RedshiftDestinationConfiguration") 2232 if err := awsAwsjson11_serializeDocumentRedshiftDestinationConfiguration(v.RedshiftDestinationConfiguration, ok); err != nil { 2233 return err 2234 } 2235 } 2236 2237 if v.S3DestinationConfiguration != nil { 2238 ok := object.Key("S3DestinationConfiguration") 2239 if err := awsAwsjson11_serializeDocumentS3DestinationConfiguration(v.S3DestinationConfiguration, ok); err != nil { 2240 return err 2241 } 2242 } 2243 2244 if v.SplunkDestinationConfiguration != nil { 2245 ok := object.Key("SplunkDestinationConfiguration") 2246 if err := awsAwsjson11_serializeDocumentSplunkDestinationConfiguration(v.SplunkDestinationConfiguration, ok); err != nil { 2247 return err 2248 } 2249 } 2250 2251 if v.Tags != nil { 2252 ok := object.Key("Tags") 2253 if err := awsAwsjson11_serializeDocumentTagDeliveryStreamInputTagList(v.Tags, ok); err != nil { 2254 return err 2255 } 2256 } 2257 2258 return nil 2259} 2260 2261func awsAwsjson11_serializeOpDocumentDeleteDeliveryStreamInput(v *DeleteDeliveryStreamInput, value smithyjson.Value) error { 2262 object := value.Object() 2263 defer object.Close() 2264 2265 if v.AllowForceDelete != nil { 2266 ok := object.Key("AllowForceDelete") 2267 ok.Boolean(*v.AllowForceDelete) 2268 } 2269 2270 if v.DeliveryStreamName != nil { 2271 ok := object.Key("DeliveryStreamName") 2272 ok.String(*v.DeliveryStreamName) 2273 } 2274 2275 return nil 2276} 2277 2278func awsAwsjson11_serializeOpDocumentDescribeDeliveryStreamInput(v *DescribeDeliveryStreamInput, value smithyjson.Value) error { 2279 object := value.Object() 2280 defer object.Close() 2281 2282 if v.DeliveryStreamName != nil { 2283 ok := object.Key("DeliveryStreamName") 2284 ok.String(*v.DeliveryStreamName) 2285 } 2286 2287 if v.ExclusiveStartDestinationId != nil { 2288 ok := object.Key("ExclusiveStartDestinationId") 2289 ok.String(*v.ExclusiveStartDestinationId) 2290 } 2291 2292 if v.Limit != nil { 2293 ok := object.Key("Limit") 2294 ok.Integer(*v.Limit) 2295 } 2296 2297 return nil 2298} 2299 2300func awsAwsjson11_serializeOpDocumentListDeliveryStreamsInput(v *ListDeliveryStreamsInput, value smithyjson.Value) error { 2301 object := value.Object() 2302 defer object.Close() 2303 2304 if len(v.DeliveryStreamType) > 0 { 2305 ok := object.Key("DeliveryStreamType") 2306 ok.String(string(v.DeliveryStreamType)) 2307 } 2308 2309 if v.ExclusiveStartDeliveryStreamName != nil { 2310 ok := object.Key("ExclusiveStartDeliveryStreamName") 2311 ok.String(*v.ExclusiveStartDeliveryStreamName) 2312 } 2313 2314 if v.Limit != nil { 2315 ok := object.Key("Limit") 2316 ok.Integer(*v.Limit) 2317 } 2318 2319 return nil 2320} 2321 2322func awsAwsjson11_serializeOpDocumentListTagsForDeliveryStreamInput(v *ListTagsForDeliveryStreamInput, value smithyjson.Value) error { 2323 object := value.Object() 2324 defer object.Close() 2325 2326 if v.DeliveryStreamName != nil { 2327 ok := object.Key("DeliveryStreamName") 2328 ok.String(*v.DeliveryStreamName) 2329 } 2330 2331 if v.ExclusiveStartTagKey != nil { 2332 ok := object.Key("ExclusiveStartTagKey") 2333 ok.String(*v.ExclusiveStartTagKey) 2334 } 2335 2336 if v.Limit != nil { 2337 ok := object.Key("Limit") 2338 ok.Integer(*v.Limit) 2339 } 2340 2341 return nil 2342} 2343 2344func awsAwsjson11_serializeOpDocumentPutRecordBatchInput(v *PutRecordBatchInput, value smithyjson.Value) error { 2345 object := value.Object() 2346 defer object.Close() 2347 2348 if v.DeliveryStreamName != nil { 2349 ok := object.Key("DeliveryStreamName") 2350 ok.String(*v.DeliveryStreamName) 2351 } 2352 2353 if v.Records != nil { 2354 ok := object.Key("Records") 2355 if err := awsAwsjson11_serializeDocumentPutRecordBatchRequestEntryList(v.Records, ok); err != nil { 2356 return err 2357 } 2358 } 2359 2360 return nil 2361} 2362 2363func awsAwsjson11_serializeOpDocumentPutRecordInput(v *PutRecordInput, value smithyjson.Value) error { 2364 object := value.Object() 2365 defer object.Close() 2366 2367 if v.DeliveryStreamName != nil { 2368 ok := object.Key("DeliveryStreamName") 2369 ok.String(*v.DeliveryStreamName) 2370 } 2371 2372 if v.Record != nil { 2373 ok := object.Key("Record") 2374 if err := awsAwsjson11_serializeDocumentRecord(v.Record, ok); err != nil { 2375 return err 2376 } 2377 } 2378 2379 return nil 2380} 2381 2382func awsAwsjson11_serializeOpDocumentStartDeliveryStreamEncryptionInput(v *StartDeliveryStreamEncryptionInput, value smithyjson.Value) error { 2383 object := value.Object() 2384 defer object.Close() 2385 2386 if v.DeliveryStreamEncryptionConfigurationInput != nil { 2387 ok := object.Key("DeliveryStreamEncryptionConfigurationInput") 2388 if err := awsAwsjson11_serializeDocumentDeliveryStreamEncryptionConfigurationInput(v.DeliveryStreamEncryptionConfigurationInput, ok); err != nil { 2389 return err 2390 } 2391 } 2392 2393 if v.DeliveryStreamName != nil { 2394 ok := object.Key("DeliveryStreamName") 2395 ok.String(*v.DeliveryStreamName) 2396 } 2397 2398 return nil 2399} 2400 2401func awsAwsjson11_serializeOpDocumentStopDeliveryStreamEncryptionInput(v *StopDeliveryStreamEncryptionInput, value smithyjson.Value) error { 2402 object := value.Object() 2403 defer object.Close() 2404 2405 if v.DeliveryStreamName != nil { 2406 ok := object.Key("DeliveryStreamName") 2407 ok.String(*v.DeliveryStreamName) 2408 } 2409 2410 return nil 2411} 2412 2413func awsAwsjson11_serializeOpDocumentTagDeliveryStreamInput(v *TagDeliveryStreamInput, value smithyjson.Value) error { 2414 object := value.Object() 2415 defer object.Close() 2416 2417 if v.DeliveryStreamName != nil { 2418 ok := object.Key("DeliveryStreamName") 2419 ok.String(*v.DeliveryStreamName) 2420 } 2421 2422 if v.Tags != nil { 2423 ok := object.Key("Tags") 2424 if err := awsAwsjson11_serializeDocumentTagDeliveryStreamInputTagList(v.Tags, ok); err != nil { 2425 return err 2426 } 2427 } 2428 2429 return nil 2430} 2431 2432func awsAwsjson11_serializeOpDocumentUntagDeliveryStreamInput(v *UntagDeliveryStreamInput, value smithyjson.Value) error { 2433 object := value.Object() 2434 defer object.Close() 2435 2436 if v.DeliveryStreamName != nil { 2437 ok := object.Key("DeliveryStreamName") 2438 ok.String(*v.DeliveryStreamName) 2439 } 2440 2441 if v.TagKeys != nil { 2442 ok := object.Key("TagKeys") 2443 if err := awsAwsjson11_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil { 2444 return err 2445 } 2446 } 2447 2448 return nil 2449} 2450 2451func awsAwsjson11_serializeOpDocumentUpdateDestinationInput(v *UpdateDestinationInput, value smithyjson.Value) error { 2452 object := value.Object() 2453 defer object.Close() 2454 2455 if v.CurrentDeliveryStreamVersionId != nil { 2456 ok := object.Key("CurrentDeliveryStreamVersionId") 2457 ok.String(*v.CurrentDeliveryStreamVersionId) 2458 } 2459 2460 if v.DeliveryStreamName != nil { 2461 ok := object.Key("DeliveryStreamName") 2462 ok.String(*v.DeliveryStreamName) 2463 } 2464 2465 if v.DestinationId != nil { 2466 ok := object.Key("DestinationId") 2467 ok.String(*v.DestinationId) 2468 } 2469 2470 if v.ElasticsearchDestinationUpdate != nil { 2471 ok := object.Key("ElasticsearchDestinationUpdate") 2472 if err := awsAwsjson11_serializeDocumentElasticsearchDestinationUpdate(v.ElasticsearchDestinationUpdate, ok); err != nil { 2473 return err 2474 } 2475 } 2476 2477 if v.ExtendedS3DestinationUpdate != nil { 2478 ok := object.Key("ExtendedS3DestinationUpdate") 2479 if err := awsAwsjson11_serializeDocumentExtendedS3DestinationUpdate(v.ExtendedS3DestinationUpdate, ok); err != nil { 2480 return err 2481 } 2482 } 2483 2484 if v.HttpEndpointDestinationUpdate != nil { 2485 ok := object.Key("HttpEndpointDestinationUpdate") 2486 if err := awsAwsjson11_serializeDocumentHttpEndpointDestinationUpdate(v.HttpEndpointDestinationUpdate, ok); err != nil { 2487 return err 2488 } 2489 } 2490 2491 if v.RedshiftDestinationUpdate != nil { 2492 ok := object.Key("RedshiftDestinationUpdate") 2493 if err := awsAwsjson11_serializeDocumentRedshiftDestinationUpdate(v.RedshiftDestinationUpdate, ok); err != nil { 2494 return err 2495 } 2496 } 2497 2498 if v.S3DestinationUpdate != nil { 2499 ok := object.Key("S3DestinationUpdate") 2500 if err := awsAwsjson11_serializeDocumentS3DestinationUpdate(v.S3DestinationUpdate, ok); err != nil { 2501 return err 2502 } 2503 } 2504 2505 if v.SplunkDestinationUpdate != nil { 2506 ok := object.Key("SplunkDestinationUpdate") 2507 if err := awsAwsjson11_serializeDocumentSplunkDestinationUpdate(v.SplunkDestinationUpdate, ok); err != nil { 2508 return err 2509 } 2510 } 2511 2512 return nil 2513} 2514