1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package workmail 4 5import ( 6 "time" 7 8 "github.com/aws/aws-sdk-go/aws" 9 "github.com/aws/aws-sdk-go/aws/awsutil" 10 "github.com/aws/aws-sdk-go/aws/request" 11) 12 13const opAssociateDelegateToResource = "AssociateDelegateToResource" 14 15// AssociateDelegateToResourceRequest generates a "aws/request.Request" representing the 16// client's request for the AssociateDelegateToResource operation. The "output" return 17// value will be populated with the request's response once the request complets 18// successfuly. 19// 20// Use "Send" method on the returned Request to send the API call to the service. 21// the "output" return value is not valid until after Send returns without error. 22// 23// See AssociateDelegateToResource for more information on using the AssociateDelegateToResource 24// API call, and error handling. 25// 26// This method is useful when you want to inject custom logic or configuration 27// into the SDK's request lifecycle. Such as custom headers, or retry logic. 28// 29// 30// // Example sending a request using the AssociateDelegateToResourceRequest method. 31// req, resp := client.AssociateDelegateToResourceRequest(params) 32// 33// err := req.Send() 34// if err == nil { // resp is now filled 35// fmt.Println(resp) 36// } 37// 38// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateDelegateToResource 39func (c *WorkMail) AssociateDelegateToResourceRequest(input *AssociateDelegateToResourceInput) (req *request.Request, output *AssociateDelegateToResourceOutput) { 40 op := &request.Operation{ 41 Name: opAssociateDelegateToResource, 42 HTTPMethod: "POST", 43 HTTPPath: "/", 44 } 45 46 if input == nil { 47 input = &AssociateDelegateToResourceInput{} 48 } 49 50 output = &AssociateDelegateToResourceOutput{} 51 req = c.newRequest(op, input, output) 52 return 53} 54 55// AssociateDelegateToResource API operation for Amazon WorkMail. 56// 57// Adds a member to the resource's set of delegates. 58// 59// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 60// with awserr.Error's Code and Message methods to get detailed information about 61// the error. 62// 63// See the AWS API reference guide for Amazon WorkMail's 64// API operation AssociateDelegateToResource for usage and error information. 65// 66// Returned Error Codes: 67// * ErrCodeEntityNotFoundException "EntityNotFoundException" 68// The identifier supplied for the entity is valid, but it does not exist in 69// your organization. 70// 71// * ErrCodeEntityStateException "EntityStateException" 72// You are performing an operation on an entity that isn't in the expected state, 73// such as trying to update a deleted user. 74// 75// * ErrCodeInvalidParameterException "InvalidParameterException" 76// One or more of the input parameters don't match the service's restrictions. 77// 78// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 79// An operation received a valid organization identifier that either doesn't 80// belong or exist in the system. 81// 82// * ErrCodeOrganizationStateException "OrganizationStateException" 83// The organization must have a valid state (Active or Synchronizing) to perform 84// certain operations on the organization or its entities. 85// 86// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateDelegateToResource 87func (c *WorkMail) AssociateDelegateToResource(input *AssociateDelegateToResourceInput) (*AssociateDelegateToResourceOutput, error) { 88 req, out := c.AssociateDelegateToResourceRequest(input) 89 return out, req.Send() 90} 91 92// AssociateDelegateToResourceWithContext is the same as AssociateDelegateToResource with the addition of 93// the ability to pass a context and additional request options. 94// 95// See AssociateDelegateToResource for details on how to use this API operation. 96// 97// The context must be non-nil and will be used for request cancellation. If 98// the context is nil a panic will occur. In the future the SDK may create 99// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 100// for more information on using Contexts. 101func (c *WorkMail) AssociateDelegateToResourceWithContext(ctx aws.Context, input *AssociateDelegateToResourceInput, opts ...request.Option) (*AssociateDelegateToResourceOutput, error) { 102 req, out := c.AssociateDelegateToResourceRequest(input) 103 req.SetContext(ctx) 104 req.ApplyOptions(opts...) 105 return out, req.Send() 106} 107 108const opAssociateMemberToGroup = "AssociateMemberToGroup" 109 110// AssociateMemberToGroupRequest generates a "aws/request.Request" representing the 111// client's request for the AssociateMemberToGroup operation. The "output" return 112// value will be populated with the request's response once the request complets 113// successfuly. 114// 115// Use "Send" method on the returned Request to send the API call to the service. 116// the "output" return value is not valid until after Send returns without error. 117// 118// See AssociateMemberToGroup for more information on using the AssociateMemberToGroup 119// API call, and error handling. 120// 121// This method is useful when you want to inject custom logic or configuration 122// into the SDK's request lifecycle. Such as custom headers, or retry logic. 123// 124// 125// // Example sending a request using the AssociateMemberToGroupRequest method. 126// req, resp := client.AssociateMemberToGroupRequest(params) 127// 128// err := req.Send() 129// if err == nil { // resp is now filled 130// fmt.Println(resp) 131// } 132// 133// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateMemberToGroup 134func (c *WorkMail) AssociateMemberToGroupRequest(input *AssociateMemberToGroupInput) (req *request.Request, output *AssociateMemberToGroupOutput) { 135 op := &request.Operation{ 136 Name: opAssociateMemberToGroup, 137 HTTPMethod: "POST", 138 HTTPPath: "/", 139 } 140 141 if input == nil { 142 input = &AssociateMemberToGroupInput{} 143 } 144 145 output = &AssociateMemberToGroupOutput{} 146 req = c.newRequest(op, input, output) 147 return 148} 149 150// AssociateMemberToGroup API operation for Amazon WorkMail. 151// 152// Adds a member to the group's set. 153// 154// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 155// with awserr.Error's Code and Message methods to get detailed information about 156// the error. 157// 158// See the AWS API reference guide for Amazon WorkMail's 159// API operation AssociateMemberToGroup for usage and error information. 160// 161// Returned Error Codes: 162// * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException" 163// The Directory Service doesn't recognize the credentials supplied by the Amazon 164// WorkMail service. 165// 166// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" 167// The directory that you are trying to perform operations on isn't available. 168// 169// * ErrCodeEntityNotFoundException "EntityNotFoundException" 170// The identifier supplied for the entity is valid, but it does not exist in 171// your organization. 172// 173// * ErrCodeEntityStateException "EntityStateException" 174// You are performing an operation on an entity that isn't in the expected state, 175// such as trying to update a deleted user. 176// 177// * ErrCodeInvalidParameterException "InvalidParameterException" 178// One or more of the input parameters don't match the service's restrictions. 179// 180// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 181// An operation received a valid organization identifier that either doesn't 182// belong or exist in the system. 183// 184// * ErrCodeOrganizationStateException "OrganizationStateException" 185// The organization must have a valid state (Active or Synchronizing) to perform 186// certain operations on the organization or its entities. 187// 188// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" 189// You can't perform a write operation against a read-only directory. 190// 191// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateMemberToGroup 192func (c *WorkMail) AssociateMemberToGroup(input *AssociateMemberToGroupInput) (*AssociateMemberToGroupOutput, error) { 193 req, out := c.AssociateMemberToGroupRequest(input) 194 return out, req.Send() 195} 196 197// AssociateMemberToGroupWithContext is the same as AssociateMemberToGroup with the addition of 198// the ability to pass a context and additional request options. 199// 200// See AssociateMemberToGroup for details on how to use this API operation. 201// 202// The context must be non-nil and will be used for request cancellation. If 203// the context is nil a panic will occur. In the future the SDK may create 204// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 205// for more information on using Contexts. 206func (c *WorkMail) AssociateMemberToGroupWithContext(ctx aws.Context, input *AssociateMemberToGroupInput, opts ...request.Option) (*AssociateMemberToGroupOutput, error) { 207 req, out := c.AssociateMemberToGroupRequest(input) 208 req.SetContext(ctx) 209 req.ApplyOptions(opts...) 210 return out, req.Send() 211} 212 213const opCreateAlias = "CreateAlias" 214 215// CreateAliasRequest generates a "aws/request.Request" representing the 216// client's request for the CreateAlias operation. The "output" return 217// value will be populated with the request's response once the request complets 218// successfuly. 219// 220// Use "Send" method on the returned Request to send the API call to the service. 221// the "output" return value is not valid until after Send returns without error. 222// 223// See CreateAlias for more information on using the CreateAlias 224// API call, and error handling. 225// 226// This method is useful when you want to inject custom logic or configuration 227// into the SDK's request lifecycle. Such as custom headers, or retry logic. 228// 229// 230// // Example sending a request using the CreateAliasRequest method. 231// req, resp := client.CreateAliasRequest(params) 232// 233// err := req.Send() 234// if err == nil { // resp is now filled 235// fmt.Println(resp) 236// } 237// 238// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateAlias 239func (c *WorkMail) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *CreateAliasOutput) { 240 op := &request.Operation{ 241 Name: opCreateAlias, 242 HTTPMethod: "POST", 243 HTTPPath: "/", 244 } 245 246 if input == nil { 247 input = &CreateAliasInput{} 248 } 249 250 output = &CreateAliasOutput{} 251 req = c.newRequest(op, input, output) 252 return 253} 254 255// CreateAlias API operation for Amazon WorkMail. 256// 257// Adds an alias to the set of a given member of Amazon WorkMail. 258// 259// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 260// with awserr.Error's Code and Message methods to get detailed information about 261// the error. 262// 263// See the AWS API reference guide for Amazon WorkMail's 264// API operation CreateAlias for usage and error information. 265// 266// Returned Error Codes: 267// * ErrCodeEmailAddressInUseException "EmailAddressInUseException" 268// The email address that you're trying to assign is already created for a different 269// user, group, or resource. 270// 271// * ErrCodeEntityNotFoundException "EntityNotFoundException" 272// The identifier supplied for the entity is valid, but it does not exist in 273// your organization. 274// 275// * ErrCodeEntityStateException "EntityStateException" 276// You are performing an operation on an entity that isn't in the expected state, 277// such as trying to update a deleted user. 278// 279// * ErrCodeInvalidParameterException "InvalidParameterException" 280// One or more of the input parameters don't match the service's restrictions. 281// 282// * ErrCodeMailDomainNotFoundException "MailDomainNotFoundException" 283// For an email or alias to be created in Amazon WorkMail, the included domain 284// must be defined in the organization. 285// 286// * ErrCodeMailDomainStateException "MailDomainStateException" 287// After a domain has been added to the organization, it must be verified. The 288// domain is not yet verified. 289// 290// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 291// An operation received a valid organization identifier that either doesn't 292// belong or exist in the system. 293// 294// * ErrCodeOrganizationStateException "OrganizationStateException" 295// The organization must have a valid state (Active or Synchronizing) to perform 296// certain operations on the organization or its entities. 297// 298// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateAlias 299func (c *WorkMail) CreateAlias(input *CreateAliasInput) (*CreateAliasOutput, error) { 300 req, out := c.CreateAliasRequest(input) 301 return out, req.Send() 302} 303 304// CreateAliasWithContext is the same as CreateAlias with the addition of 305// the ability to pass a context and additional request options. 306// 307// See CreateAlias for details on how to use this API operation. 308// 309// The context must be non-nil and will be used for request cancellation. If 310// the context is nil a panic will occur. In the future the SDK may create 311// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 312// for more information on using Contexts. 313func (c *WorkMail) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, opts ...request.Option) (*CreateAliasOutput, error) { 314 req, out := c.CreateAliasRequest(input) 315 req.SetContext(ctx) 316 req.ApplyOptions(opts...) 317 return out, req.Send() 318} 319 320const opCreateGroup = "CreateGroup" 321 322// CreateGroupRequest generates a "aws/request.Request" representing the 323// client's request for the CreateGroup operation. The "output" return 324// value will be populated with the request's response once the request complets 325// successfuly. 326// 327// Use "Send" method on the returned Request to send the API call to the service. 328// the "output" return value is not valid until after Send returns without error. 329// 330// See CreateGroup for more information on using the CreateGroup 331// API call, and error handling. 332// 333// This method is useful when you want to inject custom logic or configuration 334// into the SDK's request lifecycle. Such as custom headers, or retry logic. 335// 336// 337// // Example sending a request using the CreateGroupRequest method. 338// req, resp := client.CreateGroupRequest(params) 339// 340// err := req.Send() 341// if err == nil { // resp is now filled 342// fmt.Println(resp) 343// } 344// 345// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateGroup 346func (c *WorkMail) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, output *CreateGroupOutput) { 347 op := &request.Operation{ 348 Name: opCreateGroup, 349 HTTPMethod: "POST", 350 HTTPPath: "/", 351 } 352 353 if input == nil { 354 input = &CreateGroupInput{} 355 } 356 357 output = &CreateGroupOutput{} 358 req = c.newRequest(op, input, output) 359 return 360} 361 362// CreateGroup API operation for Amazon WorkMail. 363// 364// Creates a group that can be used in Amazon WorkMail by calling the RegisterToWorkMail 365// operation. 366// 367// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 368// with awserr.Error's Code and Message methods to get detailed information about 369// the error. 370// 371// See the AWS API reference guide for Amazon WorkMail's 372// API operation CreateGroup for usage and error information. 373// 374// Returned Error Codes: 375// * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException" 376// The Directory Service doesn't recognize the credentials supplied by the Amazon 377// WorkMail service. 378// 379// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" 380// The directory that you are trying to perform operations on isn't available. 381// 382// * ErrCodeInvalidParameterException "InvalidParameterException" 383// One or more of the input parameters don't match the service's restrictions. 384// 385// * ErrCodeNameAvailabilityException "NameAvailabilityException" 386// The entity (user, group, or user) name isn't unique in Amazon WorkMail. 387// 388// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 389// An operation received a valid organization identifier that either doesn't 390// belong or exist in the system. 391// 392// * ErrCodeOrganizationStateException "OrganizationStateException" 393// The organization must have a valid state (Active or Synchronizing) to perform 394// certain operations on the organization or its entities. 395// 396// * ErrCodeReservedNameException "ReservedNameException" 397// This entity name is not allowed in Amazon WorkMail. 398// 399// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" 400// You can't perform a write operation against a read-only directory. 401// 402// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateGroup 403func (c *WorkMail) CreateGroup(input *CreateGroupInput) (*CreateGroupOutput, error) { 404 req, out := c.CreateGroupRequest(input) 405 return out, req.Send() 406} 407 408// CreateGroupWithContext is the same as CreateGroup with the addition of 409// the ability to pass a context and additional request options. 410// 411// See CreateGroup for details on how to use this API operation. 412// 413// The context must be non-nil and will be used for request cancellation. If 414// the context is nil a panic will occur. In the future the SDK may create 415// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 416// for more information on using Contexts. 417func (c *WorkMail) CreateGroupWithContext(ctx aws.Context, input *CreateGroupInput, opts ...request.Option) (*CreateGroupOutput, error) { 418 req, out := c.CreateGroupRequest(input) 419 req.SetContext(ctx) 420 req.ApplyOptions(opts...) 421 return out, req.Send() 422} 423 424const opCreateResource = "CreateResource" 425 426// CreateResourceRequest generates a "aws/request.Request" representing the 427// client's request for the CreateResource operation. The "output" return 428// value will be populated with the request's response once the request complets 429// successfuly. 430// 431// Use "Send" method on the returned Request to send the API call to the service. 432// the "output" return value is not valid until after Send returns without error. 433// 434// See CreateResource for more information on using the CreateResource 435// API call, and error handling. 436// 437// This method is useful when you want to inject custom logic or configuration 438// into the SDK's request lifecycle. Such as custom headers, or retry logic. 439// 440// 441// // Example sending a request using the CreateResourceRequest method. 442// req, resp := client.CreateResourceRequest(params) 443// 444// err := req.Send() 445// if err == nil { // resp is now filled 446// fmt.Println(resp) 447// } 448// 449// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateResource 450func (c *WorkMail) CreateResourceRequest(input *CreateResourceInput) (req *request.Request, output *CreateResourceOutput) { 451 op := &request.Operation{ 452 Name: opCreateResource, 453 HTTPMethod: "POST", 454 HTTPPath: "/", 455 } 456 457 if input == nil { 458 input = &CreateResourceInput{} 459 } 460 461 output = &CreateResourceOutput{} 462 req = c.newRequest(op, input, output) 463 return 464} 465 466// CreateResource API operation for Amazon WorkMail. 467// 468// Creates a new Amazon WorkMail resource. The available types are equipment 469// and room. 470// 471// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 472// with awserr.Error's Code and Message methods to get detailed information about 473// the error. 474// 475// See the AWS API reference guide for Amazon WorkMail's 476// API operation CreateResource for usage and error information. 477// 478// Returned Error Codes: 479// * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException" 480// The Directory Service doesn't recognize the credentials supplied by the Amazon 481// WorkMail service. 482// 483// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" 484// The directory that you are trying to perform operations on isn't available. 485// 486// * ErrCodeInvalidParameterException "InvalidParameterException" 487// One or more of the input parameters don't match the service's restrictions. 488// 489// * ErrCodeNameAvailabilityException "NameAvailabilityException" 490// The entity (user, group, or user) name isn't unique in Amazon WorkMail. 491// 492// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 493// An operation received a valid organization identifier that either doesn't 494// belong or exist in the system. 495// 496// * ErrCodeOrganizationStateException "OrganizationStateException" 497// The organization must have a valid state (Active or Synchronizing) to perform 498// certain operations on the organization or its entities. 499// 500// * ErrCodeReservedNameException "ReservedNameException" 501// This entity name is not allowed in Amazon WorkMail. 502// 503// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateResource 504func (c *WorkMail) CreateResource(input *CreateResourceInput) (*CreateResourceOutput, error) { 505 req, out := c.CreateResourceRequest(input) 506 return out, req.Send() 507} 508 509// CreateResourceWithContext is the same as CreateResource with the addition of 510// the ability to pass a context and additional request options. 511// 512// See CreateResource for details on how to use this API operation. 513// 514// The context must be non-nil and will be used for request cancellation. If 515// the context is nil a panic will occur. In the future the SDK may create 516// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 517// for more information on using Contexts. 518func (c *WorkMail) CreateResourceWithContext(ctx aws.Context, input *CreateResourceInput, opts ...request.Option) (*CreateResourceOutput, error) { 519 req, out := c.CreateResourceRequest(input) 520 req.SetContext(ctx) 521 req.ApplyOptions(opts...) 522 return out, req.Send() 523} 524 525const opCreateUser = "CreateUser" 526 527// CreateUserRequest generates a "aws/request.Request" representing the 528// client's request for the CreateUser operation. The "output" return 529// value will be populated with the request's response once the request complets 530// successfuly. 531// 532// Use "Send" method on the returned Request to send the API call to the service. 533// the "output" return value is not valid until after Send returns without error. 534// 535// See CreateUser for more information on using the CreateUser 536// API call, and error handling. 537// 538// This method is useful when you want to inject custom logic or configuration 539// into the SDK's request lifecycle. Such as custom headers, or retry logic. 540// 541// 542// // Example sending a request using the CreateUserRequest method. 543// req, resp := client.CreateUserRequest(params) 544// 545// err := req.Send() 546// if err == nil { // resp is now filled 547// fmt.Println(resp) 548// } 549// 550// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateUser 551func (c *WorkMail) CreateUserRequest(input *CreateUserInput) (req *request.Request, output *CreateUserOutput) { 552 op := &request.Operation{ 553 Name: opCreateUser, 554 HTTPMethod: "POST", 555 HTTPPath: "/", 556 } 557 558 if input == nil { 559 input = &CreateUserInput{} 560 } 561 562 output = &CreateUserOutput{} 563 req = c.newRequest(op, input, output) 564 return 565} 566 567// CreateUser API operation for Amazon WorkMail. 568// 569// Creates a user who can be used in Amazon WorkMail by calling the RegisterToWorkMail 570// operation. 571// 572// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 573// with awserr.Error's Code and Message methods to get detailed information about 574// the error. 575// 576// See the AWS API reference guide for Amazon WorkMail's 577// API operation CreateUser for usage and error information. 578// 579// Returned Error Codes: 580// * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException" 581// The Directory Service doesn't recognize the credentials supplied by the Amazon 582// WorkMail service. 583// 584// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" 585// The directory that you are trying to perform operations on isn't available. 586// 587// * ErrCodeInvalidParameterException "InvalidParameterException" 588// One or more of the input parameters don't match the service's restrictions. 589// 590// * ErrCodeInvalidPasswordException "InvalidPasswordException" 591// The supplied password doesn't match the minimum security constraints, such 592// as length or use of special characters. 593// 594// * ErrCodeNameAvailabilityException "NameAvailabilityException" 595// The entity (user, group, or user) name isn't unique in Amazon WorkMail. 596// 597// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 598// An operation received a valid organization identifier that either doesn't 599// belong or exist in the system. 600// 601// * ErrCodeOrganizationStateException "OrganizationStateException" 602// The organization must have a valid state (Active or Synchronizing) to perform 603// certain operations on the organization or its entities. 604// 605// * ErrCodeReservedNameException "ReservedNameException" 606// This entity name is not allowed in Amazon WorkMail. 607// 608// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" 609// You can't perform a write operation against a read-only directory. 610// 611// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateUser 612func (c *WorkMail) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) { 613 req, out := c.CreateUserRequest(input) 614 return out, req.Send() 615} 616 617// CreateUserWithContext is the same as CreateUser with the addition of 618// the ability to pass a context and additional request options. 619// 620// See CreateUser for details on how to use this API operation. 621// 622// The context must be non-nil and will be used for request cancellation. If 623// the context is nil a panic will occur. In the future the SDK may create 624// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 625// for more information on using Contexts. 626func (c *WorkMail) CreateUserWithContext(ctx aws.Context, input *CreateUserInput, opts ...request.Option) (*CreateUserOutput, error) { 627 req, out := c.CreateUserRequest(input) 628 req.SetContext(ctx) 629 req.ApplyOptions(opts...) 630 return out, req.Send() 631} 632 633const opDeleteAlias = "DeleteAlias" 634 635// DeleteAliasRequest generates a "aws/request.Request" representing the 636// client's request for the DeleteAlias operation. The "output" return 637// value will be populated with the request's response once the request complets 638// successfuly. 639// 640// Use "Send" method on the returned Request to send the API call to the service. 641// the "output" return value is not valid until after Send returns without error. 642// 643// See DeleteAlias for more information on using the DeleteAlias 644// API call, and error handling. 645// 646// This method is useful when you want to inject custom logic or configuration 647// into the SDK's request lifecycle. Such as custom headers, or retry logic. 648// 649// 650// // Example sending a request using the DeleteAliasRequest method. 651// req, resp := client.DeleteAliasRequest(params) 652// 653// err := req.Send() 654// if err == nil { // resp is now filled 655// fmt.Println(resp) 656// } 657// 658// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteAlias 659func (c *WorkMail) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput) { 660 op := &request.Operation{ 661 Name: opDeleteAlias, 662 HTTPMethod: "POST", 663 HTTPPath: "/", 664 } 665 666 if input == nil { 667 input = &DeleteAliasInput{} 668 } 669 670 output = &DeleteAliasOutput{} 671 req = c.newRequest(op, input, output) 672 return 673} 674 675// DeleteAlias API operation for Amazon WorkMail. 676// 677// Remove the alias from a set of aliases for a given user. 678// 679// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 680// with awserr.Error's Code and Message methods to get detailed information about 681// the error. 682// 683// See the AWS API reference guide for Amazon WorkMail's 684// API operation DeleteAlias for usage and error information. 685// 686// Returned Error Codes: 687// * ErrCodeEntityNotFoundException "EntityNotFoundException" 688// The identifier supplied for the entity is valid, but it does not exist in 689// your organization. 690// 691// * ErrCodeEntityStateException "EntityStateException" 692// You are performing an operation on an entity that isn't in the expected state, 693// such as trying to update a deleted user. 694// 695// * ErrCodeInvalidParameterException "InvalidParameterException" 696// One or more of the input parameters don't match the service's restrictions. 697// 698// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 699// An operation received a valid organization identifier that either doesn't 700// belong or exist in the system. 701// 702// * ErrCodeOrganizationStateException "OrganizationStateException" 703// The organization must have a valid state (Active or Synchronizing) to perform 704// certain operations on the organization or its entities. 705// 706// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteAlias 707func (c *WorkMail) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) { 708 req, out := c.DeleteAliasRequest(input) 709 return out, req.Send() 710} 711 712// DeleteAliasWithContext is the same as DeleteAlias with the addition of 713// the ability to pass a context and additional request options. 714// 715// See DeleteAlias for details on how to use this API operation. 716// 717// The context must be non-nil and will be used for request cancellation. If 718// the context is nil a panic will occur. In the future the SDK may create 719// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 720// for more information on using Contexts. 721func (c *WorkMail) DeleteAliasWithContext(ctx aws.Context, input *DeleteAliasInput, opts ...request.Option) (*DeleteAliasOutput, error) { 722 req, out := c.DeleteAliasRequest(input) 723 req.SetContext(ctx) 724 req.ApplyOptions(opts...) 725 return out, req.Send() 726} 727 728const opDeleteGroup = "DeleteGroup" 729 730// DeleteGroupRequest generates a "aws/request.Request" representing the 731// client's request for the DeleteGroup operation. The "output" return 732// value will be populated with the request's response once the request complets 733// successfuly. 734// 735// Use "Send" method on the returned Request to send the API call to the service. 736// the "output" return value is not valid until after Send returns without error. 737// 738// See DeleteGroup for more information on using the DeleteGroup 739// API call, and error handling. 740// 741// This method is useful when you want to inject custom logic or configuration 742// into the SDK's request lifecycle. Such as custom headers, or retry logic. 743// 744// 745// // Example sending a request using the DeleteGroupRequest method. 746// req, resp := client.DeleteGroupRequest(params) 747// 748// err := req.Send() 749// if err == nil { // resp is now filled 750// fmt.Println(resp) 751// } 752// 753// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteGroup 754func (c *WorkMail) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output *DeleteGroupOutput) { 755 op := &request.Operation{ 756 Name: opDeleteGroup, 757 HTTPMethod: "POST", 758 HTTPPath: "/", 759 } 760 761 if input == nil { 762 input = &DeleteGroupInput{} 763 } 764 765 output = &DeleteGroupOutput{} 766 req = c.newRequest(op, input, output) 767 return 768} 769 770// DeleteGroup API operation for Amazon WorkMail. 771// 772// Deletes a group from Amazon WorkMail. 773// 774// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 775// with awserr.Error's Code and Message methods to get detailed information about 776// the error. 777// 778// See the AWS API reference guide for Amazon WorkMail's 779// API operation DeleteGroup for usage and error information. 780// 781// Returned Error Codes: 782// * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException" 783// The Directory Service doesn't recognize the credentials supplied by the Amazon 784// WorkMail service. 785// 786// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" 787// The directory that you are trying to perform operations on isn't available. 788// 789// * ErrCodeEntityStateException "EntityStateException" 790// You are performing an operation on an entity that isn't in the expected state, 791// such as trying to update a deleted user. 792// 793// * ErrCodeInvalidParameterException "InvalidParameterException" 794// One or more of the input parameters don't match the service's restrictions. 795// 796// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 797// An operation received a valid organization identifier that either doesn't 798// belong or exist in the system. 799// 800// * ErrCodeOrganizationStateException "OrganizationStateException" 801// The organization must have a valid state (Active or Synchronizing) to perform 802// certain operations on the organization or its entities. 803// 804// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" 805// You can't perform a write operation against a read-only directory. 806// 807// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteGroup 808func (c *WorkMail) DeleteGroup(input *DeleteGroupInput) (*DeleteGroupOutput, error) { 809 req, out := c.DeleteGroupRequest(input) 810 return out, req.Send() 811} 812 813// DeleteGroupWithContext is the same as DeleteGroup with the addition of 814// the ability to pass a context and additional request options. 815// 816// See DeleteGroup for details on how to use this API operation. 817// 818// The context must be non-nil and will be used for request cancellation. If 819// the context is nil a panic will occur. In the future the SDK may create 820// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 821// for more information on using Contexts. 822func (c *WorkMail) DeleteGroupWithContext(ctx aws.Context, input *DeleteGroupInput, opts ...request.Option) (*DeleteGroupOutput, error) { 823 req, out := c.DeleteGroupRequest(input) 824 req.SetContext(ctx) 825 req.ApplyOptions(opts...) 826 return out, req.Send() 827} 828 829const opDeleteResource = "DeleteResource" 830 831// DeleteResourceRequest generates a "aws/request.Request" representing the 832// client's request for the DeleteResource operation. The "output" return 833// value will be populated with the request's response once the request complets 834// successfuly. 835// 836// Use "Send" method on the returned Request to send the API call to the service. 837// the "output" return value is not valid until after Send returns without error. 838// 839// See DeleteResource for more information on using the DeleteResource 840// API call, and error handling. 841// 842// This method is useful when you want to inject custom logic or configuration 843// into the SDK's request lifecycle. Such as custom headers, or retry logic. 844// 845// 846// // Example sending a request using the DeleteResourceRequest method. 847// req, resp := client.DeleteResourceRequest(params) 848// 849// err := req.Send() 850// if err == nil { // resp is now filled 851// fmt.Println(resp) 852// } 853// 854// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteResource 855func (c *WorkMail) DeleteResourceRequest(input *DeleteResourceInput) (req *request.Request, output *DeleteResourceOutput) { 856 op := &request.Operation{ 857 Name: opDeleteResource, 858 HTTPMethod: "POST", 859 HTTPPath: "/", 860 } 861 862 if input == nil { 863 input = &DeleteResourceInput{} 864 } 865 866 output = &DeleteResourceOutput{} 867 req = c.newRequest(op, input, output) 868 return 869} 870 871// DeleteResource API operation for Amazon WorkMail. 872// 873// Deletes the specified resource. 874// 875// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 876// with awserr.Error's Code and Message methods to get detailed information about 877// the error. 878// 879// See the AWS API reference guide for Amazon WorkMail's 880// API operation DeleteResource for usage and error information. 881// 882// Returned Error Codes: 883// * ErrCodeEntityStateException "EntityStateException" 884// You are performing an operation on an entity that isn't in the expected state, 885// such as trying to update a deleted user. 886// 887// * ErrCodeInvalidParameterException "InvalidParameterException" 888// One or more of the input parameters don't match the service's restrictions. 889// 890// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 891// An operation received a valid organization identifier that either doesn't 892// belong or exist in the system. 893// 894// * ErrCodeOrganizationStateException "OrganizationStateException" 895// The organization must have a valid state (Active or Synchronizing) to perform 896// certain operations on the organization or its entities. 897// 898// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteResource 899func (c *WorkMail) DeleteResource(input *DeleteResourceInput) (*DeleteResourceOutput, error) { 900 req, out := c.DeleteResourceRequest(input) 901 return out, req.Send() 902} 903 904// DeleteResourceWithContext is the same as DeleteResource with the addition of 905// the ability to pass a context and additional request options. 906// 907// See DeleteResource for details on how to use this API operation. 908// 909// The context must be non-nil and will be used for request cancellation. If 910// the context is nil a panic will occur. In the future the SDK may create 911// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 912// for more information on using Contexts. 913func (c *WorkMail) DeleteResourceWithContext(ctx aws.Context, input *DeleteResourceInput, opts ...request.Option) (*DeleteResourceOutput, error) { 914 req, out := c.DeleteResourceRequest(input) 915 req.SetContext(ctx) 916 req.ApplyOptions(opts...) 917 return out, req.Send() 918} 919 920const opDeleteUser = "DeleteUser" 921 922// DeleteUserRequest generates a "aws/request.Request" representing the 923// client's request for the DeleteUser operation. The "output" return 924// value will be populated with the request's response once the request complets 925// successfuly. 926// 927// Use "Send" method on the returned Request to send the API call to the service. 928// the "output" return value is not valid until after Send returns without error. 929// 930// See DeleteUser for more information on using the DeleteUser 931// API call, and error handling. 932// 933// This method is useful when you want to inject custom logic or configuration 934// into the SDK's request lifecycle. Such as custom headers, or retry logic. 935// 936// 937// // Example sending a request using the DeleteUserRequest method. 938// req, resp := client.DeleteUserRequest(params) 939// 940// err := req.Send() 941// if err == nil { // resp is now filled 942// fmt.Println(resp) 943// } 944// 945// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteUser 946func (c *WorkMail) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) { 947 op := &request.Operation{ 948 Name: opDeleteUser, 949 HTTPMethod: "POST", 950 HTTPPath: "/", 951 } 952 953 if input == nil { 954 input = &DeleteUserInput{} 955 } 956 957 output = &DeleteUserOutput{} 958 req = c.newRequest(op, input, output) 959 return 960} 961 962// DeleteUser API operation for Amazon WorkMail. 963// 964// Deletes a user from Amazon WorkMail and all subsequent systems. The action 965// can't be undone. The mailbox is kept as-is for a minimum of 30 days, without 966// any means to restore it. 967// 968// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 969// with awserr.Error's Code and Message methods to get detailed information about 970// the error. 971// 972// See the AWS API reference guide for Amazon WorkMail's 973// API operation DeleteUser for usage and error information. 974// 975// Returned Error Codes: 976// * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException" 977// The Directory Service doesn't recognize the credentials supplied by the Amazon 978// WorkMail service. 979// 980// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" 981// The directory that you are trying to perform operations on isn't available. 982// 983// * ErrCodeEntityStateException "EntityStateException" 984// You are performing an operation on an entity that isn't in the expected state, 985// such as trying to update a deleted user. 986// 987// * ErrCodeInvalidParameterException "InvalidParameterException" 988// One or more of the input parameters don't match the service's restrictions. 989// 990// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 991// An operation received a valid organization identifier that either doesn't 992// belong or exist in the system. 993// 994// * ErrCodeOrganizationStateException "OrganizationStateException" 995// The organization must have a valid state (Active or Synchronizing) to perform 996// certain operations on the organization or its entities. 997// 998// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" 999// You can't perform a write operation against a read-only directory. 1000// 1001// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteUser 1002func (c *WorkMail) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) { 1003 req, out := c.DeleteUserRequest(input) 1004 return out, req.Send() 1005} 1006 1007// DeleteUserWithContext is the same as DeleteUser with the addition of 1008// the ability to pass a context and additional request options. 1009// 1010// See DeleteUser for details on how to use this API operation. 1011// 1012// The context must be non-nil and will be used for request cancellation. If 1013// the context is nil a panic will occur. In the future the SDK may create 1014// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1015// for more information on using Contexts. 1016func (c *WorkMail) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) { 1017 req, out := c.DeleteUserRequest(input) 1018 req.SetContext(ctx) 1019 req.ApplyOptions(opts...) 1020 return out, req.Send() 1021} 1022 1023const opDeregisterFromWorkMail = "DeregisterFromWorkMail" 1024 1025// DeregisterFromWorkMailRequest generates a "aws/request.Request" representing the 1026// client's request for the DeregisterFromWorkMail operation. The "output" return 1027// value will be populated with the request's response once the request complets 1028// successfuly. 1029// 1030// Use "Send" method on the returned Request to send the API call to the service. 1031// the "output" return value is not valid until after Send returns without error. 1032// 1033// See DeregisterFromWorkMail for more information on using the DeregisterFromWorkMail 1034// API call, and error handling. 1035// 1036// This method is useful when you want to inject custom logic or configuration 1037// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1038// 1039// 1040// // Example sending a request using the DeregisterFromWorkMailRequest method. 1041// req, resp := client.DeregisterFromWorkMailRequest(params) 1042// 1043// err := req.Send() 1044// if err == nil { // resp is now filled 1045// fmt.Println(resp) 1046// } 1047// 1048// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeregisterFromWorkMail 1049func (c *WorkMail) DeregisterFromWorkMailRequest(input *DeregisterFromWorkMailInput) (req *request.Request, output *DeregisterFromWorkMailOutput) { 1050 op := &request.Operation{ 1051 Name: opDeregisterFromWorkMail, 1052 HTTPMethod: "POST", 1053 HTTPPath: "/", 1054 } 1055 1056 if input == nil { 1057 input = &DeregisterFromWorkMailInput{} 1058 } 1059 1060 output = &DeregisterFromWorkMailOutput{} 1061 req = c.newRequest(op, input, output) 1062 return 1063} 1064 1065// DeregisterFromWorkMail API operation for Amazon WorkMail. 1066// 1067// Mark a user, group, or resource as no longer used in Amazon WorkMail. This 1068// action disassociates the mailbox and schedules it for clean-up. Amazon WorkMail 1069// keeps mailboxes for 30 days before they are permanently removed. The functionality 1070// in the console is Disable. 1071// 1072// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1073// with awserr.Error's Code and Message methods to get detailed information about 1074// the error. 1075// 1076// See the AWS API reference guide for Amazon WorkMail's 1077// API operation DeregisterFromWorkMail for usage and error information. 1078// 1079// Returned Error Codes: 1080// * ErrCodeEntityNotFoundException "EntityNotFoundException" 1081// The identifier supplied for the entity is valid, but it does not exist in 1082// your organization. 1083// 1084// * ErrCodeEntityStateException "EntityStateException" 1085// You are performing an operation on an entity that isn't in the expected state, 1086// such as trying to update a deleted user. 1087// 1088// * ErrCodeInvalidParameterException "InvalidParameterException" 1089// One or more of the input parameters don't match the service's restrictions. 1090// 1091// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 1092// An operation received a valid organization identifier that either doesn't 1093// belong or exist in the system. 1094// 1095// * ErrCodeOrganizationStateException "OrganizationStateException" 1096// The organization must have a valid state (Active or Synchronizing) to perform 1097// certain operations on the organization or its entities. 1098// 1099// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeregisterFromWorkMail 1100func (c *WorkMail) DeregisterFromWorkMail(input *DeregisterFromWorkMailInput) (*DeregisterFromWorkMailOutput, error) { 1101 req, out := c.DeregisterFromWorkMailRequest(input) 1102 return out, req.Send() 1103} 1104 1105// DeregisterFromWorkMailWithContext is the same as DeregisterFromWorkMail with the addition of 1106// the ability to pass a context and additional request options. 1107// 1108// See DeregisterFromWorkMail for details on how to use this API operation. 1109// 1110// The context must be non-nil and will be used for request cancellation. If 1111// the context is nil a panic will occur. In the future the SDK may create 1112// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1113// for more information on using Contexts. 1114func (c *WorkMail) DeregisterFromWorkMailWithContext(ctx aws.Context, input *DeregisterFromWorkMailInput, opts ...request.Option) (*DeregisterFromWorkMailOutput, error) { 1115 req, out := c.DeregisterFromWorkMailRequest(input) 1116 req.SetContext(ctx) 1117 req.ApplyOptions(opts...) 1118 return out, req.Send() 1119} 1120 1121const opDescribeGroup = "DescribeGroup" 1122 1123// DescribeGroupRequest generates a "aws/request.Request" representing the 1124// client's request for the DescribeGroup operation. The "output" return 1125// value will be populated with the request's response once the request complets 1126// successfuly. 1127// 1128// Use "Send" method on the returned Request to send the API call to the service. 1129// the "output" return value is not valid until after Send returns without error. 1130// 1131// See DescribeGroup for more information on using the DescribeGroup 1132// API call, and error handling. 1133// 1134// This method is useful when you want to inject custom logic or configuration 1135// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1136// 1137// 1138// // Example sending a request using the DescribeGroupRequest method. 1139// req, resp := client.DescribeGroupRequest(params) 1140// 1141// err := req.Send() 1142// if err == nil { // resp is now filled 1143// fmt.Println(resp) 1144// } 1145// 1146// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeGroup 1147func (c *WorkMail) DescribeGroupRequest(input *DescribeGroupInput) (req *request.Request, output *DescribeGroupOutput) { 1148 op := &request.Operation{ 1149 Name: opDescribeGroup, 1150 HTTPMethod: "POST", 1151 HTTPPath: "/", 1152 } 1153 1154 if input == nil { 1155 input = &DescribeGroupInput{} 1156 } 1157 1158 output = &DescribeGroupOutput{} 1159 req = c.newRequest(op, input, output) 1160 return 1161} 1162 1163// DescribeGroup API operation for Amazon WorkMail. 1164// 1165// Returns the data available for the group. 1166// 1167// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1168// with awserr.Error's Code and Message methods to get detailed information about 1169// the error. 1170// 1171// See the AWS API reference guide for Amazon WorkMail's 1172// API operation DescribeGroup for usage and error information. 1173// 1174// Returned Error Codes: 1175// * ErrCodeEntityNotFoundException "EntityNotFoundException" 1176// The identifier supplied for the entity is valid, but it does not exist in 1177// your organization. 1178// 1179// * ErrCodeInvalidParameterException "InvalidParameterException" 1180// One or more of the input parameters don't match the service's restrictions. 1181// 1182// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 1183// An operation received a valid organization identifier that either doesn't 1184// belong or exist in the system. 1185// 1186// * ErrCodeOrganizationStateException "OrganizationStateException" 1187// The organization must have a valid state (Active or Synchronizing) to perform 1188// certain operations on the organization or its entities. 1189// 1190// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeGroup 1191func (c *WorkMail) DescribeGroup(input *DescribeGroupInput) (*DescribeGroupOutput, error) { 1192 req, out := c.DescribeGroupRequest(input) 1193 return out, req.Send() 1194} 1195 1196// DescribeGroupWithContext is the same as DescribeGroup with the addition of 1197// the ability to pass a context and additional request options. 1198// 1199// See DescribeGroup for details on how to use this API operation. 1200// 1201// The context must be non-nil and will be used for request cancellation. If 1202// the context is nil a panic will occur. In the future the SDK may create 1203// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1204// for more information on using Contexts. 1205func (c *WorkMail) DescribeGroupWithContext(ctx aws.Context, input *DescribeGroupInput, opts ...request.Option) (*DescribeGroupOutput, error) { 1206 req, out := c.DescribeGroupRequest(input) 1207 req.SetContext(ctx) 1208 req.ApplyOptions(opts...) 1209 return out, req.Send() 1210} 1211 1212const opDescribeOrganization = "DescribeOrganization" 1213 1214// DescribeOrganizationRequest generates a "aws/request.Request" representing the 1215// client's request for the DescribeOrganization operation. The "output" return 1216// value will be populated with the request's response once the request complets 1217// successfuly. 1218// 1219// Use "Send" method on the returned Request to send the API call to the service. 1220// the "output" return value is not valid until after Send returns without error. 1221// 1222// See DescribeOrganization for more information on using the DescribeOrganization 1223// API call, and error handling. 1224// 1225// This method is useful when you want to inject custom logic or configuration 1226// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1227// 1228// 1229// // Example sending a request using the DescribeOrganizationRequest method. 1230// req, resp := client.DescribeOrganizationRequest(params) 1231// 1232// err := req.Send() 1233// if err == nil { // resp is now filled 1234// fmt.Println(resp) 1235// } 1236// 1237// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeOrganization 1238func (c *WorkMail) DescribeOrganizationRequest(input *DescribeOrganizationInput) (req *request.Request, output *DescribeOrganizationOutput) { 1239 op := &request.Operation{ 1240 Name: opDescribeOrganization, 1241 HTTPMethod: "POST", 1242 HTTPPath: "/", 1243 } 1244 1245 if input == nil { 1246 input = &DescribeOrganizationInput{} 1247 } 1248 1249 output = &DescribeOrganizationOutput{} 1250 req = c.newRequest(op, input, output) 1251 return 1252} 1253 1254// DescribeOrganization API operation for Amazon WorkMail. 1255// 1256// Provides more information regarding a given organization based on its identifier. 1257// 1258// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1259// with awserr.Error's Code and Message methods to get detailed information about 1260// the error. 1261// 1262// See the AWS API reference guide for Amazon WorkMail's 1263// API operation DescribeOrganization for usage and error information. 1264// 1265// Returned Error Codes: 1266// * ErrCodeInvalidParameterException "InvalidParameterException" 1267// One or more of the input parameters don't match the service's restrictions. 1268// 1269// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 1270// An operation received a valid organization identifier that either doesn't 1271// belong or exist in the system. 1272// 1273// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeOrganization 1274func (c *WorkMail) DescribeOrganization(input *DescribeOrganizationInput) (*DescribeOrganizationOutput, error) { 1275 req, out := c.DescribeOrganizationRequest(input) 1276 return out, req.Send() 1277} 1278 1279// DescribeOrganizationWithContext is the same as DescribeOrganization with the addition of 1280// the ability to pass a context and additional request options. 1281// 1282// See DescribeOrganization for details on how to use this API operation. 1283// 1284// The context must be non-nil and will be used for request cancellation. If 1285// the context is nil a panic will occur. In the future the SDK may create 1286// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1287// for more information on using Contexts. 1288func (c *WorkMail) DescribeOrganizationWithContext(ctx aws.Context, input *DescribeOrganizationInput, opts ...request.Option) (*DescribeOrganizationOutput, error) { 1289 req, out := c.DescribeOrganizationRequest(input) 1290 req.SetContext(ctx) 1291 req.ApplyOptions(opts...) 1292 return out, req.Send() 1293} 1294 1295const opDescribeResource = "DescribeResource" 1296 1297// DescribeResourceRequest generates a "aws/request.Request" representing the 1298// client's request for the DescribeResource operation. The "output" return 1299// value will be populated with the request's response once the request complets 1300// successfuly. 1301// 1302// Use "Send" method on the returned Request to send the API call to the service. 1303// the "output" return value is not valid until after Send returns without error. 1304// 1305// See DescribeResource for more information on using the DescribeResource 1306// API call, and error handling. 1307// 1308// This method is useful when you want to inject custom logic or configuration 1309// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1310// 1311// 1312// // Example sending a request using the DescribeResourceRequest method. 1313// req, resp := client.DescribeResourceRequest(params) 1314// 1315// err := req.Send() 1316// if err == nil { // resp is now filled 1317// fmt.Println(resp) 1318// } 1319// 1320// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeResource 1321func (c *WorkMail) DescribeResourceRequest(input *DescribeResourceInput) (req *request.Request, output *DescribeResourceOutput) { 1322 op := &request.Operation{ 1323 Name: opDescribeResource, 1324 HTTPMethod: "POST", 1325 HTTPPath: "/", 1326 } 1327 1328 if input == nil { 1329 input = &DescribeResourceInput{} 1330 } 1331 1332 output = &DescribeResourceOutput{} 1333 req = c.newRequest(op, input, output) 1334 return 1335} 1336 1337// DescribeResource API operation for Amazon WorkMail. 1338// 1339// Returns the data available for the resource. 1340// 1341// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1342// with awserr.Error's Code and Message methods to get detailed information about 1343// the error. 1344// 1345// See the AWS API reference guide for Amazon WorkMail's 1346// API operation DescribeResource for usage and error information. 1347// 1348// Returned Error Codes: 1349// * ErrCodeEntityNotFoundException "EntityNotFoundException" 1350// The identifier supplied for the entity is valid, but it does not exist in 1351// your organization. 1352// 1353// * ErrCodeInvalidParameterException "InvalidParameterException" 1354// One or more of the input parameters don't match the service's restrictions. 1355// 1356// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 1357// An operation received a valid organization identifier that either doesn't 1358// belong or exist in the system. 1359// 1360// * ErrCodeOrganizationStateException "OrganizationStateException" 1361// The organization must have a valid state (Active or Synchronizing) to perform 1362// certain operations on the organization or its entities. 1363// 1364// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeResource 1365func (c *WorkMail) DescribeResource(input *DescribeResourceInput) (*DescribeResourceOutput, error) { 1366 req, out := c.DescribeResourceRequest(input) 1367 return out, req.Send() 1368} 1369 1370// DescribeResourceWithContext is the same as DescribeResource with the addition of 1371// the ability to pass a context and additional request options. 1372// 1373// See DescribeResource for details on how to use this API operation. 1374// 1375// The context must be non-nil and will be used for request cancellation. If 1376// the context is nil a panic will occur. In the future the SDK may create 1377// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1378// for more information on using Contexts. 1379func (c *WorkMail) DescribeResourceWithContext(ctx aws.Context, input *DescribeResourceInput, opts ...request.Option) (*DescribeResourceOutput, error) { 1380 req, out := c.DescribeResourceRequest(input) 1381 req.SetContext(ctx) 1382 req.ApplyOptions(opts...) 1383 return out, req.Send() 1384} 1385 1386const opDescribeUser = "DescribeUser" 1387 1388// DescribeUserRequest generates a "aws/request.Request" representing the 1389// client's request for the DescribeUser operation. The "output" return 1390// value will be populated with the request's response once the request complets 1391// successfuly. 1392// 1393// Use "Send" method on the returned Request to send the API call to the service. 1394// the "output" return value is not valid until after Send returns without error. 1395// 1396// See DescribeUser for more information on using the DescribeUser 1397// API call, and error handling. 1398// 1399// This method is useful when you want to inject custom logic or configuration 1400// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1401// 1402// 1403// // Example sending a request using the DescribeUserRequest method. 1404// req, resp := client.DescribeUserRequest(params) 1405// 1406// err := req.Send() 1407// if err == nil { // resp is now filled 1408// fmt.Println(resp) 1409// } 1410// 1411// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeUser 1412func (c *WorkMail) DescribeUserRequest(input *DescribeUserInput) (req *request.Request, output *DescribeUserOutput) { 1413 op := &request.Operation{ 1414 Name: opDescribeUser, 1415 HTTPMethod: "POST", 1416 HTTPPath: "/", 1417 } 1418 1419 if input == nil { 1420 input = &DescribeUserInput{} 1421 } 1422 1423 output = &DescribeUserOutput{} 1424 req = c.newRequest(op, input, output) 1425 return 1426} 1427 1428// DescribeUser API operation for Amazon WorkMail. 1429// 1430// Provides information regarding the user. 1431// 1432// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1433// with awserr.Error's Code and Message methods to get detailed information about 1434// the error. 1435// 1436// See the AWS API reference guide for Amazon WorkMail's 1437// API operation DescribeUser for usage and error information. 1438// 1439// Returned Error Codes: 1440// * ErrCodeEntityNotFoundException "EntityNotFoundException" 1441// The identifier supplied for the entity is valid, but it does not exist in 1442// your organization. 1443// 1444// * ErrCodeInvalidParameterException "InvalidParameterException" 1445// One or more of the input parameters don't match the service's restrictions. 1446// 1447// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 1448// An operation received a valid organization identifier that either doesn't 1449// belong or exist in the system. 1450// 1451// * ErrCodeOrganizationStateException "OrganizationStateException" 1452// The organization must have a valid state (Active or Synchronizing) to perform 1453// certain operations on the organization or its entities. 1454// 1455// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeUser 1456func (c *WorkMail) DescribeUser(input *DescribeUserInput) (*DescribeUserOutput, error) { 1457 req, out := c.DescribeUserRequest(input) 1458 return out, req.Send() 1459} 1460 1461// DescribeUserWithContext is the same as DescribeUser with the addition of 1462// the ability to pass a context and additional request options. 1463// 1464// See DescribeUser for details on how to use this API operation. 1465// 1466// The context must be non-nil and will be used for request cancellation. If 1467// the context is nil a panic will occur. In the future the SDK may create 1468// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1469// for more information on using Contexts. 1470func (c *WorkMail) DescribeUserWithContext(ctx aws.Context, input *DescribeUserInput, opts ...request.Option) (*DescribeUserOutput, error) { 1471 req, out := c.DescribeUserRequest(input) 1472 req.SetContext(ctx) 1473 req.ApplyOptions(opts...) 1474 return out, req.Send() 1475} 1476 1477const opDisassociateDelegateFromResource = "DisassociateDelegateFromResource" 1478 1479// DisassociateDelegateFromResourceRequest generates a "aws/request.Request" representing the 1480// client's request for the DisassociateDelegateFromResource operation. The "output" return 1481// value will be populated with the request's response once the request complets 1482// successfuly. 1483// 1484// Use "Send" method on the returned Request to send the API call to the service. 1485// the "output" return value is not valid until after Send returns without error. 1486// 1487// See DisassociateDelegateFromResource for more information on using the DisassociateDelegateFromResource 1488// API call, and error handling. 1489// 1490// This method is useful when you want to inject custom logic or configuration 1491// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1492// 1493// 1494// // Example sending a request using the DisassociateDelegateFromResourceRequest method. 1495// req, resp := client.DisassociateDelegateFromResourceRequest(params) 1496// 1497// err := req.Send() 1498// if err == nil { // resp is now filled 1499// fmt.Println(resp) 1500// } 1501// 1502// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateDelegateFromResource 1503func (c *WorkMail) DisassociateDelegateFromResourceRequest(input *DisassociateDelegateFromResourceInput) (req *request.Request, output *DisassociateDelegateFromResourceOutput) { 1504 op := &request.Operation{ 1505 Name: opDisassociateDelegateFromResource, 1506 HTTPMethod: "POST", 1507 HTTPPath: "/", 1508 } 1509 1510 if input == nil { 1511 input = &DisassociateDelegateFromResourceInput{} 1512 } 1513 1514 output = &DisassociateDelegateFromResourceOutput{} 1515 req = c.newRequest(op, input, output) 1516 return 1517} 1518 1519// DisassociateDelegateFromResource API operation for Amazon WorkMail. 1520// 1521// Removes a member from the resource's set of delegates. 1522// 1523// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1524// with awserr.Error's Code and Message methods to get detailed information about 1525// the error. 1526// 1527// See the AWS API reference guide for Amazon WorkMail's 1528// API operation DisassociateDelegateFromResource for usage and error information. 1529// 1530// Returned Error Codes: 1531// * ErrCodeEntityNotFoundException "EntityNotFoundException" 1532// The identifier supplied for the entity is valid, but it does not exist in 1533// your organization. 1534// 1535// * ErrCodeEntityStateException "EntityStateException" 1536// You are performing an operation on an entity that isn't in the expected state, 1537// such as trying to update a deleted user. 1538// 1539// * ErrCodeInvalidParameterException "InvalidParameterException" 1540// One or more of the input parameters don't match the service's restrictions. 1541// 1542// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 1543// An operation received a valid organization identifier that either doesn't 1544// belong or exist in the system. 1545// 1546// * ErrCodeOrganizationStateException "OrganizationStateException" 1547// The organization must have a valid state (Active or Synchronizing) to perform 1548// certain operations on the organization or its entities. 1549// 1550// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateDelegateFromResource 1551func (c *WorkMail) DisassociateDelegateFromResource(input *DisassociateDelegateFromResourceInput) (*DisassociateDelegateFromResourceOutput, error) { 1552 req, out := c.DisassociateDelegateFromResourceRequest(input) 1553 return out, req.Send() 1554} 1555 1556// DisassociateDelegateFromResourceWithContext is the same as DisassociateDelegateFromResource with the addition of 1557// the ability to pass a context and additional request options. 1558// 1559// See DisassociateDelegateFromResource for details on how to use this API operation. 1560// 1561// The context must be non-nil and will be used for request cancellation. If 1562// the context is nil a panic will occur. In the future the SDK may create 1563// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1564// for more information on using Contexts. 1565func (c *WorkMail) DisassociateDelegateFromResourceWithContext(ctx aws.Context, input *DisassociateDelegateFromResourceInput, opts ...request.Option) (*DisassociateDelegateFromResourceOutput, error) { 1566 req, out := c.DisassociateDelegateFromResourceRequest(input) 1567 req.SetContext(ctx) 1568 req.ApplyOptions(opts...) 1569 return out, req.Send() 1570} 1571 1572const opDisassociateMemberFromGroup = "DisassociateMemberFromGroup" 1573 1574// DisassociateMemberFromGroupRequest generates a "aws/request.Request" representing the 1575// client's request for the DisassociateMemberFromGroup operation. The "output" return 1576// value will be populated with the request's response once the request complets 1577// successfuly. 1578// 1579// Use "Send" method on the returned Request to send the API call to the service. 1580// the "output" return value is not valid until after Send returns without error. 1581// 1582// See DisassociateMemberFromGroup for more information on using the DisassociateMemberFromGroup 1583// API call, and error handling. 1584// 1585// This method is useful when you want to inject custom logic or configuration 1586// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1587// 1588// 1589// // Example sending a request using the DisassociateMemberFromGroupRequest method. 1590// req, resp := client.DisassociateMemberFromGroupRequest(params) 1591// 1592// err := req.Send() 1593// if err == nil { // resp is now filled 1594// fmt.Println(resp) 1595// } 1596// 1597// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateMemberFromGroup 1598func (c *WorkMail) DisassociateMemberFromGroupRequest(input *DisassociateMemberFromGroupInput) (req *request.Request, output *DisassociateMemberFromGroupOutput) { 1599 op := &request.Operation{ 1600 Name: opDisassociateMemberFromGroup, 1601 HTTPMethod: "POST", 1602 HTTPPath: "/", 1603 } 1604 1605 if input == nil { 1606 input = &DisassociateMemberFromGroupInput{} 1607 } 1608 1609 output = &DisassociateMemberFromGroupOutput{} 1610 req = c.newRequest(op, input, output) 1611 return 1612} 1613 1614// DisassociateMemberFromGroup API operation for Amazon WorkMail. 1615// 1616// Removes a member from a group. 1617// 1618// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1619// with awserr.Error's Code and Message methods to get detailed information about 1620// the error. 1621// 1622// See the AWS API reference guide for Amazon WorkMail's 1623// API operation DisassociateMemberFromGroup for usage and error information. 1624// 1625// Returned Error Codes: 1626// * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException" 1627// The Directory Service doesn't recognize the credentials supplied by the Amazon 1628// WorkMail service. 1629// 1630// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" 1631// The directory that you are trying to perform operations on isn't available. 1632// 1633// * ErrCodeEntityNotFoundException "EntityNotFoundException" 1634// The identifier supplied for the entity is valid, but it does not exist in 1635// your organization. 1636// 1637// * ErrCodeEntityStateException "EntityStateException" 1638// You are performing an operation on an entity that isn't in the expected state, 1639// such as trying to update a deleted user. 1640// 1641// * ErrCodeInvalidParameterException "InvalidParameterException" 1642// One or more of the input parameters don't match the service's restrictions. 1643// 1644// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 1645// An operation received a valid organization identifier that either doesn't 1646// belong or exist in the system. 1647// 1648// * ErrCodeOrganizationStateException "OrganizationStateException" 1649// The organization must have a valid state (Active or Synchronizing) to perform 1650// certain operations on the organization or its entities. 1651// 1652// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" 1653// You can't perform a write operation against a read-only directory. 1654// 1655// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateMemberFromGroup 1656func (c *WorkMail) DisassociateMemberFromGroup(input *DisassociateMemberFromGroupInput) (*DisassociateMemberFromGroupOutput, error) { 1657 req, out := c.DisassociateMemberFromGroupRequest(input) 1658 return out, req.Send() 1659} 1660 1661// DisassociateMemberFromGroupWithContext is the same as DisassociateMemberFromGroup with the addition of 1662// the ability to pass a context and additional request options. 1663// 1664// See DisassociateMemberFromGroup for details on how to use this API operation. 1665// 1666// The context must be non-nil and will be used for request cancellation. If 1667// the context is nil a panic will occur. In the future the SDK may create 1668// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1669// for more information on using Contexts. 1670func (c *WorkMail) DisassociateMemberFromGroupWithContext(ctx aws.Context, input *DisassociateMemberFromGroupInput, opts ...request.Option) (*DisassociateMemberFromGroupOutput, error) { 1671 req, out := c.DisassociateMemberFromGroupRequest(input) 1672 req.SetContext(ctx) 1673 req.ApplyOptions(opts...) 1674 return out, req.Send() 1675} 1676 1677const opListAliases = "ListAliases" 1678 1679// ListAliasesRequest generates a "aws/request.Request" representing the 1680// client's request for the ListAliases operation. The "output" return 1681// value will be populated with the request's response once the request complets 1682// successfuly. 1683// 1684// Use "Send" method on the returned Request to send the API call to the service. 1685// the "output" return value is not valid until after Send returns without error. 1686// 1687// See ListAliases for more information on using the ListAliases 1688// API call, and error handling. 1689// 1690// This method is useful when you want to inject custom logic or configuration 1691// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1692// 1693// 1694// // Example sending a request using the ListAliasesRequest method. 1695// req, resp := client.ListAliasesRequest(params) 1696// 1697// err := req.Send() 1698// if err == nil { // resp is now filled 1699// fmt.Println(resp) 1700// } 1701// 1702// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListAliases 1703func (c *WorkMail) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput) { 1704 op := &request.Operation{ 1705 Name: opListAliases, 1706 HTTPMethod: "POST", 1707 HTTPPath: "/", 1708 Paginator: &request.Paginator{ 1709 InputTokens: []string{"NextToken"}, 1710 OutputTokens: []string{"NextToken"}, 1711 LimitToken: "MaxResults", 1712 TruncationToken: "", 1713 }, 1714 } 1715 1716 if input == nil { 1717 input = &ListAliasesInput{} 1718 } 1719 1720 output = &ListAliasesOutput{} 1721 req = c.newRequest(op, input, output) 1722 return 1723} 1724 1725// ListAliases API operation for Amazon WorkMail. 1726// 1727// Creates a paginated call to list the aliases associated with a given entity. 1728// 1729// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1730// with awserr.Error's Code and Message methods to get detailed information about 1731// the error. 1732// 1733// See the AWS API reference guide for Amazon WorkMail's 1734// API operation ListAliases for usage and error information. 1735// 1736// Returned Error Codes: 1737// * ErrCodeEntityNotFoundException "EntityNotFoundException" 1738// The identifier supplied for the entity is valid, but it does not exist in 1739// your organization. 1740// 1741// * ErrCodeEntityStateException "EntityStateException" 1742// You are performing an operation on an entity that isn't in the expected state, 1743// such as trying to update a deleted user. 1744// 1745// * ErrCodeInvalidParameterException "InvalidParameterException" 1746// One or more of the input parameters don't match the service's restrictions. 1747// 1748// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 1749// An operation received a valid organization identifier that either doesn't 1750// belong or exist in the system. 1751// 1752// * ErrCodeOrganizationStateException "OrganizationStateException" 1753// The organization must have a valid state (Active or Synchronizing) to perform 1754// certain operations on the organization or its entities. 1755// 1756// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListAliases 1757func (c *WorkMail) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) { 1758 req, out := c.ListAliasesRequest(input) 1759 return out, req.Send() 1760} 1761 1762// ListAliasesWithContext is the same as ListAliases with the addition of 1763// the ability to pass a context and additional request options. 1764// 1765// See ListAliases for details on how to use this API operation. 1766// 1767// The context must be non-nil and will be used for request cancellation. If 1768// the context is nil a panic will occur. In the future the SDK may create 1769// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1770// for more information on using Contexts. 1771func (c *WorkMail) ListAliasesWithContext(ctx aws.Context, input *ListAliasesInput, opts ...request.Option) (*ListAliasesOutput, error) { 1772 req, out := c.ListAliasesRequest(input) 1773 req.SetContext(ctx) 1774 req.ApplyOptions(opts...) 1775 return out, req.Send() 1776} 1777 1778// ListAliasesPages iterates over the pages of a ListAliases operation, 1779// calling the "fn" function with the response data for each page. To stop 1780// iterating, return false from the fn function. 1781// 1782// See ListAliases method for more information on how to use this operation. 1783// 1784// Note: This operation can generate multiple requests to a service. 1785// 1786// // Example iterating over at most 3 pages of a ListAliases operation. 1787// pageNum := 0 1788// err := client.ListAliasesPages(params, 1789// func(page *ListAliasesOutput, lastPage bool) bool { 1790// pageNum++ 1791// fmt.Println(page) 1792// return pageNum <= 3 1793// }) 1794// 1795func (c *WorkMail) ListAliasesPages(input *ListAliasesInput, fn func(*ListAliasesOutput, bool) bool) error { 1796 return c.ListAliasesPagesWithContext(aws.BackgroundContext(), input, fn) 1797} 1798 1799// ListAliasesPagesWithContext same as ListAliasesPages except 1800// it takes a Context and allows setting request options on the pages. 1801// 1802// The context must be non-nil and will be used for request cancellation. If 1803// the context is nil a panic will occur. In the future the SDK may create 1804// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1805// for more information on using Contexts. 1806func (c *WorkMail) ListAliasesPagesWithContext(ctx aws.Context, input *ListAliasesInput, fn func(*ListAliasesOutput, bool) bool, opts ...request.Option) error { 1807 p := request.Pagination{ 1808 NewRequest: func() (*request.Request, error) { 1809 var inCpy *ListAliasesInput 1810 if input != nil { 1811 tmp := *input 1812 inCpy = &tmp 1813 } 1814 req, _ := c.ListAliasesRequest(inCpy) 1815 req.SetContext(ctx) 1816 req.ApplyOptions(opts...) 1817 return req, nil 1818 }, 1819 } 1820 1821 cont := true 1822 for p.Next() && cont { 1823 cont = fn(p.Page().(*ListAliasesOutput), !p.HasNextPage()) 1824 } 1825 return p.Err() 1826} 1827 1828const opListGroupMembers = "ListGroupMembers" 1829 1830// ListGroupMembersRequest generates a "aws/request.Request" representing the 1831// client's request for the ListGroupMembers operation. The "output" return 1832// value will be populated with the request's response once the request complets 1833// successfuly. 1834// 1835// Use "Send" method on the returned Request to send the API call to the service. 1836// the "output" return value is not valid until after Send returns without error. 1837// 1838// See ListGroupMembers for more information on using the ListGroupMembers 1839// API call, and error handling. 1840// 1841// This method is useful when you want to inject custom logic or configuration 1842// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1843// 1844// 1845// // Example sending a request using the ListGroupMembersRequest method. 1846// req, resp := client.ListGroupMembersRequest(params) 1847// 1848// err := req.Send() 1849// if err == nil { // resp is now filled 1850// fmt.Println(resp) 1851// } 1852// 1853// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroupMembers 1854func (c *WorkMail) ListGroupMembersRequest(input *ListGroupMembersInput) (req *request.Request, output *ListGroupMembersOutput) { 1855 op := &request.Operation{ 1856 Name: opListGroupMembers, 1857 HTTPMethod: "POST", 1858 HTTPPath: "/", 1859 Paginator: &request.Paginator{ 1860 InputTokens: []string{"NextToken"}, 1861 OutputTokens: []string{"NextToken"}, 1862 LimitToken: "MaxResults", 1863 TruncationToken: "", 1864 }, 1865 } 1866 1867 if input == nil { 1868 input = &ListGroupMembersInput{} 1869 } 1870 1871 output = &ListGroupMembersOutput{} 1872 req = c.newRequest(op, input, output) 1873 return 1874} 1875 1876// ListGroupMembers API operation for Amazon WorkMail. 1877// 1878// Returns an overview of the members of a group. 1879// 1880// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1881// with awserr.Error's Code and Message methods to get detailed information about 1882// the error. 1883// 1884// See the AWS API reference guide for Amazon WorkMail's 1885// API operation ListGroupMembers for usage and error information. 1886// 1887// Returned Error Codes: 1888// * ErrCodeEntityNotFoundException "EntityNotFoundException" 1889// The identifier supplied for the entity is valid, but it does not exist in 1890// your organization. 1891// 1892// * ErrCodeEntityStateException "EntityStateException" 1893// You are performing an operation on an entity that isn't in the expected state, 1894// such as trying to update a deleted user. 1895// 1896// * ErrCodeInvalidParameterException "InvalidParameterException" 1897// One or more of the input parameters don't match the service's restrictions. 1898// 1899// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 1900// An operation received a valid organization identifier that either doesn't 1901// belong or exist in the system. 1902// 1903// * ErrCodeOrganizationStateException "OrganizationStateException" 1904// The organization must have a valid state (Active or Synchronizing) to perform 1905// certain operations on the organization or its entities. 1906// 1907// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroupMembers 1908func (c *WorkMail) ListGroupMembers(input *ListGroupMembersInput) (*ListGroupMembersOutput, error) { 1909 req, out := c.ListGroupMembersRequest(input) 1910 return out, req.Send() 1911} 1912 1913// ListGroupMembersWithContext is the same as ListGroupMembers with the addition of 1914// the ability to pass a context and additional request options. 1915// 1916// See ListGroupMembers for details on how to use this API operation. 1917// 1918// The context must be non-nil and will be used for request cancellation. If 1919// the context is nil a panic will occur. In the future the SDK may create 1920// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1921// for more information on using Contexts. 1922func (c *WorkMail) ListGroupMembersWithContext(ctx aws.Context, input *ListGroupMembersInput, opts ...request.Option) (*ListGroupMembersOutput, error) { 1923 req, out := c.ListGroupMembersRequest(input) 1924 req.SetContext(ctx) 1925 req.ApplyOptions(opts...) 1926 return out, req.Send() 1927} 1928 1929// ListGroupMembersPages iterates over the pages of a ListGroupMembers operation, 1930// calling the "fn" function with the response data for each page. To stop 1931// iterating, return false from the fn function. 1932// 1933// See ListGroupMembers method for more information on how to use this operation. 1934// 1935// Note: This operation can generate multiple requests to a service. 1936// 1937// // Example iterating over at most 3 pages of a ListGroupMembers operation. 1938// pageNum := 0 1939// err := client.ListGroupMembersPages(params, 1940// func(page *ListGroupMembersOutput, lastPage bool) bool { 1941// pageNum++ 1942// fmt.Println(page) 1943// return pageNum <= 3 1944// }) 1945// 1946func (c *WorkMail) ListGroupMembersPages(input *ListGroupMembersInput, fn func(*ListGroupMembersOutput, bool) bool) error { 1947 return c.ListGroupMembersPagesWithContext(aws.BackgroundContext(), input, fn) 1948} 1949 1950// ListGroupMembersPagesWithContext same as ListGroupMembersPages except 1951// it takes a Context and allows setting request options on the pages. 1952// 1953// The context must be non-nil and will be used for request cancellation. If 1954// the context is nil a panic will occur. In the future the SDK may create 1955// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1956// for more information on using Contexts. 1957func (c *WorkMail) ListGroupMembersPagesWithContext(ctx aws.Context, input *ListGroupMembersInput, fn func(*ListGroupMembersOutput, bool) bool, opts ...request.Option) error { 1958 p := request.Pagination{ 1959 NewRequest: func() (*request.Request, error) { 1960 var inCpy *ListGroupMembersInput 1961 if input != nil { 1962 tmp := *input 1963 inCpy = &tmp 1964 } 1965 req, _ := c.ListGroupMembersRequest(inCpy) 1966 req.SetContext(ctx) 1967 req.ApplyOptions(opts...) 1968 return req, nil 1969 }, 1970 } 1971 1972 cont := true 1973 for p.Next() && cont { 1974 cont = fn(p.Page().(*ListGroupMembersOutput), !p.HasNextPage()) 1975 } 1976 return p.Err() 1977} 1978 1979const opListGroups = "ListGroups" 1980 1981// ListGroupsRequest generates a "aws/request.Request" representing the 1982// client's request for the ListGroups operation. The "output" return 1983// value will be populated with the request's response once the request complets 1984// successfuly. 1985// 1986// Use "Send" method on the returned Request to send the API call to the service. 1987// the "output" return value is not valid until after Send returns without error. 1988// 1989// See ListGroups for more information on using the ListGroups 1990// API call, and error handling. 1991// 1992// This method is useful when you want to inject custom logic or configuration 1993// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1994// 1995// 1996// // Example sending a request using the ListGroupsRequest method. 1997// req, resp := client.ListGroupsRequest(params) 1998// 1999// err := req.Send() 2000// if err == nil { // resp is now filled 2001// fmt.Println(resp) 2002// } 2003// 2004// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroups 2005func (c *WorkMail) ListGroupsRequest(input *ListGroupsInput) (req *request.Request, output *ListGroupsOutput) { 2006 op := &request.Operation{ 2007 Name: opListGroups, 2008 HTTPMethod: "POST", 2009 HTTPPath: "/", 2010 Paginator: &request.Paginator{ 2011 InputTokens: []string{"NextToken"}, 2012 OutputTokens: []string{"NextToken"}, 2013 LimitToken: "MaxResults", 2014 TruncationToken: "", 2015 }, 2016 } 2017 2018 if input == nil { 2019 input = &ListGroupsInput{} 2020 } 2021 2022 output = &ListGroupsOutput{} 2023 req = c.newRequest(op, input, output) 2024 return 2025} 2026 2027// ListGroups API operation for Amazon WorkMail. 2028// 2029// Returns summaries of the organization's groups. 2030// 2031// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2032// with awserr.Error's Code and Message methods to get detailed information about 2033// the error. 2034// 2035// See the AWS API reference guide for Amazon WorkMail's 2036// API operation ListGroups for usage and error information. 2037// 2038// Returned Error Codes: 2039// * ErrCodeEntityNotFoundException "EntityNotFoundException" 2040// The identifier supplied for the entity is valid, but it does not exist in 2041// your organization. 2042// 2043// * ErrCodeInvalidParameterException "InvalidParameterException" 2044// One or more of the input parameters don't match the service's restrictions. 2045// 2046// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 2047// An operation received a valid organization identifier that either doesn't 2048// belong or exist in the system. 2049// 2050// * ErrCodeOrganizationStateException "OrganizationStateException" 2051// The organization must have a valid state (Active or Synchronizing) to perform 2052// certain operations on the organization or its entities. 2053// 2054// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroups 2055func (c *WorkMail) ListGroups(input *ListGroupsInput) (*ListGroupsOutput, error) { 2056 req, out := c.ListGroupsRequest(input) 2057 return out, req.Send() 2058} 2059 2060// ListGroupsWithContext is the same as ListGroups with the addition of 2061// the ability to pass a context and additional request options. 2062// 2063// See ListGroups for details on how to use this API operation. 2064// 2065// The context must be non-nil and will be used for request cancellation. If 2066// the context is nil a panic will occur. In the future the SDK may create 2067// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2068// for more information on using Contexts. 2069func (c *WorkMail) ListGroupsWithContext(ctx aws.Context, input *ListGroupsInput, opts ...request.Option) (*ListGroupsOutput, error) { 2070 req, out := c.ListGroupsRequest(input) 2071 req.SetContext(ctx) 2072 req.ApplyOptions(opts...) 2073 return out, req.Send() 2074} 2075 2076// ListGroupsPages iterates over the pages of a ListGroups operation, 2077// calling the "fn" function with the response data for each page. To stop 2078// iterating, return false from the fn function. 2079// 2080// See ListGroups method for more information on how to use this operation. 2081// 2082// Note: This operation can generate multiple requests to a service. 2083// 2084// // Example iterating over at most 3 pages of a ListGroups operation. 2085// pageNum := 0 2086// err := client.ListGroupsPages(params, 2087// func(page *ListGroupsOutput, lastPage bool) bool { 2088// pageNum++ 2089// fmt.Println(page) 2090// return pageNum <= 3 2091// }) 2092// 2093func (c *WorkMail) ListGroupsPages(input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool) error { 2094 return c.ListGroupsPagesWithContext(aws.BackgroundContext(), input, fn) 2095} 2096 2097// ListGroupsPagesWithContext same as ListGroupsPages except 2098// it takes a Context and allows setting request options on the pages. 2099// 2100// The context must be non-nil and will be used for request cancellation. If 2101// the context is nil a panic will occur. In the future the SDK may create 2102// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2103// for more information on using Contexts. 2104func (c *WorkMail) ListGroupsPagesWithContext(ctx aws.Context, input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool, opts ...request.Option) error { 2105 p := request.Pagination{ 2106 NewRequest: func() (*request.Request, error) { 2107 var inCpy *ListGroupsInput 2108 if input != nil { 2109 tmp := *input 2110 inCpy = &tmp 2111 } 2112 req, _ := c.ListGroupsRequest(inCpy) 2113 req.SetContext(ctx) 2114 req.ApplyOptions(opts...) 2115 return req, nil 2116 }, 2117 } 2118 2119 cont := true 2120 for p.Next() && cont { 2121 cont = fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) 2122 } 2123 return p.Err() 2124} 2125 2126const opListOrganizations = "ListOrganizations" 2127 2128// ListOrganizationsRequest generates a "aws/request.Request" representing the 2129// client's request for the ListOrganizations operation. The "output" return 2130// value will be populated with the request's response once the request complets 2131// successfuly. 2132// 2133// Use "Send" method on the returned Request to send the API call to the service. 2134// the "output" return value is not valid until after Send returns without error. 2135// 2136// See ListOrganizations for more information on using the ListOrganizations 2137// API call, and error handling. 2138// 2139// This method is useful when you want to inject custom logic or configuration 2140// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2141// 2142// 2143// // Example sending a request using the ListOrganizationsRequest method. 2144// req, resp := client.ListOrganizationsRequest(params) 2145// 2146// err := req.Send() 2147// if err == nil { // resp is now filled 2148// fmt.Println(resp) 2149// } 2150// 2151// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListOrganizations 2152func (c *WorkMail) ListOrganizationsRequest(input *ListOrganizationsInput) (req *request.Request, output *ListOrganizationsOutput) { 2153 op := &request.Operation{ 2154 Name: opListOrganizations, 2155 HTTPMethod: "POST", 2156 HTTPPath: "/", 2157 Paginator: &request.Paginator{ 2158 InputTokens: []string{"NextToken"}, 2159 OutputTokens: []string{"NextToken"}, 2160 LimitToken: "MaxResults", 2161 TruncationToken: "", 2162 }, 2163 } 2164 2165 if input == nil { 2166 input = &ListOrganizationsInput{} 2167 } 2168 2169 output = &ListOrganizationsOutput{} 2170 req = c.newRequest(op, input, output) 2171 return 2172} 2173 2174// ListOrganizations API operation for Amazon WorkMail. 2175// 2176// Returns summaries of the customer's non-deleted organizations. 2177// 2178// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2179// with awserr.Error's Code and Message methods to get detailed information about 2180// the error. 2181// 2182// See the AWS API reference guide for Amazon WorkMail's 2183// API operation ListOrganizations for usage and error information. 2184// 2185// Returned Error Codes: 2186// * ErrCodeInvalidParameterException "InvalidParameterException" 2187// One or more of the input parameters don't match the service's restrictions. 2188// 2189// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListOrganizations 2190func (c *WorkMail) ListOrganizations(input *ListOrganizationsInput) (*ListOrganizationsOutput, error) { 2191 req, out := c.ListOrganizationsRequest(input) 2192 return out, req.Send() 2193} 2194 2195// ListOrganizationsWithContext is the same as ListOrganizations with the addition of 2196// the ability to pass a context and additional request options. 2197// 2198// See ListOrganizations for details on how to use this API operation. 2199// 2200// The context must be non-nil and will be used for request cancellation. If 2201// the context is nil a panic will occur. In the future the SDK may create 2202// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2203// for more information on using Contexts. 2204func (c *WorkMail) ListOrganizationsWithContext(ctx aws.Context, input *ListOrganizationsInput, opts ...request.Option) (*ListOrganizationsOutput, error) { 2205 req, out := c.ListOrganizationsRequest(input) 2206 req.SetContext(ctx) 2207 req.ApplyOptions(opts...) 2208 return out, req.Send() 2209} 2210 2211// ListOrganizationsPages iterates over the pages of a ListOrganizations operation, 2212// calling the "fn" function with the response data for each page. To stop 2213// iterating, return false from the fn function. 2214// 2215// See ListOrganizations method for more information on how to use this operation. 2216// 2217// Note: This operation can generate multiple requests to a service. 2218// 2219// // Example iterating over at most 3 pages of a ListOrganizations operation. 2220// pageNum := 0 2221// err := client.ListOrganizationsPages(params, 2222// func(page *ListOrganizationsOutput, lastPage bool) bool { 2223// pageNum++ 2224// fmt.Println(page) 2225// return pageNum <= 3 2226// }) 2227// 2228func (c *WorkMail) ListOrganizationsPages(input *ListOrganizationsInput, fn func(*ListOrganizationsOutput, bool) bool) error { 2229 return c.ListOrganizationsPagesWithContext(aws.BackgroundContext(), input, fn) 2230} 2231 2232// ListOrganizationsPagesWithContext same as ListOrganizationsPages except 2233// it takes a Context and allows setting request options on the pages. 2234// 2235// The context must be non-nil and will be used for request cancellation. If 2236// the context is nil a panic will occur. In the future the SDK may create 2237// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2238// for more information on using Contexts. 2239func (c *WorkMail) ListOrganizationsPagesWithContext(ctx aws.Context, input *ListOrganizationsInput, fn func(*ListOrganizationsOutput, bool) bool, opts ...request.Option) error { 2240 p := request.Pagination{ 2241 NewRequest: func() (*request.Request, error) { 2242 var inCpy *ListOrganizationsInput 2243 if input != nil { 2244 tmp := *input 2245 inCpy = &tmp 2246 } 2247 req, _ := c.ListOrganizationsRequest(inCpy) 2248 req.SetContext(ctx) 2249 req.ApplyOptions(opts...) 2250 return req, nil 2251 }, 2252 } 2253 2254 cont := true 2255 for p.Next() && cont { 2256 cont = fn(p.Page().(*ListOrganizationsOutput), !p.HasNextPage()) 2257 } 2258 return p.Err() 2259} 2260 2261const opListResourceDelegates = "ListResourceDelegates" 2262 2263// ListResourceDelegatesRequest generates a "aws/request.Request" representing the 2264// client's request for the ListResourceDelegates operation. The "output" return 2265// value will be populated with the request's response once the request complets 2266// successfuly. 2267// 2268// Use "Send" method on the returned Request to send the API call to the service. 2269// the "output" return value is not valid until after Send returns without error. 2270// 2271// See ListResourceDelegates for more information on using the ListResourceDelegates 2272// API call, and error handling. 2273// 2274// This method is useful when you want to inject custom logic or configuration 2275// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2276// 2277// 2278// // Example sending a request using the ListResourceDelegatesRequest method. 2279// req, resp := client.ListResourceDelegatesRequest(params) 2280// 2281// err := req.Send() 2282// if err == nil { // resp is now filled 2283// fmt.Println(resp) 2284// } 2285// 2286// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResourceDelegates 2287func (c *WorkMail) ListResourceDelegatesRequest(input *ListResourceDelegatesInput) (req *request.Request, output *ListResourceDelegatesOutput) { 2288 op := &request.Operation{ 2289 Name: opListResourceDelegates, 2290 HTTPMethod: "POST", 2291 HTTPPath: "/", 2292 } 2293 2294 if input == nil { 2295 input = &ListResourceDelegatesInput{} 2296 } 2297 2298 output = &ListResourceDelegatesOutput{} 2299 req = c.newRequest(op, input, output) 2300 return 2301} 2302 2303// ListResourceDelegates API operation for Amazon WorkMail. 2304// 2305// Lists the delegates associated with a resource. Users and groups can be resource 2306// delegates and answer requests on behalf of the resource. 2307// 2308// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2309// with awserr.Error's Code and Message methods to get detailed information about 2310// the error. 2311// 2312// See the AWS API reference guide for Amazon WorkMail's 2313// API operation ListResourceDelegates for usage and error information. 2314// 2315// Returned Error Codes: 2316// * ErrCodeEntityNotFoundException "EntityNotFoundException" 2317// The identifier supplied for the entity is valid, but it does not exist in 2318// your organization. 2319// 2320// * ErrCodeEntityStateException "EntityStateException" 2321// You are performing an operation on an entity that isn't in the expected state, 2322// such as trying to update a deleted user. 2323// 2324// * ErrCodeInvalidParameterException "InvalidParameterException" 2325// One or more of the input parameters don't match the service's restrictions. 2326// 2327// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 2328// An operation received a valid organization identifier that either doesn't 2329// belong or exist in the system. 2330// 2331// * ErrCodeOrganizationStateException "OrganizationStateException" 2332// The organization must have a valid state (Active or Synchronizing) to perform 2333// certain operations on the organization or its entities. 2334// 2335// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResourceDelegates 2336func (c *WorkMail) ListResourceDelegates(input *ListResourceDelegatesInput) (*ListResourceDelegatesOutput, error) { 2337 req, out := c.ListResourceDelegatesRequest(input) 2338 return out, req.Send() 2339} 2340 2341// ListResourceDelegatesWithContext is the same as ListResourceDelegates with the addition of 2342// the ability to pass a context and additional request options. 2343// 2344// See ListResourceDelegates for details on how to use this API operation. 2345// 2346// The context must be non-nil and will be used for request cancellation. If 2347// the context is nil a panic will occur. In the future the SDK may create 2348// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2349// for more information on using Contexts. 2350func (c *WorkMail) ListResourceDelegatesWithContext(ctx aws.Context, input *ListResourceDelegatesInput, opts ...request.Option) (*ListResourceDelegatesOutput, error) { 2351 req, out := c.ListResourceDelegatesRequest(input) 2352 req.SetContext(ctx) 2353 req.ApplyOptions(opts...) 2354 return out, req.Send() 2355} 2356 2357const opListResources = "ListResources" 2358 2359// ListResourcesRequest generates a "aws/request.Request" representing the 2360// client's request for the ListResources operation. The "output" return 2361// value will be populated with the request's response once the request complets 2362// successfuly. 2363// 2364// Use "Send" method on the returned Request to send the API call to the service. 2365// the "output" return value is not valid until after Send returns without error. 2366// 2367// See ListResources for more information on using the ListResources 2368// API call, and error handling. 2369// 2370// This method is useful when you want to inject custom logic or configuration 2371// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2372// 2373// 2374// // Example sending a request using the ListResourcesRequest method. 2375// req, resp := client.ListResourcesRequest(params) 2376// 2377// err := req.Send() 2378// if err == nil { // resp is now filled 2379// fmt.Println(resp) 2380// } 2381// 2382// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResources 2383func (c *WorkMail) ListResourcesRequest(input *ListResourcesInput) (req *request.Request, output *ListResourcesOutput) { 2384 op := &request.Operation{ 2385 Name: opListResources, 2386 HTTPMethod: "POST", 2387 HTTPPath: "/", 2388 Paginator: &request.Paginator{ 2389 InputTokens: []string{"NextToken"}, 2390 OutputTokens: []string{"NextToken"}, 2391 LimitToken: "MaxResults", 2392 TruncationToken: "", 2393 }, 2394 } 2395 2396 if input == nil { 2397 input = &ListResourcesInput{} 2398 } 2399 2400 output = &ListResourcesOutput{} 2401 req = c.newRequest(op, input, output) 2402 return 2403} 2404 2405// ListResources API operation for Amazon WorkMail. 2406// 2407// Returns summaries of the organization's resources. 2408// 2409// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2410// with awserr.Error's Code and Message methods to get detailed information about 2411// the error. 2412// 2413// See the AWS API reference guide for Amazon WorkMail's 2414// API operation ListResources for usage and error information. 2415// 2416// Returned Error Codes: 2417// * ErrCodeInvalidParameterException "InvalidParameterException" 2418// One or more of the input parameters don't match the service's restrictions. 2419// 2420// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 2421// An operation received a valid organization identifier that either doesn't 2422// belong or exist in the system. 2423// 2424// * ErrCodeOrganizationStateException "OrganizationStateException" 2425// The organization must have a valid state (Active or Synchronizing) to perform 2426// certain operations on the organization or its entities. 2427// 2428// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResources 2429func (c *WorkMail) ListResources(input *ListResourcesInput) (*ListResourcesOutput, error) { 2430 req, out := c.ListResourcesRequest(input) 2431 return out, req.Send() 2432} 2433 2434// ListResourcesWithContext is the same as ListResources with the addition of 2435// the ability to pass a context and additional request options. 2436// 2437// See ListResources for details on how to use this API operation. 2438// 2439// The context must be non-nil and will be used for request cancellation. If 2440// the context is nil a panic will occur. In the future the SDK may create 2441// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2442// for more information on using Contexts. 2443func (c *WorkMail) ListResourcesWithContext(ctx aws.Context, input *ListResourcesInput, opts ...request.Option) (*ListResourcesOutput, error) { 2444 req, out := c.ListResourcesRequest(input) 2445 req.SetContext(ctx) 2446 req.ApplyOptions(opts...) 2447 return out, req.Send() 2448} 2449 2450// ListResourcesPages iterates over the pages of a ListResources operation, 2451// calling the "fn" function with the response data for each page. To stop 2452// iterating, return false from the fn function. 2453// 2454// See ListResources method for more information on how to use this operation. 2455// 2456// Note: This operation can generate multiple requests to a service. 2457// 2458// // Example iterating over at most 3 pages of a ListResources operation. 2459// pageNum := 0 2460// err := client.ListResourcesPages(params, 2461// func(page *ListResourcesOutput, lastPage bool) bool { 2462// pageNum++ 2463// fmt.Println(page) 2464// return pageNum <= 3 2465// }) 2466// 2467func (c *WorkMail) ListResourcesPages(input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool) error { 2468 return c.ListResourcesPagesWithContext(aws.BackgroundContext(), input, fn) 2469} 2470 2471// ListResourcesPagesWithContext same as ListResourcesPages except 2472// it takes a Context and allows setting request options on the pages. 2473// 2474// The context must be non-nil and will be used for request cancellation. If 2475// the context is nil a panic will occur. In the future the SDK may create 2476// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2477// for more information on using Contexts. 2478func (c *WorkMail) ListResourcesPagesWithContext(ctx aws.Context, input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool, opts ...request.Option) error { 2479 p := request.Pagination{ 2480 NewRequest: func() (*request.Request, error) { 2481 var inCpy *ListResourcesInput 2482 if input != nil { 2483 tmp := *input 2484 inCpy = &tmp 2485 } 2486 req, _ := c.ListResourcesRequest(inCpy) 2487 req.SetContext(ctx) 2488 req.ApplyOptions(opts...) 2489 return req, nil 2490 }, 2491 } 2492 2493 cont := true 2494 for p.Next() && cont { 2495 cont = fn(p.Page().(*ListResourcesOutput), !p.HasNextPage()) 2496 } 2497 return p.Err() 2498} 2499 2500const opListUsers = "ListUsers" 2501 2502// ListUsersRequest generates a "aws/request.Request" representing the 2503// client's request for the ListUsers operation. The "output" return 2504// value will be populated with the request's response once the request complets 2505// successfuly. 2506// 2507// Use "Send" method on the returned Request to send the API call to the service. 2508// the "output" return value is not valid until after Send returns without error. 2509// 2510// See ListUsers for more information on using the ListUsers 2511// API call, and error handling. 2512// 2513// This method is useful when you want to inject custom logic or configuration 2514// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2515// 2516// 2517// // Example sending a request using the ListUsersRequest method. 2518// req, resp := client.ListUsersRequest(params) 2519// 2520// err := req.Send() 2521// if err == nil { // resp is now filled 2522// fmt.Println(resp) 2523// } 2524// 2525// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListUsers 2526func (c *WorkMail) ListUsersRequest(input *ListUsersInput) (req *request.Request, output *ListUsersOutput) { 2527 op := &request.Operation{ 2528 Name: opListUsers, 2529 HTTPMethod: "POST", 2530 HTTPPath: "/", 2531 Paginator: &request.Paginator{ 2532 InputTokens: []string{"NextToken"}, 2533 OutputTokens: []string{"NextToken"}, 2534 LimitToken: "MaxResults", 2535 TruncationToken: "", 2536 }, 2537 } 2538 2539 if input == nil { 2540 input = &ListUsersInput{} 2541 } 2542 2543 output = &ListUsersOutput{} 2544 req = c.newRequest(op, input, output) 2545 return 2546} 2547 2548// ListUsers API operation for Amazon WorkMail. 2549// 2550// Returns summaries of the organization's users. 2551// 2552// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2553// with awserr.Error's Code and Message methods to get detailed information about 2554// the error. 2555// 2556// See the AWS API reference guide for Amazon WorkMail's 2557// API operation ListUsers for usage and error information. 2558// 2559// Returned Error Codes: 2560// * ErrCodeInvalidParameterException "InvalidParameterException" 2561// One or more of the input parameters don't match the service's restrictions. 2562// 2563// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 2564// An operation received a valid organization identifier that either doesn't 2565// belong or exist in the system. 2566// 2567// * ErrCodeOrganizationStateException "OrganizationStateException" 2568// The organization must have a valid state (Active or Synchronizing) to perform 2569// certain operations on the organization or its entities. 2570// 2571// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListUsers 2572func (c *WorkMail) ListUsers(input *ListUsersInput) (*ListUsersOutput, error) { 2573 req, out := c.ListUsersRequest(input) 2574 return out, req.Send() 2575} 2576 2577// ListUsersWithContext is the same as ListUsers with the addition of 2578// the ability to pass a context and additional request options. 2579// 2580// See ListUsers for details on how to use this API operation. 2581// 2582// The context must be non-nil and will be used for request cancellation. If 2583// the context is nil a panic will occur. In the future the SDK may create 2584// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2585// for more information on using Contexts. 2586func (c *WorkMail) ListUsersWithContext(ctx aws.Context, input *ListUsersInput, opts ...request.Option) (*ListUsersOutput, error) { 2587 req, out := c.ListUsersRequest(input) 2588 req.SetContext(ctx) 2589 req.ApplyOptions(opts...) 2590 return out, req.Send() 2591} 2592 2593// ListUsersPages iterates over the pages of a ListUsers operation, 2594// calling the "fn" function with the response data for each page. To stop 2595// iterating, return false from the fn function. 2596// 2597// See ListUsers method for more information on how to use this operation. 2598// 2599// Note: This operation can generate multiple requests to a service. 2600// 2601// // Example iterating over at most 3 pages of a ListUsers operation. 2602// pageNum := 0 2603// err := client.ListUsersPages(params, 2604// func(page *ListUsersOutput, lastPage bool) bool { 2605// pageNum++ 2606// fmt.Println(page) 2607// return pageNum <= 3 2608// }) 2609// 2610func (c *WorkMail) ListUsersPages(input *ListUsersInput, fn func(*ListUsersOutput, bool) bool) error { 2611 return c.ListUsersPagesWithContext(aws.BackgroundContext(), input, fn) 2612} 2613 2614// ListUsersPagesWithContext same as ListUsersPages except 2615// it takes a Context and allows setting request options on the pages. 2616// 2617// The context must be non-nil and will be used for request cancellation. If 2618// the context is nil a panic will occur. In the future the SDK may create 2619// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2620// for more information on using Contexts. 2621func (c *WorkMail) ListUsersPagesWithContext(ctx aws.Context, input *ListUsersInput, fn func(*ListUsersOutput, bool) bool, opts ...request.Option) error { 2622 p := request.Pagination{ 2623 NewRequest: func() (*request.Request, error) { 2624 var inCpy *ListUsersInput 2625 if input != nil { 2626 tmp := *input 2627 inCpy = &tmp 2628 } 2629 req, _ := c.ListUsersRequest(inCpy) 2630 req.SetContext(ctx) 2631 req.ApplyOptions(opts...) 2632 return req, nil 2633 }, 2634 } 2635 2636 cont := true 2637 for p.Next() && cont { 2638 cont = fn(p.Page().(*ListUsersOutput), !p.HasNextPage()) 2639 } 2640 return p.Err() 2641} 2642 2643const opRegisterToWorkMail = "RegisterToWorkMail" 2644 2645// RegisterToWorkMailRequest generates a "aws/request.Request" representing the 2646// client's request for the RegisterToWorkMail operation. The "output" return 2647// value will be populated with the request's response once the request complets 2648// successfuly. 2649// 2650// Use "Send" method on the returned Request to send the API call to the service. 2651// the "output" return value is not valid until after Send returns without error. 2652// 2653// See RegisterToWorkMail for more information on using the RegisterToWorkMail 2654// API call, and error handling. 2655// 2656// This method is useful when you want to inject custom logic or configuration 2657// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2658// 2659// 2660// // Example sending a request using the RegisterToWorkMailRequest method. 2661// req, resp := client.RegisterToWorkMailRequest(params) 2662// 2663// err := req.Send() 2664// if err == nil { // resp is now filled 2665// fmt.Println(resp) 2666// } 2667// 2668// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail 2669func (c *WorkMail) RegisterToWorkMailRequest(input *RegisterToWorkMailInput) (req *request.Request, output *RegisterToWorkMailOutput) { 2670 op := &request.Operation{ 2671 Name: opRegisterToWorkMail, 2672 HTTPMethod: "POST", 2673 HTTPPath: "/", 2674 } 2675 2676 if input == nil { 2677 input = &RegisterToWorkMailInput{} 2678 } 2679 2680 output = &RegisterToWorkMailOutput{} 2681 req = c.newRequest(op, input, output) 2682 return 2683} 2684 2685// RegisterToWorkMail API operation for Amazon WorkMail. 2686// 2687// Registers an existing and disabled user, group, or resource/entity for Amazon 2688// WorkMail use by associating a mailbox and calendaring capabilities. It performs 2689// no change if the entity is enabled and fails if the entity is deleted. This 2690// operation results in the accumulation of costs. For more information, see 2691// Pricing (http://aws.amazon.com/workmail/pricing). The equivalent console 2692// functionality for this operation is Enable. Users can either be created by 2693// calling the CreateUser API or they can be synchronized from your directory. 2694// For more information, see DeregisterFromWorkMail. 2695// 2696// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2697// with awserr.Error's Code and Message methods to get detailed information about 2698// the error. 2699// 2700// See the AWS API reference guide for Amazon WorkMail's 2701// API operation RegisterToWorkMail for usage and error information. 2702// 2703// Returned Error Codes: 2704// * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException" 2705// The Directory Service doesn't recognize the credentials supplied by the Amazon 2706// WorkMail service. 2707// 2708// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" 2709// The directory that you are trying to perform operations on isn't available. 2710// 2711// * ErrCodeEmailAddressInUseException "EmailAddressInUseException" 2712// The email address that you're trying to assign is already created for a different 2713// user, group, or resource. 2714// 2715// * ErrCodeEntityNotFoundException "EntityNotFoundException" 2716// The identifier supplied for the entity is valid, but it does not exist in 2717// your organization. 2718// 2719// * ErrCodeEntityStateException "EntityStateException" 2720// You are performing an operation on an entity that isn't in the expected state, 2721// such as trying to update a deleted user. 2722// 2723// * ErrCodeEntityAlreadyRegisteredException "EntityAlreadyRegisteredException" 2724// The user, group, or resource that you're trying to register is already registered. 2725// 2726// * ErrCodeInvalidParameterException "InvalidParameterException" 2727// One or more of the input parameters don't match the service's restrictions. 2728// 2729// * ErrCodeMailDomainNotFoundException "MailDomainNotFoundException" 2730// For an email or alias to be created in Amazon WorkMail, the included domain 2731// must be defined in the organization. 2732// 2733// * ErrCodeMailDomainStateException "MailDomainStateException" 2734// After a domain has been added to the organization, it must be verified. The 2735// domain is not yet verified. 2736// 2737// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 2738// An operation received a valid organization identifier that either doesn't 2739// belong or exist in the system. 2740// 2741// * ErrCodeOrganizationStateException "OrganizationStateException" 2742// The organization must have a valid state (Active or Synchronizing) to perform 2743// certain operations on the organization or its entities. 2744// 2745// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail 2746func (c *WorkMail) RegisterToWorkMail(input *RegisterToWorkMailInput) (*RegisterToWorkMailOutput, error) { 2747 req, out := c.RegisterToWorkMailRequest(input) 2748 return out, req.Send() 2749} 2750 2751// RegisterToWorkMailWithContext is the same as RegisterToWorkMail with the addition of 2752// the ability to pass a context and additional request options. 2753// 2754// See RegisterToWorkMail for details on how to use this API operation. 2755// 2756// The context must be non-nil and will be used for request cancellation. If 2757// the context is nil a panic will occur. In the future the SDK may create 2758// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2759// for more information on using Contexts. 2760func (c *WorkMail) RegisterToWorkMailWithContext(ctx aws.Context, input *RegisterToWorkMailInput, opts ...request.Option) (*RegisterToWorkMailOutput, error) { 2761 req, out := c.RegisterToWorkMailRequest(input) 2762 req.SetContext(ctx) 2763 req.ApplyOptions(opts...) 2764 return out, req.Send() 2765} 2766 2767const opResetPassword = "ResetPassword" 2768 2769// ResetPasswordRequest generates a "aws/request.Request" representing the 2770// client's request for the ResetPassword operation. The "output" return 2771// value will be populated with the request's response once the request complets 2772// successfuly. 2773// 2774// Use "Send" method on the returned Request to send the API call to the service. 2775// the "output" return value is not valid until after Send returns without error. 2776// 2777// See ResetPassword for more information on using the ResetPassword 2778// API call, and error handling. 2779// 2780// This method is useful when you want to inject custom logic or configuration 2781// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2782// 2783// 2784// // Example sending a request using the ResetPasswordRequest method. 2785// req, resp := client.ResetPasswordRequest(params) 2786// 2787// err := req.Send() 2788// if err == nil { // resp is now filled 2789// fmt.Println(resp) 2790// } 2791// 2792// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ResetPassword 2793func (c *WorkMail) ResetPasswordRequest(input *ResetPasswordInput) (req *request.Request, output *ResetPasswordOutput) { 2794 op := &request.Operation{ 2795 Name: opResetPassword, 2796 HTTPMethod: "POST", 2797 HTTPPath: "/", 2798 } 2799 2800 if input == nil { 2801 input = &ResetPasswordInput{} 2802 } 2803 2804 output = &ResetPasswordOutput{} 2805 req = c.newRequest(op, input, output) 2806 return 2807} 2808 2809// ResetPassword API operation for Amazon WorkMail. 2810// 2811// Allows the administrator to reset the password for a user. 2812// 2813// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2814// with awserr.Error's Code and Message methods to get detailed information about 2815// the error. 2816// 2817// See the AWS API reference guide for Amazon WorkMail's 2818// API operation ResetPassword for usage and error information. 2819// 2820// Returned Error Codes: 2821// * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException" 2822// The Directory Service doesn't recognize the credentials supplied by the Amazon 2823// WorkMail service. 2824// 2825// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" 2826// The directory that you are trying to perform operations on isn't available. 2827// 2828// * ErrCodeEntityNotFoundException "EntityNotFoundException" 2829// The identifier supplied for the entity is valid, but it does not exist in 2830// your organization. 2831// 2832// * ErrCodeEntityStateException "EntityStateException" 2833// You are performing an operation on an entity that isn't in the expected state, 2834// such as trying to update a deleted user. 2835// 2836// * ErrCodeInvalidParameterException "InvalidParameterException" 2837// One or more of the input parameters don't match the service's restrictions. 2838// 2839// * ErrCodeInvalidPasswordException "InvalidPasswordException" 2840// The supplied password doesn't match the minimum security constraints, such 2841// as length or use of special characters. 2842// 2843// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 2844// An operation received a valid organization identifier that either doesn't 2845// belong or exist in the system. 2846// 2847// * ErrCodeOrganizationStateException "OrganizationStateException" 2848// The organization must have a valid state (Active or Synchronizing) to perform 2849// certain operations on the organization or its entities. 2850// 2851// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" 2852// You can't perform a write operation against a read-only directory. 2853// 2854// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ResetPassword 2855func (c *WorkMail) ResetPassword(input *ResetPasswordInput) (*ResetPasswordOutput, error) { 2856 req, out := c.ResetPasswordRequest(input) 2857 return out, req.Send() 2858} 2859 2860// ResetPasswordWithContext is the same as ResetPassword with the addition of 2861// the ability to pass a context and additional request options. 2862// 2863// See ResetPassword for details on how to use this API operation. 2864// 2865// The context must be non-nil and will be used for request cancellation. If 2866// the context is nil a panic will occur. In the future the SDK may create 2867// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2868// for more information on using Contexts. 2869func (c *WorkMail) ResetPasswordWithContext(ctx aws.Context, input *ResetPasswordInput, opts ...request.Option) (*ResetPasswordOutput, error) { 2870 req, out := c.ResetPasswordRequest(input) 2871 req.SetContext(ctx) 2872 req.ApplyOptions(opts...) 2873 return out, req.Send() 2874} 2875 2876const opUpdatePrimaryEmailAddress = "UpdatePrimaryEmailAddress" 2877 2878// UpdatePrimaryEmailAddressRequest generates a "aws/request.Request" representing the 2879// client's request for the UpdatePrimaryEmailAddress operation. The "output" return 2880// value will be populated with the request's response once the request complets 2881// successfuly. 2882// 2883// Use "Send" method on the returned Request to send the API call to the service. 2884// the "output" return value is not valid until after Send returns without error. 2885// 2886// See UpdatePrimaryEmailAddress for more information on using the UpdatePrimaryEmailAddress 2887// API call, and error handling. 2888// 2889// This method is useful when you want to inject custom logic or configuration 2890// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2891// 2892// 2893// // Example sending a request using the UpdatePrimaryEmailAddressRequest method. 2894// req, resp := client.UpdatePrimaryEmailAddressRequest(params) 2895// 2896// err := req.Send() 2897// if err == nil { // resp is now filled 2898// fmt.Println(resp) 2899// } 2900// 2901// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdatePrimaryEmailAddress 2902func (c *WorkMail) UpdatePrimaryEmailAddressRequest(input *UpdatePrimaryEmailAddressInput) (req *request.Request, output *UpdatePrimaryEmailAddressOutput) { 2903 op := &request.Operation{ 2904 Name: opUpdatePrimaryEmailAddress, 2905 HTTPMethod: "POST", 2906 HTTPPath: "/", 2907 } 2908 2909 if input == nil { 2910 input = &UpdatePrimaryEmailAddressInput{} 2911 } 2912 2913 output = &UpdatePrimaryEmailAddressOutput{} 2914 req = c.newRequest(op, input, output) 2915 return 2916} 2917 2918// UpdatePrimaryEmailAddress API operation for Amazon WorkMail. 2919// 2920// Updates the primary email for an entity. The current email is moved into 2921// the list of aliases (or swapped between an existing alias and the current 2922// primary email) and the email provided in the input is promoted as the primary. 2923// 2924// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2925// with awserr.Error's Code and Message methods to get detailed information about 2926// the error. 2927// 2928// See the AWS API reference guide for Amazon WorkMail's 2929// API operation UpdatePrimaryEmailAddress for usage and error information. 2930// 2931// Returned Error Codes: 2932// * ErrCodeDirectoryServiceAuthenticationFailedException "DirectoryServiceAuthenticationFailedException" 2933// The Directory Service doesn't recognize the credentials supplied by the Amazon 2934// WorkMail service. 2935// 2936// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" 2937// The directory that you are trying to perform operations on isn't available. 2938// 2939// * ErrCodeEmailAddressInUseException "EmailAddressInUseException" 2940// The email address that you're trying to assign is already created for a different 2941// user, group, or resource. 2942// 2943// * ErrCodeEntityNotFoundException "EntityNotFoundException" 2944// The identifier supplied for the entity is valid, but it does not exist in 2945// your organization. 2946// 2947// * ErrCodeEntityStateException "EntityStateException" 2948// You are performing an operation on an entity that isn't in the expected state, 2949// such as trying to update a deleted user. 2950// 2951// * ErrCodeInvalidParameterException "InvalidParameterException" 2952// One or more of the input parameters don't match the service's restrictions. 2953// 2954// * ErrCodeMailDomainNotFoundException "MailDomainNotFoundException" 2955// For an email or alias to be created in Amazon WorkMail, the included domain 2956// must be defined in the organization. 2957// 2958// * ErrCodeMailDomainStateException "MailDomainStateException" 2959// After a domain has been added to the organization, it must be verified. The 2960// domain is not yet verified. 2961// 2962// * ErrCodeInvalidParameterException "InvalidParameterException" 2963// One or more of the input parameters don't match the service's restrictions. 2964// 2965// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 2966// An operation received a valid organization identifier that either doesn't 2967// belong or exist in the system. 2968// 2969// * ErrCodeOrganizationStateException "OrganizationStateException" 2970// The organization must have a valid state (Active or Synchronizing) to perform 2971// certain operations on the organization or its entities. 2972// 2973// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" 2974// You can't perform a write operation against a read-only directory. 2975// 2976// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdatePrimaryEmailAddress 2977func (c *WorkMail) UpdatePrimaryEmailAddress(input *UpdatePrimaryEmailAddressInput) (*UpdatePrimaryEmailAddressOutput, error) { 2978 req, out := c.UpdatePrimaryEmailAddressRequest(input) 2979 return out, req.Send() 2980} 2981 2982// UpdatePrimaryEmailAddressWithContext is the same as UpdatePrimaryEmailAddress with the addition of 2983// the ability to pass a context and additional request options. 2984// 2985// See UpdatePrimaryEmailAddress for details on how to use this API operation. 2986// 2987// The context must be non-nil and will be used for request cancellation. If 2988// the context is nil a panic will occur. In the future the SDK may create 2989// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2990// for more information on using Contexts. 2991func (c *WorkMail) UpdatePrimaryEmailAddressWithContext(ctx aws.Context, input *UpdatePrimaryEmailAddressInput, opts ...request.Option) (*UpdatePrimaryEmailAddressOutput, error) { 2992 req, out := c.UpdatePrimaryEmailAddressRequest(input) 2993 req.SetContext(ctx) 2994 req.ApplyOptions(opts...) 2995 return out, req.Send() 2996} 2997 2998const opUpdateResource = "UpdateResource" 2999 3000// UpdateResourceRequest generates a "aws/request.Request" representing the 3001// client's request for the UpdateResource operation. The "output" return 3002// value will be populated with the request's response once the request complets 3003// successfuly. 3004// 3005// Use "Send" method on the returned Request to send the API call to the service. 3006// the "output" return value is not valid until after Send returns without error. 3007// 3008// See UpdateResource for more information on using the UpdateResource 3009// API call, and error handling. 3010// 3011// This method is useful when you want to inject custom logic or configuration 3012// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3013// 3014// 3015// // Example sending a request using the UpdateResourceRequest method. 3016// req, resp := client.UpdateResourceRequest(params) 3017// 3018// err := req.Send() 3019// if err == nil { // resp is now filled 3020// fmt.Println(resp) 3021// } 3022// 3023// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdateResource 3024func (c *WorkMail) UpdateResourceRequest(input *UpdateResourceInput) (req *request.Request, output *UpdateResourceOutput) { 3025 op := &request.Operation{ 3026 Name: opUpdateResource, 3027 HTTPMethod: "POST", 3028 HTTPPath: "/", 3029 } 3030 3031 if input == nil { 3032 input = &UpdateResourceInput{} 3033 } 3034 3035 output = &UpdateResourceOutput{} 3036 req = c.newRequest(op, input, output) 3037 return 3038} 3039 3040// UpdateResource API operation for Amazon WorkMail. 3041// 3042// Updates data for the resource. It must be preceded by a describe call in 3043// order to have the latest information. The dataset in the request should be 3044// the one expected when performing another describe call. 3045// 3046// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3047// with awserr.Error's Code and Message methods to get detailed information about 3048// the error. 3049// 3050// See the AWS API reference guide for Amazon WorkMail's 3051// API operation UpdateResource for usage and error information. 3052// 3053// Returned Error Codes: 3054// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" 3055// The directory that you are trying to perform operations on isn't available. 3056// 3057// * ErrCodeEntityNotFoundException "EntityNotFoundException" 3058// The identifier supplied for the entity is valid, but it does not exist in 3059// your organization. 3060// 3061// * ErrCodeEntityStateException "EntityStateException" 3062// You are performing an operation on an entity that isn't in the expected state, 3063// such as trying to update a deleted user. 3064// 3065// * ErrCodeInvalidConfigurationException "InvalidConfigurationException" 3066// The configuration for a resource isn't valid. A resource must either be able 3067// to auto-respond to requests or have at least one delegate associated that 3068// can do it on its behalf. 3069// 3070// * ErrCodeEmailAddressInUseException "EmailAddressInUseException" 3071// The email address that you're trying to assign is already created for a different 3072// user, group, or resource. 3073// 3074// * ErrCodeMailDomainNotFoundException "MailDomainNotFoundException" 3075// For an email or alias to be created in Amazon WorkMail, the included domain 3076// must be defined in the organization. 3077// 3078// * ErrCodeMailDomainStateException "MailDomainStateException" 3079// After a domain has been added to the organization, it must be verified. The 3080// domain is not yet verified. 3081// 3082// * ErrCodeNameAvailabilityException "NameAvailabilityException" 3083// The entity (user, group, or user) name isn't unique in Amazon WorkMail. 3084// 3085// * ErrCodeOrganizationNotFoundException "OrganizationNotFoundException" 3086// An operation received a valid organization identifier that either doesn't 3087// belong or exist in the system. 3088// 3089// * ErrCodeOrganizationStateException "OrganizationStateException" 3090// The organization must have a valid state (Active or Synchronizing) to perform 3091// certain operations on the organization or its entities. 3092// 3093// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdateResource 3094func (c *WorkMail) UpdateResource(input *UpdateResourceInput) (*UpdateResourceOutput, error) { 3095 req, out := c.UpdateResourceRequest(input) 3096 return out, req.Send() 3097} 3098 3099// UpdateResourceWithContext is the same as UpdateResource with the addition of 3100// the ability to pass a context and additional request options. 3101// 3102// See UpdateResource for details on how to use this API operation. 3103// 3104// The context must be non-nil and will be used for request cancellation. If 3105// the context is nil a panic will occur. In the future the SDK may create 3106// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3107// for more information on using Contexts. 3108func (c *WorkMail) UpdateResourceWithContext(ctx aws.Context, input *UpdateResourceInput, opts ...request.Option) (*UpdateResourceOutput, error) { 3109 req, out := c.UpdateResourceRequest(input) 3110 req.SetContext(ctx) 3111 req.ApplyOptions(opts...) 3112 return out, req.Send() 3113} 3114 3115// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateDelegateToResourceRequest 3116type AssociateDelegateToResourceInput struct { 3117 _ struct{} `type:"structure"` 3118 3119 // The member (user or group) to associate to the resource. 3120 // 3121 // EntityId is a required field 3122 EntityId *string `min:"12" type:"string" required:"true"` 3123 3124 // The organization under which the resource exists. 3125 // 3126 // OrganizationId is a required field 3127 OrganizationId *string `type:"string" required:"true"` 3128 3129 // The resource for which members are associated. 3130 // 3131 // ResourceId is a required field 3132 ResourceId *string `type:"string" required:"true"` 3133} 3134 3135// String returns the string representation 3136func (s AssociateDelegateToResourceInput) String() string { 3137 return awsutil.Prettify(s) 3138} 3139 3140// GoString returns the string representation 3141func (s AssociateDelegateToResourceInput) GoString() string { 3142 return s.String() 3143} 3144 3145// Validate inspects the fields of the type to determine if they are valid. 3146func (s *AssociateDelegateToResourceInput) Validate() error { 3147 invalidParams := request.ErrInvalidParams{Context: "AssociateDelegateToResourceInput"} 3148 if s.EntityId == nil { 3149 invalidParams.Add(request.NewErrParamRequired("EntityId")) 3150 } 3151 if s.EntityId != nil && len(*s.EntityId) < 12 { 3152 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 3153 } 3154 if s.OrganizationId == nil { 3155 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 3156 } 3157 if s.ResourceId == nil { 3158 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 3159 } 3160 3161 if invalidParams.Len() > 0 { 3162 return invalidParams 3163 } 3164 return nil 3165} 3166 3167// SetEntityId sets the EntityId field's value. 3168func (s *AssociateDelegateToResourceInput) SetEntityId(v string) *AssociateDelegateToResourceInput { 3169 s.EntityId = &v 3170 return s 3171} 3172 3173// SetOrganizationId sets the OrganizationId field's value. 3174func (s *AssociateDelegateToResourceInput) SetOrganizationId(v string) *AssociateDelegateToResourceInput { 3175 s.OrganizationId = &v 3176 return s 3177} 3178 3179// SetResourceId sets the ResourceId field's value. 3180func (s *AssociateDelegateToResourceInput) SetResourceId(v string) *AssociateDelegateToResourceInput { 3181 s.ResourceId = &v 3182 return s 3183} 3184 3185// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateDelegateToResourceResponse 3186type AssociateDelegateToResourceOutput struct { 3187 _ struct{} `type:"structure"` 3188} 3189 3190// String returns the string representation 3191func (s AssociateDelegateToResourceOutput) String() string { 3192 return awsutil.Prettify(s) 3193} 3194 3195// GoString returns the string representation 3196func (s AssociateDelegateToResourceOutput) GoString() string { 3197 return s.String() 3198} 3199 3200// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateMemberToGroupRequest 3201type AssociateMemberToGroupInput struct { 3202 _ struct{} `type:"structure"` 3203 3204 // The group for which the member is associated. 3205 // 3206 // GroupId is a required field 3207 GroupId *string `min:"12" type:"string" required:"true"` 3208 3209 // The member to associate to the group. 3210 // 3211 // MemberId is a required field 3212 MemberId *string `min:"12" type:"string" required:"true"` 3213 3214 // The organization under which the group exists. 3215 // 3216 // OrganizationId is a required field 3217 OrganizationId *string `type:"string" required:"true"` 3218} 3219 3220// String returns the string representation 3221func (s AssociateMemberToGroupInput) String() string { 3222 return awsutil.Prettify(s) 3223} 3224 3225// GoString returns the string representation 3226func (s AssociateMemberToGroupInput) GoString() string { 3227 return s.String() 3228} 3229 3230// Validate inspects the fields of the type to determine if they are valid. 3231func (s *AssociateMemberToGroupInput) Validate() error { 3232 invalidParams := request.ErrInvalidParams{Context: "AssociateMemberToGroupInput"} 3233 if s.GroupId == nil { 3234 invalidParams.Add(request.NewErrParamRequired("GroupId")) 3235 } 3236 if s.GroupId != nil && len(*s.GroupId) < 12 { 3237 invalidParams.Add(request.NewErrParamMinLen("GroupId", 12)) 3238 } 3239 if s.MemberId == nil { 3240 invalidParams.Add(request.NewErrParamRequired("MemberId")) 3241 } 3242 if s.MemberId != nil && len(*s.MemberId) < 12 { 3243 invalidParams.Add(request.NewErrParamMinLen("MemberId", 12)) 3244 } 3245 if s.OrganizationId == nil { 3246 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 3247 } 3248 3249 if invalidParams.Len() > 0 { 3250 return invalidParams 3251 } 3252 return nil 3253} 3254 3255// SetGroupId sets the GroupId field's value. 3256func (s *AssociateMemberToGroupInput) SetGroupId(v string) *AssociateMemberToGroupInput { 3257 s.GroupId = &v 3258 return s 3259} 3260 3261// SetMemberId sets the MemberId field's value. 3262func (s *AssociateMemberToGroupInput) SetMemberId(v string) *AssociateMemberToGroupInput { 3263 s.MemberId = &v 3264 return s 3265} 3266 3267// SetOrganizationId sets the OrganizationId field's value. 3268func (s *AssociateMemberToGroupInput) SetOrganizationId(v string) *AssociateMemberToGroupInput { 3269 s.OrganizationId = &v 3270 return s 3271} 3272 3273// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateMemberToGroupResponse 3274type AssociateMemberToGroupOutput struct { 3275 _ struct{} `type:"structure"` 3276} 3277 3278// String returns the string representation 3279func (s AssociateMemberToGroupOutput) String() string { 3280 return awsutil.Prettify(s) 3281} 3282 3283// GoString returns the string representation 3284func (s AssociateMemberToGroupOutput) GoString() string { 3285 return s.String() 3286} 3287 3288// At least one delegate must be associated to the resource to disable automatic 3289// replies from the resource. 3290// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/BookingOptions 3291type BookingOptions struct { 3292 _ struct{} `type:"structure"` 3293 3294 // The resource's ability to automatically reply to requests. If disabled, delegates 3295 // must be associated to the resource. 3296 AutoAcceptRequests *bool `type:"boolean"` 3297 3298 // The resource's ability to automatically decline any conflicting requests. 3299 AutoDeclineConflictingRequests *bool `type:"boolean"` 3300 3301 // The resource's ability to automatically decline any recurring requests. 3302 AutoDeclineRecurringRequests *bool `type:"boolean"` 3303} 3304 3305// String returns the string representation 3306func (s BookingOptions) String() string { 3307 return awsutil.Prettify(s) 3308} 3309 3310// GoString returns the string representation 3311func (s BookingOptions) GoString() string { 3312 return s.String() 3313} 3314 3315// SetAutoAcceptRequests sets the AutoAcceptRequests field's value. 3316func (s *BookingOptions) SetAutoAcceptRequests(v bool) *BookingOptions { 3317 s.AutoAcceptRequests = &v 3318 return s 3319} 3320 3321// SetAutoDeclineConflictingRequests sets the AutoDeclineConflictingRequests field's value. 3322func (s *BookingOptions) SetAutoDeclineConflictingRequests(v bool) *BookingOptions { 3323 s.AutoDeclineConflictingRequests = &v 3324 return s 3325} 3326 3327// SetAutoDeclineRecurringRequests sets the AutoDeclineRecurringRequests field's value. 3328func (s *BookingOptions) SetAutoDeclineRecurringRequests(v bool) *BookingOptions { 3329 s.AutoDeclineRecurringRequests = &v 3330 return s 3331} 3332 3333// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateAliasRequest 3334type CreateAliasInput struct { 3335 _ struct{} `type:"structure"` 3336 3337 // The alias to add to the user. 3338 // 3339 // Alias is a required field 3340 Alias *string `min:"1" type:"string" required:"true"` 3341 3342 // The alias is added to this Amazon WorkMail entity. 3343 // 3344 // EntityId is a required field 3345 EntityId *string `min:"12" type:"string" required:"true"` 3346 3347 // The organization under which the member exists. 3348 // 3349 // OrganizationId is a required field 3350 OrganizationId *string `type:"string" required:"true"` 3351} 3352 3353// String returns the string representation 3354func (s CreateAliasInput) String() string { 3355 return awsutil.Prettify(s) 3356} 3357 3358// GoString returns the string representation 3359func (s CreateAliasInput) GoString() string { 3360 return s.String() 3361} 3362 3363// Validate inspects the fields of the type to determine if they are valid. 3364func (s *CreateAliasInput) Validate() error { 3365 invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"} 3366 if s.Alias == nil { 3367 invalidParams.Add(request.NewErrParamRequired("Alias")) 3368 } 3369 if s.Alias != nil && len(*s.Alias) < 1 { 3370 invalidParams.Add(request.NewErrParamMinLen("Alias", 1)) 3371 } 3372 if s.EntityId == nil { 3373 invalidParams.Add(request.NewErrParamRequired("EntityId")) 3374 } 3375 if s.EntityId != nil && len(*s.EntityId) < 12 { 3376 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 3377 } 3378 if s.OrganizationId == nil { 3379 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 3380 } 3381 3382 if invalidParams.Len() > 0 { 3383 return invalidParams 3384 } 3385 return nil 3386} 3387 3388// SetAlias sets the Alias field's value. 3389func (s *CreateAliasInput) SetAlias(v string) *CreateAliasInput { 3390 s.Alias = &v 3391 return s 3392} 3393 3394// SetEntityId sets the EntityId field's value. 3395func (s *CreateAliasInput) SetEntityId(v string) *CreateAliasInput { 3396 s.EntityId = &v 3397 return s 3398} 3399 3400// SetOrganizationId sets the OrganizationId field's value. 3401func (s *CreateAliasInput) SetOrganizationId(v string) *CreateAliasInput { 3402 s.OrganizationId = &v 3403 return s 3404} 3405 3406// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateAliasResponse 3407type CreateAliasOutput struct { 3408 _ struct{} `type:"structure"` 3409} 3410 3411// String returns the string representation 3412func (s CreateAliasOutput) String() string { 3413 return awsutil.Prettify(s) 3414} 3415 3416// GoString returns the string representation 3417func (s CreateAliasOutput) GoString() string { 3418 return s.String() 3419} 3420 3421// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateGroupRequest 3422type CreateGroupInput struct { 3423 _ struct{} `type:"structure"` 3424 3425 // The name of the group. 3426 // 3427 // Name is a required field 3428 Name *string `min:"1" type:"string" required:"true"` 3429 3430 // The organization under which the group is to be created. 3431 // 3432 // OrganizationId is a required field 3433 OrganizationId *string `type:"string" required:"true"` 3434} 3435 3436// String returns the string representation 3437func (s CreateGroupInput) String() string { 3438 return awsutil.Prettify(s) 3439} 3440 3441// GoString returns the string representation 3442func (s CreateGroupInput) GoString() string { 3443 return s.String() 3444} 3445 3446// Validate inspects the fields of the type to determine if they are valid. 3447func (s *CreateGroupInput) Validate() error { 3448 invalidParams := request.ErrInvalidParams{Context: "CreateGroupInput"} 3449 if s.Name == nil { 3450 invalidParams.Add(request.NewErrParamRequired("Name")) 3451 } 3452 if s.Name != nil && len(*s.Name) < 1 { 3453 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3454 } 3455 if s.OrganizationId == nil { 3456 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 3457 } 3458 3459 if invalidParams.Len() > 0 { 3460 return invalidParams 3461 } 3462 return nil 3463} 3464 3465// SetName sets the Name field's value. 3466func (s *CreateGroupInput) SetName(v string) *CreateGroupInput { 3467 s.Name = &v 3468 return s 3469} 3470 3471// SetOrganizationId sets the OrganizationId field's value. 3472func (s *CreateGroupInput) SetOrganizationId(v string) *CreateGroupInput { 3473 s.OrganizationId = &v 3474 return s 3475} 3476 3477// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateGroupResponse 3478type CreateGroupOutput struct { 3479 _ struct{} `type:"structure"` 3480 3481 // The ID of the group. 3482 GroupId *string `min:"12" type:"string"` 3483} 3484 3485// String returns the string representation 3486func (s CreateGroupOutput) String() string { 3487 return awsutil.Prettify(s) 3488} 3489 3490// GoString returns the string representation 3491func (s CreateGroupOutput) GoString() string { 3492 return s.String() 3493} 3494 3495// SetGroupId sets the GroupId field's value. 3496func (s *CreateGroupOutput) SetGroupId(v string) *CreateGroupOutput { 3497 s.GroupId = &v 3498 return s 3499} 3500 3501// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateResourceRequest 3502type CreateResourceInput struct { 3503 _ struct{} `type:"structure"` 3504 3505 // The name of the created resource. 3506 // 3507 // Name is a required field 3508 Name *string `min:"1" type:"string" required:"true"` 3509 3510 // The identifier associated with the organization for which the resource is 3511 // created. 3512 // 3513 // OrganizationId is a required field 3514 OrganizationId *string `type:"string" required:"true"` 3515 3516 // The type of the created resource. 3517 // 3518 // Type is a required field 3519 Type *string `type:"string" required:"true" enum:"ResourceType"` 3520} 3521 3522// String returns the string representation 3523func (s CreateResourceInput) String() string { 3524 return awsutil.Prettify(s) 3525} 3526 3527// GoString returns the string representation 3528func (s CreateResourceInput) GoString() string { 3529 return s.String() 3530} 3531 3532// Validate inspects the fields of the type to determine if they are valid. 3533func (s *CreateResourceInput) Validate() error { 3534 invalidParams := request.ErrInvalidParams{Context: "CreateResourceInput"} 3535 if s.Name == nil { 3536 invalidParams.Add(request.NewErrParamRequired("Name")) 3537 } 3538 if s.Name != nil && len(*s.Name) < 1 { 3539 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3540 } 3541 if s.OrganizationId == nil { 3542 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 3543 } 3544 if s.Type == nil { 3545 invalidParams.Add(request.NewErrParamRequired("Type")) 3546 } 3547 3548 if invalidParams.Len() > 0 { 3549 return invalidParams 3550 } 3551 return nil 3552} 3553 3554// SetName sets the Name field's value. 3555func (s *CreateResourceInput) SetName(v string) *CreateResourceInput { 3556 s.Name = &v 3557 return s 3558} 3559 3560// SetOrganizationId sets the OrganizationId field's value. 3561func (s *CreateResourceInput) SetOrganizationId(v string) *CreateResourceInput { 3562 s.OrganizationId = &v 3563 return s 3564} 3565 3566// SetType sets the Type field's value. 3567func (s *CreateResourceInput) SetType(v string) *CreateResourceInput { 3568 s.Type = &v 3569 return s 3570} 3571 3572// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateResourceResponse 3573type CreateResourceOutput struct { 3574 _ struct{} `type:"structure"` 3575 3576 // The identifier of the created resource. 3577 ResourceId *string `type:"string"` 3578} 3579 3580// String returns the string representation 3581func (s CreateResourceOutput) String() string { 3582 return awsutil.Prettify(s) 3583} 3584 3585// GoString returns the string representation 3586func (s CreateResourceOutput) GoString() string { 3587 return s.String() 3588} 3589 3590// SetResourceId sets the ResourceId field's value. 3591func (s *CreateResourceOutput) SetResourceId(v string) *CreateResourceOutput { 3592 s.ResourceId = &v 3593 return s 3594} 3595 3596// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateUserRequest 3597type CreateUserInput struct { 3598 _ struct{} `type:"structure"` 3599 3600 // The display name for the user to be created. 3601 // 3602 // DisplayName is a required field 3603 DisplayName *string `type:"string" required:"true"` 3604 3605 // The name for the user to be created. 3606 // 3607 // Name is a required field 3608 Name *string `min:"1" type:"string" required:"true"` 3609 3610 // The identifier of the organization for which the user is created. 3611 // 3612 // OrganizationId is a required field 3613 OrganizationId *string `type:"string" required:"true"` 3614 3615 // The password for the user to be created. 3616 // 3617 // Password is a required field 3618 Password *string `type:"string" required:"true"` 3619} 3620 3621// String returns the string representation 3622func (s CreateUserInput) String() string { 3623 return awsutil.Prettify(s) 3624} 3625 3626// GoString returns the string representation 3627func (s CreateUserInput) GoString() string { 3628 return s.String() 3629} 3630 3631// Validate inspects the fields of the type to determine if they are valid. 3632func (s *CreateUserInput) Validate() error { 3633 invalidParams := request.ErrInvalidParams{Context: "CreateUserInput"} 3634 if s.DisplayName == nil { 3635 invalidParams.Add(request.NewErrParamRequired("DisplayName")) 3636 } 3637 if s.Name == nil { 3638 invalidParams.Add(request.NewErrParamRequired("Name")) 3639 } 3640 if s.Name != nil && len(*s.Name) < 1 { 3641 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3642 } 3643 if s.OrganizationId == nil { 3644 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 3645 } 3646 if s.Password == nil { 3647 invalidParams.Add(request.NewErrParamRequired("Password")) 3648 } 3649 3650 if invalidParams.Len() > 0 { 3651 return invalidParams 3652 } 3653 return nil 3654} 3655 3656// SetDisplayName sets the DisplayName field's value. 3657func (s *CreateUserInput) SetDisplayName(v string) *CreateUserInput { 3658 s.DisplayName = &v 3659 return s 3660} 3661 3662// SetName sets the Name field's value. 3663func (s *CreateUserInput) SetName(v string) *CreateUserInput { 3664 s.Name = &v 3665 return s 3666} 3667 3668// SetOrganizationId sets the OrganizationId field's value. 3669func (s *CreateUserInput) SetOrganizationId(v string) *CreateUserInput { 3670 s.OrganizationId = &v 3671 return s 3672} 3673 3674// SetPassword sets the Password field's value. 3675func (s *CreateUserInput) SetPassword(v string) *CreateUserInput { 3676 s.Password = &v 3677 return s 3678} 3679 3680// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateUserResponse 3681type CreateUserOutput struct { 3682 _ struct{} `type:"structure"` 3683 3684 // The information regarding the newly created user. 3685 UserId *string `min:"12" type:"string"` 3686} 3687 3688// String returns the string representation 3689func (s CreateUserOutput) String() string { 3690 return awsutil.Prettify(s) 3691} 3692 3693// GoString returns the string representation 3694func (s CreateUserOutput) GoString() string { 3695 return s.String() 3696} 3697 3698// SetUserId sets the UserId field's value. 3699func (s *CreateUserOutput) SetUserId(v string) *CreateUserOutput { 3700 s.UserId = &v 3701 return s 3702} 3703 3704// The name of the attribute, which is one of the values defined in the UserAttribute 3705// enumeration. 3706// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/Delegate 3707type Delegate struct { 3708 _ struct{} `type:"structure"` 3709 3710 // The identifier for the user or group is associated as the resource's delegate. 3711 // 3712 // Id is a required field 3713 Id *string `type:"string" required:"true"` 3714 3715 // The type of the delegate: user or group. 3716 // 3717 // Type is a required field 3718 Type *string `type:"string" required:"true" enum:"MemberType"` 3719} 3720 3721// String returns the string representation 3722func (s Delegate) String() string { 3723 return awsutil.Prettify(s) 3724} 3725 3726// GoString returns the string representation 3727func (s Delegate) GoString() string { 3728 return s.String() 3729} 3730 3731// SetId sets the Id field's value. 3732func (s *Delegate) SetId(v string) *Delegate { 3733 s.Id = &v 3734 return s 3735} 3736 3737// SetType sets the Type field's value. 3738func (s *Delegate) SetType(v string) *Delegate { 3739 s.Type = &v 3740 return s 3741} 3742 3743// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteAliasRequest 3744type DeleteAliasInput struct { 3745 _ struct{} `type:"structure"` 3746 3747 // The aliases to be removed from the user's set of aliases. Duplicate entries 3748 // in the list are collapsed into single entries (the list is transformed into 3749 // a set). 3750 // 3751 // Alias is a required field 3752 Alias *string `min:"1" type:"string" required:"true"` 3753 3754 // The identifier for the Amazon WorkMail entity to have the aliases removed. 3755 // 3756 // EntityId is a required field 3757 EntityId *string `min:"12" type:"string" required:"true"` 3758 3759 // The identifier for the organization under which the user exists. 3760 // 3761 // OrganizationId is a required field 3762 OrganizationId *string `type:"string" required:"true"` 3763} 3764 3765// String returns the string representation 3766func (s DeleteAliasInput) String() string { 3767 return awsutil.Prettify(s) 3768} 3769 3770// GoString returns the string representation 3771func (s DeleteAliasInput) GoString() string { 3772 return s.String() 3773} 3774 3775// Validate inspects the fields of the type to determine if they are valid. 3776func (s *DeleteAliasInput) Validate() error { 3777 invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"} 3778 if s.Alias == nil { 3779 invalidParams.Add(request.NewErrParamRequired("Alias")) 3780 } 3781 if s.Alias != nil && len(*s.Alias) < 1 { 3782 invalidParams.Add(request.NewErrParamMinLen("Alias", 1)) 3783 } 3784 if s.EntityId == nil { 3785 invalidParams.Add(request.NewErrParamRequired("EntityId")) 3786 } 3787 if s.EntityId != nil && len(*s.EntityId) < 12 { 3788 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 3789 } 3790 if s.OrganizationId == nil { 3791 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 3792 } 3793 3794 if invalidParams.Len() > 0 { 3795 return invalidParams 3796 } 3797 return nil 3798} 3799 3800// SetAlias sets the Alias field's value. 3801func (s *DeleteAliasInput) SetAlias(v string) *DeleteAliasInput { 3802 s.Alias = &v 3803 return s 3804} 3805 3806// SetEntityId sets the EntityId field's value. 3807func (s *DeleteAliasInput) SetEntityId(v string) *DeleteAliasInput { 3808 s.EntityId = &v 3809 return s 3810} 3811 3812// SetOrganizationId sets the OrganizationId field's value. 3813func (s *DeleteAliasInput) SetOrganizationId(v string) *DeleteAliasInput { 3814 s.OrganizationId = &v 3815 return s 3816} 3817 3818// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteAliasResponse 3819type DeleteAliasOutput struct { 3820 _ struct{} `type:"structure"` 3821} 3822 3823// String returns the string representation 3824func (s DeleteAliasOutput) String() string { 3825 return awsutil.Prettify(s) 3826} 3827 3828// GoString returns the string representation 3829func (s DeleteAliasOutput) GoString() string { 3830 return s.String() 3831} 3832 3833// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteGroupRequest 3834type DeleteGroupInput struct { 3835 _ struct{} `type:"structure"` 3836 3837 // The identifier of the group to be deleted. 3838 // 3839 // GroupId is a required field 3840 GroupId *string `min:"12" type:"string" required:"true"` 3841 3842 // The organization that contains the group. 3843 // 3844 // OrganizationId is a required field 3845 OrganizationId *string `type:"string" required:"true"` 3846} 3847 3848// String returns the string representation 3849func (s DeleteGroupInput) String() string { 3850 return awsutil.Prettify(s) 3851} 3852 3853// GoString returns the string representation 3854func (s DeleteGroupInput) GoString() string { 3855 return s.String() 3856} 3857 3858// Validate inspects the fields of the type to determine if they are valid. 3859func (s *DeleteGroupInput) Validate() error { 3860 invalidParams := request.ErrInvalidParams{Context: "DeleteGroupInput"} 3861 if s.GroupId == nil { 3862 invalidParams.Add(request.NewErrParamRequired("GroupId")) 3863 } 3864 if s.GroupId != nil && len(*s.GroupId) < 12 { 3865 invalidParams.Add(request.NewErrParamMinLen("GroupId", 12)) 3866 } 3867 if s.OrganizationId == nil { 3868 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 3869 } 3870 3871 if invalidParams.Len() > 0 { 3872 return invalidParams 3873 } 3874 return nil 3875} 3876 3877// SetGroupId sets the GroupId field's value. 3878func (s *DeleteGroupInput) SetGroupId(v string) *DeleteGroupInput { 3879 s.GroupId = &v 3880 return s 3881} 3882 3883// SetOrganizationId sets the OrganizationId field's value. 3884func (s *DeleteGroupInput) SetOrganizationId(v string) *DeleteGroupInput { 3885 s.OrganizationId = &v 3886 return s 3887} 3888 3889// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteGroupResponse 3890type DeleteGroupOutput struct { 3891 _ struct{} `type:"structure"` 3892} 3893 3894// String returns the string representation 3895func (s DeleteGroupOutput) String() string { 3896 return awsutil.Prettify(s) 3897} 3898 3899// GoString returns the string representation 3900func (s DeleteGroupOutput) GoString() string { 3901 return s.String() 3902} 3903 3904// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteResourceRequest 3905type DeleteResourceInput struct { 3906 _ struct{} `type:"structure"` 3907 3908 // The identifier associated with the organization for which the resource is 3909 // deleted. 3910 // 3911 // OrganizationId is a required field 3912 OrganizationId *string `type:"string" required:"true"` 3913 3914 // The identifier of the resource to be deleted. 3915 // 3916 // ResourceId is a required field 3917 ResourceId *string `type:"string" required:"true"` 3918} 3919 3920// String returns the string representation 3921func (s DeleteResourceInput) String() string { 3922 return awsutil.Prettify(s) 3923} 3924 3925// GoString returns the string representation 3926func (s DeleteResourceInput) GoString() string { 3927 return s.String() 3928} 3929 3930// Validate inspects the fields of the type to determine if they are valid. 3931func (s *DeleteResourceInput) Validate() error { 3932 invalidParams := request.ErrInvalidParams{Context: "DeleteResourceInput"} 3933 if s.OrganizationId == nil { 3934 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 3935 } 3936 if s.ResourceId == nil { 3937 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 3938 } 3939 3940 if invalidParams.Len() > 0 { 3941 return invalidParams 3942 } 3943 return nil 3944} 3945 3946// SetOrganizationId sets the OrganizationId field's value. 3947func (s *DeleteResourceInput) SetOrganizationId(v string) *DeleteResourceInput { 3948 s.OrganizationId = &v 3949 return s 3950} 3951 3952// SetResourceId sets the ResourceId field's value. 3953func (s *DeleteResourceInput) SetResourceId(v string) *DeleteResourceInput { 3954 s.ResourceId = &v 3955 return s 3956} 3957 3958// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteResourceResponse 3959type DeleteResourceOutput struct { 3960 _ struct{} `type:"structure"` 3961} 3962 3963// String returns the string representation 3964func (s DeleteResourceOutput) String() string { 3965 return awsutil.Prettify(s) 3966} 3967 3968// GoString returns the string representation 3969func (s DeleteResourceOutput) GoString() string { 3970 return s.String() 3971} 3972 3973// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteUserRequest 3974type DeleteUserInput struct { 3975 _ struct{} `type:"structure"` 3976 3977 // The organization that contains the user. 3978 // 3979 // OrganizationId is a required field 3980 OrganizationId *string `type:"string" required:"true"` 3981 3982 // The identifier of the user to be deleted. 3983 // 3984 // UserId is a required field 3985 UserId *string `min:"12" type:"string" required:"true"` 3986} 3987 3988// String returns the string representation 3989func (s DeleteUserInput) String() string { 3990 return awsutil.Prettify(s) 3991} 3992 3993// GoString returns the string representation 3994func (s DeleteUserInput) GoString() string { 3995 return s.String() 3996} 3997 3998// Validate inspects the fields of the type to determine if they are valid. 3999func (s *DeleteUserInput) Validate() error { 4000 invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"} 4001 if s.OrganizationId == nil { 4002 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 4003 } 4004 if s.UserId == nil { 4005 invalidParams.Add(request.NewErrParamRequired("UserId")) 4006 } 4007 if s.UserId != nil && len(*s.UserId) < 12 { 4008 invalidParams.Add(request.NewErrParamMinLen("UserId", 12)) 4009 } 4010 4011 if invalidParams.Len() > 0 { 4012 return invalidParams 4013 } 4014 return nil 4015} 4016 4017// SetOrganizationId sets the OrganizationId field's value. 4018func (s *DeleteUserInput) SetOrganizationId(v string) *DeleteUserInput { 4019 s.OrganizationId = &v 4020 return s 4021} 4022 4023// SetUserId sets the UserId field's value. 4024func (s *DeleteUserInput) SetUserId(v string) *DeleteUserInput { 4025 s.UserId = &v 4026 return s 4027} 4028 4029// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteUserResponse 4030type DeleteUserOutput struct { 4031 _ struct{} `type:"structure"` 4032} 4033 4034// String returns the string representation 4035func (s DeleteUserOutput) String() string { 4036 return awsutil.Prettify(s) 4037} 4038 4039// GoString returns the string representation 4040func (s DeleteUserOutput) GoString() string { 4041 return s.String() 4042} 4043 4044// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeregisterFromWorkMailRequest 4045type DeregisterFromWorkMailInput struct { 4046 _ struct{} `type:"structure"` 4047 4048 // The identifier for the entity to be updated. 4049 // 4050 // EntityId is a required field 4051 EntityId *string `min:"12" type:"string" required:"true"` 4052 4053 // The identifier for the organization under which the Amazon WorkMail entity 4054 // exists. 4055 // 4056 // OrganizationId is a required field 4057 OrganizationId *string `type:"string" required:"true"` 4058} 4059 4060// String returns the string representation 4061func (s DeregisterFromWorkMailInput) String() string { 4062 return awsutil.Prettify(s) 4063} 4064 4065// GoString returns the string representation 4066func (s DeregisterFromWorkMailInput) GoString() string { 4067 return s.String() 4068} 4069 4070// Validate inspects the fields of the type to determine if they are valid. 4071func (s *DeregisterFromWorkMailInput) Validate() error { 4072 invalidParams := request.ErrInvalidParams{Context: "DeregisterFromWorkMailInput"} 4073 if s.EntityId == nil { 4074 invalidParams.Add(request.NewErrParamRequired("EntityId")) 4075 } 4076 if s.EntityId != nil && len(*s.EntityId) < 12 { 4077 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 4078 } 4079 if s.OrganizationId == nil { 4080 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 4081 } 4082 4083 if invalidParams.Len() > 0 { 4084 return invalidParams 4085 } 4086 return nil 4087} 4088 4089// SetEntityId sets the EntityId field's value. 4090func (s *DeregisterFromWorkMailInput) SetEntityId(v string) *DeregisterFromWorkMailInput { 4091 s.EntityId = &v 4092 return s 4093} 4094 4095// SetOrganizationId sets the OrganizationId field's value. 4096func (s *DeregisterFromWorkMailInput) SetOrganizationId(v string) *DeregisterFromWorkMailInput { 4097 s.OrganizationId = &v 4098 return s 4099} 4100 4101// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeregisterFromWorkMailResponse 4102type DeregisterFromWorkMailOutput struct { 4103 _ struct{} `type:"structure"` 4104} 4105 4106// String returns the string representation 4107func (s DeregisterFromWorkMailOutput) String() string { 4108 return awsutil.Prettify(s) 4109} 4110 4111// GoString returns the string representation 4112func (s DeregisterFromWorkMailOutput) GoString() string { 4113 return s.String() 4114} 4115 4116// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeGroupRequest 4117type DescribeGroupInput struct { 4118 _ struct{} `type:"structure"` 4119 4120 // The identifier for the group to be described. 4121 // 4122 // GroupId is a required field 4123 GroupId *string `min:"12" type:"string" required:"true"` 4124 4125 // The identifier for the organization under which the group exists. 4126 // 4127 // OrganizationId is a required field 4128 OrganizationId *string `type:"string" required:"true"` 4129} 4130 4131// String returns the string representation 4132func (s DescribeGroupInput) String() string { 4133 return awsutil.Prettify(s) 4134} 4135 4136// GoString returns the string representation 4137func (s DescribeGroupInput) GoString() string { 4138 return s.String() 4139} 4140 4141// Validate inspects the fields of the type to determine if they are valid. 4142func (s *DescribeGroupInput) Validate() error { 4143 invalidParams := request.ErrInvalidParams{Context: "DescribeGroupInput"} 4144 if s.GroupId == nil { 4145 invalidParams.Add(request.NewErrParamRequired("GroupId")) 4146 } 4147 if s.GroupId != nil && len(*s.GroupId) < 12 { 4148 invalidParams.Add(request.NewErrParamMinLen("GroupId", 12)) 4149 } 4150 if s.OrganizationId == nil { 4151 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 4152 } 4153 4154 if invalidParams.Len() > 0 { 4155 return invalidParams 4156 } 4157 return nil 4158} 4159 4160// SetGroupId sets the GroupId field's value. 4161func (s *DescribeGroupInput) SetGroupId(v string) *DescribeGroupInput { 4162 s.GroupId = &v 4163 return s 4164} 4165 4166// SetOrganizationId sets the OrganizationId field's value. 4167func (s *DescribeGroupInput) SetOrganizationId(v string) *DescribeGroupInput { 4168 s.OrganizationId = &v 4169 return s 4170} 4171 4172// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeGroupResponse 4173type DescribeGroupOutput struct { 4174 _ struct{} `type:"structure"` 4175 4176 // The date and time when a user was deregistered from Amazon WorkMail, in UNIX 4177 // epoch time format. 4178 DisabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 4179 4180 // The email of the described group. 4181 Email *string `min:"1" type:"string"` 4182 4183 // The date and time when a user was registered to Amazon WorkMail, in UNIX 4184 // epoch time format. 4185 EnabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 4186 4187 // The identifier of the described group. 4188 GroupId *string `min:"12" type:"string"` 4189 4190 // The name of the described group. 4191 Name *string `min:"1" type:"string"` 4192 4193 // The state of the user: enabled (registered to Amazon WorkMail) or disabled 4194 // (deregistered or never registered to Amazon WorkMail). 4195 State *string `type:"string" enum:"EntityState"` 4196} 4197 4198// String returns the string representation 4199func (s DescribeGroupOutput) String() string { 4200 return awsutil.Prettify(s) 4201} 4202 4203// GoString returns the string representation 4204func (s DescribeGroupOutput) GoString() string { 4205 return s.String() 4206} 4207 4208// SetDisabledDate sets the DisabledDate field's value. 4209func (s *DescribeGroupOutput) SetDisabledDate(v time.Time) *DescribeGroupOutput { 4210 s.DisabledDate = &v 4211 return s 4212} 4213 4214// SetEmail sets the Email field's value. 4215func (s *DescribeGroupOutput) SetEmail(v string) *DescribeGroupOutput { 4216 s.Email = &v 4217 return s 4218} 4219 4220// SetEnabledDate sets the EnabledDate field's value. 4221func (s *DescribeGroupOutput) SetEnabledDate(v time.Time) *DescribeGroupOutput { 4222 s.EnabledDate = &v 4223 return s 4224} 4225 4226// SetGroupId sets the GroupId field's value. 4227func (s *DescribeGroupOutput) SetGroupId(v string) *DescribeGroupOutput { 4228 s.GroupId = &v 4229 return s 4230} 4231 4232// SetName sets the Name field's value. 4233func (s *DescribeGroupOutput) SetName(v string) *DescribeGroupOutput { 4234 s.Name = &v 4235 return s 4236} 4237 4238// SetState sets the State field's value. 4239func (s *DescribeGroupOutput) SetState(v string) *DescribeGroupOutput { 4240 s.State = &v 4241 return s 4242} 4243 4244// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeOrganizationRequest 4245type DescribeOrganizationInput struct { 4246 _ struct{} `type:"structure"` 4247 4248 // The identifier for the organization to be described. 4249 // 4250 // OrganizationId is a required field 4251 OrganizationId *string `type:"string" required:"true"` 4252} 4253 4254// String returns the string representation 4255func (s DescribeOrganizationInput) String() string { 4256 return awsutil.Prettify(s) 4257} 4258 4259// GoString returns the string representation 4260func (s DescribeOrganizationInput) GoString() string { 4261 return s.String() 4262} 4263 4264// Validate inspects the fields of the type to determine if they are valid. 4265func (s *DescribeOrganizationInput) Validate() error { 4266 invalidParams := request.ErrInvalidParams{Context: "DescribeOrganizationInput"} 4267 if s.OrganizationId == nil { 4268 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 4269 } 4270 4271 if invalidParams.Len() > 0 { 4272 return invalidParams 4273 } 4274 return nil 4275} 4276 4277// SetOrganizationId sets the OrganizationId field's value. 4278func (s *DescribeOrganizationInput) SetOrganizationId(v string) *DescribeOrganizationInput { 4279 s.OrganizationId = &v 4280 return s 4281} 4282 4283// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeOrganizationResponse 4284type DescribeOrganizationOutput struct { 4285 _ struct{} `type:"structure"` 4286 4287 // The alias for an organization. 4288 Alias *string `min:"1" type:"string"` 4289 4290 // The date at which the organization became usable in the Amazon WorkMail context, 4291 // in UNIX epoch time format. 4292 CompletedDate *time.Time `type:"timestamp" timestampFormat:"unix"` 4293 4294 // The default mail domain associated with the organization. 4295 DefaultMailDomain *string `type:"string"` 4296 4297 // The identifier for the directory associated with an Amazon WorkMail organization. 4298 DirectoryId *string `type:"string"` 4299 4300 // The type of directory associated with the Amazon WorkMail organization. 4301 DirectoryType *string `type:"string"` 4302 4303 // The (optional) error message indicating if unexpected behavior was encountered 4304 // with regards to the organization. 4305 ErrorMessage *string `type:"string"` 4306 4307 // The identifier of an organization. 4308 OrganizationId *string `type:"string"` 4309 4310 // The state of an organization. 4311 State *string `type:"string"` 4312} 4313 4314// String returns the string representation 4315func (s DescribeOrganizationOutput) String() string { 4316 return awsutil.Prettify(s) 4317} 4318 4319// GoString returns the string representation 4320func (s DescribeOrganizationOutput) GoString() string { 4321 return s.String() 4322} 4323 4324// SetAlias sets the Alias field's value. 4325func (s *DescribeOrganizationOutput) SetAlias(v string) *DescribeOrganizationOutput { 4326 s.Alias = &v 4327 return s 4328} 4329 4330// SetCompletedDate sets the CompletedDate field's value. 4331func (s *DescribeOrganizationOutput) SetCompletedDate(v time.Time) *DescribeOrganizationOutput { 4332 s.CompletedDate = &v 4333 return s 4334} 4335 4336// SetDefaultMailDomain sets the DefaultMailDomain field's value. 4337func (s *DescribeOrganizationOutput) SetDefaultMailDomain(v string) *DescribeOrganizationOutput { 4338 s.DefaultMailDomain = &v 4339 return s 4340} 4341 4342// SetDirectoryId sets the DirectoryId field's value. 4343func (s *DescribeOrganizationOutput) SetDirectoryId(v string) *DescribeOrganizationOutput { 4344 s.DirectoryId = &v 4345 return s 4346} 4347 4348// SetDirectoryType sets the DirectoryType field's value. 4349func (s *DescribeOrganizationOutput) SetDirectoryType(v string) *DescribeOrganizationOutput { 4350 s.DirectoryType = &v 4351 return s 4352} 4353 4354// SetErrorMessage sets the ErrorMessage field's value. 4355func (s *DescribeOrganizationOutput) SetErrorMessage(v string) *DescribeOrganizationOutput { 4356 s.ErrorMessage = &v 4357 return s 4358} 4359 4360// SetOrganizationId sets the OrganizationId field's value. 4361func (s *DescribeOrganizationOutput) SetOrganizationId(v string) *DescribeOrganizationOutput { 4362 s.OrganizationId = &v 4363 return s 4364} 4365 4366// SetState sets the State field's value. 4367func (s *DescribeOrganizationOutput) SetState(v string) *DescribeOrganizationOutput { 4368 s.State = &v 4369 return s 4370} 4371 4372// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeResourceRequest 4373type DescribeResourceInput struct { 4374 _ struct{} `type:"structure"` 4375 4376 // The identifier associated with the organization for which the resource is 4377 // described. 4378 // 4379 // OrganizationId is a required field 4380 OrganizationId *string `type:"string" required:"true"` 4381 4382 // The identifier of the resource to be described. 4383 // 4384 // ResourceId is a required field 4385 ResourceId *string `type:"string" required:"true"` 4386} 4387 4388// String returns the string representation 4389func (s DescribeResourceInput) String() string { 4390 return awsutil.Prettify(s) 4391} 4392 4393// GoString returns the string representation 4394func (s DescribeResourceInput) GoString() string { 4395 return s.String() 4396} 4397 4398// Validate inspects the fields of the type to determine if they are valid. 4399func (s *DescribeResourceInput) Validate() error { 4400 invalidParams := request.ErrInvalidParams{Context: "DescribeResourceInput"} 4401 if s.OrganizationId == nil { 4402 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 4403 } 4404 if s.ResourceId == nil { 4405 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 4406 } 4407 4408 if invalidParams.Len() > 0 { 4409 return invalidParams 4410 } 4411 return nil 4412} 4413 4414// SetOrganizationId sets the OrganizationId field's value. 4415func (s *DescribeResourceInput) SetOrganizationId(v string) *DescribeResourceInput { 4416 s.OrganizationId = &v 4417 return s 4418} 4419 4420// SetResourceId sets the ResourceId field's value. 4421func (s *DescribeResourceInput) SetResourceId(v string) *DescribeResourceInput { 4422 s.ResourceId = &v 4423 return s 4424} 4425 4426// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeResourceResponse 4427type DescribeResourceOutput struct { 4428 _ struct{} `type:"structure"` 4429 4430 // The booking options for the described resource. 4431 BookingOptions *BookingOptions `type:"structure"` 4432 4433 // The date and time when a resource was registered from Amazon WorkMail, in 4434 // UNIX epoch time format. 4435 DisabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 4436 4437 // The email of the described resource. 4438 Email *string `min:"1" type:"string"` 4439 4440 // The date and time when a resource was registered to Amazon WorkMail, in UNIX 4441 // epoch time format. 4442 EnabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 4443 4444 // The name of the described resource. 4445 Name *string `min:"1" type:"string"` 4446 4447 // The identifier of the described resource. 4448 ResourceId *string `type:"string"` 4449 4450 // The state of the resource: enabled (registered to Amazon WorkMail) or disabled 4451 // (deregistered or never registered to Amazon WorkMail). 4452 State *string `type:"string" enum:"EntityState"` 4453 4454 // The type of the described resource. 4455 Type *string `type:"string" enum:"ResourceType"` 4456} 4457 4458// String returns the string representation 4459func (s DescribeResourceOutput) String() string { 4460 return awsutil.Prettify(s) 4461} 4462 4463// GoString returns the string representation 4464func (s DescribeResourceOutput) GoString() string { 4465 return s.String() 4466} 4467 4468// SetBookingOptions sets the BookingOptions field's value. 4469func (s *DescribeResourceOutput) SetBookingOptions(v *BookingOptions) *DescribeResourceOutput { 4470 s.BookingOptions = v 4471 return s 4472} 4473 4474// SetDisabledDate sets the DisabledDate field's value. 4475func (s *DescribeResourceOutput) SetDisabledDate(v time.Time) *DescribeResourceOutput { 4476 s.DisabledDate = &v 4477 return s 4478} 4479 4480// SetEmail sets the Email field's value. 4481func (s *DescribeResourceOutput) SetEmail(v string) *DescribeResourceOutput { 4482 s.Email = &v 4483 return s 4484} 4485 4486// SetEnabledDate sets the EnabledDate field's value. 4487func (s *DescribeResourceOutput) SetEnabledDate(v time.Time) *DescribeResourceOutput { 4488 s.EnabledDate = &v 4489 return s 4490} 4491 4492// SetName sets the Name field's value. 4493func (s *DescribeResourceOutput) SetName(v string) *DescribeResourceOutput { 4494 s.Name = &v 4495 return s 4496} 4497 4498// SetResourceId sets the ResourceId field's value. 4499func (s *DescribeResourceOutput) SetResourceId(v string) *DescribeResourceOutput { 4500 s.ResourceId = &v 4501 return s 4502} 4503 4504// SetState sets the State field's value. 4505func (s *DescribeResourceOutput) SetState(v string) *DescribeResourceOutput { 4506 s.State = &v 4507 return s 4508} 4509 4510// SetType sets the Type field's value. 4511func (s *DescribeResourceOutput) SetType(v string) *DescribeResourceOutput { 4512 s.Type = &v 4513 return s 4514} 4515 4516// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeUserRequest 4517type DescribeUserInput struct { 4518 _ struct{} `type:"structure"` 4519 4520 // The identifier for the organization under which the user exists. 4521 // 4522 // OrganizationId is a required field 4523 OrganizationId *string `type:"string" required:"true"` 4524 4525 // The identifier for the user to be described. 4526 // 4527 // UserId is a required field 4528 UserId *string `min:"12" type:"string" required:"true"` 4529} 4530 4531// String returns the string representation 4532func (s DescribeUserInput) String() string { 4533 return awsutil.Prettify(s) 4534} 4535 4536// GoString returns the string representation 4537func (s DescribeUserInput) GoString() string { 4538 return s.String() 4539} 4540 4541// Validate inspects the fields of the type to determine if they are valid. 4542func (s *DescribeUserInput) Validate() error { 4543 invalidParams := request.ErrInvalidParams{Context: "DescribeUserInput"} 4544 if s.OrganizationId == nil { 4545 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 4546 } 4547 if s.UserId == nil { 4548 invalidParams.Add(request.NewErrParamRequired("UserId")) 4549 } 4550 if s.UserId != nil && len(*s.UserId) < 12 { 4551 invalidParams.Add(request.NewErrParamMinLen("UserId", 12)) 4552 } 4553 4554 if invalidParams.Len() > 0 { 4555 return invalidParams 4556 } 4557 return nil 4558} 4559 4560// SetOrganizationId sets the OrganizationId field's value. 4561func (s *DescribeUserInput) SetOrganizationId(v string) *DescribeUserInput { 4562 s.OrganizationId = &v 4563 return s 4564} 4565 4566// SetUserId sets the UserId field's value. 4567func (s *DescribeUserInput) SetUserId(v string) *DescribeUserInput { 4568 s.UserId = &v 4569 return s 4570} 4571 4572// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeUserResponse 4573type DescribeUserOutput struct { 4574 _ struct{} `type:"structure"` 4575 4576 // The date and time at which the user was disabled for Amazon WorkMail usage, 4577 // in UNIX epoch time format. 4578 DisabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 4579 4580 // The display name of the user. 4581 DisplayName *string `type:"string"` 4582 4583 // The email of the user. 4584 Email *string `min:"1" type:"string"` 4585 4586 // The date and time at which the user was enabled for Amazon WorkMail usage, 4587 // in UNIX epoch time format. 4588 EnabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 4589 4590 // The name for the user. 4591 Name *string `min:"1" type:"string"` 4592 4593 // The state of a user: enabled (registered to Amazon WorkMail) or disabled 4594 // (deregistered or never registered to Amazon WorkMail). 4595 State *string `type:"string" enum:"EntityState"` 4596 4597 // The identifier for the described user. 4598 UserId *string `min:"12" type:"string"` 4599 4600 // In certain cases other entities are modeled as users. If interoperability 4601 // is enabled, resources are imported into Amazon WorkMail as users. Because 4602 // different Amazon WorkMail organizations rely on different directory types, 4603 // administrators can distinguish between a user that is not registered to Amazon 4604 // WorkMail (is disabled and has a user role) and the administrative users of 4605 // the directory. The values are USER, RESOURCE, and SYSTEM_USER. 4606 UserRole *string `type:"string" enum:"UserRole"` 4607} 4608 4609// String returns the string representation 4610func (s DescribeUserOutput) String() string { 4611 return awsutil.Prettify(s) 4612} 4613 4614// GoString returns the string representation 4615func (s DescribeUserOutput) GoString() string { 4616 return s.String() 4617} 4618 4619// SetDisabledDate sets the DisabledDate field's value. 4620func (s *DescribeUserOutput) SetDisabledDate(v time.Time) *DescribeUserOutput { 4621 s.DisabledDate = &v 4622 return s 4623} 4624 4625// SetDisplayName sets the DisplayName field's value. 4626func (s *DescribeUserOutput) SetDisplayName(v string) *DescribeUserOutput { 4627 s.DisplayName = &v 4628 return s 4629} 4630 4631// SetEmail sets the Email field's value. 4632func (s *DescribeUserOutput) SetEmail(v string) *DescribeUserOutput { 4633 s.Email = &v 4634 return s 4635} 4636 4637// SetEnabledDate sets the EnabledDate field's value. 4638func (s *DescribeUserOutput) SetEnabledDate(v time.Time) *DescribeUserOutput { 4639 s.EnabledDate = &v 4640 return s 4641} 4642 4643// SetName sets the Name field's value. 4644func (s *DescribeUserOutput) SetName(v string) *DescribeUserOutput { 4645 s.Name = &v 4646 return s 4647} 4648 4649// SetState sets the State field's value. 4650func (s *DescribeUserOutput) SetState(v string) *DescribeUserOutput { 4651 s.State = &v 4652 return s 4653} 4654 4655// SetUserId sets the UserId field's value. 4656func (s *DescribeUserOutput) SetUserId(v string) *DescribeUserOutput { 4657 s.UserId = &v 4658 return s 4659} 4660 4661// SetUserRole sets the UserRole field's value. 4662func (s *DescribeUserOutput) SetUserRole(v string) *DescribeUserOutput { 4663 s.UserRole = &v 4664 return s 4665} 4666 4667// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateDelegateFromResourceRequest 4668type DisassociateDelegateFromResourceInput struct { 4669 _ struct{} `type:"structure"` 4670 4671 // The identifier for the member (user, group) to be removed from the resource's 4672 // delegates. 4673 // 4674 // EntityId is a required field 4675 EntityId *string `min:"12" type:"string" required:"true"` 4676 4677 // The identifier for the organization under which the resource exists. 4678 // 4679 // OrganizationId is a required field 4680 OrganizationId *string `type:"string" required:"true"` 4681 4682 // The identifier of the resource from which delegates' set members are removed. 4683 // 4684 // ResourceId is a required field 4685 ResourceId *string `type:"string" required:"true"` 4686} 4687 4688// String returns the string representation 4689func (s DisassociateDelegateFromResourceInput) String() string { 4690 return awsutil.Prettify(s) 4691} 4692 4693// GoString returns the string representation 4694func (s DisassociateDelegateFromResourceInput) GoString() string { 4695 return s.String() 4696} 4697 4698// Validate inspects the fields of the type to determine if they are valid. 4699func (s *DisassociateDelegateFromResourceInput) Validate() error { 4700 invalidParams := request.ErrInvalidParams{Context: "DisassociateDelegateFromResourceInput"} 4701 if s.EntityId == nil { 4702 invalidParams.Add(request.NewErrParamRequired("EntityId")) 4703 } 4704 if s.EntityId != nil && len(*s.EntityId) < 12 { 4705 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 4706 } 4707 if s.OrganizationId == nil { 4708 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 4709 } 4710 if s.ResourceId == nil { 4711 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 4712 } 4713 4714 if invalidParams.Len() > 0 { 4715 return invalidParams 4716 } 4717 return nil 4718} 4719 4720// SetEntityId sets the EntityId field's value. 4721func (s *DisassociateDelegateFromResourceInput) SetEntityId(v string) *DisassociateDelegateFromResourceInput { 4722 s.EntityId = &v 4723 return s 4724} 4725 4726// SetOrganizationId sets the OrganizationId field's value. 4727func (s *DisassociateDelegateFromResourceInput) SetOrganizationId(v string) *DisassociateDelegateFromResourceInput { 4728 s.OrganizationId = &v 4729 return s 4730} 4731 4732// SetResourceId sets the ResourceId field's value. 4733func (s *DisassociateDelegateFromResourceInput) SetResourceId(v string) *DisassociateDelegateFromResourceInput { 4734 s.ResourceId = &v 4735 return s 4736} 4737 4738// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateDelegateFromResourceResponse 4739type DisassociateDelegateFromResourceOutput struct { 4740 _ struct{} `type:"structure"` 4741} 4742 4743// String returns the string representation 4744func (s DisassociateDelegateFromResourceOutput) String() string { 4745 return awsutil.Prettify(s) 4746} 4747 4748// GoString returns the string representation 4749func (s DisassociateDelegateFromResourceOutput) GoString() string { 4750 return s.String() 4751} 4752 4753// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateMemberFromGroupRequest 4754type DisassociateMemberFromGroupInput struct { 4755 _ struct{} `type:"structure"` 4756 4757 // The identifier for the group from which members are removed. 4758 // 4759 // GroupId is a required field 4760 GroupId *string `min:"12" type:"string" required:"true"` 4761 4762 // The identifier for the member to be removed to the group. 4763 // 4764 // MemberId is a required field 4765 MemberId *string `min:"12" type:"string" required:"true"` 4766 4767 // The identifier for the organization under which the group exists. 4768 // 4769 // OrganizationId is a required field 4770 OrganizationId *string `type:"string" required:"true"` 4771} 4772 4773// String returns the string representation 4774func (s DisassociateMemberFromGroupInput) String() string { 4775 return awsutil.Prettify(s) 4776} 4777 4778// GoString returns the string representation 4779func (s DisassociateMemberFromGroupInput) GoString() string { 4780 return s.String() 4781} 4782 4783// Validate inspects the fields of the type to determine if they are valid. 4784func (s *DisassociateMemberFromGroupInput) Validate() error { 4785 invalidParams := request.ErrInvalidParams{Context: "DisassociateMemberFromGroupInput"} 4786 if s.GroupId == nil { 4787 invalidParams.Add(request.NewErrParamRequired("GroupId")) 4788 } 4789 if s.GroupId != nil && len(*s.GroupId) < 12 { 4790 invalidParams.Add(request.NewErrParamMinLen("GroupId", 12)) 4791 } 4792 if s.MemberId == nil { 4793 invalidParams.Add(request.NewErrParamRequired("MemberId")) 4794 } 4795 if s.MemberId != nil && len(*s.MemberId) < 12 { 4796 invalidParams.Add(request.NewErrParamMinLen("MemberId", 12)) 4797 } 4798 if s.OrganizationId == nil { 4799 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 4800 } 4801 4802 if invalidParams.Len() > 0 { 4803 return invalidParams 4804 } 4805 return nil 4806} 4807 4808// SetGroupId sets the GroupId field's value. 4809func (s *DisassociateMemberFromGroupInput) SetGroupId(v string) *DisassociateMemberFromGroupInput { 4810 s.GroupId = &v 4811 return s 4812} 4813 4814// SetMemberId sets the MemberId field's value. 4815func (s *DisassociateMemberFromGroupInput) SetMemberId(v string) *DisassociateMemberFromGroupInput { 4816 s.MemberId = &v 4817 return s 4818} 4819 4820// SetOrganizationId sets the OrganizationId field's value. 4821func (s *DisassociateMemberFromGroupInput) SetOrganizationId(v string) *DisassociateMemberFromGroupInput { 4822 s.OrganizationId = &v 4823 return s 4824} 4825 4826// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateMemberFromGroupResponse 4827type DisassociateMemberFromGroupOutput struct { 4828 _ struct{} `type:"structure"` 4829} 4830 4831// String returns the string representation 4832func (s DisassociateMemberFromGroupOutput) String() string { 4833 return awsutil.Prettify(s) 4834} 4835 4836// GoString returns the string representation 4837func (s DisassociateMemberFromGroupOutput) GoString() string { 4838 return s.String() 4839} 4840 4841// The representation of an Amazon WorkMail group. 4842// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/Group 4843type Group struct { 4844 _ struct{} `type:"structure"` 4845 4846 // The date indicating when the group was disabled from Amazon WorkMail use. 4847 DisabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 4848 4849 // The email of the group. 4850 Email *string `min:"1" type:"string"` 4851 4852 // The date indicating when the group was enabled for Amazon WorkMail use. 4853 EnabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 4854 4855 // The identifier of the group. 4856 Id *string `min:"12" type:"string"` 4857 4858 // The name of the group. 4859 Name *string `min:"1" type:"string"` 4860 4861 // The state of the group, which can be ENABLED, DISABLED, or DELETED. 4862 State *string `type:"string" enum:"EntityState"` 4863} 4864 4865// String returns the string representation 4866func (s Group) String() string { 4867 return awsutil.Prettify(s) 4868} 4869 4870// GoString returns the string representation 4871func (s Group) GoString() string { 4872 return s.String() 4873} 4874 4875// SetDisabledDate sets the DisabledDate field's value. 4876func (s *Group) SetDisabledDate(v time.Time) *Group { 4877 s.DisabledDate = &v 4878 return s 4879} 4880 4881// SetEmail sets the Email field's value. 4882func (s *Group) SetEmail(v string) *Group { 4883 s.Email = &v 4884 return s 4885} 4886 4887// SetEnabledDate sets the EnabledDate field's value. 4888func (s *Group) SetEnabledDate(v time.Time) *Group { 4889 s.EnabledDate = &v 4890 return s 4891} 4892 4893// SetId sets the Id field's value. 4894func (s *Group) SetId(v string) *Group { 4895 s.Id = &v 4896 return s 4897} 4898 4899// SetName sets the Name field's value. 4900func (s *Group) SetName(v string) *Group { 4901 s.Name = &v 4902 return s 4903} 4904 4905// SetState sets the State field's value. 4906func (s *Group) SetState(v string) *Group { 4907 s.State = &v 4908 return s 4909} 4910 4911// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListAliasesRequest 4912type ListAliasesInput struct { 4913 _ struct{} `type:"structure"` 4914 4915 // The identifier for the entity for which to list the aliases. 4916 // 4917 // EntityId is a required field 4918 EntityId *string `min:"12" type:"string" required:"true"` 4919 4920 // The maximum number of results to return in a single call. 4921 MaxResults *int64 `min:"1" type:"integer"` 4922 4923 // The token to use to retrieve the next page of results. The first call does 4924 // not contain any tokens. 4925 NextToken *string `min:"1" type:"string"` 4926 4927 // The identifier for the organization under which the entity exists. 4928 // 4929 // OrganizationId is a required field 4930 OrganizationId *string `type:"string" required:"true"` 4931} 4932 4933// String returns the string representation 4934func (s ListAliasesInput) String() string { 4935 return awsutil.Prettify(s) 4936} 4937 4938// GoString returns the string representation 4939func (s ListAliasesInput) GoString() string { 4940 return s.String() 4941} 4942 4943// Validate inspects the fields of the type to determine if they are valid. 4944func (s *ListAliasesInput) Validate() error { 4945 invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"} 4946 if s.EntityId == nil { 4947 invalidParams.Add(request.NewErrParamRequired("EntityId")) 4948 } 4949 if s.EntityId != nil && len(*s.EntityId) < 12 { 4950 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 4951 } 4952 if s.MaxResults != nil && *s.MaxResults < 1 { 4953 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4954 } 4955 if s.NextToken != nil && len(*s.NextToken) < 1 { 4956 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 4957 } 4958 if s.OrganizationId == nil { 4959 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 4960 } 4961 4962 if invalidParams.Len() > 0 { 4963 return invalidParams 4964 } 4965 return nil 4966} 4967 4968// SetEntityId sets the EntityId field's value. 4969func (s *ListAliasesInput) SetEntityId(v string) *ListAliasesInput { 4970 s.EntityId = &v 4971 return s 4972} 4973 4974// SetMaxResults sets the MaxResults field's value. 4975func (s *ListAliasesInput) SetMaxResults(v int64) *ListAliasesInput { 4976 s.MaxResults = &v 4977 return s 4978} 4979 4980// SetNextToken sets the NextToken field's value. 4981func (s *ListAliasesInput) SetNextToken(v string) *ListAliasesInput { 4982 s.NextToken = &v 4983 return s 4984} 4985 4986// SetOrganizationId sets the OrganizationId field's value. 4987func (s *ListAliasesInput) SetOrganizationId(v string) *ListAliasesInput { 4988 s.OrganizationId = &v 4989 return s 4990} 4991 4992// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListAliasesResponse 4993type ListAliasesOutput struct { 4994 _ struct{} `type:"structure"` 4995 4996 // The entity's paginated aliases. 4997 Aliases []*string `type:"list"` 4998 4999 // The token to use to retrieve the next page of results. The value is "null" 5000 // when there are no more results to return. 5001 NextToken *string `min:"1" type:"string"` 5002} 5003 5004// String returns the string representation 5005func (s ListAliasesOutput) String() string { 5006 return awsutil.Prettify(s) 5007} 5008 5009// GoString returns the string representation 5010func (s ListAliasesOutput) GoString() string { 5011 return s.String() 5012} 5013 5014// SetAliases sets the Aliases field's value. 5015func (s *ListAliasesOutput) SetAliases(v []*string) *ListAliasesOutput { 5016 s.Aliases = v 5017 return s 5018} 5019 5020// SetNextToken sets the NextToken field's value. 5021func (s *ListAliasesOutput) SetNextToken(v string) *ListAliasesOutput { 5022 s.NextToken = &v 5023 return s 5024} 5025 5026// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroupMembersRequest 5027type ListGroupMembersInput struct { 5028 _ struct{} `type:"structure"` 5029 5030 // The identifier for the group to which the members are associated. 5031 // 5032 // GroupId is a required field 5033 GroupId *string `min:"12" type:"string" required:"true"` 5034 5035 // The maximum number of results to return in a single call. 5036 MaxResults *int64 `min:"1" type:"integer"` 5037 5038 // The token to use to retrieve the next page of results. The first call does 5039 // not contain any tokens. 5040 NextToken *string `min:"1" type:"string"` 5041 5042 // The identifier for the organization under which the group exists. 5043 // 5044 // OrganizationId is a required field 5045 OrganizationId *string `type:"string" required:"true"` 5046} 5047 5048// String returns the string representation 5049func (s ListGroupMembersInput) String() string { 5050 return awsutil.Prettify(s) 5051} 5052 5053// GoString returns the string representation 5054func (s ListGroupMembersInput) GoString() string { 5055 return s.String() 5056} 5057 5058// Validate inspects the fields of the type to determine if they are valid. 5059func (s *ListGroupMembersInput) Validate() error { 5060 invalidParams := request.ErrInvalidParams{Context: "ListGroupMembersInput"} 5061 if s.GroupId == nil { 5062 invalidParams.Add(request.NewErrParamRequired("GroupId")) 5063 } 5064 if s.GroupId != nil && len(*s.GroupId) < 12 { 5065 invalidParams.Add(request.NewErrParamMinLen("GroupId", 12)) 5066 } 5067 if s.MaxResults != nil && *s.MaxResults < 1 { 5068 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5069 } 5070 if s.NextToken != nil && len(*s.NextToken) < 1 { 5071 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5072 } 5073 if s.OrganizationId == nil { 5074 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5075 } 5076 5077 if invalidParams.Len() > 0 { 5078 return invalidParams 5079 } 5080 return nil 5081} 5082 5083// SetGroupId sets the GroupId field's value. 5084func (s *ListGroupMembersInput) SetGroupId(v string) *ListGroupMembersInput { 5085 s.GroupId = &v 5086 return s 5087} 5088 5089// SetMaxResults sets the MaxResults field's value. 5090func (s *ListGroupMembersInput) SetMaxResults(v int64) *ListGroupMembersInput { 5091 s.MaxResults = &v 5092 return s 5093} 5094 5095// SetNextToken sets the NextToken field's value. 5096func (s *ListGroupMembersInput) SetNextToken(v string) *ListGroupMembersInput { 5097 s.NextToken = &v 5098 return s 5099} 5100 5101// SetOrganizationId sets the OrganizationId field's value. 5102func (s *ListGroupMembersInput) SetOrganizationId(v string) *ListGroupMembersInput { 5103 s.OrganizationId = &v 5104 return s 5105} 5106 5107// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroupMembersResponse 5108type ListGroupMembersOutput struct { 5109 _ struct{} `type:"structure"` 5110 5111 // The members associated to the group. 5112 Members []*Member `type:"list"` 5113 5114 // The token to use to retrieve the next page of results. The first call does 5115 // not contain any tokens. 5116 NextToken *string `min:"1" type:"string"` 5117} 5118 5119// String returns the string representation 5120func (s ListGroupMembersOutput) String() string { 5121 return awsutil.Prettify(s) 5122} 5123 5124// GoString returns the string representation 5125func (s ListGroupMembersOutput) GoString() string { 5126 return s.String() 5127} 5128 5129// SetMembers sets the Members field's value. 5130func (s *ListGroupMembersOutput) SetMembers(v []*Member) *ListGroupMembersOutput { 5131 s.Members = v 5132 return s 5133} 5134 5135// SetNextToken sets the NextToken field's value. 5136func (s *ListGroupMembersOutput) SetNextToken(v string) *ListGroupMembersOutput { 5137 s.NextToken = &v 5138 return s 5139} 5140 5141// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroupsRequest 5142type ListGroupsInput struct { 5143 _ struct{} `type:"structure"` 5144 5145 // The maximum number of results to return in a single call. 5146 MaxResults *int64 `min:"1" type:"integer"` 5147 5148 // The token to use to retrieve the next page of results. The first call does 5149 // not contain any tokens. 5150 NextToken *string `min:"1" type:"string"` 5151 5152 // The identifier for the organization under which the groups exist. 5153 // 5154 // OrganizationId is a required field 5155 OrganizationId *string `type:"string" required:"true"` 5156} 5157 5158// String returns the string representation 5159func (s ListGroupsInput) String() string { 5160 return awsutil.Prettify(s) 5161} 5162 5163// GoString returns the string representation 5164func (s ListGroupsInput) GoString() string { 5165 return s.String() 5166} 5167 5168// Validate inspects the fields of the type to determine if they are valid. 5169func (s *ListGroupsInput) Validate() error { 5170 invalidParams := request.ErrInvalidParams{Context: "ListGroupsInput"} 5171 if s.MaxResults != nil && *s.MaxResults < 1 { 5172 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5173 } 5174 if s.NextToken != nil && len(*s.NextToken) < 1 { 5175 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5176 } 5177 if s.OrganizationId == nil { 5178 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5179 } 5180 5181 if invalidParams.Len() > 0 { 5182 return invalidParams 5183 } 5184 return nil 5185} 5186 5187// SetMaxResults sets the MaxResults field's value. 5188func (s *ListGroupsInput) SetMaxResults(v int64) *ListGroupsInput { 5189 s.MaxResults = &v 5190 return s 5191} 5192 5193// SetNextToken sets the NextToken field's value. 5194func (s *ListGroupsInput) SetNextToken(v string) *ListGroupsInput { 5195 s.NextToken = &v 5196 return s 5197} 5198 5199// SetOrganizationId sets the OrganizationId field's value. 5200func (s *ListGroupsInput) SetOrganizationId(v string) *ListGroupsInput { 5201 s.OrganizationId = &v 5202 return s 5203} 5204 5205// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroupsResponse 5206type ListGroupsOutput struct { 5207 _ struct{} `type:"structure"` 5208 5209 // The overview of groups for an organization. 5210 Groups []*Group `type:"list"` 5211 5212 // The token to use to retrieve the next page of results. The value is "null" 5213 // when there are no more results to return. 5214 NextToken *string `min:"1" type:"string"` 5215} 5216 5217// String returns the string representation 5218func (s ListGroupsOutput) String() string { 5219 return awsutil.Prettify(s) 5220} 5221 5222// GoString returns the string representation 5223func (s ListGroupsOutput) GoString() string { 5224 return s.String() 5225} 5226 5227// SetGroups sets the Groups field's value. 5228func (s *ListGroupsOutput) SetGroups(v []*Group) *ListGroupsOutput { 5229 s.Groups = v 5230 return s 5231} 5232 5233// SetNextToken sets the NextToken field's value. 5234func (s *ListGroupsOutput) SetNextToken(v string) *ListGroupsOutput { 5235 s.NextToken = &v 5236 return s 5237} 5238 5239// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListOrganizationsRequest 5240type ListOrganizationsInput struct { 5241 _ struct{} `type:"structure"` 5242 5243 // The maximum number of results to return in a single call. 5244 MaxResults *int64 `min:"1" type:"integer"` 5245 5246 // The token to use to retrieve the next page of results. The first call does 5247 // not contain any tokens. 5248 NextToken *string `min:"1" type:"string"` 5249} 5250 5251// String returns the string representation 5252func (s ListOrganizationsInput) String() string { 5253 return awsutil.Prettify(s) 5254} 5255 5256// GoString returns the string representation 5257func (s ListOrganizationsInput) GoString() string { 5258 return s.String() 5259} 5260 5261// Validate inspects the fields of the type to determine if they are valid. 5262func (s *ListOrganizationsInput) Validate() error { 5263 invalidParams := request.ErrInvalidParams{Context: "ListOrganizationsInput"} 5264 if s.MaxResults != nil && *s.MaxResults < 1 { 5265 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5266 } 5267 if s.NextToken != nil && len(*s.NextToken) < 1 { 5268 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5269 } 5270 5271 if invalidParams.Len() > 0 { 5272 return invalidParams 5273 } 5274 return nil 5275} 5276 5277// SetMaxResults sets the MaxResults field's value. 5278func (s *ListOrganizationsInput) SetMaxResults(v int64) *ListOrganizationsInput { 5279 s.MaxResults = &v 5280 return s 5281} 5282 5283// SetNextToken sets the NextToken field's value. 5284func (s *ListOrganizationsInput) SetNextToken(v string) *ListOrganizationsInput { 5285 s.NextToken = &v 5286 return s 5287} 5288 5289// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListOrganizationsResponse 5290type ListOrganizationsOutput struct { 5291 _ struct{} `type:"structure"` 5292 5293 // The token to use to retrieve the next page of results. The value is "null" 5294 // when there are no more results to return. 5295 NextToken *string `min:"1" type:"string"` 5296 5297 // The overview of owned organizations presented as a list of organization summaries. 5298 OrganizationSummaries []*OrganizationSummary `type:"list"` 5299} 5300 5301// String returns the string representation 5302func (s ListOrganizationsOutput) String() string { 5303 return awsutil.Prettify(s) 5304} 5305 5306// GoString returns the string representation 5307func (s ListOrganizationsOutput) GoString() string { 5308 return s.String() 5309} 5310 5311// SetNextToken sets the NextToken field's value. 5312func (s *ListOrganizationsOutput) SetNextToken(v string) *ListOrganizationsOutput { 5313 s.NextToken = &v 5314 return s 5315} 5316 5317// SetOrganizationSummaries sets the OrganizationSummaries field's value. 5318func (s *ListOrganizationsOutput) SetOrganizationSummaries(v []*OrganizationSummary) *ListOrganizationsOutput { 5319 s.OrganizationSummaries = v 5320 return s 5321} 5322 5323// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResourceDelegatesRequest 5324type ListResourceDelegatesInput struct { 5325 _ struct{} `type:"structure"` 5326 5327 // The number of maximum results in a page. 5328 MaxResults *int64 `min:"1" type:"integer"` 5329 5330 // The token used to paginate through the delegates associated with a resource. 5331 NextToken *string `min:"1" type:"string"` 5332 5333 // The identifier for the organization that contains the resource for which 5334 // delegates are listed. 5335 // 5336 // OrganizationId is a required field 5337 OrganizationId *string `type:"string" required:"true"` 5338 5339 // The identifier for the resource whose delegates are listed. 5340 // 5341 // ResourceId is a required field 5342 ResourceId *string `min:"12" type:"string" required:"true"` 5343} 5344 5345// String returns the string representation 5346func (s ListResourceDelegatesInput) String() string { 5347 return awsutil.Prettify(s) 5348} 5349 5350// GoString returns the string representation 5351func (s ListResourceDelegatesInput) GoString() string { 5352 return s.String() 5353} 5354 5355// Validate inspects the fields of the type to determine if they are valid. 5356func (s *ListResourceDelegatesInput) Validate() error { 5357 invalidParams := request.ErrInvalidParams{Context: "ListResourceDelegatesInput"} 5358 if s.MaxResults != nil && *s.MaxResults < 1 { 5359 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5360 } 5361 if s.NextToken != nil && len(*s.NextToken) < 1 { 5362 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5363 } 5364 if s.OrganizationId == nil { 5365 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5366 } 5367 if s.ResourceId == nil { 5368 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 5369 } 5370 if s.ResourceId != nil && len(*s.ResourceId) < 12 { 5371 invalidParams.Add(request.NewErrParamMinLen("ResourceId", 12)) 5372 } 5373 5374 if invalidParams.Len() > 0 { 5375 return invalidParams 5376 } 5377 return nil 5378} 5379 5380// SetMaxResults sets the MaxResults field's value. 5381func (s *ListResourceDelegatesInput) SetMaxResults(v int64) *ListResourceDelegatesInput { 5382 s.MaxResults = &v 5383 return s 5384} 5385 5386// SetNextToken sets the NextToken field's value. 5387func (s *ListResourceDelegatesInput) SetNextToken(v string) *ListResourceDelegatesInput { 5388 s.NextToken = &v 5389 return s 5390} 5391 5392// SetOrganizationId sets the OrganizationId field's value. 5393func (s *ListResourceDelegatesInput) SetOrganizationId(v string) *ListResourceDelegatesInput { 5394 s.OrganizationId = &v 5395 return s 5396} 5397 5398// SetResourceId sets the ResourceId field's value. 5399func (s *ListResourceDelegatesInput) SetResourceId(v string) *ListResourceDelegatesInput { 5400 s.ResourceId = &v 5401 return s 5402} 5403 5404// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResourceDelegatesResponse 5405type ListResourceDelegatesOutput struct { 5406 _ struct{} `type:"structure"` 5407 5408 // One page of the resource's delegates. 5409 Delegates []*Delegate `type:"list"` 5410 5411 // The token used to paginate through the delegates associated with a resource. 5412 // While results are still available, it has an associated value. When the last 5413 // page is reached, the token is empty. 5414 NextToken *string `min:"1" type:"string"` 5415} 5416 5417// String returns the string representation 5418func (s ListResourceDelegatesOutput) String() string { 5419 return awsutil.Prettify(s) 5420} 5421 5422// GoString returns the string representation 5423func (s ListResourceDelegatesOutput) GoString() string { 5424 return s.String() 5425} 5426 5427// SetDelegates sets the Delegates field's value. 5428func (s *ListResourceDelegatesOutput) SetDelegates(v []*Delegate) *ListResourceDelegatesOutput { 5429 s.Delegates = v 5430 return s 5431} 5432 5433// SetNextToken sets the NextToken field's value. 5434func (s *ListResourceDelegatesOutput) SetNextToken(v string) *ListResourceDelegatesOutput { 5435 s.NextToken = &v 5436 return s 5437} 5438 5439// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResourcesRequest 5440type ListResourcesInput struct { 5441 _ struct{} `type:"structure"` 5442 5443 // The maximum number of results to return in a single call. 5444 MaxResults *int64 `min:"1" type:"integer"` 5445 5446 // The token to use to retrieve the next page of results. The first call does 5447 // not contain any tokens. 5448 NextToken *string `min:"1" type:"string"` 5449 5450 // The identifier for the organization under which the resources exist. 5451 // 5452 // OrganizationId is a required field 5453 OrganizationId *string `type:"string" required:"true"` 5454} 5455 5456// String returns the string representation 5457func (s ListResourcesInput) String() string { 5458 return awsutil.Prettify(s) 5459} 5460 5461// GoString returns the string representation 5462func (s ListResourcesInput) GoString() string { 5463 return s.String() 5464} 5465 5466// Validate inspects the fields of the type to determine if they are valid. 5467func (s *ListResourcesInput) Validate() error { 5468 invalidParams := request.ErrInvalidParams{Context: "ListResourcesInput"} 5469 if s.MaxResults != nil && *s.MaxResults < 1 { 5470 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5471 } 5472 if s.NextToken != nil && len(*s.NextToken) < 1 { 5473 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5474 } 5475 if s.OrganizationId == nil { 5476 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5477 } 5478 5479 if invalidParams.Len() > 0 { 5480 return invalidParams 5481 } 5482 return nil 5483} 5484 5485// SetMaxResults sets the MaxResults field's value. 5486func (s *ListResourcesInput) SetMaxResults(v int64) *ListResourcesInput { 5487 s.MaxResults = &v 5488 return s 5489} 5490 5491// SetNextToken sets the NextToken field's value. 5492func (s *ListResourcesInput) SetNextToken(v string) *ListResourcesInput { 5493 s.NextToken = &v 5494 return s 5495} 5496 5497// SetOrganizationId sets the OrganizationId field's value. 5498func (s *ListResourcesInput) SetOrganizationId(v string) *ListResourcesInput { 5499 s.OrganizationId = &v 5500 return s 5501} 5502 5503// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResourcesResponse 5504type ListResourcesOutput struct { 5505 _ struct{} `type:"structure"` 5506 5507 // The token used to paginate through all the organization's resources. While 5508 // results are still available, it has an associated value. When the last page 5509 // is reached, the token is empty. 5510 NextToken *string `min:"1" type:"string"` 5511 5512 // One page of the organization's resource representation. 5513 Resources []*Resource `type:"list"` 5514} 5515 5516// String returns the string representation 5517func (s ListResourcesOutput) String() string { 5518 return awsutil.Prettify(s) 5519} 5520 5521// GoString returns the string representation 5522func (s ListResourcesOutput) GoString() string { 5523 return s.String() 5524} 5525 5526// SetNextToken sets the NextToken field's value. 5527func (s *ListResourcesOutput) SetNextToken(v string) *ListResourcesOutput { 5528 s.NextToken = &v 5529 return s 5530} 5531 5532// SetResources sets the Resources field's value. 5533func (s *ListResourcesOutput) SetResources(v []*Resource) *ListResourcesOutput { 5534 s.Resources = v 5535 return s 5536} 5537 5538// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListUsersRequest 5539type ListUsersInput struct { 5540 _ struct{} `type:"structure"` 5541 5542 // The maximum number of results to return in a single call. 5543 MaxResults *int64 `min:"1" type:"integer"` 5544 5545 // TBD 5546 NextToken *string `min:"1" type:"string"` 5547 5548 // The identifier for the organization under which the users exist. 5549 // 5550 // OrganizationId is a required field 5551 OrganizationId *string `type:"string" required:"true"` 5552} 5553 5554// String returns the string representation 5555func (s ListUsersInput) String() string { 5556 return awsutil.Prettify(s) 5557} 5558 5559// GoString returns the string representation 5560func (s ListUsersInput) GoString() string { 5561 return s.String() 5562} 5563 5564// Validate inspects the fields of the type to determine if they are valid. 5565func (s *ListUsersInput) Validate() error { 5566 invalidParams := request.ErrInvalidParams{Context: "ListUsersInput"} 5567 if s.MaxResults != nil && *s.MaxResults < 1 { 5568 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5569 } 5570 if s.NextToken != nil && len(*s.NextToken) < 1 { 5571 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5572 } 5573 if s.OrganizationId == nil { 5574 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5575 } 5576 5577 if invalidParams.Len() > 0 { 5578 return invalidParams 5579 } 5580 return nil 5581} 5582 5583// SetMaxResults sets the MaxResults field's value. 5584func (s *ListUsersInput) SetMaxResults(v int64) *ListUsersInput { 5585 s.MaxResults = &v 5586 return s 5587} 5588 5589// SetNextToken sets the NextToken field's value. 5590func (s *ListUsersInput) SetNextToken(v string) *ListUsersInput { 5591 s.NextToken = &v 5592 return s 5593} 5594 5595// SetOrganizationId sets the OrganizationId field's value. 5596func (s *ListUsersInput) SetOrganizationId(v string) *ListUsersInput { 5597 s.OrganizationId = &v 5598 return s 5599} 5600 5601// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListUsersResponse 5602type ListUsersOutput struct { 5603 _ struct{} `type:"structure"` 5604 5605 // The token to use to retrieve the next page of results. This value is `null` 5606 // when there are no more results to return. 5607 NextToken *string `min:"1" type:"string"` 5608 5609 // The overview of users for an organization. 5610 Users []*User `type:"list"` 5611} 5612 5613// String returns the string representation 5614func (s ListUsersOutput) String() string { 5615 return awsutil.Prettify(s) 5616} 5617 5618// GoString returns the string representation 5619func (s ListUsersOutput) GoString() string { 5620 return s.String() 5621} 5622 5623// SetNextToken sets the NextToken field's value. 5624func (s *ListUsersOutput) SetNextToken(v string) *ListUsersOutput { 5625 s.NextToken = &v 5626 return s 5627} 5628 5629// SetUsers sets the Users field's value. 5630func (s *ListUsersOutput) SetUsers(v []*User) *ListUsersOutput { 5631 s.Users = v 5632 return s 5633} 5634 5635// The representation of a group member (user or group). 5636// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/Member 5637type Member struct { 5638 _ struct{} `type:"structure"` 5639 5640 // The date indicating when the member was disabled from Amazon WorkMail use. 5641 DisabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 5642 5643 // The date indicating when the member was enabled for Amazon WorkMail use. 5644 EnabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 5645 5646 // The identifier of the member. 5647 Id *string `type:"string"` 5648 5649 // The name of the member. 5650 Name *string `type:"string"` 5651 5652 // The state of the member, which can be ENABLED, DISABLED, or DELETED. 5653 State *string `type:"string" enum:"EntityState"` 5654 5655 // A member can be a user or group. 5656 Type *string `type:"string" enum:"MemberType"` 5657} 5658 5659// String returns the string representation 5660func (s Member) String() string { 5661 return awsutil.Prettify(s) 5662} 5663 5664// GoString returns the string representation 5665func (s Member) GoString() string { 5666 return s.String() 5667} 5668 5669// SetDisabledDate sets the DisabledDate field's value. 5670func (s *Member) SetDisabledDate(v time.Time) *Member { 5671 s.DisabledDate = &v 5672 return s 5673} 5674 5675// SetEnabledDate sets the EnabledDate field's value. 5676func (s *Member) SetEnabledDate(v time.Time) *Member { 5677 s.EnabledDate = &v 5678 return s 5679} 5680 5681// SetId sets the Id field's value. 5682func (s *Member) SetId(v string) *Member { 5683 s.Id = &v 5684 return s 5685} 5686 5687// SetName sets the Name field's value. 5688func (s *Member) SetName(v string) *Member { 5689 s.Name = &v 5690 return s 5691} 5692 5693// SetState sets the State field's value. 5694func (s *Member) SetState(v string) *Member { 5695 s.State = &v 5696 return s 5697} 5698 5699// SetType sets the Type field's value. 5700func (s *Member) SetType(v string) *Member { 5701 s.Type = &v 5702 return s 5703} 5704 5705// The brief overview associated with an organization. 5706// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/OrganizationSummary 5707type OrganizationSummary struct { 5708 _ struct{} `type:"structure"` 5709 5710 // The alias associated with the organization. 5711 Alias *string `min:"1" type:"string"` 5712 5713 // The error message associated with the organization. It is only present if 5714 // unexpected behavior has occurred with regards to the organization. It provides 5715 // insight or solutions regarding unexpected behavior. 5716 ErrorMessage *string `type:"string"` 5717 5718 // The identifier associated with the organization. 5719 OrganizationId *string `type:"string"` 5720 5721 // The state associated with the organization. 5722 State *string `type:"string"` 5723} 5724 5725// String returns the string representation 5726func (s OrganizationSummary) String() string { 5727 return awsutil.Prettify(s) 5728} 5729 5730// GoString returns the string representation 5731func (s OrganizationSummary) GoString() string { 5732 return s.String() 5733} 5734 5735// SetAlias sets the Alias field's value. 5736func (s *OrganizationSummary) SetAlias(v string) *OrganizationSummary { 5737 s.Alias = &v 5738 return s 5739} 5740 5741// SetErrorMessage sets the ErrorMessage field's value. 5742func (s *OrganizationSummary) SetErrorMessage(v string) *OrganizationSummary { 5743 s.ErrorMessage = &v 5744 return s 5745} 5746 5747// SetOrganizationId sets the OrganizationId field's value. 5748func (s *OrganizationSummary) SetOrganizationId(v string) *OrganizationSummary { 5749 s.OrganizationId = &v 5750 return s 5751} 5752 5753// SetState sets the State field's value. 5754func (s *OrganizationSummary) SetState(v string) *OrganizationSummary { 5755 s.State = &v 5756 return s 5757} 5758 5759// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMailRequest 5760type RegisterToWorkMailInput struct { 5761 _ struct{} `type:"structure"` 5762 5763 // The email for the entity to be updated. 5764 // 5765 // Email is a required field 5766 Email *string `min:"1" type:"string" required:"true"` 5767 5768 // The identifier for the entity to be updated. 5769 // 5770 // EntityId is a required field 5771 EntityId *string `min:"12" type:"string" required:"true"` 5772 5773 // The identifier for the organization under which the Amazon WorkMail entity 5774 // exists. 5775 // 5776 // OrganizationId is a required field 5777 OrganizationId *string `type:"string" required:"true"` 5778} 5779 5780// String returns the string representation 5781func (s RegisterToWorkMailInput) String() string { 5782 return awsutil.Prettify(s) 5783} 5784 5785// GoString returns the string representation 5786func (s RegisterToWorkMailInput) GoString() string { 5787 return s.String() 5788} 5789 5790// Validate inspects the fields of the type to determine if they are valid. 5791func (s *RegisterToWorkMailInput) Validate() error { 5792 invalidParams := request.ErrInvalidParams{Context: "RegisterToWorkMailInput"} 5793 if s.Email == nil { 5794 invalidParams.Add(request.NewErrParamRequired("Email")) 5795 } 5796 if s.Email != nil && len(*s.Email) < 1 { 5797 invalidParams.Add(request.NewErrParamMinLen("Email", 1)) 5798 } 5799 if s.EntityId == nil { 5800 invalidParams.Add(request.NewErrParamRequired("EntityId")) 5801 } 5802 if s.EntityId != nil && len(*s.EntityId) < 12 { 5803 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 5804 } 5805 if s.OrganizationId == nil { 5806 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5807 } 5808 5809 if invalidParams.Len() > 0 { 5810 return invalidParams 5811 } 5812 return nil 5813} 5814 5815// SetEmail sets the Email field's value. 5816func (s *RegisterToWorkMailInput) SetEmail(v string) *RegisterToWorkMailInput { 5817 s.Email = &v 5818 return s 5819} 5820 5821// SetEntityId sets the EntityId field's value. 5822func (s *RegisterToWorkMailInput) SetEntityId(v string) *RegisterToWorkMailInput { 5823 s.EntityId = &v 5824 return s 5825} 5826 5827// SetOrganizationId sets the OrganizationId field's value. 5828func (s *RegisterToWorkMailInput) SetOrganizationId(v string) *RegisterToWorkMailInput { 5829 s.OrganizationId = &v 5830 return s 5831} 5832 5833// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMailResponse 5834type RegisterToWorkMailOutput struct { 5835 _ struct{} `type:"structure"` 5836} 5837 5838// String returns the string representation 5839func (s RegisterToWorkMailOutput) String() string { 5840 return awsutil.Prettify(s) 5841} 5842 5843// GoString returns the string representation 5844func (s RegisterToWorkMailOutput) GoString() string { 5845 return s.String() 5846} 5847 5848// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ResetPasswordRequest 5849type ResetPasswordInput struct { 5850 _ struct{} `type:"structure"` 5851 5852 // The identifier of the organization that contains the user for which the password 5853 // is reset. 5854 // 5855 // OrganizationId is a required field 5856 OrganizationId *string `type:"string" required:"true"` 5857 5858 // The new password for the user. 5859 // 5860 // Password is a required field 5861 Password *string `type:"string" required:"true"` 5862 5863 // The identifier of the user for whom the password is reset. 5864 // 5865 // UserId is a required field 5866 UserId *string `min:"12" type:"string" required:"true"` 5867} 5868 5869// String returns the string representation 5870func (s ResetPasswordInput) String() string { 5871 return awsutil.Prettify(s) 5872} 5873 5874// GoString returns the string representation 5875func (s ResetPasswordInput) GoString() string { 5876 return s.String() 5877} 5878 5879// Validate inspects the fields of the type to determine if they are valid. 5880func (s *ResetPasswordInput) Validate() error { 5881 invalidParams := request.ErrInvalidParams{Context: "ResetPasswordInput"} 5882 if s.OrganizationId == nil { 5883 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5884 } 5885 if s.Password == nil { 5886 invalidParams.Add(request.NewErrParamRequired("Password")) 5887 } 5888 if s.UserId == nil { 5889 invalidParams.Add(request.NewErrParamRequired("UserId")) 5890 } 5891 if s.UserId != nil && len(*s.UserId) < 12 { 5892 invalidParams.Add(request.NewErrParamMinLen("UserId", 12)) 5893 } 5894 5895 if invalidParams.Len() > 0 { 5896 return invalidParams 5897 } 5898 return nil 5899} 5900 5901// SetOrganizationId sets the OrganizationId field's value. 5902func (s *ResetPasswordInput) SetOrganizationId(v string) *ResetPasswordInput { 5903 s.OrganizationId = &v 5904 return s 5905} 5906 5907// SetPassword sets the Password field's value. 5908func (s *ResetPasswordInput) SetPassword(v string) *ResetPasswordInput { 5909 s.Password = &v 5910 return s 5911} 5912 5913// SetUserId sets the UserId field's value. 5914func (s *ResetPasswordInput) SetUserId(v string) *ResetPasswordInput { 5915 s.UserId = &v 5916 return s 5917} 5918 5919// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ResetPasswordResponse 5920type ResetPasswordOutput struct { 5921 _ struct{} `type:"structure"` 5922} 5923 5924// String returns the string representation 5925func (s ResetPasswordOutput) String() string { 5926 return awsutil.Prettify(s) 5927} 5928 5929// GoString returns the string representation 5930func (s ResetPasswordOutput) GoString() string { 5931 return s.String() 5932} 5933 5934// The overview for a resource containing relevant data regarding it. 5935// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/Resource 5936type Resource struct { 5937 _ struct{} `type:"structure"` 5938 5939 // The date indicating when the resource was disabled from Amazon WorkMail use. 5940 DisabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 5941 5942 // The email of the resource. 5943 Email *string `min:"1" type:"string"` 5944 5945 // The date indicating when the resource was enabled for Amazon WorkMail use. 5946 EnabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 5947 5948 // The identifier of the resource. 5949 Id *string `min:"12" type:"string"` 5950 5951 // The name of the resource. 5952 Name *string `min:"1" type:"string"` 5953 5954 // The state of the resource, which can be ENABLED, DISABLED, or DELETED. 5955 State *string `type:"string" enum:"EntityState"` 5956 5957 // The type of the resource: equipment or room. 5958 Type *string `type:"string" enum:"ResourceType"` 5959} 5960 5961// String returns the string representation 5962func (s Resource) String() string { 5963 return awsutil.Prettify(s) 5964} 5965 5966// GoString returns the string representation 5967func (s Resource) GoString() string { 5968 return s.String() 5969} 5970 5971// SetDisabledDate sets the DisabledDate field's value. 5972func (s *Resource) SetDisabledDate(v time.Time) *Resource { 5973 s.DisabledDate = &v 5974 return s 5975} 5976 5977// SetEmail sets the Email field's value. 5978func (s *Resource) SetEmail(v string) *Resource { 5979 s.Email = &v 5980 return s 5981} 5982 5983// SetEnabledDate sets the EnabledDate field's value. 5984func (s *Resource) SetEnabledDate(v time.Time) *Resource { 5985 s.EnabledDate = &v 5986 return s 5987} 5988 5989// SetId sets the Id field's value. 5990func (s *Resource) SetId(v string) *Resource { 5991 s.Id = &v 5992 return s 5993} 5994 5995// SetName sets the Name field's value. 5996func (s *Resource) SetName(v string) *Resource { 5997 s.Name = &v 5998 return s 5999} 6000 6001// SetState sets the State field's value. 6002func (s *Resource) SetState(v string) *Resource { 6003 s.State = &v 6004 return s 6005} 6006 6007// SetType sets the Type field's value. 6008func (s *Resource) SetType(v string) *Resource { 6009 s.Type = &v 6010 return s 6011} 6012 6013// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdatePrimaryEmailAddressRequest 6014type UpdatePrimaryEmailAddressInput struct { 6015 _ struct{} `type:"structure"` 6016 6017 // The value of the email to be updated as primary. 6018 // 6019 // Email is a required field 6020 Email *string `min:"1" type:"string" required:"true"` 6021 6022 // The entity to update (user, group, or resource). 6023 // 6024 // EntityId is a required field 6025 EntityId *string `min:"12" type:"string" required:"true"` 6026 6027 // The organization that contains the entity to update. 6028 // 6029 // OrganizationId is a required field 6030 OrganizationId *string `type:"string" required:"true"` 6031} 6032 6033// String returns the string representation 6034func (s UpdatePrimaryEmailAddressInput) String() string { 6035 return awsutil.Prettify(s) 6036} 6037 6038// GoString returns the string representation 6039func (s UpdatePrimaryEmailAddressInput) GoString() string { 6040 return s.String() 6041} 6042 6043// Validate inspects the fields of the type to determine if they are valid. 6044func (s *UpdatePrimaryEmailAddressInput) Validate() error { 6045 invalidParams := request.ErrInvalidParams{Context: "UpdatePrimaryEmailAddressInput"} 6046 if s.Email == nil { 6047 invalidParams.Add(request.NewErrParamRequired("Email")) 6048 } 6049 if s.Email != nil && len(*s.Email) < 1 { 6050 invalidParams.Add(request.NewErrParamMinLen("Email", 1)) 6051 } 6052 if s.EntityId == nil { 6053 invalidParams.Add(request.NewErrParamRequired("EntityId")) 6054 } 6055 if s.EntityId != nil && len(*s.EntityId) < 12 { 6056 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 6057 } 6058 if s.OrganizationId == nil { 6059 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 6060 } 6061 6062 if invalidParams.Len() > 0 { 6063 return invalidParams 6064 } 6065 return nil 6066} 6067 6068// SetEmail sets the Email field's value. 6069func (s *UpdatePrimaryEmailAddressInput) SetEmail(v string) *UpdatePrimaryEmailAddressInput { 6070 s.Email = &v 6071 return s 6072} 6073 6074// SetEntityId sets the EntityId field's value. 6075func (s *UpdatePrimaryEmailAddressInput) SetEntityId(v string) *UpdatePrimaryEmailAddressInput { 6076 s.EntityId = &v 6077 return s 6078} 6079 6080// SetOrganizationId sets the OrganizationId field's value. 6081func (s *UpdatePrimaryEmailAddressInput) SetOrganizationId(v string) *UpdatePrimaryEmailAddressInput { 6082 s.OrganizationId = &v 6083 return s 6084} 6085 6086// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdatePrimaryEmailAddressResponse 6087type UpdatePrimaryEmailAddressOutput struct { 6088 _ struct{} `type:"structure"` 6089} 6090 6091// String returns the string representation 6092func (s UpdatePrimaryEmailAddressOutput) String() string { 6093 return awsutil.Prettify(s) 6094} 6095 6096// GoString returns the string representation 6097func (s UpdatePrimaryEmailAddressOutput) GoString() string { 6098 return s.String() 6099} 6100 6101// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdateResourceRequest 6102type UpdateResourceInput struct { 6103 _ struct{} `type:"structure"` 6104 6105 // The resource's booking options to be updated. 6106 BookingOptions *BookingOptions `type:"structure"` 6107 6108 // The name of the resource to be updated. 6109 Name *string `min:"1" type:"string"` 6110 6111 // The identifier associated with the organization for which the resource is 6112 // updated. 6113 // 6114 // OrganizationId is a required field 6115 OrganizationId *string `type:"string" required:"true"` 6116 6117 // The identifier of the resource to be updated. 6118 // 6119 // ResourceId is a required field 6120 ResourceId *string `type:"string" required:"true"` 6121} 6122 6123// String returns the string representation 6124func (s UpdateResourceInput) String() string { 6125 return awsutil.Prettify(s) 6126} 6127 6128// GoString returns the string representation 6129func (s UpdateResourceInput) GoString() string { 6130 return s.String() 6131} 6132 6133// Validate inspects the fields of the type to determine if they are valid. 6134func (s *UpdateResourceInput) Validate() error { 6135 invalidParams := request.ErrInvalidParams{Context: "UpdateResourceInput"} 6136 if s.Name != nil && len(*s.Name) < 1 { 6137 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 6138 } 6139 if s.OrganizationId == nil { 6140 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 6141 } 6142 if s.ResourceId == nil { 6143 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 6144 } 6145 6146 if invalidParams.Len() > 0 { 6147 return invalidParams 6148 } 6149 return nil 6150} 6151 6152// SetBookingOptions sets the BookingOptions field's value. 6153func (s *UpdateResourceInput) SetBookingOptions(v *BookingOptions) *UpdateResourceInput { 6154 s.BookingOptions = v 6155 return s 6156} 6157 6158// SetName sets the Name field's value. 6159func (s *UpdateResourceInput) SetName(v string) *UpdateResourceInput { 6160 s.Name = &v 6161 return s 6162} 6163 6164// SetOrganizationId sets the OrganizationId field's value. 6165func (s *UpdateResourceInput) SetOrganizationId(v string) *UpdateResourceInput { 6166 s.OrganizationId = &v 6167 return s 6168} 6169 6170// SetResourceId sets the ResourceId field's value. 6171func (s *UpdateResourceInput) SetResourceId(v string) *UpdateResourceInput { 6172 s.ResourceId = &v 6173 return s 6174} 6175 6176// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdateResourceResponse 6177type UpdateResourceOutput struct { 6178 _ struct{} `type:"structure"` 6179} 6180 6181// String returns the string representation 6182func (s UpdateResourceOutput) String() string { 6183 return awsutil.Prettify(s) 6184} 6185 6186// GoString returns the string representation 6187func (s UpdateResourceOutput) GoString() string { 6188 return s.String() 6189} 6190 6191// The representation of an Amazon WorkMail user. 6192// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/User 6193type User struct { 6194 _ struct{} `type:"structure"` 6195 6196 // The date indicating when the user was disabled from Amazon WorkMail use. 6197 DisabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 6198 6199 // The display name of the user. 6200 DisplayName *string `type:"string"` 6201 6202 // The email of the user. 6203 Email *string `min:"1" type:"string"` 6204 6205 // The date indicating when the user was enabled for Amazon WorkMail use. 6206 EnabledDate *time.Time `type:"timestamp" timestampFormat:"unix"` 6207 6208 // The identifier of the user. 6209 Id *string `min:"12" type:"string"` 6210 6211 // The name of the user. 6212 Name *string `min:"1" type:"string"` 6213 6214 // The state of the user, which can be ENABLED, DISABLED, or DELETED. 6215 State *string `type:"string" enum:"EntityState"` 6216 6217 // The role of the user. 6218 UserRole *string `type:"string" enum:"UserRole"` 6219} 6220 6221// String returns the string representation 6222func (s User) String() string { 6223 return awsutil.Prettify(s) 6224} 6225 6226// GoString returns the string representation 6227func (s User) GoString() string { 6228 return s.String() 6229} 6230 6231// SetDisabledDate sets the DisabledDate field's value. 6232func (s *User) SetDisabledDate(v time.Time) *User { 6233 s.DisabledDate = &v 6234 return s 6235} 6236 6237// SetDisplayName sets the DisplayName field's value. 6238func (s *User) SetDisplayName(v string) *User { 6239 s.DisplayName = &v 6240 return s 6241} 6242 6243// SetEmail sets the Email field's value. 6244func (s *User) SetEmail(v string) *User { 6245 s.Email = &v 6246 return s 6247} 6248 6249// SetEnabledDate sets the EnabledDate field's value. 6250func (s *User) SetEnabledDate(v time.Time) *User { 6251 s.EnabledDate = &v 6252 return s 6253} 6254 6255// SetId sets the Id field's value. 6256func (s *User) SetId(v string) *User { 6257 s.Id = &v 6258 return s 6259} 6260 6261// SetName sets the Name field's value. 6262func (s *User) SetName(v string) *User { 6263 s.Name = &v 6264 return s 6265} 6266 6267// SetState sets the State field's value. 6268func (s *User) SetState(v string) *User { 6269 s.State = &v 6270 return s 6271} 6272 6273// SetUserRole sets the UserRole field's value. 6274func (s *User) SetUserRole(v string) *User { 6275 s.UserRole = &v 6276 return s 6277} 6278 6279const ( 6280 // EntityStateEnabled is a EntityState enum value 6281 EntityStateEnabled = "ENABLED" 6282 6283 // EntityStateDisabled is a EntityState enum value 6284 EntityStateDisabled = "DISABLED" 6285 6286 // EntityStateDeleted is a EntityState enum value 6287 EntityStateDeleted = "DELETED" 6288) 6289 6290const ( 6291 // MemberTypeGroup is a MemberType enum value 6292 MemberTypeGroup = "GROUP" 6293 6294 // MemberTypeUser is a MemberType enum value 6295 MemberTypeUser = "USER" 6296) 6297 6298const ( 6299 // ResourceTypeRoom is a ResourceType enum value 6300 ResourceTypeRoom = "ROOM" 6301 6302 // ResourceTypeEquipment is a ResourceType enum value 6303 ResourceTypeEquipment = "EQUIPMENT" 6304) 6305 6306const ( 6307 // UserRoleUser is a UserRole enum value 6308 UserRoleUser = "USER" 6309 6310 // UserRoleResource is a UserRole enum value 6311 UserRoleResource = "RESOURCE" 6312 6313 // UserRoleSystemUser is a UserRole enum value 6314 UserRoleSystemUser = "SYSTEM_USER" 6315) 6316