{-# 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.OpenSearch.DescribeDomainAutoTunes
-- 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)
--
-- Provides scheduled Auto-Tune action details for the domain, such as
-- Auto-Tune action type, description, severity, and scheduled date.
module Amazonka.OpenSearch.DescribeDomainAutoTunes
  ( -- * Creating a Request
    DescribeDomainAutoTunes (..),
    newDescribeDomainAutoTunes,

    -- * Request Lenses
    describeDomainAutoTunes_nextToken,
    describeDomainAutoTunes_maxResults,
    describeDomainAutoTunes_domainName,

    -- * Destructuring the Response
    DescribeDomainAutoTunesResponse (..),
    newDescribeDomainAutoTunesResponse,

    -- * Response Lenses
    describeDomainAutoTunesResponse_nextToken,
    describeDomainAutoTunesResponse_autoTunes,
    describeDomainAutoTunesResponse_httpStatus,
  )
where

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

-- | Container for the parameters to the @DescribeDomainAutoTunes@ operation.
--
-- /See:/ 'newDescribeDomainAutoTunes' smart constructor.
data DescribeDomainAutoTunes = DescribeDomainAutoTunes'
  { -- | NextToken is sent in case the earlier API call results contain the
    -- NextToken. Used for pagination.
    DescribeDomainAutoTunes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Set this value to limit the number of results returned. If not
    -- specified, defaults to 100.
    DescribeDomainAutoTunes -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The domain name for which you want Auto-Tune action details.
    DescribeDomainAutoTunes -> Text
domainName :: Prelude.Text
  }
  deriving (DescribeDomainAutoTunes -> DescribeDomainAutoTunes -> Bool
(DescribeDomainAutoTunes -> DescribeDomainAutoTunes -> Bool)
-> (DescribeDomainAutoTunes -> DescribeDomainAutoTunes -> Bool)
-> Eq DescribeDomainAutoTunes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDomainAutoTunes -> DescribeDomainAutoTunes -> Bool
$c/= :: DescribeDomainAutoTunes -> DescribeDomainAutoTunes -> Bool
== :: DescribeDomainAutoTunes -> DescribeDomainAutoTunes -> Bool
$c== :: DescribeDomainAutoTunes -> DescribeDomainAutoTunes -> Bool
Prelude.Eq, ReadPrec [DescribeDomainAutoTunes]
ReadPrec DescribeDomainAutoTunes
Int -> ReadS DescribeDomainAutoTunes
ReadS [DescribeDomainAutoTunes]
(Int -> ReadS DescribeDomainAutoTunes)
-> ReadS [DescribeDomainAutoTunes]
-> ReadPrec DescribeDomainAutoTunes
-> ReadPrec [DescribeDomainAutoTunes]
-> Read DescribeDomainAutoTunes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDomainAutoTunes]
$creadListPrec :: ReadPrec [DescribeDomainAutoTunes]
readPrec :: ReadPrec DescribeDomainAutoTunes
$creadPrec :: ReadPrec DescribeDomainAutoTunes
readList :: ReadS [DescribeDomainAutoTunes]
$creadList :: ReadS [DescribeDomainAutoTunes]
readsPrec :: Int -> ReadS DescribeDomainAutoTunes
$creadsPrec :: Int -> ReadS DescribeDomainAutoTunes
Prelude.Read, Int -> DescribeDomainAutoTunes -> ShowS
[DescribeDomainAutoTunes] -> ShowS
DescribeDomainAutoTunes -> String
(Int -> DescribeDomainAutoTunes -> ShowS)
-> (DescribeDomainAutoTunes -> String)
-> ([DescribeDomainAutoTunes] -> ShowS)
-> Show DescribeDomainAutoTunes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDomainAutoTunes] -> ShowS
$cshowList :: [DescribeDomainAutoTunes] -> ShowS
show :: DescribeDomainAutoTunes -> String
$cshow :: DescribeDomainAutoTunes -> String
showsPrec :: Int -> DescribeDomainAutoTunes -> ShowS
$cshowsPrec :: Int -> DescribeDomainAutoTunes -> ShowS
Prelude.Show, (forall x.
 DescribeDomainAutoTunes -> Rep DescribeDomainAutoTunes x)
-> (forall x.
    Rep DescribeDomainAutoTunes x -> DescribeDomainAutoTunes)
-> Generic DescribeDomainAutoTunes
forall x. Rep DescribeDomainAutoTunes x -> DescribeDomainAutoTunes
forall x. DescribeDomainAutoTunes -> Rep DescribeDomainAutoTunes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDomainAutoTunes x -> DescribeDomainAutoTunes
$cfrom :: forall x. DescribeDomainAutoTunes -> Rep DescribeDomainAutoTunes x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDomainAutoTunes' 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', 'describeDomainAutoTunes_nextToken' - NextToken is sent in case the earlier API call results contain the
-- NextToken. Used for pagination.
--
-- 'maxResults', 'describeDomainAutoTunes_maxResults' - Set this value to limit the number of results returned. If not
-- specified, defaults to 100.
--
-- 'domainName', 'describeDomainAutoTunes_domainName' - The domain name for which you want Auto-Tune action details.
newDescribeDomainAutoTunes ::
  -- | 'domainName'
  Prelude.Text ->
  DescribeDomainAutoTunes
newDescribeDomainAutoTunes :: Text -> DescribeDomainAutoTunes
newDescribeDomainAutoTunes Text
pDomainName_ =
  DescribeDomainAutoTunes' :: Maybe Text -> Maybe Int -> Text -> DescribeDomainAutoTunes
DescribeDomainAutoTunes'
    { $sel:nextToken:DescribeDomainAutoTunes' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeDomainAutoTunes' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:DescribeDomainAutoTunes' :: Text
domainName = Text
pDomainName_
    }

-- | NextToken is sent in case the earlier API call results contain the
-- NextToken. Used for pagination.
describeDomainAutoTunes_nextToken :: Lens.Lens' DescribeDomainAutoTunes (Prelude.Maybe Prelude.Text)
describeDomainAutoTunes_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeDomainAutoTunes -> f DescribeDomainAutoTunes
describeDomainAutoTunes_nextToken = (DescribeDomainAutoTunes -> Maybe Text)
-> (DescribeDomainAutoTunes
    -> Maybe Text -> DescribeDomainAutoTunes)
-> Lens
     DescribeDomainAutoTunes
     DescribeDomainAutoTunes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainAutoTunes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDomainAutoTunes' :: DescribeDomainAutoTunes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDomainAutoTunes
s@DescribeDomainAutoTunes' {} Maybe Text
a -> DescribeDomainAutoTunes
s {$sel:nextToken:DescribeDomainAutoTunes' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDomainAutoTunes)

-- | Set this value to limit the number of results returned. If not
-- specified, defaults to 100.
describeDomainAutoTunes_maxResults :: Lens.Lens' DescribeDomainAutoTunes (Prelude.Maybe Prelude.Int)
describeDomainAutoTunes_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribeDomainAutoTunes -> f DescribeDomainAutoTunes
describeDomainAutoTunes_maxResults = (DescribeDomainAutoTunes -> Maybe Int)
-> (DescribeDomainAutoTunes
    -> Maybe Int -> DescribeDomainAutoTunes)
-> Lens
     DescribeDomainAutoTunes
     DescribeDomainAutoTunes
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainAutoTunes' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeDomainAutoTunes' :: DescribeDomainAutoTunes -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeDomainAutoTunes
s@DescribeDomainAutoTunes' {} Maybe Int
a -> DescribeDomainAutoTunes
s {$sel:maxResults:DescribeDomainAutoTunes' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeDomainAutoTunes)

-- | The domain name for which you want Auto-Tune action details.
describeDomainAutoTunes_domainName :: Lens.Lens' DescribeDomainAutoTunes Prelude.Text
describeDomainAutoTunes_domainName :: (Text -> f Text)
-> DescribeDomainAutoTunes -> f DescribeDomainAutoTunes
describeDomainAutoTunes_domainName = (DescribeDomainAutoTunes -> Text)
-> (DescribeDomainAutoTunes -> Text -> DescribeDomainAutoTunes)
-> Lens DescribeDomainAutoTunes DescribeDomainAutoTunes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainAutoTunes' {Text
domainName :: Text
$sel:domainName:DescribeDomainAutoTunes' :: DescribeDomainAutoTunes -> Text
domainName} -> Text
domainName) (\s :: DescribeDomainAutoTunes
s@DescribeDomainAutoTunes' {} Text
a -> DescribeDomainAutoTunes
s {$sel:domainName:DescribeDomainAutoTunes' :: Text
domainName = Text
a} :: DescribeDomainAutoTunes)

instance Core.AWSRequest DescribeDomainAutoTunes where
  type
    AWSResponse DescribeDomainAutoTunes =
      DescribeDomainAutoTunesResponse
  request :: DescribeDomainAutoTunes -> Request DescribeDomainAutoTunes
request = Service
-> DescribeDomainAutoTunes -> Request DescribeDomainAutoTunes
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDomainAutoTunes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDomainAutoTunes)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeDomainAutoTunes))
-> Logger
-> Service
-> Proxy DescribeDomainAutoTunes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDomainAutoTunes)))
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 Text
-> Maybe [AutoTune] -> Int -> DescribeDomainAutoTunesResponse
DescribeDomainAutoTunesResponse'
            (Maybe Text
 -> Maybe [AutoTune] -> Int -> DescribeDomainAutoTunesResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [AutoTune] -> Int -> DescribeDomainAutoTunesResponse)
forall (f :: * -> *) a b. Functor 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 (Maybe [AutoTune] -> Int -> DescribeDomainAutoTunesResponse)
-> Either String (Maybe [AutoTune])
-> Either String (Int -> DescribeDomainAutoTunesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [AutoTune]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AutoTunes" Either String (Maybe (Maybe [AutoTune]))
-> Maybe [AutoTune] -> Either String (Maybe [AutoTune])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AutoTune]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeDomainAutoTunesResponse)
-> Either String Int
-> Either String DescribeDomainAutoTunesResponse
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 DescribeDomainAutoTunes

instance Prelude.NFData DescribeDomainAutoTunes

instance Core.ToHeaders DescribeDomainAutoTunes where
  toHeaders :: DescribeDomainAutoTunes -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeDomainAutoTunes -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath DescribeDomainAutoTunes where
  toPath :: DescribeDomainAutoTunes -> ByteString
toPath DescribeDomainAutoTunes' {Maybe Int
Maybe Text
Text
domainName :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:domainName:DescribeDomainAutoTunes' :: DescribeDomainAutoTunes -> Text
$sel:maxResults:DescribeDomainAutoTunes' :: DescribeDomainAutoTunes -> Maybe Int
$sel:nextToken:DescribeDomainAutoTunes' :: DescribeDomainAutoTunes -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2021-01-01/opensearch/domain/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
domainName,
        ByteString
"/autoTunes"
      ]

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

-- | The result of a @DescribeDomainAutoTunes@ request. See
-- <https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html Auto-Tune for Amazon OpenSearch Service>
-- for more information.
--
-- /See:/ 'newDescribeDomainAutoTunesResponse' smart constructor.
data DescribeDomainAutoTunesResponse = DescribeDomainAutoTunesResponse'
  { -- | An identifier to allow retrieval of paginated results.
    DescribeDomainAutoTunesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The list of setting adjustments that Auto-Tune has made to the domain.
    -- See
    -- <https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html Auto-Tune for Amazon OpenSearch Service>
    -- for more information.
    DescribeDomainAutoTunesResponse -> Maybe [AutoTune]
autoTunes :: Prelude.Maybe [AutoTune],
    -- | The response's http status code.
    DescribeDomainAutoTunesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDomainAutoTunesResponse
-> DescribeDomainAutoTunesResponse -> Bool
(DescribeDomainAutoTunesResponse
 -> DescribeDomainAutoTunesResponse -> Bool)
-> (DescribeDomainAutoTunesResponse
    -> DescribeDomainAutoTunesResponse -> Bool)
-> Eq DescribeDomainAutoTunesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDomainAutoTunesResponse
-> DescribeDomainAutoTunesResponse -> Bool
$c/= :: DescribeDomainAutoTunesResponse
-> DescribeDomainAutoTunesResponse -> Bool
== :: DescribeDomainAutoTunesResponse
-> DescribeDomainAutoTunesResponse -> Bool
$c== :: DescribeDomainAutoTunesResponse
-> DescribeDomainAutoTunesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDomainAutoTunesResponse]
ReadPrec DescribeDomainAutoTunesResponse
Int -> ReadS DescribeDomainAutoTunesResponse
ReadS [DescribeDomainAutoTunesResponse]
(Int -> ReadS DescribeDomainAutoTunesResponse)
-> ReadS [DescribeDomainAutoTunesResponse]
-> ReadPrec DescribeDomainAutoTunesResponse
-> ReadPrec [DescribeDomainAutoTunesResponse]
-> Read DescribeDomainAutoTunesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDomainAutoTunesResponse]
$creadListPrec :: ReadPrec [DescribeDomainAutoTunesResponse]
readPrec :: ReadPrec DescribeDomainAutoTunesResponse
$creadPrec :: ReadPrec DescribeDomainAutoTunesResponse
readList :: ReadS [DescribeDomainAutoTunesResponse]
$creadList :: ReadS [DescribeDomainAutoTunesResponse]
readsPrec :: Int -> ReadS DescribeDomainAutoTunesResponse
$creadsPrec :: Int -> ReadS DescribeDomainAutoTunesResponse
Prelude.Read, Int -> DescribeDomainAutoTunesResponse -> ShowS
[DescribeDomainAutoTunesResponse] -> ShowS
DescribeDomainAutoTunesResponse -> String
(Int -> DescribeDomainAutoTunesResponse -> ShowS)
-> (DescribeDomainAutoTunesResponse -> String)
-> ([DescribeDomainAutoTunesResponse] -> ShowS)
-> Show DescribeDomainAutoTunesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDomainAutoTunesResponse] -> ShowS
$cshowList :: [DescribeDomainAutoTunesResponse] -> ShowS
show :: DescribeDomainAutoTunesResponse -> String
$cshow :: DescribeDomainAutoTunesResponse -> String
showsPrec :: Int -> DescribeDomainAutoTunesResponse -> ShowS
$cshowsPrec :: Int -> DescribeDomainAutoTunesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDomainAutoTunesResponse
 -> Rep DescribeDomainAutoTunesResponse x)
-> (forall x.
    Rep DescribeDomainAutoTunesResponse x
    -> DescribeDomainAutoTunesResponse)
-> Generic DescribeDomainAutoTunesResponse
forall x.
Rep DescribeDomainAutoTunesResponse x
-> DescribeDomainAutoTunesResponse
forall x.
DescribeDomainAutoTunesResponse
-> Rep DescribeDomainAutoTunesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDomainAutoTunesResponse x
-> DescribeDomainAutoTunesResponse
$cfrom :: forall x.
DescribeDomainAutoTunesResponse
-> Rep DescribeDomainAutoTunesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDomainAutoTunesResponse' 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', 'describeDomainAutoTunesResponse_nextToken' - An identifier to allow retrieval of paginated results.
--
-- 'autoTunes', 'describeDomainAutoTunesResponse_autoTunes' - The list of setting adjustments that Auto-Tune has made to the domain.
-- See
-- <https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html Auto-Tune for Amazon OpenSearch Service>
-- for more information.
--
-- 'httpStatus', 'describeDomainAutoTunesResponse_httpStatus' - The response's http status code.
newDescribeDomainAutoTunesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDomainAutoTunesResponse
newDescribeDomainAutoTunesResponse :: Int -> DescribeDomainAutoTunesResponse
newDescribeDomainAutoTunesResponse Int
pHttpStatus_ =
  DescribeDomainAutoTunesResponse' :: Maybe Text
-> Maybe [AutoTune] -> Int -> DescribeDomainAutoTunesResponse
DescribeDomainAutoTunesResponse'
    { $sel:nextToken:DescribeDomainAutoTunesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:autoTunes:DescribeDomainAutoTunesResponse' :: Maybe [AutoTune]
autoTunes = Maybe [AutoTune]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDomainAutoTunesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An identifier to allow retrieval of paginated results.
describeDomainAutoTunesResponse_nextToken :: Lens.Lens' DescribeDomainAutoTunesResponse (Prelude.Maybe Prelude.Text)
describeDomainAutoTunesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeDomainAutoTunesResponse
-> f DescribeDomainAutoTunesResponse
describeDomainAutoTunesResponse_nextToken = (DescribeDomainAutoTunesResponse -> Maybe Text)
-> (DescribeDomainAutoTunesResponse
    -> Maybe Text -> DescribeDomainAutoTunesResponse)
-> Lens
     DescribeDomainAutoTunesResponse
     DescribeDomainAutoTunesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainAutoTunesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDomainAutoTunesResponse' :: DescribeDomainAutoTunesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDomainAutoTunesResponse
s@DescribeDomainAutoTunesResponse' {} Maybe Text
a -> DescribeDomainAutoTunesResponse
s {$sel:nextToken:DescribeDomainAutoTunesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDomainAutoTunesResponse)

-- | The list of setting adjustments that Auto-Tune has made to the domain.
-- See
-- <https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html Auto-Tune for Amazon OpenSearch Service>
-- for more information.
describeDomainAutoTunesResponse_autoTunes :: Lens.Lens' DescribeDomainAutoTunesResponse (Prelude.Maybe [AutoTune])
describeDomainAutoTunesResponse_autoTunes :: (Maybe [AutoTune] -> f (Maybe [AutoTune]))
-> DescribeDomainAutoTunesResponse
-> f DescribeDomainAutoTunesResponse
describeDomainAutoTunesResponse_autoTunes = (DescribeDomainAutoTunesResponse -> Maybe [AutoTune])
-> (DescribeDomainAutoTunesResponse
    -> Maybe [AutoTune] -> DescribeDomainAutoTunesResponse)
-> Lens
     DescribeDomainAutoTunesResponse
     DescribeDomainAutoTunesResponse
     (Maybe [AutoTune])
     (Maybe [AutoTune])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainAutoTunesResponse' {Maybe [AutoTune]
autoTunes :: Maybe [AutoTune]
$sel:autoTunes:DescribeDomainAutoTunesResponse' :: DescribeDomainAutoTunesResponse -> Maybe [AutoTune]
autoTunes} -> Maybe [AutoTune]
autoTunes) (\s :: DescribeDomainAutoTunesResponse
s@DescribeDomainAutoTunesResponse' {} Maybe [AutoTune]
a -> DescribeDomainAutoTunesResponse
s {$sel:autoTunes:DescribeDomainAutoTunesResponse' :: Maybe [AutoTune]
autoTunes = Maybe [AutoTune]
a} :: DescribeDomainAutoTunesResponse) ((Maybe [AutoTune] -> f (Maybe [AutoTune]))
 -> DescribeDomainAutoTunesResponse
 -> f DescribeDomainAutoTunesResponse)
-> ((Maybe [AutoTune] -> f (Maybe [AutoTune]))
    -> Maybe [AutoTune] -> f (Maybe [AutoTune]))
-> (Maybe [AutoTune] -> f (Maybe [AutoTune]))
-> DescribeDomainAutoTunesResponse
-> f DescribeDomainAutoTunesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AutoTune] [AutoTune] [AutoTune] [AutoTune]
-> Iso
     (Maybe [AutoTune])
     (Maybe [AutoTune])
     (Maybe [AutoTune])
     (Maybe [AutoTune])
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 [AutoTune] [AutoTune] [AutoTune] [AutoTune]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeDomainAutoTunesResponse