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 "math" 16) 17 18type awsAwsjson11_serializeOpAddTags struct { 19} 20 21func (*awsAwsjson11_serializeOpAddTags) ID() string { 22 return "OperationSerializer" 23} 24 25func (m *awsAwsjson11_serializeOpAddTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 26 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 27) { 28 request, ok := in.Request.(*smithyhttp.Request) 29 if !ok { 30 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 31 } 32 33 input, ok := in.Parameters.(*AddTagsInput) 34 _ = input 35 if !ok { 36 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 37 } 38 39 request.Request.URL.Path = "/" 40 request.Request.Method = "POST" 41 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 42 if err != nil { 43 return out, metadata, &smithy.SerializationError{Err: err} 44 } 45 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 46 httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonML_20141212.AddTags") 47 48 jsonEncoder := smithyjson.NewEncoder() 49 if err := awsAwsjson11_serializeOpDocumentAddTagsInput(input, jsonEncoder.Value); err != nil { 50 return out, metadata, &smithy.SerializationError{Err: err} 51 } 52 53 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 54 return out, metadata, &smithy.SerializationError{Err: err} 55 } 56 57 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 58 return out, metadata, &smithy.SerializationError{Err: err} 59 } 60 in.Request = request 61 62 return next.HandleSerialize(ctx, in) 63} 64 65type awsAwsjson11_serializeOpCreateBatchPrediction struct { 66} 67 68func (*awsAwsjson11_serializeOpCreateBatchPrediction) ID() string { 69 return "OperationSerializer" 70} 71 72func (m *awsAwsjson11_serializeOpCreateBatchPrediction) 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.(*CreateBatchPredictionInput) 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("AmazonML_20141212.CreateBatchPrediction") 94 95 jsonEncoder := smithyjson.NewEncoder() 96 if err := awsAwsjson11_serializeOpDocumentCreateBatchPredictionInput(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_serializeOpCreateDataSourceFromRDS struct { 113} 114 115func (*awsAwsjson11_serializeOpCreateDataSourceFromRDS) ID() string { 116 return "OperationSerializer" 117} 118 119func (m *awsAwsjson11_serializeOpCreateDataSourceFromRDS) 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.(*CreateDataSourceFromRDSInput) 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("AmazonML_20141212.CreateDataSourceFromRDS") 141 142 jsonEncoder := smithyjson.NewEncoder() 143 if err := awsAwsjson11_serializeOpDocumentCreateDataSourceFromRDSInput(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_serializeOpCreateDataSourceFromRedshift struct { 160} 161 162func (*awsAwsjson11_serializeOpCreateDataSourceFromRedshift) ID() string { 163 return "OperationSerializer" 164} 165 166func (m *awsAwsjson11_serializeOpCreateDataSourceFromRedshift) 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.(*CreateDataSourceFromRedshiftInput) 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("AmazonML_20141212.CreateDataSourceFromRedshift") 188 189 jsonEncoder := smithyjson.NewEncoder() 190 if err := awsAwsjson11_serializeOpDocumentCreateDataSourceFromRedshiftInput(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_serializeOpCreateDataSourceFromS3 struct { 207} 208 209func (*awsAwsjson11_serializeOpCreateDataSourceFromS3) ID() string { 210 return "OperationSerializer" 211} 212 213func (m *awsAwsjson11_serializeOpCreateDataSourceFromS3) 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.(*CreateDataSourceFromS3Input) 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("AmazonML_20141212.CreateDataSourceFromS3") 235 236 jsonEncoder := smithyjson.NewEncoder() 237 if err := awsAwsjson11_serializeOpDocumentCreateDataSourceFromS3Input(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_serializeOpCreateEvaluation struct { 254} 255 256func (*awsAwsjson11_serializeOpCreateEvaluation) ID() string { 257 return "OperationSerializer" 258} 259 260func (m *awsAwsjson11_serializeOpCreateEvaluation) 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.(*CreateEvaluationInput) 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("AmazonML_20141212.CreateEvaluation") 282 283 jsonEncoder := smithyjson.NewEncoder() 284 if err := awsAwsjson11_serializeOpDocumentCreateEvaluationInput(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_serializeOpCreateMLModel struct { 301} 302 303func (*awsAwsjson11_serializeOpCreateMLModel) ID() string { 304 return "OperationSerializer" 305} 306 307func (m *awsAwsjson11_serializeOpCreateMLModel) 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.(*CreateMLModelInput) 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("AmazonML_20141212.CreateMLModel") 329 330 jsonEncoder := smithyjson.NewEncoder() 331 if err := awsAwsjson11_serializeOpDocumentCreateMLModelInput(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_serializeOpCreateRealtimeEndpoint struct { 348} 349 350func (*awsAwsjson11_serializeOpCreateRealtimeEndpoint) ID() string { 351 return "OperationSerializer" 352} 353 354func (m *awsAwsjson11_serializeOpCreateRealtimeEndpoint) 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.(*CreateRealtimeEndpointInput) 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("AmazonML_20141212.CreateRealtimeEndpoint") 376 377 jsonEncoder := smithyjson.NewEncoder() 378 if err := awsAwsjson11_serializeOpDocumentCreateRealtimeEndpointInput(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_serializeOpDeleteBatchPrediction struct { 395} 396 397func (*awsAwsjson11_serializeOpDeleteBatchPrediction) ID() string { 398 return "OperationSerializer" 399} 400 401func (m *awsAwsjson11_serializeOpDeleteBatchPrediction) 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.(*DeleteBatchPredictionInput) 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("AmazonML_20141212.DeleteBatchPrediction") 423 424 jsonEncoder := smithyjson.NewEncoder() 425 if err := awsAwsjson11_serializeOpDocumentDeleteBatchPredictionInput(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_serializeOpDeleteDataSource struct { 442} 443 444func (*awsAwsjson11_serializeOpDeleteDataSource) ID() string { 445 return "OperationSerializer" 446} 447 448func (m *awsAwsjson11_serializeOpDeleteDataSource) 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.(*DeleteDataSourceInput) 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("AmazonML_20141212.DeleteDataSource") 470 471 jsonEncoder := smithyjson.NewEncoder() 472 if err := awsAwsjson11_serializeOpDocumentDeleteDataSourceInput(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_serializeOpDeleteEvaluation struct { 489} 490 491func (*awsAwsjson11_serializeOpDeleteEvaluation) ID() string { 492 return "OperationSerializer" 493} 494 495func (m *awsAwsjson11_serializeOpDeleteEvaluation) 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.(*DeleteEvaluationInput) 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("AmazonML_20141212.DeleteEvaluation") 517 518 jsonEncoder := smithyjson.NewEncoder() 519 if err := awsAwsjson11_serializeOpDocumentDeleteEvaluationInput(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_serializeOpDeleteMLModel struct { 536} 537 538func (*awsAwsjson11_serializeOpDeleteMLModel) ID() string { 539 return "OperationSerializer" 540} 541 542func (m *awsAwsjson11_serializeOpDeleteMLModel) 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.(*DeleteMLModelInput) 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("AmazonML_20141212.DeleteMLModel") 564 565 jsonEncoder := smithyjson.NewEncoder() 566 if err := awsAwsjson11_serializeOpDocumentDeleteMLModelInput(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_serializeOpDeleteRealtimeEndpoint struct { 583} 584 585func (*awsAwsjson11_serializeOpDeleteRealtimeEndpoint) ID() string { 586 return "OperationSerializer" 587} 588 589func (m *awsAwsjson11_serializeOpDeleteRealtimeEndpoint) 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.(*DeleteRealtimeEndpointInput) 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("AmazonML_20141212.DeleteRealtimeEndpoint") 611 612 jsonEncoder := smithyjson.NewEncoder() 613 if err := awsAwsjson11_serializeOpDocumentDeleteRealtimeEndpointInput(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_serializeOpDeleteTags struct { 630} 631 632func (*awsAwsjson11_serializeOpDeleteTags) ID() string { 633 return "OperationSerializer" 634} 635 636func (m *awsAwsjson11_serializeOpDeleteTags) 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.(*DeleteTagsInput) 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("AmazonML_20141212.DeleteTags") 658 659 jsonEncoder := smithyjson.NewEncoder() 660 if err := awsAwsjson11_serializeOpDocumentDeleteTagsInput(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_serializeOpDescribeBatchPredictions struct { 677} 678 679func (*awsAwsjson11_serializeOpDescribeBatchPredictions) ID() string { 680 return "OperationSerializer" 681} 682 683func (m *awsAwsjson11_serializeOpDescribeBatchPredictions) 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.(*DescribeBatchPredictionsInput) 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("AmazonML_20141212.DescribeBatchPredictions") 705 706 jsonEncoder := smithyjson.NewEncoder() 707 if err := awsAwsjson11_serializeOpDocumentDescribeBatchPredictionsInput(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_serializeOpDescribeDataSources struct { 724} 725 726func (*awsAwsjson11_serializeOpDescribeDataSources) ID() string { 727 return "OperationSerializer" 728} 729 730func (m *awsAwsjson11_serializeOpDescribeDataSources) 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.(*DescribeDataSourcesInput) 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("AmazonML_20141212.DescribeDataSources") 752 753 jsonEncoder := smithyjson.NewEncoder() 754 if err := awsAwsjson11_serializeOpDocumentDescribeDataSourcesInput(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_serializeOpDescribeEvaluations struct { 771} 772 773func (*awsAwsjson11_serializeOpDescribeEvaluations) ID() string { 774 return "OperationSerializer" 775} 776 777func (m *awsAwsjson11_serializeOpDescribeEvaluations) 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.(*DescribeEvaluationsInput) 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("AmazonML_20141212.DescribeEvaluations") 799 800 jsonEncoder := smithyjson.NewEncoder() 801 if err := awsAwsjson11_serializeOpDocumentDescribeEvaluationsInput(input, jsonEncoder.Value); err != nil { 802 return out, metadata, &smithy.SerializationError{Err: err} 803 } 804 805 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 806 return out, metadata, &smithy.SerializationError{Err: err} 807 } 808 809 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 810 return out, metadata, &smithy.SerializationError{Err: err} 811 } 812 in.Request = request 813 814 return next.HandleSerialize(ctx, in) 815} 816 817type awsAwsjson11_serializeOpDescribeMLModels struct { 818} 819 820func (*awsAwsjson11_serializeOpDescribeMLModels) ID() string { 821 return "OperationSerializer" 822} 823 824func (m *awsAwsjson11_serializeOpDescribeMLModels) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 825 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 826) { 827 request, ok := in.Request.(*smithyhttp.Request) 828 if !ok { 829 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 830 } 831 832 input, ok := in.Parameters.(*DescribeMLModelsInput) 833 _ = input 834 if !ok { 835 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 836 } 837 838 request.Request.URL.Path = "/" 839 request.Request.Method = "POST" 840 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 841 if err != nil { 842 return out, metadata, &smithy.SerializationError{Err: err} 843 } 844 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 845 httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonML_20141212.DescribeMLModels") 846 847 jsonEncoder := smithyjson.NewEncoder() 848 if err := awsAwsjson11_serializeOpDocumentDescribeMLModelsInput(input, jsonEncoder.Value); err != nil { 849 return out, metadata, &smithy.SerializationError{Err: err} 850 } 851 852 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 853 return out, metadata, &smithy.SerializationError{Err: err} 854 } 855 856 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 857 return out, metadata, &smithy.SerializationError{Err: err} 858 } 859 in.Request = request 860 861 return next.HandleSerialize(ctx, in) 862} 863 864type awsAwsjson11_serializeOpDescribeTags struct { 865} 866 867func (*awsAwsjson11_serializeOpDescribeTags) ID() string { 868 return "OperationSerializer" 869} 870 871func (m *awsAwsjson11_serializeOpDescribeTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 872 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 873) { 874 request, ok := in.Request.(*smithyhttp.Request) 875 if !ok { 876 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 877 } 878 879 input, ok := in.Parameters.(*DescribeTagsInput) 880 _ = input 881 if !ok { 882 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 883 } 884 885 request.Request.URL.Path = "/" 886 request.Request.Method = "POST" 887 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 888 if err != nil { 889 return out, metadata, &smithy.SerializationError{Err: err} 890 } 891 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 892 httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonML_20141212.DescribeTags") 893 894 jsonEncoder := smithyjson.NewEncoder() 895 if err := awsAwsjson11_serializeOpDocumentDescribeTagsInput(input, jsonEncoder.Value); err != nil { 896 return out, metadata, &smithy.SerializationError{Err: err} 897 } 898 899 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 900 return out, metadata, &smithy.SerializationError{Err: err} 901 } 902 903 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 904 return out, metadata, &smithy.SerializationError{Err: err} 905 } 906 in.Request = request 907 908 return next.HandleSerialize(ctx, in) 909} 910 911type awsAwsjson11_serializeOpGetBatchPrediction struct { 912} 913 914func (*awsAwsjson11_serializeOpGetBatchPrediction) ID() string { 915 return "OperationSerializer" 916} 917 918func (m *awsAwsjson11_serializeOpGetBatchPrediction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 919 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 920) { 921 request, ok := in.Request.(*smithyhttp.Request) 922 if !ok { 923 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 924 } 925 926 input, ok := in.Parameters.(*GetBatchPredictionInput) 927 _ = input 928 if !ok { 929 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 930 } 931 932 request.Request.URL.Path = "/" 933 request.Request.Method = "POST" 934 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 935 if err != nil { 936 return out, metadata, &smithy.SerializationError{Err: err} 937 } 938 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 939 httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonML_20141212.GetBatchPrediction") 940 941 jsonEncoder := smithyjson.NewEncoder() 942 if err := awsAwsjson11_serializeOpDocumentGetBatchPredictionInput(input, jsonEncoder.Value); err != nil { 943 return out, metadata, &smithy.SerializationError{Err: err} 944 } 945 946 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 947 return out, metadata, &smithy.SerializationError{Err: err} 948 } 949 950 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 951 return out, metadata, &smithy.SerializationError{Err: err} 952 } 953 in.Request = request 954 955 return next.HandleSerialize(ctx, in) 956} 957 958type awsAwsjson11_serializeOpGetDataSource struct { 959} 960 961func (*awsAwsjson11_serializeOpGetDataSource) ID() string { 962 return "OperationSerializer" 963} 964 965func (m *awsAwsjson11_serializeOpGetDataSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 966 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 967) { 968 request, ok := in.Request.(*smithyhttp.Request) 969 if !ok { 970 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 971 } 972 973 input, ok := in.Parameters.(*GetDataSourceInput) 974 _ = input 975 if !ok { 976 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 977 } 978 979 request.Request.URL.Path = "/" 980 request.Request.Method = "POST" 981 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 982 if err != nil { 983 return out, metadata, &smithy.SerializationError{Err: err} 984 } 985 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 986 httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonML_20141212.GetDataSource") 987 988 jsonEncoder := smithyjson.NewEncoder() 989 if err := awsAwsjson11_serializeOpDocumentGetDataSourceInput(input, jsonEncoder.Value); err != nil { 990 return out, metadata, &smithy.SerializationError{Err: err} 991 } 992 993 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 994 return out, metadata, &smithy.SerializationError{Err: err} 995 } 996 997 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 998 return out, metadata, &smithy.SerializationError{Err: err} 999 } 1000 in.Request = request 1001 1002 return next.HandleSerialize(ctx, in) 1003} 1004 1005type awsAwsjson11_serializeOpGetEvaluation struct { 1006} 1007 1008func (*awsAwsjson11_serializeOpGetEvaluation) ID() string { 1009 return "OperationSerializer" 1010} 1011 1012func (m *awsAwsjson11_serializeOpGetEvaluation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1013 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1014) { 1015 request, ok := in.Request.(*smithyhttp.Request) 1016 if !ok { 1017 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1018 } 1019 1020 input, ok := in.Parameters.(*GetEvaluationInput) 1021 _ = input 1022 if !ok { 1023 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1024 } 1025 1026 request.Request.URL.Path = "/" 1027 request.Request.Method = "POST" 1028 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1029 if err != nil { 1030 return out, metadata, &smithy.SerializationError{Err: err} 1031 } 1032 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 1033 httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonML_20141212.GetEvaluation") 1034 1035 jsonEncoder := smithyjson.NewEncoder() 1036 if err := awsAwsjson11_serializeOpDocumentGetEvaluationInput(input, jsonEncoder.Value); err != nil { 1037 return out, metadata, &smithy.SerializationError{Err: err} 1038 } 1039 1040 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 1041 return out, metadata, &smithy.SerializationError{Err: err} 1042 } 1043 1044 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 1045 return out, metadata, &smithy.SerializationError{Err: err} 1046 } 1047 in.Request = request 1048 1049 return next.HandleSerialize(ctx, in) 1050} 1051 1052type awsAwsjson11_serializeOpGetMLModel struct { 1053} 1054 1055func (*awsAwsjson11_serializeOpGetMLModel) ID() string { 1056 return "OperationSerializer" 1057} 1058 1059func (m *awsAwsjson11_serializeOpGetMLModel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1060 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1061) { 1062 request, ok := in.Request.(*smithyhttp.Request) 1063 if !ok { 1064 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1065 } 1066 1067 input, ok := in.Parameters.(*GetMLModelInput) 1068 _ = input 1069 if !ok { 1070 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1071 } 1072 1073 request.Request.URL.Path = "/" 1074 request.Request.Method = "POST" 1075 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1076 if err != nil { 1077 return out, metadata, &smithy.SerializationError{Err: err} 1078 } 1079 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 1080 httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonML_20141212.GetMLModel") 1081 1082 jsonEncoder := smithyjson.NewEncoder() 1083 if err := awsAwsjson11_serializeOpDocumentGetMLModelInput(input, jsonEncoder.Value); err != nil { 1084 return out, metadata, &smithy.SerializationError{Err: err} 1085 } 1086 1087 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 1088 return out, metadata, &smithy.SerializationError{Err: err} 1089 } 1090 1091 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 1092 return out, metadata, &smithy.SerializationError{Err: err} 1093 } 1094 in.Request = request 1095 1096 return next.HandleSerialize(ctx, in) 1097} 1098 1099type awsAwsjson11_serializeOpPredict struct { 1100} 1101 1102func (*awsAwsjson11_serializeOpPredict) ID() string { 1103 return "OperationSerializer" 1104} 1105 1106func (m *awsAwsjson11_serializeOpPredict) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1107 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1108) { 1109 request, ok := in.Request.(*smithyhttp.Request) 1110 if !ok { 1111 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1112 } 1113 1114 input, ok := in.Parameters.(*PredictInput) 1115 _ = input 1116 if !ok { 1117 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1118 } 1119 1120 request.Request.URL.Path = "/" 1121 request.Request.Method = "POST" 1122 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1123 if err != nil { 1124 return out, metadata, &smithy.SerializationError{Err: err} 1125 } 1126 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 1127 httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonML_20141212.Predict") 1128 1129 jsonEncoder := smithyjson.NewEncoder() 1130 if err := awsAwsjson11_serializeOpDocumentPredictInput(input, jsonEncoder.Value); err != nil { 1131 return out, metadata, &smithy.SerializationError{Err: err} 1132 } 1133 1134 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 1135 return out, metadata, &smithy.SerializationError{Err: err} 1136 } 1137 1138 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 1139 return out, metadata, &smithy.SerializationError{Err: err} 1140 } 1141 in.Request = request 1142 1143 return next.HandleSerialize(ctx, in) 1144} 1145 1146type awsAwsjson11_serializeOpUpdateBatchPrediction struct { 1147} 1148 1149func (*awsAwsjson11_serializeOpUpdateBatchPrediction) ID() string { 1150 return "OperationSerializer" 1151} 1152 1153func (m *awsAwsjson11_serializeOpUpdateBatchPrediction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1154 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1155) { 1156 request, ok := in.Request.(*smithyhttp.Request) 1157 if !ok { 1158 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1159 } 1160 1161 input, ok := in.Parameters.(*UpdateBatchPredictionInput) 1162 _ = input 1163 if !ok { 1164 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1165 } 1166 1167 request.Request.URL.Path = "/" 1168 request.Request.Method = "POST" 1169 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1170 if err != nil { 1171 return out, metadata, &smithy.SerializationError{Err: err} 1172 } 1173 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 1174 httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonML_20141212.UpdateBatchPrediction") 1175 1176 jsonEncoder := smithyjson.NewEncoder() 1177 if err := awsAwsjson11_serializeOpDocumentUpdateBatchPredictionInput(input, jsonEncoder.Value); err != nil { 1178 return out, metadata, &smithy.SerializationError{Err: err} 1179 } 1180 1181 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 1182 return out, metadata, &smithy.SerializationError{Err: err} 1183 } 1184 1185 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 1186 return out, metadata, &smithy.SerializationError{Err: err} 1187 } 1188 in.Request = request 1189 1190 return next.HandleSerialize(ctx, in) 1191} 1192 1193type awsAwsjson11_serializeOpUpdateDataSource struct { 1194} 1195 1196func (*awsAwsjson11_serializeOpUpdateDataSource) ID() string { 1197 return "OperationSerializer" 1198} 1199 1200func (m *awsAwsjson11_serializeOpUpdateDataSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1201 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1202) { 1203 request, ok := in.Request.(*smithyhttp.Request) 1204 if !ok { 1205 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1206 } 1207 1208 input, ok := in.Parameters.(*UpdateDataSourceInput) 1209 _ = input 1210 if !ok { 1211 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1212 } 1213 1214 request.Request.URL.Path = "/" 1215 request.Request.Method = "POST" 1216 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1217 if err != nil { 1218 return out, metadata, &smithy.SerializationError{Err: err} 1219 } 1220 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 1221 httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonML_20141212.UpdateDataSource") 1222 1223 jsonEncoder := smithyjson.NewEncoder() 1224 if err := awsAwsjson11_serializeOpDocumentUpdateDataSourceInput(input, jsonEncoder.Value); err != nil { 1225 return out, metadata, &smithy.SerializationError{Err: err} 1226 } 1227 1228 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 1229 return out, metadata, &smithy.SerializationError{Err: err} 1230 } 1231 1232 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 1233 return out, metadata, &smithy.SerializationError{Err: err} 1234 } 1235 in.Request = request 1236 1237 return next.HandleSerialize(ctx, in) 1238} 1239 1240type awsAwsjson11_serializeOpUpdateEvaluation struct { 1241} 1242 1243func (*awsAwsjson11_serializeOpUpdateEvaluation) ID() string { 1244 return "OperationSerializer" 1245} 1246 1247func (m *awsAwsjson11_serializeOpUpdateEvaluation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1248 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1249) { 1250 request, ok := in.Request.(*smithyhttp.Request) 1251 if !ok { 1252 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1253 } 1254 1255 input, ok := in.Parameters.(*UpdateEvaluationInput) 1256 _ = input 1257 if !ok { 1258 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1259 } 1260 1261 request.Request.URL.Path = "/" 1262 request.Request.Method = "POST" 1263 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1264 if err != nil { 1265 return out, metadata, &smithy.SerializationError{Err: err} 1266 } 1267 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 1268 httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonML_20141212.UpdateEvaluation") 1269 1270 jsonEncoder := smithyjson.NewEncoder() 1271 if err := awsAwsjson11_serializeOpDocumentUpdateEvaluationInput(input, jsonEncoder.Value); err != nil { 1272 return out, metadata, &smithy.SerializationError{Err: err} 1273 } 1274 1275 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 1276 return out, metadata, &smithy.SerializationError{Err: err} 1277 } 1278 1279 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 1280 return out, metadata, &smithy.SerializationError{Err: err} 1281 } 1282 in.Request = request 1283 1284 return next.HandleSerialize(ctx, in) 1285} 1286 1287type awsAwsjson11_serializeOpUpdateMLModel struct { 1288} 1289 1290func (*awsAwsjson11_serializeOpUpdateMLModel) ID() string { 1291 return "OperationSerializer" 1292} 1293 1294func (m *awsAwsjson11_serializeOpUpdateMLModel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( 1295 out middleware.SerializeOutput, metadata middleware.Metadata, err error, 1296) { 1297 request, ok := in.Request.(*smithyhttp.Request) 1298 if !ok { 1299 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} 1300 } 1301 1302 input, ok := in.Parameters.(*UpdateMLModelInput) 1303 _ = input 1304 if !ok { 1305 return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} 1306 } 1307 1308 request.Request.URL.Path = "/" 1309 request.Request.Method = "POST" 1310 httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) 1311 if err != nil { 1312 return out, metadata, &smithy.SerializationError{Err: err} 1313 } 1314 httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") 1315 httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonML_20141212.UpdateMLModel") 1316 1317 jsonEncoder := smithyjson.NewEncoder() 1318 if err := awsAwsjson11_serializeOpDocumentUpdateMLModelInput(input, jsonEncoder.Value); err != nil { 1319 return out, metadata, &smithy.SerializationError{Err: err} 1320 } 1321 1322 if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { 1323 return out, metadata, &smithy.SerializationError{Err: err} 1324 } 1325 1326 if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { 1327 return out, metadata, &smithy.SerializationError{Err: err} 1328 } 1329 in.Request = request 1330 1331 return next.HandleSerialize(ctx, in) 1332} 1333func awsAwsjson11_serializeDocumentEDPSecurityGroupIds(v []string, value smithyjson.Value) error { 1334 array := value.Array() 1335 defer array.Close() 1336 1337 for i := range v { 1338 av := array.Value() 1339 av.String(v[i]) 1340 } 1341 return nil 1342} 1343 1344func awsAwsjson11_serializeDocumentRDSDatabase(v *types.RDSDatabase, value smithyjson.Value) error { 1345 object := value.Object() 1346 defer object.Close() 1347 1348 if v.DatabaseName != nil { 1349 ok := object.Key("DatabaseName") 1350 ok.String(*v.DatabaseName) 1351 } 1352 1353 if v.InstanceIdentifier != nil { 1354 ok := object.Key("InstanceIdentifier") 1355 ok.String(*v.InstanceIdentifier) 1356 } 1357 1358 return nil 1359} 1360 1361func awsAwsjson11_serializeDocumentRDSDatabaseCredentials(v *types.RDSDatabaseCredentials, value smithyjson.Value) error { 1362 object := value.Object() 1363 defer object.Close() 1364 1365 if v.Password != nil { 1366 ok := object.Key("Password") 1367 ok.String(*v.Password) 1368 } 1369 1370 if v.Username != nil { 1371 ok := object.Key("Username") 1372 ok.String(*v.Username) 1373 } 1374 1375 return nil 1376} 1377 1378func awsAwsjson11_serializeDocumentRDSDataSpec(v *types.RDSDataSpec, value smithyjson.Value) error { 1379 object := value.Object() 1380 defer object.Close() 1381 1382 if v.DatabaseCredentials != nil { 1383 ok := object.Key("DatabaseCredentials") 1384 if err := awsAwsjson11_serializeDocumentRDSDatabaseCredentials(v.DatabaseCredentials, ok); err != nil { 1385 return err 1386 } 1387 } 1388 1389 if v.DatabaseInformation != nil { 1390 ok := object.Key("DatabaseInformation") 1391 if err := awsAwsjson11_serializeDocumentRDSDatabase(v.DatabaseInformation, ok); err != nil { 1392 return err 1393 } 1394 } 1395 1396 if v.DataRearrangement != nil { 1397 ok := object.Key("DataRearrangement") 1398 ok.String(*v.DataRearrangement) 1399 } 1400 1401 if v.DataSchema != nil { 1402 ok := object.Key("DataSchema") 1403 ok.String(*v.DataSchema) 1404 } 1405 1406 if v.DataSchemaUri != nil { 1407 ok := object.Key("DataSchemaUri") 1408 ok.String(*v.DataSchemaUri) 1409 } 1410 1411 if v.ResourceRole != nil { 1412 ok := object.Key("ResourceRole") 1413 ok.String(*v.ResourceRole) 1414 } 1415 1416 if v.S3StagingLocation != nil { 1417 ok := object.Key("S3StagingLocation") 1418 ok.String(*v.S3StagingLocation) 1419 } 1420 1421 if v.SecurityGroupIds != nil { 1422 ok := object.Key("SecurityGroupIds") 1423 if err := awsAwsjson11_serializeDocumentEDPSecurityGroupIds(v.SecurityGroupIds, ok); err != nil { 1424 return err 1425 } 1426 } 1427 1428 if v.SelectSqlQuery != nil { 1429 ok := object.Key("SelectSqlQuery") 1430 ok.String(*v.SelectSqlQuery) 1431 } 1432 1433 if v.ServiceRole != nil { 1434 ok := object.Key("ServiceRole") 1435 ok.String(*v.ServiceRole) 1436 } 1437 1438 if v.SubnetId != nil { 1439 ok := object.Key("SubnetId") 1440 ok.String(*v.SubnetId) 1441 } 1442 1443 return nil 1444} 1445 1446func awsAwsjson11_serializeDocumentRecord(v map[string]string, value smithyjson.Value) error { 1447 object := value.Object() 1448 defer object.Close() 1449 1450 for key := range v { 1451 om := object.Key(key) 1452 om.String(v[key]) 1453 } 1454 return nil 1455} 1456 1457func awsAwsjson11_serializeDocumentRedshiftDatabase(v *types.RedshiftDatabase, value smithyjson.Value) error { 1458 object := value.Object() 1459 defer object.Close() 1460 1461 if v.ClusterIdentifier != nil { 1462 ok := object.Key("ClusterIdentifier") 1463 ok.String(*v.ClusterIdentifier) 1464 } 1465 1466 if v.DatabaseName != nil { 1467 ok := object.Key("DatabaseName") 1468 ok.String(*v.DatabaseName) 1469 } 1470 1471 return nil 1472} 1473 1474func awsAwsjson11_serializeDocumentRedshiftDatabaseCredentials(v *types.RedshiftDatabaseCredentials, value smithyjson.Value) error { 1475 object := value.Object() 1476 defer object.Close() 1477 1478 if v.Password != nil { 1479 ok := object.Key("Password") 1480 ok.String(*v.Password) 1481 } 1482 1483 if v.Username != nil { 1484 ok := object.Key("Username") 1485 ok.String(*v.Username) 1486 } 1487 1488 return nil 1489} 1490 1491func awsAwsjson11_serializeDocumentRedshiftDataSpec(v *types.RedshiftDataSpec, value smithyjson.Value) error { 1492 object := value.Object() 1493 defer object.Close() 1494 1495 if v.DatabaseCredentials != nil { 1496 ok := object.Key("DatabaseCredentials") 1497 if err := awsAwsjson11_serializeDocumentRedshiftDatabaseCredentials(v.DatabaseCredentials, ok); err != nil { 1498 return err 1499 } 1500 } 1501 1502 if v.DatabaseInformation != nil { 1503 ok := object.Key("DatabaseInformation") 1504 if err := awsAwsjson11_serializeDocumentRedshiftDatabase(v.DatabaseInformation, ok); err != nil { 1505 return err 1506 } 1507 } 1508 1509 if v.DataRearrangement != nil { 1510 ok := object.Key("DataRearrangement") 1511 ok.String(*v.DataRearrangement) 1512 } 1513 1514 if v.DataSchema != nil { 1515 ok := object.Key("DataSchema") 1516 ok.String(*v.DataSchema) 1517 } 1518 1519 if v.DataSchemaUri != nil { 1520 ok := object.Key("DataSchemaUri") 1521 ok.String(*v.DataSchemaUri) 1522 } 1523 1524 if v.S3StagingLocation != nil { 1525 ok := object.Key("S3StagingLocation") 1526 ok.String(*v.S3StagingLocation) 1527 } 1528 1529 if v.SelectSqlQuery != nil { 1530 ok := object.Key("SelectSqlQuery") 1531 ok.String(*v.SelectSqlQuery) 1532 } 1533 1534 return nil 1535} 1536 1537func awsAwsjson11_serializeDocumentS3DataSpec(v *types.S3DataSpec, value smithyjson.Value) error { 1538 object := value.Object() 1539 defer object.Close() 1540 1541 if v.DataLocationS3 != nil { 1542 ok := object.Key("DataLocationS3") 1543 ok.String(*v.DataLocationS3) 1544 } 1545 1546 if v.DataRearrangement != nil { 1547 ok := object.Key("DataRearrangement") 1548 ok.String(*v.DataRearrangement) 1549 } 1550 1551 if v.DataSchema != nil { 1552 ok := object.Key("DataSchema") 1553 ok.String(*v.DataSchema) 1554 } 1555 1556 if v.DataSchemaLocationS3 != nil { 1557 ok := object.Key("DataSchemaLocationS3") 1558 ok.String(*v.DataSchemaLocationS3) 1559 } 1560 1561 return nil 1562} 1563 1564func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { 1565 object := value.Object() 1566 defer object.Close() 1567 1568 if v.Key != nil { 1569 ok := object.Key("Key") 1570 ok.String(*v.Key) 1571 } 1572 1573 if v.Value != nil { 1574 ok := object.Key("Value") 1575 ok.String(*v.Value) 1576 } 1577 1578 return nil 1579} 1580 1581func awsAwsjson11_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error { 1582 array := value.Array() 1583 defer array.Close() 1584 1585 for i := range v { 1586 av := array.Value() 1587 av.String(v[i]) 1588 } 1589 return nil 1590} 1591 1592func awsAwsjson11_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { 1593 array := value.Array() 1594 defer array.Close() 1595 1596 for i := range v { 1597 av := array.Value() 1598 if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { 1599 return err 1600 } 1601 } 1602 return nil 1603} 1604 1605func awsAwsjson11_serializeDocumentTrainingParameters(v map[string]string, value smithyjson.Value) error { 1606 object := value.Object() 1607 defer object.Close() 1608 1609 for key := range v { 1610 om := object.Key(key) 1611 om.String(v[key]) 1612 } 1613 return nil 1614} 1615 1616func awsAwsjson11_serializeOpDocumentAddTagsInput(v *AddTagsInput, value smithyjson.Value) error { 1617 object := value.Object() 1618 defer object.Close() 1619 1620 if v.ResourceId != nil { 1621 ok := object.Key("ResourceId") 1622 ok.String(*v.ResourceId) 1623 } 1624 1625 if len(v.ResourceType) > 0 { 1626 ok := object.Key("ResourceType") 1627 ok.String(string(v.ResourceType)) 1628 } 1629 1630 if v.Tags != nil { 1631 ok := object.Key("Tags") 1632 if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { 1633 return err 1634 } 1635 } 1636 1637 return nil 1638} 1639 1640func awsAwsjson11_serializeOpDocumentCreateBatchPredictionInput(v *CreateBatchPredictionInput, value smithyjson.Value) error { 1641 object := value.Object() 1642 defer object.Close() 1643 1644 if v.BatchPredictionDataSourceId != nil { 1645 ok := object.Key("BatchPredictionDataSourceId") 1646 ok.String(*v.BatchPredictionDataSourceId) 1647 } 1648 1649 if v.BatchPredictionId != nil { 1650 ok := object.Key("BatchPredictionId") 1651 ok.String(*v.BatchPredictionId) 1652 } 1653 1654 if v.BatchPredictionName != nil { 1655 ok := object.Key("BatchPredictionName") 1656 ok.String(*v.BatchPredictionName) 1657 } 1658 1659 if v.MLModelId != nil { 1660 ok := object.Key("MLModelId") 1661 ok.String(*v.MLModelId) 1662 } 1663 1664 if v.OutputUri != nil { 1665 ok := object.Key("OutputUri") 1666 ok.String(*v.OutputUri) 1667 } 1668 1669 return nil 1670} 1671 1672func awsAwsjson11_serializeOpDocumentCreateDataSourceFromRDSInput(v *CreateDataSourceFromRDSInput, value smithyjson.Value) error { 1673 object := value.Object() 1674 defer object.Close() 1675 1676 if v.ComputeStatistics { 1677 ok := object.Key("ComputeStatistics") 1678 ok.Boolean(v.ComputeStatistics) 1679 } 1680 1681 if v.DataSourceId != nil { 1682 ok := object.Key("DataSourceId") 1683 ok.String(*v.DataSourceId) 1684 } 1685 1686 if v.DataSourceName != nil { 1687 ok := object.Key("DataSourceName") 1688 ok.String(*v.DataSourceName) 1689 } 1690 1691 if v.RDSData != nil { 1692 ok := object.Key("RDSData") 1693 if err := awsAwsjson11_serializeDocumentRDSDataSpec(v.RDSData, ok); err != nil { 1694 return err 1695 } 1696 } 1697 1698 if v.RoleARN != nil { 1699 ok := object.Key("RoleARN") 1700 ok.String(*v.RoleARN) 1701 } 1702 1703 return nil 1704} 1705 1706func awsAwsjson11_serializeOpDocumentCreateDataSourceFromRedshiftInput(v *CreateDataSourceFromRedshiftInput, value smithyjson.Value) error { 1707 object := value.Object() 1708 defer object.Close() 1709 1710 if v.ComputeStatistics { 1711 ok := object.Key("ComputeStatistics") 1712 ok.Boolean(v.ComputeStatistics) 1713 } 1714 1715 if v.DataSourceId != nil { 1716 ok := object.Key("DataSourceId") 1717 ok.String(*v.DataSourceId) 1718 } 1719 1720 if v.DataSourceName != nil { 1721 ok := object.Key("DataSourceName") 1722 ok.String(*v.DataSourceName) 1723 } 1724 1725 if v.DataSpec != nil { 1726 ok := object.Key("DataSpec") 1727 if err := awsAwsjson11_serializeDocumentRedshiftDataSpec(v.DataSpec, ok); err != nil { 1728 return err 1729 } 1730 } 1731 1732 if v.RoleARN != nil { 1733 ok := object.Key("RoleARN") 1734 ok.String(*v.RoleARN) 1735 } 1736 1737 return nil 1738} 1739 1740func awsAwsjson11_serializeOpDocumentCreateDataSourceFromS3Input(v *CreateDataSourceFromS3Input, value smithyjson.Value) error { 1741 object := value.Object() 1742 defer object.Close() 1743 1744 if v.ComputeStatistics { 1745 ok := object.Key("ComputeStatistics") 1746 ok.Boolean(v.ComputeStatistics) 1747 } 1748 1749 if v.DataSourceId != nil { 1750 ok := object.Key("DataSourceId") 1751 ok.String(*v.DataSourceId) 1752 } 1753 1754 if v.DataSourceName != nil { 1755 ok := object.Key("DataSourceName") 1756 ok.String(*v.DataSourceName) 1757 } 1758 1759 if v.DataSpec != nil { 1760 ok := object.Key("DataSpec") 1761 if err := awsAwsjson11_serializeDocumentS3DataSpec(v.DataSpec, ok); err != nil { 1762 return err 1763 } 1764 } 1765 1766 return nil 1767} 1768 1769func awsAwsjson11_serializeOpDocumentCreateEvaluationInput(v *CreateEvaluationInput, value smithyjson.Value) error { 1770 object := value.Object() 1771 defer object.Close() 1772 1773 if v.EvaluationDataSourceId != nil { 1774 ok := object.Key("EvaluationDataSourceId") 1775 ok.String(*v.EvaluationDataSourceId) 1776 } 1777 1778 if v.EvaluationId != nil { 1779 ok := object.Key("EvaluationId") 1780 ok.String(*v.EvaluationId) 1781 } 1782 1783 if v.EvaluationName != nil { 1784 ok := object.Key("EvaluationName") 1785 ok.String(*v.EvaluationName) 1786 } 1787 1788 if v.MLModelId != nil { 1789 ok := object.Key("MLModelId") 1790 ok.String(*v.MLModelId) 1791 } 1792 1793 return nil 1794} 1795 1796func awsAwsjson11_serializeOpDocumentCreateMLModelInput(v *CreateMLModelInput, value smithyjson.Value) error { 1797 object := value.Object() 1798 defer object.Close() 1799 1800 if v.MLModelId != nil { 1801 ok := object.Key("MLModelId") 1802 ok.String(*v.MLModelId) 1803 } 1804 1805 if v.MLModelName != nil { 1806 ok := object.Key("MLModelName") 1807 ok.String(*v.MLModelName) 1808 } 1809 1810 if len(v.MLModelType) > 0 { 1811 ok := object.Key("MLModelType") 1812 ok.String(string(v.MLModelType)) 1813 } 1814 1815 if v.Parameters != nil { 1816 ok := object.Key("Parameters") 1817 if err := awsAwsjson11_serializeDocumentTrainingParameters(v.Parameters, ok); err != nil { 1818 return err 1819 } 1820 } 1821 1822 if v.Recipe != nil { 1823 ok := object.Key("Recipe") 1824 ok.String(*v.Recipe) 1825 } 1826 1827 if v.RecipeUri != nil { 1828 ok := object.Key("RecipeUri") 1829 ok.String(*v.RecipeUri) 1830 } 1831 1832 if v.TrainingDataSourceId != nil { 1833 ok := object.Key("TrainingDataSourceId") 1834 ok.String(*v.TrainingDataSourceId) 1835 } 1836 1837 return nil 1838} 1839 1840func awsAwsjson11_serializeOpDocumentCreateRealtimeEndpointInput(v *CreateRealtimeEndpointInput, value smithyjson.Value) error { 1841 object := value.Object() 1842 defer object.Close() 1843 1844 if v.MLModelId != nil { 1845 ok := object.Key("MLModelId") 1846 ok.String(*v.MLModelId) 1847 } 1848 1849 return nil 1850} 1851 1852func awsAwsjson11_serializeOpDocumentDeleteBatchPredictionInput(v *DeleteBatchPredictionInput, value smithyjson.Value) error { 1853 object := value.Object() 1854 defer object.Close() 1855 1856 if v.BatchPredictionId != nil { 1857 ok := object.Key("BatchPredictionId") 1858 ok.String(*v.BatchPredictionId) 1859 } 1860 1861 return nil 1862} 1863 1864func awsAwsjson11_serializeOpDocumentDeleteDataSourceInput(v *DeleteDataSourceInput, value smithyjson.Value) error { 1865 object := value.Object() 1866 defer object.Close() 1867 1868 if v.DataSourceId != nil { 1869 ok := object.Key("DataSourceId") 1870 ok.String(*v.DataSourceId) 1871 } 1872 1873 return nil 1874} 1875 1876func awsAwsjson11_serializeOpDocumentDeleteEvaluationInput(v *DeleteEvaluationInput, value smithyjson.Value) error { 1877 object := value.Object() 1878 defer object.Close() 1879 1880 if v.EvaluationId != nil { 1881 ok := object.Key("EvaluationId") 1882 ok.String(*v.EvaluationId) 1883 } 1884 1885 return nil 1886} 1887 1888func awsAwsjson11_serializeOpDocumentDeleteMLModelInput(v *DeleteMLModelInput, value smithyjson.Value) error { 1889 object := value.Object() 1890 defer object.Close() 1891 1892 if v.MLModelId != nil { 1893 ok := object.Key("MLModelId") 1894 ok.String(*v.MLModelId) 1895 } 1896 1897 return nil 1898} 1899 1900func awsAwsjson11_serializeOpDocumentDeleteRealtimeEndpointInput(v *DeleteRealtimeEndpointInput, value smithyjson.Value) error { 1901 object := value.Object() 1902 defer object.Close() 1903 1904 if v.MLModelId != nil { 1905 ok := object.Key("MLModelId") 1906 ok.String(*v.MLModelId) 1907 } 1908 1909 return nil 1910} 1911 1912func awsAwsjson11_serializeOpDocumentDeleteTagsInput(v *DeleteTagsInput, value smithyjson.Value) error { 1913 object := value.Object() 1914 defer object.Close() 1915 1916 if v.ResourceId != nil { 1917 ok := object.Key("ResourceId") 1918 ok.String(*v.ResourceId) 1919 } 1920 1921 if len(v.ResourceType) > 0 { 1922 ok := object.Key("ResourceType") 1923 ok.String(string(v.ResourceType)) 1924 } 1925 1926 if v.TagKeys != nil { 1927 ok := object.Key("TagKeys") 1928 if err := awsAwsjson11_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil { 1929 return err 1930 } 1931 } 1932 1933 return nil 1934} 1935 1936func awsAwsjson11_serializeOpDocumentDescribeBatchPredictionsInput(v *DescribeBatchPredictionsInput, value smithyjson.Value) error { 1937 object := value.Object() 1938 defer object.Close() 1939 1940 if v.EQ != nil { 1941 ok := object.Key("EQ") 1942 ok.String(*v.EQ) 1943 } 1944 1945 if len(v.FilterVariable) > 0 { 1946 ok := object.Key("FilterVariable") 1947 ok.String(string(v.FilterVariable)) 1948 } 1949 1950 if v.GE != nil { 1951 ok := object.Key("GE") 1952 ok.String(*v.GE) 1953 } 1954 1955 if v.GT != nil { 1956 ok := object.Key("GT") 1957 ok.String(*v.GT) 1958 } 1959 1960 if v.LE != nil { 1961 ok := object.Key("LE") 1962 ok.String(*v.LE) 1963 } 1964 1965 if v.Limit != nil { 1966 ok := object.Key("Limit") 1967 ok.Integer(*v.Limit) 1968 } 1969 1970 if v.LT != nil { 1971 ok := object.Key("LT") 1972 ok.String(*v.LT) 1973 } 1974 1975 if v.NE != nil { 1976 ok := object.Key("NE") 1977 ok.String(*v.NE) 1978 } 1979 1980 if v.NextToken != nil { 1981 ok := object.Key("NextToken") 1982 ok.String(*v.NextToken) 1983 } 1984 1985 if v.Prefix != nil { 1986 ok := object.Key("Prefix") 1987 ok.String(*v.Prefix) 1988 } 1989 1990 if len(v.SortOrder) > 0 { 1991 ok := object.Key("SortOrder") 1992 ok.String(string(v.SortOrder)) 1993 } 1994 1995 return nil 1996} 1997 1998func awsAwsjson11_serializeOpDocumentDescribeDataSourcesInput(v *DescribeDataSourcesInput, value smithyjson.Value) error { 1999 object := value.Object() 2000 defer object.Close() 2001 2002 if v.EQ != nil { 2003 ok := object.Key("EQ") 2004 ok.String(*v.EQ) 2005 } 2006 2007 if len(v.FilterVariable) > 0 { 2008 ok := object.Key("FilterVariable") 2009 ok.String(string(v.FilterVariable)) 2010 } 2011 2012 if v.GE != nil { 2013 ok := object.Key("GE") 2014 ok.String(*v.GE) 2015 } 2016 2017 if v.GT != nil { 2018 ok := object.Key("GT") 2019 ok.String(*v.GT) 2020 } 2021 2022 if v.LE != nil { 2023 ok := object.Key("LE") 2024 ok.String(*v.LE) 2025 } 2026 2027 if v.Limit != nil { 2028 ok := object.Key("Limit") 2029 ok.Integer(*v.Limit) 2030 } 2031 2032 if v.LT != nil { 2033 ok := object.Key("LT") 2034 ok.String(*v.LT) 2035 } 2036 2037 if v.NE != nil { 2038 ok := object.Key("NE") 2039 ok.String(*v.NE) 2040 } 2041 2042 if v.NextToken != nil { 2043 ok := object.Key("NextToken") 2044 ok.String(*v.NextToken) 2045 } 2046 2047 if v.Prefix != nil { 2048 ok := object.Key("Prefix") 2049 ok.String(*v.Prefix) 2050 } 2051 2052 if len(v.SortOrder) > 0 { 2053 ok := object.Key("SortOrder") 2054 ok.String(string(v.SortOrder)) 2055 } 2056 2057 return nil 2058} 2059 2060func awsAwsjson11_serializeOpDocumentDescribeEvaluationsInput(v *DescribeEvaluationsInput, value smithyjson.Value) error { 2061 object := value.Object() 2062 defer object.Close() 2063 2064 if v.EQ != nil { 2065 ok := object.Key("EQ") 2066 ok.String(*v.EQ) 2067 } 2068 2069 if len(v.FilterVariable) > 0 { 2070 ok := object.Key("FilterVariable") 2071 ok.String(string(v.FilterVariable)) 2072 } 2073 2074 if v.GE != nil { 2075 ok := object.Key("GE") 2076 ok.String(*v.GE) 2077 } 2078 2079 if v.GT != nil { 2080 ok := object.Key("GT") 2081 ok.String(*v.GT) 2082 } 2083 2084 if v.LE != nil { 2085 ok := object.Key("LE") 2086 ok.String(*v.LE) 2087 } 2088 2089 if v.Limit != nil { 2090 ok := object.Key("Limit") 2091 ok.Integer(*v.Limit) 2092 } 2093 2094 if v.LT != nil { 2095 ok := object.Key("LT") 2096 ok.String(*v.LT) 2097 } 2098 2099 if v.NE != nil { 2100 ok := object.Key("NE") 2101 ok.String(*v.NE) 2102 } 2103 2104 if v.NextToken != nil { 2105 ok := object.Key("NextToken") 2106 ok.String(*v.NextToken) 2107 } 2108 2109 if v.Prefix != nil { 2110 ok := object.Key("Prefix") 2111 ok.String(*v.Prefix) 2112 } 2113 2114 if len(v.SortOrder) > 0 { 2115 ok := object.Key("SortOrder") 2116 ok.String(string(v.SortOrder)) 2117 } 2118 2119 return nil 2120} 2121 2122func awsAwsjson11_serializeOpDocumentDescribeMLModelsInput(v *DescribeMLModelsInput, value smithyjson.Value) error { 2123 object := value.Object() 2124 defer object.Close() 2125 2126 if v.EQ != nil { 2127 ok := object.Key("EQ") 2128 ok.String(*v.EQ) 2129 } 2130 2131 if len(v.FilterVariable) > 0 { 2132 ok := object.Key("FilterVariable") 2133 ok.String(string(v.FilterVariable)) 2134 } 2135 2136 if v.GE != nil { 2137 ok := object.Key("GE") 2138 ok.String(*v.GE) 2139 } 2140 2141 if v.GT != nil { 2142 ok := object.Key("GT") 2143 ok.String(*v.GT) 2144 } 2145 2146 if v.LE != nil { 2147 ok := object.Key("LE") 2148 ok.String(*v.LE) 2149 } 2150 2151 if v.Limit != nil { 2152 ok := object.Key("Limit") 2153 ok.Integer(*v.Limit) 2154 } 2155 2156 if v.LT != nil { 2157 ok := object.Key("LT") 2158 ok.String(*v.LT) 2159 } 2160 2161 if v.NE != nil { 2162 ok := object.Key("NE") 2163 ok.String(*v.NE) 2164 } 2165 2166 if v.NextToken != nil { 2167 ok := object.Key("NextToken") 2168 ok.String(*v.NextToken) 2169 } 2170 2171 if v.Prefix != nil { 2172 ok := object.Key("Prefix") 2173 ok.String(*v.Prefix) 2174 } 2175 2176 if len(v.SortOrder) > 0 { 2177 ok := object.Key("SortOrder") 2178 ok.String(string(v.SortOrder)) 2179 } 2180 2181 return nil 2182} 2183 2184func awsAwsjson11_serializeOpDocumentDescribeTagsInput(v *DescribeTagsInput, value smithyjson.Value) error { 2185 object := value.Object() 2186 defer object.Close() 2187 2188 if v.ResourceId != nil { 2189 ok := object.Key("ResourceId") 2190 ok.String(*v.ResourceId) 2191 } 2192 2193 if len(v.ResourceType) > 0 { 2194 ok := object.Key("ResourceType") 2195 ok.String(string(v.ResourceType)) 2196 } 2197 2198 return nil 2199} 2200 2201func awsAwsjson11_serializeOpDocumentGetBatchPredictionInput(v *GetBatchPredictionInput, value smithyjson.Value) error { 2202 object := value.Object() 2203 defer object.Close() 2204 2205 if v.BatchPredictionId != nil { 2206 ok := object.Key("BatchPredictionId") 2207 ok.String(*v.BatchPredictionId) 2208 } 2209 2210 return nil 2211} 2212 2213func awsAwsjson11_serializeOpDocumentGetDataSourceInput(v *GetDataSourceInput, value smithyjson.Value) error { 2214 object := value.Object() 2215 defer object.Close() 2216 2217 if v.DataSourceId != nil { 2218 ok := object.Key("DataSourceId") 2219 ok.String(*v.DataSourceId) 2220 } 2221 2222 if v.Verbose { 2223 ok := object.Key("Verbose") 2224 ok.Boolean(v.Verbose) 2225 } 2226 2227 return nil 2228} 2229 2230func awsAwsjson11_serializeOpDocumentGetEvaluationInput(v *GetEvaluationInput, value smithyjson.Value) error { 2231 object := value.Object() 2232 defer object.Close() 2233 2234 if v.EvaluationId != nil { 2235 ok := object.Key("EvaluationId") 2236 ok.String(*v.EvaluationId) 2237 } 2238 2239 return nil 2240} 2241 2242func awsAwsjson11_serializeOpDocumentGetMLModelInput(v *GetMLModelInput, value smithyjson.Value) error { 2243 object := value.Object() 2244 defer object.Close() 2245 2246 if v.MLModelId != nil { 2247 ok := object.Key("MLModelId") 2248 ok.String(*v.MLModelId) 2249 } 2250 2251 if v.Verbose { 2252 ok := object.Key("Verbose") 2253 ok.Boolean(v.Verbose) 2254 } 2255 2256 return nil 2257} 2258 2259func awsAwsjson11_serializeOpDocumentPredictInput(v *PredictInput, value smithyjson.Value) error { 2260 object := value.Object() 2261 defer object.Close() 2262 2263 if v.MLModelId != nil { 2264 ok := object.Key("MLModelId") 2265 ok.String(*v.MLModelId) 2266 } 2267 2268 if v.PredictEndpoint != nil { 2269 ok := object.Key("PredictEndpoint") 2270 ok.String(*v.PredictEndpoint) 2271 } 2272 2273 if v.Record != nil { 2274 ok := object.Key("Record") 2275 if err := awsAwsjson11_serializeDocumentRecord(v.Record, ok); err != nil { 2276 return err 2277 } 2278 } 2279 2280 return nil 2281} 2282 2283func awsAwsjson11_serializeOpDocumentUpdateBatchPredictionInput(v *UpdateBatchPredictionInput, value smithyjson.Value) error { 2284 object := value.Object() 2285 defer object.Close() 2286 2287 if v.BatchPredictionId != nil { 2288 ok := object.Key("BatchPredictionId") 2289 ok.String(*v.BatchPredictionId) 2290 } 2291 2292 if v.BatchPredictionName != nil { 2293 ok := object.Key("BatchPredictionName") 2294 ok.String(*v.BatchPredictionName) 2295 } 2296 2297 return nil 2298} 2299 2300func awsAwsjson11_serializeOpDocumentUpdateDataSourceInput(v *UpdateDataSourceInput, value smithyjson.Value) error { 2301 object := value.Object() 2302 defer object.Close() 2303 2304 if v.DataSourceId != nil { 2305 ok := object.Key("DataSourceId") 2306 ok.String(*v.DataSourceId) 2307 } 2308 2309 if v.DataSourceName != nil { 2310 ok := object.Key("DataSourceName") 2311 ok.String(*v.DataSourceName) 2312 } 2313 2314 return nil 2315} 2316 2317func awsAwsjson11_serializeOpDocumentUpdateEvaluationInput(v *UpdateEvaluationInput, value smithyjson.Value) error { 2318 object := value.Object() 2319 defer object.Close() 2320 2321 if v.EvaluationId != nil { 2322 ok := object.Key("EvaluationId") 2323 ok.String(*v.EvaluationId) 2324 } 2325 2326 if v.EvaluationName != nil { 2327 ok := object.Key("EvaluationName") 2328 ok.String(*v.EvaluationName) 2329 } 2330 2331 return nil 2332} 2333 2334func awsAwsjson11_serializeOpDocumentUpdateMLModelInput(v *UpdateMLModelInput, value smithyjson.Value) error { 2335 object := value.Object() 2336 defer object.Close() 2337 2338 if v.MLModelId != nil { 2339 ok := object.Key("MLModelId") 2340 ok.String(*v.MLModelId) 2341 } 2342 2343 if v.MLModelName != nil { 2344 ok := object.Key("MLModelName") 2345 ok.String(*v.MLModelName) 2346 } 2347 2348 if v.ScoreThreshold != nil { 2349 ok := object.Key("ScoreThreshold") 2350 switch { 2351 case math.IsNaN(float64(*v.ScoreThreshold)): 2352 ok.String("NaN") 2353 2354 case math.IsInf(float64(*v.ScoreThreshold), 1): 2355 ok.String("Infinity") 2356 2357 case math.IsInf(float64(*v.ScoreThreshold), -1): 2358 ok.String("-Infinity") 2359 2360 default: 2361 ok.Float(*v.ScoreThreshold) 2362 2363 } 2364 } 2365 2366 return nil 2367} 2368