packages feed

amazonka-xray (empty) → 1.4.5

raw patch · 32 files changed

+3532/−0 lines, 32 filesdep +amazonka-coredep +amazonka-testdep +amazonka-xraysetup-changed

Dependencies added: amazonka-core, amazonka-test, amazonka-xray, base, bytestring, tasty, tasty-hunit, text, time, unordered-containers

Files

+ 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 X-Ray SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.4.5`+++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-xray)+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.XRay](http://hackage.haskell.org/package/amazonka-xray/docs/Network-AWS-XRay.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-xray` 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-xray.cabal view
@@ -0,0 +1,86 @@+name:                  amazonka-xray+version:               1.4.5+synopsis:              Amazon X-Ray SDK.+homepage:              https://github.com/brendanhay/amazonka+bug-reports:           https://github.com/brendanhay/amazonka/issues+license:               OtherLicense+license-file:          LICENSE+author:                Brendan Hay+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>+copyright:             Copyright (c) 2013-2016 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.XRay" or <https://aws.amazon.com/documentation/ the AWS documentation>+    to get started.++source-repository head+    type:     git+    location: git://github.com/brendanhay/amazonka.git++library+    default-language:  Haskell2010+    hs-source-dirs:    src gen++    ghc-options:       -Wall++    exposed-modules:+          Network.AWS.XRay+        , Network.AWS.XRay.BatchGetTraces+        , Network.AWS.XRay.GetServiceGraph+        , Network.AWS.XRay.GetTraceGraph+        , Network.AWS.XRay.GetTraceSummaries+        , Network.AWS.XRay.PutTelemetryRecords+        , Network.AWS.XRay.PutTraceSegments+        , Network.AWS.XRay.Types+        , Network.AWS.XRay.Waiters++    other-modules:+          Network.AWS.XRay.Types.Product+        , Network.AWS.XRay.Types.Sum++    build-depends:+          amazonka-core == 1.4.5.*+        , base          >= 4.7     && < 5++test-suite amazonka-xray-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.XRay+        , Test.AWS.Gen.XRay+        , Test.AWS.XRay.Internal++    build-depends:+          amazonka-core == 1.4.5.*+        , amazonka-test == 1.4.5.*+        , amazonka-xray == 1.4.5.*+        , base+        , bytestring+        , tasty+        , tasty-hunit+        , text+        , time+        , unordered-containers
+ fixture/BatchGetTraces.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/xray/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  xray.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/BatchGetTracesResponse.proto view
+ fixture/GetServiceGraph.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/xray/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  xray.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/GetServiceGraphResponse.proto view
+ fixture/GetTraceGraph.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/xray/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  xray.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/GetTraceGraphResponse.proto view
+ fixture/GetTraceSummaries.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/xray/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  xray.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/GetTraceSummariesResponse.proto view
+ fixture/PutTelemetryRecords.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/xray/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  xray.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/PutTelemetryRecordsResponse.proto view
+ fixture/PutTraceSegments.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/xray/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  xray.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/PutTraceSegmentsResponse.proto view
+ gen/Network/AWS/XRay.hs view
@@ -0,0 +1,256 @@+{-# 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.XRay+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- AWS X-Ray provides APIs for managing debug traces and retrieving service maps and other data created by processing those traces.+--+--+module Network.AWS.XRay+    (+    -- * Service Configuration+      xRay++    -- * Errors+    -- $errors++    -- ** InvalidRequestException+    , _InvalidRequestException++    -- ** ThrottledException+    , _ThrottledException++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** GetServiceGraph+    , module Network.AWS.XRay.GetServiceGraph++    -- ** GetTraceSummaries+    , module Network.AWS.XRay.GetTraceSummaries++    -- ** PutTraceSegments+    , module Network.AWS.XRay.PutTraceSegments++    -- ** BatchGetTraces+    , module Network.AWS.XRay.BatchGetTraces++    -- ** PutTelemetryRecords+    , module Network.AWS.XRay.PutTelemetryRecords++    -- ** GetTraceGraph+    , module Network.AWS.XRay.GetTraceGraph++    -- * Types++    -- ** Alias+    , Alias+    , alias+    , aNames+    , aName+    , aType++    -- ** AnnotationValue+    , AnnotationValue+    , annotationValue+    , avNumberValue+    , avStringValue+    , avBooleanValue++    -- ** BackendConnectionErrors+    , BackendConnectionErrors+    , backendConnectionErrors+    , bceOtherCount+    , bceTimeoutCount+    , bceHTTPCode5XXCount+    , bceConnectionRefusedCount+    , bceHTTPCode4XXCount+    , bceUnknownHostCount++    -- ** Edge+    , Edge+    , edge+    , eStartTime+    , eAliases+    , eResponseTimeHistogram+    , eReferenceId+    , eEndTime+    , eSummaryStatistics++    -- ** EdgeStatistics+    , EdgeStatistics+    , edgeStatistics+    , esFaultStatistics+    , esOKCount+    , esTotalResponseTime+    , esErrorStatistics+    , esTotalCount++    -- ** ErrorStatistics+    , ErrorStatistics+    , errorStatistics+    , eOtherCount+    , eThrottleCount+    , eTotalCount++    -- ** FaultStatistics+    , FaultStatistics+    , faultStatistics+    , fsOtherCount+    , fsTotalCount++    -- ** HTTP+    , HTTP+    , hTTP+    , httpHTTPMethod+    , httpHTTPStatus+    , httpClientIP+    , httpUserAgent+    , httpHTTPURL++    -- ** HistogramEntry+    , HistogramEntry+    , histogramEntry+    , heCount+    , heValue++    -- ** Segment+    , Segment+    , segment+    , sDocument+    , sId++    -- ** ServiceId+    , ServiceId+    , serviceId+    , siAccountId+    , siNames+    , siName+    , siType++    -- ** ServiceInfo+    , ServiceInfo+    , serviceInfo+    , sState+    , sStartTime+    , sRoot+    , sDurationHistogram+    , sReferenceId+    , sAccountId+    , sNames+    , sName+    , sEndTime+    , sType+    , sEdges+    , sSummaryStatistics++    -- ** ServiceStatistics+    , ServiceStatistics+    , serviceStatistics+    , ssFaultStatistics+    , ssOKCount+    , ssTotalResponseTime+    , ssErrorStatistics+    , ssTotalCount++    -- ** TelemetryRecord+    , TelemetryRecord+    , telemetryRecord+    , trSegmentsReceivedCount+    , trSegmentsSentCount+    , trSegmentsSpilloverCount+    , trSegmentsRejectedCount+    , trTimestamp+    , trBackendConnectionErrors++    -- ** Trace+    , Trace+    , trace+    , tId+    , tSegments+    , tDuration++    -- ** TraceSummary+    , TraceSummary+    , traceSummary+    , tsAnnotations+    , tsHasThrottle+    , tsUsers+    , tsHasFault+    , tsServiceIds+    , tsIsPartial+    , tsHasError+    , tsId+    , tsHTTP+    , tsDuration+    , tsResponseTime++    -- ** TraceUser+    , TraceUser+    , traceUser+    , tuServiceIds+    , tuUserName++    -- ** UnprocessedTraceSegment+    , UnprocessedTraceSegment+    , unprocessedTraceSegment+    , utsErrorCode+    , utsId+    , utsMessage++    -- ** ValueWithServiceIds+    , ValueWithServiceIds+    , valueWithServiceIds+    , vwsiServiceIds+    , vwsiAnnotationValue+    ) where++import           Network.AWS.XRay.BatchGetTraces+import           Network.AWS.XRay.GetServiceGraph+import           Network.AWS.XRay.GetTraceGraph+import           Network.AWS.XRay.GetTraceSummaries+import           Network.AWS.XRay.PutTelemetryRecords+import           Network.AWS.XRay.PutTraceSegments+import           Network.AWS.XRay.Types+import           Network.AWS.XRay.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 'XRay'.+-}++{- $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/XRay/BatchGetTraces.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.XRay.BatchGetTraces+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves a list of traces specified by ID. Each trace is a collection of segment documents that originates from a single request. Use @GetTraceSummaries@ to get a list of trace IDs.+--+--+module Network.AWS.XRay.BatchGetTraces+    (+    -- * Creating a Request+      batchGetTraces+    , BatchGetTraces+    -- * Request Lenses+    , bgtNextToken+    , bgtTraceIds++    -- * Destructuring the Response+    , batchGetTracesResponse+    , BatchGetTracesResponse+    -- * Response Lenses+    , bgtrsNextToken+    , bgtrsTraces+    , bgtrsUnprocessedTraceIds+    , bgtrsResponseStatus+    ) where++import           Network.AWS.Lens+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response+import           Network.AWS.XRay.Types+import           Network.AWS.XRay.Types.Product++-- | /See:/ 'batchGetTraces' smart constructor.+data BatchGetTraces = BatchGetTraces'+    { _bgtNextToken :: !(Maybe Text)+    , _bgtTraceIds  :: ![Text]+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'BatchGetTraces' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bgtNextToken' - Pagination token. Not used.+--+-- * 'bgtTraceIds' - Specify the trace IDs of requests for which to retrieve segments.+batchGetTraces+    :: BatchGetTraces+batchGetTraces =+    BatchGetTraces'+    { _bgtNextToken = Nothing+    , _bgtTraceIds = mempty+    }++-- | Pagination token. Not used.+bgtNextToken :: Lens' BatchGetTraces (Maybe Text)+bgtNextToken = lens _bgtNextToken (\ s a -> s{_bgtNextToken = a});++-- | Specify the trace IDs of requests for which to retrieve segments.+bgtTraceIds :: Lens' BatchGetTraces [Text]+bgtTraceIds = lens _bgtTraceIds (\ s a -> s{_bgtTraceIds = a}) . _Coerce;++instance AWSRequest BatchGetTraces where+        type Rs BatchGetTraces = BatchGetTracesResponse+        request = postJSON xRay+        response+          = receiveJSON+              (\ s h x ->+                 BatchGetTracesResponse' <$>+                   (x .?> "NextToken") <*> (x .?> "Traces" .!@ mempty)+                     <*> (x .?> "UnprocessedTraceIds" .!@ mempty)+                     <*> (pure (fromEnum s)))++instance Hashable BatchGetTraces++instance NFData BatchGetTraces++instance ToHeaders BatchGetTraces where+        toHeaders = const mempty++instance ToJSON BatchGetTraces where+        toJSON BatchGetTraces'{..}+          = object+              (catMaybes+                 [("NextToken" .=) <$> _bgtNextToken,+                  Just ("TraceIds" .= _bgtTraceIds)])++instance ToPath BatchGetTraces where+        toPath = const "/Traces"++instance ToQuery BatchGetTraces where+        toQuery = const mempty++-- | /See:/ 'batchGetTracesResponse' smart constructor.+data BatchGetTracesResponse = BatchGetTracesResponse'+    { _bgtrsNextToken           :: !(Maybe Text)+    , _bgtrsTraces              :: !(Maybe [Trace])+    , _bgtrsUnprocessedTraceIds :: !(Maybe [Text])+    , _bgtrsResponseStatus      :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'BatchGetTracesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bgtrsNextToken' - Pagination token. Not used.+--+-- * 'bgtrsTraces' - Full traces for the specified requests.+--+-- * 'bgtrsUnprocessedTraceIds' - Trace IDs of requests that haven't been processed.+--+-- * 'bgtrsResponseStatus' - -- | The response status code.+batchGetTracesResponse+    :: Int -- ^ 'bgtrsResponseStatus'+    -> BatchGetTracesResponse+batchGetTracesResponse pResponseStatus_ =+    BatchGetTracesResponse'+    { _bgtrsNextToken = Nothing+    , _bgtrsTraces = Nothing+    , _bgtrsUnprocessedTraceIds = Nothing+    , _bgtrsResponseStatus = pResponseStatus_+    }++-- | Pagination token. Not used.+bgtrsNextToken :: Lens' BatchGetTracesResponse (Maybe Text)+bgtrsNextToken = lens _bgtrsNextToken (\ s a -> s{_bgtrsNextToken = a});++-- | Full traces for the specified requests.+bgtrsTraces :: Lens' BatchGetTracesResponse [Trace]+bgtrsTraces = lens _bgtrsTraces (\ s a -> s{_bgtrsTraces = a}) . _Default . _Coerce;++-- | Trace IDs of requests that haven't been processed.+bgtrsUnprocessedTraceIds :: Lens' BatchGetTracesResponse [Text]+bgtrsUnprocessedTraceIds = lens _bgtrsUnprocessedTraceIds (\ s a -> s{_bgtrsUnprocessedTraceIds = a}) . _Default . _Coerce;++-- | -- | The response status code.+bgtrsResponseStatus :: Lens' BatchGetTracesResponse Int+bgtrsResponseStatus = lens _bgtrsResponseStatus (\ s a -> s{_bgtrsResponseStatus = a});++instance NFData BatchGetTracesResponse
+ gen/Network/AWS/XRay/GetServiceGraph.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.XRay.GetServiceGraph+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves a document that describes services that process incoming requests, and downstream services that they call as a result. Root services process incoming requests and make calls to downstream services. Root services are applications that use the AWS X-Ray SDK. Downstream services can be other applications, AWS resources, HTTP web APIs, or SQL databases.+--+--+module Network.AWS.XRay.GetServiceGraph+    (+    -- * Creating a Request+      getServiceGraph+    , GetServiceGraph+    -- * Request Lenses+    , gsgNextToken+    , gsgStartTime+    , gsgEndTime++    -- * Destructuring the Response+    , getServiceGraphResponse+    , GetServiceGraphResponse+    -- * Response Lenses+    , gsgrsStartTime+    , gsgrsNextToken+    , gsgrsEndTime+    , gsgrsServices+    , gsgrsResponseStatus+    ) where++import           Network.AWS.Lens+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response+import           Network.AWS.XRay.Types+import           Network.AWS.XRay.Types.Product++-- | /See:/ 'getServiceGraph' smart constructor.+data GetServiceGraph = GetServiceGraph'+    { _gsgNextToken :: !(Maybe Text)+    , _gsgStartTime :: !POSIX+    , _gsgEndTime   :: !POSIX+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetServiceGraph' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gsgNextToken' - Pagination token. Not used.+--+-- * 'gsgStartTime' - The start of the time frame for which to generate a graph.+--+-- * 'gsgEndTime' - The end of the time frame for which to generate a graph.+getServiceGraph+    :: UTCTime -- ^ 'gsgStartTime'+    -> UTCTime -- ^ 'gsgEndTime'+    -> GetServiceGraph+getServiceGraph pStartTime_ pEndTime_ =+    GetServiceGraph'+    { _gsgNextToken = Nothing+    , _gsgStartTime = _Time # pStartTime_+    , _gsgEndTime = _Time # pEndTime_+    }++-- | Pagination token. Not used.+gsgNextToken :: Lens' GetServiceGraph (Maybe Text)+gsgNextToken = lens _gsgNextToken (\ s a -> s{_gsgNextToken = a});++-- | The start of the time frame for which to generate a graph.+gsgStartTime :: Lens' GetServiceGraph UTCTime+gsgStartTime = lens _gsgStartTime (\ s a -> s{_gsgStartTime = a}) . _Time;++-- | The end of the time frame for which to generate a graph.+gsgEndTime :: Lens' GetServiceGraph UTCTime+gsgEndTime = lens _gsgEndTime (\ s a -> s{_gsgEndTime = a}) . _Time;++instance AWSRequest GetServiceGraph where+        type Rs GetServiceGraph = GetServiceGraphResponse+        request = postJSON xRay+        response+          = receiveJSON+              (\ s h x ->+                 GetServiceGraphResponse' <$>+                   (x .?> "StartTime") <*> (x .?> "NextToken") <*>+                     (x .?> "EndTime")+                     <*> (x .?> "Services" .!@ mempty)+                     <*> (pure (fromEnum s)))++instance Hashable GetServiceGraph++instance NFData GetServiceGraph++instance ToHeaders GetServiceGraph where+        toHeaders = const mempty++instance ToJSON GetServiceGraph where+        toJSON GetServiceGraph'{..}+          = object+              (catMaybes+                 [("NextToken" .=) <$> _gsgNextToken,+                  Just ("StartTime" .= _gsgStartTime),+                  Just ("EndTime" .= _gsgEndTime)])++instance ToPath GetServiceGraph where+        toPath = const "/ServiceGraph"++instance ToQuery GetServiceGraph where+        toQuery = const mempty++-- | /See:/ 'getServiceGraphResponse' smart constructor.+data GetServiceGraphResponse = GetServiceGraphResponse'+    { _gsgrsStartTime      :: !(Maybe POSIX)+    , _gsgrsNextToken      :: !(Maybe Text)+    , _gsgrsEndTime        :: !(Maybe POSIX)+    , _gsgrsServices       :: !(Maybe [ServiceInfo])+    , _gsgrsResponseStatus :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetServiceGraphResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gsgrsStartTime' - The start of the time frame for which the graph was generated.+--+-- * 'gsgrsNextToken' - Pagination token. Not used.+--+-- * 'gsgrsEndTime' - The end of the time frame for which the graph was generated.+--+-- * 'gsgrsServices' - The services that have processed a traced request during the specified time frame.+--+-- * 'gsgrsResponseStatus' - -- | The response status code.+getServiceGraphResponse+    :: Int -- ^ 'gsgrsResponseStatus'+    -> GetServiceGraphResponse+getServiceGraphResponse pResponseStatus_ =+    GetServiceGraphResponse'+    { _gsgrsStartTime = Nothing+    , _gsgrsNextToken = Nothing+    , _gsgrsEndTime = Nothing+    , _gsgrsServices = Nothing+    , _gsgrsResponseStatus = pResponseStatus_+    }++-- | The start of the time frame for which the graph was generated.+gsgrsStartTime :: Lens' GetServiceGraphResponse (Maybe UTCTime)+gsgrsStartTime = lens _gsgrsStartTime (\ s a -> s{_gsgrsStartTime = a}) . mapping _Time;++-- | Pagination token. Not used.+gsgrsNextToken :: Lens' GetServiceGraphResponse (Maybe Text)+gsgrsNextToken = lens _gsgrsNextToken (\ s a -> s{_gsgrsNextToken = a});++-- | The end of the time frame for which the graph was generated.+gsgrsEndTime :: Lens' GetServiceGraphResponse (Maybe UTCTime)+gsgrsEndTime = lens _gsgrsEndTime (\ s a -> s{_gsgrsEndTime = a}) . mapping _Time;++-- | The services that have processed a traced request during the specified time frame.+gsgrsServices :: Lens' GetServiceGraphResponse [ServiceInfo]+gsgrsServices = lens _gsgrsServices (\ s a -> s{_gsgrsServices = a}) . _Default . _Coerce;++-- | -- | The response status code.+gsgrsResponseStatus :: Lens' GetServiceGraphResponse Int+gsgrsResponseStatus = lens _gsgrsResponseStatus (\ s a -> s{_gsgrsResponseStatus = a});++instance NFData GetServiceGraphResponse
+ gen/Network/AWS/XRay/GetTraceGraph.hs view
@@ -0,0 +1,146 @@+{-# 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.XRay.GetTraceGraph+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves a service graph for one or more specific trace IDs.+--+--+module Network.AWS.XRay.GetTraceGraph+    (+    -- * Creating a Request+      getTraceGraph+    , GetTraceGraph+    -- * Request Lenses+    , gtgNextToken+    , gtgTraceIds++    -- * Destructuring the Response+    , getTraceGraphResponse+    , GetTraceGraphResponse+    -- * Response Lenses+    , gtgrsNextToken+    , gtgrsServices+    , gtgrsResponseStatus+    ) where++import           Network.AWS.Lens+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response+import           Network.AWS.XRay.Types+import           Network.AWS.XRay.Types.Product++-- | /See:/ 'getTraceGraph' smart constructor.+data GetTraceGraph = GetTraceGraph'+    { _gtgNextToken :: !(Maybe Text)+    , _gtgTraceIds  :: ![Text]+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetTraceGraph' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gtgNextToken' - Pagination token. Not used.+--+-- * 'gtgTraceIds' - Trace IDs of requests for which to generate a service graph.+getTraceGraph+    :: GetTraceGraph+getTraceGraph =+    GetTraceGraph'+    { _gtgNextToken = Nothing+    , _gtgTraceIds = mempty+    }++-- | Pagination token. Not used.+gtgNextToken :: Lens' GetTraceGraph (Maybe Text)+gtgNextToken = lens _gtgNextToken (\ s a -> s{_gtgNextToken = a});++-- | Trace IDs of requests for which to generate a service graph.+gtgTraceIds :: Lens' GetTraceGraph [Text]+gtgTraceIds = lens _gtgTraceIds (\ s a -> s{_gtgTraceIds = a}) . _Coerce;++instance AWSRequest GetTraceGraph where+        type Rs GetTraceGraph = GetTraceGraphResponse+        request = postJSON xRay+        response+          = receiveJSON+              (\ s h x ->+                 GetTraceGraphResponse' <$>+                   (x .?> "NextToken") <*> (x .?> "Services" .!@ mempty)+                     <*> (pure (fromEnum s)))++instance Hashable GetTraceGraph++instance NFData GetTraceGraph++instance ToHeaders GetTraceGraph where+        toHeaders = const mempty++instance ToJSON GetTraceGraph where+        toJSON GetTraceGraph'{..}+          = object+              (catMaybes+                 [("NextToken" .=) <$> _gtgNextToken,+                  Just ("TraceIds" .= _gtgTraceIds)])++instance ToPath GetTraceGraph where+        toPath = const "/TraceGraph"++instance ToQuery GetTraceGraph where+        toQuery = const mempty++-- | /See:/ 'getTraceGraphResponse' smart constructor.+data GetTraceGraphResponse = GetTraceGraphResponse'+    { _gtgrsNextToken      :: !(Maybe Text)+    , _gtgrsServices       :: !(Maybe [ServiceInfo])+    , _gtgrsResponseStatus :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetTraceGraphResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gtgrsNextToken' - Pagination token. Not used.+--+-- * 'gtgrsServices' - The services that have processed one of the specified requests.+--+-- * 'gtgrsResponseStatus' - -- | The response status code.+getTraceGraphResponse+    :: Int -- ^ 'gtgrsResponseStatus'+    -> GetTraceGraphResponse+getTraceGraphResponse pResponseStatus_ =+    GetTraceGraphResponse'+    { _gtgrsNextToken = Nothing+    , _gtgrsServices = Nothing+    , _gtgrsResponseStatus = pResponseStatus_+    }++-- | Pagination token. Not used.+gtgrsNextToken :: Lens' GetTraceGraphResponse (Maybe Text)+gtgrsNextToken = lens _gtgrsNextToken (\ s a -> s{_gtgrsNextToken = a});++-- | The services that have processed one of the specified requests.+gtgrsServices :: Lens' GetTraceGraphResponse [ServiceInfo]+gtgrsServices = lens _gtgrsServices (\ s a -> s{_gtgrsServices = a}) . _Default . _Coerce;++-- | -- | The response status code.+gtgrsResponseStatus :: Lens' GetTraceGraphResponse Int+gtgrsResponseStatus = lens _gtgrsResponseStatus (\ s a -> s{_gtgrsResponseStatus = a});++instance NFData GetTraceGraphResponse
+ gen/Network/AWS/XRay/GetTraceSummaries.hs view
@@ -0,0 +1,199 @@+{-# 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.XRay.GetTraceSummaries+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves IDs and metadata for traces available for a specified time frame using an optional filter. To get the full traces, pass the trace IDs to @BatchGetTraces@ .+--+--+module Network.AWS.XRay.GetTraceSummaries+    (+    -- * Creating a Request+      getTraceSummaries+    , GetTraceSummaries+    -- * Request Lenses+    , gtsFilterExpression+    , gtsNextToken+    , gtsSampling+    , gtsStartTime+    , gtsEndTime++    -- * Destructuring the Response+    , getTraceSummariesResponse+    , GetTraceSummariesResponse+    -- * Response Lenses+    , gtsrsTracesProcessedCount+    , gtsrsNextToken+    , gtsrsApproximateTime+    , gtsrsTraceSummaries+    , gtsrsResponseStatus+    ) where++import           Network.AWS.Lens+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response+import           Network.AWS.XRay.Types+import           Network.AWS.XRay.Types.Product++-- | /See:/ 'getTraceSummaries' smart constructor.+data GetTraceSummaries = GetTraceSummaries'+    { _gtsFilterExpression :: !(Maybe Text)+    , _gtsNextToken        :: !(Maybe Text)+    , _gtsSampling         :: !(Maybe Bool)+    , _gtsStartTime        :: !POSIX+    , _gtsEndTime          :: !POSIX+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetTraceSummaries' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gtsFilterExpression' - Specify a filter expression to retrieve trace summaries for services or requests that meet certain requirements.+--+-- * 'gtsNextToken' - Specify the pagination token returned by a previous request to retrieve the next page of results.+--+-- * 'gtsSampling' - Set to @true@ to get summaries for only a subset of available traces.+--+-- * 'gtsStartTime' - The start of the time frame for which to retrieve traces.+--+-- * 'gtsEndTime' - The end of the time frame for which to retrieve traces.+getTraceSummaries+    :: UTCTime -- ^ 'gtsStartTime'+    -> UTCTime -- ^ 'gtsEndTime'+    -> GetTraceSummaries+getTraceSummaries pStartTime_ pEndTime_ =+    GetTraceSummaries'+    { _gtsFilterExpression = Nothing+    , _gtsNextToken = Nothing+    , _gtsSampling = Nothing+    , _gtsStartTime = _Time # pStartTime_+    , _gtsEndTime = _Time # pEndTime_+    }++-- | Specify a filter expression to retrieve trace summaries for services or requests that meet certain requirements.+gtsFilterExpression :: Lens' GetTraceSummaries (Maybe Text)+gtsFilterExpression = lens _gtsFilterExpression (\ s a -> s{_gtsFilterExpression = a});++-- | Specify the pagination token returned by a previous request to retrieve the next page of results.+gtsNextToken :: Lens' GetTraceSummaries (Maybe Text)+gtsNextToken = lens _gtsNextToken (\ s a -> s{_gtsNextToken = a});++-- | Set to @true@ to get summaries for only a subset of available traces.+gtsSampling :: Lens' GetTraceSummaries (Maybe Bool)+gtsSampling = lens _gtsSampling (\ s a -> s{_gtsSampling = a});++-- | The start of the time frame for which to retrieve traces.+gtsStartTime :: Lens' GetTraceSummaries UTCTime+gtsStartTime = lens _gtsStartTime (\ s a -> s{_gtsStartTime = a}) . _Time;++-- | The end of the time frame for which to retrieve traces.+gtsEndTime :: Lens' GetTraceSummaries UTCTime+gtsEndTime = lens _gtsEndTime (\ s a -> s{_gtsEndTime = a}) . _Time;++instance AWSRequest GetTraceSummaries where+        type Rs GetTraceSummaries = GetTraceSummariesResponse+        request = postJSON xRay+        response+          = receiveJSON+              (\ s h x ->+                 GetTraceSummariesResponse' <$>+                   (x .?> "TracesProcessedCount") <*>+                     (x .?> "NextToken")+                     <*> (x .?> "ApproximateTime")+                     <*> (x .?> "TraceSummaries" .!@ mempty)+                     <*> (pure (fromEnum s)))++instance Hashable GetTraceSummaries++instance NFData GetTraceSummaries++instance ToHeaders GetTraceSummaries where+        toHeaders = const mempty++instance ToJSON GetTraceSummaries where+        toJSON GetTraceSummaries'{..}+          = object+              (catMaybes+                 [("FilterExpression" .=) <$> _gtsFilterExpression,+                  ("NextToken" .=) <$> _gtsNextToken,+                  ("Sampling" .=) <$> _gtsSampling,+                  Just ("StartTime" .= _gtsStartTime),+                  Just ("EndTime" .= _gtsEndTime)])++instance ToPath GetTraceSummaries where+        toPath = const "/TraceSummaries"++instance ToQuery GetTraceSummaries where+        toQuery = const mempty++-- | /See:/ 'getTraceSummariesResponse' smart constructor.+data GetTraceSummariesResponse = GetTraceSummariesResponse'+    { _gtsrsTracesProcessedCount :: !(Maybe Integer)+    , _gtsrsNextToken            :: !(Maybe Text)+    , _gtsrsApproximateTime      :: !(Maybe POSIX)+    , _gtsrsTraceSummaries       :: !(Maybe [TraceSummary])+    , _gtsrsResponseStatus       :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetTraceSummariesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gtsrsTracesProcessedCount' - The number of traces that were processed to get this set of summaries.+--+-- * 'gtsrsNextToken' - If the requested time frame contained more than one page of results, you can use this token to retrieve the next page. The first page contains the most most recent results, closest to the end of the time frame.+--+-- * 'gtsrsApproximateTime' - The start time of this page of results.+--+-- * 'gtsrsTraceSummaries' - Trace IDs and metadata for traces that were found in the specified time frame.+--+-- * 'gtsrsResponseStatus' - -- | The response status code.+getTraceSummariesResponse+    :: Int -- ^ 'gtsrsResponseStatus'+    -> GetTraceSummariesResponse+getTraceSummariesResponse pResponseStatus_ =+    GetTraceSummariesResponse'+    { _gtsrsTracesProcessedCount = Nothing+    , _gtsrsNextToken = Nothing+    , _gtsrsApproximateTime = Nothing+    , _gtsrsTraceSummaries = Nothing+    , _gtsrsResponseStatus = pResponseStatus_+    }++-- | The number of traces that were processed to get this set of summaries.+gtsrsTracesProcessedCount :: Lens' GetTraceSummariesResponse (Maybe Integer)+gtsrsTracesProcessedCount = lens _gtsrsTracesProcessedCount (\ s a -> s{_gtsrsTracesProcessedCount = a});++-- | If the requested time frame contained more than one page of results, you can use this token to retrieve the next page. The first page contains the most most recent results, closest to the end of the time frame.+gtsrsNextToken :: Lens' GetTraceSummariesResponse (Maybe Text)+gtsrsNextToken = lens _gtsrsNextToken (\ s a -> s{_gtsrsNextToken = a});++-- | The start time of this page of results.+gtsrsApproximateTime :: Lens' GetTraceSummariesResponse (Maybe UTCTime)+gtsrsApproximateTime = lens _gtsrsApproximateTime (\ s a -> s{_gtsrsApproximateTime = a}) . mapping _Time;++-- | Trace IDs and metadata for traces that were found in the specified time frame.+gtsrsTraceSummaries :: Lens' GetTraceSummariesResponse [TraceSummary]+gtsrsTraceSummaries = lens _gtsrsTraceSummaries (\ s a -> s{_gtsrsTraceSummaries = a}) . _Default . _Coerce;++-- | -- | The response status code.+gtsrsResponseStatus :: Lens' GetTraceSummariesResponse Int+gtsrsResponseStatus = lens _gtsrsResponseStatus (\ s a -> s{_gtsrsResponseStatus = a});++instance NFData GetTraceSummariesResponse
+ gen/Network/AWS/XRay/PutTelemetryRecords.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.XRay.PutTelemetryRecords+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Used by the AWS X-Ray daemon to upload telemetry.+--+--+module Network.AWS.XRay.PutTelemetryRecords+    (+    -- * Creating a Request+      putTelemetryRecords+    , PutTelemetryRecords+    -- * Request Lenses+    , ptrHostname+    , ptrEC2InstanceId+    , ptrResourceARN+    , ptrTelemetryRecords++    -- * Destructuring the Response+    , putTelemetryRecordsResponse+    , PutTelemetryRecordsResponse+    -- * Response Lenses+    , ptrrsResponseStatus+    ) where++import           Network.AWS.Lens+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response+import           Network.AWS.XRay.Types+import           Network.AWS.XRay.Types.Product++-- | /See:/ 'putTelemetryRecords' smart constructor.+data PutTelemetryRecords = PutTelemetryRecords'+    { _ptrHostname         :: !(Maybe Text)+    , _ptrEC2InstanceId    :: !(Maybe Text)+    , _ptrResourceARN      :: !(Maybe Text)+    , _ptrTelemetryRecords :: ![TelemetryRecord]+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'PutTelemetryRecords' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ptrHostname' -+--+-- * 'ptrEC2InstanceId' -+--+-- * 'ptrResourceARN' -+--+-- * 'ptrTelemetryRecords' -+putTelemetryRecords+    :: PutTelemetryRecords+putTelemetryRecords =+    PutTelemetryRecords'+    { _ptrHostname = Nothing+    , _ptrEC2InstanceId = Nothing+    , _ptrResourceARN = Nothing+    , _ptrTelemetryRecords = mempty+    }++-- |+ptrHostname :: Lens' PutTelemetryRecords (Maybe Text)+ptrHostname = lens _ptrHostname (\ s a -> s{_ptrHostname = a});++-- |+ptrEC2InstanceId :: Lens' PutTelemetryRecords (Maybe Text)+ptrEC2InstanceId = lens _ptrEC2InstanceId (\ s a -> s{_ptrEC2InstanceId = a});++-- |+ptrResourceARN :: Lens' PutTelemetryRecords (Maybe Text)+ptrResourceARN = lens _ptrResourceARN (\ s a -> s{_ptrResourceARN = a});++-- |+ptrTelemetryRecords :: Lens' PutTelemetryRecords [TelemetryRecord]+ptrTelemetryRecords = lens _ptrTelemetryRecords (\ s a -> s{_ptrTelemetryRecords = a}) . _Coerce;++instance AWSRequest PutTelemetryRecords where+        type Rs PutTelemetryRecords =+             PutTelemetryRecordsResponse+        request = postJSON xRay+        response+          = receiveEmpty+              (\ s h x ->+                 PutTelemetryRecordsResponse' <$> (pure (fromEnum s)))++instance Hashable PutTelemetryRecords++instance NFData PutTelemetryRecords++instance ToHeaders PutTelemetryRecords where+        toHeaders = const mempty++instance ToJSON PutTelemetryRecords where+        toJSON PutTelemetryRecords'{..}+          = object+              (catMaybes+                 [("Hostname" .=) <$> _ptrHostname,+                  ("EC2InstanceId" .=) <$> _ptrEC2InstanceId,+                  ("ResourceARN" .=) <$> _ptrResourceARN,+                  Just ("TelemetryRecords" .= _ptrTelemetryRecords)])++instance ToPath PutTelemetryRecords where+        toPath = const "/TelemetryRecords"++instance ToQuery PutTelemetryRecords where+        toQuery = const mempty++-- | /See:/ 'putTelemetryRecordsResponse' smart constructor.+newtype PutTelemetryRecordsResponse = PutTelemetryRecordsResponse'+    { _ptrrsResponseStatus :: Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'PutTelemetryRecordsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ptrrsResponseStatus' - -- | The response status code.+putTelemetryRecordsResponse+    :: Int -- ^ 'ptrrsResponseStatus'+    -> PutTelemetryRecordsResponse+putTelemetryRecordsResponse pResponseStatus_ =+    PutTelemetryRecordsResponse'+    { _ptrrsResponseStatus = pResponseStatus_+    }++-- | -- | The response status code.+ptrrsResponseStatus :: Lens' PutTelemetryRecordsResponse Int+ptrrsResponseStatus = lens _ptrrsResponseStatus (\ s a -> s{_ptrrsResponseStatus = a});++instance NFData PutTelemetryRecordsResponse
+ gen/Network/AWS/XRay/PutTraceSegments.hs view
@@ -0,0 +1,129 @@+{-# 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.XRay.PutTraceSegments+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Uploads segment documents to AWS X-Ray. The X-Ray SDK generates segment documents and sends them to the X-Ray daemon, which uploads them in batches. A segment document can be a completed segment, an in-progress segment, or an array of subsegments.+--+--+module Network.AWS.XRay.PutTraceSegments+    (+    -- * Creating a Request+      putTraceSegments+    , PutTraceSegments+    -- * Request Lenses+    , ptsTraceSegmentDocuments++    -- * Destructuring the Response+    , putTraceSegmentsResponse+    , PutTraceSegmentsResponse+    -- * Response Lenses+    , ptsrsUnprocessedTraceSegments+    , ptsrsResponseStatus+    ) where++import           Network.AWS.Lens+import           Network.AWS.Prelude+import           Network.AWS.Request+import           Network.AWS.Response+import           Network.AWS.XRay.Types+import           Network.AWS.XRay.Types.Product++-- | /See:/ 'putTraceSegments' smart constructor.+newtype PutTraceSegments = PutTraceSegments'+    { _ptsTraceSegmentDocuments :: [Text]+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'PutTraceSegments' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ptsTraceSegmentDocuments' - A JSON document defining one or more segments or subsegments. Segments must include the following fields. __Required Segment Document Fields__      * @name@ - The name of the service that handled the request.     * @id@ - A 64-bit identifier for the segment, unique among segments in the same trace, in 16 hexadecimal digits.     * @trace_id@ - A unique identifier that connects all segments and subsegments originating from a single client request.     * @start_time@ - Time the segment or subsegment was created, in floating point seconds in epoch time, accurate to milliseconds. For example, @1480615200.010@ or @1.480615200010E9@ .     * @end_time@ - Time the segment or subsegment was closed. For example, @1480615200.090@ or @1.480615200090E9@ . Specify either an @end_time@ or @in_progress@ .     * @in_progress@ - Set to @true@ instead of specifying an @end_time@ to record that a segment has been started, but is not complete. Send an in progress segment when your application receives a request that will take a long time to serve, to trace the fact that the request was received. When the response is sent, send the complete segment to overwrite the in-progress segment. A @trace_id@ consists of three numbers separated by hyphens. For example, 1-58406520-a006649127e371903a2de979. This includes: __Trace ID Format__      * The version number, i.e. @1@ .     * The time of the original request, in Unix epoch time, in 8 hexadecimal digits. For example, 10:00AM December 2nd, 2016 PST in epoch time is @1480615200@ seconds, or @58406520@ in hexadecimal.     * A 96-bit identifier for the trace, globally unique, in 24 hexadecimal digits.+putTraceSegments+    :: PutTraceSegments+putTraceSegments =+    PutTraceSegments'+    { _ptsTraceSegmentDocuments = mempty+    }++-- | A JSON document defining one or more segments or subsegments. Segments must include the following fields. __Required Segment Document Fields__      * @name@ - The name of the service that handled the request.     * @id@ - A 64-bit identifier for the segment, unique among segments in the same trace, in 16 hexadecimal digits.     * @trace_id@ - A unique identifier that connects all segments and subsegments originating from a single client request.     * @start_time@ - Time the segment or subsegment was created, in floating point seconds in epoch time, accurate to milliseconds. For example, @1480615200.010@ or @1.480615200010E9@ .     * @end_time@ - Time the segment or subsegment was closed. For example, @1480615200.090@ or @1.480615200090E9@ . Specify either an @end_time@ or @in_progress@ .     * @in_progress@ - Set to @true@ instead of specifying an @end_time@ to record that a segment has been started, but is not complete. Send an in progress segment when your application receives a request that will take a long time to serve, to trace the fact that the request was received. When the response is sent, send the complete segment to overwrite the in-progress segment. A @trace_id@ consists of three numbers separated by hyphens. For example, 1-58406520-a006649127e371903a2de979. This includes: __Trace ID Format__      * The version number, i.e. @1@ .     * The time of the original request, in Unix epoch time, in 8 hexadecimal digits. For example, 10:00AM December 2nd, 2016 PST in epoch time is @1480615200@ seconds, or @58406520@ in hexadecimal.     * A 96-bit identifier for the trace, globally unique, in 24 hexadecimal digits.+ptsTraceSegmentDocuments :: Lens' PutTraceSegments [Text]+ptsTraceSegmentDocuments = lens _ptsTraceSegmentDocuments (\ s a -> s{_ptsTraceSegmentDocuments = a}) . _Coerce;++instance AWSRequest PutTraceSegments where+        type Rs PutTraceSegments = PutTraceSegmentsResponse+        request = postJSON xRay+        response+          = receiveJSON+              (\ s h x ->+                 PutTraceSegmentsResponse' <$>+                   (x .?> "UnprocessedTraceSegments" .!@ mempty) <*>+                     (pure (fromEnum s)))++instance Hashable PutTraceSegments++instance NFData PutTraceSegments++instance ToHeaders PutTraceSegments where+        toHeaders = const mempty++instance ToJSON PutTraceSegments where+        toJSON PutTraceSegments'{..}+          = object+              (catMaybes+                 [Just+                    ("TraceSegmentDocuments" .=+                       _ptsTraceSegmentDocuments)])++instance ToPath PutTraceSegments where+        toPath = const "/TraceSegments"++instance ToQuery PutTraceSegments where+        toQuery = const mempty++-- | /See:/ 'putTraceSegmentsResponse' smart constructor.+data PutTraceSegmentsResponse = PutTraceSegmentsResponse'+    { _ptsrsUnprocessedTraceSegments :: !(Maybe [UnprocessedTraceSegment])+    , _ptsrsResponseStatus           :: !Int+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'PutTraceSegmentsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ptsrsUnprocessedTraceSegments' - Segments that failed processing.+--+-- * 'ptsrsResponseStatus' - -- | The response status code.+putTraceSegmentsResponse+    :: Int -- ^ 'ptsrsResponseStatus'+    -> PutTraceSegmentsResponse+putTraceSegmentsResponse pResponseStatus_ =+    PutTraceSegmentsResponse'+    { _ptsrsUnprocessedTraceSegments = Nothing+    , _ptsrsResponseStatus = pResponseStatus_+    }++-- | Segments that failed processing.+ptsrsUnprocessedTraceSegments :: Lens' PutTraceSegmentsResponse [UnprocessedTraceSegment]+ptsrsUnprocessedTraceSegments = lens _ptsrsUnprocessedTraceSegments (\ s a -> s{_ptsrsUnprocessedTraceSegments = a}) . _Default . _Coerce;++-- | -- | The response status code.+ptsrsResponseStatus :: Lens' PutTraceSegmentsResponse Int+ptsrsResponseStatus = lens _ptsrsResponseStatus (\ s a -> s{_ptsrsResponseStatus = a});++instance NFData PutTraceSegmentsResponse
+ gen/Network/AWS/XRay/Types.hs view
@@ -0,0 +1,235 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Network.AWS.XRay.Types+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.XRay.Types+    (+    -- * Service Configuration+      xRay++    -- * Errors+    , _InvalidRequestException+    , _ThrottledException++    -- * Alias+    , Alias+    , alias+    , aNames+    , aName+    , aType++    -- * AnnotationValue+    , AnnotationValue+    , annotationValue+    , avNumberValue+    , avStringValue+    , avBooleanValue++    -- * BackendConnectionErrors+    , BackendConnectionErrors+    , backendConnectionErrors+    , bceOtherCount+    , bceTimeoutCount+    , bceHTTPCode5XXCount+    , bceConnectionRefusedCount+    , bceHTTPCode4XXCount+    , bceUnknownHostCount++    -- * Edge+    , Edge+    , edge+    , eStartTime+    , eAliases+    , eResponseTimeHistogram+    , eReferenceId+    , eEndTime+    , eSummaryStatistics++    -- * EdgeStatistics+    , EdgeStatistics+    , edgeStatistics+    , esFaultStatistics+    , esOKCount+    , esTotalResponseTime+    , esErrorStatistics+    , esTotalCount++    -- * ErrorStatistics+    , ErrorStatistics+    , errorStatistics+    , eOtherCount+    , eThrottleCount+    , eTotalCount++    -- * FaultStatistics+    , FaultStatistics+    , faultStatistics+    , fsOtherCount+    , fsTotalCount++    -- * HTTP+    , HTTP+    , hTTP+    , httpHTTPMethod+    , httpHTTPStatus+    , httpClientIP+    , httpUserAgent+    , httpHTTPURL++    -- * HistogramEntry+    , HistogramEntry+    , histogramEntry+    , heCount+    , heValue++    -- * Segment+    , Segment+    , segment+    , sDocument+    , sId++    -- * ServiceId+    , ServiceId+    , serviceId+    , siAccountId+    , siNames+    , siName+    , siType++    -- * ServiceInfo+    , ServiceInfo+    , serviceInfo+    , sState+    , sStartTime+    , sRoot+    , sDurationHistogram+    , sReferenceId+    , sAccountId+    , sNames+    , sName+    , sEndTime+    , sType+    , sEdges+    , sSummaryStatistics++    -- * ServiceStatistics+    , ServiceStatistics+    , serviceStatistics+    , ssFaultStatistics+    , ssOKCount+    , ssTotalResponseTime+    , ssErrorStatistics+    , ssTotalCount++    -- * TelemetryRecord+    , TelemetryRecord+    , telemetryRecord+    , trSegmentsReceivedCount+    , trSegmentsSentCount+    , trSegmentsSpilloverCount+    , trSegmentsRejectedCount+    , trTimestamp+    , trBackendConnectionErrors++    -- * Trace+    , Trace+    , trace+    , tId+    , tSegments+    , tDuration++    -- * TraceSummary+    , TraceSummary+    , traceSummary+    , tsAnnotations+    , tsHasThrottle+    , tsUsers+    , tsHasFault+    , tsServiceIds+    , tsIsPartial+    , tsHasError+    , tsId+    , tsHTTP+    , tsDuration+    , tsResponseTime++    -- * TraceUser+    , TraceUser+    , traceUser+    , tuServiceIds+    , tuUserName++    -- * UnprocessedTraceSegment+    , UnprocessedTraceSegment+    , unprocessedTraceSegment+    , utsErrorCode+    , utsId+    , utsMessage++    -- * ValueWithServiceIds+    , ValueWithServiceIds+    , valueWithServiceIds+    , vwsiServiceIds+    , vwsiAnnotationValue+    ) where++import           Network.AWS.Lens+import           Network.AWS.Prelude+import           Network.AWS.Sign.V4+import           Network.AWS.XRay.Types.Product+import           Network.AWS.XRay.Types.Sum++-- | API version @2016-04-12@ of the Amazon X-Ray SDK configuration.+xRay :: Service+xRay =+    Service+    { _svcAbbrev = "XRay"+    , _svcSigner = v4+    , _svcPrefix = "xray"+    , _svcVersion = "2016-04-12"+    , _svcEndpoint = defaultEndpoint xRay+    , _svcTimeout = Just 70+    , _svcCheck = statusSuccess+    , _svcError = parseJSONError "XRay"+    , _svcRetry = retry+    }+  where+    retry =+        Exponential+        { _retryBase = 5.0e-2+        , _retryGrowth = 2+        , _retryAttempts = 5+        , _retryCheck = check+        }+    check e+      | 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 (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 request is missing required parameters or has invalid parameters.+--+--+_InvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidRequestException = _ServiceError . hasCode "InvalidRequestException"++-- | The request exceeds the maximum number of requests per second.+--+--+_ThrottledException :: AsError a => Getting (First ServiceError) a ServiceError+_ThrottledException =+    _ServiceError . hasStatus 429 . hasCode "ThrottledException"
+ gen/Network/AWS/XRay/Types/Product.hs view
@@ -0,0 +1,1288 @@+{-# 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.XRay.Types.Product+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.XRay.Types.Product where++import           Network.AWS.Lens+import           Network.AWS.Prelude+import           Network.AWS.XRay.Types.Sum++-- | An alias for an edge.+--+--+--+-- /See:/ 'alias' smart constructor.+data Alias = Alias'+    { _aNames :: !(Maybe [Text])+    , _aName  :: !(Maybe Text)+    , _aType  :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Alias' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aNames' - A list of names for the alias, including the canonical name.+--+-- * 'aName' - The canonical name of the alias.+--+-- * 'aType' - The type of the alias.+alias+    :: Alias+alias =+    Alias'+    { _aNames = Nothing+    , _aName = Nothing+    , _aType = Nothing+    }++-- | A list of names for the alias, including the canonical name.+aNames :: Lens' Alias [Text]+aNames = lens _aNames (\ s a -> s{_aNames = a}) . _Default . _Coerce;++-- | The canonical name of the alias.+aName :: Lens' Alias (Maybe Text)+aName = lens _aName (\ s a -> s{_aName = a});++-- | The type of the alias.+aType :: Lens' Alias (Maybe Text)+aType = lens _aType (\ s a -> s{_aType = a});++instance FromJSON Alias where+        parseJSON+          = withObject "Alias"+              (\ x ->+                 Alias' <$>+                   (x .:? "Names" .!= mempty) <*> (x .:? "Name") <*>+                     (x .:? "Type"))++instance Hashable Alias++instance NFData Alias++-- | Value of a segment annotation. Has one of three value types: Number, Boolean or String.+--+--+--+-- /See:/ 'annotationValue' smart constructor.+data AnnotationValue = AnnotationValue'+    { _avNumberValue  :: !(Maybe Double)+    , _avStringValue  :: !(Maybe Text)+    , _avBooleanValue :: !(Maybe Bool)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'AnnotationValue' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'avNumberValue' - Value for a Number annotation.+--+-- * 'avStringValue' - Value for a String annotation.+--+-- * 'avBooleanValue' - Value for a Boolean annotation.+annotationValue+    :: AnnotationValue+annotationValue =+    AnnotationValue'+    { _avNumberValue = Nothing+    , _avStringValue = Nothing+    , _avBooleanValue = Nothing+    }++-- | Value for a Number annotation.+avNumberValue :: Lens' AnnotationValue (Maybe Double)+avNumberValue = lens _avNumberValue (\ s a -> s{_avNumberValue = a});++-- | Value for a String annotation.+avStringValue :: Lens' AnnotationValue (Maybe Text)+avStringValue = lens _avStringValue (\ s a -> s{_avStringValue = a});++-- | Value for a Boolean annotation.+avBooleanValue :: Lens' AnnotationValue (Maybe Bool)+avBooleanValue = lens _avBooleanValue (\ s a -> s{_avBooleanValue = a});++instance FromJSON AnnotationValue where+        parseJSON+          = withObject "AnnotationValue"+              (\ x ->+                 AnnotationValue' <$>+                   (x .:? "NumberValue") <*> (x .:? "StringValue") <*>+                     (x .:? "BooleanValue"))++instance Hashable AnnotationValue++instance NFData AnnotationValue++-- |+--+--+--+-- /See:/ 'backendConnectionErrors' smart constructor.+data BackendConnectionErrors = BackendConnectionErrors'+    { _bceOtherCount             :: !(Maybe Int)+    , _bceTimeoutCount           :: !(Maybe Int)+    , _bceHTTPCode5XXCount       :: !(Maybe Int)+    , _bceConnectionRefusedCount :: !(Maybe Int)+    , _bceHTTPCode4XXCount       :: !(Maybe Int)+    , _bceUnknownHostCount       :: !(Maybe Int)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'BackendConnectionErrors' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bceOtherCount' -+--+-- * 'bceTimeoutCount' -+--+-- * 'bceHTTPCode5XXCount' -+--+-- * 'bceConnectionRefusedCount' -+--+-- * 'bceHTTPCode4XXCount' -+--+-- * 'bceUnknownHostCount' -+backendConnectionErrors+    :: BackendConnectionErrors+backendConnectionErrors =+    BackendConnectionErrors'+    { _bceOtherCount = Nothing+    , _bceTimeoutCount = Nothing+    , _bceHTTPCode5XXCount = Nothing+    , _bceConnectionRefusedCount = Nothing+    , _bceHTTPCode4XXCount = Nothing+    , _bceUnknownHostCount = Nothing+    }++-- |+bceOtherCount :: Lens' BackendConnectionErrors (Maybe Int)+bceOtherCount = lens _bceOtherCount (\ s a -> s{_bceOtherCount = a});++-- |+bceTimeoutCount :: Lens' BackendConnectionErrors (Maybe Int)+bceTimeoutCount = lens _bceTimeoutCount (\ s a -> s{_bceTimeoutCount = a});++-- |+bceHTTPCode5XXCount :: Lens' BackendConnectionErrors (Maybe Int)+bceHTTPCode5XXCount = lens _bceHTTPCode5XXCount (\ s a -> s{_bceHTTPCode5XXCount = a});++-- |+bceConnectionRefusedCount :: Lens' BackendConnectionErrors (Maybe Int)+bceConnectionRefusedCount = lens _bceConnectionRefusedCount (\ s a -> s{_bceConnectionRefusedCount = a});++-- |+bceHTTPCode4XXCount :: Lens' BackendConnectionErrors (Maybe Int)+bceHTTPCode4XXCount = lens _bceHTTPCode4XXCount (\ s a -> s{_bceHTTPCode4XXCount = a});++-- |+bceUnknownHostCount :: Lens' BackendConnectionErrors (Maybe Int)+bceUnknownHostCount = lens _bceUnknownHostCount (\ s a -> s{_bceUnknownHostCount = a});++instance Hashable BackendConnectionErrors++instance NFData BackendConnectionErrors++instance ToJSON BackendConnectionErrors where+        toJSON BackendConnectionErrors'{..}+          = object+              (catMaybes+                 [("OtherCount" .=) <$> _bceOtherCount,+                  ("TimeoutCount" .=) <$> _bceTimeoutCount,+                  ("HTTPCode5XXCount" .=) <$> _bceHTTPCode5XXCount,+                  ("ConnectionRefusedCount" .=) <$>+                    _bceConnectionRefusedCount,+                  ("HTTPCode4XXCount" .=) <$> _bceHTTPCode4XXCount,+                  ("UnknownHostCount" .=) <$> _bceUnknownHostCount])++-- | Information about a connection between two services.+--+--+--+-- /See:/ 'edge' smart constructor.+data Edge = Edge'+    { _eStartTime             :: !(Maybe POSIX)+    , _eAliases               :: !(Maybe [Alias])+    , _eResponseTimeHistogram :: !(Maybe [HistogramEntry])+    , _eReferenceId           :: !(Maybe Int)+    , _eEndTime               :: !(Maybe POSIX)+    , _eSummaryStatistics     :: !(Maybe EdgeStatistics)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Edge' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'eStartTime' - The start time of the first segment on the edge.+--+-- * 'eAliases' - Aliases for the edge.+--+-- * 'eResponseTimeHistogram' - Histogram describing the prominence of response times on the edge.+--+-- * 'eReferenceId' - Identifier of the edge. Unique within a service map.+--+-- * 'eEndTime' - The end time of the last segment on the edge.+--+-- * 'eSummaryStatistics' - Response statistics for segments on the edge.+edge+    :: Edge+edge =+    Edge'+    { _eStartTime = Nothing+    , _eAliases = Nothing+    , _eResponseTimeHistogram = Nothing+    , _eReferenceId = Nothing+    , _eEndTime = Nothing+    , _eSummaryStatistics = Nothing+    }++-- | The start time of the first segment on the edge.+eStartTime :: Lens' Edge (Maybe UTCTime)+eStartTime = lens _eStartTime (\ s a -> s{_eStartTime = a}) . mapping _Time;++-- | Aliases for the edge.+eAliases :: Lens' Edge [Alias]+eAliases = lens _eAliases (\ s a -> s{_eAliases = a}) . _Default . _Coerce;++-- | Histogram describing the prominence of response times on the edge.+eResponseTimeHistogram :: Lens' Edge [HistogramEntry]+eResponseTimeHistogram = lens _eResponseTimeHistogram (\ s a -> s{_eResponseTimeHistogram = a}) . _Default . _Coerce;++-- | Identifier of the edge. Unique within a service map.+eReferenceId :: Lens' Edge (Maybe Int)+eReferenceId = lens _eReferenceId (\ s a -> s{_eReferenceId = a});++-- | The end time of the last segment on the edge.+eEndTime :: Lens' Edge (Maybe UTCTime)+eEndTime = lens _eEndTime (\ s a -> s{_eEndTime = a}) . mapping _Time;++-- | Response statistics for segments on the edge.+eSummaryStatistics :: Lens' Edge (Maybe EdgeStatistics)+eSummaryStatistics = lens _eSummaryStatistics (\ s a -> s{_eSummaryStatistics = a});++instance FromJSON Edge where+        parseJSON+          = withObject "Edge"+              (\ x ->+                 Edge' <$>+                   (x .:? "StartTime") <*> (x .:? "Aliases" .!= mempty)+                     <*> (x .:? "ResponseTimeHistogram" .!= mempty)+                     <*> (x .:? "ReferenceId")+                     <*> (x .:? "EndTime")+                     <*> (x .:? "SummaryStatistics"))++instance Hashable Edge++instance NFData Edge++-- | Response statistics for an edge.+--+--+--+-- /See:/ 'edgeStatistics' smart constructor.+data EdgeStatistics = EdgeStatistics'+    { _esFaultStatistics   :: !(Maybe FaultStatistics)+    , _esOKCount           :: !(Maybe Integer)+    , _esTotalResponseTime :: !(Maybe Double)+    , _esErrorStatistics   :: !(Maybe ErrorStatistics)+    , _esTotalCount        :: !(Maybe Integer)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'EdgeStatistics' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'esFaultStatistics' - Information about requests that failed with a 5xx Server Error status code.+--+-- * 'esOKCount' - The number of requests that completed with a 2xx Success status code.+--+-- * 'esTotalResponseTime' - The aggregate response time of completed requests.+--+-- * 'esErrorStatistics' - Information about requests that failed with a 4xx Client Error status code.+--+-- * 'esTotalCount' - The total number of completed requests.+edgeStatistics+    :: EdgeStatistics+edgeStatistics =+    EdgeStatistics'+    { _esFaultStatistics = Nothing+    , _esOKCount = Nothing+    , _esTotalResponseTime = Nothing+    , _esErrorStatistics = Nothing+    , _esTotalCount = Nothing+    }++-- | Information about requests that failed with a 5xx Server Error status code.+esFaultStatistics :: Lens' EdgeStatistics (Maybe FaultStatistics)+esFaultStatistics = lens _esFaultStatistics (\ s a -> s{_esFaultStatistics = a});++-- | The number of requests that completed with a 2xx Success status code.+esOKCount :: Lens' EdgeStatistics (Maybe Integer)+esOKCount = lens _esOKCount (\ s a -> s{_esOKCount = a});++-- | The aggregate response time of completed requests.+esTotalResponseTime :: Lens' EdgeStatistics (Maybe Double)+esTotalResponseTime = lens _esTotalResponseTime (\ s a -> s{_esTotalResponseTime = a});++-- | Information about requests that failed with a 4xx Client Error status code.+esErrorStatistics :: Lens' EdgeStatistics (Maybe ErrorStatistics)+esErrorStatistics = lens _esErrorStatistics (\ s a -> s{_esErrorStatistics = a});++-- | The total number of completed requests.+esTotalCount :: Lens' EdgeStatistics (Maybe Integer)+esTotalCount = lens _esTotalCount (\ s a -> s{_esTotalCount = a});++instance FromJSON EdgeStatistics where+        parseJSON+          = withObject "EdgeStatistics"+              (\ x ->+                 EdgeStatistics' <$>+                   (x .:? "FaultStatistics") <*> (x .:? "OkCount") <*>+                     (x .:? "TotalResponseTime")+                     <*> (x .:? "ErrorStatistics")+                     <*> (x .:? "TotalCount"))++instance Hashable EdgeStatistics++instance NFData EdgeStatistics++-- | Information about requests that failed with a 4xx Client Error status code.+--+--+--+-- /See:/ 'errorStatistics' smart constructor.+data ErrorStatistics = ErrorStatistics'+    { _eOtherCount    :: !(Maybe Integer)+    , _eThrottleCount :: !(Maybe Integer)+    , _eTotalCount    :: !(Maybe Integer)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ErrorStatistics' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'eOtherCount' - The number of requests that failed with untracked 4xx Client Error status codes.+--+-- * 'eThrottleCount' - The number of requests that failed with a 419 throttling status code.+--+-- * 'eTotalCount' - The total number of requests that failed with a 4xx Client Error status code.+errorStatistics+    :: ErrorStatistics+errorStatistics =+    ErrorStatistics'+    { _eOtherCount = Nothing+    , _eThrottleCount = Nothing+    , _eTotalCount = Nothing+    }++-- | The number of requests that failed with untracked 4xx Client Error status codes.+eOtherCount :: Lens' ErrorStatistics (Maybe Integer)+eOtherCount = lens _eOtherCount (\ s a -> s{_eOtherCount = a});++-- | The number of requests that failed with a 419 throttling status code.+eThrottleCount :: Lens' ErrorStatistics (Maybe Integer)+eThrottleCount = lens _eThrottleCount (\ s a -> s{_eThrottleCount = a});++-- | The total number of requests that failed with a 4xx Client Error status code.+eTotalCount :: Lens' ErrorStatistics (Maybe Integer)+eTotalCount = lens _eTotalCount (\ s a -> s{_eTotalCount = a});++instance FromJSON ErrorStatistics where+        parseJSON+          = withObject "ErrorStatistics"+              (\ x ->+                 ErrorStatistics' <$>+                   (x .:? "OtherCount") <*> (x .:? "ThrottleCount") <*>+                     (x .:? "TotalCount"))++instance Hashable ErrorStatistics++instance NFData ErrorStatistics++-- | Information about requests that failed with a 5xx Server Error status code.+--+--+--+-- /See:/ 'faultStatistics' smart constructor.+data FaultStatistics = FaultStatistics'+    { _fsOtherCount :: !(Maybe Integer)+    , _fsTotalCount :: !(Maybe Integer)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'FaultStatistics' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'fsOtherCount' - The number of requests that failed with untracked 5xx Server Error status codes.+--+-- * 'fsTotalCount' - The total number of requests that failed with a 5xx Server Error status code.+faultStatistics+    :: FaultStatistics+faultStatistics =+    FaultStatistics'+    { _fsOtherCount = Nothing+    , _fsTotalCount = Nothing+    }++-- | The number of requests that failed with untracked 5xx Server Error status codes.+fsOtherCount :: Lens' FaultStatistics (Maybe Integer)+fsOtherCount = lens _fsOtherCount (\ s a -> s{_fsOtherCount = a});++-- | The total number of requests that failed with a 5xx Server Error status code.+fsTotalCount :: Lens' FaultStatistics (Maybe Integer)+fsTotalCount = lens _fsTotalCount (\ s a -> s{_fsTotalCount = a});++instance FromJSON FaultStatistics where+        parseJSON+          = withObject "FaultStatistics"+              (\ x ->+                 FaultStatistics' <$>+                   (x .:? "OtherCount") <*> (x .:? "TotalCount"))++instance Hashable FaultStatistics++instance NFData FaultStatistics++-- | Information about an HTTP request.+--+--+--+-- /See:/ 'hTTP' smart constructor.+data HTTP = HTTP'+    { _httpHTTPMethod :: !(Maybe Text)+    , _httpHTTPStatus :: !(Maybe Int)+    , _httpClientIP   :: !(Maybe Text)+    , _httpUserAgent  :: !(Maybe Text)+    , _httpHTTPURL    :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'HTTP' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'httpHTTPMethod' - The request method.+--+-- * 'httpHTTPStatus' - The response status.+--+-- * 'httpClientIP' - The IP address of the requestor.+--+-- * 'httpUserAgent' - The request's user agent string.+--+-- * 'httpHTTPURL' - The request URL.+hTTP+    :: HTTP+hTTP =+    HTTP'+    { _httpHTTPMethod = Nothing+    , _httpHTTPStatus = Nothing+    , _httpClientIP = Nothing+    , _httpUserAgent = Nothing+    , _httpHTTPURL = Nothing+    }++-- | The request method.+httpHTTPMethod :: Lens' HTTP (Maybe Text)+httpHTTPMethod = lens _httpHTTPMethod (\ s a -> s{_httpHTTPMethod = a});++-- | The response status.+httpHTTPStatus :: Lens' HTTP (Maybe Int)+httpHTTPStatus = lens _httpHTTPStatus (\ s a -> s{_httpHTTPStatus = a});++-- | The IP address of the requestor.+httpClientIP :: Lens' HTTP (Maybe Text)+httpClientIP = lens _httpClientIP (\ s a -> s{_httpClientIP = a});++-- | The request's user agent string.+httpUserAgent :: Lens' HTTP (Maybe Text)+httpUserAgent = lens _httpUserAgent (\ s a -> s{_httpUserAgent = a});++-- | The request URL.+httpHTTPURL :: Lens' HTTP (Maybe Text)+httpHTTPURL = lens _httpHTTPURL (\ s a -> s{_httpHTTPURL = a});++instance FromJSON HTTP where+        parseJSON+          = withObject "HTTP"+              (\ x ->+                 HTTP' <$>+                   (x .:? "HttpMethod") <*> (x .:? "HttpStatus") <*>+                     (x .:? "ClientIp")+                     <*> (x .:? "UserAgent")+                     <*> (x .:? "HttpURL"))++instance Hashable HTTP++instance NFData HTTP++-- | An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.+--+--+--+-- /See:/ 'histogramEntry' smart constructor.+data HistogramEntry = HistogramEntry'+    { _heCount :: !(Maybe Int)+    , _heValue :: !(Maybe Double)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'HistogramEntry' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'heCount' - The prevalence of the entry.+--+-- * 'heValue' - The value of the entry.+histogramEntry+    :: HistogramEntry+histogramEntry =+    HistogramEntry'+    { _heCount = Nothing+    , _heValue = Nothing+    }++-- | The prevalence of the entry.+heCount :: Lens' HistogramEntry (Maybe Int)+heCount = lens _heCount (\ s a -> s{_heCount = a});++-- | The value of the entry.+heValue :: Lens' HistogramEntry (Maybe Double)+heValue = lens _heValue (\ s a -> s{_heValue = a});++instance FromJSON HistogramEntry where+        parseJSON+          = withObject "HistogramEntry"+              (\ x ->+                 HistogramEntry' <$>+                   (x .:? "Count") <*> (x .:? "Value"))++instance Hashable HistogramEntry++instance NFData HistogramEntry++-- | Information about a segment+--+--+--+-- /See:/ 'segment' smart constructor.+data Segment = Segment'+    { _sDocument :: !(Maybe Text)+    , _sId       :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Segment' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sDocument' - The segment document.+--+-- * 'sId' - The segment's ID.+segment+    :: Segment+segment =+    Segment'+    { _sDocument = Nothing+    , _sId = Nothing+    }++-- | The segment document.+sDocument :: Lens' Segment (Maybe Text)+sDocument = lens _sDocument (\ s a -> s{_sDocument = a});++-- | The segment's ID.+sId :: Lens' Segment (Maybe Text)+sId = lens _sId (\ s a -> s{_sId = a});++instance FromJSON Segment where+        parseJSON+          = withObject "Segment"+              (\ x ->+                 Segment' <$> (x .:? "Document") <*> (x .:? "Id"))++instance Hashable Segment++instance NFData Segment++-- |+--+--+--+-- /See:/ 'serviceId' smart constructor.+data ServiceId = ServiceId'+    { _siAccountId :: !(Maybe Text)+    , _siNames     :: !(Maybe [Text])+    , _siName      :: !(Maybe Text)+    , _siType      :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ServiceId' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'siAccountId' -+--+-- * 'siNames' -+--+-- * 'siName' -+--+-- * 'siType' -+serviceId+    :: ServiceId+serviceId =+    ServiceId'+    { _siAccountId = Nothing+    , _siNames = Nothing+    , _siName = Nothing+    , _siType = Nothing+    }++-- |+siAccountId :: Lens' ServiceId (Maybe Text)+siAccountId = lens _siAccountId (\ s a -> s{_siAccountId = a});++-- |+siNames :: Lens' ServiceId [Text]+siNames = lens _siNames (\ s a -> s{_siNames = a}) . _Default . _Coerce;++-- |+siName :: Lens' ServiceId (Maybe Text)+siName = lens _siName (\ s a -> s{_siName = a});++-- |+siType :: Lens' ServiceId (Maybe Text)+siType = lens _siType (\ s a -> s{_siType = a});++instance FromJSON ServiceId where+        parseJSON+          = withObject "ServiceId"+              (\ x ->+                 ServiceId' <$>+                   (x .:? "AccountId") <*> (x .:? "Names" .!= mempty)+                     <*> (x .:? "Name")+                     <*> (x .:? "Type"))++instance Hashable ServiceId++instance NFData ServiceId++-- | Information about an application that processed requests, users that made requests, or downstream services, resources and applications that an application used.+--+--+--+-- /See:/ 'serviceInfo' smart constructor.+data ServiceInfo = ServiceInfo'+    { _sState             :: !(Maybe Text)+    , _sStartTime         :: !(Maybe POSIX)+    , _sRoot              :: !(Maybe Bool)+    , _sDurationHistogram :: !(Maybe [HistogramEntry])+    , _sReferenceId       :: !(Maybe Int)+    , _sAccountId         :: !(Maybe Text)+    , _sNames             :: !(Maybe [Text])+    , _sName              :: !(Maybe Text)+    , _sEndTime           :: !(Maybe POSIX)+    , _sType              :: !(Maybe Text)+    , _sEdges             :: !(Maybe [Edge])+    , _sSummaryStatistics :: !(Maybe ServiceStatistics)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ServiceInfo' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sState' - The service's state.+--+-- * 'sStartTime' - The start time of the first segment that the service generated.+--+-- * 'sRoot' - Indicates that the service was the first service to process a request.+--+-- * 'sDurationHistogram' - Histogram mapping the spread of trace durations+--+-- * 'sReferenceId' - Identifier for the service. Unique within the service map.+--+-- * 'sAccountId' - Identifier of the AWS account in which the service runs.+--+-- * 'sNames' - A list of names for the service, including the canonical name.+--+-- * 'sName' - The canonical name of the service.+--+-- * 'sEndTime' - The end time of the last segment that the service generated.+--+-- * 'sType' - The type of service.     * AWS Resource - The type of an AWS resource. For example, @AWS::EC2::Instance@ for a application running on Amazon EC2 or @AWS::DynamoDB::Table@ for an Amazon DynamoDB table that the application used.     * AWS Service - The type of an AWS service. For example, @AWS::DynamoDB@ for downstream calls to Amazon DynamoDB that didn't target a specific table.     * @client@ - Represents the clients that sent requests to a root service.     * @remote@ - A downstream service of indeterminate type.+--+-- * 'sEdges' - Connections to downstream services.+--+-- * 'sSummaryStatistics' - Aggregated statistics for the service.+serviceInfo+    :: ServiceInfo+serviceInfo =+    ServiceInfo'+    { _sState = Nothing+    , _sStartTime = Nothing+    , _sRoot = Nothing+    , _sDurationHistogram = Nothing+    , _sReferenceId = Nothing+    , _sAccountId = Nothing+    , _sNames = Nothing+    , _sName = Nothing+    , _sEndTime = Nothing+    , _sType = Nothing+    , _sEdges = Nothing+    , _sSummaryStatistics = Nothing+    }++-- | The service's state.+sState :: Lens' ServiceInfo (Maybe Text)+sState = lens _sState (\ s a -> s{_sState = a});++-- | The start time of the first segment that the service generated.+sStartTime :: Lens' ServiceInfo (Maybe UTCTime)+sStartTime = lens _sStartTime (\ s a -> s{_sStartTime = a}) . mapping _Time;++-- | Indicates that the service was the first service to process a request.+sRoot :: Lens' ServiceInfo (Maybe Bool)+sRoot = lens _sRoot (\ s a -> s{_sRoot = a});++-- | Histogram mapping the spread of trace durations+sDurationHistogram :: Lens' ServiceInfo [HistogramEntry]+sDurationHistogram = lens _sDurationHistogram (\ s a -> s{_sDurationHistogram = a}) . _Default . _Coerce;++-- | Identifier for the service. Unique within the service map.+sReferenceId :: Lens' ServiceInfo (Maybe Int)+sReferenceId = lens _sReferenceId (\ s a -> s{_sReferenceId = a});++-- | Identifier of the AWS account in which the service runs.+sAccountId :: Lens' ServiceInfo (Maybe Text)+sAccountId = lens _sAccountId (\ s a -> s{_sAccountId = a});++-- | A list of names for the service, including the canonical name.+sNames :: Lens' ServiceInfo [Text]+sNames = lens _sNames (\ s a -> s{_sNames = a}) . _Default . _Coerce;++-- | The canonical name of the service.+sName :: Lens' ServiceInfo (Maybe Text)+sName = lens _sName (\ s a -> s{_sName = a});++-- | The end time of the last segment that the service generated.+sEndTime :: Lens' ServiceInfo (Maybe UTCTime)+sEndTime = lens _sEndTime (\ s a -> s{_sEndTime = a}) . mapping _Time;++-- | The type of service.     * AWS Resource - The type of an AWS resource. For example, @AWS::EC2::Instance@ for a application running on Amazon EC2 or @AWS::DynamoDB::Table@ for an Amazon DynamoDB table that the application used.     * AWS Service - The type of an AWS service. For example, @AWS::DynamoDB@ for downstream calls to Amazon DynamoDB that didn't target a specific table.     * @client@ - Represents the clients that sent requests to a root service.     * @remote@ - A downstream service of indeterminate type.+sType :: Lens' ServiceInfo (Maybe Text)+sType = lens _sType (\ s a -> s{_sType = a});++-- | Connections to downstream services.+sEdges :: Lens' ServiceInfo [Edge]+sEdges = lens _sEdges (\ s a -> s{_sEdges = a}) . _Default . _Coerce;++-- | Aggregated statistics for the service.+sSummaryStatistics :: Lens' ServiceInfo (Maybe ServiceStatistics)+sSummaryStatistics = lens _sSummaryStatistics (\ s a -> s{_sSummaryStatistics = a});++instance FromJSON ServiceInfo where+        parseJSON+          = withObject "ServiceInfo"+              (\ x ->+                 ServiceInfo' <$>+                   (x .:? "State") <*> (x .:? "StartTime") <*>+                     (x .:? "Root")+                     <*> (x .:? "DurationHistogram" .!= mempty)+                     <*> (x .:? "ReferenceId")+                     <*> (x .:? "AccountId")+                     <*> (x .:? "Names" .!= mempty)+                     <*> (x .:? "Name")+                     <*> (x .:? "EndTime")+                     <*> (x .:? "Type")+                     <*> (x .:? "Edges" .!= mempty)+                     <*> (x .:? "SummaryStatistics"))++instance Hashable ServiceInfo++instance NFData ServiceInfo++-- | Response statistics for a service.+--+--+--+-- /See:/ 'serviceStatistics' smart constructor.+data ServiceStatistics = ServiceStatistics'+    { _ssFaultStatistics   :: !(Maybe FaultStatistics)+    , _ssOKCount           :: !(Maybe Integer)+    , _ssTotalResponseTime :: !(Maybe Double)+    , _ssErrorStatistics   :: !(Maybe ErrorStatistics)+    , _ssTotalCount        :: !(Maybe Integer)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ServiceStatistics' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ssFaultStatistics' - Information about requests that failed with a 5xx Server Error status code.+--+-- * 'ssOKCount' - The number of requests that completed with a 2xx Success status code.+--+-- * 'ssTotalResponseTime' - The aggregate response time of completed requests.+--+-- * 'ssErrorStatistics' - Information about requests that failed with a 4xx Client Error status code.+--+-- * 'ssTotalCount' - The total number of completed requests.+serviceStatistics+    :: ServiceStatistics+serviceStatistics =+    ServiceStatistics'+    { _ssFaultStatistics = Nothing+    , _ssOKCount = Nothing+    , _ssTotalResponseTime = Nothing+    , _ssErrorStatistics = Nothing+    , _ssTotalCount = Nothing+    }++-- | Information about requests that failed with a 5xx Server Error status code.+ssFaultStatistics :: Lens' ServiceStatistics (Maybe FaultStatistics)+ssFaultStatistics = lens _ssFaultStatistics (\ s a -> s{_ssFaultStatistics = a});++-- | The number of requests that completed with a 2xx Success status code.+ssOKCount :: Lens' ServiceStatistics (Maybe Integer)+ssOKCount = lens _ssOKCount (\ s a -> s{_ssOKCount = a});++-- | The aggregate response time of completed requests.+ssTotalResponseTime :: Lens' ServiceStatistics (Maybe Double)+ssTotalResponseTime = lens _ssTotalResponseTime (\ s a -> s{_ssTotalResponseTime = a});++-- | Information about requests that failed with a 4xx Client Error status code.+ssErrorStatistics :: Lens' ServiceStatistics (Maybe ErrorStatistics)+ssErrorStatistics = lens _ssErrorStatistics (\ s a -> s{_ssErrorStatistics = a});++-- | The total number of completed requests.+ssTotalCount :: Lens' ServiceStatistics (Maybe Integer)+ssTotalCount = lens _ssTotalCount (\ s a -> s{_ssTotalCount = a});++instance FromJSON ServiceStatistics where+        parseJSON+          = withObject "ServiceStatistics"+              (\ x ->+                 ServiceStatistics' <$>+                   (x .:? "FaultStatistics") <*> (x .:? "OkCount") <*>+                     (x .:? "TotalResponseTime")+                     <*> (x .:? "ErrorStatistics")+                     <*> (x .:? "TotalCount"))++instance Hashable ServiceStatistics++instance NFData ServiceStatistics++-- |+--+--+--+-- /See:/ 'telemetryRecord' smart constructor.+data TelemetryRecord = TelemetryRecord'+    { _trSegmentsReceivedCount   :: !(Maybe Int)+    , _trSegmentsSentCount       :: !(Maybe Int)+    , _trSegmentsSpilloverCount  :: !(Maybe Int)+    , _trSegmentsRejectedCount   :: !(Maybe Int)+    , _trTimestamp               :: !(Maybe POSIX)+    , _trBackendConnectionErrors :: !(Maybe BackendConnectionErrors)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'TelemetryRecord' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'trSegmentsReceivedCount' -+--+-- * 'trSegmentsSentCount' -+--+-- * 'trSegmentsSpilloverCount' -+--+-- * 'trSegmentsRejectedCount' -+--+-- * 'trTimestamp' -+--+-- * 'trBackendConnectionErrors' -+telemetryRecord+    :: TelemetryRecord+telemetryRecord =+    TelemetryRecord'+    { _trSegmentsReceivedCount = Nothing+    , _trSegmentsSentCount = Nothing+    , _trSegmentsSpilloverCount = Nothing+    , _trSegmentsRejectedCount = Nothing+    , _trTimestamp = Nothing+    , _trBackendConnectionErrors = Nothing+    }++-- |+trSegmentsReceivedCount :: Lens' TelemetryRecord (Maybe Int)+trSegmentsReceivedCount = lens _trSegmentsReceivedCount (\ s a -> s{_trSegmentsReceivedCount = a});++-- |+trSegmentsSentCount :: Lens' TelemetryRecord (Maybe Int)+trSegmentsSentCount = lens _trSegmentsSentCount (\ s a -> s{_trSegmentsSentCount = a});++-- |+trSegmentsSpilloverCount :: Lens' TelemetryRecord (Maybe Int)+trSegmentsSpilloverCount = lens _trSegmentsSpilloverCount (\ s a -> s{_trSegmentsSpilloverCount = a});++-- |+trSegmentsRejectedCount :: Lens' TelemetryRecord (Maybe Int)+trSegmentsRejectedCount = lens _trSegmentsRejectedCount (\ s a -> s{_trSegmentsRejectedCount = a});++-- |+trTimestamp :: Lens' TelemetryRecord (Maybe UTCTime)+trTimestamp = lens _trTimestamp (\ s a -> s{_trTimestamp = a}) . mapping _Time;++-- |+trBackendConnectionErrors :: Lens' TelemetryRecord (Maybe BackendConnectionErrors)+trBackendConnectionErrors = lens _trBackendConnectionErrors (\ s a -> s{_trBackendConnectionErrors = a});++instance Hashable TelemetryRecord++instance NFData TelemetryRecord++instance ToJSON TelemetryRecord where+        toJSON TelemetryRecord'{..}+          = object+              (catMaybes+                 [("SegmentsReceivedCount" .=) <$>+                    _trSegmentsReceivedCount,+                  ("SegmentsSentCount" .=) <$> _trSegmentsSentCount,+                  ("SegmentsSpilloverCount" .=) <$>+                    _trSegmentsSpilloverCount,+                  ("SegmentsRejectedCount" .=) <$>+                    _trSegmentsRejectedCount,+                  ("Timestamp" .=) <$> _trTimestamp,+                  ("BackendConnectionErrors" .=) <$>+                    _trBackendConnectionErrors])++-- | A collection of segment documents with matching trace IDs.+--+--+--+-- /See:/ 'trace' smart constructor.+data Trace = Trace'+    { _tId       :: !(Maybe Text)+    , _tSegments :: !(Maybe [Segment])+    , _tDuration :: !(Maybe Double)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Trace' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tId' - The unique identifier for the request that generated the trace's segments and subsegments.+--+-- * 'tSegments' - Segment documents for the segments and subsegments that comprise the trace.+--+-- * 'tDuration' - The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.+trace+    :: Trace+trace =+    Trace'+    { _tId = Nothing+    , _tSegments = Nothing+    , _tDuration = Nothing+    }++-- | The unique identifier for the request that generated the trace's segments and subsegments.+tId :: Lens' Trace (Maybe Text)+tId = lens _tId (\ s a -> s{_tId = a});++-- | Segment documents for the segments and subsegments that comprise the trace.+tSegments :: Lens' Trace [Segment]+tSegments = lens _tSegments (\ s a -> s{_tSegments = a}) . _Default . _Coerce;++-- | The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.+tDuration :: Lens' Trace (Maybe Double)+tDuration = lens _tDuration (\ s a -> s{_tDuration = a});++instance FromJSON Trace where+        parseJSON+          = withObject "Trace"+              (\ x ->+                 Trace' <$>+                   (x .:? "Id") <*> (x .:? "Segments" .!= mempty) <*>+                     (x .:? "Duration"))++instance Hashable Trace++instance NFData Trace++-- | Metadata generated from the segment documents in a trace.+--+--+--+-- /See:/ 'traceSummary' smart constructor.+data TraceSummary = TraceSummary'+    { _tsAnnotations  :: !(Maybe (Map Text [ValueWithServiceIds]))+    , _tsHasThrottle  :: !(Maybe Bool)+    , _tsUsers        :: !(Maybe [TraceUser])+    , _tsHasFault     :: !(Maybe Bool)+    , _tsServiceIds   :: !(Maybe [ServiceId])+    , _tsIsPartial    :: !(Maybe Bool)+    , _tsHasError     :: !(Maybe Bool)+    , _tsId           :: !(Maybe Text)+    , _tsHTTP         :: !(Maybe HTTP)+    , _tsDuration     :: !(Maybe Double)+    , _tsResponseTime :: !(Maybe Double)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'TraceSummary' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tsAnnotations' - Annotations from the trace's segment documents.+--+-- * 'tsHasThrottle' - One or more of the segment documents has a 429 throttling error.+--+-- * 'tsUsers' - Users from the trace's segment documents.+--+-- * 'tsHasFault' - One or more of the segment documents has a 500 series error.+--+-- * 'tsServiceIds' - Service IDs from the trace's segment documents.+--+-- * 'tsIsPartial' - One or more of the segment documents is in progress.+--+-- * 'tsHasError' - One or more of the segment documents has a 400 series error.+--+-- * 'tsId' - The unique identifier for the request that generated the trace's segments and subsegments.+--+-- * 'tsHTTP' - Information about the HTTP request served by the trace.+--+-- * 'tsDuration' - The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.+--+-- * 'tsResponseTime' - The length of time in seconds between the start and end times of the root segment. If the service performs work asynchronously, the response time measures the time before the response is sent to the user, while the duration measures the amount of time before the last traced activity completes.+traceSummary+    :: TraceSummary+traceSummary =+    TraceSummary'+    { _tsAnnotations = Nothing+    , _tsHasThrottle = Nothing+    , _tsUsers = Nothing+    , _tsHasFault = Nothing+    , _tsServiceIds = Nothing+    , _tsIsPartial = Nothing+    , _tsHasError = Nothing+    , _tsId = Nothing+    , _tsHTTP = Nothing+    , _tsDuration = Nothing+    , _tsResponseTime = Nothing+    }++-- | Annotations from the trace's segment documents.+tsAnnotations :: Lens' TraceSummary (HashMap Text [ValueWithServiceIds])+tsAnnotations = lens _tsAnnotations (\ s a -> s{_tsAnnotations = a}) . _Default . _Map;++-- | One or more of the segment documents has a 429 throttling error.+tsHasThrottle :: Lens' TraceSummary (Maybe Bool)+tsHasThrottle = lens _tsHasThrottle (\ s a -> s{_tsHasThrottle = a});++-- | Users from the trace's segment documents.+tsUsers :: Lens' TraceSummary [TraceUser]+tsUsers = lens _tsUsers (\ s a -> s{_tsUsers = a}) . _Default . _Coerce;++-- | One or more of the segment documents has a 500 series error.+tsHasFault :: Lens' TraceSummary (Maybe Bool)+tsHasFault = lens _tsHasFault (\ s a -> s{_tsHasFault = a});++-- | Service IDs from the trace's segment documents.+tsServiceIds :: Lens' TraceSummary [ServiceId]+tsServiceIds = lens _tsServiceIds (\ s a -> s{_tsServiceIds = a}) . _Default . _Coerce;++-- | One or more of the segment documents is in progress.+tsIsPartial :: Lens' TraceSummary (Maybe Bool)+tsIsPartial = lens _tsIsPartial (\ s a -> s{_tsIsPartial = a});++-- | One or more of the segment documents has a 400 series error.+tsHasError :: Lens' TraceSummary (Maybe Bool)+tsHasError = lens _tsHasError (\ s a -> s{_tsHasError = a});++-- | The unique identifier for the request that generated the trace's segments and subsegments.+tsId :: Lens' TraceSummary (Maybe Text)+tsId = lens _tsId (\ s a -> s{_tsId = a});++-- | Information about the HTTP request served by the trace.+tsHTTP :: Lens' TraceSummary (Maybe HTTP)+tsHTTP = lens _tsHTTP (\ s a -> s{_tsHTTP = a});++-- | The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.+tsDuration :: Lens' TraceSummary (Maybe Double)+tsDuration = lens _tsDuration (\ s a -> s{_tsDuration = a});++-- | The length of time in seconds between the start and end times of the root segment. If the service performs work asynchronously, the response time measures the time before the response is sent to the user, while the duration measures the amount of time before the last traced activity completes.+tsResponseTime :: Lens' TraceSummary (Maybe Double)+tsResponseTime = lens _tsResponseTime (\ s a -> s{_tsResponseTime = a});++instance FromJSON TraceSummary where+        parseJSON+          = withObject "TraceSummary"+              (\ x ->+                 TraceSummary' <$>+                   (x .:? "Annotations" .!= mempty) <*>+                     (x .:? "HasThrottle")+                     <*> (x .:? "Users" .!= mempty)+                     <*> (x .:? "HasFault")+                     <*> (x .:? "ServiceIds" .!= mempty)+                     <*> (x .:? "IsPartial")+                     <*> (x .:? "HasError")+                     <*> (x .:? "Id")+                     <*> (x .:? "Http")+                     <*> (x .:? "Duration")+                     <*> (x .:? "ResponseTime"))++instance Hashable TraceSummary++instance NFData TraceSummary++-- | Information about a user recorded in segment documents.+--+--+--+-- /See:/ 'traceUser' smart constructor.+data TraceUser = TraceUser'+    { _tuServiceIds :: !(Maybe [ServiceId])+    , _tuUserName   :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'TraceUser' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tuServiceIds' - Services that the user's request hit.+--+-- * 'tuUserName' - The user's name.+traceUser+    :: TraceUser+traceUser =+    TraceUser'+    { _tuServiceIds = Nothing+    , _tuUserName = Nothing+    }++-- | Services that the user's request hit.+tuServiceIds :: Lens' TraceUser [ServiceId]+tuServiceIds = lens _tuServiceIds (\ s a -> s{_tuServiceIds = a}) . _Default . _Coerce;++-- | The user's name.+tuUserName :: Lens' TraceUser (Maybe Text)+tuUserName = lens _tuUserName (\ s a -> s{_tuUserName = a});++instance FromJSON TraceUser where+        parseJSON+          = withObject "TraceUser"+              (\ x ->+                 TraceUser' <$>+                   (x .:? "ServiceIds" .!= mempty) <*>+                     (x .:? "UserName"))++instance Hashable TraceUser++instance NFData TraceUser++-- | Information about a segment that failed processing.+--+--+--+-- /See:/ 'unprocessedTraceSegment' smart constructor.+data UnprocessedTraceSegment = UnprocessedTraceSegment'+    { _utsErrorCode :: !(Maybe Text)+    , _utsId        :: !(Maybe Text)+    , _utsMessage   :: !(Maybe Text)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UnprocessedTraceSegment' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'utsErrorCode' - The error that caused processing to fail.+--+-- * 'utsId' - The segment's ID.+--+-- * 'utsMessage' - The error message.+unprocessedTraceSegment+    :: UnprocessedTraceSegment+unprocessedTraceSegment =+    UnprocessedTraceSegment'+    { _utsErrorCode = Nothing+    , _utsId = Nothing+    , _utsMessage = Nothing+    }++-- | The error that caused processing to fail.+utsErrorCode :: Lens' UnprocessedTraceSegment (Maybe Text)+utsErrorCode = lens _utsErrorCode (\ s a -> s{_utsErrorCode = a});++-- | The segment's ID.+utsId :: Lens' UnprocessedTraceSegment (Maybe Text)+utsId = lens _utsId (\ s a -> s{_utsId = a});++-- | The error message.+utsMessage :: Lens' UnprocessedTraceSegment (Maybe Text)+utsMessage = lens _utsMessage (\ s a -> s{_utsMessage = a});++instance FromJSON UnprocessedTraceSegment where+        parseJSON+          = withObject "UnprocessedTraceSegment"+              (\ x ->+                 UnprocessedTraceSegment' <$>+                   (x .:? "ErrorCode") <*> (x .:? "Id") <*>+                     (x .:? "Message"))++instance Hashable UnprocessedTraceSegment++instance NFData UnprocessedTraceSegment++-- | Information about a segment annotation.+--+--+--+-- /See:/ 'valueWithServiceIds' smart constructor.+data ValueWithServiceIds = ValueWithServiceIds'+    { _vwsiServiceIds      :: !(Maybe [ServiceId])+    , _vwsiAnnotationValue :: !(Maybe AnnotationValue)+    } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ValueWithServiceIds' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'vwsiServiceIds' - Services to which the annotation applies.+--+-- * 'vwsiAnnotationValue' - Values of the annotation.+valueWithServiceIds+    :: ValueWithServiceIds+valueWithServiceIds =+    ValueWithServiceIds'+    { _vwsiServiceIds = Nothing+    , _vwsiAnnotationValue = Nothing+    }++-- | Services to which the annotation applies.+vwsiServiceIds :: Lens' ValueWithServiceIds [ServiceId]+vwsiServiceIds = lens _vwsiServiceIds (\ s a -> s{_vwsiServiceIds = a}) . _Default . _Coerce;++-- | Values of the annotation.+vwsiAnnotationValue :: Lens' ValueWithServiceIds (Maybe AnnotationValue)+vwsiAnnotationValue = lens _vwsiAnnotationValue (\ s a -> s{_vwsiAnnotationValue = a});++instance FromJSON ValueWithServiceIds where+        parseJSON+          = withObject "ValueWithServiceIds"+              (\ x ->+                 ValueWithServiceIds' <$>+                   (x .:? "ServiceIds" .!= mempty) <*>+                     (x .:? "AnnotationValue"))++instance Hashable ValueWithServiceIds++instance NFData ValueWithServiceIds
+ gen/Network/AWS/XRay/Types/Sum.hs view
@@ -0,0 +1,20 @@+{-# 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.XRay.Types.Sum+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.XRay.Types.Sum where++import           Network.AWS.Prelude
+ gen/Network/AWS/XRay/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.XRay.Waiters+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.XRay.Waiters where++import           Network.AWS.Lens+import           Network.AWS.Prelude+import           Network.AWS.Waiter+import           Network.AWS.XRay.Types
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Main+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.XRay+import Test.AWS.XRay.Internal++main :: IO ()+main = defaultMain $ testGroup "XRay"+    [ testGroup "tests"    tests+    , testGroup "fixtures" fixtures+    ]
+ test/Test/AWS/Gen/XRay.hs view
@@ -0,0 +1,147 @@+{-# 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.XRay+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.XRay where++import Data.Proxy+import Test.AWS.Fixture+import Test.AWS.Prelude+import Test.Tasty+import Network.AWS.XRay+import Test.AWS.XRay.Internal++-- 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"+--         [ requestGetServiceGraph $+--             getServiceGraph+--+--         , requestGetTraceSummaries $+--             getTraceSummaries+--+--         , requestPutTraceSegments $+--             putTraceSegments+--+--         , requestBatchGetTraces $+--             batchGetTraces+--+--         , requestPutTelemetryRecords $+--             putTelemetryRecords+--+--         , requestGetTraceGraph $+--             getTraceGraph+--+--           ]++--     , testGroup "response"+--         [ responseGetServiceGraph $+--             getServiceGraphResponse+--+--         , responseGetTraceSummaries $+--             getTraceSummariesResponse+--+--         , responsePutTraceSegments $+--             putTraceSegmentsResponse+--+--         , responseBatchGetTraces $+--             batchGetTracesResponse+--+--         , responsePutTelemetryRecords $+--             putTelemetryRecordsResponse+--+--         , responseGetTraceGraph $+--             getTraceGraphResponse+--+--           ]+--     ]++-- Requests++requestGetServiceGraph :: GetServiceGraph -> TestTree+requestGetServiceGraph = req+    "GetServiceGraph"+    "fixture/GetServiceGraph.yaml"++requestGetTraceSummaries :: GetTraceSummaries -> TestTree+requestGetTraceSummaries = req+    "GetTraceSummaries"+    "fixture/GetTraceSummaries.yaml"++requestPutTraceSegments :: PutTraceSegments -> TestTree+requestPutTraceSegments = req+    "PutTraceSegments"+    "fixture/PutTraceSegments.yaml"++requestBatchGetTraces :: BatchGetTraces -> TestTree+requestBatchGetTraces = req+    "BatchGetTraces"+    "fixture/BatchGetTraces.yaml"++requestPutTelemetryRecords :: PutTelemetryRecords -> TestTree+requestPutTelemetryRecords = req+    "PutTelemetryRecords"+    "fixture/PutTelemetryRecords.yaml"++requestGetTraceGraph :: GetTraceGraph -> TestTree+requestGetTraceGraph = req+    "GetTraceGraph"+    "fixture/GetTraceGraph.yaml"++-- Responses++responseGetServiceGraph :: GetServiceGraphResponse -> TestTree+responseGetServiceGraph = res+    "GetServiceGraphResponse"+    "fixture/GetServiceGraphResponse.proto"+    xRay+    (Proxy :: Proxy GetServiceGraph)++responseGetTraceSummaries :: GetTraceSummariesResponse -> TestTree+responseGetTraceSummaries = res+    "GetTraceSummariesResponse"+    "fixture/GetTraceSummariesResponse.proto"+    xRay+    (Proxy :: Proxy GetTraceSummaries)++responsePutTraceSegments :: PutTraceSegmentsResponse -> TestTree+responsePutTraceSegments = res+    "PutTraceSegmentsResponse"+    "fixture/PutTraceSegmentsResponse.proto"+    xRay+    (Proxy :: Proxy PutTraceSegments)++responseBatchGetTraces :: BatchGetTracesResponse -> TestTree+responseBatchGetTraces = res+    "BatchGetTracesResponse"+    "fixture/BatchGetTracesResponse.proto"+    xRay+    (Proxy :: Proxy BatchGetTraces)++responsePutTelemetryRecords :: PutTelemetryRecordsResponse -> TestTree+responsePutTelemetryRecords = res+    "PutTelemetryRecordsResponse"+    "fixture/PutTelemetryRecordsResponse.proto"+    xRay+    (Proxy :: Proxy PutTelemetryRecords)++responseGetTraceGraph :: GetTraceGraphResponse -> TestTree+responseGetTraceGraph = res+    "GetTraceGraphResponse"+    "fixture/GetTraceGraphResponse.proto"+    xRay+    (Proxy :: Proxy GetTraceGraph)
+ test/Test/AWS/XRay.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.AWS.XRay+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.XRay+    ( tests+    , fixtures+    ) where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/XRay/Internal.hs view
@@ -0,0 +1,9 @@+-- |+-- Module      : Test.AWS.XRay.Internal+-- Copyright   : (c) 2013-2016 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.XRay.Internal where