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_serializeDocumentProtocols(v []types.Protocol, value smithyjson.Value) error { 1053 array := value.Array() 1054 defer array.Close() 1055 1056 for i := range v { 1057 av := array.Value() 1058 av.String(string(v[i])) 1059 } 1060 return nil 1061} 1062 1063func awsAwsjson11_serializeDocumentSecurityGroupIds(v []string, value smithyjson.Value) error { 1064 array := value.Array() 1065 defer array.Close() 1066 1067 for i := range v { 1068 av := array.Value() 1069 av.String(v[i]) 1070 } 1071 return nil 1072} 1073 1074func awsAwsjson11_serializeDocumentSubnetIds(v []string, value smithyjson.Value) error { 1075 array := value.Array() 1076 defer array.Close() 1077 1078 for i := range v { 1079 av := array.Value() 1080 av.String(v[i]) 1081 } 1082 return nil 1083} 1084 1085func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { 1086 object := value.Object() 1087 defer object.Close() 1088 1089 if v.Key != nil { 1090 ok := object.Key("Key") 1091 ok.String(*v.Key) 1092 } 1093 1094 if v.Value != nil { 1095 ok := object.Key("Value") 1096 ok.String(*v.Value) 1097 } 1098 1099 return nil 1100} 1101 1102func awsAwsjson11_serializeDocumentTagKeys(v []string, value smithyjson.Value) error { 1103 array := value.Array() 1104 defer array.Close() 1105 1106 for i := range v { 1107 av := array.Value() 1108 av.String(v[i]) 1109 } 1110 return nil 1111} 1112 1113func awsAwsjson11_serializeDocumentTags(v []types.Tag, value smithyjson.Value) error { 1114 array := value.Array() 1115 defer array.Close() 1116 1117 for i := range v { 1118 av := array.Value() 1119 if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { 1120 return err 1121 } 1122 } 1123 return nil 1124} 1125 1126func awsAwsjson11_serializeOpDocumentCreateServerInput(v *CreateServerInput, value smithyjson.Value) error { 1127 object := value.Object() 1128 defer object.Close() 1129 1130 if v.Certificate != nil { 1131 ok := object.Key("Certificate") 1132 ok.String(*v.Certificate) 1133 } 1134 1135 if v.EndpointDetails != nil { 1136 ok := object.Key("EndpointDetails") 1137 if err := awsAwsjson11_serializeDocumentEndpointDetails(v.EndpointDetails, ok); err != nil { 1138 return err 1139 } 1140 } 1141 1142 if len(v.EndpointType) > 0 { 1143 ok := object.Key("EndpointType") 1144 ok.String(string(v.EndpointType)) 1145 } 1146 1147 if v.HostKey != nil { 1148 ok := object.Key("HostKey") 1149 ok.String(*v.HostKey) 1150 } 1151 1152 if v.IdentityProviderDetails != nil { 1153 ok := object.Key("IdentityProviderDetails") 1154 if err := awsAwsjson11_serializeDocumentIdentityProviderDetails(v.IdentityProviderDetails, ok); err != nil { 1155 return err 1156 } 1157 } 1158 1159 if len(v.IdentityProviderType) > 0 { 1160 ok := object.Key("IdentityProviderType") 1161 ok.String(string(v.IdentityProviderType)) 1162 } 1163 1164 if v.LoggingRole != nil { 1165 ok := object.Key("LoggingRole") 1166 ok.String(*v.LoggingRole) 1167 } 1168 1169 if v.Protocols != nil { 1170 ok := object.Key("Protocols") 1171 if err := awsAwsjson11_serializeDocumentProtocols(v.Protocols, ok); err != nil { 1172 return err 1173 } 1174 } 1175 1176 if v.SecurityPolicyName != nil { 1177 ok := object.Key("SecurityPolicyName") 1178 ok.String(*v.SecurityPolicyName) 1179 } 1180 1181 if v.Tags != nil { 1182 ok := object.Key("Tags") 1183 if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { 1184 return err 1185 } 1186 } 1187 1188 return nil 1189} 1190 1191func awsAwsjson11_serializeOpDocumentCreateUserInput(v *CreateUserInput, value smithyjson.Value) error { 1192 object := value.Object() 1193 defer object.Close() 1194 1195 if v.HomeDirectory != nil { 1196 ok := object.Key("HomeDirectory") 1197 ok.String(*v.HomeDirectory) 1198 } 1199 1200 if v.HomeDirectoryMappings != nil { 1201 ok := object.Key("HomeDirectoryMappings") 1202 if err := awsAwsjson11_serializeDocumentHomeDirectoryMappings(v.HomeDirectoryMappings, ok); err != nil { 1203 return err 1204 } 1205 } 1206 1207 if len(v.HomeDirectoryType) > 0 { 1208 ok := object.Key("HomeDirectoryType") 1209 ok.String(string(v.HomeDirectoryType)) 1210 } 1211 1212 if v.Policy != nil { 1213 ok := object.Key("Policy") 1214 ok.String(*v.Policy) 1215 } 1216 1217 if v.Role != nil { 1218 ok := object.Key("Role") 1219 ok.String(*v.Role) 1220 } 1221 1222 if v.ServerId != nil { 1223 ok := object.Key("ServerId") 1224 ok.String(*v.ServerId) 1225 } 1226 1227 if v.SshPublicKeyBody != nil { 1228 ok := object.Key("SshPublicKeyBody") 1229 ok.String(*v.SshPublicKeyBody) 1230 } 1231 1232 if v.Tags != nil { 1233 ok := object.Key("Tags") 1234 if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { 1235 return err 1236 } 1237 } 1238 1239 if v.UserName != nil { 1240 ok := object.Key("UserName") 1241 ok.String(*v.UserName) 1242 } 1243 1244 return nil 1245} 1246 1247func awsAwsjson11_serializeOpDocumentDeleteServerInput(v *DeleteServerInput, value smithyjson.Value) error { 1248 object := value.Object() 1249 defer object.Close() 1250 1251 if v.ServerId != nil { 1252 ok := object.Key("ServerId") 1253 ok.String(*v.ServerId) 1254 } 1255 1256 return nil 1257} 1258 1259func awsAwsjson11_serializeOpDocumentDeleteSshPublicKeyInput(v *DeleteSshPublicKeyInput, value smithyjson.Value) error { 1260 object := value.Object() 1261 defer object.Close() 1262 1263 if v.ServerId != nil { 1264 ok := object.Key("ServerId") 1265 ok.String(*v.ServerId) 1266 } 1267 1268 if v.SshPublicKeyId != nil { 1269 ok := object.Key("SshPublicKeyId") 1270 ok.String(*v.SshPublicKeyId) 1271 } 1272 1273 if v.UserName != nil { 1274 ok := object.Key("UserName") 1275 ok.String(*v.UserName) 1276 } 1277 1278 return nil 1279} 1280 1281func awsAwsjson11_serializeOpDocumentDeleteUserInput(v *DeleteUserInput, value smithyjson.Value) error { 1282 object := value.Object() 1283 defer object.Close() 1284 1285 if v.ServerId != nil { 1286 ok := object.Key("ServerId") 1287 ok.String(*v.ServerId) 1288 } 1289 1290 if v.UserName != nil { 1291 ok := object.Key("UserName") 1292 ok.String(*v.UserName) 1293 } 1294 1295 return nil 1296} 1297 1298func awsAwsjson11_serializeOpDocumentDescribeSecurityPolicyInput(v *DescribeSecurityPolicyInput, value smithyjson.Value) error { 1299 object := value.Object() 1300 defer object.Close() 1301 1302 if v.SecurityPolicyName != nil { 1303 ok := object.Key("SecurityPolicyName") 1304 ok.String(*v.SecurityPolicyName) 1305 } 1306 1307 return nil 1308} 1309 1310func awsAwsjson11_serializeOpDocumentDescribeServerInput(v *DescribeServerInput, value smithyjson.Value) error { 1311 object := value.Object() 1312 defer object.Close() 1313 1314 if v.ServerId != nil { 1315 ok := object.Key("ServerId") 1316 ok.String(*v.ServerId) 1317 } 1318 1319 return nil 1320} 1321 1322func awsAwsjson11_serializeOpDocumentDescribeUserInput(v *DescribeUserInput, value smithyjson.Value) error { 1323 object := value.Object() 1324 defer object.Close() 1325 1326 if v.ServerId != nil { 1327 ok := object.Key("ServerId") 1328 ok.String(*v.ServerId) 1329 } 1330 1331 if v.UserName != nil { 1332 ok := object.Key("UserName") 1333 ok.String(*v.UserName) 1334 } 1335 1336 return nil 1337} 1338 1339func awsAwsjson11_serializeOpDocumentImportSshPublicKeyInput(v *ImportSshPublicKeyInput, value smithyjson.Value) error { 1340 object := value.Object() 1341 defer object.Close() 1342 1343 if v.ServerId != nil { 1344 ok := object.Key("ServerId") 1345 ok.String(*v.ServerId) 1346 } 1347 1348 if v.SshPublicKeyBody != nil { 1349 ok := object.Key("SshPublicKeyBody") 1350 ok.String(*v.SshPublicKeyBody) 1351 } 1352 1353 if v.UserName != nil { 1354 ok := object.Key("UserName") 1355 ok.String(*v.UserName) 1356 } 1357 1358 return nil 1359} 1360 1361func awsAwsjson11_serializeOpDocumentListSecurityPoliciesInput(v *ListSecurityPoliciesInput, value smithyjson.Value) error { 1362 object := value.Object() 1363 defer object.Close() 1364 1365 if v.MaxResults != nil { 1366 ok := object.Key("MaxResults") 1367 ok.Integer(*v.MaxResults) 1368 } 1369 1370 if v.NextToken != nil { 1371 ok := object.Key("NextToken") 1372 ok.String(*v.NextToken) 1373 } 1374 1375 return nil 1376} 1377 1378func awsAwsjson11_serializeOpDocumentListServersInput(v *ListServersInput, value smithyjson.Value) error { 1379 object := value.Object() 1380 defer object.Close() 1381 1382 if v.MaxResults != nil { 1383 ok := object.Key("MaxResults") 1384 ok.Integer(*v.MaxResults) 1385 } 1386 1387 if v.NextToken != nil { 1388 ok := object.Key("NextToken") 1389 ok.String(*v.NextToken) 1390 } 1391 1392 return nil 1393} 1394 1395func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { 1396 object := value.Object() 1397 defer object.Close() 1398 1399 if v.Arn != nil { 1400 ok := object.Key("Arn") 1401 ok.String(*v.Arn) 1402 } 1403 1404 if v.MaxResults != nil { 1405 ok := object.Key("MaxResults") 1406 ok.Integer(*v.MaxResults) 1407 } 1408 1409 if v.NextToken != nil { 1410 ok := object.Key("NextToken") 1411 ok.String(*v.NextToken) 1412 } 1413 1414 return nil 1415} 1416 1417func awsAwsjson11_serializeOpDocumentListUsersInput(v *ListUsersInput, value smithyjson.Value) error { 1418 object := value.Object() 1419 defer object.Close() 1420 1421 if v.MaxResults != nil { 1422 ok := object.Key("MaxResults") 1423 ok.Integer(*v.MaxResults) 1424 } 1425 1426 if v.NextToken != nil { 1427 ok := object.Key("NextToken") 1428 ok.String(*v.NextToken) 1429 } 1430 1431 if v.ServerId != nil { 1432 ok := object.Key("ServerId") 1433 ok.String(*v.ServerId) 1434 } 1435 1436 return nil 1437} 1438 1439func awsAwsjson11_serializeOpDocumentStartServerInput(v *StartServerInput, value smithyjson.Value) error { 1440 object := value.Object() 1441 defer object.Close() 1442 1443 if v.ServerId != nil { 1444 ok := object.Key("ServerId") 1445 ok.String(*v.ServerId) 1446 } 1447 1448 return nil 1449} 1450 1451func awsAwsjson11_serializeOpDocumentStopServerInput(v *StopServerInput, value smithyjson.Value) error { 1452 object := value.Object() 1453 defer object.Close() 1454 1455 if v.ServerId != nil { 1456 ok := object.Key("ServerId") 1457 ok.String(*v.ServerId) 1458 } 1459 1460 return nil 1461} 1462 1463func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { 1464 object := value.Object() 1465 defer object.Close() 1466 1467 if v.Arn != nil { 1468 ok := object.Key("Arn") 1469 ok.String(*v.Arn) 1470 } 1471 1472 if v.Tags != nil { 1473 ok := object.Key("Tags") 1474 if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { 1475 return err 1476 } 1477 } 1478 1479 return nil 1480} 1481 1482func awsAwsjson11_serializeOpDocumentTestIdentityProviderInput(v *TestIdentityProviderInput, value smithyjson.Value) error { 1483 object := value.Object() 1484 defer object.Close() 1485 1486 if v.ServerId != nil { 1487 ok := object.Key("ServerId") 1488 ok.String(*v.ServerId) 1489 } 1490 1491 if len(v.ServerProtocol) > 0 { 1492 ok := object.Key("ServerProtocol") 1493 ok.String(string(v.ServerProtocol)) 1494 } 1495 1496 if v.SourceIp != nil { 1497 ok := object.Key("SourceIp") 1498 ok.String(*v.SourceIp) 1499 } 1500 1501 if v.UserName != nil { 1502 ok := object.Key("UserName") 1503 ok.String(*v.UserName) 1504 } 1505 1506 if v.UserPassword != nil { 1507 ok := object.Key("UserPassword") 1508 ok.String(*v.UserPassword) 1509 } 1510 1511 return nil 1512} 1513 1514func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { 1515 object := value.Object() 1516 defer object.Close() 1517 1518 if v.Arn != nil { 1519 ok := object.Key("Arn") 1520 ok.String(*v.Arn) 1521 } 1522 1523 if v.TagKeys != nil { 1524 ok := object.Key("TagKeys") 1525 if err := awsAwsjson11_serializeDocumentTagKeys(v.TagKeys, ok); err != nil { 1526 return err 1527 } 1528 } 1529 1530 return nil 1531} 1532 1533func awsAwsjson11_serializeOpDocumentUpdateServerInput(v *UpdateServerInput, value smithyjson.Value) error { 1534 object := value.Object() 1535 defer object.Close() 1536 1537 if v.Certificate != nil { 1538 ok := object.Key("Certificate") 1539 ok.String(*v.Certificate) 1540 } 1541 1542 if v.EndpointDetails != nil { 1543 ok := object.Key("EndpointDetails") 1544 if err := awsAwsjson11_serializeDocumentEndpointDetails(v.EndpointDetails, ok); err != nil { 1545 return err 1546 } 1547 } 1548 1549 if len(v.EndpointType) > 0 { 1550 ok := object.Key("EndpointType") 1551 ok.String(string(v.EndpointType)) 1552 } 1553 1554 if v.HostKey != nil { 1555 ok := object.Key("HostKey") 1556 ok.String(*v.HostKey) 1557 } 1558 1559 if v.IdentityProviderDetails != nil { 1560 ok := object.Key("IdentityProviderDetails") 1561 if err := awsAwsjson11_serializeDocumentIdentityProviderDetails(v.IdentityProviderDetails, ok); err != nil { 1562 return err 1563 } 1564 } 1565 1566 if v.LoggingRole != nil { 1567 ok := object.Key("LoggingRole") 1568 ok.String(*v.LoggingRole) 1569 } 1570 1571 if v.Protocols != nil { 1572 ok := object.Key("Protocols") 1573 if err := awsAwsjson11_serializeDocumentProtocols(v.Protocols, ok); err != nil { 1574 return err 1575 } 1576 } 1577 1578 if v.SecurityPolicyName != nil { 1579 ok := object.Key("SecurityPolicyName") 1580 ok.String(*v.SecurityPolicyName) 1581 } 1582 1583 if v.ServerId != nil { 1584 ok := object.Key("ServerId") 1585 ok.String(*v.ServerId) 1586 } 1587 1588 return nil 1589} 1590 1591func awsAwsjson11_serializeOpDocumentUpdateUserInput(v *UpdateUserInput, value smithyjson.Value) error { 1592 object := value.Object() 1593 defer object.Close() 1594 1595 if v.HomeDirectory != nil { 1596 ok := object.Key("HomeDirectory") 1597 ok.String(*v.HomeDirectory) 1598 } 1599 1600 if v.HomeDirectoryMappings != nil { 1601 ok := object.Key("HomeDirectoryMappings") 1602 if err := awsAwsjson11_serializeDocumentHomeDirectoryMappings(v.HomeDirectoryMappings, ok); err != nil { 1603 return err 1604 } 1605 } 1606 1607 if len(v.HomeDirectoryType) > 0 { 1608 ok := object.Key("HomeDirectoryType") 1609 ok.String(string(v.HomeDirectoryType)) 1610 } 1611 1612 if v.Policy != nil { 1613 ok := object.Key("Policy") 1614 ok.String(*v.Policy) 1615 } 1616 1617 if v.Role != nil { 1618 ok := object.Key("Role") 1619 ok.String(*v.Role) 1620 } 1621 1622 if v.ServerId != nil { 1623 ok := object.Key("ServerId") 1624 ok.String(*v.ServerId) 1625 } 1626 1627 if v.UserName != nil { 1628 ok := object.Key("UserName") 1629 ok.String(*v.UserName) 1630 } 1631 1632 return nil 1633} 1634