1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package workmail 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12 "github.com/aws/aws-sdk-go/private/protocol" 13 "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" 14) 15 16const opAssociateDelegateToResource = "AssociateDelegateToResource" 17 18// AssociateDelegateToResourceRequest generates a "aws/request.Request" representing the 19// client's request for the AssociateDelegateToResource operation. The "output" return 20// value will be populated with the request's response once the request completes 21// successfully. 22// 23// Use "Send" method on the returned Request to send the API call to the service. 24// the "output" return value is not valid until after Send returns without error. 25// 26// See AssociateDelegateToResource for more information on using the AssociateDelegateToResource 27// API call, and error handling. 28// 29// This method is useful when you want to inject custom logic or configuration 30// into the SDK's request lifecycle. Such as custom headers, or retry logic. 31// 32// 33// // Example sending a request using the AssociateDelegateToResourceRequest method. 34// req, resp := client.AssociateDelegateToResourceRequest(params) 35// 36// err := req.Send() 37// if err == nil { // resp is now filled 38// fmt.Println(resp) 39// } 40// 41// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateDelegateToResource 42func (c *WorkMail) AssociateDelegateToResourceRequest(input *AssociateDelegateToResourceInput) (req *request.Request, output *AssociateDelegateToResourceOutput) { 43 op := &request.Operation{ 44 Name: opAssociateDelegateToResource, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &AssociateDelegateToResourceInput{} 51 } 52 53 output = &AssociateDelegateToResourceOutput{} 54 req = c.newRequest(op, input, output) 55 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 56 return 57} 58 59// AssociateDelegateToResource API operation for Amazon WorkMail. 60// 61// Adds a member (user or group) to the resource's set of delegates. 62// 63// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 64// with awserr.Error's Code and Message methods to get detailed information about 65// the error. 66// 67// See the AWS API reference guide for Amazon WorkMail's 68// API operation AssociateDelegateToResource for usage and error information. 69// 70// Returned Error Types: 71// * EntityNotFoundException 72// The identifier supplied for the user, group, or resource does not exist in 73// your organization. 74// 75// * EntityStateException 76// You are performing an operation on a user, group, or resource that isn't 77// in the expected state, such as trying to delete an active user. 78// 79// * InvalidParameterException 80// One or more of the input parameters don't match the service's restrictions. 81// 82// * OrganizationNotFoundException 83// An operation received a valid organization identifier that either doesn't 84// belong or exist in the system. 85// 86// * OrganizationStateException 87// The organization must have a valid state (Active or Synchronizing) to perform 88// certain operations on the organization or its members. 89// 90// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateDelegateToResource 91func (c *WorkMail) AssociateDelegateToResource(input *AssociateDelegateToResourceInput) (*AssociateDelegateToResourceOutput, error) { 92 req, out := c.AssociateDelegateToResourceRequest(input) 93 return out, req.Send() 94} 95 96// AssociateDelegateToResourceWithContext is the same as AssociateDelegateToResource with the addition of 97// the ability to pass a context and additional request options. 98// 99// See AssociateDelegateToResource for details on how to use this API operation. 100// 101// The context must be non-nil and will be used for request cancellation. If 102// the context is nil a panic will occur. In the future the SDK may create 103// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 104// for more information on using Contexts. 105func (c *WorkMail) AssociateDelegateToResourceWithContext(ctx aws.Context, input *AssociateDelegateToResourceInput, opts ...request.Option) (*AssociateDelegateToResourceOutput, error) { 106 req, out := c.AssociateDelegateToResourceRequest(input) 107 req.SetContext(ctx) 108 req.ApplyOptions(opts...) 109 return out, req.Send() 110} 111 112const opAssociateMemberToGroup = "AssociateMemberToGroup" 113 114// AssociateMemberToGroupRequest generates a "aws/request.Request" representing the 115// client's request for the AssociateMemberToGroup operation. The "output" return 116// value will be populated with the request's response once the request completes 117// successfully. 118// 119// Use "Send" method on the returned Request to send the API call to the service. 120// the "output" return value is not valid until after Send returns without error. 121// 122// See AssociateMemberToGroup for more information on using the AssociateMemberToGroup 123// API call, and error handling. 124// 125// This method is useful when you want to inject custom logic or configuration 126// into the SDK's request lifecycle. Such as custom headers, or retry logic. 127// 128// 129// // Example sending a request using the AssociateMemberToGroupRequest method. 130// req, resp := client.AssociateMemberToGroupRequest(params) 131// 132// err := req.Send() 133// if err == nil { // resp is now filled 134// fmt.Println(resp) 135// } 136// 137// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateMemberToGroup 138func (c *WorkMail) AssociateMemberToGroupRequest(input *AssociateMemberToGroupInput) (req *request.Request, output *AssociateMemberToGroupOutput) { 139 op := &request.Operation{ 140 Name: opAssociateMemberToGroup, 141 HTTPMethod: "POST", 142 HTTPPath: "/", 143 } 144 145 if input == nil { 146 input = &AssociateMemberToGroupInput{} 147 } 148 149 output = &AssociateMemberToGroupOutput{} 150 req = c.newRequest(op, input, output) 151 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 152 return 153} 154 155// AssociateMemberToGroup API operation for Amazon WorkMail. 156// 157// Adds a member (user or group) to the group's set. 158// 159// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 160// with awserr.Error's Code and Message methods to get detailed information about 161// the error. 162// 163// See the AWS API reference guide for Amazon WorkMail's 164// API operation AssociateMemberToGroup for usage and error information. 165// 166// Returned Error Types: 167// * DirectoryServiceAuthenticationFailedException 168// The directory service doesn't recognize the credentials supplied by WorkMail. 169// 170// * DirectoryUnavailableException 171// The directory on which you are trying to perform operations isn't available. 172// 173// * EntityNotFoundException 174// The identifier supplied for the user, group, or resource does not exist in 175// your organization. 176// 177// * EntityStateException 178// You are performing an operation on a user, group, or resource that isn't 179// in the expected state, such as trying to delete an active user. 180// 181// * InvalidParameterException 182// One or more of the input parameters don't match the service's restrictions. 183// 184// * OrganizationNotFoundException 185// An operation received a valid organization identifier that either doesn't 186// belong or exist in the system. 187// 188// * OrganizationStateException 189// The organization must have a valid state (Active or Synchronizing) to perform 190// certain operations on the organization or its members. 191// 192// * UnsupportedOperationException 193// You can't perform a write operation against a read-only directory. 194// 195// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/AssociateMemberToGroup 196func (c *WorkMail) AssociateMemberToGroup(input *AssociateMemberToGroupInput) (*AssociateMemberToGroupOutput, error) { 197 req, out := c.AssociateMemberToGroupRequest(input) 198 return out, req.Send() 199} 200 201// AssociateMemberToGroupWithContext is the same as AssociateMemberToGroup with the addition of 202// the ability to pass a context and additional request options. 203// 204// See AssociateMemberToGroup for details on how to use this API operation. 205// 206// The context must be non-nil and will be used for request cancellation. If 207// the context is nil a panic will occur. In the future the SDK may create 208// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 209// for more information on using Contexts. 210func (c *WorkMail) AssociateMemberToGroupWithContext(ctx aws.Context, input *AssociateMemberToGroupInput, opts ...request.Option) (*AssociateMemberToGroupOutput, error) { 211 req, out := c.AssociateMemberToGroupRequest(input) 212 req.SetContext(ctx) 213 req.ApplyOptions(opts...) 214 return out, req.Send() 215} 216 217const opCreateAlias = "CreateAlias" 218 219// CreateAliasRequest generates a "aws/request.Request" representing the 220// client's request for the CreateAlias operation. The "output" return 221// value will be populated with the request's response once the request completes 222// successfully. 223// 224// Use "Send" method on the returned Request to send the API call to the service. 225// the "output" return value is not valid until after Send returns without error. 226// 227// See CreateAlias for more information on using the CreateAlias 228// API call, and error handling. 229// 230// This method is useful when you want to inject custom logic or configuration 231// into the SDK's request lifecycle. Such as custom headers, or retry logic. 232// 233// 234// // Example sending a request using the CreateAliasRequest method. 235// req, resp := client.CreateAliasRequest(params) 236// 237// err := req.Send() 238// if err == nil { // resp is now filled 239// fmt.Println(resp) 240// } 241// 242// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateAlias 243func (c *WorkMail) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *CreateAliasOutput) { 244 op := &request.Operation{ 245 Name: opCreateAlias, 246 HTTPMethod: "POST", 247 HTTPPath: "/", 248 } 249 250 if input == nil { 251 input = &CreateAliasInput{} 252 } 253 254 output = &CreateAliasOutput{} 255 req = c.newRequest(op, input, output) 256 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 257 return 258} 259 260// CreateAlias API operation for Amazon WorkMail. 261// 262// Adds an alias to the set of a given member (user or group) of Amazon WorkMail. 263// 264// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 265// with awserr.Error's Code and Message methods to get detailed information about 266// the error. 267// 268// See the AWS API reference guide for Amazon WorkMail's 269// API operation CreateAlias for usage and error information. 270// 271// Returned Error Types: 272// * EmailAddressInUseException 273// The email address that you're trying to assign is already created for a different 274// user, group, or resource. 275// 276// * EntityNotFoundException 277// The identifier supplied for the user, group, or resource does not exist in 278// your organization. 279// 280// * EntityStateException 281// You are performing an operation on a user, group, or resource that isn't 282// in the expected state, such as trying to delete an active user. 283// 284// * InvalidParameterException 285// One or more of the input parameters don't match the service's restrictions. 286// 287// * MailDomainNotFoundException 288// For an email or alias to be created in Amazon WorkMail, the included domain 289// must be defined in the organization. 290// 291// * MailDomainStateException 292// After a domain has been added to the organization, it must be verified. The 293// domain is not yet verified. 294// 295// * OrganizationNotFoundException 296// An operation received a valid organization identifier that either doesn't 297// belong or exist in the system. 298// 299// * OrganizationStateException 300// The organization must have a valid state (Active or Synchronizing) to perform 301// certain operations on the organization or its members. 302// 303// * LimitExceededException 304// The request exceeds the limit of the resource. 305// 306// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateAlias 307func (c *WorkMail) CreateAlias(input *CreateAliasInput) (*CreateAliasOutput, error) { 308 req, out := c.CreateAliasRequest(input) 309 return out, req.Send() 310} 311 312// CreateAliasWithContext is the same as CreateAlias with the addition of 313// the ability to pass a context and additional request options. 314// 315// See CreateAlias for details on how to use this API operation. 316// 317// The context must be non-nil and will be used for request cancellation. If 318// the context is nil a panic will occur. In the future the SDK may create 319// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 320// for more information on using Contexts. 321func (c *WorkMail) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, opts ...request.Option) (*CreateAliasOutput, error) { 322 req, out := c.CreateAliasRequest(input) 323 req.SetContext(ctx) 324 req.ApplyOptions(opts...) 325 return out, req.Send() 326} 327 328const opCreateGroup = "CreateGroup" 329 330// CreateGroupRequest generates a "aws/request.Request" representing the 331// client's request for the CreateGroup operation. The "output" return 332// value will be populated with the request's response once the request completes 333// successfully. 334// 335// Use "Send" method on the returned Request to send the API call to the service. 336// the "output" return value is not valid until after Send returns without error. 337// 338// See CreateGroup for more information on using the CreateGroup 339// API call, and error handling. 340// 341// This method is useful when you want to inject custom logic or configuration 342// into the SDK's request lifecycle. Such as custom headers, or retry logic. 343// 344// 345// // Example sending a request using the CreateGroupRequest method. 346// req, resp := client.CreateGroupRequest(params) 347// 348// err := req.Send() 349// if err == nil { // resp is now filled 350// fmt.Println(resp) 351// } 352// 353// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateGroup 354func (c *WorkMail) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, output *CreateGroupOutput) { 355 op := &request.Operation{ 356 Name: opCreateGroup, 357 HTTPMethod: "POST", 358 HTTPPath: "/", 359 } 360 361 if input == nil { 362 input = &CreateGroupInput{} 363 } 364 365 output = &CreateGroupOutput{} 366 req = c.newRequest(op, input, output) 367 return 368} 369 370// CreateGroup API operation for Amazon WorkMail. 371// 372// Creates a group that can be used in Amazon WorkMail by calling the RegisterToWorkMail 373// operation. 374// 375// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 376// with awserr.Error's Code and Message methods to get detailed information about 377// the error. 378// 379// See the AWS API reference guide for Amazon WorkMail's 380// API operation CreateGroup for usage and error information. 381// 382// Returned Error Types: 383// * DirectoryServiceAuthenticationFailedException 384// The directory service doesn't recognize the credentials supplied by WorkMail. 385// 386// * DirectoryUnavailableException 387// The directory on which you are trying to perform operations isn't available. 388// 389// * InvalidParameterException 390// One or more of the input parameters don't match the service's restrictions. 391// 392// * NameAvailabilityException 393// The user, group, or resource name isn't unique in Amazon WorkMail. 394// 395// * OrganizationNotFoundException 396// An operation received a valid organization identifier that either doesn't 397// belong or exist in the system. 398// 399// * OrganizationStateException 400// The organization must have a valid state (Active or Synchronizing) to perform 401// certain operations on the organization or its members. 402// 403// * ReservedNameException 404// This user, group, or resource name is not allowed in Amazon WorkMail. 405// 406// * UnsupportedOperationException 407// You can't perform a write operation against a read-only directory. 408// 409// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateGroup 410func (c *WorkMail) CreateGroup(input *CreateGroupInput) (*CreateGroupOutput, error) { 411 req, out := c.CreateGroupRequest(input) 412 return out, req.Send() 413} 414 415// CreateGroupWithContext is the same as CreateGroup with the addition of 416// the ability to pass a context and additional request options. 417// 418// See CreateGroup for details on how to use this API operation. 419// 420// The context must be non-nil and will be used for request cancellation. If 421// the context is nil a panic will occur. In the future the SDK may create 422// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 423// for more information on using Contexts. 424func (c *WorkMail) CreateGroupWithContext(ctx aws.Context, input *CreateGroupInput, opts ...request.Option) (*CreateGroupOutput, error) { 425 req, out := c.CreateGroupRequest(input) 426 req.SetContext(ctx) 427 req.ApplyOptions(opts...) 428 return out, req.Send() 429} 430 431const opCreateResource = "CreateResource" 432 433// CreateResourceRequest generates a "aws/request.Request" representing the 434// client's request for the CreateResource operation. The "output" return 435// value will be populated with the request's response once the request completes 436// successfully. 437// 438// Use "Send" method on the returned Request to send the API call to the service. 439// the "output" return value is not valid until after Send returns without error. 440// 441// See CreateResource for more information on using the CreateResource 442// API call, and error handling. 443// 444// This method is useful when you want to inject custom logic or configuration 445// into the SDK's request lifecycle. Such as custom headers, or retry logic. 446// 447// 448// // Example sending a request using the CreateResourceRequest method. 449// req, resp := client.CreateResourceRequest(params) 450// 451// err := req.Send() 452// if err == nil { // resp is now filled 453// fmt.Println(resp) 454// } 455// 456// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateResource 457func (c *WorkMail) CreateResourceRequest(input *CreateResourceInput) (req *request.Request, output *CreateResourceOutput) { 458 op := &request.Operation{ 459 Name: opCreateResource, 460 HTTPMethod: "POST", 461 HTTPPath: "/", 462 } 463 464 if input == nil { 465 input = &CreateResourceInput{} 466 } 467 468 output = &CreateResourceOutput{} 469 req = c.newRequest(op, input, output) 470 return 471} 472 473// CreateResource API operation for Amazon WorkMail. 474// 475// Creates a new Amazon WorkMail resource. 476// 477// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 478// with awserr.Error's Code and Message methods to get detailed information about 479// the error. 480// 481// See the AWS API reference guide for Amazon WorkMail's 482// API operation CreateResource for usage and error information. 483// 484// Returned Error Types: 485// * DirectoryServiceAuthenticationFailedException 486// The directory service doesn't recognize the credentials supplied by WorkMail. 487// 488// * DirectoryUnavailableException 489// The directory on which you are trying to perform operations isn't available. 490// 491// * InvalidParameterException 492// One or more of the input parameters don't match the service's restrictions. 493// 494// * NameAvailabilityException 495// The user, group, or resource name isn't unique in Amazon WorkMail. 496// 497// * OrganizationNotFoundException 498// An operation received a valid organization identifier that either doesn't 499// belong or exist in the system. 500// 501// * OrganizationStateException 502// The organization must have a valid state (Active or Synchronizing) to perform 503// certain operations on the organization or its members. 504// 505// * ReservedNameException 506// This user, group, or resource name is not allowed in Amazon WorkMail. 507// 508// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateResource 509func (c *WorkMail) CreateResource(input *CreateResourceInput) (*CreateResourceOutput, error) { 510 req, out := c.CreateResourceRequest(input) 511 return out, req.Send() 512} 513 514// CreateResourceWithContext is the same as CreateResource with the addition of 515// the ability to pass a context and additional request options. 516// 517// See CreateResource for details on how to use this API operation. 518// 519// The context must be non-nil and will be used for request cancellation. If 520// the context is nil a panic will occur. In the future the SDK may create 521// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 522// for more information on using Contexts. 523func (c *WorkMail) CreateResourceWithContext(ctx aws.Context, input *CreateResourceInput, opts ...request.Option) (*CreateResourceOutput, error) { 524 req, out := c.CreateResourceRequest(input) 525 req.SetContext(ctx) 526 req.ApplyOptions(opts...) 527 return out, req.Send() 528} 529 530const opCreateUser = "CreateUser" 531 532// CreateUserRequest generates a "aws/request.Request" representing the 533// client's request for the CreateUser operation. The "output" return 534// value will be populated with the request's response once the request completes 535// successfully. 536// 537// Use "Send" method on the returned Request to send the API call to the service. 538// the "output" return value is not valid until after Send returns without error. 539// 540// See CreateUser for more information on using the CreateUser 541// API call, and error handling. 542// 543// This method is useful when you want to inject custom logic or configuration 544// into the SDK's request lifecycle. Such as custom headers, or retry logic. 545// 546// 547// // Example sending a request using the CreateUserRequest method. 548// req, resp := client.CreateUserRequest(params) 549// 550// err := req.Send() 551// if err == nil { // resp is now filled 552// fmt.Println(resp) 553// } 554// 555// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateUser 556func (c *WorkMail) CreateUserRequest(input *CreateUserInput) (req *request.Request, output *CreateUserOutput) { 557 op := &request.Operation{ 558 Name: opCreateUser, 559 HTTPMethod: "POST", 560 HTTPPath: "/", 561 } 562 563 if input == nil { 564 input = &CreateUserInput{} 565 } 566 567 output = &CreateUserOutput{} 568 req = c.newRequest(op, input, output) 569 return 570} 571 572// CreateUser API operation for Amazon WorkMail. 573// 574// Creates a user who can be used in Amazon WorkMail by calling the RegisterToWorkMail 575// operation. 576// 577// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 578// with awserr.Error's Code and Message methods to get detailed information about 579// the error. 580// 581// See the AWS API reference guide for Amazon WorkMail's 582// API operation CreateUser for usage and error information. 583// 584// Returned Error Types: 585// * DirectoryServiceAuthenticationFailedException 586// The directory service doesn't recognize the credentials supplied by WorkMail. 587// 588// * DirectoryUnavailableException 589// The directory on which you are trying to perform operations isn't available. 590// 591// * InvalidParameterException 592// One or more of the input parameters don't match the service's restrictions. 593// 594// * InvalidPasswordException 595// The supplied password doesn't match the minimum security constraints, such 596// as length or use of special characters. 597// 598// * NameAvailabilityException 599// The user, group, or resource name isn't unique in Amazon WorkMail. 600// 601// * OrganizationNotFoundException 602// An operation received a valid organization identifier that either doesn't 603// belong or exist in the system. 604// 605// * OrganizationStateException 606// The organization must have a valid state (Active or Synchronizing) to perform 607// certain operations on the organization or its members. 608// 609// * ReservedNameException 610// This user, group, or resource name is not allowed in Amazon WorkMail. 611// 612// * UnsupportedOperationException 613// You can't perform a write operation against a read-only directory. 614// 615// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/CreateUser 616func (c *WorkMail) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) { 617 req, out := c.CreateUserRequest(input) 618 return out, req.Send() 619} 620 621// CreateUserWithContext is the same as CreateUser with the addition of 622// the ability to pass a context and additional request options. 623// 624// See CreateUser for details on how to use this API operation. 625// 626// The context must be non-nil and will be used for request cancellation. If 627// the context is nil a panic will occur. In the future the SDK may create 628// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 629// for more information on using Contexts. 630func (c *WorkMail) CreateUserWithContext(ctx aws.Context, input *CreateUserInput, opts ...request.Option) (*CreateUserOutput, error) { 631 req, out := c.CreateUserRequest(input) 632 req.SetContext(ctx) 633 req.ApplyOptions(opts...) 634 return out, req.Send() 635} 636 637const opDeleteAccessControlRule = "DeleteAccessControlRule" 638 639// DeleteAccessControlRuleRequest generates a "aws/request.Request" representing the 640// client's request for the DeleteAccessControlRule operation. The "output" return 641// value will be populated with the request's response once the request completes 642// successfully. 643// 644// Use "Send" method on the returned Request to send the API call to the service. 645// the "output" return value is not valid until after Send returns without error. 646// 647// See DeleteAccessControlRule for more information on using the DeleteAccessControlRule 648// API call, and error handling. 649// 650// This method is useful when you want to inject custom logic or configuration 651// into the SDK's request lifecycle. Such as custom headers, or retry logic. 652// 653// 654// // Example sending a request using the DeleteAccessControlRuleRequest method. 655// req, resp := client.DeleteAccessControlRuleRequest(params) 656// 657// err := req.Send() 658// if err == nil { // resp is now filled 659// fmt.Println(resp) 660// } 661// 662// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteAccessControlRule 663func (c *WorkMail) DeleteAccessControlRuleRequest(input *DeleteAccessControlRuleInput) (req *request.Request, output *DeleteAccessControlRuleOutput) { 664 op := &request.Operation{ 665 Name: opDeleteAccessControlRule, 666 HTTPMethod: "POST", 667 HTTPPath: "/", 668 } 669 670 if input == nil { 671 input = &DeleteAccessControlRuleInput{} 672 } 673 674 output = &DeleteAccessControlRuleOutput{} 675 req = c.newRequest(op, input, output) 676 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 677 return 678} 679 680// DeleteAccessControlRule API operation for Amazon WorkMail. 681// 682// Deletes an access control rule for the specified WorkMail organization. 683// 684// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 685// with awserr.Error's Code and Message methods to get detailed information about 686// the error. 687// 688// See the AWS API reference guide for Amazon WorkMail's 689// API operation DeleteAccessControlRule for usage and error information. 690// 691// Returned Error Types: 692// * OrganizationNotFoundException 693// An operation received a valid organization identifier that either doesn't 694// belong or exist in the system. 695// 696// * OrganizationStateException 697// The organization must have a valid state (Active or Synchronizing) to perform 698// certain operations on the organization or its members. 699// 700// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteAccessControlRule 701func (c *WorkMail) DeleteAccessControlRule(input *DeleteAccessControlRuleInput) (*DeleteAccessControlRuleOutput, error) { 702 req, out := c.DeleteAccessControlRuleRequest(input) 703 return out, req.Send() 704} 705 706// DeleteAccessControlRuleWithContext is the same as DeleteAccessControlRule with the addition of 707// the ability to pass a context and additional request options. 708// 709// See DeleteAccessControlRule for details on how to use this API operation. 710// 711// The context must be non-nil and will be used for request cancellation. If 712// the context is nil a panic will occur. In the future the SDK may create 713// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 714// for more information on using Contexts. 715func (c *WorkMail) DeleteAccessControlRuleWithContext(ctx aws.Context, input *DeleteAccessControlRuleInput, opts ...request.Option) (*DeleteAccessControlRuleOutput, error) { 716 req, out := c.DeleteAccessControlRuleRequest(input) 717 req.SetContext(ctx) 718 req.ApplyOptions(opts...) 719 return out, req.Send() 720} 721 722const opDeleteAlias = "DeleteAlias" 723 724// DeleteAliasRequest generates a "aws/request.Request" representing the 725// client's request for the DeleteAlias operation. The "output" return 726// value will be populated with the request's response once the request completes 727// successfully. 728// 729// Use "Send" method on the returned Request to send the API call to the service. 730// the "output" return value is not valid until after Send returns without error. 731// 732// See DeleteAlias for more information on using the DeleteAlias 733// API call, and error handling. 734// 735// This method is useful when you want to inject custom logic or configuration 736// into the SDK's request lifecycle. Such as custom headers, or retry logic. 737// 738// 739// // Example sending a request using the DeleteAliasRequest method. 740// req, resp := client.DeleteAliasRequest(params) 741// 742// err := req.Send() 743// if err == nil { // resp is now filled 744// fmt.Println(resp) 745// } 746// 747// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteAlias 748func (c *WorkMail) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput) { 749 op := &request.Operation{ 750 Name: opDeleteAlias, 751 HTTPMethod: "POST", 752 HTTPPath: "/", 753 } 754 755 if input == nil { 756 input = &DeleteAliasInput{} 757 } 758 759 output = &DeleteAliasOutput{} 760 req = c.newRequest(op, input, output) 761 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 762 return 763} 764 765// DeleteAlias API operation for Amazon WorkMail. 766// 767// Remove one or more specified aliases from a set of aliases for a given user. 768// 769// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 770// with awserr.Error's Code and Message methods to get detailed information about 771// the error. 772// 773// See the AWS API reference guide for Amazon WorkMail's 774// API operation DeleteAlias for usage and error information. 775// 776// Returned Error Types: 777// * EntityNotFoundException 778// The identifier supplied for the user, group, or resource does not exist in 779// your organization. 780// 781// * EntityStateException 782// You are performing an operation on a user, group, or resource that isn't 783// in the expected state, such as trying to delete an active user. 784// 785// * InvalidParameterException 786// One or more of the input parameters don't match the service's restrictions. 787// 788// * OrganizationNotFoundException 789// An operation received a valid organization identifier that either doesn't 790// belong or exist in the system. 791// 792// * OrganizationStateException 793// The organization must have a valid state (Active or Synchronizing) to perform 794// certain operations on the organization or its members. 795// 796// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteAlias 797func (c *WorkMail) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) { 798 req, out := c.DeleteAliasRequest(input) 799 return out, req.Send() 800} 801 802// DeleteAliasWithContext is the same as DeleteAlias with the addition of 803// the ability to pass a context and additional request options. 804// 805// See DeleteAlias for details on how to use this API operation. 806// 807// The context must be non-nil and will be used for request cancellation. If 808// the context is nil a panic will occur. In the future the SDK may create 809// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 810// for more information on using Contexts. 811func (c *WorkMail) DeleteAliasWithContext(ctx aws.Context, input *DeleteAliasInput, opts ...request.Option) (*DeleteAliasOutput, error) { 812 req, out := c.DeleteAliasRequest(input) 813 req.SetContext(ctx) 814 req.ApplyOptions(opts...) 815 return out, req.Send() 816} 817 818const opDeleteGroup = "DeleteGroup" 819 820// DeleteGroupRequest generates a "aws/request.Request" representing the 821// client's request for the DeleteGroup operation. The "output" return 822// value will be populated with the request's response once the request completes 823// successfully. 824// 825// Use "Send" method on the returned Request to send the API call to the service. 826// the "output" return value is not valid until after Send returns without error. 827// 828// See DeleteGroup for more information on using the DeleteGroup 829// API call, and error handling. 830// 831// This method is useful when you want to inject custom logic or configuration 832// into the SDK's request lifecycle. Such as custom headers, or retry logic. 833// 834// 835// // Example sending a request using the DeleteGroupRequest method. 836// req, resp := client.DeleteGroupRequest(params) 837// 838// err := req.Send() 839// if err == nil { // resp is now filled 840// fmt.Println(resp) 841// } 842// 843// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteGroup 844func (c *WorkMail) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output *DeleteGroupOutput) { 845 op := &request.Operation{ 846 Name: opDeleteGroup, 847 HTTPMethod: "POST", 848 HTTPPath: "/", 849 } 850 851 if input == nil { 852 input = &DeleteGroupInput{} 853 } 854 855 output = &DeleteGroupOutput{} 856 req = c.newRequest(op, input, output) 857 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 858 return 859} 860 861// DeleteGroup API operation for Amazon WorkMail. 862// 863// Deletes a group from Amazon WorkMail. 864// 865// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 866// with awserr.Error's Code and Message methods to get detailed information about 867// the error. 868// 869// See the AWS API reference guide for Amazon WorkMail's 870// API operation DeleteGroup for usage and error information. 871// 872// Returned Error Types: 873// * DirectoryServiceAuthenticationFailedException 874// The directory service doesn't recognize the credentials supplied by WorkMail. 875// 876// * DirectoryUnavailableException 877// The directory on which you are trying to perform operations isn't available. 878// 879// * EntityStateException 880// You are performing an operation on a user, group, or resource that isn't 881// in the expected state, such as trying to delete an active user. 882// 883// * InvalidParameterException 884// One or more of the input parameters don't match the service's restrictions. 885// 886// * OrganizationNotFoundException 887// An operation received a valid organization identifier that either doesn't 888// belong or exist in the system. 889// 890// * OrganizationStateException 891// The organization must have a valid state (Active or Synchronizing) to perform 892// certain operations on the organization or its members. 893// 894// * UnsupportedOperationException 895// You can't perform a write operation against a read-only directory. 896// 897// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteGroup 898func (c *WorkMail) DeleteGroup(input *DeleteGroupInput) (*DeleteGroupOutput, error) { 899 req, out := c.DeleteGroupRequest(input) 900 return out, req.Send() 901} 902 903// DeleteGroupWithContext is the same as DeleteGroup with the addition of 904// the ability to pass a context and additional request options. 905// 906// See DeleteGroup for details on how to use this API operation. 907// 908// The context must be non-nil and will be used for request cancellation. If 909// the context is nil a panic will occur. In the future the SDK may create 910// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 911// for more information on using Contexts. 912func (c *WorkMail) DeleteGroupWithContext(ctx aws.Context, input *DeleteGroupInput, opts ...request.Option) (*DeleteGroupOutput, error) { 913 req, out := c.DeleteGroupRequest(input) 914 req.SetContext(ctx) 915 req.ApplyOptions(opts...) 916 return out, req.Send() 917} 918 919const opDeleteMailboxPermissions = "DeleteMailboxPermissions" 920 921// DeleteMailboxPermissionsRequest generates a "aws/request.Request" representing the 922// client's request for the DeleteMailboxPermissions operation. The "output" return 923// value will be populated with the request's response once the request completes 924// successfully. 925// 926// Use "Send" method on the returned Request to send the API call to the service. 927// the "output" return value is not valid until after Send returns without error. 928// 929// See DeleteMailboxPermissions for more information on using the DeleteMailboxPermissions 930// API call, and error handling. 931// 932// This method is useful when you want to inject custom logic or configuration 933// into the SDK's request lifecycle. Such as custom headers, or retry logic. 934// 935// 936// // Example sending a request using the DeleteMailboxPermissionsRequest method. 937// req, resp := client.DeleteMailboxPermissionsRequest(params) 938// 939// err := req.Send() 940// if err == nil { // resp is now filled 941// fmt.Println(resp) 942// } 943// 944// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteMailboxPermissions 945func (c *WorkMail) DeleteMailboxPermissionsRequest(input *DeleteMailboxPermissionsInput) (req *request.Request, output *DeleteMailboxPermissionsOutput) { 946 op := &request.Operation{ 947 Name: opDeleteMailboxPermissions, 948 HTTPMethod: "POST", 949 HTTPPath: "/", 950 } 951 952 if input == nil { 953 input = &DeleteMailboxPermissionsInput{} 954 } 955 956 output = &DeleteMailboxPermissionsOutput{} 957 req = c.newRequest(op, input, output) 958 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 959 return 960} 961 962// DeleteMailboxPermissions API operation for Amazon WorkMail. 963// 964// Deletes permissions granted to a member (user or group). 965// 966// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 967// with awserr.Error's Code and Message methods to get detailed information about 968// the error. 969// 970// See the AWS API reference guide for Amazon WorkMail's 971// API operation DeleteMailboxPermissions for usage and error information. 972// 973// Returned Error Types: 974// * EntityNotFoundException 975// The identifier supplied for the user, group, or resource does not exist in 976// your organization. 977// 978// * EntityStateException 979// You are performing an operation on a user, group, or resource that isn't 980// in the expected state, such as trying to delete an active user. 981// 982// * InvalidParameterException 983// One or more of the input parameters don't match the service's restrictions. 984// 985// * OrganizationNotFoundException 986// An operation received a valid organization identifier that either doesn't 987// belong or exist in the system. 988// 989// * OrganizationStateException 990// The organization must have a valid state (Active or Synchronizing) to perform 991// certain operations on the organization or its members. 992// 993// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteMailboxPermissions 994func (c *WorkMail) DeleteMailboxPermissions(input *DeleteMailboxPermissionsInput) (*DeleteMailboxPermissionsOutput, error) { 995 req, out := c.DeleteMailboxPermissionsRequest(input) 996 return out, req.Send() 997} 998 999// DeleteMailboxPermissionsWithContext is the same as DeleteMailboxPermissions with the addition of 1000// the ability to pass a context and additional request options. 1001// 1002// See DeleteMailboxPermissions for details on how to use this API operation. 1003// 1004// The context must be non-nil and will be used for request cancellation. If 1005// the context is nil a panic will occur. In the future the SDK may create 1006// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1007// for more information on using Contexts. 1008func (c *WorkMail) DeleteMailboxPermissionsWithContext(ctx aws.Context, input *DeleteMailboxPermissionsInput, opts ...request.Option) (*DeleteMailboxPermissionsOutput, error) { 1009 req, out := c.DeleteMailboxPermissionsRequest(input) 1010 req.SetContext(ctx) 1011 req.ApplyOptions(opts...) 1012 return out, req.Send() 1013} 1014 1015const opDeleteResource = "DeleteResource" 1016 1017// DeleteResourceRequest generates a "aws/request.Request" representing the 1018// client's request for the DeleteResource operation. The "output" return 1019// value will be populated with the request's response once the request completes 1020// successfully. 1021// 1022// Use "Send" method on the returned Request to send the API call to the service. 1023// the "output" return value is not valid until after Send returns without error. 1024// 1025// See DeleteResource for more information on using the DeleteResource 1026// API call, and error handling. 1027// 1028// This method is useful when you want to inject custom logic or configuration 1029// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1030// 1031// 1032// // Example sending a request using the DeleteResourceRequest method. 1033// req, resp := client.DeleteResourceRequest(params) 1034// 1035// err := req.Send() 1036// if err == nil { // resp is now filled 1037// fmt.Println(resp) 1038// } 1039// 1040// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteResource 1041func (c *WorkMail) DeleteResourceRequest(input *DeleteResourceInput) (req *request.Request, output *DeleteResourceOutput) { 1042 op := &request.Operation{ 1043 Name: opDeleteResource, 1044 HTTPMethod: "POST", 1045 HTTPPath: "/", 1046 } 1047 1048 if input == nil { 1049 input = &DeleteResourceInput{} 1050 } 1051 1052 output = &DeleteResourceOutput{} 1053 req = c.newRequest(op, input, output) 1054 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1055 return 1056} 1057 1058// DeleteResource API operation for Amazon WorkMail. 1059// 1060// Deletes the specified resource. 1061// 1062// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1063// with awserr.Error's Code and Message methods to get detailed information about 1064// the error. 1065// 1066// See the AWS API reference guide for Amazon WorkMail's 1067// API operation DeleteResource for usage and error information. 1068// 1069// Returned Error Types: 1070// * EntityStateException 1071// You are performing an operation on a user, group, or resource that isn't 1072// in the expected state, such as trying to delete an active user. 1073// 1074// * InvalidParameterException 1075// One or more of the input parameters don't match the service's restrictions. 1076// 1077// * OrganizationNotFoundException 1078// An operation received a valid organization identifier that either doesn't 1079// belong or exist in the system. 1080// 1081// * OrganizationStateException 1082// The organization must have a valid state (Active or Synchronizing) to perform 1083// certain operations on the organization or its members. 1084// 1085// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteResource 1086func (c *WorkMail) DeleteResource(input *DeleteResourceInput) (*DeleteResourceOutput, error) { 1087 req, out := c.DeleteResourceRequest(input) 1088 return out, req.Send() 1089} 1090 1091// DeleteResourceWithContext is the same as DeleteResource with the addition of 1092// the ability to pass a context and additional request options. 1093// 1094// See DeleteResource for details on how to use this API operation. 1095// 1096// The context must be non-nil and will be used for request cancellation. If 1097// the context is nil a panic will occur. In the future the SDK may create 1098// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1099// for more information on using Contexts. 1100func (c *WorkMail) DeleteResourceWithContext(ctx aws.Context, input *DeleteResourceInput, opts ...request.Option) (*DeleteResourceOutput, error) { 1101 req, out := c.DeleteResourceRequest(input) 1102 req.SetContext(ctx) 1103 req.ApplyOptions(opts...) 1104 return out, req.Send() 1105} 1106 1107const opDeleteRetentionPolicy = "DeleteRetentionPolicy" 1108 1109// DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the 1110// client's request for the DeleteRetentionPolicy operation. The "output" return 1111// value will be populated with the request's response once the request completes 1112// successfully. 1113// 1114// Use "Send" method on the returned Request to send the API call to the service. 1115// the "output" return value is not valid until after Send returns without error. 1116// 1117// See DeleteRetentionPolicy for more information on using the DeleteRetentionPolicy 1118// API call, and error handling. 1119// 1120// This method is useful when you want to inject custom logic or configuration 1121// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1122// 1123// 1124// // Example sending a request using the DeleteRetentionPolicyRequest method. 1125// req, resp := client.DeleteRetentionPolicyRequest(params) 1126// 1127// err := req.Send() 1128// if err == nil { // resp is now filled 1129// fmt.Println(resp) 1130// } 1131// 1132// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteRetentionPolicy 1133func (c *WorkMail) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput) { 1134 op := &request.Operation{ 1135 Name: opDeleteRetentionPolicy, 1136 HTTPMethod: "POST", 1137 HTTPPath: "/", 1138 } 1139 1140 if input == nil { 1141 input = &DeleteRetentionPolicyInput{} 1142 } 1143 1144 output = &DeleteRetentionPolicyOutput{} 1145 req = c.newRequest(op, input, output) 1146 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1147 return 1148} 1149 1150// DeleteRetentionPolicy API operation for Amazon WorkMail. 1151// 1152// Deletes the specified retention policy from the specified organization. 1153// 1154// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1155// with awserr.Error's Code and Message methods to get detailed information about 1156// the error. 1157// 1158// See the AWS API reference guide for Amazon WorkMail's 1159// API operation DeleteRetentionPolicy for usage and error information. 1160// 1161// Returned Error Types: 1162// * InvalidParameterException 1163// One or more of the input parameters don't match the service's restrictions. 1164// 1165// * OrganizationNotFoundException 1166// An operation received a valid organization identifier that either doesn't 1167// belong or exist in the system. 1168// 1169// * OrganizationStateException 1170// The organization must have a valid state (Active or Synchronizing) to perform 1171// certain operations on the organization or its members. 1172// 1173// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteRetentionPolicy 1174func (c *WorkMail) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error) { 1175 req, out := c.DeleteRetentionPolicyRequest(input) 1176 return out, req.Send() 1177} 1178 1179// DeleteRetentionPolicyWithContext is the same as DeleteRetentionPolicy with the addition of 1180// the ability to pass a context and additional request options. 1181// 1182// See DeleteRetentionPolicy for details on how to use this API operation. 1183// 1184// The context must be non-nil and will be used for request cancellation. If 1185// the context is nil a panic will occur. In the future the SDK may create 1186// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1187// for more information on using Contexts. 1188func (c *WorkMail) DeleteRetentionPolicyWithContext(ctx aws.Context, input *DeleteRetentionPolicyInput, opts ...request.Option) (*DeleteRetentionPolicyOutput, error) { 1189 req, out := c.DeleteRetentionPolicyRequest(input) 1190 req.SetContext(ctx) 1191 req.ApplyOptions(opts...) 1192 return out, req.Send() 1193} 1194 1195const opDeleteUser = "DeleteUser" 1196 1197// DeleteUserRequest generates a "aws/request.Request" representing the 1198// client's request for the DeleteUser operation. The "output" return 1199// value will be populated with the request's response once the request completes 1200// successfully. 1201// 1202// Use "Send" method on the returned Request to send the API call to the service. 1203// the "output" return value is not valid until after Send returns without error. 1204// 1205// See DeleteUser for more information on using the DeleteUser 1206// API call, and error handling. 1207// 1208// This method is useful when you want to inject custom logic or configuration 1209// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1210// 1211// 1212// // Example sending a request using the DeleteUserRequest method. 1213// req, resp := client.DeleteUserRequest(params) 1214// 1215// err := req.Send() 1216// if err == nil { // resp is now filled 1217// fmt.Println(resp) 1218// } 1219// 1220// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteUser 1221func (c *WorkMail) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) { 1222 op := &request.Operation{ 1223 Name: opDeleteUser, 1224 HTTPMethod: "POST", 1225 HTTPPath: "/", 1226 } 1227 1228 if input == nil { 1229 input = &DeleteUserInput{} 1230 } 1231 1232 output = &DeleteUserOutput{} 1233 req = c.newRequest(op, input, output) 1234 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1235 return 1236} 1237 1238// DeleteUser API operation for Amazon WorkMail. 1239// 1240// Deletes a user from Amazon WorkMail and all subsequent systems. Before you 1241// can delete a user, the user state must be DISABLED. Use the DescribeUser 1242// action to confirm the user state. 1243// 1244// Deleting a user is permanent and cannot be undone. WorkMail archives user 1245// mailboxes for 30 days before they are permanently removed. 1246// 1247// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1248// with awserr.Error's Code and Message methods to get detailed information about 1249// the error. 1250// 1251// See the AWS API reference guide for Amazon WorkMail's 1252// API operation DeleteUser for usage and error information. 1253// 1254// Returned Error Types: 1255// * DirectoryServiceAuthenticationFailedException 1256// The directory service doesn't recognize the credentials supplied by WorkMail. 1257// 1258// * DirectoryUnavailableException 1259// The directory on which you are trying to perform operations isn't available. 1260// 1261// * EntityStateException 1262// You are performing an operation on a user, group, or resource that isn't 1263// in the expected state, such as trying to delete an active user. 1264// 1265// * InvalidParameterException 1266// One or more of the input parameters don't match the service's restrictions. 1267// 1268// * OrganizationNotFoundException 1269// An operation received a valid organization identifier that either doesn't 1270// belong or exist in the system. 1271// 1272// * OrganizationStateException 1273// The organization must have a valid state (Active or Synchronizing) to perform 1274// certain operations on the organization or its members. 1275// 1276// * UnsupportedOperationException 1277// You can't perform a write operation against a read-only directory. 1278// 1279// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeleteUser 1280func (c *WorkMail) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) { 1281 req, out := c.DeleteUserRequest(input) 1282 return out, req.Send() 1283} 1284 1285// DeleteUserWithContext is the same as DeleteUser with the addition of 1286// the ability to pass a context and additional request options. 1287// 1288// See DeleteUser for details on how to use this API operation. 1289// 1290// The context must be non-nil and will be used for request cancellation. If 1291// the context is nil a panic will occur. In the future the SDK may create 1292// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1293// for more information on using Contexts. 1294func (c *WorkMail) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) { 1295 req, out := c.DeleteUserRequest(input) 1296 req.SetContext(ctx) 1297 req.ApplyOptions(opts...) 1298 return out, req.Send() 1299} 1300 1301const opDeregisterFromWorkMail = "DeregisterFromWorkMail" 1302 1303// DeregisterFromWorkMailRequest generates a "aws/request.Request" representing the 1304// client's request for the DeregisterFromWorkMail operation. The "output" return 1305// value will be populated with the request's response once the request completes 1306// successfully. 1307// 1308// Use "Send" method on the returned Request to send the API call to the service. 1309// the "output" return value is not valid until after Send returns without error. 1310// 1311// See DeregisterFromWorkMail for more information on using the DeregisterFromWorkMail 1312// API call, and error handling. 1313// 1314// This method is useful when you want to inject custom logic or configuration 1315// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1316// 1317// 1318// // Example sending a request using the DeregisterFromWorkMailRequest method. 1319// req, resp := client.DeregisterFromWorkMailRequest(params) 1320// 1321// err := req.Send() 1322// if err == nil { // resp is now filled 1323// fmt.Println(resp) 1324// } 1325// 1326// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeregisterFromWorkMail 1327func (c *WorkMail) DeregisterFromWorkMailRequest(input *DeregisterFromWorkMailInput) (req *request.Request, output *DeregisterFromWorkMailOutput) { 1328 op := &request.Operation{ 1329 Name: opDeregisterFromWorkMail, 1330 HTTPMethod: "POST", 1331 HTTPPath: "/", 1332 } 1333 1334 if input == nil { 1335 input = &DeregisterFromWorkMailInput{} 1336 } 1337 1338 output = &DeregisterFromWorkMailOutput{} 1339 req = c.newRequest(op, input, output) 1340 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1341 return 1342} 1343 1344// DeregisterFromWorkMail API operation for Amazon WorkMail. 1345// 1346// Mark a user, group, or resource as no longer used in Amazon WorkMail. This 1347// action disassociates the mailbox and schedules it for clean-up. WorkMail 1348// keeps mailboxes for 30 days before they are permanently removed. The functionality 1349// in the console is Disable. 1350// 1351// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1352// with awserr.Error's Code and Message methods to get detailed information about 1353// the error. 1354// 1355// See the AWS API reference guide for Amazon WorkMail's 1356// API operation DeregisterFromWorkMail for usage and error information. 1357// 1358// Returned Error Types: 1359// * EntityNotFoundException 1360// The identifier supplied for the user, group, or resource does not exist in 1361// your organization. 1362// 1363// * EntityStateException 1364// You are performing an operation on a user, group, or resource that isn't 1365// in the expected state, such as trying to delete an active user. 1366// 1367// * InvalidParameterException 1368// One or more of the input parameters don't match the service's restrictions. 1369// 1370// * OrganizationNotFoundException 1371// An operation received a valid organization identifier that either doesn't 1372// belong or exist in the system. 1373// 1374// * OrganizationStateException 1375// The organization must have a valid state (Active or Synchronizing) to perform 1376// certain operations on the organization or its members. 1377// 1378// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DeregisterFromWorkMail 1379func (c *WorkMail) DeregisterFromWorkMail(input *DeregisterFromWorkMailInput) (*DeregisterFromWorkMailOutput, error) { 1380 req, out := c.DeregisterFromWorkMailRequest(input) 1381 return out, req.Send() 1382} 1383 1384// DeregisterFromWorkMailWithContext is the same as DeregisterFromWorkMail with the addition of 1385// the ability to pass a context and additional request options. 1386// 1387// See DeregisterFromWorkMail for details on how to use this API operation. 1388// 1389// The context must be non-nil and will be used for request cancellation. If 1390// the context is nil a panic will occur. In the future the SDK may create 1391// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1392// for more information on using Contexts. 1393func (c *WorkMail) DeregisterFromWorkMailWithContext(ctx aws.Context, input *DeregisterFromWorkMailInput, opts ...request.Option) (*DeregisterFromWorkMailOutput, error) { 1394 req, out := c.DeregisterFromWorkMailRequest(input) 1395 req.SetContext(ctx) 1396 req.ApplyOptions(opts...) 1397 return out, req.Send() 1398} 1399 1400const opDescribeGroup = "DescribeGroup" 1401 1402// DescribeGroupRequest generates a "aws/request.Request" representing the 1403// client's request for the DescribeGroup operation. The "output" return 1404// value will be populated with the request's response once the request completes 1405// successfully. 1406// 1407// Use "Send" method on the returned Request to send the API call to the service. 1408// the "output" return value is not valid until after Send returns without error. 1409// 1410// See DescribeGroup for more information on using the DescribeGroup 1411// API call, and error handling. 1412// 1413// This method is useful when you want to inject custom logic or configuration 1414// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1415// 1416// 1417// // Example sending a request using the DescribeGroupRequest method. 1418// req, resp := client.DescribeGroupRequest(params) 1419// 1420// err := req.Send() 1421// if err == nil { // resp is now filled 1422// fmt.Println(resp) 1423// } 1424// 1425// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeGroup 1426func (c *WorkMail) DescribeGroupRequest(input *DescribeGroupInput) (req *request.Request, output *DescribeGroupOutput) { 1427 op := &request.Operation{ 1428 Name: opDescribeGroup, 1429 HTTPMethod: "POST", 1430 HTTPPath: "/", 1431 } 1432 1433 if input == nil { 1434 input = &DescribeGroupInput{} 1435 } 1436 1437 output = &DescribeGroupOutput{} 1438 req = c.newRequest(op, input, output) 1439 return 1440} 1441 1442// DescribeGroup API operation for Amazon WorkMail. 1443// 1444// Returns the data available for the group. 1445// 1446// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1447// with awserr.Error's Code and Message methods to get detailed information about 1448// the error. 1449// 1450// See the AWS API reference guide for Amazon WorkMail's 1451// API operation DescribeGroup for usage and error information. 1452// 1453// Returned Error Types: 1454// * EntityNotFoundException 1455// The identifier supplied for the user, group, or resource does not exist in 1456// your organization. 1457// 1458// * InvalidParameterException 1459// One or more of the input parameters don't match the service's restrictions. 1460// 1461// * OrganizationNotFoundException 1462// An operation received a valid organization identifier that either doesn't 1463// belong or exist in the system. 1464// 1465// * OrganizationStateException 1466// The organization must have a valid state (Active or Synchronizing) to perform 1467// certain operations on the organization or its members. 1468// 1469// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeGroup 1470func (c *WorkMail) DescribeGroup(input *DescribeGroupInput) (*DescribeGroupOutput, error) { 1471 req, out := c.DescribeGroupRequest(input) 1472 return out, req.Send() 1473} 1474 1475// DescribeGroupWithContext is the same as DescribeGroup with the addition of 1476// the ability to pass a context and additional request options. 1477// 1478// See DescribeGroup for details on how to use this API operation. 1479// 1480// The context must be non-nil and will be used for request cancellation. If 1481// the context is nil a panic will occur. In the future the SDK may create 1482// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1483// for more information on using Contexts. 1484func (c *WorkMail) DescribeGroupWithContext(ctx aws.Context, input *DescribeGroupInput, opts ...request.Option) (*DescribeGroupOutput, error) { 1485 req, out := c.DescribeGroupRequest(input) 1486 req.SetContext(ctx) 1487 req.ApplyOptions(opts...) 1488 return out, req.Send() 1489} 1490 1491const opDescribeOrganization = "DescribeOrganization" 1492 1493// DescribeOrganizationRequest generates a "aws/request.Request" representing the 1494// client's request for the DescribeOrganization operation. The "output" return 1495// value will be populated with the request's response once the request completes 1496// successfully. 1497// 1498// Use "Send" method on the returned Request to send the API call to the service. 1499// the "output" return value is not valid until after Send returns without error. 1500// 1501// See DescribeOrganization for more information on using the DescribeOrganization 1502// API call, and error handling. 1503// 1504// This method is useful when you want to inject custom logic or configuration 1505// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1506// 1507// 1508// // Example sending a request using the DescribeOrganizationRequest method. 1509// req, resp := client.DescribeOrganizationRequest(params) 1510// 1511// err := req.Send() 1512// if err == nil { // resp is now filled 1513// fmt.Println(resp) 1514// } 1515// 1516// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeOrganization 1517func (c *WorkMail) DescribeOrganizationRequest(input *DescribeOrganizationInput) (req *request.Request, output *DescribeOrganizationOutput) { 1518 op := &request.Operation{ 1519 Name: opDescribeOrganization, 1520 HTTPMethod: "POST", 1521 HTTPPath: "/", 1522 } 1523 1524 if input == nil { 1525 input = &DescribeOrganizationInput{} 1526 } 1527 1528 output = &DescribeOrganizationOutput{} 1529 req = c.newRequest(op, input, output) 1530 return 1531} 1532 1533// DescribeOrganization API operation for Amazon WorkMail. 1534// 1535// Provides more information regarding a given organization based on its identifier. 1536// 1537// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1538// with awserr.Error's Code and Message methods to get detailed information about 1539// the error. 1540// 1541// See the AWS API reference guide for Amazon WorkMail's 1542// API operation DescribeOrganization for usage and error information. 1543// 1544// Returned Error Types: 1545// * InvalidParameterException 1546// One or more of the input parameters don't match the service's restrictions. 1547// 1548// * OrganizationNotFoundException 1549// An operation received a valid organization identifier that either doesn't 1550// belong or exist in the system. 1551// 1552// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeOrganization 1553func (c *WorkMail) DescribeOrganization(input *DescribeOrganizationInput) (*DescribeOrganizationOutput, error) { 1554 req, out := c.DescribeOrganizationRequest(input) 1555 return out, req.Send() 1556} 1557 1558// DescribeOrganizationWithContext is the same as DescribeOrganization with the addition of 1559// the ability to pass a context and additional request options. 1560// 1561// See DescribeOrganization for details on how to use this API operation. 1562// 1563// The context must be non-nil and will be used for request cancellation. If 1564// the context is nil a panic will occur. In the future the SDK may create 1565// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1566// for more information on using Contexts. 1567func (c *WorkMail) DescribeOrganizationWithContext(ctx aws.Context, input *DescribeOrganizationInput, opts ...request.Option) (*DescribeOrganizationOutput, error) { 1568 req, out := c.DescribeOrganizationRequest(input) 1569 req.SetContext(ctx) 1570 req.ApplyOptions(opts...) 1571 return out, req.Send() 1572} 1573 1574const opDescribeResource = "DescribeResource" 1575 1576// DescribeResourceRequest generates a "aws/request.Request" representing the 1577// client's request for the DescribeResource operation. The "output" return 1578// value will be populated with the request's response once the request completes 1579// successfully. 1580// 1581// Use "Send" method on the returned Request to send the API call to the service. 1582// the "output" return value is not valid until after Send returns without error. 1583// 1584// See DescribeResource for more information on using the DescribeResource 1585// API call, and error handling. 1586// 1587// This method is useful when you want to inject custom logic or configuration 1588// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1589// 1590// 1591// // Example sending a request using the DescribeResourceRequest method. 1592// req, resp := client.DescribeResourceRequest(params) 1593// 1594// err := req.Send() 1595// if err == nil { // resp is now filled 1596// fmt.Println(resp) 1597// } 1598// 1599// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeResource 1600func (c *WorkMail) DescribeResourceRequest(input *DescribeResourceInput) (req *request.Request, output *DescribeResourceOutput) { 1601 op := &request.Operation{ 1602 Name: opDescribeResource, 1603 HTTPMethod: "POST", 1604 HTTPPath: "/", 1605 } 1606 1607 if input == nil { 1608 input = &DescribeResourceInput{} 1609 } 1610 1611 output = &DescribeResourceOutput{} 1612 req = c.newRequest(op, input, output) 1613 return 1614} 1615 1616// DescribeResource API operation for Amazon WorkMail. 1617// 1618// Returns the data available for the resource. 1619// 1620// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1621// with awserr.Error's Code and Message methods to get detailed information about 1622// the error. 1623// 1624// See the AWS API reference guide for Amazon WorkMail's 1625// API operation DescribeResource for usage and error information. 1626// 1627// Returned Error Types: 1628// * EntityNotFoundException 1629// The identifier supplied for the user, group, or resource does not exist in 1630// your organization. 1631// 1632// * InvalidParameterException 1633// One or more of the input parameters don't match the service's restrictions. 1634// 1635// * OrganizationNotFoundException 1636// An operation received a valid organization identifier that either doesn't 1637// belong or exist in the system. 1638// 1639// * OrganizationStateException 1640// The organization must have a valid state (Active or Synchronizing) to perform 1641// certain operations on the organization or its members. 1642// 1643// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeResource 1644func (c *WorkMail) DescribeResource(input *DescribeResourceInput) (*DescribeResourceOutput, error) { 1645 req, out := c.DescribeResourceRequest(input) 1646 return out, req.Send() 1647} 1648 1649// DescribeResourceWithContext is the same as DescribeResource with the addition of 1650// the ability to pass a context and additional request options. 1651// 1652// See DescribeResource for details on how to use this API operation. 1653// 1654// The context must be non-nil and will be used for request cancellation. If 1655// the context is nil a panic will occur. In the future the SDK may create 1656// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1657// for more information on using Contexts. 1658func (c *WorkMail) DescribeResourceWithContext(ctx aws.Context, input *DescribeResourceInput, opts ...request.Option) (*DescribeResourceOutput, error) { 1659 req, out := c.DescribeResourceRequest(input) 1660 req.SetContext(ctx) 1661 req.ApplyOptions(opts...) 1662 return out, req.Send() 1663} 1664 1665const opDescribeUser = "DescribeUser" 1666 1667// DescribeUserRequest generates a "aws/request.Request" representing the 1668// client's request for the DescribeUser operation. The "output" return 1669// value will be populated with the request's response once the request completes 1670// successfully. 1671// 1672// Use "Send" method on the returned Request to send the API call to the service. 1673// the "output" return value is not valid until after Send returns without error. 1674// 1675// See DescribeUser for more information on using the DescribeUser 1676// API call, and error handling. 1677// 1678// This method is useful when you want to inject custom logic or configuration 1679// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1680// 1681// 1682// // Example sending a request using the DescribeUserRequest method. 1683// req, resp := client.DescribeUserRequest(params) 1684// 1685// err := req.Send() 1686// if err == nil { // resp is now filled 1687// fmt.Println(resp) 1688// } 1689// 1690// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeUser 1691func (c *WorkMail) DescribeUserRequest(input *DescribeUserInput) (req *request.Request, output *DescribeUserOutput) { 1692 op := &request.Operation{ 1693 Name: opDescribeUser, 1694 HTTPMethod: "POST", 1695 HTTPPath: "/", 1696 } 1697 1698 if input == nil { 1699 input = &DescribeUserInput{} 1700 } 1701 1702 output = &DescribeUserOutput{} 1703 req = c.newRequest(op, input, output) 1704 return 1705} 1706 1707// DescribeUser API operation for Amazon WorkMail. 1708// 1709// Provides information regarding the user. 1710// 1711// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1712// with awserr.Error's Code and Message methods to get detailed information about 1713// the error. 1714// 1715// See the AWS API reference guide for Amazon WorkMail's 1716// API operation DescribeUser for usage and error information. 1717// 1718// Returned Error Types: 1719// * EntityNotFoundException 1720// The identifier supplied for the user, group, or resource does not exist in 1721// your organization. 1722// 1723// * InvalidParameterException 1724// One or more of the input parameters don't match the service's restrictions. 1725// 1726// * OrganizationNotFoundException 1727// An operation received a valid organization identifier that either doesn't 1728// belong or exist in the system. 1729// 1730// * OrganizationStateException 1731// The organization must have a valid state (Active or Synchronizing) to perform 1732// certain operations on the organization or its members. 1733// 1734// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DescribeUser 1735func (c *WorkMail) DescribeUser(input *DescribeUserInput) (*DescribeUserOutput, error) { 1736 req, out := c.DescribeUserRequest(input) 1737 return out, req.Send() 1738} 1739 1740// DescribeUserWithContext is the same as DescribeUser with the addition of 1741// the ability to pass a context and additional request options. 1742// 1743// See DescribeUser for details on how to use this API operation. 1744// 1745// The context must be non-nil and will be used for request cancellation. If 1746// the context is nil a panic will occur. In the future the SDK may create 1747// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1748// for more information on using Contexts. 1749func (c *WorkMail) DescribeUserWithContext(ctx aws.Context, input *DescribeUserInput, opts ...request.Option) (*DescribeUserOutput, error) { 1750 req, out := c.DescribeUserRequest(input) 1751 req.SetContext(ctx) 1752 req.ApplyOptions(opts...) 1753 return out, req.Send() 1754} 1755 1756const opDisassociateDelegateFromResource = "DisassociateDelegateFromResource" 1757 1758// DisassociateDelegateFromResourceRequest generates a "aws/request.Request" representing the 1759// client's request for the DisassociateDelegateFromResource operation. The "output" return 1760// value will be populated with the request's response once the request completes 1761// successfully. 1762// 1763// Use "Send" method on the returned Request to send the API call to the service. 1764// the "output" return value is not valid until after Send returns without error. 1765// 1766// See DisassociateDelegateFromResource for more information on using the DisassociateDelegateFromResource 1767// API call, and error handling. 1768// 1769// This method is useful when you want to inject custom logic or configuration 1770// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1771// 1772// 1773// // Example sending a request using the DisassociateDelegateFromResourceRequest method. 1774// req, resp := client.DisassociateDelegateFromResourceRequest(params) 1775// 1776// err := req.Send() 1777// if err == nil { // resp is now filled 1778// fmt.Println(resp) 1779// } 1780// 1781// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateDelegateFromResource 1782func (c *WorkMail) DisassociateDelegateFromResourceRequest(input *DisassociateDelegateFromResourceInput) (req *request.Request, output *DisassociateDelegateFromResourceOutput) { 1783 op := &request.Operation{ 1784 Name: opDisassociateDelegateFromResource, 1785 HTTPMethod: "POST", 1786 HTTPPath: "/", 1787 } 1788 1789 if input == nil { 1790 input = &DisassociateDelegateFromResourceInput{} 1791 } 1792 1793 output = &DisassociateDelegateFromResourceOutput{} 1794 req = c.newRequest(op, input, output) 1795 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1796 return 1797} 1798 1799// DisassociateDelegateFromResource API operation for Amazon WorkMail. 1800// 1801// Removes a member from the resource's set of delegates. 1802// 1803// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1804// with awserr.Error's Code and Message methods to get detailed information about 1805// the error. 1806// 1807// See the AWS API reference guide for Amazon WorkMail's 1808// API operation DisassociateDelegateFromResource for usage and error information. 1809// 1810// Returned Error Types: 1811// * EntityNotFoundException 1812// The identifier supplied for the user, group, or resource does not exist in 1813// your organization. 1814// 1815// * EntityStateException 1816// You are performing an operation on a user, group, or resource that isn't 1817// in the expected state, such as trying to delete an active user. 1818// 1819// * InvalidParameterException 1820// One or more of the input parameters don't match the service's restrictions. 1821// 1822// * OrganizationNotFoundException 1823// An operation received a valid organization identifier that either doesn't 1824// belong or exist in the system. 1825// 1826// * OrganizationStateException 1827// The organization must have a valid state (Active or Synchronizing) to perform 1828// certain operations on the organization or its members. 1829// 1830// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateDelegateFromResource 1831func (c *WorkMail) DisassociateDelegateFromResource(input *DisassociateDelegateFromResourceInput) (*DisassociateDelegateFromResourceOutput, error) { 1832 req, out := c.DisassociateDelegateFromResourceRequest(input) 1833 return out, req.Send() 1834} 1835 1836// DisassociateDelegateFromResourceWithContext is the same as DisassociateDelegateFromResource with the addition of 1837// the ability to pass a context and additional request options. 1838// 1839// See DisassociateDelegateFromResource for details on how to use this API operation. 1840// 1841// The context must be non-nil and will be used for request cancellation. If 1842// the context is nil a panic will occur. In the future the SDK may create 1843// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1844// for more information on using Contexts. 1845func (c *WorkMail) DisassociateDelegateFromResourceWithContext(ctx aws.Context, input *DisassociateDelegateFromResourceInput, opts ...request.Option) (*DisassociateDelegateFromResourceOutput, error) { 1846 req, out := c.DisassociateDelegateFromResourceRequest(input) 1847 req.SetContext(ctx) 1848 req.ApplyOptions(opts...) 1849 return out, req.Send() 1850} 1851 1852const opDisassociateMemberFromGroup = "DisassociateMemberFromGroup" 1853 1854// DisassociateMemberFromGroupRequest generates a "aws/request.Request" representing the 1855// client's request for the DisassociateMemberFromGroup operation. The "output" return 1856// value will be populated with the request's response once the request completes 1857// successfully. 1858// 1859// Use "Send" method on the returned Request to send the API call to the service. 1860// the "output" return value is not valid until after Send returns without error. 1861// 1862// See DisassociateMemberFromGroup for more information on using the DisassociateMemberFromGroup 1863// API call, and error handling. 1864// 1865// This method is useful when you want to inject custom logic or configuration 1866// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1867// 1868// 1869// // Example sending a request using the DisassociateMemberFromGroupRequest method. 1870// req, resp := client.DisassociateMemberFromGroupRequest(params) 1871// 1872// err := req.Send() 1873// if err == nil { // resp is now filled 1874// fmt.Println(resp) 1875// } 1876// 1877// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateMemberFromGroup 1878func (c *WorkMail) DisassociateMemberFromGroupRequest(input *DisassociateMemberFromGroupInput) (req *request.Request, output *DisassociateMemberFromGroupOutput) { 1879 op := &request.Operation{ 1880 Name: opDisassociateMemberFromGroup, 1881 HTTPMethod: "POST", 1882 HTTPPath: "/", 1883 } 1884 1885 if input == nil { 1886 input = &DisassociateMemberFromGroupInput{} 1887 } 1888 1889 output = &DisassociateMemberFromGroupOutput{} 1890 req = c.newRequest(op, input, output) 1891 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1892 return 1893} 1894 1895// DisassociateMemberFromGroup API operation for Amazon WorkMail. 1896// 1897// Removes a member from a group. 1898// 1899// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1900// with awserr.Error's Code and Message methods to get detailed information about 1901// the error. 1902// 1903// See the AWS API reference guide for Amazon WorkMail's 1904// API operation DisassociateMemberFromGroup for usage and error information. 1905// 1906// Returned Error Types: 1907// * DirectoryServiceAuthenticationFailedException 1908// The directory service doesn't recognize the credentials supplied by WorkMail. 1909// 1910// * DirectoryUnavailableException 1911// The directory on which you are trying to perform operations isn't available. 1912// 1913// * EntityNotFoundException 1914// The identifier supplied for the user, group, or resource does not exist in 1915// your organization. 1916// 1917// * EntityStateException 1918// You are performing an operation on a user, group, or resource that isn't 1919// in the expected state, such as trying to delete an active user. 1920// 1921// * InvalidParameterException 1922// One or more of the input parameters don't match the service's restrictions. 1923// 1924// * OrganizationNotFoundException 1925// An operation received a valid organization identifier that either doesn't 1926// belong or exist in the system. 1927// 1928// * OrganizationStateException 1929// The organization must have a valid state (Active or Synchronizing) to perform 1930// certain operations on the organization or its members. 1931// 1932// * UnsupportedOperationException 1933// You can't perform a write operation against a read-only directory. 1934// 1935// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/DisassociateMemberFromGroup 1936func (c *WorkMail) DisassociateMemberFromGroup(input *DisassociateMemberFromGroupInput) (*DisassociateMemberFromGroupOutput, error) { 1937 req, out := c.DisassociateMemberFromGroupRequest(input) 1938 return out, req.Send() 1939} 1940 1941// DisassociateMemberFromGroupWithContext is the same as DisassociateMemberFromGroup with the addition of 1942// the ability to pass a context and additional request options. 1943// 1944// See DisassociateMemberFromGroup for details on how to use this API operation. 1945// 1946// The context must be non-nil and will be used for request cancellation. If 1947// the context is nil a panic will occur. In the future the SDK may create 1948// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1949// for more information on using Contexts. 1950func (c *WorkMail) DisassociateMemberFromGroupWithContext(ctx aws.Context, input *DisassociateMemberFromGroupInput, opts ...request.Option) (*DisassociateMemberFromGroupOutput, error) { 1951 req, out := c.DisassociateMemberFromGroupRequest(input) 1952 req.SetContext(ctx) 1953 req.ApplyOptions(opts...) 1954 return out, req.Send() 1955} 1956 1957const opGetAccessControlEffect = "GetAccessControlEffect" 1958 1959// GetAccessControlEffectRequest generates a "aws/request.Request" representing the 1960// client's request for the GetAccessControlEffect operation. The "output" return 1961// value will be populated with the request's response once the request completes 1962// successfully. 1963// 1964// Use "Send" method on the returned Request to send the API call to the service. 1965// the "output" return value is not valid until after Send returns without error. 1966// 1967// See GetAccessControlEffect for more information on using the GetAccessControlEffect 1968// API call, and error handling. 1969// 1970// This method is useful when you want to inject custom logic or configuration 1971// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1972// 1973// 1974// // Example sending a request using the GetAccessControlEffectRequest method. 1975// req, resp := client.GetAccessControlEffectRequest(params) 1976// 1977// err := req.Send() 1978// if err == nil { // resp is now filled 1979// fmt.Println(resp) 1980// } 1981// 1982// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/GetAccessControlEffect 1983func (c *WorkMail) GetAccessControlEffectRequest(input *GetAccessControlEffectInput) (req *request.Request, output *GetAccessControlEffectOutput) { 1984 op := &request.Operation{ 1985 Name: opGetAccessControlEffect, 1986 HTTPMethod: "POST", 1987 HTTPPath: "/", 1988 } 1989 1990 if input == nil { 1991 input = &GetAccessControlEffectInput{} 1992 } 1993 1994 output = &GetAccessControlEffectOutput{} 1995 req = c.newRequest(op, input, output) 1996 return 1997} 1998 1999// GetAccessControlEffect API operation for Amazon WorkMail. 2000// 2001// Gets the effects of an organization's access control rules as they apply 2002// to a specified IPv4 address, access protocol action, or user ID. 2003// 2004// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2005// with awserr.Error's Code and Message methods to get detailed information about 2006// the error. 2007// 2008// See the AWS API reference guide for Amazon WorkMail's 2009// API operation GetAccessControlEffect for usage and error information. 2010// 2011// Returned Error Types: 2012// * EntityNotFoundException 2013// The identifier supplied for the user, group, or resource does not exist in 2014// your organization. 2015// 2016// * InvalidParameterException 2017// One or more of the input parameters don't match the service's restrictions. 2018// 2019// * OrganizationNotFoundException 2020// An operation received a valid organization identifier that either doesn't 2021// belong or exist in the system. 2022// 2023// * OrganizationStateException 2024// The organization must have a valid state (Active or Synchronizing) to perform 2025// certain operations on the organization or its members. 2026// 2027// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/GetAccessControlEffect 2028func (c *WorkMail) GetAccessControlEffect(input *GetAccessControlEffectInput) (*GetAccessControlEffectOutput, error) { 2029 req, out := c.GetAccessControlEffectRequest(input) 2030 return out, req.Send() 2031} 2032 2033// GetAccessControlEffectWithContext is the same as GetAccessControlEffect with the addition of 2034// the ability to pass a context and additional request options. 2035// 2036// See GetAccessControlEffect for details on how to use this API operation. 2037// 2038// The context must be non-nil and will be used for request cancellation. If 2039// the context is nil a panic will occur. In the future the SDK may create 2040// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2041// for more information on using Contexts. 2042func (c *WorkMail) GetAccessControlEffectWithContext(ctx aws.Context, input *GetAccessControlEffectInput, opts ...request.Option) (*GetAccessControlEffectOutput, error) { 2043 req, out := c.GetAccessControlEffectRequest(input) 2044 req.SetContext(ctx) 2045 req.ApplyOptions(opts...) 2046 return out, req.Send() 2047} 2048 2049const opGetDefaultRetentionPolicy = "GetDefaultRetentionPolicy" 2050 2051// GetDefaultRetentionPolicyRequest generates a "aws/request.Request" representing the 2052// client's request for the GetDefaultRetentionPolicy operation. The "output" return 2053// value will be populated with the request's response once the request completes 2054// successfully. 2055// 2056// Use "Send" method on the returned Request to send the API call to the service. 2057// the "output" return value is not valid until after Send returns without error. 2058// 2059// See GetDefaultRetentionPolicy for more information on using the GetDefaultRetentionPolicy 2060// API call, and error handling. 2061// 2062// This method is useful when you want to inject custom logic or configuration 2063// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2064// 2065// 2066// // Example sending a request using the GetDefaultRetentionPolicyRequest method. 2067// req, resp := client.GetDefaultRetentionPolicyRequest(params) 2068// 2069// err := req.Send() 2070// if err == nil { // resp is now filled 2071// fmt.Println(resp) 2072// } 2073// 2074// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/GetDefaultRetentionPolicy 2075func (c *WorkMail) GetDefaultRetentionPolicyRequest(input *GetDefaultRetentionPolicyInput) (req *request.Request, output *GetDefaultRetentionPolicyOutput) { 2076 op := &request.Operation{ 2077 Name: opGetDefaultRetentionPolicy, 2078 HTTPMethod: "POST", 2079 HTTPPath: "/", 2080 } 2081 2082 if input == nil { 2083 input = &GetDefaultRetentionPolicyInput{} 2084 } 2085 2086 output = &GetDefaultRetentionPolicyOutput{} 2087 req = c.newRequest(op, input, output) 2088 return 2089} 2090 2091// GetDefaultRetentionPolicy API operation for Amazon WorkMail. 2092// 2093// Gets the default retention policy details for the specified organization. 2094// 2095// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2096// with awserr.Error's Code and Message methods to get detailed information about 2097// the error. 2098// 2099// See the AWS API reference guide for Amazon WorkMail's 2100// API operation GetDefaultRetentionPolicy for usage and error information. 2101// 2102// Returned Error Types: 2103// * InvalidParameterException 2104// One or more of the input parameters don't match the service's restrictions. 2105// 2106// * OrganizationNotFoundException 2107// An operation received a valid organization identifier that either doesn't 2108// belong or exist in the system. 2109// 2110// * OrganizationStateException 2111// The organization must have a valid state (Active or Synchronizing) to perform 2112// certain operations on the organization or its members. 2113// 2114// * EntityNotFoundException 2115// The identifier supplied for the user, group, or resource does not exist in 2116// your organization. 2117// 2118// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/GetDefaultRetentionPolicy 2119func (c *WorkMail) GetDefaultRetentionPolicy(input *GetDefaultRetentionPolicyInput) (*GetDefaultRetentionPolicyOutput, error) { 2120 req, out := c.GetDefaultRetentionPolicyRequest(input) 2121 return out, req.Send() 2122} 2123 2124// GetDefaultRetentionPolicyWithContext is the same as GetDefaultRetentionPolicy with the addition of 2125// the ability to pass a context and additional request options. 2126// 2127// See GetDefaultRetentionPolicy for details on how to use this API operation. 2128// 2129// The context must be non-nil and will be used for request cancellation. If 2130// the context is nil a panic will occur. In the future the SDK may create 2131// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2132// for more information on using Contexts. 2133func (c *WorkMail) GetDefaultRetentionPolicyWithContext(ctx aws.Context, input *GetDefaultRetentionPolicyInput, opts ...request.Option) (*GetDefaultRetentionPolicyOutput, error) { 2134 req, out := c.GetDefaultRetentionPolicyRequest(input) 2135 req.SetContext(ctx) 2136 req.ApplyOptions(opts...) 2137 return out, req.Send() 2138} 2139 2140const opGetMailboxDetails = "GetMailboxDetails" 2141 2142// GetMailboxDetailsRequest generates a "aws/request.Request" representing the 2143// client's request for the GetMailboxDetails operation. The "output" return 2144// value will be populated with the request's response once the request completes 2145// successfully. 2146// 2147// Use "Send" method on the returned Request to send the API call to the service. 2148// the "output" return value is not valid until after Send returns without error. 2149// 2150// See GetMailboxDetails for more information on using the GetMailboxDetails 2151// API call, and error handling. 2152// 2153// This method is useful when you want to inject custom logic or configuration 2154// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2155// 2156// 2157// // Example sending a request using the GetMailboxDetailsRequest method. 2158// req, resp := client.GetMailboxDetailsRequest(params) 2159// 2160// err := req.Send() 2161// if err == nil { // resp is now filled 2162// fmt.Println(resp) 2163// } 2164// 2165// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/GetMailboxDetails 2166func (c *WorkMail) GetMailboxDetailsRequest(input *GetMailboxDetailsInput) (req *request.Request, output *GetMailboxDetailsOutput) { 2167 op := &request.Operation{ 2168 Name: opGetMailboxDetails, 2169 HTTPMethod: "POST", 2170 HTTPPath: "/", 2171 } 2172 2173 if input == nil { 2174 input = &GetMailboxDetailsInput{} 2175 } 2176 2177 output = &GetMailboxDetailsOutput{} 2178 req = c.newRequest(op, input, output) 2179 return 2180} 2181 2182// GetMailboxDetails API operation for Amazon WorkMail. 2183// 2184// Requests a user's mailbox details for a specified organization and user. 2185// 2186// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2187// with awserr.Error's Code and Message methods to get detailed information about 2188// the error. 2189// 2190// See the AWS API reference guide for Amazon WorkMail's 2191// API operation GetMailboxDetails for usage and error information. 2192// 2193// Returned Error Types: 2194// * OrganizationNotFoundException 2195// An operation received a valid organization identifier that either doesn't 2196// belong or exist in the system. 2197// 2198// * OrganizationStateException 2199// The organization must have a valid state (Active or Synchronizing) to perform 2200// certain operations on the organization or its members. 2201// 2202// * EntityNotFoundException 2203// The identifier supplied for the user, group, or resource does not exist in 2204// your organization. 2205// 2206// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/GetMailboxDetails 2207func (c *WorkMail) GetMailboxDetails(input *GetMailboxDetailsInput) (*GetMailboxDetailsOutput, error) { 2208 req, out := c.GetMailboxDetailsRequest(input) 2209 return out, req.Send() 2210} 2211 2212// GetMailboxDetailsWithContext is the same as GetMailboxDetails with the addition of 2213// the ability to pass a context and additional request options. 2214// 2215// See GetMailboxDetails for details on how to use this API operation. 2216// 2217// The context must be non-nil and will be used for request cancellation. If 2218// the context is nil a panic will occur. In the future the SDK may create 2219// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2220// for more information on using Contexts. 2221func (c *WorkMail) GetMailboxDetailsWithContext(ctx aws.Context, input *GetMailboxDetailsInput, opts ...request.Option) (*GetMailboxDetailsOutput, error) { 2222 req, out := c.GetMailboxDetailsRequest(input) 2223 req.SetContext(ctx) 2224 req.ApplyOptions(opts...) 2225 return out, req.Send() 2226} 2227 2228const opListAccessControlRules = "ListAccessControlRules" 2229 2230// ListAccessControlRulesRequest generates a "aws/request.Request" representing the 2231// client's request for the ListAccessControlRules operation. The "output" return 2232// value will be populated with the request's response once the request completes 2233// successfully. 2234// 2235// Use "Send" method on the returned Request to send the API call to the service. 2236// the "output" return value is not valid until after Send returns without error. 2237// 2238// See ListAccessControlRules for more information on using the ListAccessControlRules 2239// API call, and error handling. 2240// 2241// This method is useful when you want to inject custom logic or configuration 2242// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2243// 2244// 2245// // Example sending a request using the ListAccessControlRulesRequest method. 2246// req, resp := client.ListAccessControlRulesRequest(params) 2247// 2248// err := req.Send() 2249// if err == nil { // resp is now filled 2250// fmt.Println(resp) 2251// } 2252// 2253// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListAccessControlRules 2254func (c *WorkMail) ListAccessControlRulesRequest(input *ListAccessControlRulesInput) (req *request.Request, output *ListAccessControlRulesOutput) { 2255 op := &request.Operation{ 2256 Name: opListAccessControlRules, 2257 HTTPMethod: "POST", 2258 HTTPPath: "/", 2259 } 2260 2261 if input == nil { 2262 input = &ListAccessControlRulesInput{} 2263 } 2264 2265 output = &ListAccessControlRulesOutput{} 2266 req = c.newRequest(op, input, output) 2267 return 2268} 2269 2270// ListAccessControlRules API operation for Amazon WorkMail. 2271// 2272// Lists the access control rules for the specified organization. 2273// 2274// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2275// with awserr.Error's Code and Message methods to get detailed information about 2276// the error. 2277// 2278// See the AWS API reference guide for Amazon WorkMail's 2279// API operation ListAccessControlRules for usage and error information. 2280// 2281// Returned Error Types: 2282// * OrganizationNotFoundException 2283// An operation received a valid organization identifier that either doesn't 2284// belong or exist in the system. 2285// 2286// * OrganizationStateException 2287// The organization must have a valid state (Active or Synchronizing) to perform 2288// certain operations on the organization or its members. 2289// 2290// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListAccessControlRules 2291func (c *WorkMail) ListAccessControlRules(input *ListAccessControlRulesInput) (*ListAccessControlRulesOutput, error) { 2292 req, out := c.ListAccessControlRulesRequest(input) 2293 return out, req.Send() 2294} 2295 2296// ListAccessControlRulesWithContext is the same as ListAccessControlRules with the addition of 2297// the ability to pass a context and additional request options. 2298// 2299// See ListAccessControlRules for details on how to use this API operation. 2300// 2301// The context must be non-nil and will be used for request cancellation. If 2302// the context is nil a panic will occur. In the future the SDK may create 2303// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2304// for more information on using Contexts. 2305func (c *WorkMail) ListAccessControlRulesWithContext(ctx aws.Context, input *ListAccessControlRulesInput, opts ...request.Option) (*ListAccessControlRulesOutput, error) { 2306 req, out := c.ListAccessControlRulesRequest(input) 2307 req.SetContext(ctx) 2308 req.ApplyOptions(opts...) 2309 return out, req.Send() 2310} 2311 2312const opListAliases = "ListAliases" 2313 2314// ListAliasesRequest generates a "aws/request.Request" representing the 2315// client's request for the ListAliases operation. The "output" return 2316// value will be populated with the request's response once the request completes 2317// successfully. 2318// 2319// Use "Send" method on the returned Request to send the API call to the service. 2320// the "output" return value is not valid until after Send returns without error. 2321// 2322// See ListAliases for more information on using the ListAliases 2323// API call, and error handling. 2324// 2325// This method is useful when you want to inject custom logic or configuration 2326// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2327// 2328// 2329// // Example sending a request using the ListAliasesRequest method. 2330// req, resp := client.ListAliasesRequest(params) 2331// 2332// err := req.Send() 2333// if err == nil { // resp is now filled 2334// fmt.Println(resp) 2335// } 2336// 2337// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListAliases 2338func (c *WorkMail) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput) { 2339 op := &request.Operation{ 2340 Name: opListAliases, 2341 HTTPMethod: "POST", 2342 HTTPPath: "/", 2343 Paginator: &request.Paginator{ 2344 InputTokens: []string{"NextToken"}, 2345 OutputTokens: []string{"NextToken"}, 2346 LimitToken: "MaxResults", 2347 TruncationToken: "", 2348 }, 2349 } 2350 2351 if input == nil { 2352 input = &ListAliasesInput{} 2353 } 2354 2355 output = &ListAliasesOutput{} 2356 req = c.newRequest(op, input, output) 2357 return 2358} 2359 2360// ListAliases API operation for Amazon WorkMail. 2361// 2362// Creates a paginated call to list the aliases associated with a given entity. 2363// 2364// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2365// with awserr.Error's Code and Message methods to get detailed information about 2366// the error. 2367// 2368// See the AWS API reference guide for Amazon WorkMail's 2369// API operation ListAliases for usage and error information. 2370// 2371// Returned Error Types: 2372// * EntityNotFoundException 2373// The identifier supplied for the user, group, or resource does not exist in 2374// your organization. 2375// 2376// * EntityStateException 2377// You are performing an operation on a user, group, or resource that isn't 2378// in the expected state, such as trying to delete an active user. 2379// 2380// * InvalidParameterException 2381// One or more of the input parameters don't match the service's restrictions. 2382// 2383// * OrganizationNotFoundException 2384// An operation received a valid organization identifier that either doesn't 2385// belong or exist in the system. 2386// 2387// * OrganizationStateException 2388// The organization must have a valid state (Active or Synchronizing) to perform 2389// certain operations on the organization or its members. 2390// 2391// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListAliases 2392func (c *WorkMail) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) { 2393 req, out := c.ListAliasesRequest(input) 2394 return out, req.Send() 2395} 2396 2397// ListAliasesWithContext is the same as ListAliases with the addition of 2398// the ability to pass a context and additional request options. 2399// 2400// See ListAliases for details on how to use this API operation. 2401// 2402// The context must be non-nil and will be used for request cancellation. If 2403// the context is nil a panic will occur. In the future the SDK may create 2404// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2405// for more information on using Contexts. 2406func (c *WorkMail) ListAliasesWithContext(ctx aws.Context, input *ListAliasesInput, opts ...request.Option) (*ListAliasesOutput, error) { 2407 req, out := c.ListAliasesRequest(input) 2408 req.SetContext(ctx) 2409 req.ApplyOptions(opts...) 2410 return out, req.Send() 2411} 2412 2413// ListAliasesPages iterates over the pages of a ListAliases operation, 2414// calling the "fn" function with the response data for each page. To stop 2415// iterating, return false from the fn function. 2416// 2417// See ListAliases method for more information on how to use this operation. 2418// 2419// Note: This operation can generate multiple requests to a service. 2420// 2421// // Example iterating over at most 3 pages of a ListAliases operation. 2422// pageNum := 0 2423// err := client.ListAliasesPages(params, 2424// func(page *workmail.ListAliasesOutput, lastPage bool) bool { 2425// pageNum++ 2426// fmt.Println(page) 2427// return pageNum <= 3 2428// }) 2429// 2430func (c *WorkMail) ListAliasesPages(input *ListAliasesInput, fn func(*ListAliasesOutput, bool) bool) error { 2431 return c.ListAliasesPagesWithContext(aws.BackgroundContext(), input, fn) 2432} 2433 2434// ListAliasesPagesWithContext same as ListAliasesPages except 2435// it takes a Context and allows setting request options on the pages. 2436// 2437// The context must be non-nil and will be used for request cancellation. If 2438// the context is nil a panic will occur. In the future the SDK may create 2439// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2440// for more information on using Contexts. 2441func (c *WorkMail) ListAliasesPagesWithContext(ctx aws.Context, input *ListAliasesInput, fn func(*ListAliasesOutput, bool) bool, opts ...request.Option) error { 2442 p := request.Pagination{ 2443 NewRequest: func() (*request.Request, error) { 2444 var inCpy *ListAliasesInput 2445 if input != nil { 2446 tmp := *input 2447 inCpy = &tmp 2448 } 2449 req, _ := c.ListAliasesRequest(inCpy) 2450 req.SetContext(ctx) 2451 req.ApplyOptions(opts...) 2452 return req, nil 2453 }, 2454 } 2455 2456 for p.Next() { 2457 if !fn(p.Page().(*ListAliasesOutput), !p.HasNextPage()) { 2458 break 2459 } 2460 } 2461 2462 return p.Err() 2463} 2464 2465const opListGroupMembers = "ListGroupMembers" 2466 2467// ListGroupMembersRequest generates a "aws/request.Request" representing the 2468// client's request for the ListGroupMembers operation. The "output" return 2469// value will be populated with the request's response once the request completes 2470// successfully. 2471// 2472// Use "Send" method on the returned Request to send the API call to the service. 2473// the "output" return value is not valid until after Send returns without error. 2474// 2475// See ListGroupMembers for more information on using the ListGroupMembers 2476// API call, and error handling. 2477// 2478// This method is useful when you want to inject custom logic or configuration 2479// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2480// 2481// 2482// // Example sending a request using the ListGroupMembersRequest method. 2483// req, resp := client.ListGroupMembersRequest(params) 2484// 2485// err := req.Send() 2486// if err == nil { // resp is now filled 2487// fmt.Println(resp) 2488// } 2489// 2490// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroupMembers 2491func (c *WorkMail) ListGroupMembersRequest(input *ListGroupMembersInput) (req *request.Request, output *ListGroupMembersOutput) { 2492 op := &request.Operation{ 2493 Name: opListGroupMembers, 2494 HTTPMethod: "POST", 2495 HTTPPath: "/", 2496 Paginator: &request.Paginator{ 2497 InputTokens: []string{"NextToken"}, 2498 OutputTokens: []string{"NextToken"}, 2499 LimitToken: "MaxResults", 2500 TruncationToken: "", 2501 }, 2502 } 2503 2504 if input == nil { 2505 input = &ListGroupMembersInput{} 2506 } 2507 2508 output = &ListGroupMembersOutput{} 2509 req = c.newRequest(op, input, output) 2510 return 2511} 2512 2513// ListGroupMembers API operation for Amazon WorkMail. 2514// 2515// Returns an overview of the members of a group. Users and groups can be members 2516// of a group. 2517// 2518// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2519// with awserr.Error's Code and Message methods to get detailed information about 2520// the error. 2521// 2522// See the AWS API reference guide for Amazon WorkMail's 2523// API operation ListGroupMembers for usage and error information. 2524// 2525// Returned Error Types: 2526// * EntityNotFoundException 2527// The identifier supplied for the user, group, or resource does not exist in 2528// your organization. 2529// 2530// * EntityStateException 2531// You are performing an operation on a user, group, or resource that isn't 2532// in the expected state, such as trying to delete an active user. 2533// 2534// * InvalidParameterException 2535// One or more of the input parameters don't match the service's restrictions. 2536// 2537// * OrganizationNotFoundException 2538// An operation received a valid organization identifier that either doesn't 2539// belong or exist in the system. 2540// 2541// * OrganizationStateException 2542// The organization must have a valid state (Active or Synchronizing) to perform 2543// certain operations on the organization or its members. 2544// 2545// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroupMembers 2546func (c *WorkMail) ListGroupMembers(input *ListGroupMembersInput) (*ListGroupMembersOutput, error) { 2547 req, out := c.ListGroupMembersRequest(input) 2548 return out, req.Send() 2549} 2550 2551// ListGroupMembersWithContext is the same as ListGroupMembers with the addition of 2552// the ability to pass a context and additional request options. 2553// 2554// See ListGroupMembers for details on how to use this API operation. 2555// 2556// The context must be non-nil and will be used for request cancellation. If 2557// the context is nil a panic will occur. In the future the SDK may create 2558// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2559// for more information on using Contexts. 2560func (c *WorkMail) ListGroupMembersWithContext(ctx aws.Context, input *ListGroupMembersInput, opts ...request.Option) (*ListGroupMembersOutput, error) { 2561 req, out := c.ListGroupMembersRequest(input) 2562 req.SetContext(ctx) 2563 req.ApplyOptions(opts...) 2564 return out, req.Send() 2565} 2566 2567// ListGroupMembersPages iterates over the pages of a ListGroupMembers operation, 2568// calling the "fn" function with the response data for each page. To stop 2569// iterating, return false from the fn function. 2570// 2571// See ListGroupMembers method for more information on how to use this operation. 2572// 2573// Note: This operation can generate multiple requests to a service. 2574// 2575// // Example iterating over at most 3 pages of a ListGroupMembers operation. 2576// pageNum := 0 2577// err := client.ListGroupMembersPages(params, 2578// func(page *workmail.ListGroupMembersOutput, lastPage bool) bool { 2579// pageNum++ 2580// fmt.Println(page) 2581// return pageNum <= 3 2582// }) 2583// 2584func (c *WorkMail) ListGroupMembersPages(input *ListGroupMembersInput, fn func(*ListGroupMembersOutput, bool) bool) error { 2585 return c.ListGroupMembersPagesWithContext(aws.BackgroundContext(), input, fn) 2586} 2587 2588// ListGroupMembersPagesWithContext same as ListGroupMembersPages except 2589// it takes a Context and allows setting request options on the pages. 2590// 2591// The context must be non-nil and will be used for request cancellation. If 2592// the context is nil a panic will occur. In the future the SDK may create 2593// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2594// for more information on using Contexts. 2595func (c *WorkMail) ListGroupMembersPagesWithContext(ctx aws.Context, input *ListGroupMembersInput, fn func(*ListGroupMembersOutput, bool) bool, opts ...request.Option) error { 2596 p := request.Pagination{ 2597 NewRequest: func() (*request.Request, error) { 2598 var inCpy *ListGroupMembersInput 2599 if input != nil { 2600 tmp := *input 2601 inCpy = &tmp 2602 } 2603 req, _ := c.ListGroupMembersRequest(inCpy) 2604 req.SetContext(ctx) 2605 req.ApplyOptions(opts...) 2606 return req, nil 2607 }, 2608 } 2609 2610 for p.Next() { 2611 if !fn(p.Page().(*ListGroupMembersOutput), !p.HasNextPage()) { 2612 break 2613 } 2614 } 2615 2616 return p.Err() 2617} 2618 2619const opListGroups = "ListGroups" 2620 2621// ListGroupsRequest generates a "aws/request.Request" representing the 2622// client's request for the ListGroups operation. The "output" return 2623// value will be populated with the request's response once the request completes 2624// successfully. 2625// 2626// Use "Send" method on the returned Request to send the API call to the service. 2627// the "output" return value is not valid until after Send returns without error. 2628// 2629// See ListGroups for more information on using the ListGroups 2630// API call, and error handling. 2631// 2632// This method is useful when you want to inject custom logic or configuration 2633// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2634// 2635// 2636// // Example sending a request using the ListGroupsRequest method. 2637// req, resp := client.ListGroupsRequest(params) 2638// 2639// err := req.Send() 2640// if err == nil { // resp is now filled 2641// fmt.Println(resp) 2642// } 2643// 2644// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroups 2645func (c *WorkMail) ListGroupsRequest(input *ListGroupsInput) (req *request.Request, output *ListGroupsOutput) { 2646 op := &request.Operation{ 2647 Name: opListGroups, 2648 HTTPMethod: "POST", 2649 HTTPPath: "/", 2650 Paginator: &request.Paginator{ 2651 InputTokens: []string{"NextToken"}, 2652 OutputTokens: []string{"NextToken"}, 2653 LimitToken: "MaxResults", 2654 TruncationToken: "", 2655 }, 2656 } 2657 2658 if input == nil { 2659 input = &ListGroupsInput{} 2660 } 2661 2662 output = &ListGroupsOutput{} 2663 req = c.newRequest(op, input, output) 2664 return 2665} 2666 2667// ListGroups API operation for Amazon WorkMail. 2668// 2669// Returns summaries of the organization's groups. 2670// 2671// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2672// with awserr.Error's Code and Message methods to get detailed information about 2673// the error. 2674// 2675// See the AWS API reference guide for Amazon WorkMail's 2676// API operation ListGroups for usage and error information. 2677// 2678// Returned Error Types: 2679// * EntityNotFoundException 2680// The identifier supplied for the user, group, or resource does not exist in 2681// your organization. 2682// 2683// * InvalidParameterException 2684// One or more of the input parameters don't match the service's restrictions. 2685// 2686// * OrganizationNotFoundException 2687// An operation received a valid organization identifier that either doesn't 2688// belong or exist in the system. 2689// 2690// * OrganizationStateException 2691// The organization must have a valid state (Active or Synchronizing) to perform 2692// certain operations on the organization or its members. 2693// 2694// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListGroups 2695func (c *WorkMail) ListGroups(input *ListGroupsInput) (*ListGroupsOutput, error) { 2696 req, out := c.ListGroupsRequest(input) 2697 return out, req.Send() 2698} 2699 2700// ListGroupsWithContext is the same as ListGroups with the addition of 2701// the ability to pass a context and additional request options. 2702// 2703// See ListGroups for details on how to use this API operation. 2704// 2705// The context must be non-nil and will be used for request cancellation. If 2706// the context is nil a panic will occur. In the future the SDK may create 2707// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2708// for more information on using Contexts. 2709func (c *WorkMail) ListGroupsWithContext(ctx aws.Context, input *ListGroupsInput, opts ...request.Option) (*ListGroupsOutput, error) { 2710 req, out := c.ListGroupsRequest(input) 2711 req.SetContext(ctx) 2712 req.ApplyOptions(opts...) 2713 return out, req.Send() 2714} 2715 2716// ListGroupsPages iterates over the pages of a ListGroups operation, 2717// calling the "fn" function with the response data for each page. To stop 2718// iterating, return false from the fn function. 2719// 2720// See ListGroups method for more information on how to use this operation. 2721// 2722// Note: This operation can generate multiple requests to a service. 2723// 2724// // Example iterating over at most 3 pages of a ListGroups operation. 2725// pageNum := 0 2726// err := client.ListGroupsPages(params, 2727// func(page *workmail.ListGroupsOutput, lastPage bool) bool { 2728// pageNum++ 2729// fmt.Println(page) 2730// return pageNum <= 3 2731// }) 2732// 2733func (c *WorkMail) ListGroupsPages(input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool) error { 2734 return c.ListGroupsPagesWithContext(aws.BackgroundContext(), input, fn) 2735} 2736 2737// ListGroupsPagesWithContext same as ListGroupsPages except 2738// it takes a Context and allows setting request options on the pages. 2739// 2740// The context must be non-nil and will be used for request cancellation. If 2741// the context is nil a panic will occur. In the future the SDK may create 2742// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2743// for more information on using Contexts. 2744func (c *WorkMail) ListGroupsPagesWithContext(ctx aws.Context, input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool, opts ...request.Option) error { 2745 p := request.Pagination{ 2746 NewRequest: func() (*request.Request, error) { 2747 var inCpy *ListGroupsInput 2748 if input != nil { 2749 tmp := *input 2750 inCpy = &tmp 2751 } 2752 req, _ := c.ListGroupsRequest(inCpy) 2753 req.SetContext(ctx) 2754 req.ApplyOptions(opts...) 2755 return req, nil 2756 }, 2757 } 2758 2759 for p.Next() { 2760 if !fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) { 2761 break 2762 } 2763 } 2764 2765 return p.Err() 2766} 2767 2768const opListMailboxPermissions = "ListMailboxPermissions" 2769 2770// ListMailboxPermissionsRequest generates a "aws/request.Request" representing the 2771// client's request for the ListMailboxPermissions operation. The "output" return 2772// value will be populated with the request's response once the request completes 2773// successfully. 2774// 2775// Use "Send" method on the returned Request to send the API call to the service. 2776// the "output" return value is not valid until after Send returns without error. 2777// 2778// See ListMailboxPermissions for more information on using the ListMailboxPermissions 2779// API call, and error handling. 2780// 2781// This method is useful when you want to inject custom logic or configuration 2782// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2783// 2784// 2785// // Example sending a request using the ListMailboxPermissionsRequest method. 2786// req, resp := client.ListMailboxPermissionsRequest(params) 2787// 2788// err := req.Send() 2789// if err == nil { // resp is now filled 2790// fmt.Println(resp) 2791// } 2792// 2793// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListMailboxPermissions 2794func (c *WorkMail) ListMailboxPermissionsRequest(input *ListMailboxPermissionsInput) (req *request.Request, output *ListMailboxPermissionsOutput) { 2795 op := &request.Operation{ 2796 Name: opListMailboxPermissions, 2797 HTTPMethod: "POST", 2798 HTTPPath: "/", 2799 Paginator: &request.Paginator{ 2800 InputTokens: []string{"NextToken"}, 2801 OutputTokens: []string{"NextToken"}, 2802 LimitToken: "MaxResults", 2803 TruncationToken: "", 2804 }, 2805 } 2806 2807 if input == nil { 2808 input = &ListMailboxPermissionsInput{} 2809 } 2810 2811 output = &ListMailboxPermissionsOutput{} 2812 req = c.newRequest(op, input, output) 2813 return 2814} 2815 2816// ListMailboxPermissions API operation for Amazon WorkMail. 2817// 2818// Lists the mailbox permissions associated with a user, group, or resource 2819// mailbox. 2820// 2821// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2822// with awserr.Error's Code and Message methods to get detailed information about 2823// the error. 2824// 2825// See the AWS API reference guide for Amazon WorkMail's 2826// API operation ListMailboxPermissions for usage and error information. 2827// 2828// Returned Error Types: 2829// * EntityNotFoundException 2830// The identifier supplied for the user, group, or resource does not exist in 2831// your organization. 2832// 2833// * InvalidParameterException 2834// One or more of the input parameters don't match the service's restrictions. 2835// 2836// * OrganizationNotFoundException 2837// An operation received a valid organization identifier that either doesn't 2838// belong or exist in the system. 2839// 2840// * OrganizationStateException 2841// The organization must have a valid state (Active or Synchronizing) to perform 2842// certain operations on the organization or its members. 2843// 2844// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListMailboxPermissions 2845func (c *WorkMail) ListMailboxPermissions(input *ListMailboxPermissionsInput) (*ListMailboxPermissionsOutput, error) { 2846 req, out := c.ListMailboxPermissionsRequest(input) 2847 return out, req.Send() 2848} 2849 2850// ListMailboxPermissionsWithContext is the same as ListMailboxPermissions with the addition of 2851// the ability to pass a context and additional request options. 2852// 2853// See ListMailboxPermissions for details on how to use this API operation. 2854// 2855// The context must be non-nil and will be used for request cancellation. If 2856// the context is nil a panic will occur. In the future the SDK may create 2857// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2858// for more information on using Contexts. 2859func (c *WorkMail) ListMailboxPermissionsWithContext(ctx aws.Context, input *ListMailboxPermissionsInput, opts ...request.Option) (*ListMailboxPermissionsOutput, error) { 2860 req, out := c.ListMailboxPermissionsRequest(input) 2861 req.SetContext(ctx) 2862 req.ApplyOptions(opts...) 2863 return out, req.Send() 2864} 2865 2866// ListMailboxPermissionsPages iterates over the pages of a ListMailboxPermissions operation, 2867// calling the "fn" function with the response data for each page. To stop 2868// iterating, return false from the fn function. 2869// 2870// See ListMailboxPermissions method for more information on how to use this operation. 2871// 2872// Note: This operation can generate multiple requests to a service. 2873// 2874// // Example iterating over at most 3 pages of a ListMailboxPermissions operation. 2875// pageNum := 0 2876// err := client.ListMailboxPermissionsPages(params, 2877// func(page *workmail.ListMailboxPermissionsOutput, lastPage bool) bool { 2878// pageNum++ 2879// fmt.Println(page) 2880// return pageNum <= 3 2881// }) 2882// 2883func (c *WorkMail) ListMailboxPermissionsPages(input *ListMailboxPermissionsInput, fn func(*ListMailboxPermissionsOutput, bool) bool) error { 2884 return c.ListMailboxPermissionsPagesWithContext(aws.BackgroundContext(), input, fn) 2885} 2886 2887// ListMailboxPermissionsPagesWithContext same as ListMailboxPermissionsPages except 2888// it takes a Context and allows setting request options on the pages. 2889// 2890// The context must be non-nil and will be used for request cancellation. If 2891// the context is nil a panic will occur. In the future the SDK may create 2892// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2893// for more information on using Contexts. 2894func (c *WorkMail) ListMailboxPermissionsPagesWithContext(ctx aws.Context, input *ListMailboxPermissionsInput, fn func(*ListMailboxPermissionsOutput, bool) bool, opts ...request.Option) error { 2895 p := request.Pagination{ 2896 NewRequest: func() (*request.Request, error) { 2897 var inCpy *ListMailboxPermissionsInput 2898 if input != nil { 2899 tmp := *input 2900 inCpy = &tmp 2901 } 2902 req, _ := c.ListMailboxPermissionsRequest(inCpy) 2903 req.SetContext(ctx) 2904 req.ApplyOptions(opts...) 2905 return req, nil 2906 }, 2907 } 2908 2909 for p.Next() { 2910 if !fn(p.Page().(*ListMailboxPermissionsOutput), !p.HasNextPage()) { 2911 break 2912 } 2913 } 2914 2915 return p.Err() 2916} 2917 2918const opListOrganizations = "ListOrganizations" 2919 2920// ListOrganizationsRequest generates a "aws/request.Request" representing the 2921// client's request for the ListOrganizations operation. The "output" return 2922// value will be populated with the request's response once the request completes 2923// successfully. 2924// 2925// Use "Send" method on the returned Request to send the API call to the service. 2926// the "output" return value is not valid until after Send returns without error. 2927// 2928// See ListOrganizations for more information on using the ListOrganizations 2929// API call, and error handling. 2930// 2931// This method is useful when you want to inject custom logic or configuration 2932// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2933// 2934// 2935// // Example sending a request using the ListOrganizationsRequest method. 2936// req, resp := client.ListOrganizationsRequest(params) 2937// 2938// err := req.Send() 2939// if err == nil { // resp is now filled 2940// fmt.Println(resp) 2941// } 2942// 2943// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListOrganizations 2944func (c *WorkMail) ListOrganizationsRequest(input *ListOrganizationsInput) (req *request.Request, output *ListOrganizationsOutput) { 2945 op := &request.Operation{ 2946 Name: opListOrganizations, 2947 HTTPMethod: "POST", 2948 HTTPPath: "/", 2949 Paginator: &request.Paginator{ 2950 InputTokens: []string{"NextToken"}, 2951 OutputTokens: []string{"NextToken"}, 2952 LimitToken: "MaxResults", 2953 TruncationToken: "", 2954 }, 2955 } 2956 2957 if input == nil { 2958 input = &ListOrganizationsInput{} 2959 } 2960 2961 output = &ListOrganizationsOutput{} 2962 req = c.newRequest(op, input, output) 2963 return 2964} 2965 2966// ListOrganizations API operation for Amazon WorkMail. 2967// 2968// Returns summaries of the customer's organizations. 2969// 2970// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2971// with awserr.Error's Code and Message methods to get detailed information about 2972// the error. 2973// 2974// See the AWS API reference guide for Amazon WorkMail's 2975// API operation ListOrganizations for usage and error information. 2976// 2977// Returned Error Types: 2978// * InvalidParameterException 2979// One or more of the input parameters don't match the service's restrictions. 2980// 2981// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListOrganizations 2982func (c *WorkMail) ListOrganizations(input *ListOrganizationsInput) (*ListOrganizationsOutput, error) { 2983 req, out := c.ListOrganizationsRequest(input) 2984 return out, req.Send() 2985} 2986 2987// ListOrganizationsWithContext is the same as ListOrganizations with the addition of 2988// the ability to pass a context and additional request options. 2989// 2990// See ListOrganizations for details on how to use this API operation. 2991// 2992// The context must be non-nil and will be used for request cancellation. If 2993// the context is nil a panic will occur. In the future the SDK may create 2994// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2995// for more information on using Contexts. 2996func (c *WorkMail) ListOrganizationsWithContext(ctx aws.Context, input *ListOrganizationsInput, opts ...request.Option) (*ListOrganizationsOutput, error) { 2997 req, out := c.ListOrganizationsRequest(input) 2998 req.SetContext(ctx) 2999 req.ApplyOptions(opts...) 3000 return out, req.Send() 3001} 3002 3003// ListOrganizationsPages iterates over the pages of a ListOrganizations operation, 3004// calling the "fn" function with the response data for each page. To stop 3005// iterating, return false from the fn function. 3006// 3007// See ListOrganizations method for more information on how to use this operation. 3008// 3009// Note: This operation can generate multiple requests to a service. 3010// 3011// // Example iterating over at most 3 pages of a ListOrganizations operation. 3012// pageNum := 0 3013// err := client.ListOrganizationsPages(params, 3014// func(page *workmail.ListOrganizationsOutput, lastPage bool) bool { 3015// pageNum++ 3016// fmt.Println(page) 3017// return pageNum <= 3 3018// }) 3019// 3020func (c *WorkMail) ListOrganizationsPages(input *ListOrganizationsInput, fn func(*ListOrganizationsOutput, bool) bool) error { 3021 return c.ListOrganizationsPagesWithContext(aws.BackgroundContext(), input, fn) 3022} 3023 3024// ListOrganizationsPagesWithContext same as ListOrganizationsPages except 3025// it takes a Context and allows setting request options on the pages. 3026// 3027// The context must be non-nil and will be used for request cancellation. If 3028// the context is nil a panic will occur. In the future the SDK may create 3029// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3030// for more information on using Contexts. 3031func (c *WorkMail) ListOrganizationsPagesWithContext(ctx aws.Context, input *ListOrganizationsInput, fn func(*ListOrganizationsOutput, bool) bool, opts ...request.Option) error { 3032 p := request.Pagination{ 3033 NewRequest: func() (*request.Request, error) { 3034 var inCpy *ListOrganizationsInput 3035 if input != nil { 3036 tmp := *input 3037 inCpy = &tmp 3038 } 3039 req, _ := c.ListOrganizationsRequest(inCpy) 3040 req.SetContext(ctx) 3041 req.ApplyOptions(opts...) 3042 return req, nil 3043 }, 3044 } 3045 3046 for p.Next() { 3047 if !fn(p.Page().(*ListOrganizationsOutput), !p.HasNextPage()) { 3048 break 3049 } 3050 } 3051 3052 return p.Err() 3053} 3054 3055const opListResourceDelegates = "ListResourceDelegates" 3056 3057// ListResourceDelegatesRequest generates a "aws/request.Request" representing the 3058// client's request for the ListResourceDelegates operation. The "output" return 3059// value will be populated with the request's response once the request completes 3060// successfully. 3061// 3062// Use "Send" method on the returned Request to send the API call to the service. 3063// the "output" return value is not valid until after Send returns without error. 3064// 3065// See ListResourceDelegates for more information on using the ListResourceDelegates 3066// API call, and error handling. 3067// 3068// This method is useful when you want to inject custom logic or configuration 3069// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3070// 3071// 3072// // Example sending a request using the ListResourceDelegatesRequest method. 3073// req, resp := client.ListResourceDelegatesRequest(params) 3074// 3075// err := req.Send() 3076// if err == nil { // resp is now filled 3077// fmt.Println(resp) 3078// } 3079// 3080// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResourceDelegates 3081func (c *WorkMail) ListResourceDelegatesRequest(input *ListResourceDelegatesInput) (req *request.Request, output *ListResourceDelegatesOutput) { 3082 op := &request.Operation{ 3083 Name: opListResourceDelegates, 3084 HTTPMethod: "POST", 3085 HTTPPath: "/", 3086 Paginator: &request.Paginator{ 3087 InputTokens: []string{"NextToken"}, 3088 OutputTokens: []string{"NextToken"}, 3089 LimitToken: "MaxResults", 3090 TruncationToken: "", 3091 }, 3092 } 3093 3094 if input == nil { 3095 input = &ListResourceDelegatesInput{} 3096 } 3097 3098 output = &ListResourceDelegatesOutput{} 3099 req = c.newRequest(op, input, output) 3100 return 3101} 3102 3103// ListResourceDelegates API operation for Amazon WorkMail. 3104// 3105// Lists the delegates associated with a resource. Users and groups can be resource 3106// delegates and answer requests on behalf of the resource. 3107// 3108// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3109// with awserr.Error's Code and Message methods to get detailed information about 3110// the error. 3111// 3112// See the AWS API reference guide for Amazon WorkMail's 3113// API operation ListResourceDelegates for usage and error information. 3114// 3115// Returned Error Types: 3116// * EntityNotFoundException 3117// The identifier supplied for the user, group, or resource does not exist in 3118// your organization. 3119// 3120// * EntityStateException 3121// You are performing an operation on a user, group, or resource that isn't 3122// in the expected state, such as trying to delete an active user. 3123// 3124// * InvalidParameterException 3125// One or more of the input parameters don't match the service's restrictions. 3126// 3127// * OrganizationNotFoundException 3128// An operation received a valid organization identifier that either doesn't 3129// belong or exist in the system. 3130// 3131// * OrganizationStateException 3132// The organization must have a valid state (Active or Synchronizing) to perform 3133// certain operations on the organization or its members. 3134// 3135// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResourceDelegates 3136func (c *WorkMail) ListResourceDelegates(input *ListResourceDelegatesInput) (*ListResourceDelegatesOutput, error) { 3137 req, out := c.ListResourceDelegatesRequest(input) 3138 return out, req.Send() 3139} 3140 3141// ListResourceDelegatesWithContext is the same as ListResourceDelegates with the addition of 3142// the ability to pass a context and additional request options. 3143// 3144// See ListResourceDelegates for details on how to use this API operation. 3145// 3146// The context must be non-nil and will be used for request cancellation. If 3147// the context is nil a panic will occur. In the future the SDK may create 3148// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3149// for more information on using Contexts. 3150func (c *WorkMail) ListResourceDelegatesWithContext(ctx aws.Context, input *ListResourceDelegatesInput, opts ...request.Option) (*ListResourceDelegatesOutput, error) { 3151 req, out := c.ListResourceDelegatesRequest(input) 3152 req.SetContext(ctx) 3153 req.ApplyOptions(opts...) 3154 return out, req.Send() 3155} 3156 3157// ListResourceDelegatesPages iterates over the pages of a ListResourceDelegates operation, 3158// calling the "fn" function with the response data for each page. To stop 3159// iterating, return false from the fn function. 3160// 3161// See ListResourceDelegates method for more information on how to use this operation. 3162// 3163// Note: This operation can generate multiple requests to a service. 3164// 3165// // Example iterating over at most 3 pages of a ListResourceDelegates operation. 3166// pageNum := 0 3167// err := client.ListResourceDelegatesPages(params, 3168// func(page *workmail.ListResourceDelegatesOutput, lastPage bool) bool { 3169// pageNum++ 3170// fmt.Println(page) 3171// return pageNum <= 3 3172// }) 3173// 3174func (c *WorkMail) ListResourceDelegatesPages(input *ListResourceDelegatesInput, fn func(*ListResourceDelegatesOutput, bool) bool) error { 3175 return c.ListResourceDelegatesPagesWithContext(aws.BackgroundContext(), input, fn) 3176} 3177 3178// ListResourceDelegatesPagesWithContext same as ListResourceDelegatesPages except 3179// it takes a Context and allows setting request options on the pages. 3180// 3181// The context must be non-nil and will be used for request cancellation. If 3182// the context is nil a panic will occur. In the future the SDK may create 3183// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3184// for more information on using Contexts. 3185func (c *WorkMail) ListResourceDelegatesPagesWithContext(ctx aws.Context, input *ListResourceDelegatesInput, fn func(*ListResourceDelegatesOutput, bool) bool, opts ...request.Option) error { 3186 p := request.Pagination{ 3187 NewRequest: func() (*request.Request, error) { 3188 var inCpy *ListResourceDelegatesInput 3189 if input != nil { 3190 tmp := *input 3191 inCpy = &tmp 3192 } 3193 req, _ := c.ListResourceDelegatesRequest(inCpy) 3194 req.SetContext(ctx) 3195 req.ApplyOptions(opts...) 3196 return req, nil 3197 }, 3198 } 3199 3200 for p.Next() { 3201 if !fn(p.Page().(*ListResourceDelegatesOutput), !p.HasNextPage()) { 3202 break 3203 } 3204 } 3205 3206 return p.Err() 3207} 3208 3209const opListResources = "ListResources" 3210 3211// ListResourcesRequest generates a "aws/request.Request" representing the 3212// client's request for the ListResources operation. The "output" return 3213// value will be populated with the request's response once the request completes 3214// successfully. 3215// 3216// Use "Send" method on the returned Request to send the API call to the service. 3217// the "output" return value is not valid until after Send returns without error. 3218// 3219// See ListResources for more information on using the ListResources 3220// API call, and error handling. 3221// 3222// This method is useful when you want to inject custom logic or configuration 3223// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3224// 3225// 3226// // Example sending a request using the ListResourcesRequest method. 3227// req, resp := client.ListResourcesRequest(params) 3228// 3229// err := req.Send() 3230// if err == nil { // resp is now filled 3231// fmt.Println(resp) 3232// } 3233// 3234// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResources 3235func (c *WorkMail) ListResourcesRequest(input *ListResourcesInput) (req *request.Request, output *ListResourcesOutput) { 3236 op := &request.Operation{ 3237 Name: opListResources, 3238 HTTPMethod: "POST", 3239 HTTPPath: "/", 3240 Paginator: &request.Paginator{ 3241 InputTokens: []string{"NextToken"}, 3242 OutputTokens: []string{"NextToken"}, 3243 LimitToken: "MaxResults", 3244 TruncationToken: "", 3245 }, 3246 } 3247 3248 if input == nil { 3249 input = &ListResourcesInput{} 3250 } 3251 3252 output = &ListResourcesOutput{} 3253 req = c.newRequest(op, input, output) 3254 return 3255} 3256 3257// ListResources API operation for Amazon WorkMail. 3258// 3259// Returns summaries of the organization's resources. 3260// 3261// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3262// with awserr.Error's Code and Message methods to get detailed information about 3263// the error. 3264// 3265// See the AWS API reference guide for Amazon WorkMail's 3266// API operation ListResources for usage and error information. 3267// 3268// Returned Error Types: 3269// * InvalidParameterException 3270// One or more of the input parameters don't match the service's restrictions. 3271// 3272// * OrganizationNotFoundException 3273// An operation received a valid organization identifier that either doesn't 3274// belong or exist in the system. 3275// 3276// * OrganizationStateException 3277// The organization must have a valid state (Active or Synchronizing) to perform 3278// certain operations on the organization or its members. 3279// 3280// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListResources 3281func (c *WorkMail) ListResources(input *ListResourcesInput) (*ListResourcesOutput, error) { 3282 req, out := c.ListResourcesRequest(input) 3283 return out, req.Send() 3284} 3285 3286// ListResourcesWithContext is the same as ListResources with the addition of 3287// the ability to pass a context and additional request options. 3288// 3289// See ListResources for details on how to use this API operation. 3290// 3291// The context must be non-nil and will be used for request cancellation. If 3292// the context is nil a panic will occur. In the future the SDK may create 3293// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3294// for more information on using Contexts. 3295func (c *WorkMail) ListResourcesWithContext(ctx aws.Context, input *ListResourcesInput, opts ...request.Option) (*ListResourcesOutput, error) { 3296 req, out := c.ListResourcesRequest(input) 3297 req.SetContext(ctx) 3298 req.ApplyOptions(opts...) 3299 return out, req.Send() 3300} 3301 3302// ListResourcesPages iterates over the pages of a ListResources operation, 3303// calling the "fn" function with the response data for each page. To stop 3304// iterating, return false from the fn function. 3305// 3306// See ListResources method for more information on how to use this operation. 3307// 3308// Note: This operation can generate multiple requests to a service. 3309// 3310// // Example iterating over at most 3 pages of a ListResources operation. 3311// pageNum := 0 3312// err := client.ListResourcesPages(params, 3313// func(page *workmail.ListResourcesOutput, lastPage bool) bool { 3314// pageNum++ 3315// fmt.Println(page) 3316// return pageNum <= 3 3317// }) 3318// 3319func (c *WorkMail) ListResourcesPages(input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool) error { 3320 return c.ListResourcesPagesWithContext(aws.BackgroundContext(), input, fn) 3321} 3322 3323// ListResourcesPagesWithContext same as ListResourcesPages except 3324// it takes a Context and allows setting request options on the pages. 3325// 3326// The context must be non-nil and will be used for request cancellation. If 3327// the context is nil a panic will occur. In the future the SDK may create 3328// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3329// for more information on using Contexts. 3330func (c *WorkMail) ListResourcesPagesWithContext(ctx aws.Context, input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool, opts ...request.Option) error { 3331 p := request.Pagination{ 3332 NewRequest: func() (*request.Request, error) { 3333 var inCpy *ListResourcesInput 3334 if input != nil { 3335 tmp := *input 3336 inCpy = &tmp 3337 } 3338 req, _ := c.ListResourcesRequest(inCpy) 3339 req.SetContext(ctx) 3340 req.ApplyOptions(opts...) 3341 return req, nil 3342 }, 3343 } 3344 3345 for p.Next() { 3346 if !fn(p.Page().(*ListResourcesOutput), !p.HasNextPage()) { 3347 break 3348 } 3349 } 3350 3351 return p.Err() 3352} 3353 3354const opListTagsForResource = "ListTagsForResource" 3355 3356// ListTagsForResourceRequest generates a "aws/request.Request" representing the 3357// client's request for the ListTagsForResource operation. The "output" return 3358// value will be populated with the request's response once the request completes 3359// successfully. 3360// 3361// Use "Send" method on the returned Request to send the API call to the service. 3362// the "output" return value is not valid until after Send returns without error. 3363// 3364// See ListTagsForResource for more information on using the ListTagsForResource 3365// API call, and error handling. 3366// 3367// This method is useful when you want to inject custom logic or configuration 3368// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3369// 3370// 3371// // Example sending a request using the ListTagsForResourceRequest method. 3372// req, resp := client.ListTagsForResourceRequest(params) 3373// 3374// err := req.Send() 3375// if err == nil { // resp is now filled 3376// fmt.Println(resp) 3377// } 3378// 3379// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListTagsForResource 3380func (c *WorkMail) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 3381 op := &request.Operation{ 3382 Name: opListTagsForResource, 3383 HTTPMethod: "POST", 3384 HTTPPath: "/", 3385 } 3386 3387 if input == nil { 3388 input = &ListTagsForResourceInput{} 3389 } 3390 3391 output = &ListTagsForResourceOutput{} 3392 req = c.newRequest(op, input, output) 3393 return 3394} 3395 3396// ListTagsForResource API operation for Amazon WorkMail. 3397// 3398// Lists the tags applied to an Amazon WorkMail organization resource. 3399// 3400// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3401// with awserr.Error's Code and Message methods to get detailed information about 3402// the error. 3403// 3404// See the AWS API reference guide for Amazon WorkMail's 3405// API operation ListTagsForResource for usage and error information. 3406// 3407// Returned Error Types: 3408// * ResourceNotFoundException 3409// The resource cannot be found. 3410// 3411// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListTagsForResource 3412func (c *WorkMail) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 3413 req, out := c.ListTagsForResourceRequest(input) 3414 return out, req.Send() 3415} 3416 3417// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 3418// the ability to pass a context and additional request options. 3419// 3420// See ListTagsForResource for details on how to use this API operation. 3421// 3422// The context must be non-nil and will be used for request cancellation. If 3423// the context is nil a panic will occur. In the future the SDK may create 3424// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3425// for more information on using Contexts. 3426func (c *WorkMail) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 3427 req, out := c.ListTagsForResourceRequest(input) 3428 req.SetContext(ctx) 3429 req.ApplyOptions(opts...) 3430 return out, req.Send() 3431} 3432 3433const opListUsers = "ListUsers" 3434 3435// ListUsersRequest generates a "aws/request.Request" representing the 3436// client's request for the ListUsers operation. The "output" return 3437// value will be populated with the request's response once the request completes 3438// successfully. 3439// 3440// Use "Send" method on the returned Request to send the API call to the service. 3441// the "output" return value is not valid until after Send returns without error. 3442// 3443// See ListUsers for more information on using the ListUsers 3444// API call, and error handling. 3445// 3446// This method is useful when you want to inject custom logic or configuration 3447// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3448// 3449// 3450// // Example sending a request using the ListUsersRequest method. 3451// req, resp := client.ListUsersRequest(params) 3452// 3453// err := req.Send() 3454// if err == nil { // resp is now filled 3455// fmt.Println(resp) 3456// } 3457// 3458// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListUsers 3459func (c *WorkMail) ListUsersRequest(input *ListUsersInput) (req *request.Request, output *ListUsersOutput) { 3460 op := &request.Operation{ 3461 Name: opListUsers, 3462 HTTPMethod: "POST", 3463 HTTPPath: "/", 3464 Paginator: &request.Paginator{ 3465 InputTokens: []string{"NextToken"}, 3466 OutputTokens: []string{"NextToken"}, 3467 LimitToken: "MaxResults", 3468 TruncationToken: "", 3469 }, 3470 } 3471 3472 if input == nil { 3473 input = &ListUsersInput{} 3474 } 3475 3476 output = &ListUsersOutput{} 3477 req = c.newRequest(op, input, output) 3478 return 3479} 3480 3481// ListUsers API operation for Amazon WorkMail. 3482// 3483// Returns summaries of the organization's users. 3484// 3485// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3486// with awserr.Error's Code and Message methods to get detailed information about 3487// the error. 3488// 3489// See the AWS API reference guide for Amazon WorkMail's 3490// API operation ListUsers for usage and error information. 3491// 3492// Returned Error Types: 3493// * InvalidParameterException 3494// One or more of the input parameters don't match the service's restrictions. 3495// 3496// * OrganizationNotFoundException 3497// An operation received a valid organization identifier that either doesn't 3498// belong or exist in the system. 3499// 3500// * OrganizationStateException 3501// The organization must have a valid state (Active or Synchronizing) to perform 3502// certain operations on the organization or its members. 3503// 3504// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ListUsers 3505func (c *WorkMail) ListUsers(input *ListUsersInput) (*ListUsersOutput, error) { 3506 req, out := c.ListUsersRequest(input) 3507 return out, req.Send() 3508} 3509 3510// ListUsersWithContext is the same as ListUsers with the addition of 3511// the ability to pass a context and additional request options. 3512// 3513// See ListUsers for details on how to use this API operation. 3514// 3515// The context must be non-nil and will be used for request cancellation. If 3516// the context is nil a panic will occur. In the future the SDK may create 3517// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3518// for more information on using Contexts. 3519func (c *WorkMail) ListUsersWithContext(ctx aws.Context, input *ListUsersInput, opts ...request.Option) (*ListUsersOutput, error) { 3520 req, out := c.ListUsersRequest(input) 3521 req.SetContext(ctx) 3522 req.ApplyOptions(opts...) 3523 return out, req.Send() 3524} 3525 3526// ListUsersPages iterates over the pages of a ListUsers operation, 3527// calling the "fn" function with the response data for each page. To stop 3528// iterating, return false from the fn function. 3529// 3530// See ListUsers method for more information on how to use this operation. 3531// 3532// Note: This operation can generate multiple requests to a service. 3533// 3534// // Example iterating over at most 3 pages of a ListUsers operation. 3535// pageNum := 0 3536// err := client.ListUsersPages(params, 3537// func(page *workmail.ListUsersOutput, lastPage bool) bool { 3538// pageNum++ 3539// fmt.Println(page) 3540// return pageNum <= 3 3541// }) 3542// 3543func (c *WorkMail) ListUsersPages(input *ListUsersInput, fn func(*ListUsersOutput, bool) bool) error { 3544 return c.ListUsersPagesWithContext(aws.BackgroundContext(), input, fn) 3545} 3546 3547// ListUsersPagesWithContext same as ListUsersPages except 3548// it takes a Context and allows setting request options on the pages. 3549// 3550// The context must be non-nil and will be used for request cancellation. If 3551// the context is nil a panic will occur. In the future the SDK may create 3552// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3553// for more information on using Contexts. 3554func (c *WorkMail) ListUsersPagesWithContext(ctx aws.Context, input *ListUsersInput, fn func(*ListUsersOutput, bool) bool, opts ...request.Option) error { 3555 p := request.Pagination{ 3556 NewRequest: func() (*request.Request, error) { 3557 var inCpy *ListUsersInput 3558 if input != nil { 3559 tmp := *input 3560 inCpy = &tmp 3561 } 3562 req, _ := c.ListUsersRequest(inCpy) 3563 req.SetContext(ctx) 3564 req.ApplyOptions(opts...) 3565 return req, nil 3566 }, 3567 } 3568 3569 for p.Next() { 3570 if !fn(p.Page().(*ListUsersOutput), !p.HasNextPage()) { 3571 break 3572 } 3573 } 3574 3575 return p.Err() 3576} 3577 3578const opPutAccessControlRule = "PutAccessControlRule" 3579 3580// PutAccessControlRuleRequest generates a "aws/request.Request" representing the 3581// client's request for the PutAccessControlRule operation. The "output" return 3582// value will be populated with the request's response once the request completes 3583// successfully. 3584// 3585// Use "Send" method on the returned Request to send the API call to the service. 3586// the "output" return value is not valid until after Send returns without error. 3587// 3588// See PutAccessControlRule for more information on using the PutAccessControlRule 3589// API call, and error handling. 3590// 3591// This method is useful when you want to inject custom logic or configuration 3592// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3593// 3594// 3595// // Example sending a request using the PutAccessControlRuleRequest method. 3596// req, resp := client.PutAccessControlRuleRequest(params) 3597// 3598// err := req.Send() 3599// if err == nil { // resp is now filled 3600// fmt.Println(resp) 3601// } 3602// 3603// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/PutAccessControlRule 3604func (c *WorkMail) PutAccessControlRuleRequest(input *PutAccessControlRuleInput) (req *request.Request, output *PutAccessControlRuleOutput) { 3605 op := &request.Operation{ 3606 Name: opPutAccessControlRule, 3607 HTTPMethod: "POST", 3608 HTTPPath: "/", 3609 } 3610 3611 if input == nil { 3612 input = &PutAccessControlRuleInput{} 3613 } 3614 3615 output = &PutAccessControlRuleOutput{} 3616 req = c.newRequest(op, input, output) 3617 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3618 return 3619} 3620 3621// PutAccessControlRule API operation for Amazon WorkMail. 3622// 3623// Adds a new access control rule for the specified organization. The rule allows 3624// or denies access to the organization for the specified IPv4 addresses, access 3625// protocol actions, and user IDs. Adding a new rule with the same name as an 3626// existing rule replaces the older rule. 3627// 3628// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3629// with awserr.Error's Code and Message methods to get detailed information about 3630// the error. 3631// 3632// See the AWS API reference guide for Amazon WorkMail's 3633// API operation PutAccessControlRule for usage and error information. 3634// 3635// Returned Error Types: 3636// * LimitExceededException 3637// The request exceeds the limit of the resource. 3638// 3639// * InvalidParameterException 3640// One or more of the input parameters don't match the service's restrictions. 3641// 3642// * EntityNotFoundException 3643// The identifier supplied for the user, group, or resource does not exist in 3644// your organization. 3645// 3646// * OrganizationNotFoundException 3647// An operation received a valid organization identifier that either doesn't 3648// belong or exist in the system. 3649// 3650// * OrganizationStateException 3651// The organization must have a valid state (Active or Synchronizing) to perform 3652// certain operations on the organization or its members. 3653// 3654// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/PutAccessControlRule 3655func (c *WorkMail) PutAccessControlRule(input *PutAccessControlRuleInput) (*PutAccessControlRuleOutput, error) { 3656 req, out := c.PutAccessControlRuleRequest(input) 3657 return out, req.Send() 3658} 3659 3660// PutAccessControlRuleWithContext is the same as PutAccessControlRule with the addition of 3661// the ability to pass a context and additional request options. 3662// 3663// See PutAccessControlRule for details on how to use this API operation. 3664// 3665// The context must be non-nil and will be used for request cancellation. If 3666// the context is nil a panic will occur. In the future the SDK may create 3667// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3668// for more information on using Contexts. 3669func (c *WorkMail) PutAccessControlRuleWithContext(ctx aws.Context, input *PutAccessControlRuleInput, opts ...request.Option) (*PutAccessControlRuleOutput, error) { 3670 req, out := c.PutAccessControlRuleRequest(input) 3671 req.SetContext(ctx) 3672 req.ApplyOptions(opts...) 3673 return out, req.Send() 3674} 3675 3676const opPutMailboxPermissions = "PutMailboxPermissions" 3677 3678// PutMailboxPermissionsRequest generates a "aws/request.Request" representing the 3679// client's request for the PutMailboxPermissions operation. The "output" return 3680// value will be populated with the request's response once the request completes 3681// successfully. 3682// 3683// Use "Send" method on the returned Request to send the API call to the service. 3684// the "output" return value is not valid until after Send returns without error. 3685// 3686// See PutMailboxPermissions for more information on using the PutMailboxPermissions 3687// API call, and error handling. 3688// 3689// This method is useful when you want to inject custom logic or configuration 3690// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3691// 3692// 3693// // Example sending a request using the PutMailboxPermissionsRequest method. 3694// req, resp := client.PutMailboxPermissionsRequest(params) 3695// 3696// err := req.Send() 3697// if err == nil { // resp is now filled 3698// fmt.Println(resp) 3699// } 3700// 3701// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/PutMailboxPermissions 3702func (c *WorkMail) PutMailboxPermissionsRequest(input *PutMailboxPermissionsInput) (req *request.Request, output *PutMailboxPermissionsOutput) { 3703 op := &request.Operation{ 3704 Name: opPutMailboxPermissions, 3705 HTTPMethod: "POST", 3706 HTTPPath: "/", 3707 } 3708 3709 if input == nil { 3710 input = &PutMailboxPermissionsInput{} 3711 } 3712 3713 output = &PutMailboxPermissionsOutput{} 3714 req = c.newRequest(op, input, output) 3715 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3716 return 3717} 3718 3719// PutMailboxPermissions API operation for Amazon WorkMail. 3720// 3721// Sets permissions for a user, group, or resource. This replaces any pre-existing 3722// permissions. 3723// 3724// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3725// with awserr.Error's Code and Message methods to get detailed information about 3726// the error. 3727// 3728// See the AWS API reference guide for Amazon WorkMail's 3729// API operation PutMailboxPermissions for usage and error information. 3730// 3731// Returned Error Types: 3732// * EntityNotFoundException 3733// The identifier supplied for the user, group, or resource does not exist in 3734// your organization. 3735// 3736// * EntityStateException 3737// You are performing an operation on a user, group, or resource that isn't 3738// in the expected state, such as trying to delete an active user. 3739// 3740// * InvalidParameterException 3741// One or more of the input parameters don't match the service's restrictions. 3742// 3743// * OrganizationNotFoundException 3744// An operation received a valid organization identifier that either doesn't 3745// belong or exist in the system. 3746// 3747// * OrganizationStateException 3748// The organization must have a valid state (Active or Synchronizing) to perform 3749// certain operations on the organization or its members. 3750// 3751// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/PutMailboxPermissions 3752func (c *WorkMail) PutMailboxPermissions(input *PutMailboxPermissionsInput) (*PutMailboxPermissionsOutput, error) { 3753 req, out := c.PutMailboxPermissionsRequest(input) 3754 return out, req.Send() 3755} 3756 3757// PutMailboxPermissionsWithContext is the same as PutMailboxPermissions with the addition of 3758// the ability to pass a context and additional request options. 3759// 3760// See PutMailboxPermissions for details on how to use this API operation. 3761// 3762// The context must be non-nil and will be used for request cancellation. If 3763// the context is nil a panic will occur. In the future the SDK may create 3764// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3765// for more information on using Contexts. 3766func (c *WorkMail) PutMailboxPermissionsWithContext(ctx aws.Context, input *PutMailboxPermissionsInput, opts ...request.Option) (*PutMailboxPermissionsOutput, error) { 3767 req, out := c.PutMailboxPermissionsRequest(input) 3768 req.SetContext(ctx) 3769 req.ApplyOptions(opts...) 3770 return out, req.Send() 3771} 3772 3773const opPutRetentionPolicy = "PutRetentionPolicy" 3774 3775// PutRetentionPolicyRequest generates a "aws/request.Request" representing the 3776// client's request for the PutRetentionPolicy operation. The "output" return 3777// value will be populated with the request's response once the request completes 3778// successfully. 3779// 3780// Use "Send" method on the returned Request to send the API call to the service. 3781// the "output" return value is not valid until after Send returns without error. 3782// 3783// See PutRetentionPolicy for more information on using the PutRetentionPolicy 3784// API call, and error handling. 3785// 3786// This method is useful when you want to inject custom logic or configuration 3787// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3788// 3789// 3790// // Example sending a request using the PutRetentionPolicyRequest method. 3791// req, resp := client.PutRetentionPolicyRequest(params) 3792// 3793// err := req.Send() 3794// if err == nil { // resp is now filled 3795// fmt.Println(resp) 3796// } 3797// 3798// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/PutRetentionPolicy 3799func (c *WorkMail) PutRetentionPolicyRequest(input *PutRetentionPolicyInput) (req *request.Request, output *PutRetentionPolicyOutput) { 3800 op := &request.Operation{ 3801 Name: opPutRetentionPolicy, 3802 HTTPMethod: "POST", 3803 HTTPPath: "/", 3804 } 3805 3806 if input == nil { 3807 input = &PutRetentionPolicyInput{} 3808 } 3809 3810 output = &PutRetentionPolicyOutput{} 3811 req = c.newRequest(op, input, output) 3812 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3813 return 3814} 3815 3816// PutRetentionPolicy API operation for Amazon WorkMail. 3817// 3818// Puts a retention policy to the specified organization. 3819// 3820// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3821// with awserr.Error's Code and Message methods to get detailed information about 3822// the error. 3823// 3824// See the AWS API reference guide for Amazon WorkMail's 3825// API operation PutRetentionPolicy for usage and error information. 3826// 3827// Returned Error Types: 3828// * InvalidParameterException 3829// One or more of the input parameters don't match the service's restrictions. 3830// 3831// * OrganizationNotFoundException 3832// An operation received a valid organization identifier that either doesn't 3833// belong or exist in the system. 3834// 3835// * OrganizationStateException 3836// The organization must have a valid state (Active or Synchronizing) to perform 3837// certain operations on the organization or its members. 3838// 3839// * LimitExceededException 3840// The request exceeds the limit of the resource. 3841// 3842// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/PutRetentionPolicy 3843func (c *WorkMail) PutRetentionPolicy(input *PutRetentionPolicyInput) (*PutRetentionPolicyOutput, error) { 3844 req, out := c.PutRetentionPolicyRequest(input) 3845 return out, req.Send() 3846} 3847 3848// PutRetentionPolicyWithContext is the same as PutRetentionPolicy with the addition of 3849// the ability to pass a context and additional request options. 3850// 3851// See PutRetentionPolicy for details on how to use this API operation. 3852// 3853// The context must be non-nil and will be used for request cancellation. If 3854// the context is nil a panic will occur. In the future the SDK may create 3855// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3856// for more information on using Contexts. 3857func (c *WorkMail) PutRetentionPolicyWithContext(ctx aws.Context, input *PutRetentionPolicyInput, opts ...request.Option) (*PutRetentionPolicyOutput, error) { 3858 req, out := c.PutRetentionPolicyRequest(input) 3859 req.SetContext(ctx) 3860 req.ApplyOptions(opts...) 3861 return out, req.Send() 3862} 3863 3864const opRegisterToWorkMail = "RegisterToWorkMail" 3865 3866// RegisterToWorkMailRequest generates a "aws/request.Request" representing the 3867// client's request for the RegisterToWorkMail operation. The "output" return 3868// value will be populated with the request's response once the request completes 3869// successfully. 3870// 3871// Use "Send" method on the returned Request to send the API call to the service. 3872// the "output" return value is not valid until after Send returns without error. 3873// 3874// See RegisterToWorkMail for more information on using the RegisterToWorkMail 3875// API call, and error handling. 3876// 3877// This method is useful when you want to inject custom logic or configuration 3878// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3879// 3880// 3881// // Example sending a request using the RegisterToWorkMailRequest method. 3882// req, resp := client.RegisterToWorkMailRequest(params) 3883// 3884// err := req.Send() 3885// if err == nil { // resp is now filled 3886// fmt.Println(resp) 3887// } 3888// 3889// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail 3890func (c *WorkMail) RegisterToWorkMailRequest(input *RegisterToWorkMailInput) (req *request.Request, output *RegisterToWorkMailOutput) { 3891 op := &request.Operation{ 3892 Name: opRegisterToWorkMail, 3893 HTTPMethod: "POST", 3894 HTTPPath: "/", 3895 } 3896 3897 if input == nil { 3898 input = &RegisterToWorkMailInput{} 3899 } 3900 3901 output = &RegisterToWorkMailOutput{} 3902 req = c.newRequest(op, input, output) 3903 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 3904 return 3905} 3906 3907// RegisterToWorkMail API operation for Amazon WorkMail. 3908// 3909// Registers an existing and disabled user, group, or resource for Amazon WorkMail 3910// use by associating a mailbox and calendaring capabilities. It performs no 3911// change if the user, group, or resource is enabled and fails if the user, 3912// group, or resource is deleted. This operation results in the accumulation 3913// of costs. For more information, see Pricing (https://aws.amazon.com/workmail/pricing). 3914// The equivalent console functionality for this operation is Enable. 3915// 3916// Users can either be created by calling the CreateUser API operation or they 3917// can be synchronized from your directory. For more information, see DeregisterFromWorkMail. 3918// 3919// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3920// with awserr.Error's Code and Message methods to get detailed information about 3921// the error. 3922// 3923// See the AWS API reference guide for Amazon WorkMail's 3924// API operation RegisterToWorkMail for usage and error information. 3925// 3926// Returned Error Types: 3927// * DirectoryServiceAuthenticationFailedException 3928// The directory service doesn't recognize the credentials supplied by WorkMail. 3929// 3930// * DirectoryUnavailableException 3931// The directory on which you are trying to perform operations isn't available. 3932// 3933// * EmailAddressInUseException 3934// The email address that you're trying to assign is already created for a different 3935// user, group, or resource. 3936// 3937// * EntityNotFoundException 3938// The identifier supplied for the user, group, or resource does not exist in 3939// your organization. 3940// 3941// * EntityStateException 3942// You are performing an operation on a user, group, or resource that isn't 3943// in the expected state, such as trying to delete an active user. 3944// 3945// * EntityAlreadyRegisteredException 3946// The user, group, or resource that you're trying to register is already registered. 3947// 3948// * InvalidParameterException 3949// One or more of the input parameters don't match the service's restrictions. 3950// 3951// * MailDomainNotFoundException 3952// For an email or alias to be created in Amazon WorkMail, the included domain 3953// must be defined in the organization. 3954// 3955// * MailDomainStateException 3956// After a domain has been added to the organization, it must be verified. The 3957// domain is not yet verified. 3958// 3959// * OrganizationNotFoundException 3960// An operation received a valid organization identifier that either doesn't 3961// belong or exist in the system. 3962// 3963// * OrganizationStateException 3964// The organization must have a valid state (Active or Synchronizing) to perform 3965// certain operations on the organization or its members. 3966// 3967// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterToWorkMail 3968func (c *WorkMail) RegisterToWorkMail(input *RegisterToWorkMailInput) (*RegisterToWorkMailOutput, error) { 3969 req, out := c.RegisterToWorkMailRequest(input) 3970 return out, req.Send() 3971} 3972 3973// RegisterToWorkMailWithContext is the same as RegisterToWorkMail with the addition of 3974// the ability to pass a context and additional request options. 3975// 3976// See RegisterToWorkMail for details on how to use this API operation. 3977// 3978// The context must be non-nil and will be used for request cancellation. If 3979// the context is nil a panic will occur. In the future the SDK may create 3980// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3981// for more information on using Contexts. 3982func (c *WorkMail) RegisterToWorkMailWithContext(ctx aws.Context, input *RegisterToWorkMailInput, opts ...request.Option) (*RegisterToWorkMailOutput, error) { 3983 req, out := c.RegisterToWorkMailRequest(input) 3984 req.SetContext(ctx) 3985 req.ApplyOptions(opts...) 3986 return out, req.Send() 3987} 3988 3989const opResetPassword = "ResetPassword" 3990 3991// ResetPasswordRequest generates a "aws/request.Request" representing the 3992// client's request for the ResetPassword operation. The "output" return 3993// value will be populated with the request's response once the request completes 3994// successfully. 3995// 3996// Use "Send" method on the returned Request to send the API call to the service. 3997// the "output" return value is not valid until after Send returns without error. 3998// 3999// See ResetPassword for more information on using the ResetPassword 4000// API call, and error handling. 4001// 4002// This method is useful when you want to inject custom logic or configuration 4003// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4004// 4005// 4006// // Example sending a request using the ResetPasswordRequest method. 4007// req, resp := client.ResetPasswordRequest(params) 4008// 4009// err := req.Send() 4010// if err == nil { // resp is now filled 4011// fmt.Println(resp) 4012// } 4013// 4014// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ResetPassword 4015func (c *WorkMail) ResetPasswordRequest(input *ResetPasswordInput) (req *request.Request, output *ResetPasswordOutput) { 4016 op := &request.Operation{ 4017 Name: opResetPassword, 4018 HTTPMethod: "POST", 4019 HTTPPath: "/", 4020 } 4021 4022 if input == nil { 4023 input = &ResetPasswordInput{} 4024 } 4025 4026 output = &ResetPasswordOutput{} 4027 req = c.newRequest(op, input, output) 4028 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4029 return 4030} 4031 4032// ResetPassword API operation for Amazon WorkMail. 4033// 4034// Allows the administrator to reset the password for a user. 4035// 4036// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4037// with awserr.Error's Code and Message methods to get detailed information about 4038// the error. 4039// 4040// See the AWS API reference guide for Amazon WorkMail's 4041// API operation ResetPassword for usage and error information. 4042// 4043// Returned Error Types: 4044// * DirectoryServiceAuthenticationFailedException 4045// The directory service doesn't recognize the credentials supplied by WorkMail. 4046// 4047// * DirectoryUnavailableException 4048// The directory on which you are trying to perform operations isn't available. 4049// 4050// * EntityNotFoundException 4051// The identifier supplied for the user, group, or resource does not exist in 4052// your organization. 4053// 4054// * EntityStateException 4055// You are performing an operation on a user, group, or resource that isn't 4056// in the expected state, such as trying to delete an active user. 4057// 4058// * InvalidParameterException 4059// One or more of the input parameters don't match the service's restrictions. 4060// 4061// * InvalidPasswordException 4062// The supplied password doesn't match the minimum security constraints, such 4063// as length or use of special characters. 4064// 4065// * OrganizationNotFoundException 4066// An operation received a valid organization identifier that either doesn't 4067// belong or exist in the system. 4068// 4069// * OrganizationStateException 4070// The organization must have a valid state (Active or Synchronizing) to perform 4071// certain operations on the organization or its members. 4072// 4073// * UnsupportedOperationException 4074// You can't perform a write operation against a read-only directory. 4075// 4076// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/ResetPassword 4077func (c *WorkMail) ResetPassword(input *ResetPasswordInput) (*ResetPasswordOutput, error) { 4078 req, out := c.ResetPasswordRequest(input) 4079 return out, req.Send() 4080} 4081 4082// ResetPasswordWithContext is the same as ResetPassword with the addition of 4083// the ability to pass a context and additional request options. 4084// 4085// See ResetPassword for details on how to use this API operation. 4086// 4087// The context must be non-nil and will be used for request cancellation. If 4088// the context is nil a panic will occur. In the future the SDK may create 4089// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4090// for more information on using Contexts. 4091func (c *WorkMail) ResetPasswordWithContext(ctx aws.Context, input *ResetPasswordInput, opts ...request.Option) (*ResetPasswordOutput, error) { 4092 req, out := c.ResetPasswordRequest(input) 4093 req.SetContext(ctx) 4094 req.ApplyOptions(opts...) 4095 return out, req.Send() 4096} 4097 4098const opTagResource = "TagResource" 4099 4100// TagResourceRequest generates a "aws/request.Request" representing the 4101// client's request for the TagResource operation. The "output" return 4102// value will be populated with the request's response once the request completes 4103// successfully. 4104// 4105// Use "Send" method on the returned Request to send the API call to the service. 4106// the "output" return value is not valid until after Send returns without error. 4107// 4108// See TagResource for more information on using the TagResource 4109// API call, and error handling. 4110// 4111// This method is useful when you want to inject custom logic or configuration 4112// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4113// 4114// 4115// // Example sending a request using the TagResourceRequest method. 4116// req, resp := client.TagResourceRequest(params) 4117// 4118// err := req.Send() 4119// if err == nil { // resp is now filled 4120// fmt.Println(resp) 4121// } 4122// 4123// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/TagResource 4124func (c *WorkMail) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 4125 op := &request.Operation{ 4126 Name: opTagResource, 4127 HTTPMethod: "POST", 4128 HTTPPath: "/", 4129 } 4130 4131 if input == nil { 4132 input = &TagResourceInput{} 4133 } 4134 4135 output = &TagResourceOutput{} 4136 req = c.newRequest(op, input, output) 4137 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4138 return 4139} 4140 4141// TagResource API operation for Amazon WorkMail. 4142// 4143// Applies the specified tags to the specified Amazon WorkMail organization 4144// resource. 4145// 4146// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4147// with awserr.Error's Code and Message methods to get detailed information about 4148// the error. 4149// 4150// See the AWS API reference guide for Amazon WorkMail's 4151// API operation TagResource for usage and error information. 4152// 4153// Returned Error Types: 4154// * ResourceNotFoundException 4155// The resource cannot be found. 4156// 4157// * TooManyTagsException 4158// The resource can have up to 50 user-applied tags. 4159// 4160// * OrganizationStateException 4161// The organization must have a valid state (Active or Synchronizing) to perform 4162// certain operations on the organization or its members. 4163// 4164// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/TagResource 4165func (c *WorkMail) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 4166 req, out := c.TagResourceRequest(input) 4167 return out, req.Send() 4168} 4169 4170// TagResourceWithContext is the same as TagResource with the addition of 4171// the ability to pass a context and additional request options. 4172// 4173// See TagResource for details on how to use this API operation. 4174// 4175// The context must be non-nil and will be used for request cancellation. If 4176// the context is nil a panic will occur. In the future the SDK may create 4177// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4178// for more information on using Contexts. 4179func (c *WorkMail) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 4180 req, out := c.TagResourceRequest(input) 4181 req.SetContext(ctx) 4182 req.ApplyOptions(opts...) 4183 return out, req.Send() 4184} 4185 4186const opUntagResource = "UntagResource" 4187 4188// UntagResourceRequest generates a "aws/request.Request" representing the 4189// client's request for the UntagResource operation. The "output" return 4190// value will be populated with the request's response once the request completes 4191// successfully. 4192// 4193// Use "Send" method on the returned Request to send the API call to the service. 4194// the "output" return value is not valid until after Send returns without error. 4195// 4196// See UntagResource for more information on using the UntagResource 4197// API call, and error handling. 4198// 4199// This method is useful when you want to inject custom logic or configuration 4200// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4201// 4202// 4203// // Example sending a request using the UntagResourceRequest method. 4204// req, resp := client.UntagResourceRequest(params) 4205// 4206// err := req.Send() 4207// if err == nil { // resp is now filled 4208// fmt.Println(resp) 4209// } 4210// 4211// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UntagResource 4212func (c *WorkMail) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 4213 op := &request.Operation{ 4214 Name: opUntagResource, 4215 HTTPMethod: "POST", 4216 HTTPPath: "/", 4217 } 4218 4219 if input == nil { 4220 input = &UntagResourceInput{} 4221 } 4222 4223 output = &UntagResourceOutput{} 4224 req = c.newRequest(op, input, output) 4225 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4226 return 4227} 4228 4229// UntagResource API operation for Amazon WorkMail. 4230// 4231// Untags the specified tags from the specified Amazon WorkMail organization 4232// resource. 4233// 4234// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4235// with awserr.Error's Code and Message methods to get detailed information about 4236// the error. 4237// 4238// See the AWS API reference guide for Amazon WorkMail's 4239// API operation UntagResource for usage and error information. 4240// 4241// Returned Error Types: 4242// * ResourceNotFoundException 4243// The resource cannot be found. 4244// 4245// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UntagResource 4246func (c *WorkMail) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 4247 req, out := c.UntagResourceRequest(input) 4248 return out, req.Send() 4249} 4250 4251// UntagResourceWithContext is the same as UntagResource with the addition of 4252// the ability to pass a context and additional request options. 4253// 4254// See UntagResource for details on how to use this API operation. 4255// 4256// The context must be non-nil and will be used for request cancellation. If 4257// the context is nil a panic will occur. In the future the SDK may create 4258// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4259// for more information on using Contexts. 4260func (c *WorkMail) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 4261 req, out := c.UntagResourceRequest(input) 4262 req.SetContext(ctx) 4263 req.ApplyOptions(opts...) 4264 return out, req.Send() 4265} 4266 4267const opUpdateMailboxQuota = "UpdateMailboxQuota" 4268 4269// UpdateMailboxQuotaRequest generates a "aws/request.Request" representing the 4270// client's request for the UpdateMailboxQuota operation. The "output" return 4271// value will be populated with the request's response once the request completes 4272// successfully. 4273// 4274// Use "Send" method on the returned Request to send the API call to the service. 4275// the "output" return value is not valid until after Send returns without error. 4276// 4277// See UpdateMailboxQuota for more information on using the UpdateMailboxQuota 4278// API call, and error handling. 4279// 4280// This method is useful when you want to inject custom logic or configuration 4281// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4282// 4283// 4284// // Example sending a request using the UpdateMailboxQuotaRequest method. 4285// req, resp := client.UpdateMailboxQuotaRequest(params) 4286// 4287// err := req.Send() 4288// if err == nil { // resp is now filled 4289// fmt.Println(resp) 4290// } 4291// 4292// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdateMailboxQuota 4293func (c *WorkMail) UpdateMailboxQuotaRequest(input *UpdateMailboxQuotaInput) (req *request.Request, output *UpdateMailboxQuotaOutput) { 4294 op := &request.Operation{ 4295 Name: opUpdateMailboxQuota, 4296 HTTPMethod: "POST", 4297 HTTPPath: "/", 4298 } 4299 4300 if input == nil { 4301 input = &UpdateMailboxQuotaInput{} 4302 } 4303 4304 output = &UpdateMailboxQuotaOutput{} 4305 req = c.newRequest(op, input, output) 4306 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4307 return 4308} 4309 4310// UpdateMailboxQuota API operation for Amazon WorkMail. 4311// 4312// Updates a user's current mailbox quota for a specified organization and user. 4313// 4314// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4315// with awserr.Error's Code and Message methods to get detailed information about 4316// the error. 4317// 4318// See the AWS API reference guide for Amazon WorkMail's 4319// API operation UpdateMailboxQuota for usage and error information. 4320// 4321// Returned Error Types: 4322// * InvalidParameterException 4323// One or more of the input parameters don't match the service's restrictions. 4324// 4325// * OrganizationNotFoundException 4326// An operation received a valid organization identifier that either doesn't 4327// belong or exist in the system. 4328// 4329// * OrganizationStateException 4330// The organization must have a valid state (Active or Synchronizing) to perform 4331// certain operations on the organization or its members. 4332// 4333// * EntityNotFoundException 4334// The identifier supplied for the user, group, or resource does not exist in 4335// your organization. 4336// 4337// * EntityStateException 4338// You are performing an operation on a user, group, or resource that isn't 4339// in the expected state, such as trying to delete an active user. 4340// 4341// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdateMailboxQuota 4342func (c *WorkMail) UpdateMailboxQuota(input *UpdateMailboxQuotaInput) (*UpdateMailboxQuotaOutput, error) { 4343 req, out := c.UpdateMailboxQuotaRequest(input) 4344 return out, req.Send() 4345} 4346 4347// UpdateMailboxQuotaWithContext is the same as UpdateMailboxQuota with the addition of 4348// the ability to pass a context and additional request options. 4349// 4350// See UpdateMailboxQuota for details on how to use this API operation. 4351// 4352// The context must be non-nil and will be used for request cancellation. If 4353// the context is nil a panic will occur. In the future the SDK may create 4354// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4355// for more information on using Contexts. 4356func (c *WorkMail) UpdateMailboxQuotaWithContext(ctx aws.Context, input *UpdateMailboxQuotaInput, opts ...request.Option) (*UpdateMailboxQuotaOutput, error) { 4357 req, out := c.UpdateMailboxQuotaRequest(input) 4358 req.SetContext(ctx) 4359 req.ApplyOptions(opts...) 4360 return out, req.Send() 4361} 4362 4363const opUpdatePrimaryEmailAddress = "UpdatePrimaryEmailAddress" 4364 4365// UpdatePrimaryEmailAddressRequest generates a "aws/request.Request" representing the 4366// client's request for the UpdatePrimaryEmailAddress operation. The "output" return 4367// value will be populated with the request's response once the request completes 4368// successfully. 4369// 4370// Use "Send" method on the returned Request to send the API call to the service. 4371// the "output" return value is not valid until after Send returns without error. 4372// 4373// See UpdatePrimaryEmailAddress for more information on using the UpdatePrimaryEmailAddress 4374// API call, and error handling. 4375// 4376// This method is useful when you want to inject custom logic or configuration 4377// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4378// 4379// 4380// // Example sending a request using the UpdatePrimaryEmailAddressRequest method. 4381// req, resp := client.UpdatePrimaryEmailAddressRequest(params) 4382// 4383// err := req.Send() 4384// if err == nil { // resp is now filled 4385// fmt.Println(resp) 4386// } 4387// 4388// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdatePrimaryEmailAddress 4389func (c *WorkMail) UpdatePrimaryEmailAddressRequest(input *UpdatePrimaryEmailAddressInput) (req *request.Request, output *UpdatePrimaryEmailAddressOutput) { 4390 op := &request.Operation{ 4391 Name: opUpdatePrimaryEmailAddress, 4392 HTTPMethod: "POST", 4393 HTTPPath: "/", 4394 } 4395 4396 if input == nil { 4397 input = &UpdatePrimaryEmailAddressInput{} 4398 } 4399 4400 output = &UpdatePrimaryEmailAddressOutput{} 4401 req = c.newRequest(op, input, output) 4402 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4403 return 4404} 4405 4406// UpdatePrimaryEmailAddress API operation for Amazon WorkMail. 4407// 4408// Updates the primary email for a user, group, or resource. The current email 4409// is moved into the list of aliases (or swapped between an existing alias and 4410// the current primary email), and the email provided in the input is promoted 4411// as the primary. 4412// 4413// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4414// with awserr.Error's Code and Message methods to get detailed information about 4415// the error. 4416// 4417// See the AWS API reference guide for Amazon WorkMail's 4418// API operation UpdatePrimaryEmailAddress for usage and error information. 4419// 4420// Returned Error Types: 4421// * DirectoryServiceAuthenticationFailedException 4422// The directory service doesn't recognize the credentials supplied by WorkMail. 4423// 4424// * DirectoryUnavailableException 4425// The directory on which you are trying to perform operations isn't available. 4426// 4427// * EmailAddressInUseException 4428// The email address that you're trying to assign is already created for a different 4429// user, group, or resource. 4430// 4431// * EntityNotFoundException 4432// The identifier supplied for the user, group, or resource does not exist in 4433// your organization. 4434// 4435// * EntityStateException 4436// You are performing an operation on a user, group, or resource that isn't 4437// in the expected state, such as trying to delete an active user. 4438// 4439// * InvalidParameterException 4440// One or more of the input parameters don't match the service's restrictions. 4441// 4442// * MailDomainNotFoundException 4443// For an email or alias to be created in Amazon WorkMail, the included domain 4444// must be defined in the organization. 4445// 4446// * MailDomainStateException 4447// After a domain has been added to the organization, it must be verified. The 4448// domain is not yet verified. 4449// 4450// * InvalidParameterException 4451// One or more of the input parameters don't match the service's restrictions. 4452// 4453// * OrganizationNotFoundException 4454// An operation received a valid organization identifier that either doesn't 4455// belong or exist in the system. 4456// 4457// * OrganizationStateException 4458// The organization must have a valid state (Active or Synchronizing) to perform 4459// certain operations on the organization or its members. 4460// 4461// * UnsupportedOperationException 4462// You can't perform a write operation against a read-only directory. 4463// 4464// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdatePrimaryEmailAddress 4465func (c *WorkMail) UpdatePrimaryEmailAddress(input *UpdatePrimaryEmailAddressInput) (*UpdatePrimaryEmailAddressOutput, error) { 4466 req, out := c.UpdatePrimaryEmailAddressRequest(input) 4467 return out, req.Send() 4468} 4469 4470// UpdatePrimaryEmailAddressWithContext is the same as UpdatePrimaryEmailAddress with the addition of 4471// the ability to pass a context and additional request options. 4472// 4473// See UpdatePrimaryEmailAddress for details on how to use this API operation. 4474// 4475// The context must be non-nil and will be used for request cancellation. If 4476// the context is nil a panic will occur. In the future the SDK may create 4477// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4478// for more information on using Contexts. 4479func (c *WorkMail) UpdatePrimaryEmailAddressWithContext(ctx aws.Context, input *UpdatePrimaryEmailAddressInput, opts ...request.Option) (*UpdatePrimaryEmailAddressOutput, error) { 4480 req, out := c.UpdatePrimaryEmailAddressRequest(input) 4481 req.SetContext(ctx) 4482 req.ApplyOptions(opts...) 4483 return out, req.Send() 4484} 4485 4486const opUpdateResource = "UpdateResource" 4487 4488// UpdateResourceRequest generates a "aws/request.Request" representing the 4489// client's request for the UpdateResource operation. The "output" return 4490// value will be populated with the request's response once the request completes 4491// successfully. 4492// 4493// Use "Send" method on the returned Request to send the API call to the service. 4494// the "output" return value is not valid until after Send returns without error. 4495// 4496// See UpdateResource for more information on using the UpdateResource 4497// API call, and error handling. 4498// 4499// This method is useful when you want to inject custom logic or configuration 4500// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4501// 4502// 4503// // Example sending a request using the UpdateResourceRequest method. 4504// req, resp := client.UpdateResourceRequest(params) 4505// 4506// err := req.Send() 4507// if err == nil { // resp is now filled 4508// fmt.Println(resp) 4509// } 4510// 4511// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdateResource 4512func (c *WorkMail) UpdateResourceRequest(input *UpdateResourceInput) (req *request.Request, output *UpdateResourceOutput) { 4513 op := &request.Operation{ 4514 Name: opUpdateResource, 4515 HTTPMethod: "POST", 4516 HTTPPath: "/", 4517 } 4518 4519 if input == nil { 4520 input = &UpdateResourceInput{} 4521 } 4522 4523 output = &UpdateResourceOutput{} 4524 req = c.newRequest(op, input, output) 4525 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4526 return 4527} 4528 4529// UpdateResource API operation for Amazon WorkMail. 4530// 4531// Updates data for the resource. To have the latest information, it must be 4532// preceded by a DescribeResource call. The dataset in the request should be 4533// the one expected when performing another DescribeResource call. 4534// 4535// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4536// with awserr.Error's Code and Message methods to get detailed information about 4537// the error. 4538// 4539// See the AWS API reference guide for Amazon WorkMail's 4540// API operation UpdateResource for usage and error information. 4541// 4542// Returned Error Types: 4543// * DirectoryUnavailableException 4544// The directory on which you are trying to perform operations isn't available. 4545// 4546// * EntityNotFoundException 4547// The identifier supplied for the user, group, or resource does not exist in 4548// your organization. 4549// 4550// * EntityStateException 4551// You are performing an operation on a user, group, or resource that isn't 4552// in the expected state, such as trying to delete an active user. 4553// 4554// * InvalidConfigurationException 4555// The configuration for a resource isn't valid. A resource must either be able 4556// to auto-respond to requests or have at least one delegate associated that 4557// can do so on its behalf. 4558// 4559// * EmailAddressInUseException 4560// The email address that you're trying to assign is already created for a different 4561// user, group, or resource. 4562// 4563// * MailDomainNotFoundException 4564// For an email or alias to be created in Amazon WorkMail, the included domain 4565// must be defined in the organization. 4566// 4567// * MailDomainStateException 4568// After a domain has been added to the organization, it must be verified. The 4569// domain is not yet verified. 4570// 4571// * NameAvailabilityException 4572// The user, group, or resource name isn't unique in Amazon WorkMail. 4573// 4574// * OrganizationNotFoundException 4575// An operation received a valid organization identifier that either doesn't 4576// belong or exist in the system. 4577// 4578// * OrganizationStateException 4579// The organization must have a valid state (Active or Synchronizing) to perform 4580// certain operations on the organization or its members. 4581// 4582// See also, https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/UpdateResource 4583func (c *WorkMail) UpdateResource(input *UpdateResourceInput) (*UpdateResourceOutput, error) { 4584 req, out := c.UpdateResourceRequest(input) 4585 return out, req.Send() 4586} 4587 4588// UpdateResourceWithContext is the same as UpdateResource with the addition of 4589// the ability to pass a context and additional request options. 4590// 4591// See UpdateResource for details on how to use this API operation. 4592// 4593// The context must be non-nil and will be used for request cancellation. If 4594// the context is nil a panic will occur. In the future the SDK may create 4595// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4596// for more information on using Contexts. 4597func (c *WorkMail) UpdateResourceWithContext(ctx aws.Context, input *UpdateResourceInput, opts ...request.Option) (*UpdateResourceOutput, error) { 4598 req, out := c.UpdateResourceRequest(input) 4599 req.SetContext(ctx) 4600 req.ApplyOptions(opts...) 4601 return out, req.Send() 4602} 4603 4604// A rule that controls access to an Amazon WorkMail organization. 4605type AccessControlRule struct { 4606 _ struct{} `type:"structure"` 4607 4608 // Access protocol actions to include in the rule. Valid values include ActiveSync, 4609 // AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, and WebMail. 4610 Actions []*string `type:"list"` 4611 4612 // The date that the rule was created. 4613 DateCreated *time.Time `type:"timestamp"` 4614 4615 // The date that the rule was modified. 4616 DateModified *time.Time `type:"timestamp"` 4617 4618 // The rule description. 4619 Description *string `type:"string"` 4620 4621 // The rule effect. 4622 Effect *string `type:"string" enum:"AccessControlRuleEffect"` 4623 4624 // IPv4 CIDR ranges to include in the rule. 4625 IpRanges []*string `type:"list"` 4626 4627 // The rule name. 4628 Name *string `min:"1" type:"string"` 4629 4630 // Access protocol actions to exclude from the rule. Valid values include ActiveSync, 4631 // AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, and WebMail. 4632 NotActions []*string `type:"list"` 4633 4634 // IPv4 CIDR ranges to exclude from the rule. 4635 NotIpRanges []*string `type:"list"` 4636 4637 // User IDs to exclude from the rule. 4638 NotUserIds []*string `type:"list"` 4639 4640 // User IDs to include in the rule. 4641 UserIds []*string `type:"list"` 4642} 4643 4644// String returns the string representation 4645func (s AccessControlRule) String() string { 4646 return awsutil.Prettify(s) 4647} 4648 4649// GoString returns the string representation 4650func (s AccessControlRule) GoString() string { 4651 return s.String() 4652} 4653 4654// SetActions sets the Actions field's value. 4655func (s *AccessControlRule) SetActions(v []*string) *AccessControlRule { 4656 s.Actions = v 4657 return s 4658} 4659 4660// SetDateCreated sets the DateCreated field's value. 4661func (s *AccessControlRule) SetDateCreated(v time.Time) *AccessControlRule { 4662 s.DateCreated = &v 4663 return s 4664} 4665 4666// SetDateModified sets the DateModified field's value. 4667func (s *AccessControlRule) SetDateModified(v time.Time) *AccessControlRule { 4668 s.DateModified = &v 4669 return s 4670} 4671 4672// SetDescription sets the Description field's value. 4673func (s *AccessControlRule) SetDescription(v string) *AccessControlRule { 4674 s.Description = &v 4675 return s 4676} 4677 4678// SetEffect sets the Effect field's value. 4679func (s *AccessControlRule) SetEffect(v string) *AccessControlRule { 4680 s.Effect = &v 4681 return s 4682} 4683 4684// SetIpRanges sets the IpRanges field's value. 4685func (s *AccessControlRule) SetIpRanges(v []*string) *AccessControlRule { 4686 s.IpRanges = v 4687 return s 4688} 4689 4690// SetName sets the Name field's value. 4691func (s *AccessControlRule) SetName(v string) *AccessControlRule { 4692 s.Name = &v 4693 return s 4694} 4695 4696// SetNotActions sets the NotActions field's value. 4697func (s *AccessControlRule) SetNotActions(v []*string) *AccessControlRule { 4698 s.NotActions = v 4699 return s 4700} 4701 4702// SetNotIpRanges sets the NotIpRanges field's value. 4703func (s *AccessControlRule) SetNotIpRanges(v []*string) *AccessControlRule { 4704 s.NotIpRanges = v 4705 return s 4706} 4707 4708// SetNotUserIds sets the NotUserIds field's value. 4709func (s *AccessControlRule) SetNotUserIds(v []*string) *AccessControlRule { 4710 s.NotUserIds = v 4711 return s 4712} 4713 4714// SetUserIds sets the UserIds field's value. 4715func (s *AccessControlRule) SetUserIds(v []*string) *AccessControlRule { 4716 s.UserIds = v 4717 return s 4718} 4719 4720type AssociateDelegateToResourceInput struct { 4721 _ struct{} `type:"structure"` 4722 4723 // The member (user or group) to associate to the resource. 4724 // 4725 // EntityId is a required field 4726 EntityId *string `min:"12" type:"string" required:"true"` 4727 4728 // The organization under which the resource exists. 4729 // 4730 // OrganizationId is a required field 4731 OrganizationId *string `type:"string" required:"true"` 4732 4733 // The resource for which members (users or groups) are associated. 4734 // 4735 // ResourceId is a required field 4736 ResourceId *string `type:"string" required:"true"` 4737} 4738 4739// String returns the string representation 4740func (s AssociateDelegateToResourceInput) String() string { 4741 return awsutil.Prettify(s) 4742} 4743 4744// GoString returns the string representation 4745func (s AssociateDelegateToResourceInput) GoString() string { 4746 return s.String() 4747} 4748 4749// Validate inspects the fields of the type to determine if they are valid. 4750func (s *AssociateDelegateToResourceInput) Validate() error { 4751 invalidParams := request.ErrInvalidParams{Context: "AssociateDelegateToResourceInput"} 4752 if s.EntityId == nil { 4753 invalidParams.Add(request.NewErrParamRequired("EntityId")) 4754 } 4755 if s.EntityId != nil && len(*s.EntityId) < 12 { 4756 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 4757 } 4758 if s.OrganizationId == nil { 4759 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 4760 } 4761 if s.ResourceId == nil { 4762 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 4763 } 4764 4765 if invalidParams.Len() > 0 { 4766 return invalidParams 4767 } 4768 return nil 4769} 4770 4771// SetEntityId sets the EntityId field's value. 4772func (s *AssociateDelegateToResourceInput) SetEntityId(v string) *AssociateDelegateToResourceInput { 4773 s.EntityId = &v 4774 return s 4775} 4776 4777// SetOrganizationId sets the OrganizationId field's value. 4778func (s *AssociateDelegateToResourceInput) SetOrganizationId(v string) *AssociateDelegateToResourceInput { 4779 s.OrganizationId = &v 4780 return s 4781} 4782 4783// SetResourceId sets the ResourceId field's value. 4784func (s *AssociateDelegateToResourceInput) SetResourceId(v string) *AssociateDelegateToResourceInput { 4785 s.ResourceId = &v 4786 return s 4787} 4788 4789type AssociateDelegateToResourceOutput struct { 4790 _ struct{} `type:"structure"` 4791} 4792 4793// String returns the string representation 4794func (s AssociateDelegateToResourceOutput) String() string { 4795 return awsutil.Prettify(s) 4796} 4797 4798// GoString returns the string representation 4799func (s AssociateDelegateToResourceOutput) GoString() string { 4800 return s.String() 4801} 4802 4803type AssociateMemberToGroupInput struct { 4804 _ struct{} `type:"structure"` 4805 4806 // The group to which the member (user or group) is associated. 4807 // 4808 // GroupId is a required field 4809 GroupId *string `min:"12" type:"string" required:"true"` 4810 4811 // The member (user or group) to associate to the group. 4812 // 4813 // MemberId is a required field 4814 MemberId *string `min:"12" type:"string" required:"true"` 4815 4816 // The organization under which the group exists. 4817 // 4818 // OrganizationId is a required field 4819 OrganizationId *string `type:"string" required:"true"` 4820} 4821 4822// String returns the string representation 4823func (s AssociateMemberToGroupInput) String() string { 4824 return awsutil.Prettify(s) 4825} 4826 4827// GoString returns the string representation 4828func (s AssociateMemberToGroupInput) GoString() string { 4829 return s.String() 4830} 4831 4832// Validate inspects the fields of the type to determine if they are valid. 4833func (s *AssociateMemberToGroupInput) Validate() error { 4834 invalidParams := request.ErrInvalidParams{Context: "AssociateMemberToGroupInput"} 4835 if s.GroupId == nil { 4836 invalidParams.Add(request.NewErrParamRequired("GroupId")) 4837 } 4838 if s.GroupId != nil && len(*s.GroupId) < 12 { 4839 invalidParams.Add(request.NewErrParamMinLen("GroupId", 12)) 4840 } 4841 if s.MemberId == nil { 4842 invalidParams.Add(request.NewErrParamRequired("MemberId")) 4843 } 4844 if s.MemberId != nil && len(*s.MemberId) < 12 { 4845 invalidParams.Add(request.NewErrParamMinLen("MemberId", 12)) 4846 } 4847 if s.OrganizationId == nil { 4848 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 4849 } 4850 4851 if invalidParams.Len() > 0 { 4852 return invalidParams 4853 } 4854 return nil 4855} 4856 4857// SetGroupId sets the GroupId field's value. 4858func (s *AssociateMemberToGroupInput) SetGroupId(v string) *AssociateMemberToGroupInput { 4859 s.GroupId = &v 4860 return s 4861} 4862 4863// SetMemberId sets the MemberId field's value. 4864func (s *AssociateMemberToGroupInput) SetMemberId(v string) *AssociateMemberToGroupInput { 4865 s.MemberId = &v 4866 return s 4867} 4868 4869// SetOrganizationId sets the OrganizationId field's value. 4870func (s *AssociateMemberToGroupInput) SetOrganizationId(v string) *AssociateMemberToGroupInput { 4871 s.OrganizationId = &v 4872 return s 4873} 4874 4875type AssociateMemberToGroupOutput struct { 4876 _ struct{} `type:"structure"` 4877} 4878 4879// String returns the string representation 4880func (s AssociateMemberToGroupOutput) String() string { 4881 return awsutil.Prettify(s) 4882} 4883 4884// GoString returns the string representation 4885func (s AssociateMemberToGroupOutput) GoString() string { 4886 return s.String() 4887} 4888 4889// At least one delegate must be associated to the resource to disable automatic 4890// replies from the resource. 4891type BookingOptions struct { 4892 _ struct{} `type:"structure"` 4893 4894 // The resource's ability to automatically reply to requests. If disabled, delegates 4895 // must be associated to the resource. 4896 AutoAcceptRequests *bool `type:"boolean"` 4897 4898 // The resource's ability to automatically decline any conflicting requests. 4899 AutoDeclineConflictingRequests *bool `type:"boolean"` 4900 4901 // The resource's ability to automatically decline any recurring requests. 4902 AutoDeclineRecurringRequests *bool `type:"boolean"` 4903} 4904 4905// String returns the string representation 4906func (s BookingOptions) String() string { 4907 return awsutil.Prettify(s) 4908} 4909 4910// GoString returns the string representation 4911func (s BookingOptions) GoString() string { 4912 return s.String() 4913} 4914 4915// SetAutoAcceptRequests sets the AutoAcceptRequests field's value. 4916func (s *BookingOptions) SetAutoAcceptRequests(v bool) *BookingOptions { 4917 s.AutoAcceptRequests = &v 4918 return s 4919} 4920 4921// SetAutoDeclineConflictingRequests sets the AutoDeclineConflictingRequests field's value. 4922func (s *BookingOptions) SetAutoDeclineConflictingRequests(v bool) *BookingOptions { 4923 s.AutoDeclineConflictingRequests = &v 4924 return s 4925} 4926 4927// SetAutoDeclineRecurringRequests sets the AutoDeclineRecurringRequests field's value. 4928func (s *BookingOptions) SetAutoDeclineRecurringRequests(v bool) *BookingOptions { 4929 s.AutoDeclineRecurringRequests = &v 4930 return s 4931} 4932 4933type CreateAliasInput struct { 4934 _ struct{} `type:"structure"` 4935 4936 // The alias to add to the member set. 4937 // 4938 // Alias is a required field 4939 Alias *string `min:"1" type:"string" required:"true"` 4940 4941 // The member (user or group) to which this alias is added. 4942 // 4943 // EntityId is a required field 4944 EntityId *string `min:"12" type:"string" required:"true"` 4945 4946 // The organization under which the member (user or group) exists. 4947 // 4948 // OrganizationId is a required field 4949 OrganizationId *string `type:"string" required:"true"` 4950} 4951 4952// String returns the string representation 4953func (s CreateAliasInput) String() string { 4954 return awsutil.Prettify(s) 4955} 4956 4957// GoString returns the string representation 4958func (s CreateAliasInput) GoString() string { 4959 return s.String() 4960} 4961 4962// Validate inspects the fields of the type to determine if they are valid. 4963func (s *CreateAliasInput) Validate() error { 4964 invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"} 4965 if s.Alias == nil { 4966 invalidParams.Add(request.NewErrParamRequired("Alias")) 4967 } 4968 if s.Alias != nil && len(*s.Alias) < 1 { 4969 invalidParams.Add(request.NewErrParamMinLen("Alias", 1)) 4970 } 4971 if s.EntityId == nil { 4972 invalidParams.Add(request.NewErrParamRequired("EntityId")) 4973 } 4974 if s.EntityId != nil && len(*s.EntityId) < 12 { 4975 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 4976 } 4977 if s.OrganizationId == nil { 4978 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 4979 } 4980 4981 if invalidParams.Len() > 0 { 4982 return invalidParams 4983 } 4984 return nil 4985} 4986 4987// SetAlias sets the Alias field's value. 4988func (s *CreateAliasInput) SetAlias(v string) *CreateAliasInput { 4989 s.Alias = &v 4990 return s 4991} 4992 4993// SetEntityId sets the EntityId field's value. 4994func (s *CreateAliasInput) SetEntityId(v string) *CreateAliasInput { 4995 s.EntityId = &v 4996 return s 4997} 4998 4999// SetOrganizationId sets the OrganizationId field's value. 5000func (s *CreateAliasInput) SetOrganizationId(v string) *CreateAliasInput { 5001 s.OrganizationId = &v 5002 return s 5003} 5004 5005type CreateAliasOutput struct { 5006 _ struct{} `type:"structure"` 5007} 5008 5009// String returns the string representation 5010func (s CreateAliasOutput) String() string { 5011 return awsutil.Prettify(s) 5012} 5013 5014// GoString returns the string representation 5015func (s CreateAliasOutput) GoString() string { 5016 return s.String() 5017} 5018 5019type CreateGroupInput struct { 5020 _ struct{} `type:"structure"` 5021 5022 // The name of the group. 5023 // 5024 // Name is a required field 5025 Name *string `min:"1" type:"string" required:"true"` 5026 5027 // The organization under which the group is to be created. 5028 // 5029 // OrganizationId is a required field 5030 OrganizationId *string `type:"string" required:"true"` 5031} 5032 5033// String returns the string representation 5034func (s CreateGroupInput) String() string { 5035 return awsutil.Prettify(s) 5036} 5037 5038// GoString returns the string representation 5039func (s CreateGroupInput) GoString() string { 5040 return s.String() 5041} 5042 5043// Validate inspects the fields of the type to determine if they are valid. 5044func (s *CreateGroupInput) Validate() error { 5045 invalidParams := request.ErrInvalidParams{Context: "CreateGroupInput"} 5046 if s.Name == nil { 5047 invalidParams.Add(request.NewErrParamRequired("Name")) 5048 } 5049 if s.Name != nil && len(*s.Name) < 1 { 5050 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5051 } 5052 if s.OrganizationId == nil { 5053 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5054 } 5055 5056 if invalidParams.Len() > 0 { 5057 return invalidParams 5058 } 5059 return nil 5060} 5061 5062// SetName sets the Name field's value. 5063func (s *CreateGroupInput) SetName(v string) *CreateGroupInput { 5064 s.Name = &v 5065 return s 5066} 5067 5068// SetOrganizationId sets the OrganizationId field's value. 5069func (s *CreateGroupInput) SetOrganizationId(v string) *CreateGroupInput { 5070 s.OrganizationId = &v 5071 return s 5072} 5073 5074type CreateGroupOutput struct { 5075 _ struct{} `type:"structure"` 5076 5077 // The identifier of the group. 5078 GroupId *string `min:"12" type:"string"` 5079} 5080 5081// String returns the string representation 5082func (s CreateGroupOutput) String() string { 5083 return awsutil.Prettify(s) 5084} 5085 5086// GoString returns the string representation 5087func (s CreateGroupOutput) GoString() string { 5088 return s.String() 5089} 5090 5091// SetGroupId sets the GroupId field's value. 5092func (s *CreateGroupOutput) SetGroupId(v string) *CreateGroupOutput { 5093 s.GroupId = &v 5094 return s 5095} 5096 5097type CreateResourceInput struct { 5098 _ struct{} `type:"structure"` 5099 5100 // The name of the new resource. 5101 // 5102 // Name is a required field 5103 Name *string `min:"1" type:"string" required:"true"` 5104 5105 // The identifier associated with the organization for which the resource is 5106 // created. 5107 // 5108 // OrganizationId is a required field 5109 OrganizationId *string `type:"string" required:"true"` 5110 5111 // The type of the new resource. The available types are equipment and room. 5112 // 5113 // Type is a required field 5114 Type *string `type:"string" required:"true" enum:"ResourceType"` 5115} 5116 5117// String returns the string representation 5118func (s CreateResourceInput) String() string { 5119 return awsutil.Prettify(s) 5120} 5121 5122// GoString returns the string representation 5123func (s CreateResourceInput) GoString() string { 5124 return s.String() 5125} 5126 5127// Validate inspects the fields of the type to determine if they are valid. 5128func (s *CreateResourceInput) Validate() error { 5129 invalidParams := request.ErrInvalidParams{Context: "CreateResourceInput"} 5130 if s.Name == nil { 5131 invalidParams.Add(request.NewErrParamRequired("Name")) 5132 } 5133 if s.Name != nil && len(*s.Name) < 1 { 5134 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5135 } 5136 if s.OrganizationId == nil { 5137 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5138 } 5139 if s.Type == nil { 5140 invalidParams.Add(request.NewErrParamRequired("Type")) 5141 } 5142 5143 if invalidParams.Len() > 0 { 5144 return invalidParams 5145 } 5146 return nil 5147} 5148 5149// SetName sets the Name field's value. 5150func (s *CreateResourceInput) SetName(v string) *CreateResourceInput { 5151 s.Name = &v 5152 return s 5153} 5154 5155// SetOrganizationId sets the OrganizationId field's value. 5156func (s *CreateResourceInput) SetOrganizationId(v string) *CreateResourceInput { 5157 s.OrganizationId = &v 5158 return s 5159} 5160 5161// SetType sets the Type field's value. 5162func (s *CreateResourceInput) SetType(v string) *CreateResourceInput { 5163 s.Type = &v 5164 return s 5165} 5166 5167type CreateResourceOutput struct { 5168 _ struct{} `type:"structure"` 5169 5170 // The identifier of the new resource. 5171 ResourceId *string `type:"string"` 5172} 5173 5174// String returns the string representation 5175func (s CreateResourceOutput) String() string { 5176 return awsutil.Prettify(s) 5177} 5178 5179// GoString returns the string representation 5180func (s CreateResourceOutput) GoString() string { 5181 return s.String() 5182} 5183 5184// SetResourceId sets the ResourceId field's value. 5185func (s *CreateResourceOutput) SetResourceId(v string) *CreateResourceOutput { 5186 s.ResourceId = &v 5187 return s 5188} 5189 5190type CreateUserInput struct { 5191 _ struct{} `type:"structure"` 5192 5193 // The display name for the new user. 5194 // 5195 // DisplayName is a required field 5196 DisplayName *string `type:"string" required:"true"` 5197 5198 // The name for the new user. Simple AD or AD Connector user names have a maximum 5199 // length of 20. All others have a maximum length of 64. 5200 // 5201 // Name is a required field 5202 Name *string `min:"1" type:"string" required:"true"` 5203 5204 // The identifier of the organization for which the user is created. 5205 // 5206 // OrganizationId is a required field 5207 OrganizationId *string `type:"string" required:"true"` 5208 5209 // The password for the new user. 5210 // 5211 // Password is a required field 5212 Password *string `type:"string" required:"true" sensitive:"true"` 5213} 5214 5215// String returns the string representation 5216func (s CreateUserInput) String() string { 5217 return awsutil.Prettify(s) 5218} 5219 5220// GoString returns the string representation 5221func (s CreateUserInput) GoString() string { 5222 return s.String() 5223} 5224 5225// Validate inspects the fields of the type to determine if they are valid. 5226func (s *CreateUserInput) Validate() error { 5227 invalidParams := request.ErrInvalidParams{Context: "CreateUserInput"} 5228 if s.DisplayName == nil { 5229 invalidParams.Add(request.NewErrParamRequired("DisplayName")) 5230 } 5231 if s.Name == nil { 5232 invalidParams.Add(request.NewErrParamRequired("Name")) 5233 } 5234 if s.Name != nil && len(*s.Name) < 1 { 5235 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5236 } 5237 if s.OrganizationId == nil { 5238 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5239 } 5240 if s.Password == nil { 5241 invalidParams.Add(request.NewErrParamRequired("Password")) 5242 } 5243 5244 if invalidParams.Len() > 0 { 5245 return invalidParams 5246 } 5247 return nil 5248} 5249 5250// SetDisplayName sets the DisplayName field's value. 5251func (s *CreateUserInput) SetDisplayName(v string) *CreateUserInput { 5252 s.DisplayName = &v 5253 return s 5254} 5255 5256// SetName sets the Name field's value. 5257func (s *CreateUserInput) SetName(v string) *CreateUserInput { 5258 s.Name = &v 5259 return s 5260} 5261 5262// SetOrganizationId sets the OrganizationId field's value. 5263func (s *CreateUserInput) SetOrganizationId(v string) *CreateUserInput { 5264 s.OrganizationId = &v 5265 return s 5266} 5267 5268// SetPassword sets the Password field's value. 5269func (s *CreateUserInput) SetPassword(v string) *CreateUserInput { 5270 s.Password = &v 5271 return s 5272} 5273 5274type CreateUserOutput struct { 5275 _ struct{} `type:"structure"` 5276 5277 // The identifier for the new user. 5278 UserId *string `min:"12" type:"string"` 5279} 5280 5281// String returns the string representation 5282func (s CreateUserOutput) String() string { 5283 return awsutil.Prettify(s) 5284} 5285 5286// GoString returns the string representation 5287func (s CreateUserOutput) GoString() string { 5288 return s.String() 5289} 5290 5291// SetUserId sets the UserId field's value. 5292func (s *CreateUserOutput) SetUserId(v string) *CreateUserOutput { 5293 s.UserId = &v 5294 return s 5295} 5296 5297// The name of the attribute, which is one of the values defined in the UserAttribute 5298// enumeration. 5299type Delegate struct { 5300 _ struct{} `type:"structure"` 5301 5302 // The identifier for the user or group associated as the resource's delegate. 5303 // 5304 // Id is a required field 5305 Id *string `type:"string" required:"true"` 5306 5307 // The type of the delegate: user or group. 5308 // 5309 // Type is a required field 5310 Type *string `type:"string" required:"true" enum:"MemberType"` 5311} 5312 5313// String returns the string representation 5314func (s Delegate) String() string { 5315 return awsutil.Prettify(s) 5316} 5317 5318// GoString returns the string representation 5319func (s Delegate) GoString() string { 5320 return s.String() 5321} 5322 5323// SetId sets the Id field's value. 5324func (s *Delegate) SetId(v string) *Delegate { 5325 s.Id = &v 5326 return s 5327} 5328 5329// SetType sets the Type field's value. 5330func (s *Delegate) SetType(v string) *Delegate { 5331 s.Type = &v 5332 return s 5333} 5334 5335type DeleteAccessControlRuleInput struct { 5336 _ struct{} `type:"structure"` 5337 5338 // The name of the access control rule. 5339 // 5340 // Name is a required field 5341 Name *string `min:"1" type:"string" required:"true"` 5342 5343 // The identifier for the organization. 5344 // 5345 // OrganizationId is a required field 5346 OrganizationId *string `type:"string" required:"true"` 5347} 5348 5349// String returns the string representation 5350func (s DeleteAccessControlRuleInput) String() string { 5351 return awsutil.Prettify(s) 5352} 5353 5354// GoString returns the string representation 5355func (s DeleteAccessControlRuleInput) GoString() string { 5356 return s.String() 5357} 5358 5359// Validate inspects the fields of the type to determine if they are valid. 5360func (s *DeleteAccessControlRuleInput) Validate() error { 5361 invalidParams := request.ErrInvalidParams{Context: "DeleteAccessControlRuleInput"} 5362 if s.Name == nil { 5363 invalidParams.Add(request.NewErrParamRequired("Name")) 5364 } 5365 if s.Name != nil && len(*s.Name) < 1 { 5366 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5367 } 5368 if s.OrganizationId == nil { 5369 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5370 } 5371 5372 if invalidParams.Len() > 0 { 5373 return invalidParams 5374 } 5375 return nil 5376} 5377 5378// SetName sets the Name field's value. 5379func (s *DeleteAccessControlRuleInput) SetName(v string) *DeleteAccessControlRuleInput { 5380 s.Name = &v 5381 return s 5382} 5383 5384// SetOrganizationId sets the OrganizationId field's value. 5385func (s *DeleteAccessControlRuleInput) SetOrganizationId(v string) *DeleteAccessControlRuleInput { 5386 s.OrganizationId = &v 5387 return s 5388} 5389 5390type DeleteAccessControlRuleOutput struct { 5391 _ struct{} `type:"structure"` 5392} 5393 5394// String returns the string representation 5395func (s DeleteAccessControlRuleOutput) String() string { 5396 return awsutil.Prettify(s) 5397} 5398 5399// GoString returns the string representation 5400func (s DeleteAccessControlRuleOutput) GoString() string { 5401 return s.String() 5402} 5403 5404type DeleteAliasInput struct { 5405 _ struct{} `type:"structure"` 5406 5407 // The aliases to be removed from the user's set of aliases. Duplicate entries 5408 // in the list are collapsed into single entries (the list is transformed into 5409 // a set). 5410 // 5411 // Alias is a required field 5412 Alias *string `min:"1" type:"string" required:"true"` 5413 5414 // The identifier for the member (user or group) from which to have the aliases 5415 // removed. 5416 // 5417 // EntityId is a required field 5418 EntityId *string `min:"12" type:"string" required:"true"` 5419 5420 // The identifier for the organization under which the user exists. 5421 // 5422 // OrganizationId is a required field 5423 OrganizationId *string `type:"string" required:"true"` 5424} 5425 5426// String returns the string representation 5427func (s DeleteAliasInput) String() string { 5428 return awsutil.Prettify(s) 5429} 5430 5431// GoString returns the string representation 5432func (s DeleteAliasInput) GoString() string { 5433 return s.String() 5434} 5435 5436// Validate inspects the fields of the type to determine if they are valid. 5437func (s *DeleteAliasInput) Validate() error { 5438 invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"} 5439 if s.Alias == nil { 5440 invalidParams.Add(request.NewErrParamRequired("Alias")) 5441 } 5442 if s.Alias != nil && len(*s.Alias) < 1 { 5443 invalidParams.Add(request.NewErrParamMinLen("Alias", 1)) 5444 } 5445 if s.EntityId == nil { 5446 invalidParams.Add(request.NewErrParamRequired("EntityId")) 5447 } 5448 if s.EntityId != nil && len(*s.EntityId) < 12 { 5449 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 5450 } 5451 if s.OrganizationId == nil { 5452 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5453 } 5454 5455 if invalidParams.Len() > 0 { 5456 return invalidParams 5457 } 5458 return nil 5459} 5460 5461// SetAlias sets the Alias field's value. 5462func (s *DeleteAliasInput) SetAlias(v string) *DeleteAliasInput { 5463 s.Alias = &v 5464 return s 5465} 5466 5467// SetEntityId sets the EntityId field's value. 5468func (s *DeleteAliasInput) SetEntityId(v string) *DeleteAliasInput { 5469 s.EntityId = &v 5470 return s 5471} 5472 5473// SetOrganizationId sets the OrganizationId field's value. 5474func (s *DeleteAliasInput) SetOrganizationId(v string) *DeleteAliasInput { 5475 s.OrganizationId = &v 5476 return s 5477} 5478 5479type DeleteAliasOutput struct { 5480 _ struct{} `type:"structure"` 5481} 5482 5483// String returns the string representation 5484func (s DeleteAliasOutput) String() string { 5485 return awsutil.Prettify(s) 5486} 5487 5488// GoString returns the string representation 5489func (s DeleteAliasOutput) GoString() string { 5490 return s.String() 5491} 5492 5493type DeleteGroupInput struct { 5494 _ struct{} `type:"structure"` 5495 5496 // The identifier of the group to be deleted. 5497 // 5498 // GroupId is a required field 5499 GroupId *string `min:"12" type:"string" required:"true"` 5500 5501 // The organization that contains the group. 5502 // 5503 // OrganizationId is a required field 5504 OrganizationId *string `type:"string" required:"true"` 5505} 5506 5507// String returns the string representation 5508func (s DeleteGroupInput) String() string { 5509 return awsutil.Prettify(s) 5510} 5511 5512// GoString returns the string representation 5513func (s DeleteGroupInput) GoString() string { 5514 return s.String() 5515} 5516 5517// Validate inspects the fields of the type to determine if they are valid. 5518func (s *DeleteGroupInput) Validate() error { 5519 invalidParams := request.ErrInvalidParams{Context: "DeleteGroupInput"} 5520 if s.GroupId == nil { 5521 invalidParams.Add(request.NewErrParamRequired("GroupId")) 5522 } 5523 if s.GroupId != nil && len(*s.GroupId) < 12 { 5524 invalidParams.Add(request.NewErrParamMinLen("GroupId", 12)) 5525 } 5526 if s.OrganizationId == nil { 5527 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5528 } 5529 5530 if invalidParams.Len() > 0 { 5531 return invalidParams 5532 } 5533 return nil 5534} 5535 5536// SetGroupId sets the GroupId field's value. 5537func (s *DeleteGroupInput) SetGroupId(v string) *DeleteGroupInput { 5538 s.GroupId = &v 5539 return s 5540} 5541 5542// SetOrganizationId sets the OrganizationId field's value. 5543func (s *DeleteGroupInput) SetOrganizationId(v string) *DeleteGroupInput { 5544 s.OrganizationId = &v 5545 return s 5546} 5547 5548type DeleteGroupOutput struct { 5549 _ struct{} `type:"structure"` 5550} 5551 5552// String returns the string representation 5553func (s DeleteGroupOutput) String() string { 5554 return awsutil.Prettify(s) 5555} 5556 5557// GoString returns the string representation 5558func (s DeleteGroupOutput) GoString() string { 5559 return s.String() 5560} 5561 5562type DeleteMailboxPermissionsInput struct { 5563 _ struct{} `type:"structure"` 5564 5565 // The identifier of the member (user or group)that owns the mailbox. 5566 // 5567 // EntityId is a required field 5568 EntityId *string `min:"12" type:"string" required:"true"` 5569 5570 // The identifier of the member (user or group) for which to delete granted 5571 // permissions. 5572 // 5573 // GranteeId is a required field 5574 GranteeId *string `min:"12" type:"string" required:"true"` 5575 5576 // The identifier of the organization under which the member (user or group) 5577 // exists. 5578 // 5579 // OrganizationId is a required field 5580 OrganizationId *string `type:"string" required:"true"` 5581} 5582 5583// String returns the string representation 5584func (s DeleteMailboxPermissionsInput) String() string { 5585 return awsutil.Prettify(s) 5586} 5587 5588// GoString returns the string representation 5589func (s DeleteMailboxPermissionsInput) GoString() string { 5590 return s.String() 5591} 5592 5593// Validate inspects the fields of the type to determine if they are valid. 5594func (s *DeleteMailboxPermissionsInput) Validate() error { 5595 invalidParams := request.ErrInvalidParams{Context: "DeleteMailboxPermissionsInput"} 5596 if s.EntityId == nil { 5597 invalidParams.Add(request.NewErrParamRequired("EntityId")) 5598 } 5599 if s.EntityId != nil && len(*s.EntityId) < 12 { 5600 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 5601 } 5602 if s.GranteeId == nil { 5603 invalidParams.Add(request.NewErrParamRequired("GranteeId")) 5604 } 5605 if s.GranteeId != nil && len(*s.GranteeId) < 12 { 5606 invalidParams.Add(request.NewErrParamMinLen("GranteeId", 12)) 5607 } 5608 if s.OrganizationId == nil { 5609 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5610 } 5611 5612 if invalidParams.Len() > 0 { 5613 return invalidParams 5614 } 5615 return nil 5616} 5617 5618// SetEntityId sets the EntityId field's value. 5619func (s *DeleteMailboxPermissionsInput) SetEntityId(v string) *DeleteMailboxPermissionsInput { 5620 s.EntityId = &v 5621 return s 5622} 5623 5624// SetGranteeId sets the GranteeId field's value. 5625func (s *DeleteMailboxPermissionsInput) SetGranteeId(v string) *DeleteMailboxPermissionsInput { 5626 s.GranteeId = &v 5627 return s 5628} 5629 5630// SetOrganizationId sets the OrganizationId field's value. 5631func (s *DeleteMailboxPermissionsInput) SetOrganizationId(v string) *DeleteMailboxPermissionsInput { 5632 s.OrganizationId = &v 5633 return s 5634} 5635 5636type DeleteMailboxPermissionsOutput struct { 5637 _ struct{} `type:"structure"` 5638} 5639 5640// String returns the string representation 5641func (s DeleteMailboxPermissionsOutput) String() string { 5642 return awsutil.Prettify(s) 5643} 5644 5645// GoString returns the string representation 5646func (s DeleteMailboxPermissionsOutput) GoString() string { 5647 return s.String() 5648} 5649 5650type DeleteResourceInput struct { 5651 _ struct{} `type:"structure"` 5652 5653 // The identifier associated with the organization from which the resource is 5654 // deleted. 5655 // 5656 // OrganizationId is a required field 5657 OrganizationId *string `type:"string" required:"true"` 5658 5659 // The identifier of the resource to be deleted. 5660 // 5661 // ResourceId is a required field 5662 ResourceId *string `type:"string" required:"true"` 5663} 5664 5665// String returns the string representation 5666func (s DeleteResourceInput) String() string { 5667 return awsutil.Prettify(s) 5668} 5669 5670// GoString returns the string representation 5671func (s DeleteResourceInput) GoString() string { 5672 return s.String() 5673} 5674 5675// Validate inspects the fields of the type to determine if they are valid. 5676func (s *DeleteResourceInput) Validate() error { 5677 invalidParams := request.ErrInvalidParams{Context: "DeleteResourceInput"} 5678 if s.OrganizationId == nil { 5679 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5680 } 5681 if s.ResourceId == nil { 5682 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 5683 } 5684 5685 if invalidParams.Len() > 0 { 5686 return invalidParams 5687 } 5688 return nil 5689} 5690 5691// SetOrganizationId sets the OrganizationId field's value. 5692func (s *DeleteResourceInput) SetOrganizationId(v string) *DeleteResourceInput { 5693 s.OrganizationId = &v 5694 return s 5695} 5696 5697// SetResourceId sets the ResourceId field's value. 5698func (s *DeleteResourceInput) SetResourceId(v string) *DeleteResourceInput { 5699 s.ResourceId = &v 5700 return s 5701} 5702 5703type DeleteResourceOutput struct { 5704 _ struct{} `type:"structure"` 5705} 5706 5707// String returns the string representation 5708func (s DeleteResourceOutput) String() string { 5709 return awsutil.Prettify(s) 5710} 5711 5712// GoString returns the string representation 5713func (s DeleteResourceOutput) GoString() string { 5714 return s.String() 5715} 5716 5717type DeleteRetentionPolicyInput struct { 5718 _ struct{} `type:"structure"` 5719 5720 // The retention policy ID. 5721 // 5722 // Id is a required field 5723 Id *string `min:"1" type:"string" required:"true"` 5724 5725 // The organization ID. 5726 // 5727 // OrganizationId is a required field 5728 OrganizationId *string `type:"string" required:"true"` 5729} 5730 5731// String returns the string representation 5732func (s DeleteRetentionPolicyInput) String() string { 5733 return awsutil.Prettify(s) 5734} 5735 5736// GoString returns the string representation 5737func (s DeleteRetentionPolicyInput) GoString() string { 5738 return s.String() 5739} 5740 5741// Validate inspects the fields of the type to determine if they are valid. 5742func (s *DeleteRetentionPolicyInput) Validate() error { 5743 invalidParams := request.ErrInvalidParams{Context: "DeleteRetentionPolicyInput"} 5744 if s.Id == nil { 5745 invalidParams.Add(request.NewErrParamRequired("Id")) 5746 } 5747 if s.Id != nil && len(*s.Id) < 1 { 5748 invalidParams.Add(request.NewErrParamMinLen("Id", 1)) 5749 } 5750 if s.OrganizationId == nil { 5751 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5752 } 5753 5754 if invalidParams.Len() > 0 { 5755 return invalidParams 5756 } 5757 return nil 5758} 5759 5760// SetId sets the Id field's value. 5761func (s *DeleteRetentionPolicyInput) SetId(v string) *DeleteRetentionPolicyInput { 5762 s.Id = &v 5763 return s 5764} 5765 5766// SetOrganizationId sets the OrganizationId field's value. 5767func (s *DeleteRetentionPolicyInput) SetOrganizationId(v string) *DeleteRetentionPolicyInput { 5768 s.OrganizationId = &v 5769 return s 5770} 5771 5772type DeleteRetentionPolicyOutput struct { 5773 _ struct{} `type:"structure"` 5774} 5775 5776// String returns the string representation 5777func (s DeleteRetentionPolicyOutput) String() string { 5778 return awsutil.Prettify(s) 5779} 5780 5781// GoString returns the string representation 5782func (s DeleteRetentionPolicyOutput) GoString() string { 5783 return s.String() 5784} 5785 5786type DeleteUserInput struct { 5787 _ struct{} `type:"structure"` 5788 5789 // The organization that contains the user to be deleted. 5790 // 5791 // OrganizationId is a required field 5792 OrganizationId *string `type:"string" required:"true"` 5793 5794 // The identifier of the user to be deleted. 5795 // 5796 // UserId is a required field 5797 UserId *string `min:"12" type:"string" required:"true"` 5798} 5799 5800// String returns the string representation 5801func (s DeleteUserInput) String() string { 5802 return awsutil.Prettify(s) 5803} 5804 5805// GoString returns the string representation 5806func (s DeleteUserInput) GoString() string { 5807 return s.String() 5808} 5809 5810// Validate inspects the fields of the type to determine if they are valid. 5811func (s *DeleteUserInput) Validate() error { 5812 invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"} 5813 if s.OrganizationId == nil { 5814 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5815 } 5816 if s.UserId == nil { 5817 invalidParams.Add(request.NewErrParamRequired("UserId")) 5818 } 5819 if s.UserId != nil && len(*s.UserId) < 12 { 5820 invalidParams.Add(request.NewErrParamMinLen("UserId", 12)) 5821 } 5822 5823 if invalidParams.Len() > 0 { 5824 return invalidParams 5825 } 5826 return nil 5827} 5828 5829// SetOrganizationId sets the OrganizationId field's value. 5830func (s *DeleteUserInput) SetOrganizationId(v string) *DeleteUserInput { 5831 s.OrganizationId = &v 5832 return s 5833} 5834 5835// SetUserId sets the UserId field's value. 5836func (s *DeleteUserInput) SetUserId(v string) *DeleteUserInput { 5837 s.UserId = &v 5838 return s 5839} 5840 5841type DeleteUserOutput struct { 5842 _ struct{} `type:"structure"` 5843} 5844 5845// String returns the string representation 5846func (s DeleteUserOutput) String() string { 5847 return awsutil.Prettify(s) 5848} 5849 5850// GoString returns the string representation 5851func (s DeleteUserOutput) GoString() string { 5852 return s.String() 5853} 5854 5855type DeregisterFromWorkMailInput struct { 5856 _ struct{} `type:"structure"` 5857 5858 // The identifier for the member (user or group) to be updated. 5859 // 5860 // EntityId is a required field 5861 EntityId *string `min:"12" type:"string" required:"true"` 5862 5863 // The identifier for the organization under which the Amazon WorkMail entity 5864 // exists. 5865 // 5866 // OrganizationId is a required field 5867 OrganizationId *string `type:"string" required:"true"` 5868} 5869 5870// String returns the string representation 5871func (s DeregisterFromWorkMailInput) String() string { 5872 return awsutil.Prettify(s) 5873} 5874 5875// GoString returns the string representation 5876func (s DeregisterFromWorkMailInput) GoString() string { 5877 return s.String() 5878} 5879 5880// Validate inspects the fields of the type to determine if they are valid. 5881func (s *DeregisterFromWorkMailInput) Validate() error { 5882 invalidParams := request.ErrInvalidParams{Context: "DeregisterFromWorkMailInput"} 5883 if s.EntityId == nil { 5884 invalidParams.Add(request.NewErrParamRequired("EntityId")) 5885 } 5886 if s.EntityId != nil && len(*s.EntityId) < 12 { 5887 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 5888 } 5889 if s.OrganizationId == nil { 5890 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5891 } 5892 5893 if invalidParams.Len() > 0 { 5894 return invalidParams 5895 } 5896 return nil 5897} 5898 5899// SetEntityId sets the EntityId field's value. 5900func (s *DeregisterFromWorkMailInput) SetEntityId(v string) *DeregisterFromWorkMailInput { 5901 s.EntityId = &v 5902 return s 5903} 5904 5905// SetOrganizationId sets the OrganizationId field's value. 5906func (s *DeregisterFromWorkMailInput) SetOrganizationId(v string) *DeregisterFromWorkMailInput { 5907 s.OrganizationId = &v 5908 return s 5909} 5910 5911type DeregisterFromWorkMailOutput struct { 5912 _ struct{} `type:"structure"` 5913} 5914 5915// String returns the string representation 5916func (s DeregisterFromWorkMailOutput) String() string { 5917 return awsutil.Prettify(s) 5918} 5919 5920// GoString returns the string representation 5921func (s DeregisterFromWorkMailOutput) GoString() string { 5922 return s.String() 5923} 5924 5925type DescribeGroupInput struct { 5926 _ struct{} `type:"structure"` 5927 5928 // The identifier for the group to be described. 5929 // 5930 // GroupId is a required field 5931 GroupId *string `min:"12" type:"string" required:"true"` 5932 5933 // The identifier for the organization under which the group exists. 5934 // 5935 // OrganizationId is a required field 5936 OrganizationId *string `type:"string" required:"true"` 5937} 5938 5939// String returns the string representation 5940func (s DescribeGroupInput) String() string { 5941 return awsutil.Prettify(s) 5942} 5943 5944// GoString returns the string representation 5945func (s DescribeGroupInput) GoString() string { 5946 return s.String() 5947} 5948 5949// Validate inspects the fields of the type to determine if they are valid. 5950func (s *DescribeGroupInput) Validate() error { 5951 invalidParams := request.ErrInvalidParams{Context: "DescribeGroupInput"} 5952 if s.GroupId == nil { 5953 invalidParams.Add(request.NewErrParamRequired("GroupId")) 5954 } 5955 if s.GroupId != nil && len(*s.GroupId) < 12 { 5956 invalidParams.Add(request.NewErrParamMinLen("GroupId", 12)) 5957 } 5958 if s.OrganizationId == nil { 5959 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 5960 } 5961 5962 if invalidParams.Len() > 0 { 5963 return invalidParams 5964 } 5965 return nil 5966} 5967 5968// SetGroupId sets the GroupId field's value. 5969func (s *DescribeGroupInput) SetGroupId(v string) *DescribeGroupInput { 5970 s.GroupId = &v 5971 return s 5972} 5973 5974// SetOrganizationId sets the OrganizationId field's value. 5975func (s *DescribeGroupInput) SetOrganizationId(v string) *DescribeGroupInput { 5976 s.OrganizationId = &v 5977 return s 5978} 5979 5980type DescribeGroupOutput struct { 5981 _ struct{} `type:"structure"` 5982 5983 // The date and time when a user was deregistered from WorkMail, in UNIX epoch 5984 // time format. 5985 DisabledDate *time.Time `type:"timestamp"` 5986 5987 // The email of the described group. 5988 Email *string `min:"1" type:"string"` 5989 5990 // The date and time when a user was registered to WorkMail, in UNIX epoch time 5991 // format. 5992 EnabledDate *time.Time `type:"timestamp"` 5993 5994 // The identifier of the described group. 5995 GroupId *string `min:"12" type:"string"` 5996 5997 // The name of the described group. 5998 Name *string `min:"1" type:"string"` 5999 6000 // The state of the user: enabled (registered to Amazon WorkMail) or disabled 6001 // (deregistered or never registered to WorkMail). 6002 State *string `type:"string" enum:"EntityState"` 6003} 6004 6005// String returns the string representation 6006func (s DescribeGroupOutput) String() string { 6007 return awsutil.Prettify(s) 6008} 6009 6010// GoString returns the string representation 6011func (s DescribeGroupOutput) GoString() string { 6012 return s.String() 6013} 6014 6015// SetDisabledDate sets the DisabledDate field's value. 6016func (s *DescribeGroupOutput) SetDisabledDate(v time.Time) *DescribeGroupOutput { 6017 s.DisabledDate = &v 6018 return s 6019} 6020 6021// SetEmail sets the Email field's value. 6022func (s *DescribeGroupOutput) SetEmail(v string) *DescribeGroupOutput { 6023 s.Email = &v 6024 return s 6025} 6026 6027// SetEnabledDate sets the EnabledDate field's value. 6028func (s *DescribeGroupOutput) SetEnabledDate(v time.Time) *DescribeGroupOutput { 6029 s.EnabledDate = &v 6030 return s 6031} 6032 6033// SetGroupId sets the GroupId field's value. 6034func (s *DescribeGroupOutput) SetGroupId(v string) *DescribeGroupOutput { 6035 s.GroupId = &v 6036 return s 6037} 6038 6039// SetName sets the Name field's value. 6040func (s *DescribeGroupOutput) SetName(v string) *DescribeGroupOutput { 6041 s.Name = &v 6042 return s 6043} 6044 6045// SetState sets the State field's value. 6046func (s *DescribeGroupOutput) SetState(v string) *DescribeGroupOutput { 6047 s.State = &v 6048 return s 6049} 6050 6051type DescribeOrganizationInput struct { 6052 _ struct{} `type:"structure"` 6053 6054 // The identifier for the organization to be described. 6055 // 6056 // OrganizationId is a required field 6057 OrganizationId *string `type:"string" required:"true"` 6058} 6059 6060// String returns the string representation 6061func (s DescribeOrganizationInput) String() string { 6062 return awsutil.Prettify(s) 6063} 6064 6065// GoString returns the string representation 6066func (s DescribeOrganizationInput) GoString() string { 6067 return s.String() 6068} 6069 6070// Validate inspects the fields of the type to determine if they are valid. 6071func (s *DescribeOrganizationInput) Validate() error { 6072 invalidParams := request.ErrInvalidParams{Context: "DescribeOrganizationInput"} 6073 if s.OrganizationId == nil { 6074 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 6075 } 6076 6077 if invalidParams.Len() > 0 { 6078 return invalidParams 6079 } 6080 return nil 6081} 6082 6083// SetOrganizationId sets the OrganizationId field's value. 6084func (s *DescribeOrganizationInput) SetOrganizationId(v string) *DescribeOrganizationInput { 6085 s.OrganizationId = &v 6086 return s 6087} 6088 6089type DescribeOrganizationOutput struct { 6090 _ struct{} `type:"structure"` 6091 6092 // The Amazon Resource Name (ARN) of the organization. 6093 ARN *string `min:"1" type:"string"` 6094 6095 // The alias for an organization. 6096 Alias *string `min:"1" type:"string"` 6097 6098 // The date at which the organization became usable in the WorkMail context, 6099 // in UNIX epoch time format. 6100 CompletedDate *time.Time `type:"timestamp"` 6101 6102 // The default mail domain associated with the organization. 6103 DefaultMailDomain *string `type:"string"` 6104 6105 // The identifier for the directory associated with an Amazon WorkMail organization. 6106 DirectoryId *string `type:"string"` 6107 6108 // The type of directory associated with the WorkMail organization. 6109 DirectoryType *string `type:"string"` 6110 6111 // (Optional) The error message indicating if unexpected behavior was encountered 6112 // with regards to the organization. 6113 ErrorMessage *string `type:"string"` 6114 6115 // The identifier of an organization. 6116 OrganizationId *string `type:"string"` 6117 6118 // The state of an organization. 6119 State *string `type:"string"` 6120} 6121 6122// String returns the string representation 6123func (s DescribeOrganizationOutput) String() string { 6124 return awsutil.Prettify(s) 6125} 6126 6127// GoString returns the string representation 6128func (s DescribeOrganizationOutput) GoString() string { 6129 return s.String() 6130} 6131 6132// SetARN sets the ARN field's value. 6133func (s *DescribeOrganizationOutput) SetARN(v string) *DescribeOrganizationOutput { 6134 s.ARN = &v 6135 return s 6136} 6137 6138// SetAlias sets the Alias field's value. 6139func (s *DescribeOrganizationOutput) SetAlias(v string) *DescribeOrganizationOutput { 6140 s.Alias = &v 6141 return s 6142} 6143 6144// SetCompletedDate sets the CompletedDate field's value. 6145func (s *DescribeOrganizationOutput) SetCompletedDate(v time.Time) *DescribeOrganizationOutput { 6146 s.CompletedDate = &v 6147 return s 6148} 6149 6150// SetDefaultMailDomain sets the DefaultMailDomain field's value. 6151func (s *DescribeOrganizationOutput) SetDefaultMailDomain(v string) *DescribeOrganizationOutput { 6152 s.DefaultMailDomain = &v 6153 return s 6154} 6155 6156// SetDirectoryId sets the DirectoryId field's value. 6157func (s *DescribeOrganizationOutput) SetDirectoryId(v string) *DescribeOrganizationOutput { 6158 s.DirectoryId = &v 6159 return s 6160} 6161 6162// SetDirectoryType sets the DirectoryType field's value. 6163func (s *DescribeOrganizationOutput) SetDirectoryType(v string) *DescribeOrganizationOutput { 6164 s.DirectoryType = &v 6165 return s 6166} 6167 6168// SetErrorMessage sets the ErrorMessage field's value. 6169func (s *DescribeOrganizationOutput) SetErrorMessage(v string) *DescribeOrganizationOutput { 6170 s.ErrorMessage = &v 6171 return s 6172} 6173 6174// SetOrganizationId sets the OrganizationId field's value. 6175func (s *DescribeOrganizationOutput) SetOrganizationId(v string) *DescribeOrganizationOutput { 6176 s.OrganizationId = &v 6177 return s 6178} 6179 6180// SetState sets the State field's value. 6181func (s *DescribeOrganizationOutput) SetState(v string) *DescribeOrganizationOutput { 6182 s.State = &v 6183 return s 6184} 6185 6186type DescribeResourceInput struct { 6187 _ struct{} `type:"structure"` 6188 6189 // The identifier associated with the organization for which the resource is 6190 // described. 6191 // 6192 // OrganizationId is a required field 6193 OrganizationId *string `type:"string" required:"true"` 6194 6195 // The identifier of the resource to be described. 6196 // 6197 // ResourceId is a required field 6198 ResourceId *string `type:"string" required:"true"` 6199} 6200 6201// String returns the string representation 6202func (s DescribeResourceInput) String() string { 6203 return awsutil.Prettify(s) 6204} 6205 6206// GoString returns the string representation 6207func (s DescribeResourceInput) GoString() string { 6208 return s.String() 6209} 6210 6211// Validate inspects the fields of the type to determine if they are valid. 6212func (s *DescribeResourceInput) Validate() error { 6213 invalidParams := request.ErrInvalidParams{Context: "DescribeResourceInput"} 6214 if s.OrganizationId == nil { 6215 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 6216 } 6217 if s.ResourceId == nil { 6218 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 6219 } 6220 6221 if invalidParams.Len() > 0 { 6222 return invalidParams 6223 } 6224 return nil 6225} 6226 6227// SetOrganizationId sets the OrganizationId field's value. 6228func (s *DescribeResourceInput) SetOrganizationId(v string) *DescribeResourceInput { 6229 s.OrganizationId = &v 6230 return s 6231} 6232 6233// SetResourceId sets the ResourceId field's value. 6234func (s *DescribeResourceInput) SetResourceId(v string) *DescribeResourceInput { 6235 s.ResourceId = &v 6236 return s 6237} 6238 6239type DescribeResourceOutput struct { 6240 _ struct{} `type:"structure"` 6241 6242 // The booking options for the described resource. 6243 BookingOptions *BookingOptions `type:"structure"` 6244 6245 // The date and time when a resource was disabled from WorkMail, in UNIX epoch 6246 // time format. 6247 DisabledDate *time.Time `type:"timestamp"` 6248 6249 // The email of the described resource. 6250 Email *string `min:"1" type:"string"` 6251 6252 // The date and time when a resource was enabled for WorkMail, in UNIX epoch 6253 // time format. 6254 EnabledDate *time.Time `type:"timestamp"` 6255 6256 // The name of the described resource. 6257 Name *string `min:"1" type:"string"` 6258 6259 // The identifier of the described resource. 6260 ResourceId *string `type:"string"` 6261 6262 // The state of the resource: enabled (registered to Amazon WorkMail), disabled 6263 // (deregistered or never registered to WorkMail), or deleted. 6264 State *string `type:"string" enum:"EntityState"` 6265 6266 // The type of the described resource. 6267 Type *string `type:"string" enum:"ResourceType"` 6268} 6269 6270// String returns the string representation 6271func (s DescribeResourceOutput) String() string { 6272 return awsutil.Prettify(s) 6273} 6274 6275// GoString returns the string representation 6276func (s DescribeResourceOutput) GoString() string { 6277 return s.String() 6278} 6279 6280// SetBookingOptions sets the BookingOptions field's value. 6281func (s *DescribeResourceOutput) SetBookingOptions(v *BookingOptions) *DescribeResourceOutput { 6282 s.BookingOptions = v 6283 return s 6284} 6285 6286// SetDisabledDate sets the DisabledDate field's value. 6287func (s *DescribeResourceOutput) SetDisabledDate(v time.Time) *DescribeResourceOutput { 6288 s.DisabledDate = &v 6289 return s 6290} 6291 6292// SetEmail sets the Email field's value. 6293func (s *DescribeResourceOutput) SetEmail(v string) *DescribeResourceOutput { 6294 s.Email = &v 6295 return s 6296} 6297 6298// SetEnabledDate sets the EnabledDate field's value. 6299func (s *DescribeResourceOutput) SetEnabledDate(v time.Time) *DescribeResourceOutput { 6300 s.EnabledDate = &v 6301 return s 6302} 6303 6304// SetName sets the Name field's value. 6305func (s *DescribeResourceOutput) SetName(v string) *DescribeResourceOutput { 6306 s.Name = &v 6307 return s 6308} 6309 6310// SetResourceId sets the ResourceId field's value. 6311func (s *DescribeResourceOutput) SetResourceId(v string) *DescribeResourceOutput { 6312 s.ResourceId = &v 6313 return s 6314} 6315 6316// SetState sets the State field's value. 6317func (s *DescribeResourceOutput) SetState(v string) *DescribeResourceOutput { 6318 s.State = &v 6319 return s 6320} 6321 6322// SetType sets the Type field's value. 6323func (s *DescribeResourceOutput) SetType(v string) *DescribeResourceOutput { 6324 s.Type = &v 6325 return s 6326} 6327 6328type DescribeUserInput struct { 6329 _ struct{} `type:"structure"` 6330 6331 // The identifier for the organization under which the user exists. 6332 // 6333 // OrganizationId is a required field 6334 OrganizationId *string `type:"string" required:"true"` 6335 6336 // The identifier for the user to be described. 6337 // 6338 // UserId is a required field 6339 UserId *string `min:"12" type:"string" required:"true"` 6340} 6341 6342// String returns the string representation 6343func (s DescribeUserInput) String() string { 6344 return awsutil.Prettify(s) 6345} 6346 6347// GoString returns the string representation 6348func (s DescribeUserInput) GoString() string { 6349 return s.String() 6350} 6351 6352// Validate inspects the fields of the type to determine if they are valid. 6353func (s *DescribeUserInput) Validate() error { 6354 invalidParams := request.ErrInvalidParams{Context: "DescribeUserInput"} 6355 if s.OrganizationId == nil { 6356 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 6357 } 6358 if s.UserId == nil { 6359 invalidParams.Add(request.NewErrParamRequired("UserId")) 6360 } 6361 if s.UserId != nil && len(*s.UserId) < 12 { 6362 invalidParams.Add(request.NewErrParamMinLen("UserId", 12)) 6363 } 6364 6365 if invalidParams.Len() > 0 { 6366 return invalidParams 6367 } 6368 return nil 6369} 6370 6371// SetOrganizationId sets the OrganizationId field's value. 6372func (s *DescribeUserInput) SetOrganizationId(v string) *DescribeUserInput { 6373 s.OrganizationId = &v 6374 return s 6375} 6376 6377// SetUserId sets the UserId field's value. 6378func (s *DescribeUserInput) SetUserId(v string) *DescribeUserInput { 6379 s.UserId = &v 6380 return s 6381} 6382 6383type DescribeUserOutput struct { 6384 _ struct{} `type:"structure"` 6385 6386 // The date and time at which the user was disabled for Amazon WorkMail usage, 6387 // in UNIX epoch time format. 6388 DisabledDate *time.Time `type:"timestamp"` 6389 6390 // The display name of the user. 6391 DisplayName *string `type:"string"` 6392 6393 // The email of the user. 6394 Email *string `min:"1" type:"string"` 6395 6396 // The date and time at which the user was enabled for Amazon WorkMail usage, 6397 // in UNIX epoch time format. 6398 EnabledDate *time.Time `type:"timestamp"` 6399 6400 // The name for the user. 6401 Name *string `min:"1" type:"string"` 6402 6403 // The state of a user: enabled (registered to Amazon WorkMail) or disabled 6404 // (deregistered or never registered to WorkMail). 6405 State *string `type:"string" enum:"EntityState"` 6406 6407 // The identifier for the described user. 6408 UserId *string `min:"12" type:"string"` 6409 6410 // In certain cases, other entities are modeled as users. If interoperability 6411 // is enabled, resources are imported into Amazon WorkMail as users. Because 6412 // different WorkMail organizations rely on different directory types, administrators 6413 // can distinguish between an unregistered user (account is disabled and has 6414 // a user role) and the directory administrators. The values are USER, RESOURCE, 6415 // and SYSTEM_USER. 6416 UserRole *string `type:"string" enum:"UserRole"` 6417} 6418 6419// String returns the string representation 6420func (s DescribeUserOutput) String() string { 6421 return awsutil.Prettify(s) 6422} 6423 6424// GoString returns the string representation 6425func (s DescribeUserOutput) GoString() string { 6426 return s.String() 6427} 6428 6429// SetDisabledDate sets the DisabledDate field's value. 6430func (s *DescribeUserOutput) SetDisabledDate(v time.Time) *DescribeUserOutput { 6431 s.DisabledDate = &v 6432 return s 6433} 6434 6435// SetDisplayName sets the DisplayName field's value. 6436func (s *DescribeUserOutput) SetDisplayName(v string) *DescribeUserOutput { 6437 s.DisplayName = &v 6438 return s 6439} 6440 6441// SetEmail sets the Email field's value. 6442func (s *DescribeUserOutput) SetEmail(v string) *DescribeUserOutput { 6443 s.Email = &v 6444 return s 6445} 6446 6447// SetEnabledDate sets the EnabledDate field's value. 6448func (s *DescribeUserOutput) SetEnabledDate(v time.Time) *DescribeUserOutput { 6449 s.EnabledDate = &v 6450 return s 6451} 6452 6453// SetName sets the Name field's value. 6454func (s *DescribeUserOutput) SetName(v string) *DescribeUserOutput { 6455 s.Name = &v 6456 return s 6457} 6458 6459// SetState sets the State field's value. 6460func (s *DescribeUserOutput) SetState(v string) *DescribeUserOutput { 6461 s.State = &v 6462 return s 6463} 6464 6465// SetUserId sets the UserId field's value. 6466func (s *DescribeUserOutput) SetUserId(v string) *DescribeUserOutput { 6467 s.UserId = &v 6468 return s 6469} 6470 6471// SetUserRole sets the UserRole field's value. 6472func (s *DescribeUserOutput) SetUserRole(v string) *DescribeUserOutput { 6473 s.UserRole = &v 6474 return s 6475} 6476 6477// The directory service doesn't recognize the credentials supplied by WorkMail. 6478type DirectoryServiceAuthenticationFailedException struct { 6479 _ struct{} `type:"structure"` 6480 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6481 6482 Message_ *string `locationName:"Message" type:"string"` 6483} 6484 6485// String returns the string representation 6486func (s DirectoryServiceAuthenticationFailedException) String() string { 6487 return awsutil.Prettify(s) 6488} 6489 6490// GoString returns the string representation 6491func (s DirectoryServiceAuthenticationFailedException) GoString() string { 6492 return s.String() 6493} 6494 6495func newErrorDirectoryServiceAuthenticationFailedException(v protocol.ResponseMetadata) error { 6496 return &DirectoryServiceAuthenticationFailedException{ 6497 RespMetadata: v, 6498 } 6499} 6500 6501// Code returns the exception type name. 6502func (s *DirectoryServiceAuthenticationFailedException) Code() string { 6503 return "DirectoryServiceAuthenticationFailedException" 6504} 6505 6506// Message returns the exception's message. 6507func (s *DirectoryServiceAuthenticationFailedException) Message() string { 6508 if s.Message_ != nil { 6509 return *s.Message_ 6510 } 6511 return "" 6512} 6513 6514// OrigErr always returns nil, satisfies awserr.Error interface. 6515func (s *DirectoryServiceAuthenticationFailedException) OrigErr() error { 6516 return nil 6517} 6518 6519func (s *DirectoryServiceAuthenticationFailedException) Error() string { 6520 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6521} 6522 6523// Status code returns the HTTP status code for the request's response error. 6524func (s *DirectoryServiceAuthenticationFailedException) StatusCode() int { 6525 return s.RespMetadata.StatusCode 6526} 6527 6528// RequestID returns the service's response RequestID for request. 6529func (s *DirectoryServiceAuthenticationFailedException) RequestID() string { 6530 return s.RespMetadata.RequestID 6531} 6532 6533// The directory on which you are trying to perform operations isn't available. 6534type DirectoryUnavailableException struct { 6535 _ struct{} `type:"structure"` 6536 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6537 6538 Message_ *string `locationName:"Message" type:"string"` 6539} 6540 6541// String returns the string representation 6542func (s DirectoryUnavailableException) String() string { 6543 return awsutil.Prettify(s) 6544} 6545 6546// GoString returns the string representation 6547func (s DirectoryUnavailableException) GoString() string { 6548 return s.String() 6549} 6550 6551func newErrorDirectoryUnavailableException(v protocol.ResponseMetadata) error { 6552 return &DirectoryUnavailableException{ 6553 RespMetadata: v, 6554 } 6555} 6556 6557// Code returns the exception type name. 6558func (s *DirectoryUnavailableException) Code() string { 6559 return "DirectoryUnavailableException" 6560} 6561 6562// Message returns the exception's message. 6563func (s *DirectoryUnavailableException) Message() string { 6564 if s.Message_ != nil { 6565 return *s.Message_ 6566 } 6567 return "" 6568} 6569 6570// OrigErr always returns nil, satisfies awserr.Error interface. 6571func (s *DirectoryUnavailableException) OrigErr() error { 6572 return nil 6573} 6574 6575func (s *DirectoryUnavailableException) Error() string { 6576 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6577} 6578 6579// Status code returns the HTTP status code for the request's response error. 6580func (s *DirectoryUnavailableException) StatusCode() int { 6581 return s.RespMetadata.StatusCode 6582} 6583 6584// RequestID returns the service's response RequestID for request. 6585func (s *DirectoryUnavailableException) RequestID() string { 6586 return s.RespMetadata.RequestID 6587} 6588 6589type DisassociateDelegateFromResourceInput struct { 6590 _ struct{} `type:"structure"` 6591 6592 // The identifier for the member (user, group) to be removed from the resource's 6593 // delegates. 6594 // 6595 // EntityId is a required field 6596 EntityId *string `min:"12" type:"string" required:"true"` 6597 6598 // The identifier for the organization under which the resource exists. 6599 // 6600 // OrganizationId is a required field 6601 OrganizationId *string `type:"string" required:"true"` 6602 6603 // The identifier of the resource from which delegates' set members are removed. 6604 // 6605 // ResourceId is a required field 6606 ResourceId *string `type:"string" required:"true"` 6607} 6608 6609// String returns the string representation 6610func (s DisassociateDelegateFromResourceInput) String() string { 6611 return awsutil.Prettify(s) 6612} 6613 6614// GoString returns the string representation 6615func (s DisassociateDelegateFromResourceInput) GoString() string { 6616 return s.String() 6617} 6618 6619// Validate inspects the fields of the type to determine if they are valid. 6620func (s *DisassociateDelegateFromResourceInput) Validate() error { 6621 invalidParams := request.ErrInvalidParams{Context: "DisassociateDelegateFromResourceInput"} 6622 if s.EntityId == nil { 6623 invalidParams.Add(request.NewErrParamRequired("EntityId")) 6624 } 6625 if s.EntityId != nil && len(*s.EntityId) < 12 { 6626 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 6627 } 6628 if s.OrganizationId == nil { 6629 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 6630 } 6631 if s.ResourceId == nil { 6632 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 6633 } 6634 6635 if invalidParams.Len() > 0 { 6636 return invalidParams 6637 } 6638 return nil 6639} 6640 6641// SetEntityId sets the EntityId field's value. 6642func (s *DisassociateDelegateFromResourceInput) SetEntityId(v string) *DisassociateDelegateFromResourceInput { 6643 s.EntityId = &v 6644 return s 6645} 6646 6647// SetOrganizationId sets the OrganizationId field's value. 6648func (s *DisassociateDelegateFromResourceInput) SetOrganizationId(v string) *DisassociateDelegateFromResourceInput { 6649 s.OrganizationId = &v 6650 return s 6651} 6652 6653// SetResourceId sets the ResourceId field's value. 6654func (s *DisassociateDelegateFromResourceInput) SetResourceId(v string) *DisassociateDelegateFromResourceInput { 6655 s.ResourceId = &v 6656 return s 6657} 6658 6659type DisassociateDelegateFromResourceOutput struct { 6660 _ struct{} `type:"structure"` 6661} 6662 6663// String returns the string representation 6664func (s DisassociateDelegateFromResourceOutput) String() string { 6665 return awsutil.Prettify(s) 6666} 6667 6668// GoString returns the string representation 6669func (s DisassociateDelegateFromResourceOutput) GoString() string { 6670 return s.String() 6671} 6672 6673type DisassociateMemberFromGroupInput struct { 6674 _ struct{} `type:"structure"` 6675 6676 // The identifier for the group from which members are removed. 6677 // 6678 // GroupId is a required field 6679 GroupId *string `min:"12" type:"string" required:"true"` 6680 6681 // The identifier for the member to be removed to the group. 6682 // 6683 // MemberId is a required field 6684 MemberId *string `min:"12" type:"string" required:"true"` 6685 6686 // The identifier for the organization under which the group exists. 6687 // 6688 // OrganizationId is a required field 6689 OrganizationId *string `type:"string" required:"true"` 6690} 6691 6692// String returns the string representation 6693func (s DisassociateMemberFromGroupInput) String() string { 6694 return awsutil.Prettify(s) 6695} 6696 6697// GoString returns the string representation 6698func (s DisassociateMemberFromGroupInput) GoString() string { 6699 return s.String() 6700} 6701 6702// Validate inspects the fields of the type to determine if they are valid. 6703func (s *DisassociateMemberFromGroupInput) Validate() error { 6704 invalidParams := request.ErrInvalidParams{Context: "DisassociateMemberFromGroupInput"} 6705 if s.GroupId == nil { 6706 invalidParams.Add(request.NewErrParamRequired("GroupId")) 6707 } 6708 if s.GroupId != nil && len(*s.GroupId) < 12 { 6709 invalidParams.Add(request.NewErrParamMinLen("GroupId", 12)) 6710 } 6711 if s.MemberId == nil { 6712 invalidParams.Add(request.NewErrParamRequired("MemberId")) 6713 } 6714 if s.MemberId != nil && len(*s.MemberId) < 12 { 6715 invalidParams.Add(request.NewErrParamMinLen("MemberId", 12)) 6716 } 6717 if s.OrganizationId == nil { 6718 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 6719 } 6720 6721 if invalidParams.Len() > 0 { 6722 return invalidParams 6723 } 6724 return nil 6725} 6726 6727// SetGroupId sets the GroupId field's value. 6728func (s *DisassociateMemberFromGroupInput) SetGroupId(v string) *DisassociateMemberFromGroupInput { 6729 s.GroupId = &v 6730 return s 6731} 6732 6733// SetMemberId sets the MemberId field's value. 6734func (s *DisassociateMemberFromGroupInput) SetMemberId(v string) *DisassociateMemberFromGroupInput { 6735 s.MemberId = &v 6736 return s 6737} 6738 6739// SetOrganizationId sets the OrganizationId field's value. 6740func (s *DisassociateMemberFromGroupInput) SetOrganizationId(v string) *DisassociateMemberFromGroupInput { 6741 s.OrganizationId = &v 6742 return s 6743} 6744 6745type DisassociateMemberFromGroupOutput struct { 6746 _ struct{} `type:"structure"` 6747} 6748 6749// String returns the string representation 6750func (s DisassociateMemberFromGroupOutput) String() string { 6751 return awsutil.Prettify(s) 6752} 6753 6754// GoString returns the string representation 6755func (s DisassociateMemberFromGroupOutput) GoString() string { 6756 return s.String() 6757} 6758 6759// The email address that you're trying to assign is already created for a different 6760// user, group, or resource. 6761type EmailAddressInUseException struct { 6762 _ struct{} `type:"structure"` 6763 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6764 6765 Message_ *string `locationName:"Message" type:"string"` 6766} 6767 6768// String returns the string representation 6769func (s EmailAddressInUseException) String() string { 6770 return awsutil.Prettify(s) 6771} 6772 6773// GoString returns the string representation 6774func (s EmailAddressInUseException) GoString() string { 6775 return s.String() 6776} 6777 6778func newErrorEmailAddressInUseException(v protocol.ResponseMetadata) error { 6779 return &EmailAddressInUseException{ 6780 RespMetadata: v, 6781 } 6782} 6783 6784// Code returns the exception type name. 6785func (s *EmailAddressInUseException) Code() string { 6786 return "EmailAddressInUseException" 6787} 6788 6789// Message returns the exception's message. 6790func (s *EmailAddressInUseException) Message() string { 6791 if s.Message_ != nil { 6792 return *s.Message_ 6793 } 6794 return "" 6795} 6796 6797// OrigErr always returns nil, satisfies awserr.Error interface. 6798func (s *EmailAddressInUseException) OrigErr() error { 6799 return nil 6800} 6801 6802func (s *EmailAddressInUseException) Error() string { 6803 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6804} 6805 6806// Status code returns the HTTP status code for the request's response error. 6807func (s *EmailAddressInUseException) StatusCode() int { 6808 return s.RespMetadata.StatusCode 6809} 6810 6811// RequestID returns the service's response RequestID for request. 6812func (s *EmailAddressInUseException) RequestID() string { 6813 return s.RespMetadata.RequestID 6814} 6815 6816// The user, group, or resource that you're trying to register is already registered. 6817type EntityAlreadyRegisteredException struct { 6818 _ struct{} `type:"structure"` 6819 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6820 6821 Message_ *string `locationName:"Message" type:"string"` 6822} 6823 6824// String returns the string representation 6825func (s EntityAlreadyRegisteredException) String() string { 6826 return awsutil.Prettify(s) 6827} 6828 6829// GoString returns the string representation 6830func (s EntityAlreadyRegisteredException) GoString() string { 6831 return s.String() 6832} 6833 6834func newErrorEntityAlreadyRegisteredException(v protocol.ResponseMetadata) error { 6835 return &EntityAlreadyRegisteredException{ 6836 RespMetadata: v, 6837 } 6838} 6839 6840// Code returns the exception type name. 6841func (s *EntityAlreadyRegisteredException) Code() string { 6842 return "EntityAlreadyRegisteredException" 6843} 6844 6845// Message returns the exception's message. 6846func (s *EntityAlreadyRegisteredException) Message() string { 6847 if s.Message_ != nil { 6848 return *s.Message_ 6849 } 6850 return "" 6851} 6852 6853// OrigErr always returns nil, satisfies awserr.Error interface. 6854func (s *EntityAlreadyRegisteredException) OrigErr() error { 6855 return nil 6856} 6857 6858func (s *EntityAlreadyRegisteredException) Error() string { 6859 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6860} 6861 6862// Status code returns the HTTP status code for the request's response error. 6863func (s *EntityAlreadyRegisteredException) StatusCode() int { 6864 return s.RespMetadata.StatusCode 6865} 6866 6867// RequestID returns the service's response RequestID for request. 6868func (s *EntityAlreadyRegisteredException) RequestID() string { 6869 return s.RespMetadata.RequestID 6870} 6871 6872// The identifier supplied for the user, group, or resource does not exist in 6873// your organization. 6874type EntityNotFoundException struct { 6875 _ struct{} `type:"structure"` 6876 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6877 6878 Message_ *string `locationName:"Message" type:"string"` 6879} 6880 6881// String returns the string representation 6882func (s EntityNotFoundException) String() string { 6883 return awsutil.Prettify(s) 6884} 6885 6886// GoString returns the string representation 6887func (s EntityNotFoundException) GoString() string { 6888 return s.String() 6889} 6890 6891func newErrorEntityNotFoundException(v protocol.ResponseMetadata) error { 6892 return &EntityNotFoundException{ 6893 RespMetadata: v, 6894 } 6895} 6896 6897// Code returns the exception type name. 6898func (s *EntityNotFoundException) Code() string { 6899 return "EntityNotFoundException" 6900} 6901 6902// Message returns the exception's message. 6903func (s *EntityNotFoundException) Message() string { 6904 if s.Message_ != nil { 6905 return *s.Message_ 6906 } 6907 return "" 6908} 6909 6910// OrigErr always returns nil, satisfies awserr.Error interface. 6911func (s *EntityNotFoundException) OrigErr() error { 6912 return nil 6913} 6914 6915func (s *EntityNotFoundException) Error() string { 6916 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6917} 6918 6919// Status code returns the HTTP status code for the request's response error. 6920func (s *EntityNotFoundException) StatusCode() int { 6921 return s.RespMetadata.StatusCode 6922} 6923 6924// RequestID returns the service's response RequestID for request. 6925func (s *EntityNotFoundException) RequestID() string { 6926 return s.RespMetadata.RequestID 6927} 6928 6929// You are performing an operation on a user, group, or resource that isn't 6930// in the expected state, such as trying to delete an active user. 6931type EntityStateException struct { 6932 _ struct{} `type:"structure"` 6933 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6934 6935 Message_ *string `locationName:"Message" type:"string"` 6936} 6937 6938// String returns the string representation 6939func (s EntityStateException) String() string { 6940 return awsutil.Prettify(s) 6941} 6942 6943// GoString returns the string representation 6944func (s EntityStateException) GoString() string { 6945 return s.String() 6946} 6947 6948func newErrorEntityStateException(v protocol.ResponseMetadata) error { 6949 return &EntityStateException{ 6950 RespMetadata: v, 6951 } 6952} 6953 6954// Code returns the exception type name. 6955func (s *EntityStateException) Code() string { 6956 return "EntityStateException" 6957} 6958 6959// Message returns the exception's message. 6960func (s *EntityStateException) Message() string { 6961 if s.Message_ != nil { 6962 return *s.Message_ 6963 } 6964 return "" 6965} 6966 6967// OrigErr always returns nil, satisfies awserr.Error interface. 6968func (s *EntityStateException) OrigErr() error { 6969 return nil 6970} 6971 6972func (s *EntityStateException) Error() string { 6973 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6974} 6975 6976// Status code returns the HTTP status code for the request's response error. 6977func (s *EntityStateException) StatusCode() int { 6978 return s.RespMetadata.StatusCode 6979} 6980 6981// RequestID returns the service's response RequestID for request. 6982func (s *EntityStateException) RequestID() string { 6983 return s.RespMetadata.RequestID 6984} 6985 6986// The configuration applied to an organization's folders by its retention policy. 6987type FolderConfiguration struct { 6988 _ struct{} `type:"structure"` 6989 6990 // The action to take on the folder contents at the end of the folder configuration 6991 // period. 6992 // 6993 // Action is a required field 6994 Action *string `type:"string" required:"true" enum:"RetentionAction"` 6995 6996 // The folder name. 6997 // 6998 // Name is a required field 6999 Name *string `type:"string" required:"true" enum:"FolderName"` 7000 7001 // The period of time at which the folder configuration action is applied. 7002 Period *int64 `min:"1" type:"integer"` 7003} 7004 7005// String returns the string representation 7006func (s FolderConfiguration) String() string { 7007 return awsutil.Prettify(s) 7008} 7009 7010// GoString returns the string representation 7011func (s FolderConfiguration) GoString() string { 7012 return s.String() 7013} 7014 7015// Validate inspects the fields of the type to determine if they are valid. 7016func (s *FolderConfiguration) Validate() error { 7017 invalidParams := request.ErrInvalidParams{Context: "FolderConfiguration"} 7018 if s.Action == nil { 7019 invalidParams.Add(request.NewErrParamRequired("Action")) 7020 } 7021 if s.Name == nil { 7022 invalidParams.Add(request.NewErrParamRequired("Name")) 7023 } 7024 if s.Period != nil && *s.Period < 1 { 7025 invalidParams.Add(request.NewErrParamMinValue("Period", 1)) 7026 } 7027 7028 if invalidParams.Len() > 0 { 7029 return invalidParams 7030 } 7031 return nil 7032} 7033 7034// SetAction sets the Action field's value. 7035func (s *FolderConfiguration) SetAction(v string) *FolderConfiguration { 7036 s.Action = &v 7037 return s 7038} 7039 7040// SetName sets the Name field's value. 7041func (s *FolderConfiguration) SetName(v string) *FolderConfiguration { 7042 s.Name = &v 7043 return s 7044} 7045 7046// SetPeriod sets the Period field's value. 7047func (s *FolderConfiguration) SetPeriod(v int64) *FolderConfiguration { 7048 s.Period = &v 7049 return s 7050} 7051 7052type GetAccessControlEffectInput struct { 7053 _ struct{} `type:"structure"` 7054 7055 // The access protocol action. Valid values include ActiveSync, AutoDiscover, 7056 // EWS, IMAP, SMTP, WindowsOutlook, and WebMail. 7057 // 7058 // Action is a required field 7059 Action *string `min:"1" type:"string" required:"true"` 7060 7061 // The IPv4 address. 7062 // 7063 // IpAddress is a required field 7064 IpAddress *string `min:"1" type:"string" required:"true"` 7065 7066 // The identifier for the organization. 7067 // 7068 // OrganizationId is a required field 7069 OrganizationId *string `type:"string" required:"true"` 7070 7071 // The user ID. 7072 // 7073 // UserId is a required field 7074 UserId *string `min:"12" type:"string" required:"true"` 7075} 7076 7077// String returns the string representation 7078func (s GetAccessControlEffectInput) String() string { 7079 return awsutil.Prettify(s) 7080} 7081 7082// GoString returns the string representation 7083func (s GetAccessControlEffectInput) GoString() string { 7084 return s.String() 7085} 7086 7087// Validate inspects the fields of the type to determine if they are valid. 7088func (s *GetAccessControlEffectInput) Validate() error { 7089 invalidParams := request.ErrInvalidParams{Context: "GetAccessControlEffectInput"} 7090 if s.Action == nil { 7091 invalidParams.Add(request.NewErrParamRequired("Action")) 7092 } 7093 if s.Action != nil && len(*s.Action) < 1 { 7094 invalidParams.Add(request.NewErrParamMinLen("Action", 1)) 7095 } 7096 if s.IpAddress == nil { 7097 invalidParams.Add(request.NewErrParamRequired("IpAddress")) 7098 } 7099 if s.IpAddress != nil && len(*s.IpAddress) < 1 { 7100 invalidParams.Add(request.NewErrParamMinLen("IpAddress", 1)) 7101 } 7102 if s.OrganizationId == nil { 7103 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 7104 } 7105 if s.UserId == nil { 7106 invalidParams.Add(request.NewErrParamRequired("UserId")) 7107 } 7108 if s.UserId != nil && len(*s.UserId) < 12 { 7109 invalidParams.Add(request.NewErrParamMinLen("UserId", 12)) 7110 } 7111 7112 if invalidParams.Len() > 0 { 7113 return invalidParams 7114 } 7115 return nil 7116} 7117 7118// SetAction sets the Action field's value. 7119func (s *GetAccessControlEffectInput) SetAction(v string) *GetAccessControlEffectInput { 7120 s.Action = &v 7121 return s 7122} 7123 7124// SetIpAddress sets the IpAddress field's value. 7125func (s *GetAccessControlEffectInput) SetIpAddress(v string) *GetAccessControlEffectInput { 7126 s.IpAddress = &v 7127 return s 7128} 7129 7130// SetOrganizationId sets the OrganizationId field's value. 7131func (s *GetAccessControlEffectInput) SetOrganizationId(v string) *GetAccessControlEffectInput { 7132 s.OrganizationId = &v 7133 return s 7134} 7135 7136// SetUserId sets the UserId field's value. 7137func (s *GetAccessControlEffectInput) SetUserId(v string) *GetAccessControlEffectInput { 7138 s.UserId = &v 7139 return s 7140} 7141 7142type GetAccessControlEffectOutput struct { 7143 _ struct{} `type:"structure"` 7144 7145 // The rule effect. 7146 Effect *string `type:"string" enum:"AccessControlRuleEffect"` 7147 7148 // The rules that match the given parameters, resulting in an effect. 7149 MatchedRules []*string `type:"list"` 7150} 7151 7152// String returns the string representation 7153func (s GetAccessControlEffectOutput) String() string { 7154 return awsutil.Prettify(s) 7155} 7156 7157// GoString returns the string representation 7158func (s GetAccessControlEffectOutput) GoString() string { 7159 return s.String() 7160} 7161 7162// SetEffect sets the Effect field's value. 7163func (s *GetAccessControlEffectOutput) SetEffect(v string) *GetAccessControlEffectOutput { 7164 s.Effect = &v 7165 return s 7166} 7167 7168// SetMatchedRules sets the MatchedRules field's value. 7169func (s *GetAccessControlEffectOutput) SetMatchedRules(v []*string) *GetAccessControlEffectOutput { 7170 s.MatchedRules = v 7171 return s 7172} 7173 7174type GetDefaultRetentionPolicyInput struct { 7175 _ struct{} `type:"structure"` 7176 7177 // The organization ID. 7178 // 7179 // OrganizationId is a required field 7180 OrganizationId *string `type:"string" required:"true"` 7181} 7182 7183// String returns the string representation 7184func (s GetDefaultRetentionPolicyInput) String() string { 7185 return awsutil.Prettify(s) 7186} 7187 7188// GoString returns the string representation 7189func (s GetDefaultRetentionPolicyInput) GoString() string { 7190 return s.String() 7191} 7192 7193// Validate inspects the fields of the type to determine if they are valid. 7194func (s *GetDefaultRetentionPolicyInput) Validate() error { 7195 invalidParams := request.ErrInvalidParams{Context: "GetDefaultRetentionPolicyInput"} 7196 if s.OrganizationId == nil { 7197 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 7198 } 7199 7200 if invalidParams.Len() > 0 { 7201 return invalidParams 7202 } 7203 return nil 7204} 7205 7206// SetOrganizationId sets the OrganizationId field's value. 7207func (s *GetDefaultRetentionPolicyInput) SetOrganizationId(v string) *GetDefaultRetentionPolicyInput { 7208 s.OrganizationId = &v 7209 return s 7210} 7211 7212type GetDefaultRetentionPolicyOutput struct { 7213 _ struct{} `type:"structure"` 7214 7215 // The retention policy description. 7216 Description *string `type:"string"` 7217 7218 // The retention policy folder configurations. 7219 FolderConfigurations []*FolderConfiguration `type:"list"` 7220 7221 // The retention policy ID. 7222 Id *string `min:"1" type:"string"` 7223 7224 // The retention policy name. 7225 Name *string `min:"1" type:"string"` 7226} 7227 7228// String returns the string representation 7229func (s GetDefaultRetentionPolicyOutput) String() string { 7230 return awsutil.Prettify(s) 7231} 7232 7233// GoString returns the string representation 7234func (s GetDefaultRetentionPolicyOutput) GoString() string { 7235 return s.String() 7236} 7237 7238// SetDescription sets the Description field's value. 7239func (s *GetDefaultRetentionPolicyOutput) SetDescription(v string) *GetDefaultRetentionPolicyOutput { 7240 s.Description = &v 7241 return s 7242} 7243 7244// SetFolderConfigurations sets the FolderConfigurations field's value. 7245func (s *GetDefaultRetentionPolicyOutput) SetFolderConfigurations(v []*FolderConfiguration) *GetDefaultRetentionPolicyOutput { 7246 s.FolderConfigurations = v 7247 return s 7248} 7249 7250// SetId sets the Id field's value. 7251func (s *GetDefaultRetentionPolicyOutput) SetId(v string) *GetDefaultRetentionPolicyOutput { 7252 s.Id = &v 7253 return s 7254} 7255 7256// SetName sets the Name field's value. 7257func (s *GetDefaultRetentionPolicyOutput) SetName(v string) *GetDefaultRetentionPolicyOutput { 7258 s.Name = &v 7259 return s 7260} 7261 7262type GetMailboxDetailsInput struct { 7263 _ struct{} `type:"structure"` 7264 7265 // The identifier for the organization that contains the user whose mailbox 7266 // details are being requested. 7267 // 7268 // OrganizationId is a required field 7269 OrganizationId *string `type:"string" required:"true"` 7270 7271 // The identifier for the user whose mailbox details are being requested. 7272 // 7273 // UserId is a required field 7274 UserId *string `min:"12" type:"string" required:"true"` 7275} 7276 7277// String returns the string representation 7278func (s GetMailboxDetailsInput) String() string { 7279 return awsutil.Prettify(s) 7280} 7281 7282// GoString returns the string representation 7283func (s GetMailboxDetailsInput) GoString() string { 7284 return s.String() 7285} 7286 7287// Validate inspects the fields of the type to determine if they are valid. 7288func (s *GetMailboxDetailsInput) Validate() error { 7289 invalidParams := request.ErrInvalidParams{Context: "GetMailboxDetailsInput"} 7290 if s.OrganizationId == nil { 7291 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 7292 } 7293 if s.UserId == nil { 7294 invalidParams.Add(request.NewErrParamRequired("UserId")) 7295 } 7296 if s.UserId != nil && len(*s.UserId) < 12 { 7297 invalidParams.Add(request.NewErrParamMinLen("UserId", 12)) 7298 } 7299 7300 if invalidParams.Len() > 0 { 7301 return invalidParams 7302 } 7303 return nil 7304} 7305 7306// SetOrganizationId sets the OrganizationId field's value. 7307func (s *GetMailboxDetailsInput) SetOrganizationId(v string) *GetMailboxDetailsInput { 7308 s.OrganizationId = &v 7309 return s 7310} 7311 7312// SetUserId sets the UserId field's value. 7313func (s *GetMailboxDetailsInput) SetUserId(v string) *GetMailboxDetailsInput { 7314 s.UserId = &v 7315 return s 7316} 7317 7318type GetMailboxDetailsOutput struct { 7319 _ struct{} `type:"structure"` 7320 7321 // The maximum allowed mailbox size, in MB, for the specified user. 7322 MailboxQuota *int64 `min:"1" type:"integer"` 7323 7324 // The current mailbox size, in MB, for the specified user. 7325 MailboxSize *float64 `type:"double"` 7326} 7327 7328// String returns the string representation 7329func (s GetMailboxDetailsOutput) String() string { 7330 return awsutil.Prettify(s) 7331} 7332 7333// GoString returns the string representation 7334func (s GetMailboxDetailsOutput) GoString() string { 7335 return s.String() 7336} 7337 7338// SetMailboxQuota sets the MailboxQuota field's value. 7339func (s *GetMailboxDetailsOutput) SetMailboxQuota(v int64) *GetMailboxDetailsOutput { 7340 s.MailboxQuota = &v 7341 return s 7342} 7343 7344// SetMailboxSize sets the MailboxSize field's value. 7345func (s *GetMailboxDetailsOutput) SetMailboxSize(v float64) *GetMailboxDetailsOutput { 7346 s.MailboxSize = &v 7347 return s 7348} 7349 7350// The representation of an Amazon WorkMail group. 7351type Group struct { 7352 _ struct{} `type:"structure"` 7353 7354 // The date indicating when the group was disabled from Amazon WorkMail use. 7355 DisabledDate *time.Time `type:"timestamp"` 7356 7357 // The email of the group. 7358 Email *string `min:"1" type:"string"` 7359 7360 // The date indicating when the group was enabled for Amazon WorkMail use. 7361 EnabledDate *time.Time `type:"timestamp"` 7362 7363 // The identifier of the group. 7364 Id *string `min:"12" type:"string"` 7365 7366 // The name of the group. 7367 Name *string `min:"1" type:"string"` 7368 7369 // The state of the group, which can be ENABLED, DISABLED, or DELETED. 7370 State *string `type:"string" enum:"EntityState"` 7371} 7372 7373// String returns the string representation 7374func (s Group) String() string { 7375 return awsutil.Prettify(s) 7376} 7377 7378// GoString returns the string representation 7379func (s Group) GoString() string { 7380 return s.String() 7381} 7382 7383// SetDisabledDate sets the DisabledDate field's value. 7384func (s *Group) SetDisabledDate(v time.Time) *Group { 7385 s.DisabledDate = &v 7386 return s 7387} 7388 7389// SetEmail sets the Email field's value. 7390func (s *Group) SetEmail(v string) *Group { 7391 s.Email = &v 7392 return s 7393} 7394 7395// SetEnabledDate sets the EnabledDate field's value. 7396func (s *Group) SetEnabledDate(v time.Time) *Group { 7397 s.EnabledDate = &v 7398 return s 7399} 7400 7401// SetId sets the Id field's value. 7402func (s *Group) SetId(v string) *Group { 7403 s.Id = &v 7404 return s 7405} 7406 7407// SetName sets the Name field's value. 7408func (s *Group) SetName(v string) *Group { 7409 s.Name = &v 7410 return s 7411} 7412 7413// SetState sets the State field's value. 7414func (s *Group) SetState(v string) *Group { 7415 s.State = &v 7416 return s 7417} 7418 7419// The configuration for a resource isn't valid. A resource must either be able 7420// to auto-respond to requests or have at least one delegate associated that 7421// can do so on its behalf. 7422type InvalidConfigurationException struct { 7423 _ struct{} `type:"structure"` 7424 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7425 7426 Message_ *string `locationName:"Message" type:"string"` 7427} 7428 7429// String returns the string representation 7430func (s InvalidConfigurationException) String() string { 7431 return awsutil.Prettify(s) 7432} 7433 7434// GoString returns the string representation 7435func (s InvalidConfigurationException) GoString() string { 7436 return s.String() 7437} 7438 7439func newErrorInvalidConfigurationException(v protocol.ResponseMetadata) error { 7440 return &InvalidConfigurationException{ 7441 RespMetadata: v, 7442 } 7443} 7444 7445// Code returns the exception type name. 7446func (s *InvalidConfigurationException) Code() string { 7447 return "InvalidConfigurationException" 7448} 7449 7450// Message returns the exception's message. 7451func (s *InvalidConfigurationException) Message() string { 7452 if s.Message_ != nil { 7453 return *s.Message_ 7454 } 7455 return "" 7456} 7457 7458// OrigErr always returns nil, satisfies awserr.Error interface. 7459func (s *InvalidConfigurationException) OrigErr() error { 7460 return nil 7461} 7462 7463func (s *InvalidConfigurationException) Error() string { 7464 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 7465} 7466 7467// Status code returns the HTTP status code for the request's response error. 7468func (s *InvalidConfigurationException) StatusCode() int { 7469 return s.RespMetadata.StatusCode 7470} 7471 7472// RequestID returns the service's response RequestID for request. 7473func (s *InvalidConfigurationException) RequestID() string { 7474 return s.RespMetadata.RequestID 7475} 7476 7477// One or more of the input parameters don't match the service's restrictions. 7478type InvalidParameterException struct { 7479 _ struct{} `type:"structure"` 7480 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7481 7482 Message_ *string `locationName:"Message" type:"string"` 7483} 7484 7485// String returns the string representation 7486func (s InvalidParameterException) String() string { 7487 return awsutil.Prettify(s) 7488} 7489 7490// GoString returns the string representation 7491func (s InvalidParameterException) GoString() string { 7492 return s.String() 7493} 7494 7495func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { 7496 return &InvalidParameterException{ 7497 RespMetadata: v, 7498 } 7499} 7500 7501// Code returns the exception type name. 7502func (s *InvalidParameterException) Code() string { 7503 return "InvalidParameterException" 7504} 7505 7506// Message returns the exception's message. 7507func (s *InvalidParameterException) Message() string { 7508 if s.Message_ != nil { 7509 return *s.Message_ 7510 } 7511 return "" 7512} 7513 7514// OrigErr always returns nil, satisfies awserr.Error interface. 7515func (s *InvalidParameterException) OrigErr() error { 7516 return nil 7517} 7518 7519func (s *InvalidParameterException) Error() string { 7520 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 7521} 7522 7523// Status code returns the HTTP status code for the request's response error. 7524func (s *InvalidParameterException) StatusCode() int { 7525 return s.RespMetadata.StatusCode 7526} 7527 7528// RequestID returns the service's response RequestID for request. 7529func (s *InvalidParameterException) RequestID() string { 7530 return s.RespMetadata.RequestID 7531} 7532 7533// The supplied password doesn't match the minimum security constraints, such 7534// as length or use of special characters. 7535type InvalidPasswordException struct { 7536 _ struct{} `type:"structure"` 7537 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7538 7539 Message_ *string `locationName:"Message" type:"string"` 7540} 7541 7542// String returns the string representation 7543func (s InvalidPasswordException) String() string { 7544 return awsutil.Prettify(s) 7545} 7546 7547// GoString returns the string representation 7548func (s InvalidPasswordException) GoString() string { 7549 return s.String() 7550} 7551 7552func newErrorInvalidPasswordException(v protocol.ResponseMetadata) error { 7553 return &InvalidPasswordException{ 7554 RespMetadata: v, 7555 } 7556} 7557 7558// Code returns the exception type name. 7559func (s *InvalidPasswordException) Code() string { 7560 return "InvalidPasswordException" 7561} 7562 7563// Message returns the exception's message. 7564func (s *InvalidPasswordException) Message() string { 7565 if s.Message_ != nil { 7566 return *s.Message_ 7567 } 7568 return "" 7569} 7570 7571// OrigErr always returns nil, satisfies awserr.Error interface. 7572func (s *InvalidPasswordException) OrigErr() error { 7573 return nil 7574} 7575 7576func (s *InvalidPasswordException) Error() string { 7577 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 7578} 7579 7580// Status code returns the HTTP status code for the request's response error. 7581func (s *InvalidPasswordException) StatusCode() int { 7582 return s.RespMetadata.StatusCode 7583} 7584 7585// RequestID returns the service's response RequestID for request. 7586func (s *InvalidPasswordException) RequestID() string { 7587 return s.RespMetadata.RequestID 7588} 7589 7590// The request exceeds the limit of the resource. 7591type LimitExceededException struct { 7592 _ struct{} `type:"structure"` 7593 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 7594 7595 Message_ *string `locationName:"Message" type:"string"` 7596} 7597 7598// String returns the string representation 7599func (s LimitExceededException) String() string { 7600 return awsutil.Prettify(s) 7601} 7602 7603// GoString returns the string representation 7604func (s LimitExceededException) GoString() string { 7605 return s.String() 7606} 7607 7608func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 7609 return &LimitExceededException{ 7610 RespMetadata: v, 7611 } 7612} 7613 7614// Code returns the exception type name. 7615func (s *LimitExceededException) Code() string { 7616 return "LimitExceededException" 7617} 7618 7619// Message returns the exception's message. 7620func (s *LimitExceededException) Message() string { 7621 if s.Message_ != nil { 7622 return *s.Message_ 7623 } 7624 return "" 7625} 7626 7627// OrigErr always returns nil, satisfies awserr.Error interface. 7628func (s *LimitExceededException) OrigErr() error { 7629 return nil 7630} 7631 7632func (s *LimitExceededException) Error() string { 7633 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 7634} 7635 7636// Status code returns the HTTP status code for the request's response error. 7637func (s *LimitExceededException) StatusCode() int { 7638 return s.RespMetadata.StatusCode 7639} 7640 7641// RequestID returns the service's response RequestID for request. 7642func (s *LimitExceededException) RequestID() string { 7643 return s.RespMetadata.RequestID 7644} 7645 7646type ListAccessControlRulesInput struct { 7647 _ struct{} `type:"structure"` 7648 7649 // The identifier for the organization. 7650 // 7651 // OrganizationId is a required field 7652 OrganizationId *string `type:"string" required:"true"` 7653} 7654 7655// String returns the string representation 7656func (s ListAccessControlRulesInput) String() string { 7657 return awsutil.Prettify(s) 7658} 7659 7660// GoString returns the string representation 7661func (s ListAccessControlRulesInput) GoString() string { 7662 return s.String() 7663} 7664 7665// Validate inspects the fields of the type to determine if they are valid. 7666func (s *ListAccessControlRulesInput) Validate() error { 7667 invalidParams := request.ErrInvalidParams{Context: "ListAccessControlRulesInput"} 7668 if s.OrganizationId == nil { 7669 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 7670 } 7671 7672 if invalidParams.Len() > 0 { 7673 return invalidParams 7674 } 7675 return nil 7676} 7677 7678// SetOrganizationId sets the OrganizationId field's value. 7679func (s *ListAccessControlRulesInput) SetOrganizationId(v string) *ListAccessControlRulesInput { 7680 s.OrganizationId = &v 7681 return s 7682} 7683 7684type ListAccessControlRulesOutput struct { 7685 _ struct{} `type:"structure"` 7686 7687 // The access control rules. 7688 Rules []*AccessControlRule `type:"list"` 7689} 7690 7691// String returns the string representation 7692func (s ListAccessControlRulesOutput) String() string { 7693 return awsutil.Prettify(s) 7694} 7695 7696// GoString returns the string representation 7697func (s ListAccessControlRulesOutput) GoString() string { 7698 return s.String() 7699} 7700 7701// SetRules sets the Rules field's value. 7702func (s *ListAccessControlRulesOutput) SetRules(v []*AccessControlRule) *ListAccessControlRulesOutput { 7703 s.Rules = v 7704 return s 7705} 7706 7707type ListAliasesInput struct { 7708 _ struct{} `type:"structure"` 7709 7710 // The identifier for the entity for which to list the aliases. 7711 // 7712 // EntityId is a required field 7713 EntityId *string `min:"12" type:"string" required:"true"` 7714 7715 // The maximum number of results to return in a single call. 7716 MaxResults *int64 `min:"1" type:"integer"` 7717 7718 // The token to use to retrieve the next page of results. The first call does 7719 // not contain any tokens. 7720 NextToken *string `min:"1" type:"string"` 7721 7722 // The identifier for the organization under which the entity exists. 7723 // 7724 // OrganizationId is a required field 7725 OrganizationId *string `type:"string" required:"true"` 7726} 7727 7728// String returns the string representation 7729func (s ListAliasesInput) String() string { 7730 return awsutil.Prettify(s) 7731} 7732 7733// GoString returns the string representation 7734func (s ListAliasesInput) GoString() string { 7735 return s.String() 7736} 7737 7738// Validate inspects the fields of the type to determine if they are valid. 7739func (s *ListAliasesInput) Validate() error { 7740 invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"} 7741 if s.EntityId == nil { 7742 invalidParams.Add(request.NewErrParamRequired("EntityId")) 7743 } 7744 if s.EntityId != nil && len(*s.EntityId) < 12 { 7745 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 7746 } 7747 if s.MaxResults != nil && *s.MaxResults < 1 { 7748 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 7749 } 7750 if s.NextToken != nil && len(*s.NextToken) < 1 { 7751 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 7752 } 7753 if s.OrganizationId == nil { 7754 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 7755 } 7756 7757 if invalidParams.Len() > 0 { 7758 return invalidParams 7759 } 7760 return nil 7761} 7762 7763// SetEntityId sets the EntityId field's value. 7764func (s *ListAliasesInput) SetEntityId(v string) *ListAliasesInput { 7765 s.EntityId = &v 7766 return s 7767} 7768 7769// SetMaxResults sets the MaxResults field's value. 7770func (s *ListAliasesInput) SetMaxResults(v int64) *ListAliasesInput { 7771 s.MaxResults = &v 7772 return s 7773} 7774 7775// SetNextToken sets the NextToken field's value. 7776func (s *ListAliasesInput) SetNextToken(v string) *ListAliasesInput { 7777 s.NextToken = &v 7778 return s 7779} 7780 7781// SetOrganizationId sets the OrganizationId field's value. 7782func (s *ListAliasesInput) SetOrganizationId(v string) *ListAliasesInput { 7783 s.OrganizationId = &v 7784 return s 7785} 7786 7787type ListAliasesOutput struct { 7788 _ struct{} `type:"structure"` 7789 7790 // The entity's paginated aliases. 7791 Aliases []*string `type:"list"` 7792 7793 // The token to use to retrieve the next page of results. The value is "null" 7794 // when there are no more results to return. 7795 NextToken *string `min:"1" type:"string"` 7796} 7797 7798// String returns the string representation 7799func (s ListAliasesOutput) String() string { 7800 return awsutil.Prettify(s) 7801} 7802 7803// GoString returns the string representation 7804func (s ListAliasesOutput) GoString() string { 7805 return s.String() 7806} 7807 7808// SetAliases sets the Aliases field's value. 7809func (s *ListAliasesOutput) SetAliases(v []*string) *ListAliasesOutput { 7810 s.Aliases = v 7811 return s 7812} 7813 7814// SetNextToken sets the NextToken field's value. 7815func (s *ListAliasesOutput) SetNextToken(v string) *ListAliasesOutput { 7816 s.NextToken = &v 7817 return s 7818} 7819 7820type ListGroupMembersInput struct { 7821 _ struct{} `type:"structure"` 7822 7823 // The identifier for the group to which the members (users or groups) are associated. 7824 // 7825 // GroupId is a required field 7826 GroupId *string `min:"12" type:"string" required:"true"` 7827 7828 // The maximum number of results to return in a single call. 7829 MaxResults *int64 `min:"1" type:"integer"` 7830 7831 // The token to use to retrieve the next page of results. The first call does 7832 // not contain any tokens. 7833 NextToken *string `min:"1" type:"string"` 7834 7835 // The identifier for the organization under which the group exists. 7836 // 7837 // OrganizationId is a required field 7838 OrganizationId *string `type:"string" required:"true"` 7839} 7840 7841// String returns the string representation 7842func (s ListGroupMembersInput) String() string { 7843 return awsutil.Prettify(s) 7844} 7845 7846// GoString returns the string representation 7847func (s ListGroupMembersInput) GoString() string { 7848 return s.String() 7849} 7850 7851// Validate inspects the fields of the type to determine if they are valid. 7852func (s *ListGroupMembersInput) Validate() error { 7853 invalidParams := request.ErrInvalidParams{Context: "ListGroupMembersInput"} 7854 if s.GroupId == nil { 7855 invalidParams.Add(request.NewErrParamRequired("GroupId")) 7856 } 7857 if s.GroupId != nil && len(*s.GroupId) < 12 { 7858 invalidParams.Add(request.NewErrParamMinLen("GroupId", 12)) 7859 } 7860 if s.MaxResults != nil && *s.MaxResults < 1 { 7861 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 7862 } 7863 if s.NextToken != nil && len(*s.NextToken) < 1 { 7864 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 7865 } 7866 if s.OrganizationId == nil { 7867 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 7868 } 7869 7870 if invalidParams.Len() > 0 { 7871 return invalidParams 7872 } 7873 return nil 7874} 7875 7876// SetGroupId sets the GroupId field's value. 7877func (s *ListGroupMembersInput) SetGroupId(v string) *ListGroupMembersInput { 7878 s.GroupId = &v 7879 return s 7880} 7881 7882// SetMaxResults sets the MaxResults field's value. 7883func (s *ListGroupMembersInput) SetMaxResults(v int64) *ListGroupMembersInput { 7884 s.MaxResults = &v 7885 return s 7886} 7887 7888// SetNextToken sets the NextToken field's value. 7889func (s *ListGroupMembersInput) SetNextToken(v string) *ListGroupMembersInput { 7890 s.NextToken = &v 7891 return s 7892} 7893 7894// SetOrganizationId sets the OrganizationId field's value. 7895func (s *ListGroupMembersInput) SetOrganizationId(v string) *ListGroupMembersInput { 7896 s.OrganizationId = &v 7897 return s 7898} 7899 7900type ListGroupMembersOutput struct { 7901 _ struct{} `type:"structure"` 7902 7903 // The members associated to the group. 7904 Members []*Member `type:"list"` 7905 7906 // The token to use to retrieve the next page of results. The first call does 7907 // not contain any tokens. 7908 NextToken *string `min:"1" type:"string"` 7909} 7910 7911// String returns the string representation 7912func (s ListGroupMembersOutput) String() string { 7913 return awsutil.Prettify(s) 7914} 7915 7916// GoString returns the string representation 7917func (s ListGroupMembersOutput) GoString() string { 7918 return s.String() 7919} 7920 7921// SetMembers sets the Members field's value. 7922func (s *ListGroupMembersOutput) SetMembers(v []*Member) *ListGroupMembersOutput { 7923 s.Members = v 7924 return s 7925} 7926 7927// SetNextToken sets the NextToken field's value. 7928func (s *ListGroupMembersOutput) SetNextToken(v string) *ListGroupMembersOutput { 7929 s.NextToken = &v 7930 return s 7931} 7932 7933type ListGroupsInput struct { 7934 _ struct{} `type:"structure"` 7935 7936 // The maximum number of results to return in a single call. 7937 MaxResults *int64 `min:"1" type:"integer"` 7938 7939 // The token to use to retrieve the next page of results. The first call does 7940 // not contain any tokens. 7941 NextToken *string `min:"1" type:"string"` 7942 7943 // The identifier for the organization under which the groups exist. 7944 // 7945 // OrganizationId is a required field 7946 OrganizationId *string `type:"string" required:"true"` 7947} 7948 7949// String returns the string representation 7950func (s ListGroupsInput) String() string { 7951 return awsutil.Prettify(s) 7952} 7953 7954// GoString returns the string representation 7955func (s ListGroupsInput) GoString() string { 7956 return s.String() 7957} 7958 7959// Validate inspects the fields of the type to determine if they are valid. 7960func (s *ListGroupsInput) Validate() error { 7961 invalidParams := request.ErrInvalidParams{Context: "ListGroupsInput"} 7962 if s.MaxResults != nil && *s.MaxResults < 1 { 7963 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 7964 } 7965 if s.NextToken != nil && len(*s.NextToken) < 1 { 7966 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 7967 } 7968 if s.OrganizationId == nil { 7969 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 7970 } 7971 7972 if invalidParams.Len() > 0 { 7973 return invalidParams 7974 } 7975 return nil 7976} 7977 7978// SetMaxResults sets the MaxResults field's value. 7979func (s *ListGroupsInput) SetMaxResults(v int64) *ListGroupsInput { 7980 s.MaxResults = &v 7981 return s 7982} 7983 7984// SetNextToken sets the NextToken field's value. 7985func (s *ListGroupsInput) SetNextToken(v string) *ListGroupsInput { 7986 s.NextToken = &v 7987 return s 7988} 7989 7990// SetOrganizationId sets the OrganizationId field's value. 7991func (s *ListGroupsInput) SetOrganizationId(v string) *ListGroupsInput { 7992 s.OrganizationId = &v 7993 return s 7994} 7995 7996type ListGroupsOutput struct { 7997 _ struct{} `type:"structure"` 7998 7999 // The overview of groups for an organization. 8000 Groups []*Group `type:"list"` 8001 8002 // The token to use to retrieve the next page of results. The value is "null" 8003 // when there are no more results to return. 8004 NextToken *string `min:"1" type:"string"` 8005} 8006 8007// String returns the string representation 8008func (s ListGroupsOutput) String() string { 8009 return awsutil.Prettify(s) 8010} 8011 8012// GoString returns the string representation 8013func (s ListGroupsOutput) GoString() string { 8014 return s.String() 8015} 8016 8017// SetGroups sets the Groups field's value. 8018func (s *ListGroupsOutput) SetGroups(v []*Group) *ListGroupsOutput { 8019 s.Groups = v 8020 return s 8021} 8022 8023// SetNextToken sets the NextToken field's value. 8024func (s *ListGroupsOutput) SetNextToken(v string) *ListGroupsOutput { 8025 s.NextToken = &v 8026 return s 8027} 8028 8029type ListMailboxPermissionsInput struct { 8030 _ struct{} `type:"structure"` 8031 8032 // The identifier of the user, group, or resource for which to list mailbox 8033 // permissions. 8034 // 8035 // EntityId is a required field 8036 EntityId *string `min:"12" type:"string" required:"true"` 8037 8038 // The maximum number of results to return in a single call. 8039 MaxResults *int64 `min:"1" type:"integer"` 8040 8041 // The token to use to retrieve the next page of results. The first call does 8042 // not contain any tokens. 8043 NextToken *string `min:"1" type:"string"` 8044 8045 // The identifier of the organization under which the user, group, or resource 8046 // exists. 8047 // 8048 // OrganizationId is a required field 8049 OrganizationId *string `type:"string" required:"true"` 8050} 8051 8052// String returns the string representation 8053func (s ListMailboxPermissionsInput) String() string { 8054 return awsutil.Prettify(s) 8055} 8056 8057// GoString returns the string representation 8058func (s ListMailboxPermissionsInput) GoString() string { 8059 return s.String() 8060} 8061 8062// Validate inspects the fields of the type to determine if they are valid. 8063func (s *ListMailboxPermissionsInput) Validate() error { 8064 invalidParams := request.ErrInvalidParams{Context: "ListMailboxPermissionsInput"} 8065 if s.EntityId == nil { 8066 invalidParams.Add(request.NewErrParamRequired("EntityId")) 8067 } 8068 if s.EntityId != nil && len(*s.EntityId) < 12 { 8069 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 8070 } 8071 if s.MaxResults != nil && *s.MaxResults < 1 { 8072 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 8073 } 8074 if s.NextToken != nil && len(*s.NextToken) < 1 { 8075 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 8076 } 8077 if s.OrganizationId == nil { 8078 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 8079 } 8080 8081 if invalidParams.Len() > 0 { 8082 return invalidParams 8083 } 8084 return nil 8085} 8086 8087// SetEntityId sets the EntityId field's value. 8088func (s *ListMailboxPermissionsInput) SetEntityId(v string) *ListMailboxPermissionsInput { 8089 s.EntityId = &v 8090 return s 8091} 8092 8093// SetMaxResults sets the MaxResults field's value. 8094func (s *ListMailboxPermissionsInput) SetMaxResults(v int64) *ListMailboxPermissionsInput { 8095 s.MaxResults = &v 8096 return s 8097} 8098 8099// SetNextToken sets the NextToken field's value. 8100func (s *ListMailboxPermissionsInput) SetNextToken(v string) *ListMailboxPermissionsInput { 8101 s.NextToken = &v 8102 return s 8103} 8104 8105// SetOrganizationId sets the OrganizationId field's value. 8106func (s *ListMailboxPermissionsInput) SetOrganizationId(v string) *ListMailboxPermissionsInput { 8107 s.OrganizationId = &v 8108 return s 8109} 8110 8111type ListMailboxPermissionsOutput struct { 8112 _ struct{} `type:"structure"` 8113 8114 // The token to use to retrieve the next page of results. The value is "null" 8115 // when there are no more results to return. 8116 NextToken *string `min:"1" type:"string"` 8117 8118 // One page of the user, group, or resource mailbox permissions. 8119 Permissions []*Permission `type:"list"` 8120} 8121 8122// String returns the string representation 8123func (s ListMailboxPermissionsOutput) String() string { 8124 return awsutil.Prettify(s) 8125} 8126 8127// GoString returns the string representation 8128func (s ListMailboxPermissionsOutput) GoString() string { 8129 return s.String() 8130} 8131 8132// SetNextToken sets the NextToken field's value. 8133func (s *ListMailboxPermissionsOutput) SetNextToken(v string) *ListMailboxPermissionsOutput { 8134 s.NextToken = &v 8135 return s 8136} 8137 8138// SetPermissions sets the Permissions field's value. 8139func (s *ListMailboxPermissionsOutput) SetPermissions(v []*Permission) *ListMailboxPermissionsOutput { 8140 s.Permissions = v 8141 return s 8142} 8143 8144type ListOrganizationsInput struct { 8145 _ struct{} `type:"structure"` 8146 8147 // The maximum number of results to return in a single call. 8148 MaxResults *int64 `min:"1" type:"integer"` 8149 8150 // The token to use to retrieve the next page of results. The first call does 8151 // not contain any tokens. 8152 NextToken *string `min:"1" type:"string"` 8153} 8154 8155// String returns the string representation 8156func (s ListOrganizationsInput) String() string { 8157 return awsutil.Prettify(s) 8158} 8159 8160// GoString returns the string representation 8161func (s ListOrganizationsInput) GoString() string { 8162 return s.String() 8163} 8164 8165// Validate inspects the fields of the type to determine if they are valid. 8166func (s *ListOrganizationsInput) Validate() error { 8167 invalidParams := request.ErrInvalidParams{Context: "ListOrganizationsInput"} 8168 if s.MaxResults != nil && *s.MaxResults < 1 { 8169 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 8170 } 8171 if s.NextToken != nil && len(*s.NextToken) < 1 { 8172 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 8173 } 8174 8175 if invalidParams.Len() > 0 { 8176 return invalidParams 8177 } 8178 return nil 8179} 8180 8181// SetMaxResults sets the MaxResults field's value. 8182func (s *ListOrganizationsInput) SetMaxResults(v int64) *ListOrganizationsInput { 8183 s.MaxResults = &v 8184 return s 8185} 8186 8187// SetNextToken sets the NextToken field's value. 8188func (s *ListOrganizationsInput) SetNextToken(v string) *ListOrganizationsInput { 8189 s.NextToken = &v 8190 return s 8191} 8192 8193type ListOrganizationsOutput struct { 8194 _ struct{} `type:"structure"` 8195 8196 // The token to use to retrieve the next page of results. The value is "null" 8197 // when there are no more results to return. 8198 NextToken *string `min:"1" type:"string"` 8199 8200 // The overview of owned organizations presented as a list of organization summaries. 8201 OrganizationSummaries []*OrganizationSummary `type:"list"` 8202} 8203 8204// String returns the string representation 8205func (s ListOrganizationsOutput) String() string { 8206 return awsutil.Prettify(s) 8207} 8208 8209// GoString returns the string representation 8210func (s ListOrganizationsOutput) GoString() string { 8211 return s.String() 8212} 8213 8214// SetNextToken sets the NextToken field's value. 8215func (s *ListOrganizationsOutput) SetNextToken(v string) *ListOrganizationsOutput { 8216 s.NextToken = &v 8217 return s 8218} 8219 8220// SetOrganizationSummaries sets the OrganizationSummaries field's value. 8221func (s *ListOrganizationsOutput) SetOrganizationSummaries(v []*OrganizationSummary) *ListOrganizationsOutput { 8222 s.OrganizationSummaries = v 8223 return s 8224} 8225 8226type ListResourceDelegatesInput struct { 8227 _ struct{} `type:"structure"` 8228 8229 // The number of maximum results in a page. 8230 MaxResults *int64 `min:"1" type:"integer"` 8231 8232 // The token used to paginate through the delegates associated with a resource. 8233 NextToken *string `min:"1" type:"string"` 8234 8235 // The identifier for the organization that contains the resource for which 8236 // delegates are listed. 8237 // 8238 // OrganizationId is a required field 8239 OrganizationId *string `type:"string" required:"true"` 8240 8241 // The identifier for the resource whose delegates are listed. 8242 // 8243 // ResourceId is a required field 8244 ResourceId *string `min:"12" type:"string" required:"true"` 8245} 8246 8247// String returns the string representation 8248func (s ListResourceDelegatesInput) String() string { 8249 return awsutil.Prettify(s) 8250} 8251 8252// GoString returns the string representation 8253func (s ListResourceDelegatesInput) GoString() string { 8254 return s.String() 8255} 8256 8257// Validate inspects the fields of the type to determine if they are valid. 8258func (s *ListResourceDelegatesInput) Validate() error { 8259 invalidParams := request.ErrInvalidParams{Context: "ListResourceDelegatesInput"} 8260 if s.MaxResults != nil && *s.MaxResults < 1 { 8261 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 8262 } 8263 if s.NextToken != nil && len(*s.NextToken) < 1 { 8264 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 8265 } 8266 if s.OrganizationId == nil { 8267 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 8268 } 8269 if s.ResourceId == nil { 8270 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 8271 } 8272 if s.ResourceId != nil && len(*s.ResourceId) < 12 { 8273 invalidParams.Add(request.NewErrParamMinLen("ResourceId", 12)) 8274 } 8275 8276 if invalidParams.Len() > 0 { 8277 return invalidParams 8278 } 8279 return nil 8280} 8281 8282// SetMaxResults sets the MaxResults field's value. 8283func (s *ListResourceDelegatesInput) SetMaxResults(v int64) *ListResourceDelegatesInput { 8284 s.MaxResults = &v 8285 return s 8286} 8287 8288// SetNextToken sets the NextToken field's value. 8289func (s *ListResourceDelegatesInput) SetNextToken(v string) *ListResourceDelegatesInput { 8290 s.NextToken = &v 8291 return s 8292} 8293 8294// SetOrganizationId sets the OrganizationId field's value. 8295func (s *ListResourceDelegatesInput) SetOrganizationId(v string) *ListResourceDelegatesInput { 8296 s.OrganizationId = &v 8297 return s 8298} 8299 8300// SetResourceId sets the ResourceId field's value. 8301func (s *ListResourceDelegatesInput) SetResourceId(v string) *ListResourceDelegatesInput { 8302 s.ResourceId = &v 8303 return s 8304} 8305 8306type ListResourceDelegatesOutput struct { 8307 _ struct{} `type:"structure"` 8308 8309 // One page of the resource's delegates. 8310 Delegates []*Delegate `type:"list"` 8311 8312 // The token used to paginate through the delegates associated with a resource. 8313 // While results are still available, it has an associated value. When the last 8314 // page is reached, the token is empty. 8315 NextToken *string `min:"1" type:"string"` 8316} 8317 8318// String returns the string representation 8319func (s ListResourceDelegatesOutput) String() string { 8320 return awsutil.Prettify(s) 8321} 8322 8323// GoString returns the string representation 8324func (s ListResourceDelegatesOutput) GoString() string { 8325 return s.String() 8326} 8327 8328// SetDelegates sets the Delegates field's value. 8329func (s *ListResourceDelegatesOutput) SetDelegates(v []*Delegate) *ListResourceDelegatesOutput { 8330 s.Delegates = v 8331 return s 8332} 8333 8334// SetNextToken sets the NextToken field's value. 8335func (s *ListResourceDelegatesOutput) SetNextToken(v string) *ListResourceDelegatesOutput { 8336 s.NextToken = &v 8337 return s 8338} 8339 8340type ListResourcesInput struct { 8341 _ struct{} `type:"structure"` 8342 8343 // The maximum number of results to return in a single call. 8344 MaxResults *int64 `min:"1" type:"integer"` 8345 8346 // The token to use to retrieve the next page of results. The first call does 8347 // not contain any tokens. 8348 NextToken *string `min:"1" type:"string"` 8349 8350 // The identifier for the organization under which the resources exist. 8351 // 8352 // OrganizationId is a required field 8353 OrganizationId *string `type:"string" required:"true"` 8354} 8355 8356// String returns the string representation 8357func (s ListResourcesInput) String() string { 8358 return awsutil.Prettify(s) 8359} 8360 8361// GoString returns the string representation 8362func (s ListResourcesInput) GoString() string { 8363 return s.String() 8364} 8365 8366// Validate inspects the fields of the type to determine if they are valid. 8367func (s *ListResourcesInput) Validate() error { 8368 invalidParams := request.ErrInvalidParams{Context: "ListResourcesInput"} 8369 if s.MaxResults != nil && *s.MaxResults < 1 { 8370 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 8371 } 8372 if s.NextToken != nil && len(*s.NextToken) < 1 { 8373 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 8374 } 8375 if s.OrganizationId == nil { 8376 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 8377 } 8378 8379 if invalidParams.Len() > 0 { 8380 return invalidParams 8381 } 8382 return nil 8383} 8384 8385// SetMaxResults sets the MaxResults field's value. 8386func (s *ListResourcesInput) SetMaxResults(v int64) *ListResourcesInput { 8387 s.MaxResults = &v 8388 return s 8389} 8390 8391// SetNextToken sets the NextToken field's value. 8392func (s *ListResourcesInput) SetNextToken(v string) *ListResourcesInput { 8393 s.NextToken = &v 8394 return s 8395} 8396 8397// SetOrganizationId sets the OrganizationId field's value. 8398func (s *ListResourcesInput) SetOrganizationId(v string) *ListResourcesInput { 8399 s.OrganizationId = &v 8400 return s 8401} 8402 8403type ListResourcesOutput struct { 8404 _ struct{} `type:"structure"` 8405 8406 // The token used to paginate through all the organization's resources. While 8407 // results are still available, it has an associated value. When the last page 8408 // is reached, the token is empty. 8409 NextToken *string `min:"1" type:"string"` 8410 8411 // One page of the organization's resource representation. 8412 Resources []*Resource `type:"list"` 8413} 8414 8415// String returns the string representation 8416func (s ListResourcesOutput) String() string { 8417 return awsutil.Prettify(s) 8418} 8419 8420// GoString returns the string representation 8421func (s ListResourcesOutput) GoString() string { 8422 return s.String() 8423} 8424 8425// SetNextToken sets the NextToken field's value. 8426func (s *ListResourcesOutput) SetNextToken(v string) *ListResourcesOutput { 8427 s.NextToken = &v 8428 return s 8429} 8430 8431// SetResources sets the Resources field's value. 8432func (s *ListResourcesOutput) SetResources(v []*Resource) *ListResourcesOutput { 8433 s.Resources = v 8434 return s 8435} 8436 8437type ListTagsForResourceInput struct { 8438 _ struct{} `type:"structure"` 8439 8440 // The resource ARN. 8441 // 8442 // ResourceARN is a required field 8443 ResourceARN *string `min:"1" type:"string" required:"true"` 8444} 8445 8446// String returns the string representation 8447func (s ListTagsForResourceInput) String() string { 8448 return awsutil.Prettify(s) 8449} 8450 8451// GoString returns the string representation 8452func (s ListTagsForResourceInput) GoString() string { 8453 return s.String() 8454} 8455 8456// Validate inspects the fields of the type to determine if they are valid. 8457func (s *ListTagsForResourceInput) Validate() error { 8458 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 8459 if s.ResourceARN == nil { 8460 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 8461 } 8462 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 8463 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 8464 } 8465 8466 if invalidParams.Len() > 0 { 8467 return invalidParams 8468 } 8469 return nil 8470} 8471 8472// SetResourceARN sets the ResourceARN field's value. 8473func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { 8474 s.ResourceARN = &v 8475 return s 8476} 8477 8478type ListTagsForResourceOutput struct { 8479 _ struct{} `type:"structure"` 8480 8481 // A list of tag key-value pairs. 8482 Tags []*Tag `type:"list"` 8483} 8484 8485// String returns the string representation 8486func (s ListTagsForResourceOutput) String() string { 8487 return awsutil.Prettify(s) 8488} 8489 8490// GoString returns the string representation 8491func (s ListTagsForResourceOutput) GoString() string { 8492 return s.String() 8493} 8494 8495// SetTags sets the Tags field's value. 8496func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 8497 s.Tags = v 8498 return s 8499} 8500 8501type ListUsersInput struct { 8502 _ struct{} `type:"structure"` 8503 8504 // The maximum number of results to return in a single call. 8505 MaxResults *int64 `min:"1" type:"integer"` 8506 8507 // The token to use to retrieve the next page of results. The first call does 8508 // not contain any tokens. 8509 NextToken *string `min:"1" type:"string"` 8510 8511 // The identifier for the organization under which the users exist. 8512 // 8513 // OrganizationId is a required field 8514 OrganizationId *string `type:"string" required:"true"` 8515} 8516 8517// String returns the string representation 8518func (s ListUsersInput) String() string { 8519 return awsutil.Prettify(s) 8520} 8521 8522// GoString returns the string representation 8523func (s ListUsersInput) GoString() string { 8524 return s.String() 8525} 8526 8527// Validate inspects the fields of the type to determine if they are valid. 8528func (s *ListUsersInput) Validate() error { 8529 invalidParams := request.ErrInvalidParams{Context: "ListUsersInput"} 8530 if s.MaxResults != nil && *s.MaxResults < 1 { 8531 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 8532 } 8533 if s.NextToken != nil && len(*s.NextToken) < 1 { 8534 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 8535 } 8536 if s.OrganizationId == nil { 8537 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 8538 } 8539 8540 if invalidParams.Len() > 0 { 8541 return invalidParams 8542 } 8543 return nil 8544} 8545 8546// SetMaxResults sets the MaxResults field's value. 8547func (s *ListUsersInput) SetMaxResults(v int64) *ListUsersInput { 8548 s.MaxResults = &v 8549 return s 8550} 8551 8552// SetNextToken sets the NextToken field's value. 8553func (s *ListUsersInput) SetNextToken(v string) *ListUsersInput { 8554 s.NextToken = &v 8555 return s 8556} 8557 8558// SetOrganizationId sets the OrganizationId field's value. 8559func (s *ListUsersInput) SetOrganizationId(v string) *ListUsersInput { 8560 s.OrganizationId = &v 8561 return s 8562} 8563 8564type ListUsersOutput struct { 8565 _ struct{} `type:"structure"` 8566 8567 // The token to use to retrieve the next page of results. This value is `null` 8568 // when there are no more results to return. 8569 NextToken *string `min:"1" type:"string"` 8570 8571 // The overview of users for an organization. 8572 Users []*User `type:"list"` 8573} 8574 8575// String returns the string representation 8576func (s ListUsersOutput) String() string { 8577 return awsutil.Prettify(s) 8578} 8579 8580// GoString returns the string representation 8581func (s ListUsersOutput) GoString() string { 8582 return s.String() 8583} 8584 8585// SetNextToken sets the NextToken field's value. 8586func (s *ListUsersOutput) SetNextToken(v string) *ListUsersOutput { 8587 s.NextToken = &v 8588 return s 8589} 8590 8591// SetUsers sets the Users field's value. 8592func (s *ListUsersOutput) SetUsers(v []*User) *ListUsersOutput { 8593 s.Users = v 8594 return s 8595} 8596 8597// For an email or alias to be created in Amazon WorkMail, the included domain 8598// must be defined in the organization. 8599type MailDomainNotFoundException struct { 8600 _ struct{} `type:"structure"` 8601 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 8602 8603 Message_ *string `locationName:"Message" type:"string"` 8604} 8605 8606// String returns the string representation 8607func (s MailDomainNotFoundException) String() string { 8608 return awsutil.Prettify(s) 8609} 8610 8611// GoString returns the string representation 8612func (s MailDomainNotFoundException) GoString() string { 8613 return s.String() 8614} 8615 8616func newErrorMailDomainNotFoundException(v protocol.ResponseMetadata) error { 8617 return &MailDomainNotFoundException{ 8618 RespMetadata: v, 8619 } 8620} 8621 8622// Code returns the exception type name. 8623func (s *MailDomainNotFoundException) Code() string { 8624 return "MailDomainNotFoundException" 8625} 8626 8627// Message returns the exception's message. 8628func (s *MailDomainNotFoundException) Message() string { 8629 if s.Message_ != nil { 8630 return *s.Message_ 8631 } 8632 return "" 8633} 8634 8635// OrigErr always returns nil, satisfies awserr.Error interface. 8636func (s *MailDomainNotFoundException) OrigErr() error { 8637 return nil 8638} 8639 8640func (s *MailDomainNotFoundException) Error() string { 8641 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 8642} 8643 8644// Status code returns the HTTP status code for the request's response error. 8645func (s *MailDomainNotFoundException) StatusCode() int { 8646 return s.RespMetadata.StatusCode 8647} 8648 8649// RequestID returns the service's response RequestID for request. 8650func (s *MailDomainNotFoundException) RequestID() string { 8651 return s.RespMetadata.RequestID 8652} 8653 8654// After a domain has been added to the organization, it must be verified. The 8655// domain is not yet verified. 8656type MailDomainStateException struct { 8657 _ struct{} `type:"structure"` 8658 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 8659 8660 Message_ *string `locationName:"Message" type:"string"` 8661} 8662 8663// String returns the string representation 8664func (s MailDomainStateException) String() string { 8665 return awsutil.Prettify(s) 8666} 8667 8668// GoString returns the string representation 8669func (s MailDomainStateException) GoString() string { 8670 return s.String() 8671} 8672 8673func newErrorMailDomainStateException(v protocol.ResponseMetadata) error { 8674 return &MailDomainStateException{ 8675 RespMetadata: v, 8676 } 8677} 8678 8679// Code returns the exception type name. 8680func (s *MailDomainStateException) Code() string { 8681 return "MailDomainStateException" 8682} 8683 8684// Message returns the exception's message. 8685func (s *MailDomainStateException) Message() string { 8686 if s.Message_ != nil { 8687 return *s.Message_ 8688 } 8689 return "" 8690} 8691 8692// OrigErr always returns nil, satisfies awserr.Error interface. 8693func (s *MailDomainStateException) OrigErr() error { 8694 return nil 8695} 8696 8697func (s *MailDomainStateException) Error() string { 8698 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 8699} 8700 8701// Status code returns the HTTP status code for the request's response error. 8702func (s *MailDomainStateException) StatusCode() int { 8703 return s.RespMetadata.StatusCode 8704} 8705 8706// RequestID returns the service's response RequestID for request. 8707func (s *MailDomainStateException) RequestID() string { 8708 return s.RespMetadata.RequestID 8709} 8710 8711// The representation of a user or group. 8712type Member struct { 8713 _ struct{} `type:"structure"` 8714 8715 // The date indicating when the member was disabled from Amazon WorkMail use. 8716 DisabledDate *time.Time `type:"timestamp"` 8717 8718 // The date indicating when the member was enabled for Amazon WorkMail use. 8719 EnabledDate *time.Time `type:"timestamp"` 8720 8721 // The identifier of the member. 8722 Id *string `type:"string"` 8723 8724 // The name of the member. 8725 Name *string `type:"string"` 8726 8727 // The state of the member, which can be ENABLED, DISABLED, or DELETED. 8728 State *string `type:"string" enum:"EntityState"` 8729 8730 // A member can be a user or group. 8731 Type *string `type:"string" enum:"MemberType"` 8732} 8733 8734// String returns the string representation 8735func (s Member) String() string { 8736 return awsutil.Prettify(s) 8737} 8738 8739// GoString returns the string representation 8740func (s Member) GoString() string { 8741 return s.String() 8742} 8743 8744// SetDisabledDate sets the DisabledDate field's value. 8745func (s *Member) SetDisabledDate(v time.Time) *Member { 8746 s.DisabledDate = &v 8747 return s 8748} 8749 8750// SetEnabledDate sets the EnabledDate field's value. 8751func (s *Member) SetEnabledDate(v time.Time) *Member { 8752 s.EnabledDate = &v 8753 return s 8754} 8755 8756// SetId sets the Id field's value. 8757func (s *Member) SetId(v string) *Member { 8758 s.Id = &v 8759 return s 8760} 8761 8762// SetName sets the Name field's value. 8763func (s *Member) SetName(v string) *Member { 8764 s.Name = &v 8765 return s 8766} 8767 8768// SetState sets the State field's value. 8769func (s *Member) SetState(v string) *Member { 8770 s.State = &v 8771 return s 8772} 8773 8774// SetType sets the Type field's value. 8775func (s *Member) SetType(v string) *Member { 8776 s.Type = &v 8777 return s 8778} 8779 8780// The user, group, or resource name isn't unique in Amazon WorkMail. 8781type NameAvailabilityException struct { 8782 _ struct{} `type:"structure"` 8783 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 8784 8785 Message_ *string `locationName:"Message" type:"string"` 8786} 8787 8788// String returns the string representation 8789func (s NameAvailabilityException) String() string { 8790 return awsutil.Prettify(s) 8791} 8792 8793// GoString returns the string representation 8794func (s NameAvailabilityException) GoString() string { 8795 return s.String() 8796} 8797 8798func newErrorNameAvailabilityException(v protocol.ResponseMetadata) error { 8799 return &NameAvailabilityException{ 8800 RespMetadata: v, 8801 } 8802} 8803 8804// Code returns the exception type name. 8805func (s *NameAvailabilityException) Code() string { 8806 return "NameAvailabilityException" 8807} 8808 8809// Message returns the exception's message. 8810func (s *NameAvailabilityException) Message() string { 8811 if s.Message_ != nil { 8812 return *s.Message_ 8813 } 8814 return "" 8815} 8816 8817// OrigErr always returns nil, satisfies awserr.Error interface. 8818func (s *NameAvailabilityException) OrigErr() error { 8819 return nil 8820} 8821 8822func (s *NameAvailabilityException) Error() string { 8823 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 8824} 8825 8826// Status code returns the HTTP status code for the request's response error. 8827func (s *NameAvailabilityException) StatusCode() int { 8828 return s.RespMetadata.StatusCode 8829} 8830 8831// RequestID returns the service's response RequestID for request. 8832func (s *NameAvailabilityException) RequestID() string { 8833 return s.RespMetadata.RequestID 8834} 8835 8836// An operation received a valid organization identifier that either doesn't 8837// belong or exist in the system. 8838type OrganizationNotFoundException struct { 8839 _ struct{} `type:"structure"` 8840 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 8841 8842 Message_ *string `locationName:"Message" type:"string"` 8843} 8844 8845// String returns the string representation 8846func (s OrganizationNotFoundException) String() string { 8847 return awsutil.Prettify(s) 8848} 8849 8850// GoString returns the string representation 8851func (s OrganizationNotFoundException) GoString() string { 8852 return s.String() 8853} 8854 8855func newErrorOrganizationNotFoundException(v protocol.ResponseMetadata) error { 8856 return &OrganizationNotFoundException{ 8857 RespMetadata: v, 8858 } 8859} 8860 8861// Code returns the exception type name. 8862func (s *OrganizationNotFoundException) Code() string { 8863 return "OrganizationNotFoundException" 8864} 8865 8866// Message returns the exception's message. 8867func (s *OrganizationNotFoundException) Message() string { 8868 if s.Message_ != nil { 8869 return *s.Message_ 8870 } 8871 return "" 8872} 8873 8874// OrigErr always returns nil, satisfies awserr.Error interface. 8875func (s *OrganizationNotFoundException) OrigErr() error { 8876 return nil 8877} 8878 8879func (s *OrganizationNotFoundException) Error() string { 8880 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 8881} 8882 8883// Status code returns the HTTP status code for the request's response error. 8884func (s *OrganizationNotFoundException) StatusCode() int { 8885 return s.RespMetadata.StatusCode 8886} 8887 8888// RequestID returns the service's response RequestID for request. 8889func (s *OrganizationNotFoundException) RequestID() string { 8890 return s.RespMetadata.RequestID 8891} 8892 8893// The organization must have a valid state (Active or Synchronizing) to perform 8894// certain operations on the organization or its members. 8895type OrganizationStateException struct { 8896 _ struct{} `type:"structure"` 8897 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 8898 8899 Message_ *string `locationName:"Message" type:"string"` 8900} 8901 8902// String returns the string representation 8903func (s OrganizationStateException) String() string { 8904 return awsutil.Prettify(s) 8905} 8906 8907// GoString returns the string representation 8908func (s OrganizationStateException) GoString() string { 8909 return s.String() 8910} 8911 8912func newErrorOrganizationStateException(v protocol.ResponseMetadata) error { 8913 return &OrganizationStateException{ 8914 RespMetadata: v, 8915 } 8916} 8917 8918// Code returns the exception type name. 8919func (s *OrganizationStateException) Code() string { 8920 return "OrganizationStateException" 8921} 8922 8923// Message returns the exception's message. 8924func (s *OrganizationStateException) Message() string { 8925 if s.Message_ != nil { 8926 return *s.Message_ 8927 } 8928 return "" 8929} 8930 8931// OrigErr always returns nil, satisfies awserr.Error interface. 8932func (s *OrganizationStateException) OrigErr() error { 8933 return nil 8934} 8935 8936func (s *OrganizationStateException) Error() string { 8937 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 8938} 8939 8940// Status code returns the HTTP status code for the request's response error. 8941func (s *OrganizationStateException) StatusCode() int { 8942 return s.RespMetadata.StatusCode 8943} 8944 8945// RequestID returns the service's response RequestID for request. 8946func (s *OrganizationStateException) RequestID() string { 8947 return s.RespMetadata.RequestID 8948} 8949 8950// The representation of an organization. 8951type OrganizationSummary struct { 8952 _ struct{} `type:"structure"` 8953 8954 // The alias associated with the organization. 8955 Alias *string `min:"1" type:"string"` 8956 8957 // The error message associated with the organization. It is only present if 8958 // unexpected behavior has occurred with regards to the organization. It provides 8959 // insight or solutions regarding unexpected behavior. 8960 ErrorMessage *string `type:"string"` 8961 8962 // The identifier associated with the organization. 8963 OrganizationId *string `type:"string"` 8964 8965 // The state associated with the organization. 8966 State *string `type:"string"` 8967} 8968 8969// String returns the string representation 8970func (s OrganizationSummary) String() string { 8971 return awsutil.Prettify(s) 8972} 8973 8974// GoString returns the string representation 8975func (s OrganizationSummary) GoString() string { 8976 return s.String() 8977} 8978 8979// SetAlias sets the Alias field's value. 8980func (s *OrganizationSummary) SetAlias(v string) *OrganizationSummary { 8981 s.Alias = &v 8982 return s 8983} 8984 8985// SetErrorMessage sets the ErrorMessage field's value. 8986func (s *OrganizationSummary) SetErrorMessage(v string) *OrganizationSummary { 8987 s.ErrorMessage = &v 8988 return s 8989} 8990 8991// SetOrganizationId sets the OrganizationId field's value. 8992func (s *OrganizationSummary) SetOrganizationId(v string) *OrganizationSummary { 8993 s.OrganizationId = &v 8994 return s 8995} 8996 8997// SetState sets the State field's value. 8998func (s *OrganizationSummary) SetState(v string) *OrganizationSummary { 8999 s.State = &v 9000 return s 9001} 9002 9003// Permission granted to a user, group, or resource to access a certain aspect 9004// of another user, group, or resource mailbox. 9005type Permission struct { 9006 _ struct{} `type:"structure"` 9007 9008 // The identifier of the user, group, or resource to which the permissions are 9009 // granted. 9010 // 9011 // GranteeId is a required field 9012 GranteeId *string `min:"12" type:"string" required:"true"` 9013 9014 // The type of user, group, or resource referred to in GranteeId. 9015 // 9016 // GranteeType is a required field 9017 GranteeType *string `type:"string" required:"true" enum:"MemberType"` 9018 9019 // The permissions granted to the grantee. SEND_AS allows the grantee to send 9020 // email as the owner of the mailbox (the grantee is not mentioned on these 9021 // emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the 9022 // owner of the mailbox (the grantee is not mentioned as the physical sender 9023 // of these emails). FULL_ACCESS allows the grantee full access to the mailbox, 9024 // irrespective of other folder-level permissions set on the mailbox. 9025 // 9026 // PermissionValues is a required field 9027 PermissionValues []*string `type:"list" required:"true"` 9028} 9029 9030// String returns the string representation 9031func (s Permission) String() string { 9032 return awsutil.Prettify(s) 9033} 9034 9035// GoString returns the string representation 9036func (s Permission) GoString() string { 9037 return s.String() 9038} 9039 9040// SetGranteeId sets the GranteeId field's value. 9041func (s *Permission) SetGranteeId(v string) *Permission { 9042 s.GranteeId = &v 9043 return s 9044} 9045 9046// SetGranteeType sets the GranteeType field's value. 9047func (s *Permission) SetGranteeType(v string) *Permission { 9048 s.GranteeType = &v 9049 return s 9050} 9051 9052// SetPermissionValues sets the PermissionValues field's value. 9053func (s *Permission) SetPermissionValues(v []*string) *Permission { 9054 s.PermissionValues = v 9055 return s 9056} 9057 9058type PutAccessControlRuleInput struct { 9059 _ struct{} `type:"structure"` 9060 9061 // Access protocol actions to include in the rule. Valid values include ActiveSync, 9062 // AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, and WebMail. 9063 Actions []*string `type:"list"` 9064 9065 // The rule description. 9066 // 9067 // Description is a required field 9068 Description *string `type:"string" required:"true"` 9069 9070 // The rule effect. 9071 // 9072 // Effect is a required field 9073 Effect *string `type:"string" required:"true" enum:"AccessControlRuleEffect"` 9074 9075 // IPv4 CIDR ranges to include in the rule. 9076 IpRanges []*string `type:"list"` 9077 9078 // The rule name. 9079 // 9080 // Name is a required field 9081 Name *string `min:"1" type:"string" required:"true"` 9082 9083 // Access protocol actions to exclude from the rule. Valid values include ActiveSync, 9084 // AutoDiscover, EWS, IMAP, SMTP, WindowsOutlook, and WebMail. 9085 NotActions []*string `type:"list"` 9086 9087 // IPv4 CIDR ranges to exclude from the rule. 9088 NotIpRanges []*string `type:"list"` 9089 9090 // User IDs to exclude from the rule. 9091 NotUserIds []*string `type:"list"` 9092 9093 // The identifier of the organization. 9094 // 9095 // OrganizationId is a required field 9096 OrganizationId *string `type:"string" required:"true"` 9097 9098 // User IDs to include in the rule. 9099 UserIds []*string `type:"list"` 9100} 9101 9102// String returns the string representation 9103func (s PutAccessControlRuleInput) String() string { 9104 return awsutil.Prettify(s) 9105} 9106 9107// GoString returns the string representation 9108func (s PutAccessControlRuleInput) GoString() string { 9109 return s.String() 9110} 9111 9112// Validate inspects the fields of the type to determine if they are valid. 9113func (s *PutAccessControlRuleInput) Validate() error { 9114 invalidParams := request.ErrInvalidParams{Context: "PutAccessControlRuleInput"} 9115 if s.Description == nil { 9116 invalidParams.Add(request.NewErrParamRequired("Description")) 9117 } 9118 if s.Effect == nil { 9119 invalidParams.Add(request.NewErrParamRequired("Effect")) 9120 } 9121 if s.Name == nil { 9122 invalidParams.Add(request.NewErrParamRequired("Name")) 9123 } 9124 if s.Name != nil && len(*s.Name) < 1 { 9125 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 9126 } 9127 if s.OrganizationId == nil { 9128 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 9129 } 9130 9131 if invalidParams.Len() > 0 { 9132 return invalidParams 9133 } 9134 return nil 9135} 9136 9137// SetActions sets the Actions field's value. 9138func (s *PutAccessControlRuleInput) SetActions(v []*string) *PutAccessControlRuleInput { 9139 s.Actions = v 9140 return s 9141} 9142 9143// SetDescription sets the Description field's value. 9144func (s *PutAccessControlRuleInput) SetDescription(v string) *PutAccessControlRuleInput { 9145 s.Description = &v 9146 return s 9147} 9148 9149// SetEffect sets the Effect field's value. 9150func (s *PutAccessControlRuleInput) SetEffect(v string) *PutAccessControlRuleInput { 9151 s.Effect = &v 9152 return s 9153} 9154 9155// SetIpRanges sets the IpRanges field's value. 9156func (s *PutAccessControlRuleInput) SetIpRanges(v []*string) *PutAccessControlRuleInput { 9157 s.IpRanges = v 9158 return s 9159} 9160 9161// SetName sets the Name field's value. 9162func (s *PutAccessControlRuleInput) SetName(v string) *PutAccessControlRuleInput { 9163 s.Name = &v 9164 return s 9165} 9166 9167// SetNotActions sets the NotActions field's value. 9168func (s *PutAccessControlRuleInput) SetNotActions(v []*string) *PutAccessControlRuleInput { 9169 s.NotActions = v 9170 return s 9171} 9172 9173// SetNotIpRanges sets the NotIpRanges field's value. 9174func (s *PutAccessControlRuleInput) SetNotIpRanges(v []*string) *PutAccessControlRuleInput { 9175 s.NotIpRanges = v 9176 return s 9177} 9178 9179// SetNotUserIds sets the NotUserIds field's value. 9180func (s *PutAccessControlRuleInput) SetNotUserIds(v []*string) *PutAccessControlRuleInput { 9181 s.NotUserIds = v 9182 return s 9183} 9184 9185// SetOrganizationId sets the OrganizationId field's value. 9186func (s *PutAccessControlRuleInput) SetOrganizationId(v string) *PutAccessControlRuleInput { 9187 s.OrganizationId = &v 9188 return s 9189} 9190 9191// SetUserIds sets the UserIds field's value. 9192func (s *PutAccessControlRuleInput) SetUserIds(v []*string) *PutAccessControlRuleInput { 9193 s.UserIds = v 9194 return s 9195} 9196 9197type PutAccessControlRuleOutput struct { 9198 _ struct{} `type:"structure"` 9199} 9200 9201// String returns the string representation 9202func (s PutAccessControlRuleOutput) String() string { 9203 return awsutil.Prettify(s) 9204} 9205 9206// GoString returns the string representation 9207func (s PutAccessControlRuleOutput) GoString() string { 9208 return s.String() 9209} 9210 9211type PutMailboxPermissionsInput struct { 9212 _ struct{} `type:"structure"` 9213 9214 // The identifier of the user, group, or resource for which to update mailbox 9215 // permissions. 9216 // 9217 // EntityId is a required field 9218 EntityId *string `min:"12" type:"string" required:"true"` 9219 9220 // The identifier of the user, group, or resource to which to grant the permissions. 9221 // 9222 // GranteeId is a required field 9223 GranteeId *string `min:"12" type:"string" required:"true"` 9224 9225 // The identifier of the organization under which the user, group, or resource 9226 // exists. 9227 // 9228 // OrganizationId is a required field 9229 OrganizationId *string `type:"string" required:"true"` 9230 9231 // The permissions granted to the grantee. SEND_AS allows the grantee to send 9232 // email as the owner of the mailbox (the grantee is not mentioned on these 9233 // emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the 9234 // owner of the mailbox (the grantee is not mentioned as the physical sender 9235 // of these emails). FULL_ACCESS allows the grantee full access to the mailbox, 9236 // irrespective of other folder-level permissions set on the mailbox. 9237 // 9238 // PermissionValues is a required field 9239 PermissionValues []*string `type:"list" required:"true"` 9240} 9241 9242// String returns the string representation 9243func (s PutMailboxPermissionsInput) String() string { 9244 return awsutil.Prettify(s) 9245} 9246 9247// GoString returns the string representation 9248func (s PutMailboxPermissionsInput) GoString() string { 9249 return s.String() 9250} 9251 9252// Validate inspects the fields of the type to determine if they are valid. 9253func (s *PutMailboxPermissionsInput) Validate() error { 9254 invalidParams := request.ErrInvalidParams{Context: "PutMailboxPermissionsInput"} 9255 if s.EntityId == nil { 9256 invalidParams.Add(request.NewErrParamRequired("EntityId")) 9257 } 9258 if s.EntityId != nil && len(*s.EntityId) < 12 { 9259 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 9260 } 9261 if s.GranteeId == nil { 9262 invalidParams.Add(request.NewErrParamRequired("GranteeId")) 9263 } 9264 if s.GranteeId != nil && len(*s.GranteeId) < 12 { 9265 invalidParams.Add(request.NewErrParamMinLen("GranteeId", 12)) 9266 } 9267 if s.OrganizationId == nil { 9268 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 9269 } 9270 if s.PermissionValues == nil { 9271 invalidParams.Add(request.NewErrParamRequired("PermissionValues")) 9272 } 9273 9274 if invalidParams.Len() > 0 { 9275 return invalidParams 9276 } 9277 return nil 9278} 9279 9280// SetEntityId sets the EntityId field's value. 9281func (s *PutMailboxPermissionsInput) SetEntityId(v string) *PutMailboxPermissionsInput { 9282 s.EntityId = &v 9283 return s 9284} 9285 9286// SetGranteeId sets the GranteeId field's value. 9287func (s *PutMailboxPermissionsInput) SetGranteeId(v string) *PutMailboxPermissionsInput { 9288 s.GranteeId = &v 9289 return s 9290} 9291 9292// SetOrganizationId sets the OrganizationId field's value. 9293func (s *PutMailboxPermissionsInput) SetOrganizationId(v string) *PutMailboxPermissionsInput { 9294 s.OrganizationId = &v 9295 return s 9296} 9297 9298// SetPermissionValues sets the PermissionValues field's value. 9299func (s *PutMailboxPermissionsInput) SetPermissionValues(v []*string) *PutMailboxPermissionsInput { 9300 s.PermissionValues = v 9301 return s 9302} 9303 9304type PutMailboxPermissionsOutput struct { 9305 _ struct{} `type:"structure"` 9306} 9307 9308// String returns the string representation 9309func (s PutMailboxPermissionsOutput) String() string { 9310 return awsutil.Prettify(s) 9311} 9312 9313// GoString returns the string representation 9314func (s PutMailboxPermissionsOutput) GoString() string { 9315 return s.String() 9316} 9317 9318type PutRetentionPolicyInput struct { 9319 _ struct{} `type:"structure"` 9320 9321 // The retention policy description. 9322 Description *string `type:"string"` 9323 9324 // The retention policy folder configurations. 9325 // 9326 // FolderConfigurations is a required field 9327 FolderConfigurations []*FolderConfiguration `type:"list" required:"true"` 9328 9329 // The retention policy ID. 9330 Id *string `min:"1" type:"string"` 9331 9332 // The retention policy name. 9333 // 9334 // Name is a required field 9335 Name *string `min:"1" type:"string" required:"true"` 9336 9337 // The organization ID. 9338 // 9339 // OrganizationId is a required field 9340 OrganizationId *string `type:"string" required:"true"` 9341} 9342 9343// String returns the string representation 9344func (s PutRetentionPolicyInput) String() string { 9345 return awsutil.Prettify(s) 9346} 9347 9348// GoString returns the string representation 9349func (s PutRetentionPolicyInput) GoString() string { 9350 return s.String() 9351} 9352 9353// Validate inspects the fields of the type to determine if they are valid. 9354func (s *PutRetentionPolicyInput) Validate() error { 9355 invalidParams := request.ErrInvalidParams{Context: "PutRetentionPolicyInput"} 9356 if s.FolderConfigurations == nil { 9357 invalidParams.Add(request.NewErrParamRequired("FolderConfigurations")) 9358 } 9359 if s.Id != nil && len(*s.Id) < 1 { 9360 invalidParams.Add(request.NewErrParamMinLen("Id", 1)) 9361 } 9362 if s.Name == nil { 9363 invalidParams.Add(request.NewErrParamRequired("Name")) 9364 } 9365 if s.Name != nil && len(*s.Name) < 1 { 9366 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 9367 } 9368 if s.OrganizationId == nil { 9369 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 9370 } 9371 if s.FolderConfigurations != nil { 9372 for i, v := range s.FolderConfigurations { 9373 if v == nil { 9374 continue 9375 } 9376 if err := v.Validate(); err != nil { 9377 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "FolderConfigurations", i), err.(request.ErrInvalidParams)) 9378 } 9379 } 9380 } 9381 9382 if invalidParams.Len() > 0 { 9383 return invalidParams 9384 } 9385 return nil 9386} 9387 9388// SetDescription sets the Description field's value. 9389func (s *PutRetentionPolicyInput) SetDescription(v string) *PutRetentionPolicyInput { 9390 s.Description = &v 9391 return s 9392} 9393 9394// SetFolderConfigurations sets the FolderConfigurations field's value. 9395func (s *PutRetentionPolicyInput) SetFolderConfigurations(v []*FolderConfiguration) *PutRetentionPolicyInput { 9396 s.FolderConfigurations = v 9397 return s 9398} 9399 9400// SetId sets the Id field's value. 9401func (s *PutRetentionPolicyInput) SetId(v string) *PutRetentionPolicyInput { 9402 s.Id = &v 9403 return s 9404} 9405 9406// SetName sets the Name field's value. 9407func (s *PutRetentionPolicyInput) SetName(v string) *PutRetentionPolicyInput { 9408 s.Name = &v 9409 return s 9410} 9411 9412// SetOrganizationId sets the OrganizationId field's value. 9413func (s *PutRetentionPolicyInput) SetOrganizationId(v string) *PutRetentionPolicyInput { 9414 s.OrganizationId = &v 9415 return s 9416} 9417 9418type PutRetentionPolicyOutput struct { 9419 _ struct{} `type:"structure"` 9420} 9421 9422// String returns the string representation 9423func (s PutRetentionPolicyOutput) String() string { 9424 return awsutil.Prettify(s) 9425} 9426 9427// GoString returns the string representation 9428func (s PutRetentionPolicyOutput) GoString() string { 9429 return s.String() 9430} 9431 9432type RegisterToWorkMailInput struct { 9433 _ struct{} `type:"structure"` 9434 9435 // The email for the user, group, or resource to be updated. 9436 // 9437 // Email is a required field 9438 Email *string `min:"1" type:"string" required:"true"` 9439 9440 // The identifier for the user, group, or resource to be updated. 9441 // 9442 // EntityId is a required field 9443 EntityId *string `min:"12" type:"string" required:"true"` 9444 9445 // The identifier for the organization under which the user, group, or resource 9446 // exists. 9447 // 9448 // OrganizationId is a required field 9449 OrganizationId *string `type:"string" required:"true"` 9450} 9451 9452// String returns the string representation 9453func (s RegisterToWorkMailInput) String() string { 9454 return awsutil.Prettify(s) 9455} 9456 9457// GoString returns the string representation 9458func (s RegisterToWorkMailInput) GoString() string { 9459 return s.String() 9460} 9461 9462// Validate inspects the fields of the type to determine if they are valid. 9463func (s *RegisterToWorkMailInput) Validate() error { 9464 invalidParams := request.ErrInvalidParams{Context: "RegisterToWorkMailInput"} 9465 if s.Email == nil { 9466 invalidParams.Add(request.NewErrParamRequired("Email")) 9467 } 9468 if s.Email != nil && len(*s.Email) < 1 { 9469 invalidParams.Add(request.NewErrParamMinLen("Email", 1)) 9470 } 9471 if s.EntityId == nil { 9472 invalidParams.Add(request.NewErrParamRequired("EntityId")) 9473 } 9474 if s.EntityId != nil && len(*s.EntityId) < 12 { 9475 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 9476 } 9477 if s.OrganizationId == nil { 9478 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 9479 } 9480 9481 if invalidParams.Len() > 0 { 9482 return invalidParams 9483 } 9484 return nil 9485} 9486 9487// SetEmail sets the Email field's value. 9488func (s *RegisterToWorkMailInput) SetEmail(v string) *RegisterToWorkMailInput { 9489 s.Email = &v 9490 return s 9491} 9492 9493// SetEntityId sets the EntityId field's value. 9494func (s *RegisterToWorkMailInput) SetEntityId(v string) *RegisterToWorkMailInput { 9495 s.EntityId = &v 9496 return s 9497} 9498 9499// SetOrganizationId sets the OrganizationId field's value. 9500func (s *RegisterToWorkMailInput) SetOrganizationId(v string) *RegisterToWorkMailInput { 9501 s.OrganizationId = &v 9502 return s 9503} 9504 9505type RegisterToWorkMailOutput struct { 9506 _ struct{} `type:"structure"` 9507} 9508 9509// String returns the string representation 9510func (s RegisterToWorkMailOutput) String() string { 9511 return awsutil.Prettify(s) 9512} 9513 9514// GoString returns the string representation 9515func (s RegisterToWorkMailOutput) GoString() string { 9516 return s.String() 9517} 9518 9519// This user, group, or resource name is not allowed in Amazon WorkMail. 9520type ReservedNameException struct { 9521 _ struct{} `type:"structure"` 9522 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 9523 9524 Message_ *string `locationName:"Message" type:"string"` 9525} 9526 9527// String returns the string representation 9528func (s ReservedNameException) String() string { 9529 return awsutil.Prettify(s) 9530} 9531 9532// GoString returns the string representation 9533func (s ReservedNameException) GoString() string { 9534 return s.String() 9535} 9536 9537func newErrorReservedNameException(v protocol.ResponseMetadata) error { 9538 return &ReservedNameException{ 9539 RespMetadata: v, 9540 } 9541} 9542 9543// Code returns the exception type name. 9544func (s *ReservedNameException) Code() string { 9545 return "ReservedNameException" 9546} 9547 9548// Message returns the exception's message. 9549func (s *ReservedNameException) Message() string { 9550 if s.Message_ != nil { 9551 return *s.Message_ 9552 } 9553 return "" 9554} 9555 9556// OrigErr always returns nil, satisfies awserr.Error interface. 9557func (s *ReservedNameException) OrigErr() error { 9558 return nil 9559} 9560 9561func (s *ReservedNameException) Error() string { 9562 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 9563} 9564 9565// Status code returns the HTTP status code for the request's response error. 9566func (s *ReservedNameException) StatusCode() int { 9567 return s.RespMetadata.StatusCode 9568} 9569 9570// RequestID returns the service's response RequestID for request. 9571func (s *ReservedNameException) RequestID() string { 9572 return s.RespMetadata.RequestID 9573} 9574 9575type ResetPasswordInput struct { 9576 _ struct{} `type:"structure"` 9577 9578 // The identifier of the organization that contains the user for which the password 9579 // is reset. 9580 // 9581 // OrganizationId is a required field 9582 OrganizationId *string `type:"string" required:"true"` 9583 9584 // The new password for the user. 9585 // 9586 // Password is a required field 9587 Password *string `type:"string" required:"true" sensitive:"true"` 9588 9589 // The identifier of the user for whom the password is reset. 9590 // 9591 // UserId is a required field 9592 UserId *string `min:"12" type:"string" required:"true"` 9593} 9594 9595// String returns the string representation 9596func (s ResetPasswordInput) String() string { 9597 return awsutil.Prettify(s) 9598} 9599 9600// GoString returns the string representation 9601func (s ResetPasswordInput) GoString() string { 9602 return s.String() 9603} 9604 9605// Validate inspects the fields of the type to determine if they are valid. 9606func (s *ResetPasswordInput) Validate() error { 9607 invalidParams := request.ErrInvalidParams{Context: "ResetPasswordInput"} 9608 if s.OrganizationId == nil { 9609 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 9610 } 9611 if s.Password == nil { 9612 invalidParams.Add(request.NewErrParamRequired("Password")) 9613 } 9614 if s.UserId == nil { 9615 invalidParams.Add(request.NewErrParamRequired("UserId")) 9616 } 9617 if s.UserId != nil && len(*s.UserId) < 12 { 9618 invalidParams.Add(request.NewErrParamMinLen("UserId", 12)) 9619 } 9620 9621 if invalidParams.Len() > 0 { 9622 return invalidParams 9623 } 9624 return nil 9625} 9626 9627// SetOrganizationId sets the OrganizationId field's value. 9628func (s *ResetPasswordInput) SetOrganizationId(v string) *ResetPasswordInput { 9629 s.OrganizationId = &v 9630 return s 9631} 9632 9633// SetPassword sets the Password field's value. 9634func (s *ResetPasswordInput) SetPassword(v string) *ResetPasswordInput { 9635 s.Password = &v 9636 return s 9637} 9638 9639// SetUserId sets the UserId field's value. 9640func (s *ResetPasswordInput) SetUserId(v string) *ResetPasswordInput { 9641 s.UserId = &v 9642 return s 9643} 9644 9645type ResetPasswordOutput struct { 9646 _ struct{} `type:"structure"` 9647} 9648 9649// String returns the string representation 9650func (s ResetPasswordOutput) String() string { 9651 return awsutil.Prettify(s) 9652} 9653 9654// GoString returns the string representation 9655func (s ResetPasswordOutput) GoString() string { 9656 return s.String() 9657} 9658 9659// The representation of a resource. 9660type Resource struct { 9661 _ struct{} `type:"structure"` 9662 9663 // The date indicating when the resource was disabled from Amazon WorkMail use. 9664 DisabledDate *time.Time `type:"timestamp"` 9665 9666 // The email of the resource. 9667 Email *string `min:"1" type:"string"` 9668 9669 // The date indicating when the resource was enabled for Amazon WorkMail use. 9670 EnabledDate *time.Time `type:"timestamp"` 9671 9672 // The identifier of the resource. 9673 Id *string `min:"12" type:"string"` 9674 9675 // The name of the resource. 9676 Name *string `min:"1" type:"string"` 9677 9678 // The state of the resource, which can be ENABLED, DISABLED, or DELETED. 9679 State *string `type:"string" enum:"EntityState"` 9680 9681 // The type of the resource: equipment or room. 9682 Type *string `type:"string" enum:"ResourceType"` 9683} 9684 9685// String returns the string representation 9686func (s Resource) String() string { 9687 return awsutil.Prettify(s) 9688} 9689 9690// GoString returns the string representation 9691func (s Resource) GoString() string { 9692 return s.String() 9693} 9694 9695// SetDisabledDate sets the DisabledDate field's value. 9696func (s *Resource) SetDisabledDate(v time.Time) *Resource { 9697 s.DisabledDate = &v 9698 return s 9699} 9700 9701// SetEmail sets the Email field's value. 9702func (s *Resource) SetEmail(v string) *Resource { 9703 s.Email = &v 9704 return s 9705} 9706 9707// SetEnabledDate sets the EnabledDate field's value. 9708func (s *Resource) SetEnabledDate(v time.Time) *Resource { 9709 s.EnabledDate = &v 9710 return s 9711} 9712 9713// SetId sets the Id field's value. 9714func (s *Resource) SetId(v string) *Resource { 9715 s.Id = &v 9716 return s 9717} 9718 9719// SetName sets the Name field's value. 9720func (s *Resource) SetName(v string) *Resource { 9721 s.Name = &v 9722 return s 9723} 9724 9725// SetState sets the State field's value. 9726func (s *Resource) SetState(v string) *Resource { 9727 s.State = &v 9728 return s 9729} 9730 9731// SetType sets the Type field's value. 9732func (s *Resource) SetType(v string) *Resource { 9733 s.Type = &v 9734 return s 9735} 9736 9737// The resource cannot be found. 9738type ResourceNotFoundException struct { 9739 _ struct{} `type:"structure"` 9740 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 9741 9742 Message_ *string `locationName:"Message" type:"string"` 9743} 9744 9745// String returns the string representation 9746func (s ResourceNotFoundException) String() string { 9747 return awsutil.Prettify(s) 9748} 9749 9750// GoString returns the string representation 9751func (s ResourceNotFoundException) GoString() string { 9752 return s.String() 9753} 9754 9755func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 9756 return &ResourceNotFoundException{ 9757 RespMetadata: v, 9758 } 9759} 9760 9761// Code returns the exception type name. 9762func (s *ResourceNotFoundException) Code() string { 9763 return "ResourceNotFoundException" 9764} 9765 9766// Message returns the exception's message. 9767func (s *ResourceNotFoundException) Message() string { 9768 if s.Message_ != nil { 9769 return *s.Message_ 9770 } 9771 return "" 9772} 9773 9774// OrigErr always returns nil, satisfies awserr.Error interface. 9775func (s *ResourceNotFoundException) OrigErr() error { 9776 return nil 9777} 9778 9779func (s *ResourceNotFoundException) Error() string { 9780 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 9781} 9782 9783// Status code returns the HTTP status code for the request's response error. 9784func (s *ResourceNotFoundException) StatusCode() int { 9785 return s.RespMetadata.StatusCode 9786} 9787 9788// RequestID returns the service's response RequestID for request. 9789func (s *ResourceNotFoundException) RequestID() string { 9790 return s.RespMetadata.RequestID 9791} 9792 9793// Describes a tag applied to a resource. 9794type Tag struct { 9795 _ struct{} `type:"structure"` 9796 9797 // The key of the tag. 9798 // 9799 // Key is a required field 9800 Key *string `min:"1" type:"string" required:"true"` 9801 9802 // The value of the tag. 9803 // 9804 // Value is a required field 9805 Value *string `type:"string" required:"true"` 9806} 9807 9808// String returns the string representation 9809func (s Tag) String() string { 9810 return awsutil.Prettify(s) 9811} 9812 9813// GoString returns the string representation 9814func (s Tag) GoString() string { 9815 return s.String() 9816} 9817 9818// Validate inspects the fields of the type to determine if they are valid. 9819func (s *Tag) Validate() error { 9820 invalidParams := request.ErrInvalidParams{Context: "Tag"} 9821 if s.Key == nil { 9822 invalidParams.Add(request.NewErrParamRequired("Key")) 9823 } 9824 if s.Key != nil && len(*s.Key) < 1 { 9825 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 9826 } 9827 if s.Value == nil { 9828 invalidParams.Add(request.NewErrParamRequired("Value")) 9829 } 9830 9831 if invalidParams.Len() > 0 { 9832 return invalidParams 9833 } 9834 return nil 9835} 9836 9837// SetKey sets the Key field's value. 9838func (s *Tag) SetKey(v string) *Tag { 9839 s.Key = &v 9840 return s 9841} 9842 9843// SetValue sets the Value field's value. 9844func (s *Tag) SetValue(v string) *Tag { 9845 s.Value = &v 9846 return s 9847} 9848 9849type TagResourceInput struct { 9850 _ struct{} `type:"structure"` 9851 9852 // The resource ARN. 9853 // 9854 // ResourceARN is a required field 9855 ResourceARN *string `min:"1" type:"string" required:"true"` 9856 9857 // The tag key-value pairs. 9858 // 9859 // Tags is a required field 9860 Tags []*Tag `type:"list" required:"true"` 9861} 9862 9863// String returns the string representation 9864func (s TagResourceInput) String() string { 9865 return awsutil.Prettify(s) 9866} 9867 9868// GoString returns the string representation 9869func (s TagResourceInput) GoString() string { 9870 return s.String() 9871} 9872 9873// Validate inspects the fields of the type to determine if they are valid. 9874func (s *TagResourceInput) Validate() error { 9875 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 9876 if s.ResourceARN == nil { 9877 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 9878 } 9879 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 9880 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 9881 } 9882 if s.Tags == nil { 9883 invalidParams.Add(request.NewErrParamRequired("Tags")) 9884 } 9885 if s.Tags != nil { 9886 for i, v := range s.Tags { 9887 if v == nil { 9888 continue 9889 } 9890 if err := v.Validate(); err != nil { 9891 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 9892 } 9893 } 9894 } 9895 9896 if invalidParams.Len() > 0 { 9897 return invalidParams 9898 } 9899 return nil 9900} 9901 9902// SetResourceARN sets the ResourceARN field's value. 9903func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput { 9904 s.ResourceARN = &v 9905 return s 9906} 9907 9908// SetTags sets the Tags field's value. 9909func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 9910 s.Tags = v 9911 return s 9912} 9913 9914type TagResourceOutput struct { 9915 _ struct{} `type:"structure"` 9916} 9917 9918// String returns the string representation 9919func (s TagResourceOutput) String() string { 9920 return awsutil.Prettify(s) 9921} 9922 9923// GoString returns the string representation 9924func (s TagResourceOutput) GoString() string { 9925 return s.String() 9926} 9927 9928// The resource can have up to 50 user-applied tags. 9929type TooManyTagsException struct { 9930 _ struct{} `type:"structure"` 9931 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 9932 9933 Message_ *string `locationName:"Message" type:"string"` 9934} 9935 9936// String returns the string representation 9937func (s TooManyTagsException) String() string { 9938 return awsutil.Prettify(s) 9939} 9940 9941// GoString returns the string representation 9942func (s TooManyTagsException) GoString() string { 9943 return s.String() 9944} 9945 9946func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { 9947 return &TooManyTagsException{ 9948 RespMetadata: v, 9949 } 9950} 9951 9952// Code returns the exception type name. 9953func (s *TooManyTagsException) Code() string { 9954 return "TooManyTagsException" 9955} 9956 9957// Message returns the exception's message. 9958func (s *TooManyTagsException) Message() string { 9959 if s.Message_ != nil { 9960 return *s.Message_ 9961 } 9962 return "" 9963} 9964 9965// OrigErr always returns nil, satisfies awserr.Error interface. 9966func (s *TooManyTagsException) OrigErr() error { 9967 return nil 9968} 9969 9970func (s *TooManyTagsException) Error() string { 9971 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 9972} 9973 9974// Status code returns the HTTP status code for the request's response error. 9975func (s *TooManyTagsException) StatusCode() int { 9976 return s.RespMetadata.StatusCode 9977} 9978 9979// RequestID returns the service's response RequestID for request. 9980func (s *TooManyTagsException) RequestID() string { 9981 return s.RespMetadata.RequestID 9982} 9983 9984// You can't perform a write operation against a read-only directory. 9985type UnsupportedOperationException struct { 9986 _ struct{} `type:"structure"` 9987 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 9988 9989 Message_ *string `locationName:"Message" type:"string"` 9990} 9991 9992// String returns the string representation 9993func (s UnsupportedOperationException) String() string { 9994 return awsutil.Prettify(s) 9995} 9996 9997// GoString returns the string representation 9998func (s UnsupportedOperationException) GoString() string { 9999 return s.String() 10000} 10001 10002func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error { 10003 return &UnsupportedOperationException{ 10004 RespMetadata: v, 10005 } 10006} 10007 10008// Code returns the exception type name. 10009func (s *UnsupportedOperationException) Code() string { 10010 return "UnsupportedOperationException" 10011} 10012 10013// Message returns the exception's message. 10014func (s *UnsupportedOperationException) Message() string { 10015 if s.Message_ != nil { 10016 return *s.Message_ 10017 } 10018 return "" 10019} 10020 10021// OrigErr always returns nil, satisfies awserr.Error interface. 10022func (s *UnsupportedOperationException) OrigErr() error { 10023 return nil 10024} 10025 10026func (s *UnsupportedOperationException) Error() string { 10027 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 10028} 10029 10030// Status code returns the HTTP status code for the request's response error. 10031func (s *UnsupportedOperationException) StatusCode() int { 10032 return s.RespMetadata.StatusCode 10033} 10034 10035// RequestID returns the service's response RequestID for request. 10036func (s *UnsupportedOperationException) RequestID() string { 10037 return s.RespMetadata.RequestID 10038} 10039 10040type UntagResourceInput struct { 10041 _ struct{} `type:"structure"` 10042 10043 // The resource ARN. 10044 // 10045 // ResourceARN is a required field 10046 ResourceARN *string `min:"1" type:"string" required:"true"` 10047 10048 // The tag keys. 10049 // 10050 // TagKeys is a required field 10051 TagKeys []*string `type:"list" required:"true"` 10052} 10053 10054// String returns the string representation 10055func (s UntagResourceInput) String() string { 10056 return awsutil.Prettify(s) 10057} 10058 10059// GoString returns the string representation 10060func (s UntagResourceInput) GoString() string { 10061 return s.String() 10062} 10063 10064// Validate inspects the fields of the type to determine if they are valid. 10065func (s *UntagResourceInput) Validate() error { 10066 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 10067 if s.ResourceARN == nil { 10068 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 10069 } 10070 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 10071 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 10072 } 10073 if s.TagKeys == nil { 10074 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 10075 } 10076 10077 if invalidParams.Len() > 0 { 10078 return invalidParams 10079 } 10080 return nil 10081} 10082 10083// SetResourceARN sets the ResourceARN field's value. 10084func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput { 10085 s.ResourceARN = &v 10086 return s 10087} 10088 10089// SetTagKeys sets the TagKeys field's value. 10090func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 10091 s.TagKeys = v 10092 return s 10093} 10094 10095type UntagResourceOutput struct { 10096 _ struct{} `type:"structure"` 10097} 10098 10099// String returns the string representation 10100func (s UntagResourceOutput) String() string { 10101 return awsutil.Prettify(s) 10102} 10103 10104// GoString returns the string representation 10105func (s UntagResourceOutput) GoString() string { 10106 return s.String() 10107} 10108 10109type UpdateMailboxQuotaInput struct { 10110 _ struct{} `type:"structure"` 10111 10112 // The updated mailbox quota, in MB, for the specified user. 10113 // 10114 // MailboxQuota is a required field 10115 MailboxQuota *int64 `min:"1" type:"integer" required:"true"` 10116 10117 // The identifier for the organization that contains the user for whom to update 10118 // the mailbox quota. 10119 // 10120 // OrganizationId is a required field 10121 OrganizationId *string `type:"string" required:"true"` 10122 10123 // The identifer for the user for whom to update the mailbox quota. 10124 // 10125 // UserId is a required field 10126 UserId *string `min:"12" type:"string" required:"true"` 10127} 10128 10129// String returns the string representation 10130func (s UpdateMailboxQuotaInput) String() string { 10131 return awsutil.Prettify(s) 10132} 10133 10134// GoString returns the string representation 10135func (s UpdateMailboxQuotaInput) GoString() string { 10136 return s.String() 10137} 10138 10139// Validate inspects the fields of the type to determine if they are valid. 10140func (s *UpdateMailboxQuotaInput) Validate() error { 10141 invalidParams := request.ErrInvalidParams{Context: "UpdateMailboxQuotaInput"} 10142 if s.MailboxQuota == nil { 10143 invalidParams.Add(request.NewErrParamRequired("MailboxQuota")) 10144 } 10145 if s.MailboxQuota != nil && *s.MailboxQuota < 1 { 10146 invalidParams.Add(request.NewErrParamMinValue("MailboxQuota", 1)) 10147 } 10148 if s.OrganizationId == nil { 10149 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 10150 } 10151 if s.UserId == nil { 10152 invalidParams.Add(request.NewErrParamRequired("UserId")) 10153 } 10154 if s.UserId != nil && len(*s.UserId) < 12 { 10155 invalidParams.Add(request.NewErrParamMinLen("UserId", 12)) 10156 } 10157 10158 if invalidParams.Len() > 0 { 10159 return invalidParams 10160 } 10161 return nil 10162} 10163 10164// SetMailboxQuota sets the MailboxQuota field's value. 10165func (s *UpdateMailboxQuotaInput) SetMailboxQuota(v int64) *UpdateMailboxQuotaInput { 10166 s.MailboxQuota = &v 10167 return s 10168} 10169 10170// SetOrganizationId sets the OrganizationId field's value. 10171func (s *UpdateMailboxQuotaInput) SetOrganizationId(v string) *UpdateMailboxQuotaInput { 10172 s.OrganizationId = &v 10173 return s 10174} 10175 10176// SetUserId sets the UserId field's value. 10177func (s *UpdateMailboxQuotaInput) SetUserId(v string) *UpdateMailboxQuotaInput { 10178 s.UserId = &v 10179 return s 10180} 10181 10182type UpdateMailboxQuotaOutput struct { 10183 _ struct{} `type:"structure"` 10184} 10185 10186// String returns the string representation 10187func (s UpdateMailboxQuotaOutput) String() string { 10188 return awsutil.Prettify(s) 10189} 10190 10191// GoString returns the string representation 10192func (s UpdateMailboxQuotaOutput) GoString() string { 10193 return s.String() 10194} 10195 10196type UpdatePrimaryEmailAddressInput struct { 10197 _ struct{} `type:"structure"` 10198 10199 // The value of the email to be updated as primary. 10200 // 10201 // Email is a required field 10202 Email *string `min:"1" type:"string" required:"true"` 10203 10204 // The user, group, or resource to update. 10205 // 10206 // EntityId is a required field 10207 EntityId *string `min:"12" type:"string" required:"true"` 10208 10209 // The organization that contains the user, group, or resource to update. 10210 // 10211 // OrganizationId is a required field 10212 OrganizationId *string `type:"string" required:"true"` 10213} 10214 10215// String returns the string representation 10216func (s UpdatePrimaryEmailAddressInput) String() string { 10217 return awsutil.Prettify(s) 10218} 10219 10220// GoString returns the string representation 10221func (s UpdatePrimaryEmailAddressInput) GoString() string { 10222 return s.String() 10223} 10224 10225// Validate inspects the fields of the type to determine if they are valid. 10226func (s *UpdatePrimaryEmailAddressInput) Validate() error { 10227 invalidParams := request.ErrInvalidParams{Context: "UpdatePrimaryEmailAddressInput"} 10228 if s.Email == nil { 10229 invalidParams.Add(request.NewErrParamRequired("Email")) 10230 } 10231 if s.Email != nil && len(*s.Email) < 1 { 10232 invalidParams.Add(request.NewErrParamMinLen("Email", 1)) 10233 } 10234 if s.EntityId == nil { 10235 invalidParams.Add(request.NewErrParamRequired("EntityId")) 10236 } 10237 if s.EntityId != nil && len(*s.EntityId) < 12 { 10238 invalidParams.Add(request.NewErrParamMinLen("EntityId", 12)) 10239 } 10240 if s.OrganizationId == nil { 10241 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 10242 } 10243 10244 if invalidParams.Len() > 0 { 10245 return invalidParams 10246 } 10247 return nil 10248} 10249 10250// SetEmail sets the Email field's value. 10251func (s *UpdatePrimaryEmailAddressInput) SetEmail(v string) *UpdatePrimaryEmailAddressInput { 10252 s.Email = &v 10253 return s 10254} 10255 10256// SetEntityId sets the EntityId field's value. 10257func (s *UpdatePrimaryEmailAddressInput) SetEntityId(v string) *UpdatePrimaryEmailAddressInput { 10258 s.EntityId = &v 10259 return s 10260} 10261 10262// SetOrganizationId sets the OrganizationId field's value. 10263func (s *UpdatePrimaryEmailAddressInput) SetOrganizationId(v string) *UpdatePrimaryEmailAddressInput { 10264 s.OrganizationId = &v 10265 return s 10266} 10267 10268type UpdatePrimaryEmailAddressOutput struct { 10269 _ struct{} `type:"structure"` 10270} 10271 10272// String returns the string representation 10273func (s UpdatePrimaryEmailAddressOutput) String() string { 10274 return awsutil.Prettify(s) 10275} 10276 10277// GoString returns the string representation 10278func (s UpdatePrimaryEmailAddressOutput) GoString() string { 10279 return s.String() 10280} 10281 10282type UpdateResourceInput struct { 10283 _ struct{} `type:"structure"` 10284 10285 // The resource's booking options to be updated. 10286 BookingOptions *BookingOptions `type:"structure"` 10287 10288 // The name of the resource to be updated. 10289 Name *string `min:"1" type:"string"` 10290 10291 // The identifier associated with the organization for which the resource is 10292 // updated. 10293 // 10294 // OrganizationId is a required field 10295 OrganizationId *string `type:"string" required:"true"` 10296 10297 // The identifier of the resource to be updated. 10298 // 10299 // ResourceId is a required field 10300 ResourceId *string `type:"string" required:"true"` 10301} 10302 10303// String returns the string representation 10304func (s UpdateResourceInput) String() string { 10305 return awsutil.Prettify(s) 10306} 10307 10308// GoString returns the string representation 10309func (s UpdateResourceInput) GoString() string { 10310 return s.String() 10311} 10312 10313// Validate inspects the fields of the type to determine if they are valid. 10314func (s *UpdateResourceInput) Validate() error { 10315 invalidParams := request.ErrInvalidParams{Context: "UpdateResourceInput"} 10316 if s.Name != nil && len(*s.Name) < 1 { 10317 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 10318 } 10319 if s.OrganizationId == nil { 10320 invalidParams.Add(request.NewErrParamRequired("OrganizationId")) 10321 } 10322 if s.ResourceId == nil { 10323 invalidParams.Add(request.NewErrParamRequired("ResourceId")) 10324 } 10325 10326 if invalidParams.Len() > 0 { 10327 return invalidParams 10328 } 10329 return nil 10330} 10331 10332// SetBookingOptions sets the BookingOptions field's value. 10333func (s *UpdateResourceInput) SetBookingOptions(v *BookingOptions) *UpdateResourceInput { 10334 s.BookingOptions = v 10335 return s 10336} 10337 10338// SetName sets the Name field's value. 10339func (s *UpdateResourceInput) SetName(v string) *UpdateResourceInput { 10340 s.Name = &v 10341 return s 10342} 10343 10344// SetOrganizationId sets the OrganizationId field's value. 10345func (s *UpdateResourceInput) SetOrganizationId(v string) *UpdateResourceInput { 10346 s.OrganizationId = &v 10347 return s 10348} 10349 10350// SetResourceId sets the ResourceId field's value. 10351func (s *UpdateResourceInput) SetResourceId(v string) *UpdateResourceInput { 10352 s.ResourceId = &v 10353 return s 10354} 10355 10356type UpdateResourceOutput struct { 10357 _ struct{} `type:"structure"` 10358} 10359 10360// String returns the string representation 10361func (s UpdateResourceOutput) String() string { 10362 return awsutil.Prettify(s) 10363} 10364 10365// GoString returns the string representation 10366func (s UpdateResourceOutput) GoString() string { 10367 return s.String() 10368} 10369 10370// The representation of an Amazon WorkMail user. 10371type User struct { 10372 _ struct{} `type:"structure"` 10373 10374 // The date indicating when the user was disabled from Amazon WorkMail use. 10375 DisabledDate *time.Time `type:"timestamp"` 10376 10377 // The display name of the user. 10378 DisplayName *string `type:"string"` 10379 10380 // The email of the user. 10381 Email *string `min:"1" type:"string"` 10382 10383 // The date indicating when the user was enabled for Amazon WorkMail use. 10384 EnabledDate *time.Time `type:"timestamp"` 10385 10386 // The identifier of the user. 10387 Id *string `min:"12" type:"string"` 10388 10389 // The name of the user. 10390 Name *string `min:"1" type:"string"` 10391 10392 // The state of the user, which can be ENABLED, DISABLED, or DELETED. 10393 State *string `type:"string" enum:"EntityState"` 10394 10395 // The role of the user. 10396 UserRole *string `type:"string" enum:"UserRole"` 10397} 10398 10399// String returns the string representation 10400func (s User) String() string { 10401 return awsutil.Prettify(s) 10402} 10403 10404// GoString returns the string representation 10405func (s User) GoString() string { 10406 return s.String() 10407} 10408 10409// SetDisabledDate sets the DisabledDate field's value. 10410func (s *User) SetDisabledDate(v time.Time) *User { 10411 s.DisabledDate = &v 10412 return s 10413} 10414 10415// SetDisplayName sets the DisplayName field's value. 10416func (s *User) SetDisplayName(v string) *User { 10417 s.DisplayName = &v 10418 return s 10419} 10420 10421// SetEmail sets the Email field's value. 10422func (s *User) SetEmail(v string) *User { 10423 s.Email = &v 10424 return s 10425} 10426 10427// SetEnabledDate sets the EnabledDate field's value. 10428func (s *User) SetEnabledDate(v time.Time) *User { 10429 s.EnabledDate = &v 10430 return s 10431} 10432 10433// SetId sets the Id field's value. 10434func (s *User) SetId(v string) *User { 10435 s.Id = &v 10436 return s 10437} 10438 10439// SetName sets the Name field's value. 10440func (s *User) SetName(v string) *User { 10441 s.Name = &v 10442 return s 10443} 10444 10445// SetState sets the State field's value. 10446func (s *User) SetState(v string) *User { 10447 s.State = &v 10448 return s 10449} 10450 10451// SetUserRole sets the UserRole field's value. 10452func (s *User) SetUserRole(v string) *User { 10453 s.UserRole = &v 10454 return s 10455} 10456 10457const ( 10458 // AccessControlRuleEffectAllow is a AccessControlRuleEffect enum value 10459 AccessControlRuleEffectAllow = "ALLOW" 10460 10461 // AccessControlRuleEffectDeny is a AccessControlRuleEffect enum value 10462 AccessControlRuleEffectDeny = "DENY" 10463) 10464 10465const ( 10466 // EntityStateEnabled is a EntityState enum value 10467 EntityStateEnabled = "ENABLED" 10468 10469 // EntityStateDisabled is a EntityState enum value 10470 EntityStateDisabled = "DISABLED" 10471 10472 // EntityStateDeleted is a EntityState enum value 10473 EntityStateDeleted = "DELETED" 10474) 10475 10476const ( 10477 // FolderNameInbox is a FolderName enum value 10478 FolderNameInbox = "INBOX" 10479 10480 // FolderNameDeletedItems is a FolderName enum value 10481 FolderNameDeletedItems = "DELETED_ITEMS" 10482 10483 // FolderNameSentItems is a FolderName enum value 10484 FolderNameSentItems = "SENT_ITEMS" 10485 10486 // FolderNameDrafts is a FolderName enum value 10487 FolderNameDrafts = "DRAFTS" 10488 10489 // FolderNameJunkEmail is a FolderName enum value 10490 FolderNameJunkEmail = "JUNK_EMAIL" 10491) 10492 10493const ( 10494 // MemberTypeGroup is a MemberType enum value 10495 MemberTypeGroup = "GROUP" 10496 10497 // MemberTypeUser is a MemberType enum value 10498 MemberTypeUser = "USER" 10499) 10500 10501const ( 10502 // PermissionTypeFullAccess is a PermissionType enum value 10503 PermissionTypeFullAccess = "FULL_ACCESS" 10504 10505 // PermissionTypeSendAs is a PermissionType enum value 10506 PermissionTypeSendAs = "SEND_AS" 10507 10508 // PermissionTypeSendOnBehalf is a PermissionType enum value 10509 PermissionTypeSendOnBehalf = "SEND_ON_BEHALF" 10510) 10511 10512const ( 10513 // ResourceTypeRoom is a ResourceType enum value 10514 ResourceTypeRoom = "ROOM" 10515 10516 // ResourceTypeEquipment is a ResourceType enum value 10517 ResourceTypeEquipment = "EQUIPMENT" 10518) 10519 10520const ( 10521 // RetentionActionNone is a RetentionAction enum value 10522 RetentionActionNone = "NONE" 10523 10524 // RetentionActionDelete is a RetentionAction enum value 10525 RetentionActionDelete = "DELETE" 10526 10527 // RetentionActionPermanentlyDelete is a RetentionAction enum value 10528 RetentionActionPermanentlyDelete = "PERMANENTLY_DELETE" 10529) 10530 10531const ( 10532 // UserRoleUser is a UserRole enum value 10533 UserRoleUser = "USER" 10534 10535 // UserRoleResource is a UserRole enum value 10536 UserRoleResource = "RESOURCE" 10537 10538 // UserRoleSystemUser is a UserRole enum value 10539 UserRoleSystemUser = "SYSTEM_USER" 10540) 10541