amazonka-workmail (empty) → 1.6.0
raw patch · 107 files changed
+8007/−0 lines, 107 filesdep +amazonka-coredep +amazonka-testdep +amazonka-workmailsetup-changed
Dependencies added: amazonka-core, amazonka-test, amazonka-workmail, base, bytestring, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +45/−0
- Setup.hs +2/−0
- amazonka-workmail.cabal +116/−0
- fixture/AssociateDelegateToResource.yaml +10/−0
- fixture/AssociateDelegateToResourceResponse.proto +0/−0
- fixture/AssociateMemberToGroup.yaml +10/−0
- fixture/AssociateMemberToGroupResponse.proto +0/−0
- fixture/CreateAlias.yaml +10/−0
- fixture/CreateAliasResponse.proto +0/−0
- fixture/CreateGroup.yaml +10/−0
- fixture/CreateGroupResponse.proto +0/−0
- fixture/CreateResource.yaml +10/−0
- fixture/CreateResourceResponse.proto +0/−0
- fixture/CreateUser.yaml +10/−0
- fixture/CreateUserResponse.proto +0/−0
- fixture/DeleteAlias.yaml +10/−0
- fixture/DeleteAliasResponse.proto +0/−0
- fixture/DeleteGroup.yaml +10/−0
- fixture/DeleteGroupResponse.proto +0/−0
- fixture/DeleteMailboxPermissions.yaml +10/−0
- fixture/DeleteMailboxPermissionsResponse.proto +0/−0
- fixture/DeleteResource.yaml +10/−0
- fixture/DeleteResourceResponse.proto +0/−0
- fixture/DeleteUser.yaml +10/−0
- fixture/DeleteUserResponse.proto +0/−0
- fixture/DeregisterFromWorkMail.yaml +10/−0
- fixture/DeregisterFromWorkMailResponse.proto +0/−0
- fixture/DescribeGroup.yaml +10/−0
- fixture/DescribeGroupResponse.proto +0/−0
- fixture/DescribeOrganization.yaml +10/−0
- fixture/DescribeOrganizationResponse.proto +0/−0
- fixture/DescribeResource.yaml +10/−0
- fixture/DescribeResourceResponse.proto +0/−0
- fixture/DescribeUser.yaml +10/−0
- fixture/DescribeUserResponse.proto +0/−0
- fixture/DisassociateDelegateFromResource.yaml +10/−0
- fixture/DisassociateDelegateFromResourceResponse.proto +0/−0
- fixture/DisassociateMemberFromGroup.yaml +10/−0
- fixture/DisassociateMemberFromGroupResponse.proto +0/−0
- fixture/ListAliases.yaml +10/−0
- fixture/ListAliasesResponse.proto +0/−0
- fixture/ListGroupMembers.yaml +10/−0
- fixture/ListGroupMembersResponse.proto +0/−0
- fixture/ListGroups.yaml +10/−0
- fixture/ListGroupsResponse.proto +0/−0
- fixture/ListMailboxPermissions.yaml +10/−0
- fixture/ListMailboxPermissionsResponse.proto +0/−0
- fixture/ListOrganizations.yaml +10/−0
- fixture/ListOrganizationsResponse.proto +0/−0
- fixture/ListResourceDelegates.yaml +10/−0
- fixture/ListResourceDelegatesResponse.proto +0/−0
- fixture/ListResources.yaml +10/−0
- fixture/ListResourcesResponse.proto +0/−0
- fixture/ListUsers.yaml +10/−0
- fixture/ListUsersResponse.proto +0/−0
- fixture/PutMailboxPermissions.yaml +10/−0
- fixture/PutMailboxPermissionsResponse.proto +0/−0
- fixture/RegisterToWorkMail.yaml +10/−0
- fixture/RegisterToWorkMailResponse.proto +0/−0
- fixture/ResetPassword.yaml +10/−0
- fixture/ResetPasswordResponse.proto +0/−0
- fixture/UpdatePrimaryEmailAddress.yaml +10/−0
- fixture/UpdatePrimaryEmailAddressResponse.proto +0/−0
- fixture/UpdateResource.yaml +10/−0
- fixture/UpdateResourceResponse.proto +0/−0
- gen/Network/AWS/WorkMail.hs +343/−0
- gen/Network/AWS/WorkMail/AssociateDelegateToResource.hs +152/−0
- gen/Network/AWS/WorkMail/AssociateMemberToGroup.hs +150/−0
- gen/Network/AWS/WorkMail/CreateAlias.hs +147/−0
- gen/Network/AWS/WorkMail/CreateGroup.hs +143/−0
- gen/Network/AWS/WorkMail/CreateResource.hs +153/−0
- gen/Network/AWS/WorkMail/CreateUser.hs +168/−0
- gen/Network/AWS/WorkMail/DeleteAlias.hs +147/−0
- gen/Network/AWS/WorkMail/DeleteGroup.hs +133/−0
- gen/Network/AWS/WorkMail/DeleteMailboxPermissions.hs +151/−0
- gen/Network/AWS/WorkMail/DeleteResource.hs +134/−0
- gen/Network/AWS/WorkMail/DeleteUser.hs +133/−0
- gen/Network/AWS/WorkMail/DeregisterFromWorkMail.hs +137/−0
- gen/Network/AWS/WorkMail/DescribeGroup.hs +195/−0
- gen/Network/AWS/WorkMail/DescribeOrganization.hs +207/−0
- gen/Network/AWS/WorkMail/DescribeResource.hs +216/−0
- gen/Network/AWS/WorkMail/DescribeUser.hs +215/−0
- gen/Network/AWS/WorkMail/DisassociateDelegateFromResource.hs +160/−0
- gen/Network/AWS/WorkMail/DisassociateMemberFromGroup.hs +152/−0
- gen/Network/AWS/WorkMail/ListAliases.hs +188/−0
- gen/Network/AWS/WorkMail/ListGroupMembers.hs +188/−0
- gen/Network/AWS/WorkMail/ListGroups.hs +177/−0
- gen/Network/AWS/WorkMail/ListMailboxPermissions.hs +181/−0
- gen/Network/AWS/WorkMail/ListOrganizations.hs +164/−0
- gen/Network/AWS/WorkMail/ListResourceDelegates.hs +181/−0
- gen/Network/AWS/WorkMail/ListResources.hs +178/−0
- gen/Network/AWS/WorkMail/ListUsers.hs +177/−0
- gen/Network/AWS/WorkMail/PutMailboxPermissions.hs +160/−0
- gen/Network/AWS/WorkMail/RegisterToWorkMail.hs +148/−0
- gen/Network/AWS/WorkMail/ResetPassword.hs +147/−0
- gen/Network/AWS/WorkMail/Types.hs +291/−0
- gen/Network/AWS/WorkMail/Types/Product.hs +606/−0
- gen/Network/AWS/WorkMail/Types/Sum.hs +170/−0
- gen/Network/AWS/WorkMail/UpdatePrimaryEmailAddress.hs +151/−0
- gen/Network/AWS/WorkMail/UpdateResource.hs +156/−0
- gen/Network/AWS/WorkMail/Waiters.hs +21/−0
- src/.gitkeep +0/−0
- test/Main.hs +21/−0
- test/Test/AWS/Gen/WorkMail.hs +597/−0
- test/Test/AWS/WorkMail.hs +20/−0
- test/Test/AWS/WorkMail/Internal.hs +9/−0
+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,45 @@+# Amazon WorkMail SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.6.0`+++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-workmail)+and the [AWS API Reference](https://aws.amazon.com/documentation/).++The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information, sending requests,+and receiving responses.++Lenses are used for constructing and manipulating types,+due to the depth of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++See [Network.AWS.WorkMail](http://hackage.haskell.org/package/amazonka-workmail/docs/Network-AWS-WorkMail.html)+or [the AWS documentation](https://aws.amazon.com/documentation/) to get started.+++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`amazonka-workmail` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).++Parts of the code are derived from AWS service descriptions, licensed under Apache 2.0.+Source files subject to this contain an additional licensing clause in their header.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ amazonka-workmail.cabal view
@@ -0,0 +1,116 @@+name: amazonka-workmail+version: 1.6.0+synopsis: Amazon WorkMail SDK.+homepage: https://github.com/brendanhay/amazonka+bug-reports: https://github.com/brendanhay/amazonka/issues+license: MPL-2.0+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>+copyright: Copyright (c) 2013-2018 Brendan Hay+category: Network, AWS, Cloud, Distributed Computing+build-type: Simple+cabal-version: >= 1.10+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep+description:+ The types from this library are intended to be used with+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides+ mechanisms for specifying AuthN/AuthZ information, sending requests,+ and receiving responses.+ .+ Lenses are used for constructing and manipulating types,+ due to the depth of nesting of AWS types and transparency regarding+ de/serialisation into more palatable Haskell values.+ The provided lenses should be compatible with any of the major lens libraries+ such as <http://hackage.haskell.org/package/lens lens> or+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Network.AWS.WorkMail" or <https://aws.amazon.com/documentation/ the AWS documentation>+ to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git+ subdir: amazonka-workmail++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options:+ -Wall+ -fwarn-incomplete-uni-patterns+ -fwarn-incomplete-record-updates+ -funbox-strict-fields++ exposed-modules:+ Network.AWS.WorkMail+ , Network.AWS.WorkMail.AssociateDelegateToResource+ , Network.AWS.WorkMail.AssociateMemberToGroup+ , Network.AWS.WorkMail.CreateAlias+ , Network.AWS.WorkMail.CreateGroup+ , Network.AWS.WorkMail.CreateResource+ , Network.AWS.WorkMail.CreateUser+ , Network.AWS.WorkMail.DeleteAlias+ , Network.AWS.WorkMail.DeleteGroup+ , Network.AWS.WorkMail.DeleteMailboxPermissions+ , Network.AWS.WorkMail.DeleteResource+ , Network.AWS.WorkMail.DeleteUser+ , Network.AWS.WorkMail.DeregisterFromWorkMail+ , Network.AWS.WorkMail.DescribeGroup+ , Network.AWS.WorkMail.DescribeOrganization+ , Network.AWS.WorkMail.DescribeResource+ , Network.AWS.WorkMail.DescribeUser+ , Network.AWS.WorkMail.DisassociateDelegateFromResource+ , Network.AWS.WorkMail.DisassociateMemberFromGroup+ , Network.AWS.WorkMail.ListAliases+ , Network.AWS.WorkMail.ListGroupMembers+ , Network.AWS.WorkMail.ListGroups+ , Network.AWS.WorkMail.ListMailboxPermissions+ , Network.AWS.WorkMail.ListOrganizations+ , Network.AWS.WorkMail.ListResourceDelegates+ , Network.AWS.WorkMail.ListResources+ , Network.AWS.WorkMail.ListUsers+ , Network.AWS.WorkMail.PutMailboxPermissions+ , Network.AWS.WorkMail.RegisterToWorkMail+ , Network.AWS.WorkMail.ResetPassword+ , Network.AWS.WorkMail.Types+ , Network.AWS.WorkMail.UpdatePrimaryEmailAddress+ , Network.AWS.WorkMail.UpdateResource+ , Network.AWS.WorkMail.Waiters++ other-modules:+ Network.AWS.WorkMail.Types.Product+ , Network.AWS.WorkMail.Types.Sum++ build-depends:+ amazonka-core == 1.6.0.*+ , base >= 4.7 && < 5++test-suite amazonka-workmail-test+ type: exitcode-stdio-1.0+ default-language: Haskell2010+ hs-source-dirs: test+ main-is: Main.hs++ ghc-options: -Wall -threaded++ -- This section is encoded by the template and any modules added by+ -- hand outside these namespaces will not correctly be added to the+ -- distribution package.+ other-modules:+ Test.AWS.WorkMail+ , Test.AWS.Gen.WorkMail+ , Test.AWS.WorkMail.Internal++ build-depends:+ amazonka-core == 1.6.0.*+ , amazonka-test == 1.6.0.*+ , amazonka-workmail+ , base+ , bytestring+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/AssociateDelegateToResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/AssociateDelegateToResourceResponse.proto view
+ fixture/AssociateMemberToGroup.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/AssociateMemberToGroupResponse.proto view
+ fixture/CreateAlias.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateAliasResponse.proto view
+ fixture/CreateGroup.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateGroupResponse.proto view
+ fixture/CreateResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateResourceResponse.proto view
+ fixture/CreateUser.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateUserResponse.proto view
+ fixture/DeleteAlias.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteAliasResponse.proto view
+ fixture/DeleteGroup.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteGroupResponse.proto view
+ fixture/DeleteMailboxPermissions.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteMailboxPermissionsResponse.proto view
+ fixture/DeleteResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteResourceResponse.proto view
+ fixture/DeleteUser.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteUserResponse.proto view
+ fixture/DeregisterFromWorkMail.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeregisterFromWorkMailResponse.proto view
+ fixture/DescribeGroup.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeGroupResponse.proto view
+ fixture/DescribeOrganization.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeOrganizationResponse.proto view
+ fixture/DescribeResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeResourceResponse.proto view
+ fixture/DescribeUser.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeUserResponse.proto view
+ fixture/DisassociateDelegateFromResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DisassociateDelegateFromResourceResponse.proto view
+ fixture/DisassociateMemberFromGroup.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DisassociateMemberFromGroupResponse.proto view
+ fixture/ListAliases.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListAliasesResponse.proto view
+ fixture/ListGroupMembers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListGroupMembersResponse.proto view
+ fixture/ListGroups.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListGroupsResponse.proto view
+ fixture/ListMailboxPermissions.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListMailboxPermissionsResponse.proto view
+ fixture/ListOrganizations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListOrganizationsResponse.proto view
+ fixture/ListResourceDelegates.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListResourceDelegatesResponse.proto view
+ fixture/ListResources.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListResourcesResponse.proto view
+ fixture/ListUsers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListUsersResponse.proto view
+ fixture/PutMailboxPermissions.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/PutMailboxPermissionsResponse.proto view
+ fixture/RegisterToWorkMail.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/RegisterToWorkMailResponse.proto view
+ fixture/ResetPassword.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ResetPasswordResponse.proto view
+ fixture/UpdatePrimaryEmailAddress.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdatePrimaryEmailAddressResponse.proto view
+ fixture/UpdateResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/workmail/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: workmail.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdateResourceResponse.proto view
+ gen/Network/AWS/WorkMail.hs view
@@ -0,0 +1,343 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Amazon WorkMail is a secure, managed business email and calendaring service with support for existing desktop and mobile email clients. You can access your email, contacts, and calendars using Microsoft Outlook, your browser, or their native iOS and Android email applications. You can integrate Amazon WorkMail with your existing corporate directory and control both the keys that encrypt your data and the location in which your data is stored.+--+--+-- The Amazon WorkMail API is designed for the following scenarios:+--+-- * Listing and describing organizations+--+--+--+-- * Managing users+--+--+--+-- * Managing groups+--+--+--+-- * Managing resources+--+--+--+-- All Amazon WorkMail API actions are Amazon-authenticated and certificate-signed. They not only require the use of the AWS SDK, but also allow for the exclusive use of IAM users and roles to help facilitate access, trust, and permission policies. By creating a role and allowing an IAM user to access the Amazon WorkMail site, the IAM user gains full administrative visibility into the entire Amazon WorkMail organization (or as set in the IAM policy). This includes, but is not limited to, the ability to create, update, and delete users, groups, and resources. This allows developers to perform the scenarios listed above, as well as give users the ability to grant access on a selective basis using the IAM model.+--+module Network.AWS.WorkMail+ (+ -- * Service Configuration+ workMail++ -- * Errors+ -- $errors++ -- ** DirectoryUnavailableException+ , _DirectoryUnavailableException++ -- ** InvalidParameterException+ , _InvalidParameterException++ -- ** UnsupportedOperationException+ , _UnsupportedOperationException++ -- ** DirectoryServiceAuthenticationFailedException+ , _DirectoryServiceAuthenticationFailedException++ -- ** OrganizationStateException+ , _OrganizationStateException++ -- ** EntityStateException+ , _EntityStateException++ -- ** InvalidConfigurationException+ , _InvalidConfigurationException++ -- ** MailDomainStateException+ , _MailDomainStateException++ -- ** ReservedNameException+ , _ReservedNameException++ -- ** OrganizationNotFoundException+ , _OrganizationNotFoundException++ -- ** EntityNotFoundException+ , _EntityNotFoundException++ -- ** EntityAlreadyRegisteredException+ , _EntityAlreadyRegisteredException++ -- ** MailDomainNotFoundException+ , _MailDomainNotFoundException++ -- ** EmailAddressInUseException+ , _EmailAddressInUseException++ -- ** NameAvailabilityException+ , _NameAvailabilityException++ -- ** InvalidPasswordException+ , _InvalidPasswordException++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** UpdatePrimaryEmailAddress+ , module Network.AWS.WorkMail.UpdatePrimaryEmailAddress++ -- ** DescribeResource+ , module Network.AWS.WorkMail.DescribeResource++ -- ** CreateAlias+ , module Network.AWS.WorkMail.CreateAlias++ -- ** ResetPassword+ , module Network.AWS.WorkMail.ResetPassword++ -- ** DescribeGroup+ , module Network.AWS.WorkMail.DescribeGroup++ -- ** RegisterToWorkMail+ , module Network.AWS.WorkMail.RegisterToWorkMail++ -- ** ListAliases (Paginated)+ , module Network.AWS.WorkMail.ListAliases++ -- ** PutMailboxPermissions+ , module Network.AWS.WorkMail.PutMailboxPermissions++ -- ** DeleteMailboxPermissions+ , module Network.AWS.WorkMail.DeleteMailboxPermissions++ -- ** ListUsers (Paginated)+ , module Network.AWS.WorkMail.ListUsers++ -- ** AssociateMemberToGroup+ , module Network.AWS.WorkMail.AssociateMemberToGroup++ -- ** DeleteResource+ , module Network.AWS.WorkMail.DeleteResource++ -- ** UpdateResource+ , module Network.AWS.WorkMail.UpdateResource++ -- ** DisassociateMemberFromGroup+ , module Network.AWS.WorkMail.DisassociateMemberFromGroup++ -- ** ListResources (Paginated)+ , module Network.AWS.WorkMail.ListResources++ -- ** DeregisterFromWorkMail+ , module Network.AWS.WorkMail.DeregisterFromWorkMail++ -- ** ListMailboxPermissions+ , module Network.AWS.WorkMail.ListMailboxPermissions++ -- ** ListGroupMembers (Paginated)+ , module Network.AWS.WorkMail.ListGroupMembers++ -- ** DisassociateDelegateFromResource+ , module Network.AWS.WorkMail.DisassociateDelegateFromResource++ -- ** ListResourceDelegates+ , module Network.AWS.WorkMail.ListResourceDelegates++ -- ** DescribeUser+ , module Network.AWS.WorkMail.DescribeUser++ -- ** DeleteAlias+ , module Network.AWS.WorkMail.DeleteAlias++ -- ** ListOrganizations (Paginated)+ , module Network.AWS.WorkMail.ListOrganizations++ -- ** AssociateDelegateToResource+ , module Network.AWS.WorkMail.AssociateDelegateToResource++ -- ** CreateUser+ , module Network.AWS.WorkMail.CreateUser++ -- ** DeleteUser+ , module Network.AWS.WorkMail.DeleteUser++ -- ** CreateGroup+ , module Network.AWS.WorkMail.CreateGroup++ -- ** DeleteGroup+ , module Network.AWS.WorkMail.DeleteGroup++ -- ** ListGroups (Paginated)+ , module Network.AWS.WorkMail.ListGroups++ -- ** DescribeOrganization+ , module Network.AWS.WorkMail.DescribeOrganization++ -- ** CreateResource+ , module Network.AWS.WorkMail.CreateResource++ -- * Types++ -- ** EntityState+ , EntityState (..)++ -- ** MemberType+ , MemberType (..)++ -- ** PermissionType+ , PermissionType (..)++ -- ** ResourceType+ , ResourceType (..)++ -- ** UserRole+ , UserRole (..)++ -- ** BookingOptions+ , BookingOptions+ , bookingOptions+ , boAutoDeclineConflictingRequests+ , boAutoDeclineRecurringRequests+ , boAutoAcceptRequests++ -- ** Delegate+ , Delegate+ , delegate+ , dId+ , dType++ -- ** Group+ , Group+ , group'+ , gEmail+ , gState+ , gDisabledDate+ , gName+ , gId+ , gEnabledDate++ -- ** Member+ , Member+ , member+ , mState+ , mDisabledDate+ , mName+ , mId+ , mType+ , mEnabledDate++ -- ** OrganizationSummary+ , OrganizationSummary+ , organizationSummary+ , osState+ , osAlias+ , osErrorMessage+ , osOrganizationId++ -- ** Permission+ , Permission+ , permission+ , pGranteeId+ , pGranteeType+ , pPermissionValues++ -- ** Resource+ , Resource+ , resource+ , rEmail+ , rState+ , rDisabledDate+ , rName+ , rId+ , rType+ , rEnabledDate++ -- ** User+ , User+ , user+ , uEmail+ , uState+ , uDisabledDate+ , uName+ , uId+ , uDisplayName+ , uUserRole+ , uEnabledDate+ ) where++import Network.AWS.WorkMail.AssociateDelegateToResource+import Network.AWS.WorkMail.AssociateMemberToGroup+import Network.AWS.WorkMail.CreateAlias+import Network.AWS.WorkMail.CreateGroup+import Network.AWS.WorkMail.CreateResource+import Network.AWS.WorkMail.CreateUser+import Network.AWS.WorkMail.DeleteAlias+import Network.AWS.WorkMail.DeleteGroup+import Network.AWS.WorkMail.DeleteMailboxPermissions+import Network.AWS.WorkMail.DeleteResource+import Network.AWS.WorkMail.DeleteUser+import Network.AWS.WorkMail.DeregisterFromWorkMail+import Network.AWS.WorkMail.DescribeGroup+import Network.AWS.WorkMail.DescribeOrganization+import Network.AWS.WorkMail.DescribeResource+import Network.AWS.WorkMail.DescribeUser+import Network.AWS.WorkMail.DisassociateDelegateFromResource+import Network.AWS.WorkMail.DisassociateMemberFromGroup+import Network.AWS.WorkMail.ListAliases+import Network.AWS.WorkMail.ListGroupMembers+import Network.AWS.WorkMail.ListGroups+import Network.AWS.WorkMail.ListMailboxPermissions+import Network.AWS.WorkMail.ListOrganizations+import Network.AWS.WorkMail.ListResourceDelegates+import Network.AWS.WorkMail.ListResources+import Network.AWS.WorkMail.ListUsers+import Network.AWS.WorkMail.PutMailboxPermissions+import Network.AWS.WorkMail.RegisterToWorkMail+import Network.AWS.WorkMail.ResetPassword+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.UpdatePrimaryEmailAddress+import Network.AWS.WorkMail.UpdateResource+import Network.AWS.WorkMail.Waiters++{- $errors+Error matchers are designed for use with the functions provided by+<http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.+This allows catching (and rethrowing) service specific errors returned+by 'WorkMail'.+-}++{- $operations+Some AWS operations return results that are incomplete and require subsequent+requests in order to obtain the entire result set. The process of sending+subsequent requests to continue where a previous request left off is called+pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+1000 objects at a time, and you must send subsequent requests with the+appropriate Marker in order to retrieve the next page of results.++Operations that have an 'AWSPager' instance can transparently perform subsequent+requests, correctly setting Markers and other request facets to iterate through+the entire result set of a truncated API operation. Operations which support+this have an additional note in the documentation.++Many operations have the ability to filter results on the server side. See the+individual operation parameters for details.+-}++{- $waiters+Waiters poll by repeatedly sending a request until some remote success condition+configured by the 'Wait' specification is fulfilled. The 'Wait' specification+determines how many attempts should be made, in addition to delay and retry strategies.+-}
+ gen/Network/AWS/WorkMail/AssociateDelegateToResource.hs view
@@ -0,0 +1,152 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.AssociateDelegateToResource+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Adds a member to the resource's set of delegates.+--+--+module Network.AWS.WorkMail.AssociateDelegateToResource+ (+ -- * Creating a Request+ associateDelegateToResource+ , AssociateDelegateToResource+ -- * Request Lenses+ , adtrOrganizationId+ , adtrResourceId+ , adtrEntityId++ -- * Destructuring the Response+ , associateDelegateToResourceResponse+ , AssociateDelegateToResourceResponse+ -- * Response Lenses+ , adtrrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'associateDelegateToResource' smart constructor.+data AssociateDelegateToResource = AssociateDelegateToResource'+ { _adtrOrganizationId :: !Text+ , _adtrResourceId :: !Text+ , _adtrEntityId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AssociateDelegateToResource' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'adtrOrganizationId' - The organization under which the resource exists.+--+-- * 'adtrResourceId' - The resource for which members are associated.+--+-- * 'adtrEntityId' - The member (user or group) to associate to the resource.+associateDelegateToResource+ :: Text -- ^ 'adtrOrganizationId'+ -> Text -- ^ 'adtrResourceId'+ -> Text -- ^ 'adtrEntityId'+ -> AssociateDelegateToResource+associateDelegateToResource pOrganizationId_ pResourceId_ pEntityId_ =+ AssociateDelegateToResource'+ { _adtrOrganizationId = pOrganizationId_+ , _adtrResourceId = pResourceId_+ , _adtrEntityId = pEntityId_+ }+++-- | The organization under which the resource exists.+adtrOrganizationId :: Lens' AssociateDelegateToResource Text+adtrOrganizationId = lens _adtrOrganizationId (\ s a -> s{_adtrOrganizationId = a})++-- | The resource for which members are associated.+adtrResourceId :: Lens' AssociateDelegateToResource Text+adtrResourceId = lens _adtrResourceId (\ s a -> s{_adtrResourceId = a})++-- | The member (user or group) to associate to the resource.+adtrEntityId :: Lens' AssociateDelegateToResource Text+adtrEntityId = lens _adtrEntityId (\ s a -> s{_adtrEntityId = a})++instance AWSRequest AssociateDelegateToResource where+ type Rs AssociateDelegateToResource =+ AssociateDelegateToResourceResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ AssociateDelegateToResourceResponse' <$>+ (pure (fromEnum s)))++instance Hashable AssociateDelegateToResource where++instance NFData AssociateDelegateToResource where++instance ToHeaders AssociateDelegateToResource where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.AssociateDelegateToResource" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON AssociateDelegateToResource where+ toJSON AssociateDelegateToResource'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _adtrOrganizationId),+ Just ("ResourceId" .= _adtrResourceId),+ Just ("EntityId" .= _adtrEntityId)])++instance ToPath AssociateDelegateToResource where+ toPath = const "/"++instance ToQuery AssociateDelegateToResource where+ toQuery = const mempty++-- | /See:/ 'associateDelegateToResourceResponse' smart constructor.+newtype AssociateDelegateToResourceResponse = AssociateDelegateToResourceResponse'+ { _adtrrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AssociateDelegateToResourceResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'adtrrsResponseStatus' - -- | The response status code.+associateDelegateToResourceResponse+ :: Int -- ^ 'adtrrsResponseStatus'+ -> AssociateDelegateToResourceResponse+associateDelegateToResourceResponse pResponseStatus_ =+ AssociateDelegateToResourceResponse'+ {_adtrrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+adtrrsResponseStatus :: Lens' AssociateDelegateToResourceResponse Int+adtrrsResponseStatus = lens _adtrrsResponseStatus (\ s a -> s{_adtrrsResponseStatus = a})++instance NFData AssociateDelegateToResourceResponse+ where
+ gen/Network/AWS/WorkMail/AssociateMemberToGroup.hs view
@@ -0,0 +1,150 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.AssociateMemberToGroup+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Adds a member to the group's set.+--+--+module Network.AWS.WorkMail.AssociateMemberToGroup+ (+ -- * Creating a Request+ associateMemberToGroup+ , AssociateMemberToGroup+ -- * Request Lenses+ , amtgOrganizationId+ , amtgGroupId+ , amtgMemberId++ -- * Destructuring the Response+ , associateMemberToGroupResponse+ , AssociateMemberToGroupResponse+ -- * Response Lenses+ , amtgrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'associateMemberToGroup' smart constructor.+data AssociateMemberToGroup = AssociateMemberToGroup'+ { _amtgOrganizationId :: !Text+ , _amtgGroupId :: !Text+ , _amtgMemberId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AssociateMemberToGroup' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'amtgOrganizationId' - The organization under which the group exists.+--+-- * 'amtgGroupId' - The group for which the member is associated.+--+-- * 'amtgMemberId' - The member to associate to the group.+associateMemberToGroup+ :: Text -- ^ 'amtgOrganizationId'+ -> Text -- ^ 'amtgGroupId'+ -> Text -- ^ 'amtgMemberId'+ -> AssociateMemberToGroup+associateMemberToGroup pOrganizationId_ pGroupId_ pMemberId_ =+ AssociateMemberToGroup'+ { _amtgOrganizationId = pOrganizationId_+ , _amtgGroupId = pGroupId_+ , _amtgMemberId = pMemberId_+ }+++-- | The organization under which the group exists.+amtgOrganizationId :: Lens' AssociateMemberToGroup Text+amtgOrganizationId = lens _amtgOrganizationId (\ s a -> s{_amtgOrganizationId = a})++-- | The group for which the member is associated.+amtgGroupId :: Lens' AssociateMemberToGroup Text+amtgGroupId = lens _amtgGroupId (\ s a -> s{_amtgGroupId = a})++-- | The member to associate to the group.+amtgMemberId :: Lens' AssociateMemberToGroup Text+amtgMemberId = lens _amtgMemberId (\ s a -> s{_amtgMemberId = a})++instance AWSRequest AssociateMemberToGroup where+ type Rs AssociateMemberToGroup =+ AssociateMemberToGroupResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ AssociateMemberToGroupResponse' <$>+ (pure (fromEnum s)))++instance Hashable AssociateMemberToGroup where++instance NFData AssociateMemberToGroup where++instance ToHeaders AssociateMemberToGroup where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.AssociateMemberToGroup" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON AssociateMemberToGroup where+ toJSON AssociateMemberToGroup'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _amtgOrganizationId),+ Just ("GroupId" .= _amtgGroupId),+ Just ("MemberId" .= _amtgMemberId)])++instance ToPath AssociateMemberToGroup where+ toPath = const "/"++instance ToQuery AssociateMemberToGroup where+ toQuery = const mempty++-- | /See:/ 'associateMemberToGroupResponse' smart constructor.+newtype AssociateMemberToGroupResponse = AssociateMemberToGroupResponse'+ { _amtgrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AssociateMemberToGroupResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'amtgrsResponseStatus' - -- | The response status code.+associateMemberToGroupResponse+ :: Int -- ^ 'amtgrsResponseStatus'+ -> AssociateMemberToGroupResponse+associateMemberToGroupResponse pResponseStatus_ =+ AssociateMemberToGroupResponse' {_amtgrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+amtgrsResponseStatus :: Lens' AssociateMemberToGroupResponse Int+amtgrsResponseStatus = lens _amtgrsResponseStatus (\ s a -> s{_amtgrsResponseStatus = a})++instance NFData AssociateMemberToGroupResponse where
+ gen/Network/AWS/WorkMail/CreateAlias.hs view
@@ -0,0 +1,147 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.CreateAlias+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Adds an alias to the set of a given member of Amazon WorkMail.+--+--+module Network.AWS.WorkMail.CreateAlias+ (+ -- * Creating a Request+ createAlias+ , CreateAlias+ -- * Request Lenses+ , caOrganizationId+ , caEntityId+ , caAlias++ -- * Destructuring the Response+ , createAliasResponse+ , CreateAliasResponse+ -- * Response Lenses+ , carsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'createAlias' smart constructor.+data CreateAlias = CreateAlias'+ { _caOrganizationId :: !Text+ , _caEntityId :: !Text+ , _caAlias :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateAlias' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'caOrganizationId' - The organization under which the member exists.+--+-- * 'caEntityId' - The alias is added to this Amazon WorkMail entity.+--+-- * 'caAlias' - The alias to add to the user.+createAlias+ :: Text -- ^ 'caOrganizationId'+ -> Text -- ^ 'caEntityId'+ -> Text -- ^ 'caAlias'+ -> CreateAlias+createAlias pOrganizationId_ pEntityId_ pAlias_ =+ CreateAlias'+ { _caOrganizationId = pOrganizationId_+ , _caEntityId = pEntityId_+ , _caAlias = pAlias_+ }+++-- | The organization under which the member exists.+caOrganizationId :: Lens' CreateAlias Text+caOrganizationId = lens _caOrganizationId (\ s a -> s{_caOrganizationId = a})++-- | The alias is added to this Amazon WorkMail entity.+caEntityId :: Lens' CreateAlias Text+caEntityId = lens _caEntityId (\ s a -> s{_caEntityId = a})++-- | The alias to add to the user.+caAlias :: Lens' CreateAlias Text+caAlias = lens _caAlias (\ s a -> s{_caAlias = a})++instance AWSRequest CreateAlias where+ type Rs CreateAlias = CreateAliasResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ CreateAliasResponse' <$> (pure (fromEnum s)))++instance Hashable CreateAlias where++instance NFData CreateAlias where++instance ToHeaders CreateAlias where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.CreateAlias" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateAlias where+ toJSON CreateAlias'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _caOrganizationId),+ Just ("EntityId" .= _caEntityId),+ Just ("Alias" .= _caAlias)])++instance ToPath CreateAlias where+ toPath = const "/"++instance ToQuery CreateAlias where+ toQuery = const mempty++-- | /See:/ 'createAliasResponse' smart constructor.+newtype CreateAliasResponse = CreateAliasResponse'+ { _carsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateAliasResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'carsResponseStatus' - -- | The response status code.+createAliasResponse+ :: Int -- ^ 'carsResponseStatus'+ -> CreateAliasResponse+createAliasResponse pResponseStatus_ =+ CreateAliasResponse' {_carsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+carsResponseStatus :: Lens' CreateAliasResponse Int+carsResponseStatus = lens _carsResponseStatus (\ s a -> s{_carsResponseStatus = a})++instance NFData CreateAliasResponse where
+ gen/Network/AWS/WorkMail/CreateGroup.hs view
@@ -0,0 +1,143 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.CreateGroup+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a group that can be used in Amazon WorkMail by calling the RegisterToWorkMail operation.+--+--+module Network.AWS.WorkMail.CreateGroup+ (+ -- * Creating a Request+ createGroup+ , CreateGroup+ -- * Request Lenses+ , cgOrganizationId+ , cgName++ -- * Destructuring the Response+ , createGroupResponse+ , CreateGroupResponse+ -- * Response Lenses+ , cgrsGroupId+ , cgrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'createGroup' smart constructor.+data CreateGroup = CreateGroup'+ { _cgOrganizationId :: !Text+ , _cgName :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateGroup' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cgOrganizationId' - The organization under which the group is to be created.+--+-- * 'cgName' - The name of the group.+createGroup+ :: Text -- ^ 'cgOrganizationId'+ -> Text -- ^ 'cgName'+ -> CreateGroup+createGroup pOrganizationId_ pName_ =+ CreateGroup' {_cgOrganizationId = pOrganizationId_, _cgName = pName_}+++-- | The organization under which the group is to be created.+cgOrganizationId :: Lens' CreateGroup Text+cgOrganizationId = lens _cgOrganizationId (\ s a -> s{_cgOrganizationId = a})++-- | The name of the group.+cgName :: Lens' CreateGroup Text+cgName = lens _cgName (\ s a -> s{_cgName = a})++instance AWSRequest CreateGroup where+ type Rs CreateGroup = CreateGroupResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ CreateGroupResponse' <$>+ (x .?> "GroupId") <*> (pure (fromEnum s)))++instance Hashable CreateGroup where++instance NFData CreateGroup where++instance ToHeaders CreateGroup where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.CreateGroup" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateGroup where+ toJSON CreateGroup'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _cgOrganizationId),+ Just ("Name" .= _cgName)])++instance ToPath CreateGroup where+ toPath = const "/"++instance ToQuery CreateGroup where+ toQuery = const mempty++-- | /See:/ 'createGroupResponse' smart constructor.+data CreateGroupResponse = CreateGroupResponse'+ { _cgrsGroupId :: !(Maybe Text)+ , _cgrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateGroupResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cgrsGroupId' - The ID of the group.+--+-- * 'cgrsResponseStatus' - -- | The response status code.+createGroupResponse+ :: Int -- ^ 'cgrsResponseStatus'+ -> CreateGroupResponse+createGroupResponse pResponseStatus_ =+ CreateGroupResponse'+ {_cgrsGroupId = Nothing, _cgrsResponseStatus = pResponseStatus_}+++-- | The ID of the group.+cgrsGroupId :: Lens' CreateGroupResponse (Maybe Text)+cgrsGroupId = lens _cgrsGroupId (\ s a -> s{_cgrsGroupId = a})++-- | -- | The response status code.+cgrsResponseStatus :: Lens' CreateGroupResponse Int+cgrsResponseStatus = lens _cgrsResponseStatus (\ s a -> s{_cgrsResponseStatus = a})++instance NFData CreateGroupResponse where
+ gen/Network/AWS/WorkMail/CreateResource.hs view
@@ -0,0 +1,153 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.CreateResource+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a new Amazon WorkMail resource. The available types are equipment and room.+--+--+module Network.AWS.WorkMail.CreateResource+ (+ -- * Creating a Request+ createResource+ , CreateResource+ -- * Request Lenses+ , crOrganizationId+ , crName+ , crType++ -- * Destructuring the Response+ , createResourceResponse+ , CreateResourceResponse+ -- * Response Lenses+ , crrsResourceId+ , crrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'createResource' smart constructor.+data CreateResource = CreateResource'+ { _crOrganizationId :: !Text+ , _crName :: !Text+ , _crType :: !ResourceType+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateResource' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'crOrganizationId' - The identifier associated with the organization for which the resource is created.+--+-- * 'crName' - The name of the created resource.+--+-- * 'crType' - The type of the created resource.+createResource+ :: Text -- ^ 'crOrganizationId'+ -> Text -- ^ 'crName'+ -> ResourceType -- ^ 'crType'+ -> CreateResource+createResource pOrganizationId_ pName_ pType_ =+ CreateResource'+ {_crOrganizationId = pOrganizationId_, _crName = pName_, _crType = pType_}+++-- | The identifier associated with the organization for which the resource is created.+crOrganizationId :: Lens' CreateResource Text+crOrganizationId = lens _crOrganizationId (\ s a -> s{_crOrganizationId = a})++-- | The name of the created resource.+crName :: Lens' CreateResource Text+crName = lens _crName (\ s a -> s{_crName = a})++-- | The type of the created resource.+crType :: Lens' CreateResource ResourceType+crType = lens _crType (\ s a -> s{_crType = a})++instance AWSRequest CreateResource where+ type Rs CreateResource = CreateResourceResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ CreateResourceResponse' <$>+ (x .?> "ResourceId") <*> (pure (fromEnum s)))++instance Hashable CreateResource where++instance NFData CreateResource where++instance ToHeaders CreateResource where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.CreateResource" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateResource where+ toJSON CreateResource'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _crOrganizationId),+ Just ("Name" .= _crName), Just ("Type" .= _crType)])++instance ToPath CreateResource where+ toPath = const "/"++instance ToQuery CreateResource where+ toQuery = const mempty++-- | /See:/ 'createResourceResponse' smart constructor.+data CreateResourceResponse = CreateResourceResponse'+ { _crrsResourceId :: !(Maybe Text)+ , _crrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateResourceResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'crrsResourceId' - The identifier of the created resource.+--+-- * 'crrsResponseStatus' - -- | The response status code.+createResourceResponse+ :: Int -- ^ 'crrsResponseStatus'+ -> CreateResourceResponse+createResourceResponse pResponseStatus_ =+ CreateResourceResponse'+ {_crrsResourceId = Nothing, _crrsResponseStatus = pResponseStatus_}+++-- | The identifier of the created resource.+crrsResourceId :: Lens' CreateResourceResponse (Maybe Text)+crrsResourceId = lens _crrsResourceId (\ s a -> s{_crrsResourceId = a})++-- | -- | The response status code.+crrsResponseStatus :: Lens' CreateResourceResponse Int+crrsResponseStatus = lens _crrsResponseStatus (\ s a -> s{_crrsResponseStatus = a})++instance NFData CreateResourceResponse where
+ gen/Network/AWS/WorkMail/CreateUser.hs view
@@ -0,0 +1,168 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.CreateUser+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a user who can be used in Amazon WorkMail by calling the RegisterToWorkMail operation.+--+--+module Network.AWS.WorkMail.CreateUser+ (+ -- * Creating a Request+ createUser+ , CreateUser+ -- * Request Lenses+ , cuOrganizationId+ , cuName+ , cuDisplayName+ , cuPassword++ -- * Destructuring the Response+ , createUserResponse+ , CreateUserResponse+ -- * Response Lenses+ , cursUserId+ , cursResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'createUser' smart constructor.+data CreateUser = CreateUser'+ { _cuOrganizationId :: !Text+ , _cuName :: !Text+ , _cuDisplayName :: !Text+ , _cuPassword :: !(Sensitive Text)+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateUser' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cuOrganizationId' - The identifier of the organization for which the user is created.+--+-- * 'cuName' - The name for the user to be created.+--+-- * 'cuDisplayName' - The display name for the user to be created.+--+-- * 'cuPassword' - The password for the user to be created.+createUser+ :: Text -- ^ 'cuOrganizationId'+ -> Text -- ^ 'cuName'+ -> Text -- ^ 'cuDisplayName'+ -> Text -- ^ 'cuPassword'+ -> CreateUser+createUser pOrganizationId_ pName_ pDisplayName_ pPassword_ =+ CreateUser'+ { _cuOrganizationId = pOrganizationId_+ , _cuName = pName_+ , _cuDisplayName = pDisplayName_+ , _cuPassword = _Sensitive # pPassword_+ }+++-- | The identifier of the organization for which the user is created.+cuOrganizationId :: Lens' CreateUser Text+cuOrganizationId = lens _cuOrganizationId (\ s a -> s{_cuOrganizationId = a})++-- | The name for the user to be created.+cuName :: Lens' CreateUser Text+cuName = lens _cuName (\ s a -> s{_cuName = a})++-- | The display name for the user to be created.+cuDisplayName :: Lens' CreateUser Text+cuDisplayName = lens _cuDisplayName (\ s a -> s{_cuDisplayName = a})++-- | The password for the user to be created.+cuPassword :: Lens' CreateUser Text+cuPassword = lens _cuPassword (\ s a -> s{_cuPassword = a}) . _Sensitive++instance AWSRequest CreateUser where+ type Rs CreateUser = CreateUserResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ CreateUserResponse' <$>+ (x .?> "UserId") <*> (pure (fromEnum s)))++instance Hashable CreateUser where++instance NFData CreateUser where++instance ToHeaders CreateUser where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.CreateUser" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateUser where+ toJSON CreateUser'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _cuOrganizationId),+ Just ("Name" .= _cuName),+ Just ("DisplayName" .= _cuDisplayName),+ Just ("Password" .= _cuPassword)])++instance ToPath CreateUser where+ toPath = const "/"++instance ToQuery CreateUser where+ toQuery = const mempty++-- | /See:/ 'createUserResponse' smart constructor.+data CreateUserResponse = CreateUserResponse'+ { _cursUserId :: !(Maybe Text)+ , _cursResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateUserResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cursUserId' - The information regarding the newly created user.+--+-- * 'cursResponseStatus' - -- | The response status code.+createUserResponse+ :: Int -- ^ 'cursResponseStatus'+ -> CreateUserResponse+createUserResponse pResponseStatus_ =+ CreateUserResponse'+ {_cursUserId = Nothing, _cursResponseStatus = pResponseStatus_}+++-- | The information regarding the newly created user.+cursUserId :: Lens' CreateUserResponse (Maybe Text)+cursUserId = lens _cursUserId (\ s a -> s{_cursUserId = a})++-- | -- | The response status code.+cursResponseStatus :: Lens' CreateUserResponse Int+cursResponseStatus = lens _cursResponseStatus (\ s a -> s{_cursResponseStatus = a})++instance NFData CreateUserResponse where
+ gen/Network/AWS/WorkMail/DeleteAlias.hs view
@@ -0,0 +1,147 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.DeleteAlias+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Remove the alias from a set of aliases for a given user.+--+--+module Network.AWS.WorkMail.DeleteAlias+ (+ -- * Creating a Request+ deleteAlias+ , DeleteAlias+ -- * Request Lenses+ , daOrganizationId+ , daEntityId+ , daAlias++ -- * Destructuring the Response+ , deleteAliasResponse+ , DeleteAliasResponse+ -- * Response Lenses+ , darsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'deleteAlias' smart constructor.+data DeleteAlias = DeleteAlias'+ { _daOrganizationId :: !Text+ , _daEntityId :: !Text+ , _daAlias :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteAlias' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'daOrganizationId' - The identifier for the organization under which the user exists.+--+-- * 'daEntityId' - The identifier for the Amazon WorkMail entity to have the aliases removed.+--+-- * 'daAlias' - The aliases to be removed from the user's set of aliases. Duplicate entries in the list are collapsed into single entries (the list is transformed into a set).+deleteAlias+ :: Text -- ^ 'daOrganizationId'+ -> Text -- ^ 'daEntityId'+ -> Text -- ^ 'daAlias'+ -> DeleteAlias+deleteAlias pOrganizationId_ pEntityId_ pAlias_ =+ DeleteAlias'+ { _daOrganizationId = pOrganizationId_+ , _daEntityId = pEntityId_+ , _daAlias = pAlias_+ }+++-- | The identifier for the organization under which the user exists.+daOrganizationId :: Lens' DeleteAlias Text+daOrganizationId = lens _daOrganizationId (\ s a -> s{_daOrganizationId = a})++-- | The identifier for the Amazon WorkMail entity to have the aliases removed.+daEntityId :: Lens' DeleteAlias Text+daEntityId = lens _daEntityId (\ s a -> s{_daEntityId = a})++-- | The aliases to be removed from the user's set of aliases. Duplicate entries in the list are collapsed into single entries (the list is transformed into a set).+daAlias :: Lens' DeleteAlias Text+daAlias = lens _daAlias (\ s a -> s{_daAlias = a})++instance AWSRequest DeleteAlias where+ type Rs DeleteAlias = DeleteAliasResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ DeleteAliasResponse' <$> (pure (fromEnum s)))++instance Hashable DeleteAlias where++instance NFData DeleteAlias where++instance ToHeaders DeleteAlias where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.DeleteAlias" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteAlias where+ toJSON DeleteAlias'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _daOrganizationId),+ Just ("EntityId" .= _daEntityId),+ Just ("Alias" .= _daAlias)])++instance ToPath DeleteAlias where+ toPath = const "/"++instance ToQuery DeleteAlias where+ toQuery = const mempty++-- | /See:/ 'deleteAliasResponse' smart constructor.+newtype DeleteAliasResponse = DeleteAliasResponse'+ { _darsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteAliasResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'darsResponseStatus' - -- | The response status code.+deleteAliasResponse+ :: Int -- ^ 'darsResponseStatus'+ -> DeleteAliasResponse+deleteAliasResponse pResponseStatus_ =+ DeleteAliasResponse' {_darsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+darsResponseStatus :: Lens' DeleteAliasResponse Int+darsResponseStatus = lens _darsResponseStatus (\ s a -> s{_darsResponseStatus = a})++instance NFData DeleteAliasResponse where
+ gen/Network/AWS/WorkMail/DeleteGroup.hs view
@@ -0,0 +1,133 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.DeleteGroup+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a group from Amazon WorkMail.+--+--+module Network.AWS.WorkMail.DeleteGroup+ (+ -- * Creating a Request+ deleteGroup+ , DeleteGroup+ -- * Request Lenses+ , dggOrganizationId+ , dggGroupId++ -- * Destructuring the Response+ , deleteGroupResponse+ , DeleteGroupResponse+ -- * Response Lenses+ , dgrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'deleteGroup' smart constructor.+data DeleteGroup = DeleteGroup'+ { _dggOrganizationId :: !Text+ , _dggGroupId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteGroup' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dggOrganizationId' - The organization that contains the group.+--+-- * 'dggGroupId' - The identifier of the group to be deleted.+deleteGroup+ :: Text -- ^ 'dggOrganizationId'+ -> Text -- ^ 'dggGroupId'+ -> DeleteGroup+deleteGroup pOrganizationId_ pGroupId_ =+ DeleteGroup' {_dggOrganizationId = pOrganizationId_, _dggGroupId = pGroupId_}+++-- | The organization that contains the group.+dggOrganizationId :: Lens' DeleteGroup Text+dggOrganizationId = lens _dggOrganizationId (\ s a -> s{_dggOrganizationId = a})++-- | The identifier of the group to be deleted.+dggGroupId :: Lens' DeleteGroup Text+dggGroupId = lens _dggGroupId (\ s a -> s{_dggGroupId = a})++instance AWSRequest DeleteGroup where+ type Rs DeleteGroup = DeleteGroupResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ DeleteGroupResponse' <$> (pure (fromEnum s)))++instance Hashable DeleteGroup where++instance NFData DeleteGroup where++instance ToHeaders DeleteGroup where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.DeleteGroup" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteGroup where+ toJSON DeleteGroup'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _dggOrganizationId),+ Just ("GroupId" .= _dggGroupId)])++instance ToPath DeleteGroup where+ toPath = const "/"++instance ToQuery DeleteGroup where+ toQuery = const mempty++-- | /See:/ 'deleteGroupResponse' smart constructor.+newtype DeleteGroupResponse = DeleteGroupResponse'+ { _dgrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteGroupResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dgrsResponseStatus' - -- | The response status code.+deleteGroupResponse+ :: Int -- ^ 'dgrsResponseStatus'+ -> DeleteGroupResponse+deleteGroupResponse pResponseStatus_ =+ DeleteGroupResponse' {_dgrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dgrsResponseStatus :: Lens' DeleteGroupResponse Int+dgrsResponseStatus = lens _dgrsResponseStatus (\ s a -> s{_dgrsResponseStatus = a})++instance NFData DeleteGroupResponse where
+ gen/Network/AWS/WorkMail/DeleteMailboxPermissions.hs view
@@ -0,0 +1,151 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.DeleteMailboxPermissions+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes permissions granted to a user or group.+--+--+module Network.AWS.WorkMail.DeleteMailboxPermissions+ (+ -- * Creating a Request+ deleteMailboxPermissions+ , DeleteMailboxPermissions+ -- * Request Lenses+ , dmpOrganizationId+ , dmpEntityId+ , dmpGranteeId++ -- * Destructuring the Response+ , deleteMailboxPermissionsResponse+ , DeleteMailboxPermissionsResponse+ -- * Response Lenses+ , dmprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'deleteMailboxPermissions' smart constructor.+data DeleteMailboxPermissions = DeleteMailboxPermissions'+ { _dmpOrganizationId :: !Text+ , _dmpEntityId :: !Text+ , _dmpGranteeId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteMailboxPermissions' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dmpOrganizationId' - The identifier of the organization under which the entity (user or group) exists.+--+-- * 'dmpEntityId' - The identifier of the entity (user or group) for which to delete mailbox permissions.+--+-- * 'dmpGranteeId' - The identifier of the entity (user or group) for which to delete granted permissions.+deleteMailboxPermissions+ :: Text -- ^ 'dmpOrganizationId'+ -> Text -- ^ 'dmpEntityId'+ -> Text -- ^ 'dmpGranteeId'+ -> DeleteMailboxPermissions+deleteMailboxPermissions pOrganizationId_ pEntityId_ pGranteeId_ =+ DeleteMailboxPermissions'+ { _dmpOrganizationId = pOrganizationId_+ , _dmpEntityId = pEntityId_+ , _dmpGranteeId = pGranteeId_+ }+++-- | The identifier of the organization under which the entity (user or group) exists.+dmpOrganizationId :: Lens' DeleteMailboxPermissions Text+dmpOrganizationId = lens _dmpOrganizationId (\ s a -> s{_dmpOrganizationId = a})++-- | The identifier of the entity (user or group) for which to delete mailbox permissions.+dmpEntityId :: Lens' DeleteMailboxPermissions Text+dmpEntityId = lens _dmpEntityId (\ s a -> s{_dmpEntityId = a})++-- | The identifier of the entity (user or group) for which to delete granted permissions.+dmpGranteeId :: Lens' DeleteMailboxPermissions Text+dmpGranteeId = lens _dmpGranteeId (\ s a -> s{_dmpGranteeId = a})++instance AWSRequest DeleteMailboxPermissions where+ type Rs DeleteMailboxPermissions =+ DeleteMailboxPermissionsResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ DeleteMailboxPermissionsResponse' <$>+ (pure (fromEnum s)))++instance Hashable DeleteMailboxPermissions where++instance NFData DeleteMailboxPermissions where++instance ToHeaders DeleteMailboxPermissions where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.DeleteMailboxPermissions" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteMailboxPermissions where+ toJSON DeleteMailboxPermissions'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _dmpOrganizationId),+ Just ("EntityId" .= _dmpEntityId),+ Just ("GranteeId" .= _dmpGranteeId)])++instance ToPath DeleteMailboxPermissions where+ toPath = const "/"++instance ToQuery DeleteMailboxPermissions where+ toQuery = const mempty++-- | /See:/ 'deleteMailboxPermissionsResponse' smart constructor.+newtype DeleteMailboxPermissionsResponse = DeleteMailboxPermissionsResponse'+ { _dmprsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteMailboxPermissionsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dmprsResponseStatus' - -- | The response status code.+deleteMailboxPermissionsResponse+ :: Int -- ^ 'dmprsResponseStatus'+ -> DeleteMailboxPermissionsResponse+deleteMailboxPermissionsResponse pResponseStatus_ =+ DeleteMailboxPermissionsResponse' {_dmprsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dmprsResponseStatus :: Lens' DeleteMailboxPermissionsResponse Int+dmprsResponseStatus = lens _dmprsResponseStatus (\ s a -> s{_dmprsResponseStatus = a})++instance NFData DeleteMailboxPermissionsResponse+ where
+ gen/Network/AWS/WorkMail/DeleteResource.hs view
@@ -0,0 +1,134 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.DeleteResource+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified resource.+--+--+module Network.AWS.WorkMail.DeleteResource+ (+ -- * Creating a Request+ deleteResource+ , DeleteResource+ -- * Request Lenses+ , dOrganizationId+ , dResourceId++ -- * Destructuring the Response+ , deleteResourceResponse+ , DeleteResourceResponse+ -- * Response Lenses+ , drsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'deleteResource' smart constructor.+data DeleteResource = DeleteResource'+ { _dOrganizationId :: !Text+ , _dResourceId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteResource' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dOrganizationId' - The identifier associated with the organization for which the resource is deleted.+--+-- * 'dResourceId' - The identifier of the resource to be deleted.+deleteResource+ :: Text -- ^ 'dOrganizationId'+ -> Text -- ^ 'dResourceId'+ -> DeleteResource+deleteResource pOrganizationId_ pResourceId_ =+ DeleteResource'+ {_dOrganizationId = pOrganizationId_, _dResourceId = pResourceId_}+++-- | The identifier associated with the organization for which the resource is deleted.+dOrganizationId :: Lens' DeleteResource Text+dOrganizationId = lens _dOrganizationId (\ s a -> s{_dOrganizationId = a})++-- | The identifier of the resource to be deleted.+dResourceId :: Lens' DeleteResource Text+dResourceId = lens _dResourceId (\ s a -> s{_dResourceId = a})++instance AWSRequest DeleteResource where+ type Rs DeleteResource = DeleteResourceResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ DeleteResourceResponse' <$> (pure (fromEnum s)))++instance Hashable DeleteResource where++instance NFData DeleteResource where++instance ToHeaders DeleteResource where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.DeleteResource" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteResource where+ toJSON DeleteResource'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _dOrganizationId),+ Just ("ResourceId" .= _dResourceId)])++instance ToPath DeleteResource where+ toPath = const "/"++instance ToQuery DeleteResource where+ toQuery = const mempty++-- | /See:/ 'deleteResourceResponse' smart constructor.+newtype DeleteResourceResponse = DeleteResourceResponse'+ { _drsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteResourceResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drsResponseStatus' - -- | The response status code.+deleteResourceResponse+ :: Int -- ^ 'drsResponseStatus'+ -> DeleteResourceResponse+deleteResourceResponse pResponseStatus_ =+ DeleteResourceResponse' {_drsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+drsResponseStatus :: Lens' DeleteResourceResponse Int+drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a})++instance NFData DeleteResourceResponse where
+ gen/Network/AWS/WorkMail/DeleteUser.hs view
@@ -0,0 +1,133 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.DeleteUser+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a user from Amazon WorkMail and all subsequent systems. The action can't be undone. The mailbox is kept as-is for a minimum of 30 days, without any means to restore it.+--+--+module Network.AWS.WorkMail.DeleteUser+ (+ -- * Creating a Request+ deleteUser+ , DeleteUser+ -- * Request Lenses+ , delOrganizationId+ , delUserId++ -- * Destructuring the Response+ , deleteUserResponse+ , DeleteUserResponse+ -- * Response Lenses+ , delrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'deleteUser' smart constructor.+data DeleteUser = DeleteUser'+ { _delOrganizationId :: !Text+ , _delUserId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteUser' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'delOrganizationId' - The organization that contains the user.+--+-- * 'delUserId' - The identifier of the user to be deleted.+deleteUser+ :: Text -- ^ 'delOrganizationId'+ -> Text -- ^ 'delUserId'+ -> DeleteUser+deleteUser pOrganizationId_ pUserId_ =+ DeleteUser' {_delOrganizationId = pOrganizationId_, _delUserId = pUserId_}+++-- | The organization that contains the user.+delOrganizationId :: Lens' DeleteUser Text+delOrganizationId = lens _delOrganizationId (\ s a -> s{_delOrganizationId = a})++-- | The identifier of the user to be deleted.+delUserId :: Lens' DeleteUser Text+delUserId = lens _delUserId (\ s a -> s{_delUserId = a})++instance AWSRequest DeleteUser where+ type Rs DeleteUser = DeleteUserResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ DeleteUserResponse' <$> (pure (fromEnum s)))++instance Hashable DeleteUser where++instance NFData DeleteUser where++instance ToHeaders DeleteUser where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.DeleteUser" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteUser where+ toJSON DeleteUser'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _delOrganizationId),+ Just ("UserId" .= _delUserId)])++instance ToPath DeleteUser where+ toPath = const "/"++instance ToQuery DeleteUser where+ toQuery = const mempty++-- | /See:/ 'deleteUserResponse' smart constructor.+newtype DeleteUserResponse = DeleteUserResponse'+ { _delrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteUserResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'delrsResponseStatus' - -- | The response status code.+deleteUserResponse+ :: Int -- ^ 'delrsResponseStatus'+ -> DeleteUserResponse+deleteUserResponse pResponseStatus_ =+ DeleteUserResponse' {_delrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+delrsResponseStatus :: Lens' DeleteUserResponse Int+delrsResponseStatus = lens _delrsResponseStatus (\ s a -> s{_delrsResponseStatus = a})++instance NFData DeleteUserResponse where
+ gen/Network/AWS/WorkMail/DeregisterFromWorkMail.hs view
@@ -0,0 +1,137 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.DeregisterFromWorkMail+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Mark a user, group, or resource as no longer used in Amazon WorkMail. This action disassociates the mailbox and schedules it for clean-up. Amazon WorkMail keeps mailboxes for 30 days before they are permanently removed. The functionality in the console is /Disable/ .+--+--+module Network.AWS.WorkMail.DeregisterFromWorkMail+ (+ -- * Creating a Request+ deregisterFromWorkMail+ , DeregisterFromWorkMail+ -- * Request Lenses+ , dfwmOrganizationId+ , dfwmEntityId++ -- * Destructuring the Response+ , deregisterFromWorkMailResponse+ , DeregisterFromWorkMailResponse+ -- * Response Lenses+ , dfwmrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'deregisterFromWorkMail' smart constructor.+data DeregisterFromWorkMail = DeregisterFromWorkMail'+ { _dfwmOrganizationId :: !Text+ , _dfwmEntityId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeregisterFromWorkMail' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dfwmOrganizationId' - The identifier for the organization under which the Amazon WorkMail entity exists.+--+-- * 'dfwmEntityId' - The identifier for the entity to be updated.+deregisterFromWorkMail+ :: Text -- ^ 'dfwmOrganizationId'+ -> Text -- ^ 'dfwmEntityId'+ -> DeregisterFromWorkMail+deregisterFromWorkMail pOrganizationId_ pEntityId_ =+ DeregisterFromWorkMail'+ {_dfwmOrganizationId = pOrganizationId_, _dfwmEntityId = pEntityId_}+++-- | The identifier for the organization under which the Amazon WorkMail entity exists.+dfwmOrganizationId :: Lens' DeregisterFromWorkMail Text+dfwmOrganizationId = lens _dfwmOrganizationId (\ s a -> s{_dfwmOrganizationId = a})++-- | The identifier for the entity to be updated.+dfwmEntityId :: Lens' DeregisterFromWorkMail Text+dfwmEntityId = lens _dfwmEntityId (\ s a -> s{_dfwmEntityId = a})++instance AWSRequest DeregisterFromWorkMail where+ type Rs DeregisterFromWorkMail =+ DeregisterFromWorkMailResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ DeregisterFromWorkMailResponse' <$>+ (pure (fromEnum s)))++instance Hashable DeregisterFromWorkMail where++instance NFData DeregisterFromWorkMail where++instance ToHeaders DeregisterFromWorkMail where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.DeregisterFromWorkMail" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeregisterFromWorkMail where+ toJSON DeregisterFromWorkMail'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _dfwmOrganizationId),+ Just ("EntityId" .= _dfwmEntityId)])++instance ToPath DeregisterFromWorkMail where+ toPath = const "/"++instance ToQuery DeregisterFromWorkMail where+ toQuery = const mempty++-- | /See:/ 'deregisterFromWorkMailResponse' smart constructor.+newtype DeregisterFromWorkMailResponse = DeregisterFromWorkMailResponse'+ { _dfwmrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeregisterFromWorkMailResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dfwmrsResponseStatus' - -- | The response status code.+deregisterFromWorkMailResponse+ :: Int -- ^ 'dfwmrsResponseStatus'+ -> DeregisterFromWorkMailResponse+deregisterFromWorkMailResponse pResponseStatus_ =+ DeregisterFromWorkMailResponse' {_dfwmrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dfwmrsResponseStatus :: Lens' DeregisterFromWorkMailResponse Int+dfwmrsResponseStatus = lens _dfwmrsResponseStatus (\ s a -> s{_dfwmrsResponseStatus = a})++instance NFData DeregisterFromWorkMailResponse where
+ gen/Network/AWS/WorkMail/DescribeGroup.hs view
@@ -0,0 +1,195 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.DescribeGroup+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the data available for the group.+--+--+module Network.AWS.WorkMail.DescribeGroup+ (+ -- * Creating a Request+ describeGroup+ , DescribeGroup+ -- * Request Lenses+ , dgOrganizationId+ , dgGroupId++ -- * Destructuring the Response+ , describeGroupResponse+ , DescribeGroupResponse+ -- * Response Lenses+ , desrsEmail+ , desrsState+ , desrsDisabledDate+ , desrsName+ , desrsGroupId+ , desrsEnabledDate+ , desrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'describeGroup' smart constructor.+data DescribeGroup = DescribeGroup'+ { _dgOrganizationId :: !Text+ , _dgGroupId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeGroup' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dgOrganizationId' - The identifier for the organization under which the group exists.+--+-- * 'dgGroupId' - The identifier for the group to be described.+describeGroup+ :: Text -- ^ 'dgOrganizationId'+ -> Text -- ^ 'dgGroupId'+ -> DescribeGroup+describeGroup pOrganizationId_ pGroupId_ =+ DescribeGroup' {_dgOrganizationId = pOrganizationId_, _dgGroupId = pGroupId_}+++-- | The identifier for the organization under which the group exists.+dgOrganizationId :: Lens' DescribeGroup Text+dgOrganizationId = lens _dgOrganizationId (\ s a -> s{_dgOrganizationId = a})++-- | The identifier for the group to be described.+dgGroupId :: Lens' DescribeGroup Text+dgGroupId = lens _dgGroupId (\ s a -> s{_dgGroupId = a})++instance AWSRequest DescribeGroup where+ type Rs DescribeGroup = DescribeGroupResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ DescribeGroupResponse' <$>+ (x .?> "Email") <*> (x .?> "State") <*>+ (x .?> "DisabledDate")+ <*> (x .?> "Name")+ <*> (x .?> "GroupId")+ <*> (x .?> "EnabledDate")+ <*> (pure (fromEnum s)))++instance Hashable DescribeGroup where++instance NFData DescribeGroup where++instance ToHeaders DescribeGroup where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.DescribeGroup" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeGroup where+ toJSON DescribeGroup'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _dgOrganizationId),+ Just ("GroupId" .= _dgGroupId)])++instance ToPath DescribeGroup where+ toPath = const "/"++instance ToQuery DescribeGroup where+ toQuery = const mempty++-- | /See:/ 'describeGroupResponse' smart constructor.+data DescribeGroupResponse = DescribeGroupResponse'+ { _desrsEmail :: !(Maybe Text)+ , _desrsState :: !(Maybe EntityState)+ , _desrsDisabledDate :: !(Maybe POSIX)+ , _desrsName :: !(Maybe Text)+ , _desrsGroupId :: !(Maybe Text)+ , _desrsEnabledDate :: !(Maybe POSIX)+ , _desrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeGroupResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'desrsEmail' - The email of the described group.+--+-- * 'desrsState' - The state of the user: enabled (registered to Amazon WorkMail) or disabled (deregistered or never registered to Amazon WorkMail).+--+-- * 'desrsDisabledDate' - The date and time when a user was deregistered from Amazon WorkMail, in UNIX epoch time format.+--+-- * 'desrsName' - The name of the described group.+--+-- * 'desrsGroupId' - The identifier of the described group.+--+-- * 'desrsEnabledDate' - The date and time when a user was registered to Amazon WorkMail, in UNIX epoch time format.+--+-- * 'desrsResponseStatus' - -- | The response status code.+describeGroupResponse+ :: Int -- ^ 'desrsResponseStatus'+ -> DescribeGroupResponse+describeGroupResponse pResponseStatus_ =+ DescribeGroupResponse'+ { _desrsEmail = Nothing+ , _desrsState = Nothing+ , _desrsDisabledDate = Nothing+ , _desrsName = Nothing+ , _desrsGroupId = Nothing+ , _desrsEnabledDate = Nothing+ , _desrsResponseStatus = pResponseStatus_+ }+++-- | The email of the described group.+desrsEmail :: Lens' DescribeGroupResponse (Maybe Text)+desrsEmail = lens _desrsEmail (\ s a -> s{_desrsEmail = a})++-- | The state of the user: enabled (registered to Amazon WorkMail) or disabled (deregistered or never registered to Amazon WorkMail).+desrsState :: Lens' DescribeGroupResponse (Maybe EntityState)+desrsState = lens _desrsState (\ s a -> s{_desrsState = a})++-- | The date and time when a user was deregistered from Amazon WorkMail, in UNIX epoch time format.+desrsDisabledDate :: Lens' DescribeGroupResponse (Maybe UTCTime)+desrsDisabledDate = lens _desrsDisabledDate (\ s a -> s{_desrsDisabledDate = a}) . mapping _Time++-- | The name of the described group.+desrsName :: Lens' DescribeGroupResponse (Maybe Text)+desrsName = lens _desrsName (\ s a -> s{_desrsName = a})++-- | The identifier of the described group.+desrsGroupId :: Lens' DescribeGroupResponse (Maybe Text)+desrsGroupId = lens _desrsGroupId (\ s a -> s{_desrsGroupId = a})++-- | The date and time when a user was registered to Amazon WorkMail, in UNIX epoch time format.+desrsEnabledDate :: Lens' DescribeGroupResponse (Maybe UTCTime)+desrsEnabledDate = lens _desrsEnabledDate (\ s a -> s{_desrsEnabledDate = a}) . mapping _Time++-- | -- | The response status code.+desrsResponseStatus :: Lens' DescribeGroupResponse Int+desrsResponseStatus = lens _desrsResponseStatus (\ s a -> s{_desrsResponseStatus = a})++instance NFData DescribeGroupResponse where
+ gen/Network/AWS/WorkMail/DescribeOrganization.hs view
@@ -0,0 +1,207 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.DescribeOrganization+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Provides more information regarding a given organization based on its identifier.+--+--+module Network.AWS.WorkMail.DescribeOrganization+ (+ -- * Creating a Request+ describeOrganization+ , DescribeOrganization+ -- * Request Lenses+ , doOrganizationId++ -- * Destructuring the Response+ , describeOrganizationResponse+ , DescribeOrganizationResponse+ -- * Response Lenses+ , dorsDirectoryId+ , dorsState+ , dorsAlias+ , dorsCompletedDate+ , dorsDirectoryType+ , dorsDefaultMailDomain+ , dorsErrorMessage+ , dorsOrganizationId+ , dorsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'describeOrganization' smart constructor.+newtype DescribeOrganization = DescribeOrganization'+ { _doOrganizationId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeOrganization' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'doOrganizationId' - The identifier for the organization to be described.+describeOrganization+ :: Text -- ^ 'doOrganizationId'+ -> DescribeOrganization+describeOrganization pOrganizationId_ =+ DescribeOrganization' {_doOrganizationId = pOrganizationId_}+++-- | The identifier for the organization to be described.+doOrganizationId :: Lens' DescribeOrganization Text+doOrganizationId = lens _doOrganizationId (\ s a -> s{_doOrganizationId = a})++instance AWSRequest DescribeOrganization where+ type Rs DescribeOrganization =+ DescribeOrganizationResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ DescribeOrganizationResponse' <$>+ (x .?> "DirectoryId") <*> (x .?> "State") <*>+ (x .?> "Alias")+ <*> (x .?> "CompletedDate")+ <*> (x .?> "DirectoryType")+ <*> (x .?> "DefaultMailDomain")+ <*> (x .?> "ErrorMessage")+ <*> (x .?> "OrganizationId")+ <*> (pure (fromEnum s)))++instance Hashable DescribeOrganization where++instance NFData DescribeOrganization where++instance ToHeaders DescribeOrganization where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.DescribeOrganization" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeOrganization where+ toJSON DescribeOrganization'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _doOrganizationId)])++instance ToPath DescribeOrganization where+ toPath = const "/"++instance ToQuery DescribeOrganization where+ toQuery = const mempty++-- | /See:/ 'describeOrganizationResponse' smart constructor.+data DescribeOrganizationResponse = DescribeOrganizationResponse'+ { _dorsDirectoryId :: !(Maybe Text)+ , _dorsState :: !(Maybe Text)+ , _dorsAlias :: !(Maybe Text)+ , _dorsCompletedDate :: !(Maybe POSIX)+ , _dorsDirectoryType :: !(Maybe Text)+ , _dorsDefaultMailDomain :: !(Maybe Text)+ , _dorsErrorMessage :: !(Maybe Text)+ , _dorsOrganizationId :: !(Maybe Text)+ , _dorsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeOrganizationResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dorsDirectoryId' - The identifier for the directory associated with an Amazon WorkMail organization.+--+-- * 'dorsState' - The state of an organization.+--+-- * 'dorsAlias' - The alias for an organization.+--+-- * 'dorsCompletedDate' - The date at which the organization became usable in the Amazon WorkMail context, in UNIX epoch time format.+--+-- * 'dorsDirectoryType' - The type of directory associated with the Amazon WorkMail organization.+--+-- * 'dorsDefaultMailDomain' - The default mail domain associated with the organization.+--+-- * 'dorsErrorMessage' - The (optional) error message indicating if unexpected behavior was encountered with regards to the organization.+--+-- * 'dorsOrganizationId' - The identifier of an organization.+--+-- * 'dorsResponseStatus' - -- | The response status code.+describeOrganizationResponse+ :: Int -- ^ 'dorsResponseStatus'+ -> DescribeOrganizationResponse+describeOrganizationResponse pResponseStatus_ =+ DescribeOrganizationResponse'+ { _dorsDirectoryId = Nothing+ , _dorsState = Nothing+ , _dorsAlias = Nothing+ , _dorsCompletedDate = Nothing+ , _dorsDirectoryType = Nothing+ , _dorsDefaultMailDomain = Nothing+ , _dorsErrorMessage = Nothing+ , _dorsOrganizationId = Nothing+ , _dorsResponseStatus = pResponseStatus_+ }+++-- | The identifier for the directory associated with an Amazon WorkMail organization.+dorsDirectoryId :: Lens' DescribeOrganizationResponse (Maybe Text)+dorsDirectoryId = lens _dorsDirectoryId (\ s a -> s{_dorsDirectoryId = a})++-- | The state of an organization.+dorsState :: Lens' DescribeOrganizationResponse (Maybe Text)+dorsState = lens _dorsState (\ s a -> s{_dorsState = a})++-- | The alias for an organization.+dorsAlias :: Lens' DescribeOrganizationResponse (Maybe Text)+dorsAlias = lens _dorsAlias (\ s a -> s{_dorsAlias = a})++-- | The date at which the organization became usable in the Amazon WorkMail context, in UNIX epoch time format.+dorsCompletedDate :: Lens' DescribeOrganizationResponse (Maybe UTCTime)+dorsCompletedDate = lens _dorsCompletedDate (\ s a -> s{_dorsCompletedDate = a}) . mapping _Time++-- | The type of directory associated with the Amazon WorkMail organization.+dorsDirectoryType :: Lens' DescribeOrganizationResponse (Maybe Text)+dorsDirectoryType = lens _dorsDirectoryType (\ s a -> s{_dorsDirectoryType = a})++-- | The default mail domain associated with the organization.+dorsDefaultMailDomain :: Lens' DescribeOrganizationResponse (Maybe Text)+dorsDefaultMailDomain = lens _dorsDefaultMailDomain (\ s a -> s{_dorsDefaultMailDomain = a})++-- | The (optional) error message indicating if unexpected behavior was encountered with regards to the organization.+dorsErrorMessage :: Lens' DescribeOrganizationResponse (Maybe Text)+dorsErrorMessage = lens _dorsErrorMessage (\ s a -> s{_dorsErrorMessage = a})++-- | The identifier of an organization.+dorsOrganizationId :: Lens' DescribeOrganizationResponse (Maybe Text)+dorsOrganizationId = lens _dorsOrganizationId (\ s a -> s{_dorsOrganizationId = a})++-- | -- | The response status code.+dorsResponseStatus :: Lens' DescribeOrganizationResponse Int+dorsResponseStatus = lens _dorsResponseStatus (\ s a -> s{_dorsResponseStatus = a})++instance NFData DescribeOrganizationResponse where
+ gen/Network/AWS/WorkMail/DescribeResource.hs view
@@ -0,0 +1,216 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.DescribeResource+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the data available for the resource.+--+--+module Network.AWS.WorkMail.DescribeResource+ (+ -- * Creating a Request+ describeResource+ , DescribeResource+ -- * Request Lenses+ , drOrganizationId+ , drResourceId++ -- * Destructuring the Response+ , describeResourceResponse+ , DescribeResourceResponse+ -- * Response Lenses+ , drrsEmail+ , drrsState+ , drrsResourceId+ , drrsDisabledDate+ , drrsName+ , drrsType+ , drrsEnabledDate+ , drrsBookingOptions+ , drrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'describeResource' smart constructor.+data DescribeResource = DescribeResource'+ { _drOrganizationId :: !Text+ , _drResourceId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeResource' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drOrganizationId' - The identifier associated with the organization for which the resource is described.+--+-- * 'drResourceId' - The identifier of the resource to be described.+describeResource+ :: Text -- ^ 'drOrganizationId'+ -> Text -- ^ 'drResourceId'+ -> DescribeResource+describeResource pOrganizationId_ pResourceId_ =+ DescribeResource'+ {_drOrganizationId = pOrganizationId_, _drResourceId = pResourceId_}+++-- | The identifier associated with the organization for which the resource is described.+drOrganizationId :: Lens' DescribeResource Text+drOrganizationId = lens _drOrganizationId (\ s a -> s{_drOrganizationId = a})++-- | The identifier of the resource to be described.+drResourceId :: Lens' DescribeResource Text+drResourceId = lens _drResourceId (\ s a -> s{_drResourceId = a})++instance AWSRequest DescribeResource where+ type Rs DescribeResource = DescribeResourceResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ DescribeResourceResponse' <$>+ (x .?> "Email") <*> (x .?> "State") <*>+ (x .?> "ResourceId")+ <*> (x .?> "DisabledDate")+ <*> (x .?> "Name")+ <*> (x .?> "Type")+ <*> (x .?> "EnabledDate")+ <*> (x .?> "BookingOptions")+ <*> (pure (fromEnum s)))++instance Hashable DescribeResource where++instance NFData DescribeResource where++instance ToHeaders DescribeResource where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.DescribeResource" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeResource where+ toJSON DescribeResource'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _drOrganizationId),+ Just ("ResourceId" .= _drResourceId)])++instance ToPath DescribeResource where+ toPath = const "/"++instance ToQuery DescribeResource where+ toQuery = const mempty++-- | /See:/ 'describeResourceResponse' smart constructor.+data DescribeResourceResponse = DescribeResourceResponse'+ { _drrsEmail :: !(Maybe Text)+ , _drrsState :: !(Maybe EntityState)+ , _drrsResourceId :: !(Maybe Text)+ , _drrsDisabledDate :: !(Maybe POSIX)+ , _drrsName :: !(Maybe Text)+ , _drrsType :: !(Maybe ResourceType)+ , _drrsEnabledDate :: !(Maybe POSIX)+ , _drrsBookingOptions :: !(Maybe BookingOptions)+ , _drrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeResourceResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drrsEmail' - The email of the described resource.+--+-- * 'drrsState' - The state of the resource: enabled (registered to Amazon WorkMail) or disabled (deregistered or never registered to Amazon WorkMail).+--+-- * 'drrsResourceId' - The identifier of the described resource.+--+-- * 'drrsDisabledDate' - The date and time when a resource was registered from Amazon WorkMail, in UNIX epoch time format.+--+-- * 'drrsName' - The name of the described resource.+--+-- * 'drrsType' - The type of the described resource.+--+-- * 'drrsEnabledDate' - The date and time when a resource was registered to Amazon WorkMail, in UNIX epoch time format.+--+-- * 'drrsBookingOptions' - The booking options for the described resource.+--+-- * 'drrsResponseStatus' - -- | The response status code.+describeResourceResponse+ :: Int -- ^ 'drrsResponseStatus'+ -> DescribeResourceResponse+describeResourceResponse pResponseStatus_ =+ DescribeResourceResponse'+ { _drrsEmail = Nothing+ , _drrsState = Nothing+ , _drrsResourceId = Nothing+ , _drrsDisabledDate = Nothing+ , _drrsName = Nothing+ , _drrsType = Nothing+ , _drrsEnabledDate = Nothing+ , _drrsBookingOptions = Nothing+ , _drrsResponseStatus = pResponseStatus_+ }+++-- | The email of the described resource.+drrsEmail :: Lens' DescribeResourceResponse (Maybe Text)+drrsEmail = lens _drrsEmail (\ s a -> s{_drrsEmail = a})++-- | The state of the resource: enabled (registered to Amazon WorkMail) or disabled (deregistered or never registered to Amazon WorkMail).+drrsState :: Lens' DescribeResourceResponse (Maybe EntityState)+drrsState = lens _drrsState (\ s a -> s{_drrsState = a})++-- | The identifier of the described resource.+drrsResourceId :: Lens' DescribeResourceResponse (Maybe Text)+drrsResourceId = lens _drrsResourceId (\ s a -> s{_drrsResourceId = a})++-- | The date and time when a resource was registered from Amazon WorkMail, in UNIX epoch time format.+drrsDisabledDate :: Lens' DescribeResourceResponse (Maybe UTCTime)+drrsDisabledDate = lens _drrsDisabledDate (\ s a -> s{_drrsDisabledDate = a}) . mapping _Time++-- | The name of the described resource.+drrsName :: Lens' DescribeResourceResponse (Maybe Text)+drrsName = lens _drrsName (\ s a -> s{_drrsName = a})++-- | The type of the described resource.+drrsType :: Lens' DescribeResourceResponse (Maybe ResourceType)+drrsType = lens _drrsType (\ s a -> s{_drrsType = a})++-- | The date and time when a resource was registered to Amazon WorkMail, in UNIX epoch time format.+drrsEnabledDate :: Lens' DescribeResourceResponse (Maybe UTCTime)+drrsEnabledDate = lens _drrsEnabledDate (\ s a -> s{_drrsEnabledDate = a}) . mapping _Time++-- | The booking options for the described resource.+drrsBookingOptions :: Lens' DescribeResourceResponse (Maybe BookingOptions)+drrsBookingOptions = lens _drrsBookingOptions (\ s a -> s{_drrsBookingOptions = a})++-- | -- | The response status code.+drrsResponseStatus :: Lens' DescribeResourceResponse Int+drrsResponseStatus = lens _drrsResponseStatus (\ s a -> s{_drrsResponseStatus = a})++instance NFData DescribeResourceResponse where
+ gen/Network/AWS/WorkMail/DescribeUser.hs view
@@ -0,0 +1,215 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.DescribeUser+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Provides information regarding the user.+--+--+module Network.AWS.WorkMail.DescribeUser+ (+ -- * Creating a Request+ describeUser+ , DescribeUser+ -- * Request Lenses+ , duOrganizationId+ , duUserId++ -- * Destructuring the Response+ , describeUserResponse+ , DescribeUserResponse+ -- * Response Lenses+ , dursEmail+ , dursState+ , dursUserId+ , dursDisabledDate+ , dursName+ , dursDisplayName+ , dursUserRole+ , dursEnabledDate+ , dursResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'describeUser' smart constructor.+data DescribeUser = DescribeUser'+ { _duOrganizationId :: !Text+ , _duUserId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeUser' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'duOrganizationId' - The identifier for the organization under which the user exists.+--+-- * 'duUserId' - The identifier for the user to be described.+describeUser+ :: Text -- ^ 'duOrganizationId'+ -> Text -- ^ 'duUserId'+ -> DescribeUser+describeUser pOrganizationId_ pUserId_ =+ DescribeUser' {_duOrganizationId = pOrganizationId_, _duUserId = pUserId_}+++-- | The identifier for the organization under which the user exists.+duOrganizationId :: Lens' DescribeUser Text+duOrganizationId = lens _duOrganizationId (\ s a -> s{_duOrganizationId = a})++-- | The identifier for the user to be described.+duUserId :: Lens' DescribeUser Text+duUserId = lens _duUserId (\ s a -> s{_duUserId = a})++instance AWSRequest DescribeUser where+ type Rs DescribeUser = DescribeUserResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ DescribeUserResponse' <$>+ (x .?> "Email") <*> (x .?> "State") <*>+ (x .?> "UserId")+ <*> (x .?> "DisabledDate")+ <*> (x .?> "Name")+ <*> (x .?> "DisplayName")+ <*> (x .?> "UserRole")+ <*> (x .?> "EnabledDate")+ <*> (pure (fromEnum s)))++instance Hashable DescribeUser where++instance NFData DescribeUser where++instance ToHeaders DescribeUser where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.DescribeUser" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeUser where+ toJSON DescribeUser'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _duOrganizationId),+ Just ("UserId" .= _duUserId)])++instance ToPath DescribeUser where+ toPath = const "/"++instance ToQuery DescribeUser where+ toQuery = const mempty++-- | /See:/ 'describeUserResponse' smart constructor.+data DescribeUserResponse = DescribeUserResponse'+ { _dursEmail :: !(Maybe Text)+ , _dursState :: !(Maybe EntityState)+ , _dursUserId :: !(Maybe Text)+ , _dursDisabledDate :: !(Maybe POSIX)+ , _dursName :: !(Maybe Text)+ , _dursDisplayName :: !(Maybe Text)+ , _dursUserRole :: !(Maybe UserRole)+ , _dursEnabledDate :: !(Maybe POSIX)+ , _dursResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeUserResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dursEmail' - The email of the user.+--+-- * 'dursState' - The state of a user: enabled (registered to Amazon WorkMail) or disabled (deregistered or never registered to Amazon WorkMail).+--+-- * 'dursUserId' - The identifier for the described user.+--+-- * 'dursDisabledDate' - The date and time at which the user was disabled for Amazon WorkMail usage, in UNIX epoch time format.+--+-- * 'dursName' - The name for the user.+--+-- * 'dursDisplayName' - The display name of the user.+--+-- * 'dursUserRole' - In certain cases other entities are modeled as users. If interoperability is enabled, resources are imported into Amazon WorkMail as users. Because different Amazon WorkMail organizations rely on different directory types, administrators can distinguish between a user that is not registered to Amazon WorkMail (is disabled and has a user role) and the administrative users of the directory. The values are USER, RESOURCE, and SYSTEM_USER.+--+-- * 'dursEnabledDate' - The date and time at which the user was enabled for Amazon WorkMail usage, in UNIX epoch time format.+--+-- * 'dursResponseStatus' - -- | The response status code.+describeUserResponse+ :: Int -- ^ 'dursResponseStatus'+ -> DescribeUserResponse+describeUserResponse pResponseStatus_ =+ DescribeUserResponse'+ { _dursEmail = Nothing+ , _dursState = Nothing+ , _dursUserId = Nothing+ , _dursDisabledDate = Nothing+ , _dursName = Nothing+ , _dursDisplayName = Nothing+ , _dursUserRole = Nothing+ , _dursEnabledDate = Nothing+ , _dursResponseStatus = pResponseStatus_+ }+++-- | The email of the user.+dursEmail :: Lens' DescribeUserResponse (Maybe Text)+dursEmail = lens _dursEmail (\ s a -> s{_dursEmail = a})++-- | The state of a user: enabled (registered to Amazon WorkMail) or disabled (deregistered or never registered to Amazon WorkMail).+dursState :: Lens' DescribeUserResponse (Maybe EntityState)+dursState = lens _dursState (\ s a -> s{_dursState = a})++-- | The identifier for the described user.+dursUserId :: Lens' DescribeUserResponse (Maybe Text)+dursUserId = lens _dursUserId (\ s a -> s{_dursUserId = a})++-- | The date and time at which the user was disabled for Amazon WorkMail usage, in UNIX epoch time format.+dursDisabledDate :: Lens' DescribeUserResponse (Maybe UTCTime)+dursDisabledDate = lens _dursDisabledDate (\ s a -> s{_dursDisabledDate = a}) . mapping _Time++-- | The name for the user.+dursName :: Lens' DescribeUserResponse (Maybe Text)+dursName = lens _dursName (\ s a -> s{_dursName = a})++-- | The display name of the user.+dursDisplayName :: Lens' DescribeUserResponse (Maybe Text)+dursDisplayName = lens _dursDisplayName (\ s a -> s{_dursDisplayName = a})++-- | In certain cases other entities are modeled as users. If interoperability is enabled, resources are imported into Amazon WorkMail as users. Because different Amazon WorkMail organizations rely on different directory types, administrators can distinguish between a user that is not registered to Amazon WorkMail (is disabled and has a user role) and the administrative users of the directory. The values are USER, RESOURCE, and SYSTEM_USER.+dursUserRole :: Lens' DescribeUserResponse (Maybe UserRole)+dursUserRole = lens _dursUserRole (\ s a -> s{_dursUserRole = a})++-- | The date and time at which the user was enabled for Amazon WorkMail usage, in UNIX epoch time format.+dursEnabledDate :: Lens' DescribeUserResponse (Maybe UTCTime)+dursEnabledDate = lens _dursEnabledDate (\ s a -> s{_dursEnabledDate = a}) . mapping _Time++-- | -- | The response status code.+dursResponseStatus :: Lens' DescribeUserResponse Int+dursResponseStatus = lens _dursResponseStatus (\ s a -> s{_dursResponseStatus = a})++instance NFData DescribeUserResponse where
+ gen/Network/AWS/WorkMail/DisassociateDelegateFromResource.hs view
@@ -0,0 +1,160 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.DisassociateDelegateFromResource+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes a member from the resource's set of delegates.+--+--+module Network.AWS.WorkMail.DisassociateDelegateFromResource+ (+ -- * Creating a Request+ disassociateDelegateFromResource+ , DisassociateDelegateFromResource+ -- * Request Lenses+ , ddfrOrganizationId+ , ddfrResourceId+ , ddfrEntityId++ -- * Destructuring the Response+ , disassociateDelegateFromResourceResponse+ , DisassociateDelegateFromResourceResponse+ -- * Response Lenses+ , ddfrrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'disassociateDelegateFromResource' smart constructor.+data DisassociateDelegateFromResource = DisassociateDelegateFromResource'+ { _ddfrOrganizationId :: !Text+ , _ddfrResourceId :: !Text+ , _ddfrEntityId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DisassociateDelegateFromResource' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ddfrOrganizationId' - The identifier for the organization under which the resource exists.+--+-- * 'ddfrResourceId' - The identifier of the resource from which delegates' set members are removed.+--+-- * 'ddfrEntityId' - The identifier for the member (user, group) to be removed from the resource's delegates.+disassociateDelegateFromResource+ :: Text -- ^ 'ddfrOrganizationId'+ -> Text -- ^ 'ddfrResourceId'+ -> Text -- ^ 'ddfrEntityId'+ -> DisassociateDelegateFromResource+disassociateDelegateFromResource pOrganizationId_ pResourceId_ pEntityId_ =+ DisassociateDelegateFromResource'+ { _ddfrOrganizationId = pOrganizationId_+ , _ddfrResourceId = pResourceId_+ , _ddfrEntityId = pEntityId_+ }+++-- | The identifier for the organization under which the resource exists.+ddfrOrganizationId :: Lens' DisassociateDelegateFromResource Text+ddfrOrganizationId = lens _ddfrOrganizationId (\ s a -> s{_ddfrOrganizationId = a})++-- | The identifier of the resource from which delegates' set members are removed.+ddfrResourceId :: Lens' DisassociateDelegateFromResource Text+ddfrResourceId = lens _ddfrResourceId (\ s a -> s{_ddfrResourceId = a})++-- | The identifier for the member (user, group) to be removed from the resource's delegates.+ddfrEntityId :: Lens' DisassociateDelegateFromResource Text+ddfrEntityId = lens _ddfrEntityId (\ s a -> s{_ddfrEntityId = a})++instance AWSRequest DisassociateDelegateFromResource+ where+ type Rs DisassociateDelegateFromResource =+ DisassociateDelegateFromResourceResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ DisassociateDelegateFromResourceResponse' <$>+ (pure (fromEnum s)))++instance Hashable DisassociateDelegateFromResource+ where++instance NFData DisassociateDelegateFromResource+ where++instance ToHeaders DisassociateDelegateFromResource+ where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.DisassociateDelegateFromResource"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DisassociateDelegateFromResource+ where+ toJSON DisassociateDelegateFromResource'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _ddfrOrganizationId),+ Just ("ResourceId" .= _ddfrResourceId),+ Just ("EntityId" .= _ddfrEntityId)])++instance ToPath DisassociateDelegateFromResource+ where+ toPath = const "/"++instance ToQuery DisassociateDelegateFromResource+ where+ toQuery = const mempty++-- | /See:/ 'disassociateDelegateFromResourceResponse' smart constructor.+newtype DisassociateDelegateFromResourceResponse = DisassociateDelegateFromResourceResponse'+ { _ddfrrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DisassociateDelegateFromResourceResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ddfrrsResponseStatus' - -- | The response status code.+disassociateDelegateFromResourceResponse+ :: Int -- ^ 'ddfrrsResponseStatus'+ -> DisassociateDelegateFromResourceResponse+disassociateDelegateFromResourceResponse pResponseStatus_ =+ DisassociateDelegateFromResourceResponse'+ {_ddfrrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+ddfrrsResponseStatus :: Lens' DisassociateDelegateFromResourceResponse Int+ddfrrsResponseStatus = lens _ddfrrsResponseStatus (\ s a -> s{_ddfrrsResponseStatus = a})++instance NFData+ DisassociateDelegateFromResourceResponse+ where
+ gen/Network/AWS/WorkMail/DisassociateMemberFromGroup.hs view
@@ -0,0 +1,152 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.DisassociateMemberFromGroup+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes a member from a group.+--+--+module Network.AWS.WorkMail.DisassociateMemberFromGroup+ (+ -- * Creating a Request+ disassociateMemberFromGroup+ , DisassociateMemberFromGroup+ -- * Request Lenses+ , dmfgOrganizationId+ , dmfgGroupId+ , dmfgMemberId++ -- * Destructuring the Response+ , disassociateMemberFromGroupResponse+ , DisassociateMemberFromGroupResponse+ -- * Response Lenses+ , dmfgrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'disassociateMemberFromGroup' smart constructor.+data DisassociateMemberFromGroup = DisassociateMemberFromGroup'+ { _dmfgOrganizationId :: !Text+ , _dmfgGroupId :: !Text+ , _dmfgMemberId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DisassociateMemberFromGroup' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dmfgOrganizationId' - The identifier for the organization under which the group exists.+--+-- * 'dmfgGroupId' - The identifier for the group from which members are removed.+--+-- * 'dmfgMemberId' - The identifier for the member to be removed to the group.+disassociateMemberFromGroup+ :: Text -- ^ 'dmfgOrganizationId'+ -> Text -- ^ 'dmfgGroupId'+ -> Text -- ^ 'dmfgMemberId'+ -> DisassociateMemberFromGroup+disassociateMemberFromGroup pOrganizationId_ pGroupId_ pMemberId_ =+ DisassociateMemberFromGroup'+ { _dmfgOrganizationId = pOrganizationId_+ , _dmfgGroupId = pGroupId_+ , _dmfgMemberId = pMemberId_+ }+++-- | The identifier for the organization under which the group exists.+dmfgOrganizationId :: Lens' DisassociateMemberFromGroup Text+dmfgOrganizationId = lens _dmfgOrganizationId (\ s a -> s{_dmfgOrganizationId = a})++-- | The identifier for the group from which members are removed.+dmfgGroupId :: Lens' DisassociateMemberFromGroup Text+dmfgGroupId = lens _dmfgGroupId (\ s a -> s{_dmfgGroupId = a})++-- | The identifier for the member to be removed to the group.+dmfgMemberId :: Lens' DisassociateMemberFromGroup Text+dmfgMemberId = lens _dmfgMemberId (\ s a -> s{_dmfgMemberId = a})++instance AWSRequest DisassociateMemberFromGroup where+ type Rs DisassociateMemberFromGroup =+ DisassociateMemberFromGroupResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ DisassociateMemberFromGroupResponse' <$>+ (pure (fromEnum s)))++instance Hashable DisassociateMemberFromGroup where++instance NFData DisassociateMemberFromGroup where++instance ToHeaders DisassociateMemberFromGroup where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.DisassociateMemberFromGroup" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DisassociateMemberFromGroup where+ toJSON DisassociateMemberFromGroup'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _dmfgOrganizationId),+ Just ("GroupId" .= _dmfgGroupId),+ Just ("MemberId" .= _dmfgMemberId)])++instance ToPath DisassociateMemberFromGroup where+ toPath = const "/"++instance ToQuery DisassociateMemberFromGroup where+ toQuery = const mempty++-- | /See:/ 'disassociateMemberFromGroupResponse' smart constructor.+newtype DisassociateMemberFromGroupResponse = DisassociateMemberFromGroupResponse'+ { _dmfgrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DisassociateMemberFromGroupResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dmfgrsResponseStatus' - -- | The response status code.+disassociateMemberFromGroupResponse+ :: Int -- ^ 'dmfgrsResponseStatus'+ -> DisassociateMemberFromGroupResponse+disassociateMemberFromGroupResponse pResponseStatus_ =+ DisassociateMemberFromGroupResponse'+ {_dmfgrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dmfgrsResponseStatus :: Lens' DisassociateMemberFromGroupResponse Int+dmfgrsResponseStatus = lens _dmfgrsResponseStatus (\ s a -> s{_dmfgrsResponseStatus = a})++instance NFData DisassociateMemberFromGroupResponse+ where
+ gen/Network/AWS/WorkMail/ListAliases.hs view
@@ -0,0 +1,188 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.ListAliases+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a paginated call to list the aliases associated with a given entity.+--+--+--+-- This operation returns paginated results.+module Network.AWS.WorkMail.ListAliases+ (+ -- * Creating a Request+ listAliases+ , ListAliases+ -- * Request Lenses+ , laNextToken+ , laMaxResults+ , laOrganizationId+ , laEntityId++ -- * Destructuring the Response+ , listAliasesResponse+ , ListAliasesResponse+ -- * Response Lenses+ , larsAliases+ , larsNextToken+ , larsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'listAliases' smart constructor.+data ListAliases = ListAliases'+ { _laNextToken :: !(Maybe Text)+ , _laMaxResults :: !(Maybe Nat)+ , _laOrganizationId :: !Text+ , _laEntityId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListAliases' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'laNextToken' - The token to use to retrieve the next page of results. The first call does not contain any tokens.+--+-- * 'laMaxResults' - The maximum number of results to return in a single call.+--+-- * 'laOrganizationId' - The identifier for the organization under which the entity exists.+--+-- * 'laEntityId' - The identifier for the entity for which to list the aliases.+listAliases+ :: Text -- ^ 'laOrganizationId'+ -> Text -- ^ 'laEntityId'+ -> ListAliases+listAliases pOrganizationId_ pEntityId_ =+ ListAliases'+ { _laNextToken = Nothing+ , _laMaxResults = Nothing+ , _laOrganizationId = pOrganizationId_+ , _laEntityId = pEntityId_+ }+++-- | The token to use to retrieve the next page of results. The first call does not contain any tokens.+laNextToken :: Lens' ListAliases (Maybe Text)+laNextToken = lens _laNextToken (\ s a -> s{_laNextToken = a})++-- | The maximum number of results to return in a single call.+laMaxResults :: Lens' ListAliases (Maybe Natural)+laMaxResults = lens _laMaxResults (\ s a -> s{_laMaxResults = a}) . mapping _Nat++-- | The identifier for the organization under which the entity exists.+laOrganizationId :: Lens' ListAliases Text+laOrganizationId = lens _laOrganizationId (\ s a -> s{_laOrganizationId = a})++-- | The identifier for the entity for which to list the aliases.+laEntityId :: Lens' ListAliases Text+laEntityId = lens _laEntityId (\ s a -> s{_laEntityId = a})++instance AWSPager ListAliases where+ page rq rs+ | stop (rs ^. larsNextToken) = Nothing+ | stop (rs ^. larsAliases) = Nothing+ | otherwise =+ Just $ rq & laNextToken .~ rs ^. larsNextToken++instance AWSRequest ListAliases where+ type Rs ListAliases = ListAliasesResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ ListAliasesResponse' <$>+ (x .?> "Aliases" .!@ mempty) <*> (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListAliases where++instance NFData ListAliases where++instance ToHeaders ListAliases where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.ListAliases" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListAliases where+ toJSON ListAliases'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _laNextToken,+ ("MaxResults" .=) <$> _laMaxResults,+ Just ("OrganizationId" .= _laOrganizationId),+ Just ("EntityId" .= _laEntityId)])++instance ToPath ListAliases where+ toPath = const "/"++instance ToQuery ListAliases where+ toQuery = const mempty++-- | /See:/ 'listAliasesResponse' smart constructor.+data ListAliasesResponse = ListAliasesResponse'+ { _larsAliases :: !(Maybe [Text])+ , _larsNextToken :: !(Maybe Text)+ , _larsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListAliasesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'larsAliases' - The entity's paginated aliases.+--+-- * 'larsNextToken' - The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.+--+-- * 'larsResponseStatus' - -- | The response status code.+listAliasesResponse+ :: Int -- ^ 'larsResponseStatus'+ -> ListAliasesResponse+listAliasesResponse pResponseStatus_ =+ ListAliasesResponse'+ { _larsAliases = Nothing+ , _larsNextToken = Nothing+ , _larsResponseStatus = pResponseStatus_+ }+++-- | The entity's paginated aliases.+larsAliases :: Lens' ListAliasesResponse [Text]+larsAliases = lens _larsAliases (\ s a -> s{_larsAliases = a}) . _Default . _Coerce++-- | The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.+larsNextToken :: Lens' ListAliasesResponse (Maybe Text)+larsNextToken = lens _larsNextToken (\ s a -> s{_larsNextToken = a})++-- | -- | The response status code.+larsResponseStatus :: Lens' ListAliasesResponse Int+larsResponseStatus = lens _larsResponseStatus (\ s a -> s{_larsResponseStatus = a})++instance NFData ListAliasesResponse where
+ gen/Network/AWS/WorkMail/ListGroupMembers.hs view
@@ -0,0 +1,188 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.ListGroupMembers+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns an overview of the members of a group.+--+--+--+-- This operation returns paginated results.+module Network.AWS.WorkMail.ListGroupMembers+ (+ -- * Creating a Request+ listGroupMembers+ , ListGroupMembers+ -- * Request Lenses+ , lgmNextToken+ , lgmMaxResults+ , lgmOrganizationId+ , lgmGroupId++ -- * Destructuring the Response+ , listGroupMembersResponse+ , ListGroupMembersResponse+ -- * Response Lenses+ , lgmrsMembers+ , lgmrsNextToken+ , lgmrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'listGroupMembers' smart constructor.+data ListGroupMembers = ListGroupMembers'+ { _lgmNextToken :: !(Maybe Text)+ , _lgmMaxResults :: !(Maybe Nat)+ , _lgmOrganizationId :: !Text+ , _lgmGroupId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListGroupMembers' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lgmNextToken' - The token to use to retrieve the next page of results. The first call does not contain any tokens.+--+-- * 'lgmMaxResults' - The maximum number of results to return in a single call.+--+-- * 'lgmOrganizationId' - The identifier for the organization under which the group exists.+--+-- * 'lgmGroupId' - The identifier for the group to which the members are associated.+listGroupMembers+ :: Text -- ^ 'lgmOrganizationId'+ -> Text -- ^ 'lgmGroupId'+ -> ListGroupMembers+listGroupMembers pOrganizationId_ pGroupId_ =+ ListGroupMembers'+ { _lgmNextToken = Nothing+ , _lgmMaxResults = Nothing+ , _lgmOrganizationId = pOrganizationId_+ , _lgmGroupId = pGroupId_+ }+++-- | The token to use to retrieve the next page of results. The first call does not contain any tokens.+lgmNextToken :: Lens' ListGroupMembers (Maybe Text)+lgmNextToken = lens _lgmNextToken (\ s a -> s{_lgmNextToken = a})++-- | The maximum number of results to return in a single call.+lgmMaxResults :: Lens' ListGroupMembers (Maybe Natural)+lgmMaxResults = lens _lgmMaxResults (\ s a -> s{_lgmMaxResults = a}) . mapping _Nat++-- | The identifier for the organization under which the group exists.+lgmOrganizationId :: Lens' ListGroupMembers Text+lgmOrganizationId = lens _lgmOrganizationId (\ s a -> s{_lgmOrganizationId = a})++-- | The identifier for the group to which the members are associated.+lgmGroupId :: Lens' ListGroupMembers Text+lgmGroupId = lens _lgmGroupId (\ s a -> s{_lgmGroupId = a})++instance AWSPager ListGroupMembers where+ page rq rs+ | stop (rs ^. lgmrsNextToken) = Nothing+ | stop (rs ^. lgmrsMembers) = Nothing+ | otherwise =+ Just $ rq & lgmNextToken .~ rs ^. lgmrsNextToken++instance AWSRequest ListGroupMembers where+ type Rs ListGroupMembers = ListGroupMembersResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ ListGroupMembersResponse' <$>+ (x .?> "Members" .!@ mempty) <*> (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListGroupMembers where++instance NFData ListGroupMembers where++instance ToHeaders ListGroupMembers where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.ListGroupMembers" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListGroupMembers where+ toJSON ListGroupMembers'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lgmNextToken,+ ("MaxResults" .=) <$> _lgmMaxResults,+ Just ("OrganizationId" .= _lgmOrganizationId),+ Just ("GroupId" .= _lgmGroupId)])++instance ToPath ListGroupMembers where+ toPath = const "/"++instance ToQuery ListGroupMembers where+ toQuery = const mempty++-- | /See:/ 'listGroupMembersResponse' smart constructor.+data ListGroupMembersResponse = ListGroupMembersResponse'+ { _lgmrsMembers :: !(Maybe [Member])+ , _lgmrsNextToken :: !(Maybe Text)+ , _lgmrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListGroupMembersResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lgmrsMembers' - The members associated to the group.+--+-- * 'lgmrsNextToken' - The token to use to retrieve the next page of results. The first call does not contain any tokens.+--+-- * 'lgmrsResponseStatus' - -- | The response status code.+listGroupMembersResponse+ :: Int -- ^ 'lgmrsResponseStatus'+ -> ListGroupMembersResponse+listGroupMembersResponse pResponseStatus_ =+ ListGroupMembersResponse'+ { _lgmrsMembers = Nothing+ , _lgmrsNextToken = Nothing+ , _lgmrsResponseStatus = pResponseStatus_+ }+++-- | The members associated to the group.+lgmrsMembers :: Lens' ListGroupMembersResponse [Member]+lgmrsMembers = lens _lgmrsMembers (\ s a -> s{_lgmrsMembers = a}) . _Default . _Coerce++-- | The token to use to retrieve the next page of results. The first call does not contain any tokens.+lgmrsNextToken :: Lens' ListGroupMembersResponse (Maybe Text)+lgmrsNextToken = lens _lgmrsNextToken (\ s a -> s{_lgmrsNextToken = a})++-- | -- | The response status code.+lgmrsResponseStatus :: Lens' ListGroupMembersResponse Int+lgmrsResponseStatus = lens _lgmrsResponseStatus (\ s a -> s{_lgmrsResponseStatus = a})++instance NFData ListGroupMembersResponse where
+ gen/Network/AWS/WorkMail/ListGroups.hs view
@@ -0,0 +1,177 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.ListGroups+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns summaries of the organization's groups.+--+--+--+-- This operation returns paginated results.+module Network.AWS.WorkMail.ListGroups+ (+ -- * Creating a Request+ listGroups+ , ListGroups+ -- * Request Lenses+ , lgNextToken+ , lgMaxResults+ , lgOrganizationId++ -- * Destructuring the Response+ , listGroupsResponse+ , ListGroupsResponse+ -- * Response Lenses+ , lgrsGroups+ , lgrsNextToken+ , lgrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'listGroups' smart constructor.+data ListGroups = ListGroups'+ { _lgNextToken :: !(Maybe Text)+ , _lgMaxResults :: !(Maybe Nat)+ , _lgOrganizationId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListGroups' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lgNextToken' - The token to use to retrieve the next page of results. The first call does not contain any tokens.+--+-- * 'lgMaxResults' - The maximum number of results to return in a single call.+--+-- * 'lgOrganizationId' - The identifier for the organization under which the groups exist.+listGroups+ :: Text -- ^ 'lgOrganizationId'+ -> ListGroups+listGroups pOrganizationId_ =+ ListGroups'+ { _lgNextToken = Nothing+ , _lgMaxResults = Nothing+ , _lgOrganizationId = pOrganizationId_+ }+++-- | The token to use to retrieve the next page of results. The first call does not contain any tokens.+lgNextToken :: Lens' ListGroups (Maybe Text)+lgNextToken = lens _lgNextToken (\ s a -> s{_lgNextToken = a})++-- | The maximum number of results to return in a single call.+lgMaxResults :: Lens' ListGroups (Maybe Natural)+lgMaxResults = lens _lgMaxResults (\ s a -> s{_lgMaxResults = a}) . mapping _Nat++-- | The identifier for the organization under which the groups exist.+lgOrganizationId :: Lens' ListGroups Text+lgOrganizationId = lens _lgOrganizationId (\ s a -> s{_lgOrganizationId = a})++instance AWSPager ListGroups where+ page rq rs+ | stop (rs ^. lgrsNextToken) = Nothing+ | stop (rs ^. lgrsGroups) = Nothing+ | otherwise =+ Just $ rq & lgNextToken .~ rs ^. lgrsNextToken++instance AWSRequest ListGroups where+ type Rs ListGroups = ListGroupsResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ ListGroupsResponse' <$>+ (x .?> "Groups" .!@ mempty) <*> (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListGroups where++instance NFData ListGroups where++instance ToHeaders ListGroups where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.ListGroups" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListGroups where+ toJSON ListGroups'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lgNextToken,+ ("MaxResults" .=) <$> _lgMaxResults,+ Just ("OrganizationId" .= _lgOrganizationId)])++instance ToPath ListGroups where+ toPath = const "/"++instance ToQuery ListGroups where+ toQuery = const mempty++-- | /See:/ 'listGroupsResponse' smart constructor.+data ListGroupsResponse = ListGroupsResponse'+ { _lgrsGroups :: !(Maybe [Group])+ , _lgrsNextToken :: !(Maybe Text)+ , _lgrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListGroupsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lgrsGroups' - The overview of groups for an organization.+--+-- * 'lgrsNextToken' - The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.+--+-- * 'lgrsResponseStatus' - -- | The response status code.+listGroupsResponse+ :: Int -- ^ 'lgrsResponseStatus'+ -> ListGroupsResponse+listGroupsResponse pResponseStatus_ =+ ListGroupsResponse'+ { _lgrsGroups = Nothing+ , _lgrsNextToken = Nothing+ , _lgrsResponseStatus = pResponseStatus_+ }+++-- | The overview of groups for an organization.+lgrsGroups :: Lens' ListGroupsResponse [Group]+lgrsGroups = lens _lgrsGroups (\ s a -> s{_lgrsGroups = a}) . _Default . _Coerce++-- | The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.+lgrsNextToken :: Lens' ListGroupsResponse (Maybe Text)+lgrsNextToken = lens _lgrsNextToken (\ s a -> s{_lgrsNextToken = a})++-- | -- | The response status code.+lgrsResponseStatus :: Lens' ListGroupsResponse Int+lgrsResponseStatus = lens _lgrsResponseStatus (\ s a -> s{_lgrsResponseStatus = a})++instance NFData ListGroupsResponse where
+ gen/Network/AWS/WorkMail/ListMailboxPermissions.hs view
@@ -0,0 +1,181 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.ListMailboxPermissions+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the mailbox permissions associated with a mailbox.+--+--+module Network.AWS.WorkMail.ListMailboxPermissions+ (+ -- * Creating a Request+ listMailboxPermissions+ , ListMailboxPermissions+ -- * Request Lenses+ , lmpNextToken+ , lmpMaxResults+ , lmpOrganizationId+ , lmpEntityId++ -- * Destructuring the Response+ , listMailboxPermissionsResponse+ , ListMailboxPermissionsResponse+ -- * Response Lenses+ , lmprsNextToken+ , lmprsPermissions+ , lmprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'listMailboxPermissions' smart constructor.+data ListMailboxPermissions = ListMailboxPermissions'+ { _lmpNextToken :: !(Maybe Text)+ , _lmpMaxResults :: !(Maybe Nat)+ , _lmpOrganizationId :: !Text+ , _lmpEntityId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListMailboxPermissions' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lmpNextToken' - The token to use to retrieve the next page of results. The first call does not contain any tokens.+--+-- * 'lmpMaxResults' - The maximum number of results to return in a single call.+--+-- * 'lmpOrganizationId' - The identifier of the organization under which the entity (user or group) exists.+--+-- * 'lmpEntityId' - The identifier of the entity (user or group) for which to list mailbox permissions.+listMailboxPermissions+ :: Text -- ^ 'lmpOrganizationId'+ -> Text -- ^ 'lmpEntityId'+ -> ListMailboxPermissions+listMailboxPermissions pOrganizationId_ pEntityId_ =+ ListMailboxPermissions'+ { _lmpNextToken = Nothing+ , _lmpMaxResults = Nothing+ , _lmpOrganizationId = pOrganizationId_+ , _lmpEntityId = pEntityId_+ }+++-- | The token to use to retrieve the next page of results. The first call does not contain any tokens.+lmpNextToken :: Lens' ListMailboxPermissions (Maybe Text)+lmpNextToken = lens _lmpNextToken (\ s a -> s{_lmpNextToken = a})++-- | The maximum number of results to return in a single call.+lmpMaxResults :: Lens' ListMailboxPermissions (Maybe Natural)+lmpMaxResults = lens _lmpMaxResults (\ s a -> s{_lmpMaxResults = a}) . mapping _Nat++-- | The identifier of the organization under which the entity (user or group) exists.+lmpOrganizationId :: Lens' ListMailboxPermissions Text+lmpOrganizationId = lens _lmpOrganizationId (\ s a -> s{_lmpOrganizationId = a})++-- | The identifier of the entity (user or group) for which to list mailbox permissions.+lmpEntityId :: Lens' ListMailboxPermissions Text+lmpEntityId = lens _lmpEntityId (\ s a -> s{_lmpEntityId = a})++instance AWSRequest ListMailboxPermissions where+ type Rs ListMailboxPermissions =+ ListMailboxPermissionsResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ ListMailboxPermissionsResponse' <$>+ (x .?> "NextToken") <*>+ (x .?> "Permissions" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable ListMailboxPermissions where++instance NFData ListMailboxPermissions where++instance ToHeaders ListMailboxPermissions where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.ListMailboxPermissions" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListMailboxPermissions where+ toJSON ListMailboxPermissions'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lmpNextToken,+ ("MaxResults" .=) <$> _lmpMaxResults,+ Just ("OrganizationId" .= _lmpOrganizationId),+ Just ("EntityId" .= _lmpEntityId)])++instance ToPath ListMailboxPermissions where+ toPath = const "/"++instance ToQuery ListMailboxPermissions where+ toQuery = const mempty++-- | /See:/ 'listMailboxPermissionsResponse' smart constructor.+data ListMailboxPermissionsResponse = ListMailboxPermissionsResponse'+ { _lmprsNextToken :: !(Maybe Text)+ , _lmprsPermissions :: !(Maybe [Permission])+ , _lmprsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListMailboxPermissionsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lmprsNextToken' - The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.+--+-- * 'lmprsPermissions' - One page of the entity's mailbox permissions.+--+-- * 'lmprsResponseStatus' - -- | The response status code.+listMailboxPermissionsResponse+ :: Int -- ^ 'lmprsResponseStatus'+ -> ListMailboxPermissionsResponse+listMailboxPermissionsResponse pResponseStatus_ =+ ListMailboxPermissionsResponse'+ { _lmprsNextToken = Nothing+ , _lmprsPermissions = Nothing+ , _lmprsResponseStatus = pResponseStatus_+ }+++-- | The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.+lmprsNextToken :: Lens' ListMailboxPermissionsResponse (Maybe Text)+lmprsNextToken = lens _lmprsNextToken (\ s a -> s{_lmprsNextToken = a})++-- | One page of the entity's mailbox permissions.+lmprsPermissions :: Lens' ListMailboxPermissionsResponse [Permission]+lmprsPermissions = lens _lmprsPermissions (\ s a -> s{_lmprsPermissions = a}) . _Default . _Coerce++-- | -- | The response status code.+lmprsResponseStatus :: Lens' ListMailboxPermissionsResponse Int+lmprsResponseStatus = lens _lmprsResponseStatus (\ s a -> s{_lmprsResponseStatus = a})++instance NFData ListMailboxPermissionsResponse where
+ gen/Network/AWS/WorkMail/ListOrganizations.hs view
@@ -0,0 +1,164 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.ListOrganizations+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns summaries of the customer's non-deleted organizations.+--+--+--+-- This operation returns paginated results.+module Network.AWS.WorkMail.ListOrganizations+ (+ -- * Creating a Request+ listOrganizations+ , ListOrganizations+ -- * Request Lenses+ , loNextToken+ , loMaxResults++ -- * Destructuring the Response+ , listOrganizationsResponse+ , ListOrganizationsResponse+ -- * Response Lenses+ , lorsNextToken+ , lorsOrganizationSummaries+ , lorsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'listOrganizations' smart constructor.+data ListOrganizations = ListOrganizations'+ { _loNextToken :: !(Maybe Text)+ , _loMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListOrganizations' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'loNextToken' - The token to use to retrieve the next page of results. The first call does not contain any tokens.+--+-- * 'loMaxResults' - The maximum number of results to return in a single call.+listOrganizations+ :: ListOrganizations+listOrganizations =+ ListOrganizations' {_loNextToken = Nothing, _loMaxResults = Nothing}+++-- | The token to use to retrieve the next page of results. The first call does not contain any tokens.+loNextToken :: Lens' ListOrganizations (Maybe Text)+loNextToken = lens _loNextToken (\ s a -> s{_loNextToken = a})++-- | The maximum number of results to return in a single call.+loMaxResults :: Lens' ListOrganizations (Maybe Natural)+loMaxResults = lens _loMaxResults (\ s a -> s{_loMaxResults = a}) . mapping _Nat++instance AWSPager ListOrganizations where+ page rq rs+ | stop (rs ^. lorsNextToken) = Nothing+ | stop (rs ^. lorsOrganizationSummaries) = Nothing+ | otherwise =+ Just $ rq & loNextToken .~ rs ^. lorsNextToken++instance AWSRequest ListOrganizations where+ type Rs ListOrganizations = ListOrganizationsResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ ListOrganizationsResponse' <$>+ (x .?> "NextToken") <*>+ (x .?> "OrganizationSummaries" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable ListOrganizations where++instance NFData ListOrganizations where++instance ToHeaders ListOrganizations where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.ListOrganizations" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListOrganizations where+ toJSON ListOrganizations'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _loNextToken,+ ("MaxResults" .=) <$> _loMaxResults])++instance ToPath ListOrganizations where+ toPath = const "/"++instance ToQuery ListOrganizations where+ toQuery = const mempty++-- | /See:/ 'listOrganizationsResponse' smart constructor.+data ListOrganizationsResponse = ListOrganizationsResponse'+ { _lorsNextToken :: !(Maybe Text)+ , _lorsOrganizationSummaries :: !(Maybe [OrganizationSummary])+ , _lorsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListOrganizationsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lorsNextToken' - The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.+--+-- * 'lorsOrganizationSummaries' - The overview of owned organizations presented as a list of organization summaries.+--+-- * 'lorsResponseStatus' - -- | The response status code.+listOrganizationsResponse+ :: Int -- ^ 'lorsResponseStatus'+ -> ListOrganizationsResponse+listOrganizationsResponse pResponseStatus_ =+ ListOrganizationsResponse'+ { _lorsNextToken = Nothing+ , _lorsOrganizationSummaries = Nothing+ , _lorsResponseStatus = pResponseStatus_+ }+++-- | The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.+lorsNextToken :: Lens' ListOrganizationsResponse (Maybe Text)+lorsNextToken = lens _lorsNextToken (\ s a -> s{_lorsNextToken = a})++-- | The overview of owned organizations presented as a list of organization summaries.+lorsOrganizationSummaries :: Lens' ListOrganizationsResponse [OrganizationSummary]+lorsOrganizationSummaries = lens _lorsOrganizationSummaries (\ s a -> s{_lorsOrganizationSummaries = a}) . _Default . _Coerce++-- | -- | The response status code.+lorsResponseStatus :: Lens' ListOrganizationsResponse Int+lorsResponseStatus = lens _lorsResponseStatus (\ s a -> s{_lorsResponseStatus = a})++instance NFData ListOrganizationsResponse where
+ gen/Network/AWS/WorkMail/ListResourceDelegates.hs view
@@ -0,0 +1,181 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.ListResourceDelegates+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the delegates associated with a resource. Users and groups can be resource delegates and answer requests on behalf of the resource.+--+--+module Network.AWS.WorkMail.ListResourceDelegates+ (+ -- * Creating a Request+ listResourceDelegates+ , ListResourceDelegates+ -- * Request Lenses+ , lrdNextToken+ , lrdMaxResults+ , lrdOrganizationId+ , lrdResourceId++ -- * Destructuring the Response+ , listResourceDelegatesResponse+ , ListResourceDelegatesResponse+ -- * Response Lenses+ , lrdrsDelegates+ , lrdrsNextToken+ , lrdrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'listResourceDelegates' smart constructor.+data ListResourceDelegates = ListResourceDelegates'+ { _lrdNextToken :: !(Maybe Text)+ , _lrdMaxResults :: !(Maybe Nat)+ , _lrdOrganizationId :: !Text+ , _lrdResourceId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListResourceDelegates' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrdNextToken' - The token used to paginate through the delegates associated with a resource.+--+-- * 'lrdMaxResults' - The number of maximum results in a page.+--+-- * 'lrdOrganizationId' - The identifier for the organization that contains the resource for which delegates are listed.+--+-- * 'lrdResourceId' - The identifier for the resource whose delegates are listed.+listResourceDelegates+ :: Text -- ^ 'lrdOrganizationId'+ -> Text -- ^ 'lrdResourceId'+ -> ListResourceDelegates+listResourceDelegates pOrganizationId_ pResourceId_ =+ ListResourceDelegates'+ { _lrdNextToken = Nothing+ , _lrdMaxResults = Nothing+ , _lrdOrganizationId = pOrganizationId_+ , _lrdResourceId = pResourceId_+ }+++-- | The token used to paginate through the delegates associated with a resource.+lrdNextToken :: Lens' ListResourceDelegates (Maybe Text)+lrdNextToken = lens _lrdNextToken (\ s a -> s{_lrdNextToken = a})++-- | The number of maximum results in a page.+lrdMaxResults :: Lens' ListResourceDelegates (Maybe Natural)+lrdMaxResults = lens _lrdMaxResults (\ s a -> s{_lrdMaxResults = a}) . mapping _Nat++-- | The identifier for the organization that contains the resource for which delegates are listed.+lrdOrganizationId :: Lens' ListResourceDelegates Text+lrdOrganizationId = lens _lrdOrganizationId (\ s a -> s{_lrdOrganizationId = a})++-- | The identifier for the resource whose delegates are listed.+lrdResourceId :: Lens' ListResourceDelegates Text+lrdResourceId = lens _lrdResourceId (\ s a -> s{_lrdResourceId = a})++instance AWSRequest ListResourceDelegates where+ type Rs ListResourceDelegates =+ ListResourceDelegatesResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ ListResourceDelegatesResponse' <$>+ (x .?> "Delegates" .!@ mempty) <*>+ (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListResourceDelegates where++instance NFData ListResourceDelegates where++instance ToHeaders ListResourceDelegates where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.ListResourceDelegates" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListResourceDelegates where+ toJSON ListResourceDelegates'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lrdNextToken,+ ("MaxResults" .=) <$> _lrdMaxResults,+ Just ("OrganizationId" .= _lrdOrganizationId),+ Just ("ResourceId" .= _lrdResourceId)])++instance ToPath ListResourceDelegates where+ toPath = const "/"++instance ToQuery ListResourceDelegates where+ toQuery = const mempty++-- | /See:/ 'listResourceDelegatesResponse' smart constructor.+data ListResourceDelegatesResponse = ListResourceDelegatesResponse'+ { _lrdrsDelegates :: !(Maybe [Delegate])+ , _lrdrsNextToken :: !(Maybe Text)+ , _lrdrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListResourceDelegatesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrdrsDelegates' - One page of the resource's delegates.+--+-- * 'lrdrsNextToken' - The token used to paginate through the delegates associated with a resource. While results are still available, it has an associated value. When the last page is reached, the token is empty.+--+-- * 'lrdrsResponseStatus' - -- | The response status code.+listResourceDelegatesResponse+ :: Int -- ^ 'lrdrsResponseStatus'+ -> ListResourceDelegatesResponse+listResourceDelegatesResponse pResponseStatus_ =+ ListResourceDelegatesResponse'+ { _lrdrsDelegates = Nothing+ , _lrdrsNextToken = Nothing+ , _lrdrsResponseStatus = pResponseStatus_+ }+++-- | One page of the resource's delegates.+lrdrsDelegates :: Lens' ListResourceDelegatesResponse [Delegate]+lrdrsDelegates = lens _lrdrsDelegates (\ s a -> s{_lrdrsDelegates = a}) . _Default . _Coerce++-- | The token used to paginate through the delegates associated with a resource. While results are still available, it has an associated value. When the last page is reached, the token is empty.+lrdrsNextToken :: Lens' ListResourceDelegatesResponse (Maybe Text)+lrdrsNextToken = lens _lrdrsNextToken (\ s a -> s{_lrdrsNextToken = a})++-- | -- | The response status code.+lrdrsResponseStatus :: Lens' ListResourceDelegatesResponse Int+lrdrsResponseStatus = lens _lrdrsResponseStatus (\ s a -> s{_lrdrsResponseStatus = a})++instance NFData ListResourceDelegatesResponse where
+ gen/Network/AWS/WorkMail/ListResources.hs view
@@ -0,0 +1,178 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.ListResources+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns summaries of the organization's resources.+--+--+--+-- This operation returns paginated results.+module Network.AWS.WorkMail.ListResources+ (+ -- * Creating a Request+ listResources+ , ListResources+ -- * Request Lenses+ , lrNextToken+ , lrMaxResults+ , lrOrganizationId++ -- * Destructuring the Response+ , listResourcesResponse+ , ListResourcesResponse+ -- * Response Lenses+ , lrrsResources+ , lrrsNextToken+ , lrrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'listResources' smart constructor.+data ListResources = ListResources'+ { _lrNextToken :: !(Maybe Text)+ , _lrMaxResults :: !(Maybe Nat)+ , _lrOrganizationId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListResources' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrNextToken' - The token to use to retrieve the next page of results. The first call does not contain any tokens.+--+-- * 'lrMaxResults' - The maximum number of results to return in a single call.+--+-- * 'lrOrganizationId' - The identifier for the organization under which the resources exist.+listResources+ :: Text -- ^ 'lrOrganizationId'+ -> ListResources+listResources pOrganizationId_ =+ ListResources'+ { _lrNextToken = Nothing+ , _lrMaxResults = Nothing+ , _lrOrganizationId = pOrganizationId_+ }+++-- | The token to use to retrieve the next page of results. The first call does not contain any tokens.+lrNextToken :: Lens' ListResources (Maybe Text)+lrNextToken = lens _lrNextToken (\ s a -> s{_lrNextToken = a})++-- | The maximum number of results to return in a single call.+lrMaxResults :: Lens' ListResources (Maybe Natural)+lrMaxResults = lens _lrMaxResults (\ s a -> s{_lrMaxResults = a}) . mapping _Nat++-- | The identifier for the organization under which the resources exist.+lrOrganizationId :: Lens' ListResources Text+lrOrganizationId = lens _lrOrganizationId (\ s a -> s{_lrOrganizationId = a})++instance AWSPager ListResources where+ page rq rs+ | stop (rs ^. lrrsNextToken) = Nothing+ | stop (rs ^. lrrsResources) = Nothing+ | otherwise =+ Just $ rq & lrNextToken .~ rs ^. lrrsNextToken++instance AWSRequest ListResources where+ type Rs ListResources = ListResourcesResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ ListResourcesResponse' <$>+ (x .?> "Resources" .!@ mempty) <*>+ (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListResources where++instance NFData ListResources where++instance ToHeaders ListResources where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.ListResources" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListResources where+ toJSON ListResources'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lrNextToken,+ ("MaxResults" .=) <$> _lrMaxResults,+ Just ("OrganizationId" .= _lrOrganizationId)])++instance ToPath ListResources where+ toPath = const "/"++instance ToQuery ListResources where+ toQuery = const mempty++-- | /See:/ 'listResourcesResponse' smart constructor.+data ListResourcesResponse = ListResourcesResponse'+ { _lrrsResources :: !(Maybe [Resource])+ , _lrrsNextToken :: !(Maybe Text)+ , _lrrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListResourcesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrrsResources' - One page of the organization's resource representation.+--+-- * 'lrrsNextToken' - The token used to paginate through all the organization's resources. While results are still available, it has an associated value. When the last page is reached, the token is empty.+--+-- * 'lrrsResponseStatus' - -- | The response status code.+listResourcesResponse+ :: Int -- ^ 'lrrsResponseStatus'+ -> ListResourcesResponse+listResourcesResponse pResponseStatus_ =+ ListResourcesResponse'+ { _lrrsResources = Nothing+ , _lrrsNextToken = Nothing+ , _lrrsResponseStatus = pResponseStatus_+ }+++-- | One page of the organization's resource representation.+lrrsResources :: Lens' ListResourcesResponse [Resource]+lrrsResources = lens _lrrsResources (\ s a -> s{_lrrsResources = a}) . _Default . _Coerce++-- | The token used to paginate through all the organization's resources. While results are still available, it has an associated value. When the last page is reached, the token is empty.+lrrsNextToken :: Lens' ListResourcesResponse (Maybe Text)+lrrsNextToken = lens _lrrsNextToken (\ s a -> s{_lrrsNextToken = a})++-- | -- | The response status code.+lrrsResponseStatus :: Lens' ListResourcesResponse Int+lrrsResponseStatus = lens _lrrsResponseStatus (\ s a -> s{_lrrsResponseStatus = a})++instance NFData ListResourcesResponse where
+ gen/Network/AWS/WorkMail/ListUsers.hs view
@@ -0,0 +1,177 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.ListUsers+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns summaries of the organization's users.+--+--+--+-- This operation returns paginated results.+module Network.AWS.WorkMail.ListUsers+ (+ -- * Creating a Request+ listUsers+ , ListUsers+ -- * Request Lenses+ , luNextToken+ , luMaxResults+ , luOrganizationId++ -- * Destructuring the Response+ , listUsersResponse+ , ListUsersResponse+ -- * Response Lenses+ , lursUsers+ , lursNextToken+ , lursResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'listUsers' smart constructor.+data ListUsers = ListUsers'+ { _luNextToken :: !(Maybe Text)+ , _luMaxResults :: !(Maybe Nat)+ , _luOrganizationId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListUsers' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'luNextToken' - TBD+--+-- * 'luMaxResults' - The maximum number of results to return in a single call.+--+-- * 'luOrganizationId' - The identifier for the organization under which the users exist.+listUsers+ :: Text -- ^ 'luOrganizationId'+ -> ListUsers+listUsers pOrganizationId_ =+ ListUsers'+ { _luNextToken = Nothing+ , _luMaxResults = Nothing+ , _luOrganizationId = pOrganizationId_+ }+++-- | TBD+luNextToken :: Lens' ListUsers (Maybe Text)+luNextToken = lens _luNextToken (\ s a -> s{_luNextToken = a})++-- | The maximum number of results to return in a single call.+luMaxResults :: Lens' ListUsers (Maybe Natural)+luMaxResults = lens _luMaxResults (\ s a -> s{_luMaxResults = a}) . mapping _Nat++-- | The identifier for the organization under which the users exist.+luOrganizationId :: Lens' ListUsers Text+luOrganizationId = lens _luOrganizationId (\ s a -> s{_luOrganizationId = a})++instance AWSPager ListUsers where+ page rq rs+ | stop (rs ^. lursNextToken) = Nothing+ | stop (rs ^. lursUsers) = Nothing+ | otherwise =+ Just $ rq & luNextToken .~ rs ^. lursNextToken++instance AWSRequest ListUsers where+ type Rs ListUsers = ListUsersResponse+ request = postJSON workMail+ response+ = receiveJSON+ (\ s h x ->+ ListUsersResponse' <$>+ (x .?> "Users" .!@ mempty) <*> (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListUsers where++instance NFData ListUsers where++instance ToHeaders ListUsers where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.ListUsers" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListUsers where+ toJSON ListUsers'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _luNextToken,+ ("MaxResults" .=) <$> _luMaxResults,+ Just ("OrganizationId" .= _luOrganizationId)])++instance ToPath ListUsers where+ toPath = const "/"++instance ToQuery ListUsers where+ toQuery = const mempty++-- | /See:/ 'listUsersResponse' smart constructor.+data ListUsersResponse = ListUsersResponse'+ { _lursUsers :: !(Maybe [User])+ , _lursNextToken :: !(Maybe Text)+ , _lursResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListUsersResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lursUsers' - The overview of users for an organization.+--+-- * 'lursNextToken' - The token to use to retrieve the next page of results. This value is `null` when there are no more results to return.+--+-- * 'lursResponseStatus' - -- | The response status code.+listUsersResponse+ :: Int -- ^ 'lursResponseStatus'+ -> ListUsersResponse+listUsersResponse pResponseStatus_ =+ ListUsersResponse'+ { _lursUsers = Nothing+ , _lursNextToken = Nothing+ , _lursResponseStatus = pResponseStatus_+ }+++-- | The overview of users for an organization.+lursUsers :: Lens' ListUsersResponse [User]+lursUsers = lens _lursUsers (\ s a -> s{_lursUsers = a}) . _Default . _Coerce++-- | The token to use to retrieve the next page of results. This value is `null` when there are no more results to return.+lursNextToken :: Lens' ListUsersResponse (Maybe Text)+lursNextToken = lens _lursNextToken (\ s a -> s{_lursNextToken = a})++-- | -- | The response status code.+lursResponseStatus :: Lens' ListUsersResponse Int+lursResponseStatus = lens _lursResponseStatus (\ s a -> s{_lursResponseStatus = a})++instance NFData ListUsersResponse where
+ gen/Network/AWS/WorkMail/PutMailboxPermissions.hs view
@@ -0,0 +1,160 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.PutMailboxPermissions+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sets permissions for a user or group. This replaces any pre-existing permissions set for the entity.+--+--+module Network.AWS.WorkMail.PutMailboxPermissions+ (+ -- * Creating a Request+ putMailboxPermissions+ , PutMailboxPermissions+ -- * Request Lenses+ , pmpOrganizationId+ , pmpEntityId+ , pmpGranteeId+ , pmpPermissionValues++ -- * Destructuring the Response+ , putMailboxPermissionsResponse+ , PutMailboxPermissionsResponse+ -- * Response Lenses+ , pmprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'putMailboxPermissions' smart constructor.+data PutMailboxPermissions = PutMailboxPermissions'+ { _pmpOrganizationId :: !Text+ , _pmpEntityId :: !Text+ , _pmpGranteeId :: !Text+ , _pmpPermissionValues :: ![PermissionType]+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'PutMailboxPermissions' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pmpOrganizationId' - The identifier of the organization under which the entity (user or group) exists.+--+-- * 'pmpEntityId' - The identifier of the entity (user or group) for which to update mailbox permissions.+--+-- * 'pmpGranteeId' - The identifier of the entity (user or group) to which to grant the permissions.+--+-- * 'pmpPermissionValues' - The permissions granted to the grantee. SEND_AS allows the grantee to send email as the owner of the mailbox (the grantee is not mentioned on these emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner of the mailbox (the grantee is not mentioned as the physical sender of these emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective of other folder-level permissions set on the mailbox.+putMailboxPermissions+ :: Text -- ^ 'pmpOrganizationId'+ -> Text -- ^ 'pmpEntityId'+ -> Text -- ^ 'pmpGranteeId'+ -> PutMailboxPermissions+putMailboxPermissions pOrganizationId_ pEntityId_ pGranteeId_ =+ PutMailboxPermissions'+ { _pmpOrganizationId = pOrganizationId_+ , _pmpEntityId = pEntityId_+ , _pmpGranteeId = pGranteeId_+ , _pmpPermissionValues = mempty+ }+++-- | The identifier of the organization under which the entity (user or group) exists.+pmpOrganizationId :: Lens' PutMailboxPermissions Text+pmpOrganizationId = lens _pmpOrganizationId (\ s a -> s{_pmpOrganizationId = a})++-- | The identifier of the entity (user or group) for which to update mailbox permissions.+pmpEntityId :: Lens' PutMailboxPermissions Text+pmpEntityId = lens _pmpEntityId (\ s a -> s{_pmpEntityId = a})++-- | The identifier of the entity (user or group) to which to grant the permissions.+pmpGranteeId :: Lens' PutMailboxPermissions Text+pmpGranteeId = lens _pmpGranteeId (\ s a -> s{_pmpGranteeId = a})++-- | The permissions granted to the grantee. SEND_AS allows the grantee to send email as the owner of the mailbox (the grantee is not mentioned on these emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner of the mailbox (the grantee is not mentioned as the physical sender of these emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective of other folder-level permissions set on the mailbox.+pmpPermissionValues :: Lens' PutMailboxPermissions [PermissionType]+pmpPermissionValues = lens _pmpPermissionValues (\ s a -> s{_pmpPermissionValues = a}) . _Coerce++instance AWSRequest PutMailboxPermissions where+ type Rs PutMailboxPermissions =+ PutMailboxPermissionsResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ PutMailboxPermissionsResponse' <$>+ (pure (fromEnum s)))++instance Hashable PutMailboxPermissions where++instance NFData PutMailboxPermissions where++instance ToHeaders PutMailboxPermissions where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.PutMailboxPermissions" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON PutMailboxPermissions where+ toJSON PutMailboxPermissions'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _pmpOrganizationId),+ Just ("EntityId" .= _pmpEntityId),+ Just ("GranteeId" .= _pmpGranteeId),+ Just ("PermissionValues" .= _pmpPermissionValues)])++instance ToPath PutMailboxPermissions where+ toPath = const "/"++instance ToQuery PutMailboxPermissions where+ toQuery = const mempty++-- | /See:/ 'putMailboxPermissionsResponse' smart constructor.+newtype PutMailboxPermissionsResponse = PutMailboxPermissionsResponse'+ { _pmprsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'PutMailboxPermissionsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pmprsResponseStatus' - -- | The response status code.+putMailboxPermissionsResponse+ :: Int -- ^ 'pmprsResponseStatus'+ -> PutMailboxPermissionsResponse+putMailboxPermissionsResponse pResponseStatus_ =+ PutMailboxPermissionsResponse' {_pmprsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+pmprsResponseStatus :: Lens' PutMailboxPermissionsResponse Int+pmprsResponseStatus = lens _pmprsResponseStatus (\ s a -> s{_pmprsResponseStatus = a})++instance NFData PutMailboxPermissionsResponse where
+ gen/Network/AWS/WorkMail/RegisterToWorkMail.hs view
@@ -0,0 +1,148 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.RegisterToWorkMail+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Registers an existing and disabled user, group, or resource/entity for Amazon WorkMail use by associating a mailbox and calendaring capabilities. It performs no change if the entity is enabled and fails if the entity is deleted. This operation results in the accumulation of costs. For more information, see <http://aws.amazon.com/workmail/pricing Pricing> . The equivalent console functionality for this operation is /Enable/ . Users can either be created by calling the CreateUser API or they can be synchronized from your directory. For more information, see DeregisterFromWorkMail.+--+--+module Network.AWS.WorkMail.RegisterToWorkMail+ (+ -- * Creating a Request+ registerToWorkMail+ , RegisterToWorkMail+ -- * Request Lenses+ , rtwmOrganizationId+ , rtwmEntityId+ , rtwmEmail++ -- * Destructuring the Response+ , registerToWorkMailResponse+ , RegisterToWorkMailResponse+ -- * Response Lenses+ , rtwmrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'registerToWorkMail' smart constructor.+data RegisterToWorkMail = RegisterToWorkMail'+ { _rtwmOrganizationId :: !Text+ , _rtwmEntityId :: !Text+ , _rtwmEmail :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RegisterToWorkMail' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rtwmOrganizationId' - The identifier for the organization under which the Amazon WorkMail entity exists.+--+-- * 'rtwmEntityId' - The identifier for the entity to be updated.+--+-- * 'rtwmEmail' - The email for the entity to be updated.+registerToWorkMail+ :: Text -- ^ 'rtwmOrganizationId'+ -> Text -- ^ 'rtwmEntityId'+ -> Text -- ^ 'rtwmEmail'+ -> RegisterToWorkMail+registerToWorkMail pOrganizationId_ pEntityId_ pEmail_ =+ RegisterToWorkMail'+ { _rtwmOrganizationId = pOrganizationId_+ , _rtwmEntityId = pEntityId_+ , _rtwmEmail = pEmail_+ }+++-- | The identifier for the organization under which the Amazon WorkMail entity exists.+rtwmOrganizationId :: Lens' RegisterToWorkMail Text+rtwmOrganizationId = lens _rtwmOrganizationId (\ s a -> s{_rtwmOrganizationId = a})++-- | The identifier for the entity to be updated.+rtwmEntityId :: Lens' RegisterToWorkMail Text+rtwmEntityId = lens _rtwmEntityId (\ s a -> s{_rtwmEntityId = a})++-- | The email for the entity to be updated.+rtwmEmail :: Lens' RegisterToWorkMail Text+rtwmEmail = lens _rtwmEmail (\ s a -> s{_rtwmEmail = a})++instance AWSRequest RegisterToWorkMail where+ type Rs RegisterToWorkMail =+ RegisterToWorkMailResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ RegisterToWorkMailResponse' <$> (pure (fromEnum s)))++instance Hashable RegisterToWorkMail where++instance NFData RegisterToWorkMail where++instance ToHeaders RegisterToWorkMail where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.RegisterToWorkMail" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON RegisterToWorkMail where+ toJSON RegisterToWorkMail'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _rtwmOrganizationId),+ Just ("EntityId" .= _rtwmEntityId),+ Just ("Email" .= _rtwmEmail)])++instance ToPath RegisterToWorkMail where+ toPath = const "/"++instance ToQuery RegisterToWorkMail where+ toQuery = const mempty++-- | /See:/ 'registerToWorkMailResponse' smart constructor.+newtype RegisterToWorkMailResponse = RegisterToWorkMailResponse'+ { _rtwmrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RegisterToWorkMailResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rtwmrsResponseStatus' - -- | The response status code.+registerToWorkMailResponse+ :: Int -- ^ 'rtwmrsResponseStatus'+ -> RegisterToWorkMailResponse+registerToWorkMailResponse pResponseStatus_ =+ RegisterToWorkMailResponse' {_rtwmrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+rtwmrsResponseStatus :: Lens' RegisterToWorkMailResponse Int+rtwmrsResponseStatus = lens _rtwmrsResponseStatus (\ s a -> s{_rtwmrsResponseStatus = a})++instance NFData RegisterToWorkMailResponse where
+ gen/Network/AWS/WorkMail/ResetPassword.hs view
@@ -0,0 +1,147 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.ResetPassword+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Allows the administrator to reset the password for a user.+--+--+module Network.AWS.WorkMail.ResetPassword+ (+ -- * Creating a Request+ resetPassword+ , ResetPassword+ -- * Request Lenses+ , rpOrganizationId+ , rpUserId+ , rpPassword++ -- * Destructuring the Response+ , resetPasswordResponse+ , ResetPasswordResponse+ -- * Response Lenses+ , rprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'resetPassword' smart constructor.+data ResetPassword = ResetPassword'+ { _rpOrganizationId :: !Text+ , _rpUserId :: !Text+ , _rpPassword :: !(Sensitive Text)+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ResetPassword' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rpOrganizationId' - The identifier of the organization that contains the user for which the password is reset.+--+-- * 'rpUserId' - The identifier of the user for whom the password is reset.+--+-- * 'rpPassword' - The new password for the user.+resetPassword+ :: Text -- ^ 'rpOrganizationId'+ -> Text -- ^ 'rpUserId'+ -> Text -- ^ 'rpPassword'+ -> ResetPassword+resetPassword pOrganizationId_ pUserId_ pPassword_ =+ ResetPassword'+ { _rpOrganizationId = pOrganizationId_+ , _rpUserId = pUserId_+ , _rpPassword = _Sensitive # pPassword_+ }+++-- | The identifier of the organization that contains the user for which the password is reset.+rpOrganizationId :: Lens' ResetPassword Text+rpOrganizationId = lens _rpOrganizationId (\ s a -> s{_rpOrganizationId = a})++-- | The identifier of the user for whom the password is reset.+rpUserId :: Lens' ResetPassword Text+rpUserId = lens _rpUserId (\ s a -> s{_rpUserId = a})++-- | The new password for the user.+rpPassword :: Lens' ResetPassword Text+rpPassword = lens _rpPassword (\ s a -> s{_rpPassword = a}) . _Sensitive++instance AWSRequest ResetPassword where+ type Rs ResetPassword = ResetPasswordResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ ResetPasswordResponse' <$> (pure (fromEnum s)))++instance Hashable ResetPassword where++instance NFData ResetPassword where++instance ToHeaders ResetPassword where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.ResetPassword" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ResetPassword where+ toJSON ResetPassword'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _rpOrganizationId),+ Just ("UserId" .= _rpUserId),+ Just ("Password" .= _rpPassword)])++instance ToPath ResetPassword where+ toPath = const "/"++instance ToQuery ResetPassword where+ toQuery = const mempty++-- | /See:/ 'resetPasswordResponse' smart constructor.+newtype ResetPasswordResponse = ResetPasswordResponse'+ { _rprsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ResetPasswordResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rprsResponseStatus' - -- | The response status code.+resetPasswordResponse+ :: Int -- ^ 'rprsResponseStatus'+ -> ResetPasswordResponse+resetPasswordResponse pResponseStatus_ =+ ResetPasswordResponse' {_rprsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+rprsResponseStatus :: Lens' ResetPasswordResponse Int+rprsResponseStatus = lens _rprsResponseStatus (\ s a -> s{_rprsResponseStatus = a})++instance NFData ResetPasswordResponse where
+ gen/Network/AWS/WorkMail/Types.hs view
@@ -0,0 +1,291 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.Types+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.WorkMail.Types+ (+ -- * Service Configuration+ workMail++ -- * Errors+ , _DirectoryUnavailableException+ , _InvalidParameterException+ , _UnsupportedOperationException+ , _DirectoryServiceAuthenticationFailedException+ , _OrganizationStateException+ , _EntityStateException+ , _InvalidConfigurationException+ , _MailDomainStateException+ , _ReservedNameException+ , _OrganizationNotFoundException+ , _EntityNotFoundException+ , _EntityAlreadyRegisteredException+ , _MailDomainNotFoundException+ , _EmailAddressInUseException+ , _NameAvailabilityException+ , _InvalidPasswordException++ -- * EntityState+ , EntityState (..)++ -- * MemberType+ , MemberType (..)++ -- * PermissionType+ , PermissionType (..)++ -- * ResourceType+ , ResourceType (..)++ -- * UserRole+ , UserRole (..)++ -- * BookingOptions+ , BookingOptions+ , bookingOptions+ , boAutoDeclineConflictingRequests+ , boAutoDeclineRecurringRequests+ , boAutoAcceptRequests++ -- * Delegate+ , Delegate+ , delegate+ , dId+ , dType++ -- * Group+ , Group+ , group'+ , gEmail+ , gState+ , gDisabledDate+ , gName+ , gId+ , gEnabledDate++ -- * Member+ , Member+ , member+ , mState+ , mDisabledDate+ , mName+ , mId+ , mType+ , mEnabledDate++ -- * OrganizationSummary+ , OrganizationSummary+ , organizationSummary+ , osState+ , osAlias+ , osErrorMessage+ , osOrganizationId++ -- * Permission+ , Permission+ , permission+ , pGranteeId+ , pGranteeType+ , pPermissionValues++ -- * Resource+ , Resource+ , resource+ , rEmail+ , rState+ , rDisabledDate+ , rName+ , rId+ , rType+ , rEnabledDate++ -- * User+ , User+ , user+ , uEmail+ , uState+ , uDisabledDate+ , uName+ , uId+ , uDisplayName+ , uUserRole+ , uEnabledDate+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Sign.V4+import Network.AWS.WorkMail.Types.Product+import Network.AWS.WorkMail.Types.Sum++-- | API version @2017-10-01@ of the Amazon WorkMail SDK configuration.+workMail :: Service+workMail =+ Service+ { _svcAbbrev = "WorkMail"+ , _svcSigner = v4+ , _svcPrefix = "workmail"+ , _svcVersion = "2017-10-01"+ , _svcEndpoint = defaultEndpoint workMail+ , _svcTimeout = Just 70+ , _svcCheck = statusSuccess+ , _svcError = parseJSONError "WorkMail"+ , _svcRetry = retry+ }+ where+ retry =+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ }+ check e+ | has (hasCode "ThrottledException" . hasStatus 400) e =+ Just "throttled_exception"+ | has (hasStatus 429) e = Just "too_many_requests"+ | has (hasCode "ThrottlingException" . hasStatus 400) e =+ Just "throttling_exception"+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+ | has (hasStatus 504) e = Just "gateway_timeout"+ | has (hasCode "RequestThrottledException" . hasStatus 400) e =+ Just "request_throttled_exception"+ | has (hasStatus 502) e = Just "bad_gateway"+ | has (hasStatus 503) e = Just "service_unavailable"+ | has (hasStatus 500) e = Just "general_server_error"+ | has (hasStatus 509) e = Just "limit_exceeded"+ | otherwise = Nothing+++-- | The directory that you are trying to perform operations on isn't available.+--+--+_DirectoryUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError+_DirectoryUnavailableException =+ _MatchServiceError workMail "DirectoryUnavailableException"+++-- | One or more of the input parameters don't match the service's restrictions.+--+--+_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidParameterException =+ _MatchServiceError workMail "InvalidParameterException"+++-- | You can't perform a write operation against a read-only directory.+--+--+_UnsupportedOperationException :: AsError a => Getting (First ServiceError) a ServiceError+_UnsupportedOperationException =+ _MatchServiceError workMail "UnsupportedOperationException"+++-- | The Directory Service doesn't recognize the credentials supplied by the Amazon WorkMail service.+--+--+_DirectoryServiceAuthenticationFailedException :: AsError a => Getting (First ServiceError) a ServiceError+_DirectoryServiceAuthenticationFailedException =+ _MatchServiceError workMail "DirectoryServiceAuthenticationFailedException"+++-- | The organization must have a valid state (Active or Synchronizing) to perform certain operations on the organization or its entities.+--+--+_OrganizationStateException :: AsError a => Getting (First ServiceError) a ServiceError+_OrganizationStateException =+ _MatchServiceError workMail "OrganizationStateException"+++-- | You are performing an operation on an entity that isn't in the expected state, such as trying to update a deleted user.+--+--+_EntityStateException :: AsError a => Getting (First ServiceError) a ServiceError+_EntityStateException = _MatchServiceError workMail "EntityStateException"+++-- | The configuration for a resource isn't valid. A resource must either be able to auto-respond to requests or have at least one delegate associated that can do it on its behalf.+--+--+_InvalidConfigurationException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidConfigurationException =+ _MatchServiceError workMail "InvalidConfigurationException"+++-- | After a domain has been added to the organization, it must be verified. The domain is not yet verified.+--+--+_MailDomainStateException :: AsError a => Getting (First ServiceError) a ServiceError+_MailDomainStateException =+ _MatchServiceError workMail "MailDomainStateException"+++-- | This entity name is not allowed in Amazon WorkMail.+--+--+_ReservedNameException :: AsError a => Getting (First ServiceError) a ServiceError+_ReservedNameException = _MatchServiceError workMail "ReservedNameException"+++-- | An operation received a valid organization identifier that either doesn't belong or exist in the system.+--+--+_OrganizationNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_OrganizationNotFoundException =+ _MatchServiceError workMail "OrganizationNotFoundException"+++-- | The identifier supplied for the entity is valid, but it does not exist in your organization.+--+--+_EntityNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_EntityNotFoundException = _MatchServiceError workMail "EntityNotFoundException"+++-- | The user, group, or resource that you're trying to register is already registered.+--+--+_EntityAlreadyRegisteredException :: AsError a => Getting (First ServiceError) a ServiceError+_EntityAlreadyRegisteredException =+ _MatchServiceError workMail "EntityAlreadyRegisteredException"+++-- | For an email or alias to be created in Amazon WorkMail, the included domain must be defined in the organization.+--+--+_MailDomainNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_MailDomainNotFoundException =+ _MatchServiceError workMail "MailDomainNotFoundException"+++-- | The email address that you're trying to assign is already created for a different user, group, or resource.+--+--+_EmailAddressInUseException :: AsError a => Getting (First ServiceError) a ServiceError+_EmailAddressInUseException =+ _MatchServiceError workMail "EmailAddressInUseException"+++-- | The entity (user, group, or user) name isn't unique in Amazon WorkMail.+--+--+_NameAvailabilityException :: AsError a => Getting (First ServiceError) a ServiceError+_NameAvailabilityException =+ _MatchServiceError workMail "NameAvailabilityException"+++-- | The supplied password doesn't match the minimum security constraints, such as length or use of special characters.+--+--+_InvalidPasswordException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidPasswordException =+ _MatchServiceError workMail "InvalidPasswordException"+
+ gen/Network/AWS/WorkMail/Types/Product.hs view
@@ -0,0 +1,606 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.Types.Product+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.WorkMail.Types.Product where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.WorkMail.Types.Sum++-- | At least one delegate must be associated to the resource to disable automatic replies from the resource.+--+--+--+-- /See:/ 'bookingOptions' smart constructor.+data BookingOptions = BookingOptions'+ { _boAutoDeclineConflictingRequests :: !(Maybe Bool)+ , _boAutoDeclineRecurringRequests :: !(Maybe Bool)+ , _boAutoAcceptRequests :: !(Maybe Bool)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'BookingOptions' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'boAutoDeclineConflictingRequests' - The resource's ability to automatically decline any conflicting requests.+--+-- * 'boAutoDeclineRecurringRequests' - The resource's ability to automatically decline any recurring requests.+--+-- * 'boAutoAcceptRequests' - The resource's ability to automatically reply to requests. If disabled, delegates must be associated to the resource.+bookingOptions+ :: BookingOptions+bookingOptions =+ BookingOptions'+ { _boAutoDeclineConflictingRequests = Nothing+ , _boAutoDeclineRecurringRequests = Nothing+ , _boAutoAcceptRequests = Nothing+ }+++-- | The resource's ability to automatically decline any conflicting requests.+boAutoDeclineConflictingRequests :: Lens' BookingOptions (Maybe Bool)+boAutoDeclineConflictingRequests = lens _boAutoDeclineConflictingRequests (\ s a -> s{_boAutoDeclineConflictingRequests = a})++-- | The resource's ability to automatically decline any recurring requests.+boAutoDeclineRecurringRequests :: Lens' BookingOptions (Maybe Bool)+boAutoDeclineRecurringRequests = lens _boAutoDeclineRecurringRequests (\ s a -> s{_boAutoDeclineRecurringRequests = a})++-- | The resource's ability to automatically reply to requests. If disabled, delegates must be associated to the resource.+boAutoAcceptRequests :: Lens' BookingOptions (Maybe Bool)+boAutoAcceptRequests = lens _boAutoAcceptRequests (\ s a -> s{_boAutoAcceptRequests = a})++instance FromJSON BookingOptions where+ parseJSON+ = withObject "BookingOptions"+ (\ x ->+ BookingOptions' <$>+ (x .:? "AutoDeclineConflictingRequests") <*>+ (x .:? "AutoDeclineRecurringRequests")+ <*> (x .:? "AutoAcceptRequests"))++instance Hashable BookingOptions where++instance NFData BookingOptions where++instance ToJSON BookingOptions where+ toJSON BookingOptions'{..}+ = object+ (catMaybes+ [("AutoDeclineConflictingRequests" .=) <$>+ _boAutoDeclineConflictingRequests,+ ("AutoDeclineRecurringRequests" .=) <$>+ _boAutoDeclineRecurringRequests,+ ("AutoAcceptRequests" .=) <$> _boAutoAcceptRequests])++-- | The name of the attribute, which is one of the values defined in the UserAttribute enumeration.+--+--+--+-- /See:/ 'delegate' smart constructor.+data Delegate = Delegate'+ { _dId :: !Text+ , _dType :: !MemberType+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Delegate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dId' - The identifier for the user or group is associated as the resource's delegate.+--+-- * 'dType' - The type of the delegate: user or group.+delegate+ :: Text -- ^ 'dId'+ -> MemberType -- ^ 'dType'+ -> Delegate+delegate pId_ pType_ = Delegate' {_dId = pId_, _dType = pType_}+++-- | The identifier for the user or group is associated as the resource's delegate.+dId :: Lens' Delegate Text+dId = lens _dId (\ s a -> s{_dId = a})++-- | The type of the delegate: user or group.+dType :: Lens' Delegate MemberType+dType = lens _dType (\ s a -> s{_dType = a})++instance FromJSON Delegate where+ parseJSON+ = withObject "Delegate"+ (\ x -> Delegate' <$> (x .: "Id") <*> (x .: "Type"))++instance Hashable Delegate where++instance NFData Delegate where++-- | The representation of an Amazon WorkMail group.+--+--+--+-- /See:/ 'group'' smart constructor.+data Group = Group'+ { _gEmail :: !(Maybe Text)+ , _gState :: !(Maybe EntityState)+ , _gDisabledDate :: !(Maybe POSIX)+ , _gName :: !(Maybe Text)+ , _gId :: !(Maybe Text)+ , _gEnabledDate :: !(Maybe POSIX)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Group' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gEmail' - The email of the group.+--+-- * 'gState' - The state of the group, which can be ENABLED, DISABLED, or DELETED.+--+-- * 'gDisabledDate' - The date indicating when the group was disabled from Amazon WorkMail use.+--+-- * 'gName' - The name of the group.+--+-- * 'gId' - The identifier of the group.+--+-- * 'gEnabledDate' - The date indicating when the group was enabled for Amazon WorkMail use.+group'+ :: Group+group' =+ Group'+ { _gEmail = Nothing+ , _gState = Nothing+ , _gDisabledDate = Nothing+ , _gName = Nothing+ , _gId = Nothing+ , _gEnabledDate = Nothing+ }+++-- | The email of the group.+gEmail :: Lens' Group (Maybe Text)+gEmail = lens _gEmail (\ s a -> s{_gEmail = a})++-- | The state of the group, which can be ENABLED, DISABLED, or DELETED.+gState :: Lens' Group (Maybe EntityState)+gState = lens _gState (\ s a -> s{_gState = a})++-- | The date indicating when the group was disabled from Amazon WorkMail use.+gDisabledDate :: Lens' Group (Maybe UTCTime)+gDisabledDate = lens _gDisabledDate (\ s a -> s{_gDisabledDate = a}) . mapping _Time++-- | The name of the group.+gName :: Lens' Group (Maybe Text)+gName = lens _gName (\ s a -> s{_gName = a})++-- | The identifier of the group.+gId :: Lens' Group (Maybe Text)+gId = lens _gId (\ s a -> s{_gId = a})++-- | The date indicating when the group was enabled for Amazon WorkMail use.+gEnabledDate :: Lens' Group (Maybe UTCTime)+gEnabledDate = lens _gEnabledDate (\ s a -> s{_gEnabledDate = a}) . mapping _Time++instance FromJSON Group where+ parseJSON+ = withObject "Group"+ (\ x ->+ Group' <$>+ (x .:? "Email") <*> (x .:? "State") <*>+ (x .:? "DisabledDate")+ <*> (x .:? "Name")+ <*> (x .:? "Id")+ <*> (x .:? "EnabledDate"))++instance Hashable Group where++instance NFData Group where++-- | The representation of a group member (user or group).+--+--+--+-- /See:/ 'member' smart constructor.+data Member = Member'+ { _mState :: !(Maybe EntityState)+ , _mDisabledDate :: !(Maybe POSIX)+ , _mName :: !(Maybe Text)+ , _mId :: !(Maybe Text)+ , _mType :: !(Maybe MemberType)+ , _mEnabledDate :: !(Maybe POSIX)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Member' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'mState' - The state of the member, which can be ENABLED, DISABLED, or DELETED.+--+-- * 'mDisabledDate' - The date indicating when the member was disabled from Amazon WorkMail use.+--+-- * 'mName' - The name of the member.+--+-- * 'mId' - The identifier of the member.+--+-- * 'mType' - A member can be a user or group.+--+-- * 'mEnabledDate' - The date indicating when the member was enabled for Amazon WorkMail use.+member+ :: Member+member =+ Member'+ { _mState = Nothing+ , _mDisabledDate = Nothing+ , _mName = Nothing+ , _mId = Nothing+ , _mType = Nothing+ , _mEnabledDate = Nothing+ }+++-- | The state of the member, which can be ENABLED, DISABLED, or DELETED.+mState :: Lens' Member (Maybe EntityState)+mState = lens _mState (\ s a -> s{_mState = a})++-- | The date indicating when the member was disabled from Amazon WorkMail use.+mDisabledDate :: Lens' Member (Maybe UTCTime)+mDisabledDate = lens _mDisabledDate (\ s a -> s{_mDisabledDate = a}) . mapping _Time++-- | The name of the member.+mName :: Lens' Member (Maybe Text)+mName = lens _mName (\ s a -> s{_mName = a})++-- | The identifier of the member.+mId :: Lens' Member (Maybe Text)+mId = lens _mId (\ s a -> s{_mId = a})++-- | A member can be a user or group.+mType :: Lens' Member (Maybe MemberType)+mType = lens _mType (\ s a -> s{_mType = a})++-- | The date indicating when the member was enabled for Amazon WorkMail use.+mEnabledDate :: Lens' Member (Maybe UTCTime)+mEnabledDate = lens _mEnabledDate (\ s a -> s{_mEnabledDate = a}) . mapping _Time++instance FromJSON Member where+ parseJSON+ = withObject "Member"+ (\ x ->+ Member' <$>+ (x .:? "State") <*> (x .:? "DisabledDate") <*>+ (x .:? "Name")+ <*> (x .:? "Id")+ <*> (x .:? "Type")+ <*> (x .:? "EnabledDate"))++instance Hashable Member where++instance NFData Member where++-- | The brief overview associated with an organization.+--+--+--+-- /See:/ 'organizationSummary' smart constructor.+data OrganizationSummary = OrganizationSummary'+ { _osState :: !(Maybe Text)+ , _osAlias :: !(Maybe Text)+ , _osErrorMessage :: !(Maybe Text)+ , _osOrganizationId :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'OrganizationSummary' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'osState' - The state associated with the organization.+--+-- * 'osAlias' - The alias associated with the organization.+--+-- * 'osErrorMessage' - The error message associated with the organization. It is only present if unexpected behavior has occurred with regards to the organization. It provides insight or solutions regarding unexpected behavior.+--+-- * 'osOrganizationId' - The identifier associated with the organization.+organizationSummary+ :: OrganizationSummary+organizationSummary =+ OrganizationSummary'+ { _osState = Nothing+ , _osAlias = Nothing+ , _osErrorMessage = Nothing+ , _osOrganizationId = Nothing+ }+++-- | The state associated with the organization.+osState :: Lens' OrganizationSummary (Maybe Text)+osState = lens _osState (\ s a -> s{_osState = a})++-- | The alias associated with the organization.+osAlias :: Lens' OrganizationSummary (Maybe Text)+osAlias = lens _osAlias (\ s a -> s{_osAlias = a})++-- | The error message associated with the organization. It is only present if unexpected behavior has occurred with regards to the organization. It provides insight or solutions regarding unexpected behavior.+osErrorMessage :: Lens' OrganizationSummary (Maybe Text)+osErrorMessage = lens _osErrorMessage (\ s a -> s{_osErrorMessage = a})++-- | The identifier associated with the organization.+osOrganizationId :: Lens' OrganizationSummary (Maybe Text)+osOrganizationId = lens _osOrganizationId (\ s a -> s{_osOrganizationId = a})++instance FromJSON OrganizationSummary where+ parseJSON+ = withObject "OrganizationSummary"+ (\ x ->+ OrganizationSummary' <$>+ (x .:? "State") <*> (x .:? "Alias") <*>+ (x .:? "ErrorMessage")+ <*> (x .:? "OrganizationId"))++instance Hashable OrganizationSummary where++instance NFData OrganizationSummary where++-- | Permission granted to an entity (user, group) to access a certain aspect of another entity's mailbox.+--+--+--+-- /See:/ 'permission' smart constructor.+data Permission = Permission'+ { _pGranteeId :: !Text+ , _pGranteeType :: !MemberType+ , _pPermissionValues :: ![PermissionType]+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Permission' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pGranteeId' - The identifier of the entity (user or group) to which the permissions are granted.+--+-- * 'pGranteeType' - The type of entity (user, group) of the entity referred to in GranteeId.+--+-- * 'pPermissionValues' - The permissions granted to the grantee. SEND_AS allows the grantee to send email as the owner of the mailbox (the grantee is not mentioned on these emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner of the mailbox (the grantee is not mentioned as the physical sender of these emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective of other folder-level permissions set on the mailbox.+permission+ :: Text -- ^ 'pGranteeId'+ -> MemberType -- ^ 'pGranteeType'+ -> Permission+permission pGranteeId_ pGranteeType_ =+ Permission'+ { _pGranteeId = pGranteeId_+ , _pGranteeType = pGranteeType_+ , _pPermissionValues = mempty+ }+++-- | The identifier of the entity (user or group) to which the permissions are granted.+pGranteeId :: Lens' Permission Text+pGranteeId = lens _pGranteeId (\ s a -> s{_pGranteeId = a})++-- | The type of entity (user, group) of the entity referred to in GranteeId.+pGranteeType :: Lens' Permission MemberType+pGranteeType = lens _pGranteeType (\ s a -> s{_pGranteeType = a})++-- | The permissions granted to the grantee. SEND_AS allows the grantee to send email as the owner of the mailbox (the grantee is not mentioned on these emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner of the mailbox (the grantee is not mentioned as the physical sender of these emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective of other folder-level permissions set on the mailbox.+pPermissionValues :: Lens' Permission [PermissionType]+pPermissionValues = lens _pPermissionValues (\ s a -> s{_pPermissionValues = a}) . _Coerce++instance FromJSON Permission where+ parseJSON+ = withObject "Permission"+ (\ x ->+ Permission' <$>+ (x .: "GranteeId") <*> (x .: "GranteeType") <*>+ (x .:? "PermissionValues" .!= mempty))++instance Hashable Permission where++instance NFData Permission where++-- | The overview for a resource containing relevant data regarding it.+--+--+--+-- /See:/ 'resource' smart constructor.+data Resource = Resource'+ { _rEmail :: !(Maybe Text)+ , _rState :: !(Maybe EntityState)+ , _rDisabledDate :: !(Maybe POSIX)+ , _rName :: !(Maybe Text)+ , _rId :: !(Maybe Text)+ , _rType :: !(Maybe ResourceType)+ , _rEnabledDate :: !(Maybe POSIX)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Resource' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rEmail' - The email of the resource.+--+-- * 'rState' - The state of the resource, which can be ENABLED, DISABLED, or DELETED.+--+-- * 'rDisabledDate' - The date indicating when the resource was disabled from Amazon WorkMail use.+--+-- * 'rName' - The name of the resource.+--+-- * 'rId' - The identifier of the resource.+--+-- * 'rType' - The type of the resource: equipment or room.+--+-- * 'rEnabledDate' - The date indicating when the resource was enabled for Amazon WorkMail use.+resource+ :: Resource+resource =+ Resource'+ { _rEmail = Nothing+ , _rState = Nothing+ , _rDisabledDate = Nothing+ , _rName = Nothing+ , _rId = Nothing+ , _rType = Nothing+ , _rEnabledDate = Nothing+ }+++-- | The email of the resource.+rEmail :: Lens' Resource (Maybe Text)+rEmail = lens _rEmail (\ s a -> s{_rEmail = a})++-- | The state of the resource, which can be ENABLED, DISABLED, or DELETED.+rState :: Lens' Resource (Maybe EntityState)+rState = lens _rState (\ s a -> s{_rState = a})++-- | The date indicating when the resource was disabled from Amazon WorkMail use.+rDisabledDate :: Lens' Resource (Maybe UTCTime)+rDisabledDate = lens _rDisabledDate (\ s a -> s{_rDisabledDate = a}) . mapping _Time++-- | The name of the resource.+rName :: Lens' Resource (Maybe Text)+rName = lens _rName (\ s a -> s{_rName = a})++-- | The identifier of the resource.+rId :: Lens' Resource (Maybe Text)+rId = lens _rId (\ s a -> s{_rId = a})++-- | The type of the resource: equipment or room.+rType :: Lens' Resource (Maybe ResourceType)+rType = lens _rType (\ s a -> s{_rType = a})++-- | The date indicating when the resource was enabled for Amazon WorkMail use.+rEnabledDate :: Lens' Resource (Maybe UTCTime)+rEnabledDate = lens _rEnabledDate (\ s a -> s{_rEnabledDate = a}) . mapping _Time++instance FromJSON Resource where+ parseJSON+ = withObject "Resource"+ (\ x ->+ Resource' <$>+ (x .:? "Email") <*> (x .:? "State") <*>+ (x .:? "DisabledDate")+ <*> (x .:? "Name")+ <*> (x .:? "Id")+ <*> (x .:? "Type")+ <*> (x .:? "EnabledDate"))++instance Hashable Resource where++instance NFData Resource where++-- | The representation of an Amazon WorkMail user.+--+--+--+-- /See:/ 'user' smart constructor.+data User = User'+ { _uEmail :: !(Maybe Text)+ , _uState :: !(Maybe EntityState)+ , _uDisabledDate :: !(Maybe POSIX)+ , _uName :: !(Maybe Text)+ , _uId :: !(Maybe Text)+ , _uDisplayName :: !(Maybe Text)+ , _uUserRole :: !(Maybe UserRole)+ , _uEnabledDate :: !(Maybe POSIX)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'User' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uEmail' - The email of the user.+--+-- * 'uState' - The state of the user, which can be ENABLED, DISABLED, or DELETED.+--+-- * 'uDisabledDate' - The date indicating when the user was disabled from Amazon WorkMail use.+--+-- * 'uName' - The name of the user.+--+-- * 'uId' - The identifier of the user.+--+-- * 'uDisplayName' - The display name of the user.+--+-- * 'uUserRole' - The role of the user.+--+-- * 'uEnabledDate' - The date indicating when the user was enabled for Amazon WorkMail use.+user+ :: User+user =+ User'+ { _uEmail = Nothing+ , _uState = Nothing+ , _uDisabledDate = Nothing+ , _uName = Nothing+ , _uId = Nothing+ , _uDisplayName = Nothing+ , _uUserRole = Nothing+ , _uEnabledDate = Nothing+ }+++-- | The email of the user.+uEmail :: Lens' User (Maybe Text)+uEmail = lens _uEmail (\ s a -> s{_uEmail = a})++-- | The state of the user, which can be ENABLED, DISABLED, or DELETED.+uState :: Lens' User (Maybe EntityState)+uState = lens _uState (\ s a -> s{_uState = a})++-- | The date indicating when the user was disabled from Amazon WorkMail use.+uDisabledDate :: Lens' User (Maybe UTCTime)+uDisabledDate = lens _uDisabledDate (\ s a -> s{_uDisabledDate = a}) . mapping _Time++-- | The name of the user.+uName :: Lens' User (Maybe Text)+uName = lens _uName (\ s a -> s{_uName = a})++-- | The identifier of the user.+uId :: Lens' User (Maybe Text)+uId = lens _uId (\ s a -> s{_uId = a})++-- | The display name of the user.+uDisplayName :: Lens' User (Maybe Text)+uDisplayName = lens _uDisplayName (\ s a -> s{_uDisplayName = a})++-- | The role of the user.+uUserRole :: Lens' User (Maybe UserRole)+uUserRole = lens _uUserRole (\ s a -> s{_uUserRole = a})++-- | The date indicating when the user was enabled for Amazon WorkMail use.+uEnabledDate :: Lens' User (Maybe UTCTime)+uEnabledDate = lens _uEnabledDate (\ s a -> s{_uEnabledDate = a}) . mapping _Time++instance FromJSON User where+ parseJSON+ = withObject "User"+ (\ x ->+ User' <$>+ (x .:? "Email") <*> (x .:? "State") <*>+ (x .:? "DisabledDate")+ <*> (x .:? "Name")+ <*> (x .:? "Id")+ <*> (x .:? "DisplayName")+ <*> (x .:? "UserRole")+ <*> (x .:? "EnabledDate"))++instance Hashable User where++instance NFData User where
+ gen/Network/AWS/WorkMail/Types/Sum.hs view
@@ -0,0 +1,170 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.Types.Sum+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.WorkMail.Types.Sum where++import Network.AWS.Prelude++data EntityState+ = Deleted+ | Disabled+ | Enabled+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText EntityState where+ parser = takeLowerText >>= \case+ "deleted" -> pure Deleted+ "disabled" -> pure Disabled+ "enabled" -> pure Enabled+ e -> fromTextError $ "Failure parsing EntityState from value: '" <> e+ <> "'. Accepted values: deleted, disabled, enabled"++instance ToText EntityState where+ toText = \case+ Deleted -> "DELETED"+ Disabled -> "DISABLED"+ Enabled -> "ENABLED"++instance Hashable EntityState+instance NFData EntityState+instance ToByteString EntityState+instance ToQuery EntityState+instance ToHeader EntityState++instance FromJSON EntityState where+ parseJSON = parseJSONText "EntityState"++data MemberType+ = Group+ | User+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText MemberType where+ parser = takeLowerText >>= \case+ "group" -> pure Group+ "user" -> pure User+ e -> fromTextError $ "Failure parsing MemberType from value: '" <> e+ <> "'. Accepted values: group, user"++instance ToText MemberType where+ toText = \case+ Group -> "GROUP"+ User -> "USER"++instance Hashable MemberType+instance NFData MemberType+instance ToByteString MemberType+instance ToQuery MemberType+instance ToHeader MemberType++instance FromJSON MemberType where+ parseJSON = parseJSONText "MemberType"++data PermissionType+ = FullAccess+ | SendAs+ | SendOnBehalf+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText PermissionType where+ parser = takeLowerText >>= \case+ "full_access" -> pure FullAccess+ "send_as" -> pure SendAs+ "send_on_behalf" -> pure SendOnBehalf+ e -> fromTextError $ "Failure parsing PermissionType from value: '" <> e+ <> "'. Accepted values: full_access, send_as, send_on_behalf"++instance ToText PermissionType where+ toText = \case+ FullAccess -> "FULL_ACCESS"+ SendAs -> "SEND_AS"+ SendOnBehalf -> "SEND_ON_BEHALF"++instance Hashable PermissionType+instance NFData PermissionType+instance ToByteString PermissionType+instance ToQuery PermissionType+instance ToHeader PermissionType++instance ToJSON PermissionType where+ toJSON = toJSONText++instance FromJSON PermissionType where+ parseJSON = parseJSONText "PermissionType"++data ResourceType+ = Equipment+ | Room+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText ResourceType where+ parser = takeLowerText >>= \case+ "equipment" -> pure Equipment+ "room" -> pure Room+ e -> fromTextError $ "Failure parsing ResourceType from value: '" <> e+ <> "'. Accepted values: equipment, room"++instance ToText ResourceType where+ toText = \case+ Equipment -> "EQUIPMENT"+ Room -> "ROOM"++instance Hashable ResourceType+instance NFData ResourceType+instance ToByteString ResourceType+instance ToQuery ResourceType+instance ToHeader ResourceType++instance ToJSON ResourceType where+ toJSON = toJSONText++instance FromJSON ResourceType where+ parseJSON = parseJSONText "ResourceType"++data UserRole+ = URResource+ | URSystemUser+ | URUser+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText UserRole where+ parser = takeLowerText >>= \case+ "resource" -> pure URResource+ "system_user" -> pure URSystemUser+ "user" -> pure URUser+ e -> fromTextError $ "Failure parsing UserRole from value: '" <> e+ <> "'. Accepted values: resource, system_user, user"++instance ToText UserRole where+ toText = \case+ URResource -> "RESOURCE"+ URSystemUser -> "SYSTEM_USER"+ URUser -> "USER"++instance Hashable UserRole+instance NFData UserRole+instance ToByteString UserRole+instance ToQuery UserRole+instance ToHeader UserRole++instance FromJSON UserRole where+ parseJSON = parseJSONText "UserRole"
+ gen/Network/AWS/WorkMail/UpdatePrimaryEmailAddress.hs view
@@ -0,0 +1,151 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.UpdatePrimaryEmailAddress+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates the primary email for an entity. The current email is moved into the list of aliases (or swapped between an existing alias and the current primary email) and the email provided in the input is promoted as the primary.+--+--+module Network.AWS.WorkMail.UpdatePrimaryEmailAddress+ (+ -- * Creating a Request+ updatePrimaryEmailAddress+ , UpdatePrimaryEmailAddress+ -- * Request Lenses+ , upeaOrganizationId+ , upeaEntityId+ , upeaEmail++ -- * Destructuring the Response+ , updatePrimaryEmailAddressResponse+ , UpdatePrimaryEmailAddressResponse+ -- * Response Lenses+ , upearsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'updatePrimaryEmailAddress' smart constructor.+data UpdatePrimaryEmailAddress = UpdatePrimaryEmailAddress'+ { _upeaOrganizationId :: !Text+ , _upeaEntityId :: !Text+ , _upeaEmail :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdatePrimaryEmailAddress' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'upeaOrganizationId' - The organization that contains the entity to update.+--+-- * 'upeaEntityId' - The entity to update (user, group, or resource).+--+-- * 'upeaEmail' - The value of the email to be updated as primary.+updatePrimaryEmailAddress+ :: Text -- ^ 'upeaOrganizationId'+ -> Text -- ^ 'upeaEntityId'+ -> Text -- ^ 'upeaEmail'+ -> UpdatePrimaryEmailAddress+updatePrimaryEmailAddress pOrganizationId_ pEntityId_ pEmail_ =+ UpdatePrimaryEmailAddress'+ { _upeaOrganizationId = pOrganizationId_+ , _upeaEntityId = pEntityId_+ , _upeaEmail = pEmail_+ }+++-- | The organization that contains the entity to update.+upeaOrganizationId :: Lens' UpdatePrimaryEmailAddress Text+upeaOrganizationId = lens _upeaOrganizationId (\ s a -> s{_upeaOrganizationId = a})++-- | The entity to update (user, group, or resource).+upeaEntityId :: Lens' UpdatePrimaryEmailAddress Text+upeaEntityId = lens _upeaEntityId (\ s a -> s{_upeaEntityId = a})++-- | The value of the email to be updated as primary.+upeaEmail :: Lens' UpdatePrimaryEmailAddress Text+upeaEmail = lens _upeaEmail (\ s a -> s{_upeaEmail = a})++instance AWSRequest UpdatePrimaryEmailAddress where+ type Rs UpdatePrimaryEmailAddress =+ UpdatePrimaryEmailAddressResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ UpdatePrimaryEmailAddressResponse' <$>+ (pure (fromEnum s)))++instance Hashable UpdatePrimaryEmailAddress where++instance NFData UpdatePrimaryEmailAddress where++instance ToHeaders UpdatePrimaryEmailAddress where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.UpdatePrimaryEmailAddress" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdatePrimaryEmailAddress where+ toJSON UpdatePrimaryEmailAddress'{..}+ = object+ (catMaybes+ [Just ("OrganizationId" .= _upeaOrganizationId),+ Just ("EntityId" .= _upeaEntityId),+ Just ("Email" .= _upeaEmail)])++instance ToPath UpdatePrimaryEmailAddress where+ toPath = const "/"++instance ToQuery UpdatePrimaryEmailAddress where+ toQuery = const mempty++-- | /See:/ 'updatePrimaryEmailAddressResponse' smart constructor.+newtype UpdatePrimaryEmailAddressResponse = UpdatePrimaryEmailAddressResponse'+ { _upearsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdatePrimaryEmailAddressResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'upearsResponseStatus' - -- | The response status code.+updatePrimaryEmailAddressResponse+ :: Int -- ^ 'upearsResponseStatus'+ -> UpdatePrimaryEmailAddressResponse+updatePrimaryEmailAddressResponse pResponseStatus_ =+ UpdatePrimaryEmailAddressResponse' {_upearsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+upearsResponseStatus :: Lens' UpdatePrimaryEmailAddressResponse Int+upearsResponseStatus = lens _upearsResponseStatus (\ s a -> s{_upearsResponseStatus = a})++instance NFData UpdatePrimaryEmailAddressResponse+ where
+ gen/Network/AWS/WorkMail/UpdateResource.hs view
@@ -0,0 +1,156 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.UpdateResource+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates data for the resource. It must be preceded by a describe call in order to have the latest information. The dataset in the request should be the one expected when performing another describe call.+--+--+module Network.AWS.WorkMail.UpdateResource+ (+ -- * Creating a Request+ updateResource+ , UpdateResource+ -- * Request Lenses+ , urName+ , urBookingOptions+ , urOrganizationId+ , urResourceId++ -- * Destructuring the Response+ , updateResourceResponse+ , UpdateResourceResponse+ -- * Response Lenses+ , urrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response+import Network.AWS.WorkMail.Types+import Network.AWS.WorkMail.Types.Product++-- | /See:/ 'updateResource' smart constructor.+data UpdateResource = UpdateResource'+ { _urName :: !(Maybe Text)+ , _urBookingOptions :: !(Maybe BookingOptions)+ , _urOrganizationId :: !Text+ , _urResourceId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateResource' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'urName' - The name of the resource to be updated.+--+-- * 'urBookingOptions' - The resource's booking options to be updated.+--+-- * 'urOrganizationId' - The identifier associated with the organization for which the resource is updated.+--+-- * 'urResourceId' - The identifier of the resource to be updated.+updateResource+ :: Text -- ^ 'urOrganizationId'+ -> Text -- ^ 'urResourceId'+ -> UpdateResource+updateResource pOrganizationId_ pResourceId_ =+ UpdateResource'+ { _urName = Nothing+ , _urBookingOptions = Nothing+ , _urOrganizationId = pOrganizationId_+ , _urResourceId = pResourceId_+ }+++-- | The name of the resource to be updated.+urName :: Lens' UpdateResource (Maybe Text)+urName = lens _urName (\ s a -> s{_urName = a})++-- | The resource's booking options to be updated.+urBookingOptions :: Lens' UpdateResource (Maybe BookingOptions)+urBookingOptions = lens _urBookingOptions (\ s a -> s{_urBookingOptions = a})++-- | The identifier associated with the organization for which the resource is updated.+urOrganizationId :: Lens' UpdateResource Text+urOrganizationId = lens _urOrganizationId (\ s a -> s{_urOrganizationId = a})++-- | The identifier of the resource to be updated.+urResourceId :: Lens' UpdateResource Text+urResourceId = lens _urResourceId (\ s a -> s{_urResourceId = a})++instance AWSRequest UpdateResource where+ type Rs UpdateResource = UpdateResourceResponse+ request = postJSON workMail+ response+ = receiveEmpty+ (\ s h x ->+ UpdateResourceResponse' <$> (pure (fromEnum s)))++instance Hashable UpdateResource where++instance NFData UpdateResource where++instance ToHeaders UpdateResource where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("WorkMailService.UpdateResource" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateResource where+ toJSON UpdateResource'{..}+ = object+ (catMaybes+ [("Name" .=) <$> _urName,+ ("BookingOptions" .=) <$> _urBookingOptions,+ Just ("OrganizationId" .= _urOrganizationId),+ Just ("ResourceId" .= _urResourceId)])++instance ToPath UpdateResource where+ toPath = const "/"++instance ToQuery UpdateResource where+ toQuery = const mempty++-- | /See:/ 'updateResourceResponse' smart constructor.+newtype UpdateResourceResponse = UpdateResourceResponse'+ { _urrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateResourceResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'urrsResponseStatus' - -- | The response status code.+updateResourceResponse+ :: Int -- ^ 'urrsResponseStatus'+ -> UpdateResourceResponse+updateResourceResponse pResponseStatus_ =+ UpdateResourceResponse' {_urrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+urrsResponseStatus :: Lens' UpdateResourceResponse Int+urrsResponseStatus = lens _urrsResponseStatus (\ s a -> s{_urrsResponseStatus = a})++instance NFData UpdateResourceResponse where
+ gen/Network/AWS/WorkMail/Waiters.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.WorkMail.Waiters+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.WorkMail.Waiters where++import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Waiter+import Network.AWS.WorkMail.Types
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.WorkMail+import Test.AWS.WorkMail.Internal++main :: IO ()+main = defaultMain $ testGroup "WorkMail"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/Gen/WorkMail.hs view
@@ -0,0 +1,597 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.AWS.Gen.WorkMail+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.WorkMail where++import Data.Proxy+import Network.AWS.WorkMail+import Test.AWS.Fixture+import Test.AWS.Prelude+import Test.AWS.WorkMail.Internal+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ requestUpdatePrimaryEmailAddress $+-- updatePrimaryEmailAddress+--+-- , requestDescribeResource $+-- describeResource+--+-- , requestCreateAlias $+-- createAlias+--+-- , requestResetPassword $+-- resetPassword+--+-- , requestDescribeGroup $+-- describeGroup+--+-- , requestRegisterToWorkMail $+-- registerToWorkMail+--+-- , requestListAliases $+-- listAliases+--+-- , requestPutMailboxPermissions $+-- putMailboxPermissions+--+-- , requestDeleteMailboxPermissions $+-- deleteMailboxPermissions+--+-- , requestListUsers $+-- listUsers+--+-- , requestAssociateMemberToGroup $+-- associateMemberToGroup+--+-- , requestDeleteResource $+-- deleteResource+--+-- , requestUpdateResource $+-- updateResource+--+-- , requestDisassociateMemberFromGroup $+-- disassociateMemberFromGroup+--+-- , requestListResources $+-- listResources+--+-- , requestDeregisterFromWorkMail $+-- deregisterFromWorkMail+--+-- , requestListMailboxPermissions $+-- listMailboxPermissions+--+-- , requestListGroupMembers $+-- listGroupMembers+--+-- , requestDisassociateDelegateFromResource $+-- disassociateDelegateFromResource+--+-- , requestListResourceDelegates $+-- listResourceDelegates+--+-- , requestDescribeUser $+-- describeUser+--+-- , requestDeleteAlias $+-- deleteAlias+--+-- , requestListOrganizations $+-- listOrganizations+--+-- , requestAssociateDelegateToResource $+-- associateDelegateToResource+--+-- , requestCreateUser $+-- createUser+--+-- , requestDeleteUser $+-- deleteUser+--+-- , requestCreateGroup $+-- createGroup+--+-- , requestDeleteGroup $+-- deleteGroup+--+-- , requestListGroups $+-- listGroups+--+-- , requestDescribeOrganization $+-- describeOrganization+--+-- , requestCreateResource $+-- createResource+--+-- ]++-- , testGroup "response"+-- [ responseUpdatePrimaryEmailAddress $+-- updatePrimaryEmailAddressResponse+--+-- , responseDescribeResource $+-- describeResourceResponse+--+-- , responseCreateAlias $+-- createAliasResponse+--+-- , responseResetPassword $+-- resetPasswordResponse+--+-- , responseDescribeGroup $+-- describeGroupResponse+--+-- , responseRegisterToWorkMail $+-- registerToWorkMailResponse+--+-- , responseListAliases $+-- listAliasesResponse+--+-- , responsePutMailboxPermissions $+-- putMailboxPermissionsResponse+--+-- , responseDeleteMailboxPermissions $+-- deleteMailboxPermissionsResponse+--+-- , responseListUsers $+-- listUsersResponse+--+-- , responseAssociateMemberToGroup $+-- associateMemberToGroupResponse+--+-- , responseDeleteResource $+-- deleteResourceResponse+--+-- , responseUpdateResource $+-- updateResourceResponse+--+-- , responseDisassociateMemberFromGroup $+-- disassociateMemberFromGroupResponse+--+-- , responseListResources $+-- listResourcesResponse+--+-- , responseDeregisterFromWorkMail $+-- deregisterFromWorkMailResponse+--+-- , responseListMailboxPermissions $+-- listMailboxPermissionsResponse+--+-- , responseListGroupMembers $+-- listGroupMembersResponse+--+-- , responseDisassociateDelegateFromResource $+-- disassociateDelegateFromResourceResponse+--+-- , responseListResourceDelegates $+-- listResourceDelegatesResponse+--+-- , responseDescribeUser $+-- describeUserResponse+--+-- , responseDeleteAlias $+-- deleteAliasResponse+--+-- , responseListOrganizations $+-- listOrganizationsResponse+--+-- , responseAssociateDelegateToResource $+-- associateDelegateToResourceResponse+--+-- , responseCreateUser $+-- createUserResponse+--+-- , responseDeleteUser $+-- deleteUserResponse+--+-- , responseCreateGroup $+-- createGroupResponse+--+-- , responseDeleteGroup $+-- deleteGroupResponse+--+-- , responseListGroups $+-- listGroupsResponse+--+-- , responseDescribeOrganization $+-- describeOrganizationResponse+--+-- , responseCreateResource $+-- createResourceResponse+--+-- ]+-- ]++-- Requests++requestUpdatePrimaryEmailAddress :: UpdatePrimaryEmailAddress -> TestTree+requestUpdatePrimaryEmailAddress = req+ "UpdatePrimaryEmailAddress"+ "fixture/UpdatePrimaryEmailAddress.yaml"++requestDescribeResource :: DescribeResource -> TestTree+requestDescribeResource = req+ "DescribeResource"+ "fixture/DescribeResource.yaml"++requestCreateAlias :: CreateAlias -> TestTree+requestCreateAlias = req+ "CreateAlias"+ "fixture/CreateAlias.yaml"++requestResetPassword :: ResetPassword -> TestTree+requestResetPassword = req+ "ResetPassword"+ "fixture/ResetPassword.yaml"++requestDescribeGroup :: DescribeGroup -> TestTree+requestDescribeGroup = req+ "DescribeGroup"+ "fixture/DescribeGroup.yaml"++requestRegisterToWorkMail :: RegisterToWorkMail -> TestTree+requestRegisterToWorkMail = req+ "RegisterToWorkMail"+ "fixture/RegisterToWorkMail.yaml"++requestListAliases :: ListAliases -> TestTree+requestListAliases = req+ "ListAliases"+ "fixture/ListAliases.yaml"++requestPutMailboxPermissions :: PutMailboxPermissions -> TestTree+requestPutMailboxPermissions = req+ "PutMailboxPermissions"+ "fixture/PutMailboxPermissions.yaml"++requestDeleteMailboxPermissions :: DeleteMailboxPermissions -> TestTree+requestDeleteMailboxPermissions = req+ "DeleteMailboxPermissions"+ "fixture/DeleteMailboxPermissions.yaml"++requestListUsers :: ListUsers -> TestTree+requestListUsers = req+ "ListUsers"+ "fixture/ListUsers.yaml"++requestAssociateMemberToGroup :: AssociateMemberToGroup -> TestTree+requestAssociateMemberToGroup = req+ "AssociateMemberToGroup"+ "fixture/AssociateMemberToGroup.yaml"++requestDeleteResource :: DeleteResource -> TestTree+requestDeleteResource = req+ "DeleteResource"+ "fixture/DeleteResource.yaml"++requestUpdateResource :: UpdateResource -> TestTree+requestUpdateResource = req+ "UpdateResource"+ "fixture/UpdateResource.yaml"++requestDisassociateMemberFromGroup :: DisassociateMemberFromGroup -> TestTree+requestDisassociateMemberFromGroup = req+ "DisassociateMemberFromGroup"+ "fixture/DisassociateMemberFromGroup.yaml"++requestListResources :: ListResources -> TestTree+requestListResources = req+ "ListResources"+ "fixture/ListResources.yaml"++requestDeregisterFromWorkMail :: DeregisterFromWorkMail -> TestTree+requestDeregisterFromWorkMail = req+ "DeregisterFromWorkMail"+ "fixture/DeregisterFromWorkMail.yaml"++requestListMailboxPermissions :: ListMailboxPermissions -> TestTree+requestListMailboxPermissions = req+ "ListMailboxPermissions"+ "fixture/ListMailboxPermissions.yaml"++requestListGroupMembers :: ListGroupMembers -> TestTree+requestListGroupMembers = req+ "ListGroupMembers"+ "fixture/ListGroupMembers.yaml"++requestDisassociateDelegateFromResource :: DisassociateDelegateFromResource -> TestTree+requestDisassociateDelegateFromResource = req+ "DisassociateDelegateFromResource"+ "fixture/DisassociateDelegateFromResource.yaml"++requestListResourceDelegates :: ListResourceDelegates -> TestTree+requestListResourceDelegates = req+ "ListResourceDelegates"+ "fixture/ListResourceDelegates.yaml"++requestDescribeUser :: DescribeUser -> TestTree+requestDescribeUser = req+ "DescribeUser"+ "fixture/DescribeUser.yaml"++requestDeleteAlias :: DeleteAlias -> TestTree+requestDeleteAlias = req+ "DeleteAlias"+ "fixture/DeleteAlias.yaml"++requestListOrganizations :: ListOrganizations -> TestTree+requestListOrganizations = req+ "ListOrganizations"+ "fixture/ListOrganizations.yaml"++requestAssociateDelegateToResource :: AssociateDelegateToResource -> TestTree+requestAssociateDelegateToResource = req+ "AssociateDelegateToResource"+ "fixture/AssociateDelegateToResource.yaml"++requestCreateUser :: CreateUser -> TestTree+requestCreateUser = req+ "CreateUser"+ "fixture/CreateUser.yaml"++requestDeleteUser :: DeleteUser -> TestTree+requestDeleteUser = req+ "DeleteUser"+ "fixture/DeleteUser.yaml"++requestCreateGroup :: CreateGroup -> TestTree+requestCreateGroup = req+ "CreateGroup"+ "fixture/CreateGroup.yaml"++requestDeleteGroup :: DeleteGroup -> TestTree+requestDeleteGroup = req+ "DeleteGroup"+ "fixture/DeleteGroup.yaml"++requestListGroups :: ListGroups -> TestTree+requestListGroups = req+ "ListGroups"+ "fixture/ListGroups.yaml"++requestDescribeOrganization :: DescribeOrganization -> TestTree+requestDescribeOrganization = req+ "DescribeOrganization"+ "fixture/DescribeOrganization.yaml"++requestCreateResource :: CreateResource -> TestTree+requestCreateResource = req+ "CreateResource"+ "fixture/CreateResource.yaml"++-- Responses++responseUpdatePrimaryEmailAddress :: UpdatePrimaryEmailAddressResponse -> TestTree+responseUpdatePrimaryEmailAddress = res+ "UpdatePrimaryEmailAddressResponse"+ "fixture/UpdatePrimaryEmailAddressResponse.proto"+ workMail+ (Proxy :: Proxy UpdatePrimaryEmailAddress)++responseDescribeResource :: DescribeResourceResponse -> TestTree+responseDescribeResource = res+ "DescribeResourceResponse"+ "fixture/DescribeResourceResponse.proto"+ workMail+ (Proxy :: Proxy DescribeResource)++responseCreateAlias :: CreateAliasResponse -> TestTree+responseCreateAlias = res+ "CreateAliasResponse"+ "fixture/CreateAliasResponse.proto"+ workMail+ (Proxy :: Proxy CreateAlias)++responseResetPassword :: ResetPasswordResponse -> TestTree+responseResetPassword = res+ "ResetPasswordResponse"+ "fixture/ResetPasswordResponse.proto"+ workMail+ (Proxy :: Proxy ResetPassword)++responseDescribeGroup :: DescribeGroupResponse -> TestTree+responseDescribeGroup = res+ "DescribeGroupResponse"+ "fixture/DescribeGroupResponse.proto"+ workMail+ (Proxy :: Proxy DescribeGroup)++responseRegisterToWorkMail :: RegisterToWorkMailResponse -> TestTree+responseRegisterToWorkMail = res+ "RegisterToWorkMailResponse"+ "fixture/RegisterToWorkMailResponse.proto"+ workMail+ (Proxy :: Proxy RegisterToWorkMail)++responseListAliases :: ListAliasesResponse -> TestTree+responseListAliases = res+ "ListAliasesResponse"+ "fixture/ListAliasesResponse.proto"+ workMail+ (Proxy :: Proxy ListAliases)++responsePutMailboxPermissions :: PutMailboxPermissionsResponse -> TestTree+responsePutMailboxPermissions = res+ "PutMailboxPermissionsResponse"+ "fixture/PutMailboxPermissionsResponse.proto"+ workMail+ (Proxy :: Proxy PutMailboxPermissions)++responseDeleteMailboxPermissions :: DeleteMailboxPermissionsResponse -> TestTree+responseDeleteMailboxPermissions = res+ "DeleteMailboxPermissionsResponse"+ "fixture/DeleteMailboxPermissionsResponse.proto"+ workMail+ (Proxy :: Proxy DeleteMailboxPermissions)++responseListUsers :: ListUsersResponse -> TestTree+responseListUsers = res+ "ListUsersResponse"+ "fixture/ListUsersResponse.proto"+ workMail+ (Proxy :: Proxy ListUsers)++responseAssociateMemberToGroup :: AssociateMemberToGroupResponse -> TestTree+responseAssociateMemberToGroup = res+ "AssociateMemberToGroupResponse"+ "fixture/AssociateMemberToGroupResponse.proto"+ workMail+ (Proxy :: Proxy AssociateMemberToGroup)++responseDeleteResource :: DeleteResourceResponse -> TestTree+responseDeleteResource = res+ "DeleteResourceResponse"+ "fixture/DeleteResourceResponse.proto"+ workMail+ (Proxy :: Proxy DeleteResource)++responseUpdateResource :: UpdateResourceResponse -> TestTree+responseUpdateResource = res+ "UpdateResourceResponse"+ "fixture/UpdateResourceResponse.proto"+ workMail+ (Proxy :: Proxy UpdateResource)++responseDisassociateMemberFromGroup :: DisassociateMemberFromGroupResponse -> TestTree+responseDisassociateMemberFromGroup = res+ "DisassociateMemberFromGroupResponse"+ "fixture/DisassociateMemberFromGroupResponse.proto"+ workMail+ (Proxy :: Proxy DisassociateMemberFromGroup)++responseListResources :: ListResourcesResponse -> TestTree+responseListResources = res+ "ListResourcesResponse"+ "fixture/ListResourcesResponse.proto"+ workMail+ (Proxy :: Proxy ListResources)++responseDeregisterFromWorkMail :: DeregisterFromWorkMailResponse -> TestTree+responseDeregisterFromWorkMail = res+ "DeregisterFromWorkMailResponse"+ "fixture/DeregisterFromWorkMailResponse.proto"+ workMail+ (Proxy :: Proxy DeregisterFromWorkMail)++responseListMailboxPermissions :: ListMailboxPermissionsResponse -> TestTree+responseListMailboxPermissions = res+ "ListMailboxPermissionsResponse"+ "fixture/ListMailboxPermissionsResponse.proto"+ workMail+ (Proxy :: Proxy ListMailboxPermissions)++responseListGroupMembers :: ListGroupMembersResponse -> TestTree+responseListGroupMembers = res+ "ListGroupMembersResponse"+ "fixture/ListGroupMembersResponse.proto"+ workMail+ (Proxy :: Proxy ListGroupMembers)++responseDisassociateDelegateFromResource :: DisassociateDelegateFromResourceResponse -> TestTree+responseDisassociateDelegateFromResource = res+ "DisassociateDelegateFromResourceResponse"+ "fixture/DisassociateDelegateFromResourceResponse.proto"+ workMail+ (Proxy :: Proxy DisassociateDelegateFromResource)++responseListResourceDelegates :: ListResourceDelegatesResponse -> TestTree+responseListResourceDelegates = res+ "ListResourceDelegatesResponse"+ "fixture/ListResourceDelegatesResponse.proto"+ workMail+ (Proxy :: Proxy ListResourceDelegates)++responseDescribeUser :: DescribeUserResponse -> TestTree+responseDescribeUser = res+ "DescribeUserResponse"+ "fixture/DescribeUserResponse.proto"+ workMail+ (Proxy :: Proxy DescribeUser)++responseDeleteAlias :: DeleteAliasResponse -> TestTree+responseDeleteAlias = res+ "DeleteAliasResponse"+ "fixture/DeleteAliasResponse.proto"+ workMail+ (Proxy :: Proxy DeleteAlias)++responseListOrganizations :: ListOrganizationsResponse -> TestTree+responseListOrganizations = res+ "ListOrganizationsResponse"+ "fixture/ListOrganizationsResponse.proto"+ workMail+ (Proxy :: Proxy ListOrganizations)++responseAssociateDelegateToResource :: AssociateDelegateToResourceResponse -> TestTree+responseAssociateDelegateToResource = res+ "AssociateDelegateToResourceResponse"+ "fixture/AssociateDelegateToResourceResponse.proto"+ workMail+ (Proxy :: Proxy AssociateDelegateToResource)++responseCreateUser :: CreateUserResponse -> TestTree+responseCreateUser = res+ "CreateUserResponse"+ "fixture/CreateUserResponse.proto"+ workMail+ (Proxy :: Proxy CreateUser)++responseDeleteUser :: DeleteUserResponse -> TestTree+responseDeleteUser = res+ "DeleteUserResponse"+ "fixture/DeleteUserResponse.proto"+ workMail+ (Proxy :: Proxy DeleteUser)++responseCreateGroup :: CreateGroupResponse -> TestTree+responseCreateGroup = res+ "CreateGroupResponse"+ "fixture/CreateGroupResponse.proto"+ workMail+ (Proxy :: Proxy CreateGroup)++responseDeleteGroup :: DeleteGroupResponse -> TestTree+responseDeleteGroup = res+ "DeleteGroupResponse"+ "fixture/DeleteGroupResponse.proto"+ workMail+ (Proxy :: Proxy DeleteGroup)++responseListGroups :: ListGroupsResponse -> TestTree+responseListGroups = res+ "ListGroupsResponse"+ "fixture/ListGroupsResponse.proto"+ workMail+ (Proxy :: Proxy ListGroups)++responseDescribeOrganization :: DescribeOrganizationResponse -> TestTree+responseDescribeOrganization = res+ "DescribeOrganizationResponse"+ "fixture/DescribeOrganizationResponse.proto"+ workMail+ (Proxy :: Proxy DescribeOrganization)++responseCreateResource :: CreateResourceResponse -> TestTree+responseCreateResource = res+ "CreateResourceResponse"+ "fixture/CreateResourceResponse.proto"+ workMail+ (Proxy :: Proxy CreateResource)
+ test/Test/AWS/WorkMail.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.AWS.WorkMail+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.WorkMail+ ( tests+ , fixtures+ ) where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/WorkMail/Internal.hs view
@@ -0,0 +1,9 @@+-- |+-- Module : Test.AWS.WorkMail.Internal+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.WorkMail.Internal where