1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package transfer 4 5import ( 6 "bytes" 7 "context" 8 "fmt" 9 "github.com/aws/aws-sdk-go-v2/service/transfer/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_serializeOpCreateServer struct { 18} 19 20func (*awsAwsjson11_serializeOpCreateServer) ID() string { 21 return "OperationSerializer" 22} 23 24func (m *awsAwsjson11_serializeOpCreateServer) 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.(*CreateServerInput) 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("TransferService.CreateServer") 46 47 jsonEncoder := smithyjson.NewEncoder() 48 if err := awsAwsjson11_serializeOpDocumentCreateServerInput(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_serializeOpCreateUser struct { 65} 66 67func (*awsAwsjson11_serializeOpCreateUser) ID() string { 68 return "OperationSerializer" 69} 70 71func (m *awsAwsjson11_serializeOpCreateUser) 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.(*CreateUserInput) 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("TransferService.CreateUser") 93 94 jsonEncoder := smithyjson.NewEncoder() 95 if err := awsAwsjson11_serializeOpDocumentCreateUserInput(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_serializeOpDeleteServer struct { 112} 113 114func (*awsAwsjson11_serializeOpDeleteServer) ID() string { 115 return "OperationSerializer" 116} 117 118func (m *awsAwsjson11_serializeOpDeleteServer) 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.(*DeleteServerInput) 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("TransferService.DeleteServer") 140 141 jsonEncoder := smithyjson.NewEncoder() 142 if err := awsAwsjson11_serializeOpDocumentDeleteServerInput(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_serializeOpDeleteSshPublicKey struct { 159} 160 161func (*awsAwsjson11_serializeOpDeleteSshPublicKey) ID() string { 162 return "OperationSerializer" 163} 164 165func (m *awsAwsjson11_serializeOpDeleteSshPublicKey) 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.(*DeleteSshPublicKeyInput) 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("TransferService.DeleteSshPublicKey") 187 188 jsonEncoder := smithyjson.NewEncoder() 189 if err := awsAwsjson11_serializeOpDocumentDeleteSshPublicKeyInput(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_serializeOpDeleteUser struct { 206} 207 208func (*awsAwsjson11_serializeOpDeleteUser) ID() string { 209 return "OperationSerializer" 210} 211 212func (m *awsAwsjson11_serializeOpDeleteUser) 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.(*DeleteUserInput) 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("TransferService.DeleteUser") 234 235 jsonEncoder := smithyjson.NewEncoder() 236 if err := awsAwsjson11_serializeOpDocumentDeleteUserInput(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_serializeOpDescribeSecurityPolicy struct { 253} 254 255func (*awsAwsjson11_serializeOpDescribeSecurityPolicy) ID() string { 256 return "OperationSerializer" 257} 258 259func (m *awsAwsjson11_serializeOpDescribeSecurityPolicy) 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.(*DescribeSecurityPolicyInput) 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("TransferService.DescribeSecurityPolicy") 281 282 jsonEncoder := smithyjson.NewEncoder() 283 if err := awsAwsjson11_serializeOpDocumentDescribeSecurityPolicyInput(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_serializeOpDescribeServer struct { 300} 301 302func (*awsAwsjson11_serializeOpDescribeServer) ID() string { 303 return "OperationSerializer" 304} 305 306func (m *awsAwsjson11_serializeOpDescribeServer) 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.(*DescribeServerInput) 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("TransferService.DescribeServer") 328 329 jsonEncoder := smithyjson.NewEncoder() 330 if err := awsAwsjson11_serializeOpDocumentDescribeServerInput(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_serializeOpDescribeUser struct { 347} 348 349func (*awsAwsjson11_serializeOpDescribeUser) ID() string { 350 return "OperationSerializer" 351} 352 353func (m *awsAwsjson11_serializeOpDescribeUser) 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.(*DescribeUserInput) 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("TransferService.DescribeUser") 375 376 jsonEncoder := smithyjson.NewEncoder() 377 if err := awsAwsjson11_serializeOpDocumentDescribeUserInput(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_serializeOpImportSshPublicKey struct { 394} 395 396func (*awsAwsjson11_serializeOpImportSshPublicKey) ID() string { 397 return "OperationSerializer" 398} 399 400func (m *awsAwsjson11_serializeOpImportSshPublicKey) 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.(*ImportSshPublicKeyInput) 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("TransferService.ImportSshPublicKey") 422 423 jsonEncoder := smithyjson.NewEncoder() 424 if err := awsAwsjson11_serializeOpDocumentImportSshPublicKeyInput(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_serializeOpListSecurityPolicies struct { 441} 442 443func (*awsAwsjson11_serializeOpListSecurityPolicies) ID() string { 444 return "OperationSerializer" 445} 446 447func (m *awsAwsjson11_serializeOpListSecurityPolicies) 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.(*ListSecurityPoliciesInput) 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("TransferService.ListSecurityPolicies") 469 470 jsonEncoder := smithyjson.NewEncoder() 471 if err := awsAwsjson11_serializeOpDocumentListSecurityPoliciesInput(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_serializeOpListServers struct { 488} 489 490func (*awsAwsjson11_serializeOpListServers) ID() string { 491 return "OperationSerializer" 492} 493 494func (m *awsAwsjson11_serializeOpListServers) 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.(*ListServersInput) 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("TransferService.ListServers") 516 517 jsonEncoder := smithyjson.NewEncoder() 518 if err := awsAwsjson11_serializeOpDocumentListServersInput(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_serializeOpListTagsForResource struct { 535} 536 537func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { 538 return "OperationSerializer" 539} 540 541func (m *awsAwsjson11_serializeOpListTagsForResource) 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.(*ListTagsForResourceInput) 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("TransferService.ListTagsForResource") 563 564 jsonEncoder := smithyjson.NewEncoder() 565 if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(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_serializeOpListUsers struct { 582} 583 584func (*awsAwsjson11_serializeOpListUsers) ID() string { 585 return "OperationSerializer" 586} 587 588func (m *awsAwsjson11_serializeOpListUsers) 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.(*ListUsersInput) 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("TransferService.ListUsers") 610 611 jsonEncoder := smithyjson.NewEncoder() 612 if err := awsAwsjson11_serializeOpDocumentListUsersInput(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_serializeOpStartServer struct { 629} 630 631func (*awsAwsjson11_serializeOpStartServer) ID() string { 632 return "OperationSerializer" 633} 634 635func (m *awsAwsjson11_serializeOpStartServer) 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.(*StartServerInput) 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("TransferService.StartServer") 657 658 jsonEncoder := smithyjson.NewEncoder() 659 if err := awsAwsjson11_serializeOpDocumentStartServerInput(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_serializeOpStopServer struct { 676} 677 678func (*awsAwsjson11_serializeOpStopServer) ID() string { 679 return "OperationSerializer" 680} 681 682func (m *awsAwsjson11_serializeOpStopServer) 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.(*StopServerInput) 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("TransferService.StopServer") 704 705 jsonEncoder := smithyjson.NewEncoder() 706 if err := awsAwsjson11_serializeOpDocumentStopServerInput(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_serializeOpTagResource struct { 723} 724 725func (*awsAwsjson11_serializeOpTagResource) ID() string { 726 return "OperationSerializer" 727} 728 729func (m *awsAwsjson11_serializeOpTagResource) 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.(*TagResourceInput) 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("TransferService.TagResource") 751 752 jsonEncoder := smithyjson.NewEncoder() 753 if err := awsAwsjson11_serializeOpDocumentTagResourceInput(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_serializeOpTestIdentityProvider struct { 770} 771 772func (*awsAwsjson11_serializeOpTestIdentityProvider) ID() string { 773 return "OperationSerializer" 774} 775 776func (m *awsAwsjson11_serializeOpTestIdentityProvider) 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.(*TestIdentityProviderInput) 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("TransferService.TestIdentityProvider") 798 799 jsonEncoder := smithyjson.NewEncoder() 800 if err := awsAwsjson11_serializeOpDocumentTestIdentityProviderInput(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_serializeOpUntagResource struct { 817} 818 819func (*awsAwsjson11_serializeOpUntagResource) ID() string { 820 return "OperationSerializer" 821} 822 823func (m *awsAwsjson11_serializeOpUntagResource) 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.(*UntagResourceInput) 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("TransferService.UntagResource") 845 846 jsonEncoder := smithyjson.NewEncoder() 847 if err := awsAwsjson11_serializeOpDocumentUntagResourceInput(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_serializeOpUpdateServer struct { 864} 865 866func (*awsAwsjson11_serializeOpUpdateServer) ID() string { 867 return "OperationSerializer" 868} 869 870func (m *awsAwsjson11_serializeOpUpdateServer) 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.(*UpdateServerInput) 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("TransferService.UpdateServer") 892 893 jsonEncoder := smithyjson.NewEncoder() 894 if err := awsAwsjson11_serializeOpDocumentUpdateServerInput(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_serializeOpUpdateUser struct { 911} 912 913func (*awsAwsjson11_serializeOpUpdateUser) ID() string { 914 return "OperationSerializer" 915} 916 917func (m *awsAwsjson11_serializeOpUpdateUser) 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.(*UpdateUserInput) 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("TransferService.UpdateUser") 939 940 jsonEncoder := smithyjson.NewEncoder() 941 if err := awsAwsjson11_serializeOpDocumentUpdateUserInput(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} 956func awsAwsjson11_serializeDocumentAddressAllocationIds(v []string, value smithyjson.Value) error { 957 array := value.Array() 958 defer array.Close() 959 960 for i := range v { 961 av := array.Value() 962 av.String(v[i]) 963 } 964 return nil 965} 966 967func awsAwsjson11_serializeDocumentEndpointDetails(v *types.EndpointDetails, value smithyjson.Value) error { 968 object := value.Object() 969 defer object.Close() 970 971 if v.AddressAllocationIds != nil { 972 ok := object.Key("AddressAllocationIds") 973 if err := awsAwsjson11_serializeDocumentAddressAllocationIds(v.AddressAllocationIds, ok); err != nil { 974 return err 975 } 976 } 977 978 if v.SecurityGroupIds != nil { 979 ok := object.Key("SecurityGroupIds") 980 if err := awsAwsjson11_serializeDocumentSecurityGroupIds(v.SecurityGroupIds, ok); err != nil { 981 return err 982 } 983 } 984 985 if v.SubnetIds != nil { 986 ok := object.Key("SubnetIds") 987 if err := awsAwsjson11_serializeDocumentSubnetIds(v.SubnetIds, ok); err != nil { 988 return err 989 } 990 } 991 992 if v.VpcEndpointId != nil { 993 ok := object.Key("VpcEndpointId") 994 ok.String(*v.VpcEndpointId) 995 } 996 997 if v.VpcId != nil { 998 ok := object.Key("VpcId") 999 ok.String(*v.VpcId) 1000 } 1001 1002 return nil 1003} 1004 1005func awsAwsjson11_serializeDocumentHomeDirectoryMapEntry(v *types.HomeDirectoryMapEntry, value smithyjson.Value) error { 1006 object := value.Object() 1007 defer object.Close() 1008 1009 if v.Entry != nil { 1010 ok := object.Key("Entry") 1011 ok.String(*v.Entry) 1012 } 1013 1014 if v.Target != nil { 1015 ok := object.Key("Target") 1016 ok.String(*v.Target) 1017 } 1018 1019 return nil 1020} 1021 1022func awsAwsjson11_serializeDocumentHomeDirectoryMappings(v []types.HomeDirectoryMapEntry, value smithyjson.Value) error { 1023 array := value.Array() 1024 defer array.Close() 1025 1026 for i := range v { 1027 av := array.Value() 1028 if err := awsAwsjson11_serializeDocumentHomeDirectoryMapEntry(&v[i], av); err != nil { 1029 return err 1030 } 1031 } 1032 return nil 1033} 1034 1035func awsAwsjson11_serializeDocumentIdentityProviderDetails(v *types.IdentityProviderDetails, value smithyjson.Value) error { 1036 object := value.Object() 1037 defer object.Close() 1038 1039 if v.InvocationRole != nil { 1040 ok := object.Key("InvocationRole") 1041 ok.String(*v.InvocationRole) 1042 } 1043 1044 if v.Url != nil { 1045 ok := object.Key("Url") 1046 ok.String(*v.Url) 1047 } 1048 1049 return nil 1050} 1051 1052func awsAwsjson11_serializeDocumentPosixProfile(v *types.PosixProfile, value smithyjson.Value) error { 1053 object := value.Object() 1054 defer object.Close() 1055 1056 if v.Gid != nil { 1057 ok := object.Key("Gid") 1058 ok.Long(*v.Gid) 1059 } 1060 1061 if v.SecondaryGids != nil { 1062 ok := object.Key("SecondaryGids") 1063 if err := awsAwsjson11_serializeDocumentSecondaryGids(v.SecondaryGids, ok); err != nil { 1064 return err 1065 } 1066 } 1067 1068 if v.Uid != nil { 1069 ok := object.Key("Uid") 1070 ok.Long(*v.Uid) 1071 } 1072 1073 return nil 1074} 1075 1076func awsAwsjson11_serializeDocumentProtocols(v []types.Protocol, value smithyjson.Value) error { 1077 array := value.Array() 1078 defer array.Close() 1079 1080 for i := range v { 1081 av := array.Value() 1082 av.String(string(v[i])) 1083 } 1084 return nil 1085} 1086 1087func awsAwsjson11_serializeDocumentSecondaryGids(v []int64, value smithyjson.Value) error { 1088 array := value.Array() 1089 defer array.Close() 1090 1091 for i := range v { 1092 av := array.Value() 1093 av.Long(v[i]) 1094 } 1095 return nil 1096} 1097 1098func awsAwsjson11_serializeDocumentSecurityGroupIds(v []string, value smithyjson.Value) error { 1099 array := value.Array() 1100 defer array.Close() 1101 1102 for i := range v { 1103 av := array.Value() 1104 av.String(v[i]) 1105 } 1106 return nil 1107} 1108 1109func awsAwsjson11_serializeDocumentSubnetIds(v []string, value smithyjson.Value) error { 1110 array := value.Array() 1111 defer array.Close() 1112 1113 for i := range v { 1114 av := array.Value() 1115 av.String(v[i]) 1116 } 1117 return nil 1118} 1119 1120func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { 1121 object := value.Object() 1122 defer object.Close() 1123 1124 if v.Key != nil { 1125 ok := object.Key("Key") 1126 ok.String(*v.Key) 1127 } 1128 1129 if v.Value != nil { 1130 ok := object.Key("Value") 1131 ok.String(*v.Value) 1132 } 1133 1134 return nil 1135} 1136 1137func awsAwsjson11_serializeDocumentTagKeys(v []string, value smithyjson.Value) error { 1138 array := value.Array() 1139 defer array.Close() 1140 1141 for i := range v { 1142 av := array.Value() 1143 av.String(v[i]) 1144 } 1145 return nil 1146} 1147 1148func awsAwsjson11_serializeDocumentTags(v []types.Tag, value smithyjson.Value) error { 1149 array := value.Array() 1150 defer array.Close() 1151 1152 for i := range v { 1153 av := array.Value() 1154 if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { 1155 return err 1156 } 1157 } 1158 return nil 1159} 1160 1161func awsAwsjson11_serializeOpDocumentCreateServerInput(v *CreateServerInput, value smithyjson.Value) error { 1162 object := value.Object() 1163 defer object.Close() 1164 1165 if v.Certificate != nil { 1166 ok := object.Key("Certificate") 1167 ok.String(*v.Certificate) 1168 } 1169 1170 if len(v.Domain) > 0 { 1171 ok := object.Key("Domain") 1172 ok.String(string(v.Domain)) 1173 } 1174 1175 if v.EndpointDetails != nil { 1176 ok := object.Key("EndpointDetails") 1177 if err := awsAwsjson11_serializeDocumentEndpointDetails(v.EndpointDetails, ok); err != nil { 1178 return err 1179 } 1180 } 1181 1182 if len(v.EndpointType) > 0 { 1183 ok := object.Key("EndpointType") 1184 ok.String(string(v.EndpointType)) 1185 } 1186 1187 if v.HostKey != nil { 1188 ok := object.Key("HostKey") 1189 ok.String(*v.HostKey) 1190 } 1191 1192 if v.IdentityProviderDetails != nil { 1193 ok := object.Key("IdentityProviderDetails") 1194 if err := awsAwsjson11_serializeDocumentIdentityProviderDetails(v.IdentityProviderDetails, ok); err != nil { 1195 return err 1196 } 1197 } 1198 1199 if len(v.IdentityProviderType) > 0 { 1200 ok := object.Key("IdentityProviderType") 1201 ok.String(string(v.IdentityProviderType)) 1202 } 1203 1204 if v.LoggingRole != nil { 1205 ok := object.Key("LoggingRole") 1206 ok.String(*v.LoggingRole) 1207 } 1208 1209 if v.Protocols != nil { 1210 ok := object.Key("Protocols") 1211 if err := awsAwsjson11_serializeDocumentProtocols(v.Protocols, ok); err != nil { 1212 return err 1213 } 1214 } 1215 1216 if v.SecurityPolicyName != nil { 1217 ok := object.Key("SecurityPolicyName") 1218 ok.String(*v.SecurityPolicyName) 1219 } 1220 1221 if v.Tags != nil { 1222 ok := object.Key("Tags") 1223 if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { 1224 return err 1225 } 1226 } 1227 1228 return nil 1229} 1230 1231func awsAwsjson11_serializeOpDocumentCreateUserInput(v *CreateUserInput, value smithyjson.Value) error { 1232 object := value.Object() 1233 defer object.Close() 1234 1235 if v.HomeDirectory != nil { 1236 ok := object.Key("HomeDirectory") 1237 ok.String(*v.HomeDirectory) 1238 } 1239 1240 if v.HomeDirectoryMappings != nil { 1241 ok := object.Key("HomeDirectoryMappings") 1242 if err := awsAwsjson11_serializeDocumentHomeDirectoryMappings(v.HomeDirectoryMappings, ok); err != nil { 1243 return err 1244 } 1245 } 1246 1247 if len(v.HomeDirectoryType) > 0 { 1248 ok := object.Key("HomeDirectoryType") 1249 ok.String(string(v.HomeDirectoryType)) 1250 } 1251 1252 if v.Policy != nil { 1253 ok := object.Key("Policy") 1254 ok.String(*v.Policy) 1255 } 1256 1257 if v.PosixProfile != nil { 1258 ok := object.Key("PosixProfile") 1259 if err := awsAwsjson11_serializeDocumentPosixProfile(v.PosixProfile, ok); err != nil { 1260 return err 1261 } 1262 } 1263 1264 if v.Role != nil { 1265 ok := object.Key("Role") 1266 ok.String(*v.Role) 1267 } 1268 1269 if v.ServerId != nil { 1270 ok := object.Key("ServerId") 1271 ok.String(*v.ServerId) 1272 } 1273 1274 if v.SshPublicKeyBody != nil { 1275 ok := object.Key("SshPublicKeyBody") 1276 ok.String(*v.SshPublicKeyBody) 1277 } 1278 1279 if v.Tags != nil { 1280 ok := object.Key("Tags") 1281 if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { 1282 return err 1283 } 1284 } 1285 1286 if v.UserName != nil { 1287 ok := object.Key("UserName") 1288 ok.String(*v.UserName) 1289 } 1290 1291 return nil 1292} 1293 1294func awsAwsjson11_serializeOpDocumentDeleteServerInput(v *DeleteServerInput, value smithyjson.Value) error { 1295 object := value.Object() 1296 defer object.Close() 1297 1298 if v.ServerId != nil { 1299 ok := object.Key("ServerId") 1300 ok.String(*v.ServerId) 1301 } 1302 1303 return nil 1304} 1305 1306func awsAwsjson11_serializeOpDocumentDeleteSshPublicKeyInput(v *DeleteSshPublicKeyInput, value smithyjson.Value) error { 1307 object := value.Object() 1308 defer object.Close() 1309 1310 if v.ServerId != nil { 1311 ok := object.Key("ServerId") 1312 ok.String(*v.ServerId) 1313 } 1314 1315 if v.SshPublicKeyId != nil { 1316 ok := object.Key("SshPublicKeyId") 1317 ok.String(*v.SshPublicKeyId) 1318 } 1319 1320 if v.UserName != nil { 1321 ok := object.Key("UserName") 1322 ok.String(*v.UserName) 1323 } 1324 1325 return nil 1326} 1327 1328func awsAwsjson11_serializeOpDocumentDeleteUserInput(v *DeleteUserInput, value smithyjson.Value) error { 1329 object := value.Object() 1330 defer object.Close() 1331 1332 if v.ServerId != nil { 1333 ok := object.Key("ServerId") 1334 ok.String(*v.ServerId) 1335 } 1336 1337 if v.UserName != nil { 1338 ok := object.Key("UserName") 1339 ok.String(*v.UserName) 1340 } 1341 1342 return nil 1343} 1344 1345func awsAwsjson11_serializeOpDocumentDescribeSecurityPolicyInput(v *DescribeSecurityPolicyInput, value smithyjson.Value) error { 1346 object := value.Object() 1347 defer object.Close() 1348 1349 if v.SecurityPolicyName != nil { 1350 ok := object.Key("SecurityPolicyName") 1351 ok.String(*v.SecurityPolicyName) 1352 } 1353 1354 return nil 1355} 1356 1357func awsAwsjson11_serializeOpDocumentDescribeServerInput(v *DescribeServerInput, value smithyjson.Value) error { 1358 object := value.Object() 1359 defer object.Close() 1360 1361 if v.ServerId != nil { 1362 ok := object.Key("ServerId") 1363 ok.String(*v.ServerId) 1364 } 1365 1366 return nil 1367} 1368 1369func awsAwsjson11_serializeOpDocumentDescribeUserInput(v *DescribeUserInput, value smithyjson.Value) error { 1370 object := value.Object() 1371 defer object.Close() 1372 1373 if v.ServerId != nil { 1374 ok := object.Key("ServerId") 1375 ok.String(*v.ServerId) 1376 } 1377 1378 if v.UserName != nil { 1379 ok := object.Key("UserName") 1380 ok.String(*v.UserName) 1381 } 1382 1383 return nil 1384} 1385 1386func awsAwsjson11_serializeOpDocumentImportSshPublicKeyInput(v *ImportSshPublicKeyInput, value smithyjson.Value) error { 1387 object := value.Object() 1388 defer object.Close() 1389 1390 if v.ServerId != nil { 1391 ok := object.Key("ServerId") 1392 ok.String(*v.ServerId) 1393 } 1394 1395 if v.SshPublicKeyBody != nil { 1396 ok := object.Key("SshPublicKeyBody") 1397 ok.String(*v.SshPublicKeyBody) 1398 } 1399 1400 if v.UserName != nil { 1401 ok := object.Key("UserName") 1402 ok.String(*v.UserName) 1403 } 1404 1405 return nil 1406} 1407 1408func awsAwsjson11_serializeOpDocumentListSecurityPoliciesInput(v *ListSecurityPoliciesInput, value smithyjson.Value) error { 1409 object := value.Object() 1410 defer object.Close() 1411 1412 if v.MaxResults != nil { 1413 ok := object.Key("MaxResults") 1414 ok.Integer(*v.MaxResults) 1415 } 1416 1417 if v.NextToken != nil { 1418 ok := object.Key("NextToken") 1419 ok.String(*v.NextToken) 1420 } 1421 1422 return nil 1423} 1424 1425func awsAwsjson11_serializeOpDocumentListServersInput(v *ListServersInput, value smithyjson.Value) error { 1426 object := value.Object() 1427 defer object.Close() 1428 1429 if v.MaxResults != nil { 1430 ok := object.Key("MaxResults") 1431 ok.Integer(*v.MaxResults) 1432 } 1433 1434 if v.NextToken != nil { 1435 ok := object.Key("NextToken") 1436 ok.String(*v.NextToken) 1437 } 1438 1439 return nil 1440} 1441 1442func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { 1443 object := value.Object() 1444 defer object.Close() 1445 1446 if v.Arn != nil { 1447 ok := object.Key("Arn") 1448 ok.String(*v.Arn) 1449 } 1450 1451 if v.MaxResults != nil { 1452 ok := object.Key("MaxResults") 1453 ok.Integer(*v.MaxResults) 1454 } 1455 1456 if v.NextToken != nil { 1457 ok := object.Key("NextToken") 1458 ok.String(*v.NextToken) 1459 } 1460 1461 return nil 1462} 1463 1464func awsAwsjson11_serializeOpDocumentListUsersInput(v *ListUsersInput, value smithyjson.Value) error { 1465 object := value.Object() 1466 defer object.Close() 1467 1468 if v.MaxResults != nil { 1469 ok := object.Key("MaxResults") 1470 ok.Integer(*v.MaxResults) 1471 } 1472 1473 if v.NextToken != nil { 1474 ok := object.Key("NextToken") 1475 ok.String(*v.NextToken) 1476 } 1477 1478 if v.ServerId != nil { 1479 ok := object.Key("ServerId") 1480 ok.String(*v.ServerId) 1481 } 1482 1483 return nil 1484} 1485 1486func awsAwsjson11_serializeOpDocumentStartServerInput(v *StartServerInput, value smithyjson.Value) error { 1487 object := value.Object() 1488 defer object.Close() 1489 1490 if v.ServerId != nil { 1491 ok := object.Key("ServerId") 1492 ok.String(*v.ServerId) 1493 } 1494 1495 return nil 1496} 1497 1498func awsAwsjson11_serializeOpDocumentStopServerInput(v *StopServerInput, value smithyjson.Value) error { 1499 object := value.Object() 1500 defer object.Close() 1501 1502 if v.ServerId != nil { 1503 ok := object.Key("ServerId") 1504 ok.String(*v.ServerId) 1505 } 1506 1507 return nil 1508} 1509 1510func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { 1511 object := value.Object() 1512 defer object.Close() 1513 1514 if v.Arn != nil { 1515 ok := object.Key("Arn") 1516 ok.String(*v.Arn) 1517 } 1518 1519 if v.Tags != nil { 1520 ok := object.Key("Tags") 1521 if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { 1522 return err 1523 } 1524 } 1525 1526 return nil 1527} 1528 1529func awsAwsjson11_serializeOpDocumentTestIdentityProviderInput(v *TestIdentityProviderInput, value smithyjson.Value) error { 1530 object := value.Object() 1531 defer object.Close() 1532 1533 if v.ServerId != nil { 1534 ok := object.Key("ServerId") 1535 ok.String(*v.ServerId) 1536 } 1537 1538 if len(v.ServerProtocol) > 0 { 1539 ok := object.Key("ServerProtocol") 1540 ok.String(string(v.ServerProtocol)) 1541 } 1542 1543 if v.SourceIp != nil { 1544 ok := object.Key("SourceIp") 1545 ok.String(*v.SourceIp) 1546 } 1547 1548 if v.UserName != nil { 1549 ok := object.Key("UserName") 1550 ok.String(*v.UserName) 1551 } 1552 1553 if v.UserPassword != nil { 1554 ok := object.Key("UserPassword") 1555 ok.String(*v.UserPassword) 1556 } 1557 1558 return nil 1559} 1560 1561func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { 1562 object := value.Object() 1563 defer object.Close() 1564 1565 if v.Arn != nil { 1566 ok := object.Key("Arn") 1567 ok.String(*v.Arn) 1568 } 1569 1570 if v.TagKeys != nil { 1571 ok := object.Key("TagKeys") 1572 if err := awsAwsjson11_serializeDocumentTagKeys(v.TagKeys, ok); err != nil { 1573 return err 1574 } 1575 } 1576 1577 return nil 1578} 1579 1580func awsAwsjson11_serializeOpDocumentUpdateServerInput(v *UpdateServerInput, value smithyjson.Value) error { 1581 object := value.Object() 1582 defer object.Close() 1583 1584 if v.Certificate != nil { 1585 ok := object.Key("Certificate") 1586 ok.String(*v.Certificate) 1587 } 1588 1589 if v.EndpointDetails != nil { 1590 ok := object.Key("EndpointDetails") 1591 if err := awsAwsjson11_serializeDocumentEndpointDetails(v.EndpointDetails, ok); err != nil { 1592 return err 1593 } 1594 } 1595 1596 if len(v.EndpointType) > 0 { 1597 ok := object.Key("EndpointType") 1598 ok.String(string(v.EndpointType)) 1599 } 1600 1601 if v.HostKey != nil { 1602 ok := object.Key("HostKey") 1603 ok.String(*v.HostKey) 1604 } 1605 1606 if v.IdentityProviderDetails != nil { 1607 ok := object.Key("IdentityProviderDetails") 1608 if err := awsAwsjson11_serializeDocumentIdentityProviderDetails(v.IdentityProviderDetails, ok); err != nil { 1609 return err 1610 } 1611 } 1612 1613 if v.LoggingRole != nil { 1614 ok := object.Key("LoggingRole") 1615 ok.String(*v.LoggingRole) 1616 } 1617 1618 if v.Protocols != nil { 1619 ok := object.Key("Protocols") 1620 if err := awsAwsjson11_serializeDocumentProtocols(v.Protocols, ok); err != nil { 1621 return err 1622 } 1623 } 1624 1625 if v.SecurityPolicyName != nil { 1626 ok := object.Key("SecurityPolicyName") 1627 ok.String(*v.SecurityPolicyName) 1628 } 1629 1630 if v.ServerId != nil { 1631 ok := object.Key("ServerId") 1632 ok.String(*v.ServerId) 1633 } 1634 1635 return nil 1636} 1637 1638func awsAwsjson11_serializeOpDocumentUpdateUserInput(v *UpdateUserInput, value smithyjson.Value) error { 1639 object := value.Object() 1640 defer object.Close() 1641 1642 if v.HomeDirectory != nil { 1643 ok := object.Key("HomeDirectory") 1644 ok.String(*v.HomeDirectory) 1645 } 1646 1647 if v.HomeDirectoryMappings != nil { 1648 ok := object.Key("HomeDirectoryMappings") 1649 if err := awsAwsjson11_serializeDocumentHomeDirectoryMappings(v.HomeDirectoryMappings, ok); err != nil { 1650 return err 1651 } 1652 } 1653 1654 if len(v.HomeDirectoryType) > 0 { 1655 ok := object.Key("HomeDirectoryType") 1656 ok.String(string(v.HomeDirectoryType)) 1657 } 1658 1659 if v.Policy != nil { 1660 ok := object.Key("Policy") 1661 ok.String(*v.Policy) 1662 } 1663 1664 if v.PosixProfile != nil { 1665 ok := object.Key("PosixProfile") 1666 if err := awsAwsjson11_serializeDocumentPosixProfile(v.PosixProfile, ok); err != nil { 1667 return err 1668 } 1669 } 1670 1671 if v.Role != nil { 1672 ok := object.Key("Role") 1673 ok.String(*v.Role) 1674 } 1675 1676 if v.ServerId != nil { 1677 ok := object.Key("ServerId") 1678 ok.String(*v.ServerId) 1679 } 1680 1681 if v.UserName != nil { 1682 ok := object.Key("UserName") 1683 ok.String(*v.UserName) 1684 } 1685 1686 return nil 1687} 1688