1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package migrationhub 4 5import ( 6 "bytes" 7 "context" 8 "fmt" 9 "github.com/aws/aws-sdk-go-v2/service/migrationhub/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_serializeOpAssociateCreatedArtifact struct { 19} 20 21func (*awsAwsjson11_serializeOpAssociateCreatedArtifact) ID() string { 22 return "OperationSerializer" 23} 24 25func (m *awsAwsjson11_serializeOpAssociateCreatedArtifact) 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.(*AssociateCreatedArtifactInput) 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("AWSMigrationHub.AssociateCreatedArtifact") 47 48 jsonEncoder := smithyjson.NewEncoder() 49 if err := awsAwsjson11_serializeOpDocumentAssociateCreatedArtifactInput(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_serializeOpAssociateDiscoveredResource struct { 66} 67 68func (*awsAwsjson11_serializeOpAssociateDiscoveredResource) ID() string { 69 return "OperationSerializer" 70} 71 72func (m *awsAwsjson11_serializeOpAssociateDiscoveredResource) 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.(*AssociateDiscoveredResourceInput) 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("AWSMigrationHub.AssociateDiscoveredResource") 94 95 jsonEncoder := smithyjson.NewEncoder() 96 if err := awsAwsjson11_serializeOpDocumentAssociateDiscoveredResourceInput(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_serializeOpCreateProgressUpdateStream struct { 113} 114 115func (*awsAwsjson11_serializeOpCreateProgressUpdateStream) ID() string { 116 return "OperationSerializer" 117} 118 119func (m *awsAwsjson11_serializeOpCreateProgressUpdateStream) 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.(*CreateProgressUpdateStreamInput) 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("AWSMigrationHub.CreateProgressUpdateStream") 141 142 jsonEncoder := smithyjson.NewEncoder() 143 if err := awsAwsjson11_serializeOpDocumentCreateProgressUpdateStreamInput(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_serializeOpDeleteProgressUpdateStream struct { 160} 161 162func (*awsAwsjson11_serializeOpDeleteProgressUpdateStream) ID() string { 163 return "OperationSerializer" 164} 165 166func (m *awsAwsjson11_serializeOpDeleteProgressUpdateStream) 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.(*DeleteProgressUpdateStreamInput) 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("AWSMigrationHub.DeleteProgressUpdateStream") 188 189 jsonEncoder := smithyjson.NewEncoder() 190 if err := awsAwsjson11_serializeOpDocumentDeleteProgressUpdateStreamInput(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_serializeOpDescribeApplicationState struct { 207} 208 209func (*awsAwsjson11_serializeOpDescribeApplicationState) ID() string { 210 return "OperationSerializer" 211} 212 213func (m *awsAwsjson11_serializeOpDescribeApplicationState) 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.(*DescribeApplicationStateInput) 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("AWSMigrationHub.DescribeApplicationState") 235 236 jsonEncoder := smithyjson.NewEncoder() 237 if err := awsAwsjson11_serializeOpDocumentDescribeApplicationStateInput(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_serializeOpDescribeMigrationTask struct { 254} 255 256func (*awsAwsjson11_serializeOpDescribeMigrationTask) ID() string { 257 return "OperationSerializer" 258} 259 260func (m *awsAwsjson11_serializeOpDescribeMigrationTask) 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.(*DescribeMigrationTaskInput) 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("AWSMigrationHub.DescribeMigrationTask") 282 283 jsonEncoder := smithyjson.NewEncoder() 284 if err := awsAwsjson11_serializeOpDocumentDescribeMigrationTaskInput(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_serializeOpDisassociateCreatedArtifact struct { 301} 302 303func (*awsAwsjson11_serializeOpDisassociateCreatedArtifact) ID() string { 304 return "OperationSerializer" 305} 306 307func (m *awsAwsjson11_serializeOpDisassociateCreatedArtifact) 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.(*DisassociateCreatedArtifactInput) 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("AWSMigrationHub.DisassociateCreatedArtifact") 329 330 jsonEncoder := smithyjson.NewEncoder() 331 if err := awsAwsjson11_serializeOpDocumentDisassociateCreatedArtifactInput(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_serializeOpDisassociateDiscoveredResource struct { 348} 349 350func (*awsAwsjson11_serializeOpDisassociateDiscoveredResource) ID() string { 351 return "OperationSerializer" 352} 353 354func (m *awsAwsjson11_serializeOpDisassociateDiscoveredResource) 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.(*DisassociateDiscoveredResourceInput) 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("AWSMigrationHub.DisassociateDiscoveredResource") 376 377 jsonEncoder := smithyjson.NewEncoder() 378 if err := awsAwsjson11_serializeOpDocumentDisassociateDiscoveredResourceInput(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_serializeOpImportMigrationTask struct { 395} 396 397func (*awsAwsjson11_serializeOpImportMigrationTask) ID() string { 398 return "OperationSerializer" 399} 400 401func (m *awsAwsjson11_serializeOpImportMigrationTask) 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.(*ImportMigrationTaskInput) 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("AWSMigrationHub.ImportMigrationTask") 423 424 jsonEncoder := smithyjson.NewEncoder() 425 if err := awsAwsjson11_serializeOpDocumentImportMigrationTaskInput(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_serializeOpListApplicationStates struct { 442} 443 444func (*awsAwsjson11_serializeOpListApplicationStates) ID() string { 445 return "OperationSerializer" 446} 447 448func (m *awsAwsjson11_serializeOpListApplicationStates) 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.(*ListApplicationStatesInput) 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("AWSMigrationHub.ListApplicationStates") 470 471 jsonEncoder := smithyjson.NewEncoder() 472 if err := awsAwsjson11_serializeOpDocumentListApplicationStatesInput(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_serializeOpListCreatedArtifacts struct { 489} 490 491func (*awsAwsjson11_serializeOpListCreatedArtifacts) ID() string { 492 return "OperationSerializer" 493} 494 495func (m *awsAwsjson11_serializeOpListCreatedArtifacts) 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.(*ListCreatedArtifactsInput) 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("AWSMigrationHub.ListCreatedArtifacts") 517 518 jsonEncoder := smithyjson.NewEncoder() 519 if err := awsAwsjson11_serializeOpDocumentListCreatedArtifactsInput(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_serializeOpListDiscoveredResources struct { 536} 537 538func (*awsAwsjson11_serializeOpListDiscoveredResources) ID() string { 539 return "OperationSerializer" 540} 541 542func (m *awsAwsjson11_serializeOpListDiscoveredResources) 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.(*ListDiscoveredResourcesInput) 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("AWSMigrationHub.ListDiscoveredResources") 564 565 jsonEncoder := smithyjson.NewEncoder() 566 if err := awsAwsjson11_serializeOpDocumentListDiscoveredResourcesInput(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_serializeOpListMigrationTasks struct { 583} 584 585func (*awsAwsjson11_serializeOpListMigrationTasks) ID() string { 586 return "OperationSerializer" 587} 588 589func (m *awsAwsjson11_serializeOpListMigrationTasks) 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.(*ListMigrationTasksInput) 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("AWSMigrationHub.ListMigrationTasks") 611 612 jsonEncoder := smithyjson.NewEncoder() 613 if err := awsAwsjson11_serializeOpDocumentListMigrationTasksInput(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_serializeOpListProgressUpdateStreams struct { 630} 631 632func (*awsAwsjson11_serializeOpListProgressUpdateStreams) ID() string { 633 return "OperationSerializer" 634} 635 636func (m *awsAwsjson11_serializeOpListProgressUpdateStreams) 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.(*ListProgressUpdateStreamsInput) 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("AWSMigrationHub.ListProgressUpdateStreams") 658 659 jsonEncoder := smithyjson.NewEncoder() 660 if err := awsAwsjson11_serializeOpDocumentListProgressUpdateStreamsInput(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_serializeOpNotifyApplicationState struct { 677} 678 679func (*awsAwsjson11_serializeOpNotifyApplicationState) ID() string { 680 return "OperationSerializer" 681} 682 683func (m *awsAwsjson11_serializeOpNotifyApplicationState) 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.(*NotifyApplicationStateInput) 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("AWSMigrationHub.NotifyApplicationState") 705 706 jsonEncoder := smithyjson.NewEncoder() 707 if err := awsAwsjson11_serializeOpDocumentNotifyApplicationStateInput(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_serializeOpNotifyMigrationTaskState struct { 724} 725 726func (*awsAwsjson11_serializeOpNotifyMigrationTaskState) ID() string { 727 return "OperationSerializer" 728} 729 730func (m *awsAwsjson11_serializeOpNotifyMigrationTaskState) 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.(*NotifyMigrationTaskStateInput) 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("AWSMigrationHub.NotifyMigrationTaskState") 752 753 jsonEncoder := smithyjson.NewEncoder() 754 if err := awsAwsjson11_serializeOpDocumentNotifyMigrationTaskStateInput(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_serializeOpPutResourceAttributes struct { 771} 772 773func (*awsAwsjson11_serializeOpPutResourceAttributes) ID() string { 774 return "OperationSerializer" 775} 776 777func (m *awsAwsjson11_serializeOpPutResourceAttributes) 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.(*PutResourceAttributesInput) 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("AWSMigrationHub.PutResourceAttributes") 799 800 jsonEncoder := smithyjson.NewEncoder() 801 if err := awsAwsjson11_serializeOpDocumentPutResourceAttributesInput(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} 816func awsAwsjson11_serializeDocumentApplicationIds(v []string, value smithyjson.Value) error { 817 array := value.Array() 818 defer array.Close() 819 820 for i := range v { 821 av := array.Value() 822 av.String(v[i]) 823 } 824 return nil 825} 826 827func awsAwsjson11_serializeDocumentCreatedArtifact(v *types.CreatedArtifact, value smithyjson.Value) error { 828 object := value.Object() 829 defer object.Close() 830 831 if v.Description != nil { 832 ok := object.Key("Description") 833 ok.String(*v.Description) 834 } 835 836 if v.Name != nil { 837 ok := object.Key("Name") 838 ok.String(*v.Name) 839 } 840 841 return nil 842} 843 844func awsAwsjson11_serializeDocumentDiscoveredResource(v *types.DiscoveredResource, value smithyjson.Value) error { 845 object := value.Object() 846 defer object.Close() 847 848 if v.ConfigurationId != nil { 849 ok := object.Key("ConfigurationId") 850 ok.String(*v.ConfigurationId) 851 } 852 853 if v.Description != nil { 854 ok := object.Key("Description") 855 ok.String(*v.Description) 856 } 857 858 return nil 859} 860 861func awsAwsjson11_serializeDocumentResourceAttribute(v *types.ResourceAttribute, value smithyjson.Value) error { 862 object := value.Object() 863 defer object.Close() 864 865 if len(v.Type) > 0 { 866 ok := object.Key("Type") 867 ok.String(string(v.Type)) 868 } 869 870 if v.Value != nil { 871 ok := object.Key("Value") 872 ok.String(*v.Value) 873 } 874 875 return nil 876} 877 878func awsAwsjson11_serializeDocumentResourceAttributeList(v []types.ResourceAttribute, value smithyjson.Value) error { 879 array := value.Array() 880 defer array.Close() 881 882 for i := range v { 883 av := array.Value() 884 if err := awsAwsjson11_serializeDocumentResourceAttribute(&v[i], av); err != nil { 885 return err 886 } 887 } 888 return nil 889} 890 891func awsAwsjson11_serializeDocumentTask(v *types.Task, value smithyjson.Value) error { 892 object := value.Object() 893 defer object.Close() 894 895 if v.ProgressPercent != nil { 896 ok := object.Key("ProgressPercent") 897 ok.Integer(*v.ProgressPercent) 898 } 899 900 if len(v.Status) > 0 { 901 ok := object.Key("Status") 902 ok.String(string(v.Status)) 903 } 904 905 if v.StatusDetail != nil { 906 ok := object.Key("StatusDetail") 907 ok.String(*v.StatusDetail) 908 } 909 910 return nil 911} 912 913func awsAwsjson11_serializeOpDocumentAssociateCreatedArtifactInput(v *AssociateCreatedArtifactInput, value smithyjson.Value) error { 914 object := value.Object() 915 defer object.Close() 916 917 if v.CreatedArtifact != nil { 918 ok := object.Key("CreatedArtifact") 919 if err := awsAwsjson11_serializeDocumentCreatedArtifact(v.CreatedArtifact, ok); err != nil { 920 return err 921 } 922 } 923 924 if v.DryRun { 925 ok := object.Key("DryRun") 926 ok.Boolean(v.DryRun) 927 } 928 929 if v.MigrationTaskName != nil { 930 ok := object.Key("MigrationTaskName") 931 ok.String(*v.MigrationTaskName) 932 } 933 934 if v.ProgressUpdateStream != nil { 935 ok := object.Key("ProgressUpdateStream") 936 ok.String(*v.ProgressUpdateStream) 937 } 938 939 return nil 940} 941 942func awsAwsjson11_serializeOpDocumentAssociateDiscoveredResourceInput(v *AssociateDiscoveredResourceInput, value smithyjson.Value) error { 943 object := value.Object() 944 defer object.Close() 945 946 if v.DiscoveredResource != nil { 947 ok := object.Key("DiscoveredResource") 948 if err := awsAwsjson11_serializeDocumentDiscoveredResource(v.DiscoveredResource, ok); err != nil { 949 return err 950 } 951 } 952 953 if v.DryRun { 954 ok := object.Key("DryRun") 955 ok.Boolean(v.DryRun) 956 } 957 958 if v.MigrationTaskName != nil { 959 ok := object.Key("MigrationTaskName") 960 ok.String(*v.MigrationTaskName) 961 } 962 963 if v.ProgressUpdateStream != nil { 964 ok := object.Key("ProgressUpdateStream") 965 ok.String(*v.ProgressUpdateStream) 966 } 967 968 return nil 969} 970 971func awsAwsjson11_serializeOpDocumentCreateProgressUpdateStreamInput(v *CreateProgressUpdateStreamInput, value smithyjson.Value) error { 972 object := value.Object() 973 defer object.Close() 974 975 if v.DryRun { 976 ok := object.Key("DryRun") 977 ok.Boolean(v.DryRun) 978 } 979 980 if v.ProgressUpdateStreamName != nil { 981 ok := object.Key("ProgressUpdateStreamName") 982 ok.String(*v.ProgressUpdateStreamName) 983 } 984 985 return nil 986} 987 988func awsAwsjson11_serializeOpDocumentDeleteProgressUpdateStreamInput(v *DeleteProgressUpdateStreamInput, value smithyjson.Value) error { 989 object := value.Object() 990 defer object.Close() 991 992 if v.DryRun { 993 ok := object.Key("DryRun") 994 ok.Boolean(v.DryRun) 995 } 996 997 if v.ProgressUpdateStreamName != nil { 998 ok := object.Key("ProgressUpdateStreamName") 999 ok.String(*v.ProgressUpdateStreamName) 1000 } 1001 1002 return nil 1003} 1004 1005func awsAwsjson11_serializeOpDocumentDescribeApplicationStateInput(v *DescribeApplicationStateInput, value smithyjson.Value) error { 1006 object := value.Object() 1007 defer object.Close() 1008 1009 if v.ApplicationId != nil { 1010 ok := object.Key("ApplicationId") 1011 ok.String(*v.ApplicationId) 1012 } 1013 1014 return nil 1015} 1016 1017func awsAwsjson11_serializeOpDocumentDescribeMigrationTaskInput(v *DescribeMigrationTaskInput, value smithyjson.Value) error { 1018 object := value.Object() 1019 defer object.Close() 1020 1021 if v.MigrationTaskName != nil { 1022 ok := object.Key("MigrationTaskName") 1023 ok.String(*v.MigrationTaskName) 1024 } 1025 1026 if v.ProgressUpdateStream != nil { 1027 ok := object.Key("ProgressUpdateStream") 1028 ok.String(*v.ProgressUpdateStream) 1029 } 1030 1031 return nil 1032} 1033 1034func awsAwsjson11_serializeOpDocumentDisassociateCreatedArtifactInput(v *DisassociateCreatedArtifactInput, value smithyjson.Value) error { 1035 object := value.Object() 1036 defer object.Close() 1037 1038 if v.CreatedArtifactName != nil { 1039 ok := object.Key("CreatedArtifactName") 1040 ok.String(*v.CreatedArtifactName) 1041 } 1042 1043 if v.DryRun { 1044 ok := object.Key("DryRun") 1045 ok.Boolean(v.DryRun) 1046 } 1047 1048 if v.MigrationTaskName != nil { 1049 ok := object.Key("MigrationTaskName") 1050 ok.String(*v.MigrationTaskName) 1051 } 1052 1053 if v.ProgressUpdateStream != nil { 1054 ok := object.Key("ProgressUpdateStream") 1055 ok.String(*v.ProgressUpdateStream) 1056 } 1057 1058 return nil 1059} 1060 1061func awsAwsjson11_serializeOpDocumentDisassociateDiscoveredResourceInput(v *DisassociateDiscoveredResourceInput, value smithyjson.Value) error { 1062 object := value.Object() 1063 defer object.Close() 1064 1065 if v.ConfigurationId != nil { 1066 ok := object.Key("ConfigurationId") 1067 ok.String(*v.ConfigurationId) 1068 } 1069 1070 if v.DryRun { 1071 ok := object.Key("DryRun") 1072 ok.Boolean(v.DryRun) 1073 } 1074 1075 if v.MigrationTaskName != nil { 1076 ok := object.Key("MigrationTaskName") 1077 ok.String(*v.MigrationTaskName) 1078 } 1079 1080 if v.ProgressUpdateStream != nil { 1081 ok := object.Key("ProgressUpdateStream") 1082 ok.String(*v.ProgressUpdateStream) 1083 } 1084 1085 return nil 1086} 1087 1088func awsAwsjson11_serializeOpDocumentImportMigrationTaskInput(v *ImportMigrationTaskInput, value smithyjson.Value) error { 1089 object := value.Object() 1090 defer object.Close() 1091 1092 if v.DryRun { 1093 ok := object.Key("DryRun") 1094 ok.Boolean(v.DryRun) 1095 } 1096 1097 if v.MigrationTaskName != nil { 1098 ok := object.Key("MigrationTaskName") 1099 ok.String(*v.MigrationTaskName) 1100 } 1101 1102 if v.ProgressUpdateStream != nil { 1103 ok := object.Key("ProgressUpdateStream") 1104 ok.String(*v.ProgressUpdateStream) 1105 } 1106 1107 return nil 1108} 1109 1110func awsAwsjson11_serializeOpDocumentListApplicationStatesInput(v *ListApplicationStatesInput, value smithyjson.Value) error { 1111 object := value.Object() 1112 defer object.Close() 1113 1114 if v.ApplicationIds != nil { 1115 ok := object.Key("ApplicationIds") 1116 if err := awsAwsjson11_serializeDocumentApplicationIds(v.ApplicationIds, ok); err != nil { 1117 return err 1118 } 1119 } 1120 1121 if v.MaxResults != nil { 1122 ok := object.Key("MaxResults") 1123 ok.Integer(*v.MaxResults) 1124 } 1125 1126 if v.NextToken != nil { 1127 ok := object.Key("NextToken") 1128 ok.String(*v.NextToken) 1129 } 1130 1131 return nil 1132} 1133 1134func awsAwsjson11_serializeOpDocumentListCreatedArtifactsInput(v *ListCreatedArtifactsInput, value smithyjson.Value) error { 1135 object := value.Object() 1136 defer object.Close() 1137 1138 if v.MaxResults != nil { 1139 ok := object.Key("MaxResults") 1140 ok.Integer(*v.MaxResults) 1141 } 1142 1143 if v.MigrationTaskName != nil { 1144 ok := object.Key("MigrationTaskName") 1145 ok.String(*v.MigrationTaskName) 1146 } 1147 1148 if v.NextToken != nil { 1149 ok := object.Key("NextToken") 1150 ok.String(*v.NextToken) 1151 } 1152 1153 if v.ProgressUpdateStream != nil { 1154 ok := object.Key("ProgressUpdateStream") 1155 ok.String(*v.ProgressUpdateStream) 1156 } 1157 1158 return nil 1159} 1160 1161func awsAwsjson11_serializeOpDocumentListDiscoveredResourcesInput(v *ListDiscoveredResourcesInput, value smithyjson.Value) error { 1162 object := value.Object() 1163 defer object.Close() 1164 1165 if v.MaxResults != nil { 1166 ok := object.Key("MaxResults") 1167 ok.Integer(*v.MaxResults) 1168 } 1169 1170 if v.MigrationTaskName != nil { 1171 ok := object.Key("MigrationTaskName") 1172 ok.String(*v.MigrationTaskName) 1173 } 1174 1175 if v.NextToken != nil { 1176 ok := object.Key("NextToken") 1177 ok.String(*v.NextToken) 1178 } 1179 1180 if v.ProgressUpdateStream != nil { 1181 ok := object.Key("ProgressUpdateStream") 1182 ok.String(*v.ProgressUpdateStream) 1183 } 1184 1185 return nil 1186} 1187 1188func awsAwsjson11_serializeOpDocumentListMigrationTasksInput(v *ListMigrationTasksInput, value smithyjson.Value) error { 1189 object := value.Object() 1190 defer object.Close() 1191 1192 if v.MaxResults != nil { 1193 ok := object.Key("MaxResults") 1194 ok.Integer(*v.MaxResults) 1195 } 1196 1197 if v.NextToken != nil { 1198 ok := object.Key("NextToken") 1199 ok.String(*v.NextToken) 1200 } 1201 1202 if v.ResourceName != nil { 1203 ok := object.Key("ResourceName") 1204 ok.String(*v.ResourceName) 1205 } 1206 1207 return nil 1208} 1209 1210func awsAwsjson11_serializeOpDocumentListProgressUpdateStreamsInput(v *ListProgressUpdateStreamsInput, value smithyjson.Value) error { 1211 object := value.Object() 1212 defer object.Close() 1213 1214 if v.MaxResults != nil { 1215 ok := object.Key("MaxResults") 1216 ok.Integer(*v.MaxResults) 1217 } 1218 1219 if v.NextToken != nil { 1220 ok := object.Key("NextToken") 1221 ok.String(*v.NextToken) 1222 } 1223 1224 return nil 1225} 1226 1227func awsAwsjson11_serializeOpDocumentNotifyApplicationStateInput(v *NotifyApplicationStateInput, value smithyjson.Value) error { 1228 object := value.Object() 1229 defer object.Close() 1230 1231 if v.ApplicationId != nil { 1232 ok := object.Key("ApplicationId") 1233 ok.String(*v.ApplicationId) 1234 } 1235 1236 if v.DryRun { 1237 ok := object.Key("DryRun") 1238 ok.Boolean(v.DryRun) 1239 } 1240 1241 if len(v.Status) > 0 { 1242 ok := object.Key("Status") 1243 ok.String(string(v.Status)) 1244 } 1245 1246 if v.UpdateDateTime != nil { 1247 ok := object.Key("UpdateDateTime") 1248 ok.Double(smithytime.FormatEpochSeconds(*v.UpdateDateTime)) 1249 } 1250 1251 return nil 1252} 1253 1254func awsAwsjson11_serializeOpDocumentNotifyMigrationTaskStateInput(v *NotifyMigrationTaskStateInput, value smithyjson.Value) error { 1255 object := value.Object() 1256 defer object.Close() 1257 1258 if v.DryRun { 1259 ok := object.Key("DryRun") 1260 ok.Boolean(v.DryRun) 1261 } 1262 1263 if v.MigrationTaskName != nil { 1264 ok := object.Key("MigrationTaskName") 1265 ok.String(*v.MigrationTaskName) 1266 } 1267 1268 if v.NextUpdateSeconds != 0 { 1269 ok := object.Key("NextUpdateSeconds") 1270 ok.Integer(v.NextUpdateSeconds) 1271 } 1272 1273 if v.ProgressUpdateStream != nil { 1274 ok := object.Key("ProgressUpdateStream") 1275 ok.String(*v.ProgressUpdateStream) 1276 } 1277 1278 if v.Task != nil { 1279 ok := object.Key("Task") 1280 if err := awsAwsjson11_serializeDocumentTask(v.Task, ok); err != nil { 1281 return err 1282 } 1283 } 1284 1285 if v.UpdateDateTime != nil { 1286 ok := object.Key("UpdateDateTime") 1287 ok.Double(smithytime.FormatEpochSeconds(*v.UpdateDateTime)) 1288 } 1289 1290 return nil 1291} 1292 1293func awsAwsjson11_serializeOpDocumentPutResourceAttributesInput(v *PutResourceAttributesInput, value smithyjson.Value) error { 1294 object := value.Object() 1295 defer object.Close() 1296 1297 if v.DryRun { 1298 ok := object.Key("DryRun") 1299 ok.Boolean(v.DryRun) 1300 } 1301 1302 if v.MigrationTaskName != nil { 1303 ok := object.Key("MigrationTaskName") 1304 ok.String(*v.MigrationTaskName) 1305 } 1306 1307 if v.ProgressUpdateStream != nil { 1308 ok := object.Key("ProgressUpdateStream") 1309 ok.String(*v.ProgressUpdateStream) 1310 } 1311 1312 if v.ResourceAttributeList != nil { 1313 ok := object.Key("ResourceAttributeList") 1314 if err := awsAwsjson11_serializeDocumentResourceAttributeList(v.ResourceAttributeList, ok); err != nil { 1315 return err 1316 } 1317 } 1318 1319 return nil 1320} 1321