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