{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.LookoutMetrics.GetFeedback
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Get feedback for an anomaly group.
module Amazonka.LookoutMetrics.GetFeedback
  ( -- * Creating a Request
    GetFeedback (..),
    newGetFeedback,

    -- * Request Lenses
    getFeedback_nextToken,
    getFeedback_maxResults,
    getFeedback_anomalyDetectorArn,
    getFeedback_anomalyGroupTimeSeriesFeedback,

    -- * Destructuring the Response
    GetFeedbackResponse (..),
    newGetFeedbackResponse,

    -- * Response Lenses
    getFeedbackResponse_anomalyGroupTimeSeriesFeedback,
    getFeedbackResponse_nextToken,
    getFeedbackResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LookoutMetrics.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetFeedback' smart constructor.
data GetFeedback = GetFeedback'
  { -- | Specify the pagination token that\'s returned by a previous request to
    -- retrieve the next page of results.
    GetFeedback -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return.
    GetFeedback -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Name (ARN) of the anomaly detector.
    GetFeedback -> Text
anomalyDetectorArn :: Prelude.Text,
    -- | The anomalous metric and group ID.
    GetFeedback -> AnomalyGroupTimeSeries
anomalyGroupTimeSeriesFeedback :: AnomalyGroupTimeSeries
  }
  deriving (GetFeedback -> GetFeedback -> Bool
(GetFeedback -> GetFeedback -> Bool)
-> (GetFeedback -> GetFeedback -> Bool) -> Eq GetFeedback
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFeedback -> GetFeedback -> Bool
$c/= :: GetFeedback -> GetFeedback -> Bool
== :: GetFeedback -> GetFeedback -> Bool
$c== :: GetFeedback -> GetFeedback -> Bool
Prelude.Eq, ReadPrec [GetFeedback]
ReadPrec GetFeedback
Int -> ReadS GetFeedback
ReadS [GetFeedback]
(Int -> ReadS GetFeedback)
-> ReadS [GetFeedback]
-> ReadPrec GetFeedback
-> ReadPrec [GetFeedback]
-> Read GetFeedback
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFeedback]
$creadListPrec :: ReadPrec [GetFeedback]
readPrec :: ReadPrec GetFeedback
$creadPrec :: ReadPrec GetFeedback
readList :: ReadS [GetFeedback]
$creadList :: ReadS [GetFeedback]
readsPrec :: Int -> ReadS GetFeedback
$creadsPrec :: Int -> ReadS GetFeedback
Prelude.Read, Int -> GetFeedback -> ShowS
[GetFeedback] -> ShowS
GetFeedback -> String
(Int -> GetFeedback -> ShowS)
-> (GetFeedback -> String)
-> ([GetFeedback] -> ShowS)
-> Show GetFeedback
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFeedback] -> ShowS
$cshowList :: [GetFeedback] -> ShowS
show :: GetFeedback -> String
$cshow :: GetFeedback -> String
showsPrec :: Int -> GetFeedback -> ShowS
$cshowsPrec :: Int -> GetFeedback -> ShowS
Prelude.Show, (forall x. GetFeedback -> Rep GetFeedback x)
-> (forall x. Rep GetFeedback x -> GetFeedback)
-> Generic GetFeedback
forall x. Rep GetFeedback x -> GetFeedback
forall x. GetFeedback -> Rep GetFeedback x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetFeedback x -> GetFeedback
$cfrom :: forall x. GetFeedback -> Rep GetFeedback x
Prelude.Generic)

-- |
-- Create a value of 'GetFeedback' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'getFeedback_nextToken' - Specify the pagination token that\'s returned by a previous request to
-- retrieve the next page of results.
--
-- 'maxResults', 'getFeedback_maxResults' - The maximum number of results to return.
--
-- 'anomalyDetectorArn', 'getFeedback_anomalyDetectorArn' - The Amazon Resource Name (ARN) of the anomaly detector.
--
-- 'anomalyGroupTimeSeriesFeedback', 'getFeedback_anomalyGroupTimeSeriesFeedback' - The anomalous metric and group ID.
newGetFeedback ::
  -- | 'anomalyDetectorArn'
  Prelude.Text ->
  -- | 'anomalyGroupTimeSeriesFeedback'
  AnomalyGroupTimeSeries ->
  GetFeedback
newGetFeedback :: Text -> AnomalyGroupTimeSeries -> GetFeedback
newGetFeedback
  Text
pAnomalyDetectorArn_
  AnomalyGroupTimeSeries
pAnomalyGroupTimeSeriesFeedback_ =
    GetFeedback' :: Maybe Text
-> Maybe Natural -> Text -> AnomalyGroupTimeSeries -> GetFeedback
GetFeedback'
      { $sel:nextToken:GetFeedback' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxResults:GetFeedback' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:anomalyDetectorArn:GetFeedback' :: Text
anomalyDetectorArn = Text
pAnomalyDetectorArn_,
        $sel:anomalyGroupTimeSeriesFeedback:GetFeedback' :: AnomalyGroupTimeSeries
anomalyGroupTimeSeriesFeedback =
          AnomalyGroupTimeSeries
pAnomalyGroupTimeSeriesFeedback_
      }

-- | Specify the pagination token that\'s returned by a previous request to
-- retrieve the next page of results.
getFeedback_nextToken :: Lens.Lens' GetFeedback (Prelude.Maybe Prelude.Text)
getFeedback_nextToken :: (Maybe Text -> f (Maybe Text)) -> GetFeedback -> f GetFeedback
getFeedback_nextToken = (GetFeedback -> Maybe Text)
-> (GetFeedback -> Maybe Text -> GetFeedback)
-> Lens GetFeedback GetFeedback (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFeedback' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetFeedback' :: GetFeedback -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetFeedback
s@GetFeedback' {} Maybe Text
a -> GetFeedback
s {$sel:nextToken:GetFeedback' :: Maybe Text
nextToken = Maybe Text
a} :: GetFeedback)

-- | The maximum number of results to return.
getFeedback_maxResults :: Lens.Lens' GetFeedback (Prelude.Maybe Prelude.Natural)
getFeedback_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetFeedback -> f GetFeedback
getFeedback_maxResults = (GetFeedback -> Maybe Natural)
-> (GetFeedback -> Maybe Natural -> GetFeedback)
-> Lens GetFeedback GetFeedback (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFeedback' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetFeedback' :: GetFeedback -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetFeedback
s@GetFeedback' {} Maybe Natural
a -> GetFeedback
s {$sel:maxResults:GetFeedback' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetFeedback)

-- | The Amazon Resource Name (ARN) of the anomaly detector.
getFeedback_anomalyDetectorArn :: Lens.Lens' GetFeedback Prelude.Text
getFeedback_anomalyDetectorArn :: (Text -> f Text) -> GetFeedback -> f GetFeedback
getFeedback_anomalyDetectorArn = (GetFeedback -> Text)
-> (GetFeedback -> Text -> GetFeedback)
-> Lens GetFeedback GetFeedback Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFeedback' {Text
anomalyDetectorArn :: Text
$sel:anomalyDetectorArn:GetFeedback' :: GetFeedback -> Text
anomalyDetectorArn} -> Text
anomalyDetectorArn) (\s :: GetFeedback
s@GetFeedback' {} Text
a -> GetFeedback
s {$sel:anomalyDetectorArn:GetFeedback' :: Text
anomalyDetectorArn = Text
a} :: GetFeedback)

-- | The anomalous metric and group ID.
getFeedback_anomalyGroupTimeSeriesFeedback :: Lens.Lens' GetFeedback AnomalyGroupTimeSeries
getFeedback_anomalyGroupTimeSeriesFeedback :: (AnomalyGroupTimeSeries -> f AnomalyGroupTimeSeries)
-> GetFeedback -> f GetFeedback
getFeedback_anomalyGroupTimeSeriesFeedback = (GetFeedback -> AnomalyGroupTimeSeries)
-> (GetFeedback -> AnomalyGroupTimeSeries -> GetFeedback)
-> Lens
     GetFeedback
     GetFeedback
     AnomalyGroupTimeSeries
     AnomalyGroupTimeSeries
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFeedback' {AnomalyGroupTimeSeries
anomalyGroupTimeSeriesFeedback :: AnomalyGroupTimeSeries
$sel:anomalyGroupTimeSeriesFeedback:GetFeedback' :: GetFeedback -> AnomalyGroupTimeSeries
anomalyGroupTimeSeriesFeedback} -> AnomalyGroupTimeSeries
anomalyGroupTimeSeriesFeedback) (\s :: GetFeedback
s@GetFeedback' {} AnomalyGroupTimeSeries
a -> GetFeedback
s {$sel:anomalyGroupTimeSeriesFeedback:GetFeedback' :: AnomalyGroupTimeSeries
anomalyGroupTimeSeriesFeedback = AnomalyGroupTimeSeries
a} :: GetFeedback)

instance Core.AWSRequest GetFeedback where
  type AWSResponse GetFeedback = GetFeedbackResponse
  request :: GetFeedback -> Request GetFeedback
request = Service -> GetFeedback -> Request GetFeedback
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetFeedback
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetFeedback)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetFeedback))
-> Logger
-> Service
-> Proxy GetFeedback
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetFeedback)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [TimeSeriesFeedback]
-> Maybe Text -> Int -> GetFeedbackResponse
GetFeedbackResponse'
            (Maybe [TimeSeriesFeedback]
 -> Maybe Text -> Int -> GetFeedbackResponse)
-> Either String (Maybe [TimeSeriesFeedback])
-> Either String (Maybe Text -> Int -> GetFeedbackResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [TimeSeriesFeedback]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AnomalyGroupTimeSeriesFeedback"
                            Either String (Maybe (Maybe [TimeSeriesFeedback]))
-> Maybe [TimeSeriesFeedback]
-> Either String (Maybe [TimeSeriesFeedback])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [TimeSeriesFeedback]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> GetFeedbackResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetFeedbackResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either String (Int -> GetFeedbackResponse)
-> Either String Int -> Either String GetFeedbackResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetFeedback

instance Prelude.NFData GetFeedback

instance Core.ToHeaders GetFeedback where
  toHeaders :: GetFeedback -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetFeedback -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON GetFeedback where
  toJSON :: GetFeedback -> Value
toJSON GetFeedback' {Maybe Natural
Maybe Text
Text
AnomalyGroupTimeSeries
anomalyGroupTimeSeriesFeedback :: AnomalyGroupTimeSeries
anomalyDetectorArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:anomalyGroupTimeSeriesFeedback:GetFeedback' :: GetFeedback -> AnomalyGroupTimeSeries
$sel:anomalyDetectorArn:GetFeedback' :: GetFeedback -> Text
$sel:maxResults:GetFeedback' :: GetFeedback -> Maybe Natural
$sel:nextToken:GetFeedback' :: GetFeedback -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"AnomalyDetectorArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
anomalyDetectorArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"AnomalyGroupTimeSeriesFeedback"
                  Text -> AnomalyGroupTimeSeries -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AnomalyGroupTimeSeries
anomalyGroupTimeSeriesFeedback
              )
          ]
      )

instance Core.ToPath GetFeedback where
  toPath :: GetFeedback -> ByteString
toPath = ByteString -> GetFeedback -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/GetFeedback"

instance Core.ToQuery GetFeedback where
  toQuery :: GetFeedback -> QueryString
toQuery = QueryString -> GetFeedback -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetFeedbackResponse' smart constructor.
data GetFeedbackResponse = GetFeedbackResponse'
  { -- | Feedback for an anomalous metric.
    GetFeedbackResponse -> Maybe [TimeSeriesFeedback]
anomalyGroupTimeSeriesFeedback :: Prelude.Maybe [TimeSeriesFeedback],
    -- | The pagination token that\'s included if more results are available.
    GetFeedbackResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetFeedbackResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetFeedbackResponse -> GetFeedbackResponse -> Bool
(GetFeedbackResponse -> GetFeedbackResponse -> Bool)
-> (GetFeedbackResponse -> GetFeedbackResponse -> Bool)
-> Eq GetFeedbackResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFeedbackResponse -> GetFeedbackResponse -> Bool
$c/= :: GetFeedbackResponse -> GetFeedbackResponse -> Bool
== :: GetFeedbackResponse -> GetFeedbackResponse -> Bool
$c== :: GetFeedbackResponse -> GetFeedbackResponse -> Bool
Prelude.Eq, ReadPrec [GetFeedbackResponse]
ReadPrec GetFeedbackResponse
Int -> ReadS GetFeedbackResponse
ReadS [GetFeedbackResponse]
(Int -> ReadS GetFeedbackResponse)
-> ReadS [GetFeedbackResponse]
-> ReadPrec GetFeedbackResponse
-> ReadPrec [GetFeedbackResponse]
-> Read GetFeedbackResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFeedbackResponse]
$creadListPrec :: ReadPrec [GetFeedbackResponse]
readPrec :: ReadPrec GetFeedbackResponse
$creadPrec :: ReadPrec GetFeedbackResponse
readList :: ReadS [GetFeedbackResponse]
$creadList :: ReadS [GetFeedbackResponse]
readsPrec :: Int -> ReadS GetFeedbackResponse
$creadsPrec :: Int -> ReadS GetFeedbackResponse
Prelude.Read, Int -> GetFeedbackResponse -> ShowS
[GetFeedbackResponse] -> ShowS
GetFeedbackResponse -> String
(Int -> GetFeedbackResponse -> ShowS)
-> (GetFeedbackResponse -> String)
-> ([GetFeedbackResponse] -> ShowS)
-> Show GetFeedbackResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFeedbackResponse] -> ShowS
$cshowList :: [GetFeedbackResponse] -> ShowS
show :: GetFeedbackResponse -> String
$cshow :: GetFeedbackResponse -> String
showsPrec :: Int -> GetFeedbackResponse -> ShowS
$cshowsPrec :: Int -> GetFeedbackResponse -> ShowS
Prelude.Show, (forall x. GetFeedbackResponse -> Rep GetFeedbackResponse x)
-> (forall x. Rep GetFeedbackResponse x -> GetFeedbackResponse)
-> Generic GetFeedbackResponse
forall x. Rep GetFeedbackResponse x -> GetFeedbackResponse
forall x. GetFeedbackResponse -> Rep GetFeedbackResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetFeedbackResponse x -> GetFeedbackResponse
$cfrom :: forall x. GetFeedbackResponse -> Rep GetFeedbackResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetFeedbackResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'anomalyGroupTimeSeriesFeedback', 'getFeedbackResponse_anomalyGroupTimeSeriesFeedback' - Feedback for an anomalous metric.
--
-- 'nextToken', 'getFeedbackResponse_nextToken' - The pagination token that\'s included if more results are available.
--
-- 'httpStatus', 'getFeedbackResponse_httpStatus' - The response's http status code.
newGetFeedbackResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetFeedbackResponse
newGetFeedbackResponse :: Int -> GetFeedbackResponse
newGetFeedbackResponse Int
pHttpStatus_ =
  GetFeedbackResponse' :: Maybe [TimeSeriesFeedback]
-> Maybe Text -> Int -> GetFeedbackResponse
GetFeedbackResponse'
    { $sel:anomalyGroupTimeSeriesFeedback:GetFeedbackResponse' :: Maybe [TimeSeriesFeedback]
anomalyGroupTimeSeriesFeedback =
        Maybe [TimeSeriesFeedback]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetFeedbackResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetFeedbackResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Feedback for an anomalous metric.
getFeedbackResponse_anomalyGroupTimeSeriesFeedback :: Lens.Lens' GetFeedbackResponse (Prelude.Maybe [TimeSeriesFeedback])
getFeedbackResponse_anomalyGroupTimeSeriesFeedback :: (Maybe [TimeSeriesFeedback] -> f (Maybe [TimeSeriesFeedback]))
-> GetFeedbackResponse -> f GetFeedbackResponse
getFeedbackResponse_anomalyGroupTimeSeriesFeedback = (GetFeedbackResponse -> Maybe [TimeSeriesFeedback])
-> (GetFeedbackResponse
    -> Maybe [TimeSeriesFeedback] -> GetFeedbackResponse)
-> Lens
     GetFeedbackResponse
     GetFeedbackResponse
     (Maybe [TimeSeriesFeedback])
     (Maybe [TimeSeriesFeedback])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFeedbackResponse' {Maybe [TimeSeriesFeedback]
anomalyGroupTimeSeriesFeedback :: Maybe [TimeSeriesFeedback]
$sel:anomalyGroupTimeSeriesFeedback:GetFeedbackResponse' :: GetFeedbackResponse -> Maybe [TimeSeriesFeedback]
anomalyGroupTimeSeriesFeedback} -> Maybe [TimeSeriesFeedback]
anomalyGroupTimeSeriesFeedback) (\s :: GetFeedbackResponse
s@GetFeedbackResponse' {} Maybe [TimeSeriesFeedback]
a -> GetFeedbackResponse
s {$sel:anomalyGroupTimeSeriesFeedback:GetFeedbackResponse' :: Maybe [TimeSeriesFeedback]
anomalyGroupTimeSeriesFeedback = Maybe [TimeSeriesFeedback]
a} :: GetFeedbackResponse) ((Maybe [TimeSeriesFeedback] -> f (Maybe [TimeSeriesFeedback]))
 -> GetFeedbackResponse -> f GetFeedbackResponse)
-> ((Maybe [TimeSeriesFeedback] -> f (Maybe [TimeSeriesFeedback]))
    -> Maybe [TimeSeriesFeedback] -> f (Maybe [TimeSeriesFeedback]))
-> (Maybe [TimeSeriesFeedback] -> f (Maybe [TimeSeriesFeedback]))
-> GetFeedbackResponse
-> f GetFeedbackResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [TimeSeriesFeedback]
  [TimeSeriesFeedback]
  [TimeSeriesFeedback]
  [TimeSeriesFeedback]
-> Iso
     (Maybe [TimeSeriesFeedback])
     (Maybe [TimeSeriesFeedback])
     (Maybe [TimeSeriesFeedback])
     (Maybe [TimeSeriesFeedback])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [TimeSeriesFeedback]
  [TimeSeriesFeedback]
  [TimeSeriesFeedback]
  [TimeSeriesFeedback]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token that\'s included if more results are available.
getFeedbackResponse_nextToken :: Lens.Lens' GetFeedbackResponse (Prelude.Maybe Prelude.Text)
getFeedbackResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetFeedbackResponse -> f GetFeedbackResponse
getFeedbackResponse_nextToken = (GetFeedbackResponse -> Maybe Text)
-> (GetFeedbackResponse -> Maybe Text -> GetFeedbackResponse)
-> Lens
     GetFeedbackResponse GetFeedbackResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFeedbackResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetFeedbackResponse' :: GetFeedbackResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetFeedbackResponse
s@GetFeedbackResponse' {} Maybe Text
a -> GetFeedbackResponse
s {$sel:nextToken:GetFeedbackResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetFeedbackResponse)

-- | The response's http status code.
getFeedbackResponse_httpStatus :: Lens.Lens' GetFeedbackResponse Prelude.Int
getFeedbackResponse_httpStatus :: (Int -> f Int) -> GetFeedbackResponse -> f GetFeedbackResponse
getFeedbackResponse_httpStatus = (GetFeedbackResponse -> Int)
-> (GetFeedbackResponse -> Int -> GetFeedbackResponse)
-> Lens GetFeedbackResponse GetFeedbackResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFeedbackResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetFeedbackResponse' :: GetFeedbackResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetFeedbackResponse
s@GetFeedbackResponse' {} Int
a -> GetFeedbackResponse
s {$sel:httpStatus:GetFeedbackResponse' :: Int
httpStatus = Int
a} :: GetFeedbackResponse)

instance Prelude.NFData GetFeedbackResponse