{-# 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.Config.SelectResourceConfig
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Accepts a structured query language (SQL) @SELECT@ command, performs the
-- corresponding search, and returns resource configurations matching the
-- properties.
--
-- For more information about query components, see the
-- <https://docs.aws.amazon.com/config/latest/developerguide/query-components.html Query Components>
-- section in the /Config Developer Guide/.
--
-- This operation returns paginated results.
module Amazonka.Config.SelectResourceConfig
  ( -- * Creating a Request
    SelectResourceConfig (..),
    newSelectResourceConfig,

    -- * Request Lenses
    selectResourceConfig_limit,
    selectResourceConfig_nextToken,
    selectResourceConfig_expression,

    -- * Destructuring the Response
    SelectResourceConfigResponse (..),
    newSelectResourceConfigResponse,

    -- * Response Lenses
    selectResourceConfigResponse_nextToken,
    selectResourceConfigResponse_queryInfo,
    selectResourceConfigResponse_results,
    selectResourceConfigResponse_httpStatus,
  )
where

import Amazonka.Config.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newSelectResourceConfig' smart constructor.
data SelectResourceConfig = SelectResourceConfig'
  { -- | The maximum number of query results returned on each page.
    SelectResourceConfig -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The @nextToken@ string returned in a previous request that you use to
    -- request the next page of results in a paginated response.
    SelectResourceConfig -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The SQL query @SELECT@ command.
    SelectResourceConfig -> Text
expression :: Prelude.Text
  }
  deriving (SelectResourceConfig -> SelectResourceConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SelectResourceConfig -> SelectResourceConfig -> Bool
$c/= :: SelectResourceConfig -> SelectResourceConfig -> Bool
== :: SelectResourceConfig -> SelectResourceConfig -> Bool
$c== :: SelectResourceConfig -> SelectResourceConfig -> Bool
Prelude.Eq, ReadPrec [SelectResourceConfig]
ReadPrec SelectResourceConfig
Int -> ReadS SelectResourceConfig
ReadS [SelectResourceConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SelectResourceConfig]
$creadListPrec :: ReadPrec [SelectResourceConfig]
readPrec :: ReadPrec SelectResourceConfig
$creadPrec :: ReadPrec SelectResourceConfig
readList :: ReadS [SelectResourceConfig]
$creadList :: ReadS [SelectResourceConfig]
readsPrec :: Int -> ReadS SelectResourceConfig
$creadsPrec :: Int -> ReadS SelectResourceConfig
Prelude.Read, Int -> SelectResourceConfig -> ShowS
[SelectResourceConfig] -> ShowS
SelectResourceConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SelectResourceConfig] -> ShowS
$cshowList :: [SelectResourceConfig] -> ShowS
show :: SelectResourceConfig -> String
$cshow :: SelectResourceConfig -> String
showsPrec :: Int -> SelectResourceConfig -> ShowS
$cshowsPrec :: Int -> SelectResourceConfig -> ShowS
Prelude.Show, forall x. Rep SelectResourceConfig x -> SelectResourceConfig
forall x. SelectResourceConfig -> Rep SelectResourceConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SelectResourceConfig x -> SelectResourceConfig
$cfrom :: forall x. SelectResourceConfig -> Rep SelectResourceConfig x
Prelude.Generic)

-- |
-- Create a value of 'SelectResourceConfig' 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:
--
-- 'limit', 'selectResourceConfig_limit' - The maximum number of query results returned on each page.
--
-- 'nextToken', 'selectResourceConfig_nextToken' - The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
--
-- 'expression', 'selectResourceConfig_expression' - The SQL query @SELECT@ command.
newSelectResourceConfig ::
  -- | 'expression'
  Prelude.Text ->
  SelectResourceConfig
newSelectResourceConfig :: Text -> SelectResourceConfig
newSelectResourceConfig Text
pExpression_ =
  SelectResourceConfig'
    { $sel:limit:SelectResourceConfig' :: Maybe Natural
limit = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:SelectResourceConfig' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:expression:SelectResourceConfig' :: Text
expression = Text
pExpression_
    }

-- | The maximum number of query results returned on each page.
selectResourceConfig_limit :: Lens.Lens' SelectResourceConfig (Prelude.Maybe Prelude.Natural)
selectResourceConfig_limit :: Lens' SelectResourceConfig (Maybe Natural)
selectResourceConfig_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectResourceConfig' {Maybe Natural
limit :: Maybe Natural
$sel:limit:SelectResourceConfig' :: SelectResourceConfig -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: SelectResourceConfig
s@SelectResourceConfig' {} Maybe Natural
a -> SelectResourceConfig
s {$sel:limit:SelectResourceConfig' :: Maybe Natural
limit = Maybe Natural
a} :: SelectResourceConfig)

-- | The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
selectResourceConfig_nextToken :: Lens.Lens' SelectResourceConfig (Prelude.Maybe Prelude.Text)
selectResourceConfig_nextToken :: Lens' SelectResourceConfig (Maybe Text)
selectResourceConfig_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectResourceConfig' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SelectResourceConfig' :: SelectResourceConfig -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SelectResourceConfig
s@SelectResourceConfig' {} Maybe Text
a -> SelectResourceConfig
s {$sel:nextToken:SelectResourceConfig' :: Maybe Text
nextToken = Maybe Text
a} :: SelectResourceConfig)

-- | The SQL query @SELECT@ command.
selectResourceConfig_expression :: Lens.Lens' SelectResourceConfig Prelude.Text
selectResourceConfig_expression :: Lens' SelectResourceConfig Text
selectResourceConfig_expression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectResourceConfig' {Text
expression :: Text
$sel:expression:SelectResourceConfig' :: SelectResourceConfig -> Text
expression} -> Text
expression) (\s :: SelectResourceConfig
s@SelectResourceConfig' {} Text
a -> SelectResourceConfig
s {$sel:expression:SelectResourceConfig' :: Text
expression = Text
a} :: SelectResourceConfig)

instance Core.AWSPager SelectResourceConfig where
  page :: SelectResourceConfig
-> AWSResponse SelectResourceConfig -> Maybe SelectResourceConfig
page SelectResourceConfig
rq AWSResponse SelectResourceConfig
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse SelectResourceConfig
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SelectResourceConfigResponse (Maybe Text)
selectResourceConfigResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse SelectResourceConfig
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SelectResourceConfigResponse (Maybe [Text])
selectResourceConfigResponse_results
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ SelectResourceConfig
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' SelectResourceConfig (Maybe Text)
selectResourceConfig_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse SelectResourceConfig
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SelectResourceConfigResponse (Maybe Text)
selectResourceConfigResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.Hashable SelectResourceConfig where
  hashWithSalt :: Int -> SelectResourceConfig -> Int
hashWithSalt Int
_salt SelectResourceConfig' {Maybe Natural
Maybe Text
Text
expression :: Text
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:expression:SelectResourceConfig' :: SelectResourceConfig -> Text
$sel:nextToken:SelectResourceConfig' :: SelectResourceConfig -> Maybe Text
$sel:limit:SelectResourceConfig' :: SelectResourceConfig -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
limit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
expression

instance Prelude.NFData SelectResourceConfig where
  rnf :: SelectResourceConfig -> ()
rnf SelectResourceConfig' {Maybe Natural
Maybe Text
Text
expression :: Text
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:expression:SelectResourceConfig' :: SelectResourceConfig -> Text
$sel:nextToken:SelectResourceConfig' :: SelectResourceConfig -> Maybe Text
$sel:limit:SelectResourceConfig' :: SelectResourceConfig -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
limit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
expression

instance Data.ToHeaders SelectResourceConfig where
  toHeaders :: SelectResourceConfig -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"StarlingDoveService.SelectResourceConfig" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON SelectResourceConfig where
  toJSON :: SelectResourceConfig -> Value
toJSON SelectResourceConfig' {Maybe Natural
Maybe Text
Text
expression :: Text
nextToken :: Maybe Text
limit :: Maybe Natural
$sel:expression:SelectResourceConfig' :: SelectResourceConfig -> Text
$sel:nextToken:SelectResourceConfig' :: SelectResourceConfig -> Maybe Text
$sel:limit:SelectResourceConfig' :: SelectResourceConfig -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Limit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            forall a. a -> Maybe a
Prelude.Just (Key
"Expression" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
expression)
          ]
      )

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

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

-- | /See:/ 'newSelectResourceConfigResponse' smart constructor.
data SelectResourceConfigResponse = SelectResourceConfigResponse'
  { -- | The @nextToken@ string returned in a previous request that you use to
    -- request the next page of results in a paginated response.
    SelectResourceConfigResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Returns the @QueryInfo@ object.
    SelectResourceConfigResponse -> Maybe QueryInfo
queryInfo :: Prelude.Maybe QueryInfo,
    -- | Returns the results for the SQL query.
    SelectResourceConfigResponse -> Maybe [Text]
results :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    SelectResourceConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (SelectResourceConfigResponse
-> SelectResourceConfigResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SelectResourceConfigResponse
-> SelectResourceConfigResponse -> Bool
$c/= :: SelectResourceConfigResponse
-> SelectResourceConfigResponse -> Bool
== :: SelectResourceConfigResponse
-> SelectResourceConfigResponse -> Bool
$c== :: SelectResourceConfigResponse
-> SelectResourceConfigResponse -> Bool
Prelude.Eq, ReadPrec [SelectResourceConfigResponse]
ReadPrec SelectResourceConfigResponse
Int -> ReadS SelectResourceConfigResponse
ReadS [SelectResourceConfigResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SelectResourceConfigResponse]
$creadListPrec :: ReadPrec [SelectResourceConfigResponse]
readPrec :: ReadPrec SelectResourceConfigResponse
$creadPrec :: ReadPrec SelectResourceConfigResponse
readList :: ReadS [SelectResourceConfigResponse]
$creadList :: ReadS [SelectResourceConfigResponse]
readsPrec :: Int -> ReadS SelectResourceConfigResponse
$creadsPrec :: Int -> ReadS SelectResourceConfigResponse
Prelude.Read, Int -> SelectResourceConfigResponse -> ShowS
[SelectResourceConfigResponse] -> ShowS
SelectResourceConfigResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SelectResourceConfigResponse] -> ShowS
$cshowList :: [SelectResourceConfigResponse] -> ShowS
show :: SelectResourceConfigResponse -> String
$cshow :: SelectResourceConfigResponse -> String
showsPrec :: Int -> SelectResourceConfigResponse -> ShowS
$cshowsPrec :: Int -> SelectResourceConfigResponse -> ShowS
Prelude.Show, forall x.
Rep SelectResourceConfigResponse x -> SelectResourceConfigResponse
forall x.
SelectResourceConfigResponse -> Rep SelectResourceConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SelectResourceConfigResponse x -> SelectResourceConfigResponse
$cfrom :: forall x.
SelectResourceConfigResponse -> Rep SelectResourceConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'SelectResourceConfigResponse' 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', 'selectResourceConfigResponse_nextToken' - The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
--
-- 'queryInfo', 'selectResourceConfigResponse_queryInfo' - Returns the @QueryInfo@ object.
--
-- 'results', 'selectResourceConfigResponse_results' - Returns the results for the SQL query.
--
-- 'httpStatus', 'selectResourceConfigResponse_httpStatus' - The response's http status code.
newSelectResourceConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SelectResourceConfigResponse
newSelectResourceConfigResponse :: Int -> SelectResourceConfigResponse
newSelectResourceConfigResponse Int
pHttpStatus_ =
  SelectResourceConfigResponse'
    { $sel:nextToken:SelectResourceConfigResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:queryInfo:SelectResourceConfigResponse' :: Maybe QueryInfo
queryInfo = forall a. Maybe a
Prelude.Nothing,
      $sel:results:SelectResourceConfigResponse' :: Maybe [Text]
results = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:SelectResourceConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The @nextToken@ string returned in a previous request that you use to
-- request the next page of results in a paginated response.
selectResourceConfigResponse_nextToken :: Lens.Lens' SelectResourceConfigResponse (Prelude.Maybe Prelude.Text)
selectResourceConfigResponse_nextToken :: Lens' SelectResourceConfigResponse (Maybe Text)
selectResourceConfigResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectResourceConfigResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SelectResourceConfigResponse' :: SelectResourceConfigResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SelectResourceConfigResponse
s@SelectResourceConfigResponse' {} Maybe Text
a -> SelectResourceConfigResponse
s {$sel:nextToken:SelectResourceConfigResponse' :: Maybe Text
nextToken = Maybe Text
a} :: SelectResourceConfigResponse)

-- | Returns the @QueryInfo@ object.
selectResourceConfigResponse_queryInfo :: Lens.Lens' SelectResourceConfigResponse (Prelude.Maybe QueryInfo)
selectResourceConfigResponse_queryInfo :: Lens' SelectResourceConfigResponse (Maybe QueryInfo)
selectResourceConfigResponse_queryInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectResourceConfigResponse' {Maybe QueryInfo
queryInfo :: Maybe QueryInfo
$sel:queryInfo:SelectResourceConfigResponse' :: SelectResourceConfigResponse -> Maybe QueryInfo
queryInfo} -> Maybe QueryInfo
queryInfo) (\s :: SelectResourceConfigResponse
s@SelectResourceConfigResponse' {} Maybe QueryInfo
a -> SelectResourceConfigResponse
s {$sel:queryInfo:SelectResourceConfigResponse' :: Maybe QueryInfo
queryInfo = Maybe QueryInfo
a} :: SelectResourceConfigResponse)

-- | Returns the results for the SQL query.
selectResourceConfigResponse_results :: Lens.Lens' SelectResourceConfigResponse (Prelude.Maybe [Prelude.Text])
selectResourceConfigResponse_results :: Lens' SelectResourceConfigResponse (Maybe [Text])
selectResourceConfigResponse_results = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SelectResourceConfigResponse' {Maybe [Text]
results :: Maybe [Text]
$sel:results:SelectResourceConfigResponse' :: SelectResourceConfigResponse -> Maybe [Text]
results} -> Maybe [Text]
results) (\s :: SelectResourceConfigResponse
s@SelectResourceConfigResponse' {} Maybe [Text]
a -> SelectResourceConfigResponse
s {$sel:results:SelectResourceConfigResponse' :: Maybe [Text]
results = Maybe [Text]
a} :: SelectResourceConfigResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData SelectResourceConfigResponse where
  rnf :: SelectResourceConfigResponse -> ()
rnf SelectResourceConfigResponse' {Int
Maybe [Text]
Maybe Text
Maybe QueryInfo
httpStatus :: Int
results :: Maybe [Text]
queryInfo :: Maybe QueryInfo
nextToken :: Maybe Text
$sel:httpStatus:SelectResourceConfigResponse' :: SelectResourceConfigResponse -> Int
$sel:results:SelectResourceConfigResponse' :: SelectResourceConfigResponse -> Maybe [Text]
$sel:queryInfo:SelectResourceConfigResponse' :: SelectResourceConfigResponse -> Maybe QueryInfo
$sel:nextToken:SelectResourceConfigResponse' :: SelectResourceConfigResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe QueryInfo
queryInfo
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
results
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus