1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package cloudtrail 4 5import ( 6 "bytes" 7 "context" 8 "fmt" 9 "github.com/aws/aws-sdk-go-v2/service/cloudtrail/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 smithytime "github.com/aws/smithy-go/time" 15 smithyhttp "github.com/aws/smithy-go/transport/http" 16) 17 18type awsAwsjson11_serializeOpAddTags struct { 19} 20 21func (*awsAwsjson11_serializeOpAddTags) ID() string { 22 return "OperationSerializer" 23} 24 25func (m *awsAwsjson11_serializeOpAddTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 26 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 27) { 28 request, ok := in.Request.(*smithyhttp.Request) 29 if !ok { 30 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 31 } 32 33 input, ok := in.Parameters.(*AddTagsInput) 34 _ = input 35 if !ok { 36 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 37 } 38 39 request.Request.URL.Path = "/" 40 request.Request.Method = "POST" 41 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 42 if err != nil { 43 return out, metadata, &smithy.SerializationError{Err: err} 44 } 45 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 46 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.AddTags") 47 48 jsonEncoder := smithyjson.NewEncoder() 49 if err := awsAwsjson11_serializeOpDocumentAddTagsInput(input, jsonEncoder.Value); err != nil { 50 return out, metadata, &smithy.SerializationError{Err: err} 51 } 52 53 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 54 return out, metadata, &smithy.SerializationError{Err: err} 55 } 56 57 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 58 return out, metadata, &smithy.SerializationError{Err: err} 59 } 60 in.Request = request 61 62 return next.HandleSerialize(ctx, in) 63} 64 65type awsAwsjson11_serializeOpCreateTrail struct { 66} 67 68func (*awsAwsjson11_serializeOpCreateTrail) ID() string { 69 return "OperationSerializer" 70} 71 72func (m *awsAwsjson11_serializeOpCreateTrail) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 73 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 74) { 75 request, ok := in.Request.(*smithyhttp.Request) 76 if !ok { 77 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 78 } 79 80 input, ok := in.Parameters.(*CreateTrailInput) 81 _ = input 82 if !ok { 83 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 84 } 85 86 request.Request.URL.Path = "/" 87 request.Request.Method = "POST" 88 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 89 if err != nil { 90 return out, metadata, &smithy.SerializationError{Err: err} 91 } 92 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 93 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.CreateTrail") 94 95 jsonEncoder := smithyjson.NewEncoder() 96 if err := awsAwsjson11_serializeOpDocumentCreateTrailInput(input, jsonEncoder.Value); err != nil { 97 return out, metadata, &smithy.SerializationError{Err: err} 98 } 99 100 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 101 return out, metadata, &smithy.SerializationError{Err: err} 102 } 103 104 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 105 return out, metadata, &smithy.SerializationError{Err: err} 106 } 107 in.Request = request 108 109 return next.HandleSerialize(ctx, in) 110} 111 112type awsAwsjson11_serializeOpDeleteTrail struct { 113} 114 115func (*awsAwsjson11_serializeOpDeleteTrail) ID() string { 116 return "OperationSerializer" 117} 118 119func (m *awsAwsjson11_serializeOpDeleteTrail) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 120 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 121) { 122 request, ok := in.Request.(*smithyhttp.Request) 123 if !ok { 124 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 125 } 126 127 input, ok := in.Parameters.(*DeleteTrailInput) 128 _ = input 129 if !ok { 130 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 131 } 132 133 request.Request.URL.Path = "/" 134 request.Request.Method = "POST" 135 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 136 if err != nil { 137 return out, metadata, &smithy.SerializationError{Err: err} 138 } 139 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 140 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.DeleteTrail") 141 142 jsonEncoder := smithyjson.NewEncoder() 143 if err := awsAwsjson11_serializeOpDocumentDeleteTrailInput(input, jsonEncoder.Value); err != nil { 144 return out, metadata, &smithy.SerializationError{Err: err} 145 } 146 147 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 148 return out, metadata, &smithy.SerializationError{Err: err} 149 } 150 151 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 152 return out, metadata, &smithy.SerializationError{Err: err} 153 } 154 in.Request = request 155 156 return next.HandleSerialize(ctx, in) 157} 158 159type awsAwsjson11_serializeOpDescribeTrails struct { 160} 161 162func (*awsAwsjson11_serializeOpDescribeTrails) ID() string { 163 return "OperationSerializer" 164} 165 166func (m *awsAwsjson11_serializeOpDescribeTrails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 167 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 168) { 169 request, ok := in.Request.(*smithyhttp.Request) 170 if !ok { 171 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 172 } 173 174 input, ok := in.Parameters.(*DescribeTrailsInput) 175 _ = input 176 if !ok { 177 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 178 } 179 180 request.Request.URL.Path = "/" 181 request.Request.Method = "POST" 182 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 183 if err != nil { 184 return out, metadata, &smithy.SerializationError{Err: err} 185 } 186 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 187 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.DescribeTrails") 188 189 jsonEncoder := smithyjson.NewEncoder() 190 if err := awsAwsjson11_serializeOpDocumentDescribeTrailsInput(input, jsonEncoder.Value); err != nil { 191 return out, metadata, &smithy.SerializationError{Err: err} 192 } 193 194 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 195 return out, metadata, &smithy.SerializationError{Err: err} 196 } 197 198 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 199 return out, metadata, &smithy.SerializationError{Err: err} 200 } 201 in.Request = request 202 203 return next.HandleSerialize(ctx, in) 204} 205 206type awsAwsjson11_serializeOpGetEventSelectors struct { 207} 208 209func (*awsAwsjson11_serializeOpGetEventSelectors) ID() string { 210 return "OperationSerializer" 211} 212 213func (m *awsAwsjson11_serializeOpGetEventSelectors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 214 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 215) { 216 request, ok := in.Request.(*smithyhttp.Request) 217 if !ok { 218 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 219 } 220 221 input, ok := in.Parameters.(*GetEventSelectorsInput) 222 _ = input 223 if !ok { 224 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 225 } 226 227 request.Request.URL.Path = "/" 228 request.Request.Method = "POST" 229 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 230 if err != nil { 231 return out, metadata, &smithy.SerializationError{Err: err} 232 } 233 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 234 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.GetEventSelectors") 235 236 jsonEncoder := smithyjson.NewEncoder() 237 if err := awsAwsjson11_serializeOpDocumentGetEventSelectorsInput(input, jsonEncoder.Value); err != nil { 238 return out, metadata, &smithy.SerializationError{Err: err} 239 } 240 241 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 242 return out, metadata, &smithy.SerializationError{Err: err} 243 } 244 245 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 246 return out, metadata, &smithy.SerializationError{Err: err} 247 } 248 in.Request = request 249 250 return next.HandleSerialize(ctx, in) 251} 252 253type awsAwsjson11_serializeOpGetInsightSelectors struct { 254} 255 256func (*awsAwsjson11_serializeOpGetInsightSelectors) ID() string { 257 return "OperationSerializer" 258} 259 260func (m *awsAwsjson11_serializeOpGetInsightSelectors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 261 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 262) { 263 request, ok := in.Request.(*smithyhttp.Request) 264 if !ok { 265 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 266 } 267 268 input, ok := in.Parameters.(*GetInsightSelectorsInput) 269 _ = input 270 if !ok { 271 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 272 } 273 274 request.Request.URL.Path = "/" 275 request.Request.Method = "POST" 276 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 277 if err != nil { 278 return out, metadata, &smithy.SerializationError{Err: err} 279 } 280 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 281 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.GetInsightSelectors") 282 283 jsonEncoder := smithyjson.NewEncoder() 284 if err := awsAwsjson11_serializeOpDocumentGetInsightSelectorsInput(input, jsonEncoder.Value); err != nil { 285 return out, metadata, &smithy.SerializationError{Err: err} 286 } 287 288 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 289 return out, metadata, &smithy.SerializationError{Err: err} 290 } 291 292 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 293 return out, metadata, &smithy.SerializationError{Err: err} 294 } 295 in.Request = request 296 297 return next.HandleSerialize(ctx, in) 298} 299 300type awsAwsjson11_serializeOpGetTrail struct { 301} 302 303func (*awsAwsjson11_serializeOpGetTrail) ID() string { 304 return "OperationSerializer" 305} 306 307func (m *awsAwsjson11_serializeOpGetTrail) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 308 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 309) { 310 request, ok := in.Request.(*smithyhttp.Request) 311 if !ok { 312 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 313 } 314 315 input, ok := in.Parameters.(*GetTrailInput) 316 _ = input 317 if !ok { 318 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 319 } 320 321 request.Request.URL.Path = "/" 322 request.Request.Method = "POST" 323 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 324 if err != nil { 325 return out, metadata, &smithy.SerializationError{Err: err} 326 } 327 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 328 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.GetTrail") 329 330 jsonEncoder := smithyjson.NewEncoder() 331 if err := awsAwsjson11_serializeOpDocumentGetTrailInput(input, jsonEncoder.Value); err != nil { 332 return out, metadata, &smithy.SerializationError{Err: err} 333 } 334 335 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 336 return out, metadata, &smithy.SerializationError{Err: err} 337 } 338 339 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 340 return out, metadata, &smithy.SerializationError{Err: err} 341 } 342 in.Request = request 343 344 return next.HandleSerialize(ctx, in) 345} 346 347type awsAwsjson11_serializeOpGetTrailStatus struct { 348} 349 350func (*awsAwsjson11_serializeOpGetTrailStatus) ID() string { 351 return "OperationSerializer" 352} 353 354func (m *awsAwsjson11_serializeOpGetTrailStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 355 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 356) { 357 request, ok := in.Request.(*smithyhttp.Request) 358 if !ok { 359 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 360 } 361 362 input, ok := in.Parameters.(*GetTrailStatusInput) 363 _ = input 364 if !ok { 365 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 366 } 367 368 request.Request.URL.Path = "/" 369 request.Request.Method = "POST" 370 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 371 if err != nil { 372 return out, metadata, &smithy.SerializationError{Err: err} 373 } 374 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 375 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.GetTrailStatus") 376 377 jsonEncoder := smithyjson.NewEncoder() 378 if err := awsAwsjson11_serializeOpDocumentGetTrailStatusInput(input, jsonEncoder.Value); err != nil { 379 return out, metadata, &smithy.SerializationError{Err: err} 380 } 381 382 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 383 return out, metadata, &smithy.SerializationError{Err: err} 384 } 385 386 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 387 return out, metadata, &smithy.SerializationError{Err: err} 388 } 389 in.Request = request 390 391 return next.HandleSerialize(ctx, in) 392} 393 394type awsAwsjson11_serializeOpListPublicKeys struct { 395} 396 397func (*awsAwsjson11_serializeOpListPublicKeys) ID() string { 398 return "OperationSerializer" 399} 400 401func (m *awsAwsjson11_serializeOpListPublicKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 402 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 403) { 404 request, ok := in.Request.(*smithyhttp.Request) 405 if !ok { 406 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 407 } 408 409 input, ok := in.Parameters.(*ListPublicKeysInput) 410 _ = input 411 if !ok { 412 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 413 } 414 415 request.Request.URL.Path = "/" 416 request.Request.Method = "POST" 417 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 418 if err != nil { 419 return out, metadata, &smithy.SerializationError{Err: err} 420 } 421 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 422 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.ListPublicKeys") 423 424 jsonEncoder := smithyjson.NewEncoder() 425 if err := awsAwsjson11_serializeOpDocumentListPublicKeysInput(input, jsonEncoder.Value); err != nil { 426 return out, metadata, &smithy.SerializationError{Err: err} 427 } 428 429 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 430 return out, metadata, &smithy.SerializationError{Err: err} 431 } 432 433 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 434 return out, metadata, &smithy.SerializationError{Err: err} 435 } 436 in.Request = request 437 438 return next.HandleSerialize(ctx, in) 439} 440 441type awsAwsjson11_serializeOpListTags struct { 442} 443 444func (*awsAwsjson11_serializeOpListTags) ID() string { 445 return "OperationSerializer" 446} 447 448func (m *awsAwsjson11_serializeOpListTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 449 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 450) { 451 request, ok := in.Request.(*smithyhttp.Request) 452 if !ok { 453 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 454 } 455 456 input, ok := in.Parameters.(*ListTagsInput) 457 _ = input 458 if !ok { 459 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 460 } 461 462 request.Request.URL.Path = "/" 463 request.Request.Method = "POST" 464 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 465 if err != nil { 466 return out, metadata, &smithy.SerializationError{Err: err} 467 } 468 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 469 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.ListTags") 470 471 jsonEncoder := smithyjson.NewEncoder() 472 if err := awsAwsjson11_serializeOpDocumentListTagsInput(input, jsonEncoder.Value); err != nil { 473 return out, metadata, &smithy.SerializationError{Err: err} 474 } 475 476 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 477 return out, metadata, &smithy.SerializationError{Err: err} 478 } 479 480 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 481 return out, metadata, &smithy.SerializationError{Err: err} 482 } 483 in.Request = request 484 485 return next.HandleSerialize(ctx, in) 486} 487 488type awsAwsjson11_serializeOpListTrails struct { 489} 490 491func (*awsAwsjson11_serializeOpListTrails) ID() string { 492 return "OperationSerializer" 493} 494 495func (m *awsAwsjson11_serializeOpListTrails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 496 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 497) { 498 request, ok := in.Request.(*smithyhttp.Request) 499 if !ok { 500 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 501 } 502 503 input, ok := in.Parameters.(*ListTrailsInput) 504 _ = input 505 if !ok { 506 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 507 } 508 509 request.Request.URL.Path = "/" 510 request.Request.Method = "POST" 511 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 512 if err != nil { 513 return out, metadata, &smithy.SerializationError{Err: err} 514 } 515 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 516 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.ListTrails") 517 518 jsonEncoder := smithyjson.NewEncoder() 519 if err := awsAwsjson11_serializeOpDocumentListTrailsInput(input, jsonEncoder.Value); err != nil { 520 return out, metadata, &smithy.SerializationError{Err: err} 521 } 522 523 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 524 return out, metadata, &smithy.SerializationError{Err: err} 525 } 526 527 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 528 return out, metadata, &smithy.SerializationError{Err: err} 529 } 530 in.Request = request 531 532 return next.HandleSerialize(ctx, in) 533} 534 535type awsAwsjson11_serializeOpLookupEvents struct { 536} 537 538func (*awsAwsjson11_serializeOpLookupEvents) ID() string { 539 return "OperationSerializer" 540} 541 542func (m *awsAwsjson11_serializeOpLookupEvents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 543 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 544) { 545 request, ok := in.Request.(*smithyhttp.Request) 546 if !ok { 547 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 548 } 549 550 input, ok := in.Parameters.(*LookupEventsInput) 551 _ = input 552 if !ok { 553 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 554 } 555 556 request.Request.URL.Path = "/" 557 request.Request.Method = "POST" 558 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 559 if err != nil { 560 return out, metadata, &smithy.SerializationError{Err: err} 561 } 562 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 563 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.LookupEvents") 564 565 jsonEncoder := smithyjson.NewEncoder() 566 if err := awsAwsjson11_serializeOpDocumentLookupEventsInput(input, jsonEncoder.Value); err != nil { 567 return out, metadata, &smithy.SerializationError{Err: err} 568 } 569 570 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 571 return out, metadata, &smithy.SerializationError{Err: err} 572 } 573 574 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 575 return out, metadata, &smithy.SerializationError{Err: err} 576 } 577 in.Request = request 578 579 return next.HandleSerialize(ctx, in) 580} 581 582type awsAwsjson11_serializeOpPutEventSelectors struct { 583} 584 585func (*awsAwsjson11_serializeOpPutEventSelectors) ID() string { 586 return "OperationSerializer" 587} 588 589func (m *awsAwsjson11_serializeOpPutEventSelectors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 590 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 591) { 592 request, ok := in.Request.(*smithyhttp.Request) 593 if !ok { 594 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 595 } 596 597 input, ok := in.Parameters.(*PutEventSelectorsInput) 598 _ = input 599 if !ok { 600 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 601 } 602 603 request.Request.URL.Path = "/" 604 request.Request.Method = "POST" 605 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 606 if err != nil { 607 return out, metadata, &smithy.SerializationError{Err: err} 608 } 609 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 610 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.PutEventSelectors") 611 612 jsonEncoder := smithyjson.NewEncoder() 613 if err := awsAwsjson11_serializeOpDocumentPutEventSelectorsInput(input, jsonEncoder.Value); err != nil { 614 return out, metadata, &smithy.SerializationError{Err: err} 615 } 616 617 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 618 return out, metadata, &smithy.SerializationError{Err: err} 619 } 620 621 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 622 return out, metadata, &smithy.SerializationError{Err: err} 623 } 624 in.Request = request 625 626 return next.HandleSerialize(ctx, in) 627} 628 629type awsAwsjson11_serializeOpPutInsightSelectors struct { 630} 631 632func (*awsAwsjson11_serializeOpPutInsightSelectors) ID() string { 633 return "OperationSerializer" 634} 635 636func (m *awsAwsjson11_serializeOpPutInsightSelectors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 637 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 638) { 639 request, ok := in.Request.(*smithyhttp.Request) 640 if !ok { 641 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 642 } 643 644 input, ok := in.Parameters.(*PutInsightSelectorsInput) 645 _ = input 646 if !ok { 647 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 648 } 649 650 request.Request.URL.Path = "/" 651 request.Request.Method = "POST" 652 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 653 if err != nil { 654 return out, metadata, &smithy.SerializationError{Err: err} 655 } 656 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 657 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.PutInsightSelectors") 658 659 jsonEncoder := smithyjson.NewEncoder() 660 if err := awsAwsjson11_serializeOpDocumentPutInsightSelectorsInput(input, jsonEncoder.Value); err != nil { 661 return out, metadata, &smithy.SerializationError{Err: err} 662 } 663 664 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 665 return out, metadata, &smithy.SerializationError{Err: err} 666 } 667 668 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 669 return out, metadata, &smithy.SerializationError{Err: err} 670 } 671 in.Request = request 672 673 return next.HandleSerialize(ctx, in) 674} 675 676type awsAwsjson11_serializeOpRemoveTags struct { 677} 678 679func (*awsAwsjson11_serializeOpRemoveTags) ID() string { 680 return "OperationSerializer" 681} 682 683func (m *awsAwsjson11_serializeOpRemoveTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 684 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 685) { 686 request, ok := in.Request.(*smithyhttp.Request) 687 if !ok { 688 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 689 } 690 691 input, ok := in.Parameters.(*RemoveTagsInput) 692 _ = input 693 if !ok { 694 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 695 } 696 697 request.Request.URL.Path = "/" 698 request.Request.Method = "POST" 699 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 700 if err != nil { 701 return out, metadata, &smithy.SerializationError{Err: err} 702 } 703 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 704 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.RemoveTags") 705 706 jsonEncoder := smithyjson.NewEncoder() 707 if err := awsAwsjson11_serializeOpDocumentRemoveTagsInput(input, jsonEncoder.Value); err != nil { 708 return out, metadata, &smithy.SerializationError{Err: err} 709 } 710 711 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 712 return out, metadata, &smithy.SerializationError{Err: err} 713 } 714 715 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 716 return out, metadata, &smithy.SerializationError{Err: err} 717 } 718 in.Request = request 719 720 return next.HandleSerialize(ctx, in) 721} 722 723type awsAwsjson11_serializeOpStartLogging struct { 724} 725 726func (*awsAwsjson11_serializeOpStartLogging) ID() string { 727 return "OperationSerializer" 728} 729 730func (m *awsAwsjson11_serializeOpStartLogging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 731 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 732) { 733 request, ok := in.Request.(*smithyhttp.Request) 734 if !ok { 735 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 736 } 737 738 input, ok := in.Parameters.(*StartLoggingInput) 739 _ = input 740 if !ok { 741 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 742 } 743 744 request.Request.URL.Path = "/" 745 request.Request.Method = "POST" 746 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 747 if err != nil { 748 return out, metadata, &smithy.SerializationError{Err: err} 749 } 750 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 751 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.StartLogging") 752 753 jsonEncoder := smithyjson.NewEncoder() 754 if err := awsAwsjson11_serializeOpDocumentStartLoggingInput(input, jsonEncoder.Value); err != nil { 755 return out, metadata, &smithy.SerializationError{Err: err} 756 } 757 758 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 759 return out, metadata, &smithy.SerializationError{Err: err} 760 } 761 762 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 763 return out, metadata, &smithy.SerializationError{Err: err} 764 } 765 in.Request = request 766 767 return next.HandleSerialize(ctx, in) 768} 769 770type awsAwsjson11_serializeOpStopLogging struct { 771} 772 773func (*awsAwsjson11_serializeOpStopLogging) ID() string { 774 return "OperationSerializer" 775} 776 777func (m *awsAwsjson11_serializeOpStopLogging) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 778 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 779) { 780 request, ok := in.Request.(*smithyhttp.Request) 781 if !ok { 782 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 783 } 784 785 input, ok := in.Parameters.(*StopLoggingInput) 786 _ = input 787 if !ok { 788 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 789 } 790 791 request.Request.URL.Path = "/" 792 request.Request.Method = "POST" 793 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 794 if err != nil { 795 return out, metadata, &smithy.SerializationError{Err: err} 796 } 797 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 798 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.StopLogging") 799 800 jsonEncoder := smithyjson.NewEncoder() 801 if err := awsAwsjson11_serializeOpDocumentStopLoggingInput(input, jsonEncoder.Value); err != nil { 802 return out, metadata, &smithy.SerializationError{Err: err} 803 } 804 805 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 806 return out, metadata, &smithy.SerializationError{Err: err} 807 } 808 809 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 810 return out, metadata, &smithy.SerializationError{Err: err} 811 } 812 in.Request = request 813 814 return next.HandleSerialize(ctx, in) 815} 816 817type awsAwsjson11_serializeOpUpdateTrail struct { 818} 819 820func (*awsAwsjson11_serializeOpUpdateTrail) ID() string { 821 return "OperationSerializer" 822} 823 824func (m *awsAwsjson11_serializeOpUpdateTrail) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 825 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 826) { 827 request, ok := in.Request.(*smithyhttp.Request) 828 if !ok { 829 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 830 } 831 832 input, ok := in.Parameters.(*UpdateTrailInput) 833 _ = input 834 if !ok { 835 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 836 } 837 838 request.Request.URL.Path = "/" 839 request.Request.Method = "POST" 840 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 841 if err != nil { 842 return out, metadata, &smithy.SerializationError{Err: err} 843 } 844 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 845 httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.UpdateTrail") 846 847 jsonEncoder := smithyjson.NewEncoder() 848 if err := awsAwsjson11_serializeOpDocumentUpdateTrailInput(input, jsonEncoder.Value); err != nil { 849 return out, metadata, &smithy.SerializationError{Err: err} 850 } 851 852 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 853 return out, metadata, &smithy.SerializationError{Err: err} 854 } 855 856 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 857 return out, metadata, &smithy.SerializationError{Err: err} 858 } 859 in.Request = request 860 861 return next.HandleSerialize(ctx, in) 862} 863func awsAwsjson11_serializeDocumentAdvancedEventSelector(v *types.AdvancedEventSelector, value smithyjson.Value) error { 864 object := value.Object() 865 defer object.Close() 866 867 if v.FieldSelectors != nil { 868 ok := object.Key("FieldSelectors") 869 if err := awsAwsjson11_serializeDocumentAdvancedFieldSelectors(v.FieldSelectors, ok); err != nil { 870 return err 871 } 872 } 873 874 if v.Name != nil { 875 ok := object.Key("Name") 876 ok.String(*v.Name) 877 } 878 879 return nil 880} 881 882func awsAwsjson11_serializeDocumentAdvancedEventSelectors(v []types.AdvancedEventSelector, value smithyjson.Value) error { 883 array := value.Array() 884 defer array.Close() 885 886 for i := range v { 887 av := array.Value() 888 if err := awsAwsjson11_serializeDocumentAdvancedEventSelector(&v[i], av); err != nil { 889 return err 890 } 891 } 892 return nil 893} 894 895func awsAwsjson11_serializeDocumentAdvancedFieldSelector(v *types.AdvancedFieldSelector, value smithyjson.Value) error { 896 object := value.Object() 897 defer object.Close() 898 899 if v.EndsWith != nil { 900 ok := object.Key("EndsWith") 901 if err := awsAwsjson11_serializeDocumentOperator(v.EndsWith, ok); err != nil { 902 return err 903 } 904 } 905 906 if v.Equals != nil { 907 ok := object.Key("Equals") 908 if err := awsAwsjson11_serializeDocumentOperator(v.Equals, ok); err != nil { 909 return err 910 } 911 } 912 913 if v.Field != nil { 914 ok := object.Key("Field") 915 ok.String(*v.Field) 916 } 917 918 if v.NotEndsWith != nil { 919 ok := object.Key("NotEndsWith") 920 if err := awsAwsjson11_serializeDocumentOperator(v.NotEndsWith, ok); err != nil { 921 return err 922 } 923 } 924 925 if v.NotEquals != nil { 926 ok := object.Key("NotEquals") 927 if err := awsAwsjson11_serializeDocumentOperator(v.NotEquals, ok); err != nil { 928 return err 929 } 930 } 931 932 if v.NotStartsWith != nil { 933 ok := object.Key("NotStartsWith") 934 if err := awsAwsjson11_serializeDocumentOperator(v.NotStartsWith, ok); err != nil { 935 return err 936 } 937 } 938 939 if v.StartsWith != nil { 940 ok := object.Key("StartsWith") 941 if err := awsAwsjson11_serializeDocumentOperator(v.StartsWith, ok); err != nil { 942 return err 943 } 944 } 945 946 return nil 947} 948 949func awsAwsjson11_serializeDocumentAdvancedFieldSelectors(v []types.AdvancedFieldSelector, value smithyjson.Value) error { 950 array := value.Array() 951 defer array.Close() 952 953 for i := range v { 954 av := array.Value() 955 if err := awsAwsjson11_serializeDocumentAdvancedFieldSelector(&v[i], av); err != nil { 956 return err 957 } 958 } 959 return nil 960} 961 962func awsAwsjson11_serializeDocumentDataResource(v *types.DataResource, value smithyjson.Value) error { 963 object := value.Object() 964 defer object.Close() 965 966 if v.Type != nil { 967 ok := object.Key("Type") 968 ok.String(*v.Type) 969 } 970 971 if v.Values != nil { 972 ok := object.Key("Values") 973 if err := awsAwsjson11_serializeDocumentDataResourceValues(v.Values, ok); err != nil { 974 return err 975 } 976 } 977 978 return nil 979} 980 981func awsAwsjson11_serializeDocumentDataResources(v []types.DataResource, value smithyjson.Value) error { 982 array := value.Array() 983 defer array.Close() 984 985 for i := range v { 986 av := array.Value() 987 if err := awsAwsjson11_serializeDocumentDataResource(&v[i], av); err != nil { 988 return err 989 } 990 } 991 return nil 992} 993 994func awsAwsjson11_serializeDocumentDataResourceValues(v []string, value smithyjson.Value) error { 995 array := value.Array() 996 defer array.Close() 997 998 for i := range v { 999 av := array.Value() 1000 av.String(v[i]) 1001 } 1002 return nil 1003} 1004 1005func awsAwsjson11_serializeDocumentEventSelector(v *types.EventSelector, value smithyjson.Value) error { 1006 object := value.Object() 1007 defer object.Close() 1008 1009 if v.DataResources != nil { 1010 ok := object.Key("DataResources") 1011 if err := awsAwsjson11_serializeDocumentDataResources(v.DataResources, ok); err != nil { 1012 return err 1013 } 1014 } 1015 1016 if v.ExcludeManagementEventSources != nil { 1017 ok := object.Key("ExcludeManagementEventSources") 1018 if err := awsAwsjson11_serializeDocumentExcludeManagementEventSources(v.ExcludeManagementEventSources, ok); err != nil { 1019 return err 1020 } 1021 } 1022 1023 if v.IncludeManagementEvents != nil { 1024 ok := object.Key("IncludeManagementEvents") 1025 ok.Boolean(*v.IncludeManagementEvents) 1026 } 1027 1028 if len(v.ReadWriteType) > 0 { 1029 ok := object.Key("ReadWriteType") 1030 ok.String(string(v.ReadWriteType)) 1031 } 1032 1033 return nil 1034} 1035 1036func awsAwsjson11_serializeDocumentEventSelectors(v []types.EventSelector, value smithyjson.Value) error { 1037 array := value.Array() 1038 defer array.Close() 1039 1040 for i := range v { 1041 av := array.Value() 1042 if err := awsAwsjson11_serializeDocumentEventSelector(&v[i], av); err != nil { 1043 return err 1044 } 1045 } 1046 return nil 1047} 1048 1049func awsAwsjson11_serializeDocumentExcludeManagementEventSources(v []string, value smithyjson.Value) error { 1050 array := value.Array() 1051 defer array.Close() 1052 1053 for i := range v { 1054 av := array.Value() 1055 av.String(v[i]) 1056 } 1057 return nil 1058} 1059 1060func awsAwsjson11_serializeDocumentInsightSelector(v *types.InsightSelector, value smithyjson.Value) error { 1061 object := value.Object() 1062 defer object.Close() 1063 1064 if len(v.InsightType) > 0 { 1065 ok := object.Key("InsightType") 1066 ok.String(string(v.InsightType)) 1067 } 1068 1069 return nil 1070} 1071 1072func awsAwsjson11_serializeDocumentInsightSelectors(v []types.InsightSelector, value smithyjson.Value) error { 1073 array := value.Array() 1074 defer array.Close() 1075 1076 for i := range v { 1077 av := array.Value() 1078 if err := awsAwsjson11_serializeDocumentInsightSelector(&v[i], av); err != nil { 1079 return err 1080 } 1081 } 1082 return nil 1083} 1084 1085func awsAwsjson11_serializeDocumentLookupAttribute(v *types.LookupAttribute, value smithyjson.Value) error { 1086 object := value.Object() 1087 defer object.Close() 1088 1089 if len(v.AttributeKey) > 0 { 1090 ok := object.Key("AttributeKey") 1091 ok.String(string(v.AttributeKey)) 1092 } 1093 1094 if v.AttributeValue != nil { 1095 ok := object.Key("AttributeValue") 1096 ok.String(*v.AttributeValue) 1097 } 1098 1099 return nil 1100} 1101 1102func awsAwsjson11_serializeDocumentLookupAttributesList(v []types.LookupAttribute, value smithyjson.Value) error { 1103 array := value.Array() 1104 defer array.Close() 1105 1106 for i := range v { 1107 av := array.Value() 1108 if err := awsAwsjson11_serializeDocumentLookupAttribute(&v[i], av); err != nil { 1109 return err 1110 } 1111 } 1112 return nil 1113} 1114 1115func awsAwsjson11_serializeDocumentOperator(v []string, value smithyjson.Value) error { 1116 array := value.Array() 1117 defer array.Close() 1118 1119 for i := range v { 1120 av := array.Value() 1121 av.String(v[i]) 1122 } 1123 return nil 1124} 1125 1126func awsAwsjson11_serializeDocumentResourceIdList(v []string, value smithyjson.Value) error { 1127 array := value.Array() 1128 defer array.Close() 1129 1130 for i := range v { 1131 av := array.Value() 1132 av.String(v[i]) 1133 } 1134 return nil 1135} 1136 1137func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { 1138 object := value.Object() 1139 defer object.Close() 1140 1141 if v.Key != nil { 1142 ok := object.Key("Key") 1143 ok.String(*v.Key) 1144 } 1145 1146 if v.Value != nil { 1147 ok := object.Key("Value") 1148 ok.String(*v.Value) 1149 } 1150 1151 return nil 1152} 1153 1154func awsAwsjson11_serializeDocumentTagsList(v []types.Tag, value smithyjson.Value) error { 1155 array := value.Array() 1156 defer array.Close() 1157 1158 for i := range v { 1159 av := array.Value() 1160 if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { 1161 return err 1162 } 1163 } 1164 return nil 1165} 1166 1167func awsAwsjson11_serializeDocumentTrailNameList(v []string, value smithyjson.Value) error { 1168 array := value.Array() 1169 defer array.Close() 1170 1171 for i := range v { 1172 av := array.Value() 1173 av.String(v[i]) 1174 } 1175 return nil 1176} 1177 1178func awsAwsjson11_serializeOpDocumentAddTagsInput(v *AddTagsInput, value smithyjson.Value) error { 1179 object := value.Object() 1180 defer object.Close() 1181 1182 if v.ResourceId != nil { 1183 ok := object.Key("ResourceId") 1184 ok.String(*v.ResourceId) 1185 } 1186 1187 if v.TagsList != nil { 1188 ok := object.Key("TagsList") 1189 if err := awsAwsjson11_serializeDocumentTagsList(v.TagsList, ok); err != nil { 1190 return err 1191 } 1192 } 1193 1194 return nil 1195} 1196 1197func awsAwsjson11_serializeOpDocumentCreateTrailInput(v *CreateTrailInput, value smithyjson.Value) error { 1198 object := value.Object() 1199 defer object.Close() 1200 1201 if v.CloudWatchLogsLogGroupArn != nil { 1202 ok := object.Key("CloudWatchLogsLogGroupArn") 1203 ok.String(*v.CloudWatchLogsLogGroupArn) 1204 } 1205 1206 if v.CloudWatchLogsRoleArn != nil { 1207 ok := object.Key("CloudWatchLogsRoleArn") 1208 ok.String(*v.CloudWatchLogsRoleArn) 1209 } 1210 1211 if v.EnableLogFileValidation != nil { 1212 ok := object.Key("EnableLogFileValidation") 1213 ok.Boolean(*v.EnableLogFileValidation) 1214 } 1215 1216 if v.IncludeGlobalServiceEvents != nil { 1217 ok := object.Key("IncludeGlobalServiceEvents") 1218 ok.Boolean(*v.IncludeGlobalServiceEvents) 1219 } 1220 1221 if v.IsMultiRegionTrail != nil { 1222 ok := object.Key("IsMultiRegionTrail") 1223 ok.Boolean(*v.IsMultiRegionTrail) 1224 } 1225 1226 if v.IsOrganizationTrail != nil { 1227 ok := object.Key("IsOrganizationTrail") 1228 ok.Boolean(*v.IsOrganizationTrail) 1229 } 1230 1231 if v.KmsKeyId != nil { 1232 ok := object.Key("KmsKeyId") 1233 ok.String(*v.KmsKeyId) 1234 } 1235 1236 if v.Name != nil { 1237 ok := object.Key("Name") 1238 ok.String(*v.Name) 1239 } 1240 1241 if v.S3BucketName != nil { 1242 ok := object.Key("S3BucketName") 1243 ok.String(*v.S3BucketName) 1244 } 1245 1246 if v.S3KeyPrefix != nil { 1247 ok := object.Key("S3KeyPrefix") 1248 ok.String(*v.S3KeyPrefix) 1249 } 1250 1251 if v.SnsTopicName != nil { 1252 ok := object.Key("SnsTopicName") 1253 ok.String(*v.SnsTopicName) 1254 } 1255 1256 if v.TagsList != nil { 1257 ok := object.Key("TagsList") 1258 if err := awsAwsjson11_serializeDocumentTagsList(v.TagsList, ok); err != nil { 1259 return err 1260 } 1261 } 1262 1263 return nil 1264} 1265 1266func awsAwsjson11_serializeOpDocumentDeleteTrailInput(v *DeleteTrailInput, value smithyjson.Value) error { 1267 object := value.Object() 1268 defer object.Close() 1269 1270 if v.Name != nil { 1271 ok := object.Key("Name") 1272 ok.String(*v.Name) 1273 } 1274 1275 return nil 1276} 1277 1278func awsAwsjson11_serializeOpDocumentDescribeTrailsInput(v *DescribeTrailsInput, value smithyjson.Value) error { 1279 object := value.Object() 1280 defer object.Close() 1281 1282 if v.IncludeShadowTrails != nil { 1283 ok := object.Key("includeShadowTrails") 1284 ok.Boolean(*v.IncludeShadowTrails) 1285 } 1286 1287 if v.TrailNameList != nil { 1288 ok := object.Key("trailNameList") 1289 if err := awsAwsjson11_serializeDocumentTrailNameList(v.TrailNameList, ok); err != nil { 1290 return err 1291 } 1292 } 1293 1294 return nil 1295} 1296 1297func awsAwsjson11_serializeOpDocumentGetEventSelectorsInput(v *GetEventSelectorsInput, value smithyjson.Value) error { 1298 object := value.Object() 1299 defer object.Close() 1300 1301 if v.TrailName != nil { 1302 ok := object.Key("TrailName") 1303 ok.String(*v.TrailName) 1304 } 1305 1306 return nil 1307} 1308 1309func awsAwsjson11_serializeOpDocumentGetInsightSelectorsInput(v *GetInsightSelectorsInput, value smithyjson.Value) error { 1310 object := value.Object() 1311 defer object.Close() 1312 1313 if v.TrailName != nil { 1314 ok := object.Key("TrailName") 1315 ok.String(*v.TrailName) 1316 } 1317 1318 return nil 1319} 1320 1321func awsAwsjson11_serializeOpDocumentGetTrailInput(v *GetTrailInput, value smithyjson.Value) error { 1322 object := value.Object() 1323 defer object.Close() 1324 1325 if v.Name != nil { 1326 ok := object.Key("Name") 1327 ok.String(*v.Name) 1328 } 1329 1330 return nil 1331} 1332 1333func awsAwsjson11_serializeOpDocumentGetTrailStatusInput(v *GetTrailStatusInput, value smithyjson.Value) error { 1334 object := value.Object() 1335 defer object.Close() 1336 1337 if v.Name != nil { 1338 ok := object.Key("Name") 1339 ok.String(*v.Name) 1340 } 1341 1342 return nil 1343} 1344 1345func awsAwsjson11_serializeOpDocumentListPublicKeysInput(v *ListPublicKeysInput, value smithyjson.Value) error { 1346 object := value.Object() 1347 defer object.Close() 1348 1349 if v.EndTime != nil { 1350 ok := object.Key("EndTime") 1351 ok.Double(smithytime.FormatEpochSeconds(*v.EndTime)) 1352 } 1353 1354 if v.NextToken != nil { 1355 ok := object.Key("NextToken") 1356 ok.String(*v.NextToken) 1357 } 1358 1359 if v.StartTime != nil { 1360 ok := object.Key("StartTime") 1361 ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) 1362 } 1363 1364 return nil 1365} 1366 1367func awsAwsjson11_serializeOpDocumentListTagsInput(v *ListTagsInput, value smithyjson.Value) error { 1368 object := value.Object() 1369 defer object.Close() 1370 1371 if v.NextToken != nil { 1372 ok := object.Key("NextToken") 1373 ok.String(*v.NextToken) 1374 } 1375 1376 if v.ResourceIdList != nil { 1377 ok := object.Key("ResourceIdList") 1378 if err := awsAwsjson11_serializeDocumentResourceIdList(v.ResourceIdList, ok); err != nil { 1379 return err 1380 } 1381 } 1382 1383 return nil 1384} 1385 1386func awsAwsjson11_serializeOpDocumentListTrailsInput(v *ListTrailsInput, value smithyjson.Value) error { 1387 object := value.Object() 1388 defer object.Close() 1389 1390 if v.NextToken != nil { 1391 ok := object.Key("NextToken") 1392 ok.String(*v.NextToken) 1393 } 1394 1395 return nil 1396} 1397 1398func awsAwsjson11_serializeOpDocumentLookupEventsInput(v *LookupEventsInput, value smithyjson.Value) error { 1399 object := value.Object() 1400 defer object.Close() 1401 1402 if v.EndTime != nil { 1403 ok := object.Key("EndTime") 1404 ok.Double(smithytime.FormatEpochSeconds(*v.EndTime)) 1405 } 1406 1407 if len(v.EventCategory) > 0 { 1408 ok := object.Key("EventCategory") 1409 ok.String(string(v.EventCategory)) 1410 } 1411 1412 if v.LookupAttributes != nil { 1413 ok := object.Key("LookupAttributes") 1414 if err := awsAwsjson11_serializeDocumentLookupAttributesList(v.LookupAttributes, ok); err != nil { 1415 return err 1416 } 1417 } 1418 1419 if v.MaxResults != nil { 1420 ok := object.Key("MaxResults") 1421 ok.Integer(*v.MaxResults) 1422 } 1423 1424 if v.NextToken != nil { 1425 ok := object.Key("NextToken") 1426 ok.String(*v.NextToken) 1427 } 1428 1429 if v.StartTime != nil { 1430 ok := object.Key("StartTime") 1431 ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) 1432 } 1433 1434 return nil 1435} 1436 1437func awsAwsjson11_serializeOpDocumentPutEventSelectorsInput(v *PutEventSelectorsInput, value smithyjson.Value) error { 1438 object := value.Object() 1439 defer object.Close() 1440 1441 if v.AdvancedEventSelectors != nil { 1442 ok := object.Key("AdvancedEventSelectors") 1443 if err := awsAwsjson11_serializeDocumentAdvancedEventSelectors(v.AdvancedEventSelectors, ok); err != nil { 1444 return err 1445 } 1446 } 1447 1448 if v.EventSelectors != nil { 1449 ok := object.Key("EventSelectors") 1450 if err := awsAwsjson11_serializeDocumentEventSelectors(v.EventSelectors, ok); err != nil { 1451 return err 1452 } 1453 } 1454 1455 if v.TrailName != nil { 1456 ok := object.Key("TrailName") 1457 ok.String(*v.TrailName) 1458 } 1459 1460 return nil 1461} 1462 1463func awsAwsjson11_serializeOpDocumentPutInsightSelectorsInput(v *PutInsightSelectorsInput, value smithyjson.Value) error { 1464 object := value.Object() 1465 defer object.Close() 1466 1467 if v.InsightSelectors != nil { 1468 ok := object.Key("InsightSelectors") 1469 if err := awsAwsjson11_serializeDocumentInsightSelectors(v.InsightSelectors, ok); err != nil { 1470 return err 1471 } 1472 } 1473 1474 if v.TrailName != nil { 1475 ok := object.Key("TrailName") 1476 ok.String(*v.TrailName) 1477 } 1478 1479 return nil 1480} 1481 1482func awsAwsjson11_serializeOpDocumentRemoveTagsInput(v *RemoveTagsInput, value smithyjson.Value) error { 1483 object := value.Object() 1484 defer object.Close() 1485 1486 if v.ResourceId != nil { 1487 ok := object.Key("ResourceId") 1488 ok.String(*v.ResourceId) 1489 } 1490 1491 if v.TagsList != nil { 1492 ok := object.Key("TagsList") 1493 if err := awsAwsjson11_serializeDocumentTagsList(v.TagsList, ok); err != nil { 1494 return err 1495 } 1496 } 1497 1498 return nil 1499} 1500 1501func awsAwsjson11_serializeOpDocumentStartLoggingInput(v *StartLoggingInput, value smithyjson.Value) error { 1502 object := value.Object() 1503 defer object.Close() 1504 1505 if v.Name != nil { 1506 ok := object.Key("Name") 1507 ok.String(*v.Name) 1508 } 1509 1510 return nil 1511} 1512 1513func awsAwsjson11_serializeOpDocumentStopLoggingInput(v *StopLoggingInput, value smithyjson.Value) error { 1514 object := value.Object() 1515 defer object.Close() 1516 1517 if v.Name != nil { 1518 ok := object.Key("Name") 1519 ok.String(*v.Name) 1520 } 1521 1522 return nil 1523} 1524 1525func awsAwsjson11_serializeOpDocumentUpdateTrailInput(v *UpdateTrailInput, value smithyjson.Value) error { 1526 object := value.Object() 1527 defer object.Close() 1528 1529 if v.CloudWatchLogsLogGroupArn != nil { 1530 ok := object.Key("CloudWatchLogsLogGroupArn") 1531 ok.String(*v.CloudWatchLogsLogGroupArn) 1532 } 1533 1534 if v.CloudWatchLogsRoleArn != nil { 1535 ok := object.Key("CloudWatchLogsRoleArn") 1536 ok.String(*v.CloudWatchLogsRoleArn) 1537 } 1538 1539 if v.EnableLogFileValidation != nil { 1540 ok := object.Key("EnableLogFileValidation") 1541 ok.Boolean(*v.EnableLogFileValidation) 1542 } 1543 1544 if v.IncludeGlobalServiceEvents != nil { 1545 ok := object.Key("IncludeGlobalServiceEvents") 1546 ok.Boolean(*v.IncludeGlobalServiceEvents) 1547 } 1548 1549 if v.IsMultiRegionTrail != nil { 1550 ok := object.Key("IsMultiRegionTrail") 1551 ok.Boolean(*v.IsMultiRegionTrail) 1552 } 1553 1554 if v.IsOrganizationTrail != nil { 1555 ok := object.Key("IsOrganizationTrail") 1556 ok.Boolean(*v.IsOrganizationTrail) 1557 } 1558 1559 if v.KmsKeyId != nil { 1560 ok := object.Key("KmsKeyId") 1561 ok.String(*v.KmsKeyId) 1562 } 1563 1564 if v.Name != nil { 1565 ok := object.Key("Name") 1566 ok.String(*v.Name) 1567 } 1568 1569 if v.S3BucketName != nil { 1570 ok := object.Key("S3BucketName") 1571 ok.String(*v.S3BucketName) 1572 } 1573 1574 if v.S3KeyPrefix != nil { 1575 ok := object.Key("S3KeyPrefix") 1576 ok.String(*v.S3KeyPrefix) 1577 } 1578 1579 if v.SnsTopicName != nil { 1580 ok := object.Key("SnsTopicName") 1581 ok.String(*v.SnsTopicName) 1582 } 1583 1584 return nil 1585} 1586