{-# 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.DMS.DescribeFleetAdvisorSchemas
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of schemas detected by Fleet Advisor Collectors in your
-- account.
module Amazonka.DMS.DescribeFleetAdvisorSchemas
  ( -- * Creating a Request
    DescribeFleetAdvisorSchemas (..),
    newDescribeFleetAdvisorSchemas,

    -- * Request Lenses
    describeFleetAdvisorSchemas_filters,
    describeFleetAdvisorSchemas_maxRecords,
    describeFleetAdvisorSchemas_nextToken,

    -- * Destructuring the Response
    DescribeFleetAdvisorSchemasResponse (..),
    newDescribeFleetAdvisorSchemasResponse,

    -- * Response Lenses
    describeFleetAdvisorSchemasResponse_fleetAdvisorSchemas,
    describeFleetAdvisorSchemasResponse_nextToken,
    describeFleetAdvisorSchemasResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.DMS.Types
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:/ 'newDescribeFleetAdvisorSchemas' smart constructor.
data DescribeFleetAdvisorSchemas = DescribeFleetAdvisorSchemas'
  { -- | If you specify any of the following filters, the output includes
    -- information for only those schemas that meet the filter criteria:
    --
    -- -   @complexity@ – The schema\'s complexity, for example @Simple@.
    --
    -- -   @database-id@ – The ID of the schema\'s database.
    --
    -- -   @database-ip-address@ – The IP address of the schema\'s database.
    --
    -- -   @database-name@ – The name of the schema\'s database.
    --
    -- -   @database-engine@ – The name of the schema database\'s engine.
    --
    -- -   @original-schema-name@ – The name of the schema\'s database\'s main
    --     schema.
    --
    -- -   @schema-id@ – The ID of the schema, for example @15@.
    --
    -- -   @schema-name@ – The name of the schema.
    --
    -- -   @server-ip-address@ – The IP address of the schema database\'s
    --     server.
    --
    -- An example is:
    -- @describe-fleet-advisor-schemas --filter Name=\"schema-id\",Values=\"50\"@
    DescribeFleetAdvisorSchemas -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | Sets the maximum number of records returned in the response.
    DescribeFleetAdvisorSchemas -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | If @NextToken@ is returned by a previous response, there are more
    -- results available. The value of @NextToken@ is a unique pagination token
    -- for each page. Make the call again using the returned token to retrieve
    -- the next page. Keep all other arguments unchanged.
    DescribeFleetAdvisorSchemas -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeFleetAdvisorSchemas -> DescribeFleetAdvisorSchemas -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFleetAdvisorSchemas -> DescribeFleetAdvisorSchemas -> Bool
$c/= :: DescribeFleetAdvisorSchemas -> DescribeFleetAdvisorSchemas -> Bool
== :: DescribeFleetAdvisorSchemas -> DescribeFleetAdvisorSchemas -> Bool
$c== :: DescribeFleetAdvisorSchemas -> DescribeFleetAdvisorSchemas -> Bool
Prelude.Eq, ReadPrec [DescribeFleetAdvisorSchemas]
ReadPrec DescribeFleetAdvisorSchemas
Int -> ReadS DescribeFleetAdvisorSchemas
ReadS [DescribeFleetAdvisorSchemas]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFleetAdvisorSchemas]
$creadListPrec :: ReadPrec [DescribeFleetAdvisorSchemas]
readPrec :: ReadPrec DescribeFleetAdvisorSchemas
$creadPrec :: ReadPrec DescribeFleetAdvisorSchemas
readList :: ReadS [DescribeFleetAdvisorSchemas]
$creadList :: ReadS [DescribeFleetAdvisorSchemas]
readsPrec :: Int -> ReadS DescribeFleetAdvisorSchemas
$creadsPrec :: Int -> ReadS DescribeFleetAdvisorSchemas
Prelude.Read, Int -> DescribeFleetAdvisorSchemas -> ShowS
[DescribeFleetAdvisorSchemas] -> ShowS
DescribeFleetAdvisorSchemas -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFleetAdvisorSchemas] -> ShowS
$cshowList :: [DescribeFleetAdvisorSchemas] -> ShowS
show :: DescribeFleetAdvisorSchemas -> String
$cshow :: DescribeFleetAdvisorSchemas -> String
showsPrec :: Int -> DescribeFleetAdvisorSchemas -> ShowS
$cshowsPrec :: Int -> DescribeFleetAdvisorSchemas -> ShowS
Prelude.Show, forall x.
Rep DescribeFleetAdvisorSchemas x -> DescribeFleetAdvisorSchemas
forall x.
DescribeFleetAdvisorSchemas -> Rep DescribeFleetAdvisorSchemas x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFleetAdvisorSchemas x -> DescribeFleetAdvisorSchemas
$cfrom :: forall x.
DescribeFleetAdvisorSchemas -> Rep DescribeFleetAdvisorSchemas x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFleetAdvisorSchemas' 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:
--
-- 'filters', 'describeFleetAdvisorSchemas_filters' - If you specify any of the following filters, the output includes
-- information for only those schemas that meet the filter criteria:
--
-- -   @complexity@ – The schema\'s complexity, for example @Simple@.
--
-- -   @database-id@ – The ID of the schema\'s database.
--
-- -   @database-ip-address@ – The IP address of the schema\'s database.
--
-- -   @database-name@ – The name of the schema\'s database.
--
-- -   @database-engine@ – The name of the schema database\'s engine.
--
-- -   @original-schema-name@ – The name of the schema\'s database\'s main
--     schema.
--
-- -   @schema-id@ – The ID of the schema, for example @15@.
--
-- -   @schema-name@ – The name of the schema.
--
-- -   @server-ip-address@ – The IP address of the schema database\'s
--     server.
--
-- An example is:
-- @describe-fleet-advisor-schemas --filter Name=\"schema-id\",Values=\"50\"@
--
-- 'maxRecords', 'describeFleetAdvisorSchemas_maxRecords' - Sets the maximum number of records returned in the response.
--
-- 'nextToken', 'describeFleetAdvisorSchemas_nextToken' - If @NextToken@ is returned by a previous response, there are more
-- results available. The value of @NextToken@ is a unique pagination token
-- for each page. Make the call again using the returned token to retrieve
-- the next page. Keep all other arguments unchanged.
newDescribeFleetAdvisorSchemas ::
  DescribeFleetAdvisorSchemas
newDescribeFleetAdvisorSchemas :: DescribeFleetAdvisorSchemas
newDescribeFleetAdvisorSchemas =
  DescribeFleetAdvisorSchemas'
    { $sel:filters:DescribeFleetAdvisorSchemas' :: Maybe [Filter]
filters =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeFleetAdvisorSchemas' :: Maybe Int
maxRecords = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeFleetAdvisorSchemas' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | If you specify any of the following filters, the output includes
-- information for only those schemas that meet the filter criteria:
--
-- -   @complexity@ – The schema\'s complexity, for example @Simple@.
--
-- -   @database-id@ – The ID of the schema\'s database.
--
-- -   @database-ip-address@ – The IP address of the schema\'s database.
--
-- -   @database-name@ – The name of the schema\'s database.
--
-- -   @database-engine@ – The name of the schema database\'s engine.
--
-- -   @original-schema-name@ – The name of the schema\'s database\'s main
--     schema.
--
-- -   @schema-id@ – The ID of the schema, for example @15@.
--
-- -   @schema-name@ – The name of the schema.
--
-- -   @server-ip-address@ – The IP address of the schema database\'s
--     server.
--
-- An example is:
-- @describe-fleet-advisor-schemas --filter Name=\"schema-id\",Values=\"50\"@
describeFleetAdvisorSchemas_filters :: Lens.Lens' DescribeFleetAdvisorSchemas (Prelude.Maybe [Filter])
describeFleetAdvisorSchemas_filters :: Lens' DescribeFleetAdvisorSchemas (Maybe [Filter])
describeFleetAdvisorSchemas_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetAdvisorSchemas' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeFleetAdvisorSchemas' :: DescribeFleetAdvisorSchemas -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeFleetAdvisorSchemas
s@DescribeFleetAdvisorSchemas' {} Maybe [Filter]
a -> DescribeFleetAdvisorSchemas
s {$sel:filters:DescribeFleetAdvisorSchemas' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeFleetAdvisorSchemas) 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

-- | Sets the maximum number of records returned in the response.
describeFleetAdvisorSchemas_maxRecords :: Lens.Lens' DescribeFleetAdvisorSchemas (Prelude.Maybe Prelude.Int)
describeFleetAdvisorSchemas_maxRecords :: Lens' DescribeFleetAdvisorSchemas (Maybe Int)
describeFleetAdvisorSchemas_maxRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetAdvisorSchemas' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeFleetAdvisorSchemas' :: DescribeFleetAdvisorSchemas -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeFleetAdvisorSchemas
s@DescribeFleetAdvisorSchemas' {} Maybe Int
a -> DescribeFleetAdvisorSchemas
s {$sel:maxRecords:DescribeFleetAdvisorSchemas' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeFleetAdvisorSchemas)

-- | If @NextToken@ is returned by a previous response, there are more
-- results available. The value of @NextToken@ is a unique pagination token
-- for each page. Make the call again using the returned token to retrieve
-- the next page. Keep all other arguments unchanged.
describeFleetAdvisorSchemas_nextToken :: Lens.Lens' DescribeFleetAdvisorSchemas (Prelude.Maybe Prelude.Text)
describeFleetAdvisorSchemas_nextToken :: Lens' DescribeFleetAdvisorSchemas (Maybe Text)
describeFleetAdvisorSchemas_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetAdvisorSchemas' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeFleetAdvisorSchemas' :: DescribeFleetAdvisorSchemas -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeFleetAdvisorSchemas
s@DescribeFleetAdvisorSchemas' {} Maybe Text
a -> DescribeFleetAdvisorSchemas
s {$sel:nextToken:DescribeFleetAdvisorSchemas' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeFleetAdvisorSchemas)

instance Core.AWSRequest DescribeFleetAdvisorSchemas where
  type
    AWSResponse DescribeFleetAdvisorSchemas =
      DescribeFleetAdvisorSchemasResponse
  request :: (Service -> Service)
-> DescribeFleetAdvisorSchemas
-> Request DescribeFleetAdvisorSchemas
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 DescribeFleetAdvisorSchemas
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeFleetAdvisorSchemas)))
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 [SchemaResponse]
-> Maybe Text -> Int -> DescribeFleetAdvisorSchemasResponse
DescribeFleetAdvisorSchemasResponse'
            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
"FleetAdvisorSchemas"
                            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.<*> (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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeFleetAdvisorSchemas where
  hashWithSalt :: Int -> DescribeFleetAdvisorSchemas -> Int
hashWithSalt Int
_salt DescribeFleetAdvisorSchemas' {Maybe Int
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxRecords :: Maybe Int
filters :: Maybe [Filter]
$sel:nextToken:DescribeFleetAdvisorSchemas' :: DescribeFleetAdvisorSchemas -> Maybe Text
$sel:maxRecords:DescribeFleetAdvisorSchemas' :: DescribeFleetAdvisorSchemas -> Maybe Int
$sel:filters:DescribeFleetAdvisorSchemas' :: DescribeFleetAdvisorSchemas -> Maybe [Filter]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxRecords
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData DescribeFleetAdvisorSchemas where
  rnf :: DescribeFleetAdvisorSchemas -> ()
rnf DescribeFleetAdvisorSchemas' {Maybe Int
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxRecords :: Maybe Int
filters :: Maybe [Filter]
$sel:nextToken:DescribeFleetAdvisorSchemas' :: DescribeFleetAdvisorSchemas -> Maybe Text
$sel:maxRecords:DescribeFleetAdvisorSchemas' :: DescribeFleetAdvisorSchemas -> Maybe Int
$sel:filters:DescribeFleetAdvisorSchemas' :: DescribeFleetAdvisorSchemas -> Maybe [Filter]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxRecords
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders DescribeFleetAdvisorSchemas where
  toHeaders :: DescribeFleetAdvisorSchemas -> 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
"AmazonDMSv20160101.DescribeFleetAdvisorSchemas" ::
                          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 DescribeFleetAdvisorSchemas where
  toJSON :: DescribeFleetAdvisorSchemas -> Value
toJSON DescribeFleetAdvisorSchemas' {Maybe Int
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxRecords :: Maybe Int
filters :: Maybe [Filter]
$sel:nextToken:DescribeFleetAdvisorSchemas' :: DescribeFleetAdvisorSchemas -> Maybe Text
$sel:maxRecords:DescribeFleetAdvisorSchemas' :: DescribeFleetAdvisorSchemas -> Maybe Int
$sel:filters:DescribeFleetAdvisorSchemas' :: DescribeFleetAdvisorSchemas -> Maybe [Filter]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Filters" 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 [Filter]
filters,
            (Key
"MaxRecords" 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 Int
maxRecords,
            (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
          ]
      )

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

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

-- | /See:/ 'newDescribeFleetAdvisorSchemasResponse' smart constructor.
data DescribeFleetAdvisorSchemasResponse = DescribeFleetAdvisorSchemasResponse'
  { -- | A collection of @SchemaResponse@ objects.
    DescribeFleetAdvisorSchemasResponse -> Maybe [SchemaResponse]
fleetAdvisorSchemas :: Prelude.Maybe [SchemaResponse],
    -- | If @NextToken@ is returned, there are more results available. The value
    -- of @NextToken@ is a unique pagination token for each page. Make the call
    -- again using the returned token to retrieve the next page. Keep all other
    -- arguments unchanged.
    DescribeFleetAdvisorSchemasResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeFleetAdvisorSchemasResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeFleetAdvisorSchemasResponse
-> DescribeFleetAdvisorSchemasResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFleetAdvisorSchemasResponse
-> DescribeFleetAdvisorSchemasResponse -> Bool
$c/= :: DescribeFleetAdvisorSchemasResponse
-> DescribeFleetAdvisorSchemasResponse -> Bool
== :: DescribeFleetAdvisorSchemasResponse
-> DescribeFleetAdvisorSchemasResponse -> Bool
$c== :: DescribeFleetAdvisorSchemasResponse
-> DescribeFleetAdvisorSchemasResponse -> Bool
Prelude.Eq, ReadPrec [DescribeFleetAdvisorSchemasResponse]
ReadPrec DescribeFleetAdvisorSchemasResponse
Int -> ReadS DescribeFleetAdvisorSchemasResponse
ReadS [DescribeFleetAdvisorSchemasResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFleetAdvisorSchemasResponse]
$creadListPrec :: ReadPrec [DescribeFleetAdvisorSchemasResponse]
readPrec :: ReadPrec DescribeFleetAdvisorSchemasResponse
$creadPrec :: ReadPrec DescribeFleetAdvisorSchemasResponse
readList :: ReadS [DescribeFleetAdvisorSchemasResponse]
$creadList :: ReadS [DescribeFleetAdvisorSchemasResponse]
readsPrec :: Int -> ReadS DescribeFleetAdvisorSchemasResponse
$creadsPrec :: Int -> ReadS DescribeFleetAdvisorSchemasResponse
Prelude.Read, Int -> DescribeFleetAdvisorSchemasResponse -> ShowS
[DescribeFleetAdvisorSchemasResponse] -> ShowS
DescribeFleetAdvisorSchemasResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFleetAdvisorSchemasResponse] -> ShowS
$cshowList :: [DescribeFleetAdvisorSchemasResponse] -> ShowS
show :: DescribeFleetAdvisorSchemasResponse -> String
$cshow :: DescribeFleetAdvisorSchemasResponse -> String
showsPrec :: Int -> DescribeFleetAdvisorSchemasResponse -> ShowS
$cshowsPrec :: Int -> DescribeFleetAdvisorSchemasResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeFleetAdvisorSchemasResponse x
-> DescribeFleetAdvisorSchemasResponse
forall x.
DescribeFleetAdvisorSchemasResponse
-> Rep DescribeFleetAdvisorSchemasResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFleetAdvisorSchemasResponse x
-> DescribeFleetAdvisorSchemasResponse
$cfrom :: forall x.
DescribeFleetAdvisorSchemasResponse
-> Rep DescribeFleetAdvisorSchemasResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFleetAdvisorSchemasResponse' 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:
--
-- 'fleetAdvisorSchemas', 'describeFleetAdvisorSchemasResponse_fleetAdvisorSchemas' - A collection of @SchemaResponse@ objects.
--
-- 'nextToken', 'describeFleetAdvisorSchemasResponse_nextToken' - If @NextToken@ is returned, there are more results available. The value
-- of @NextToken@ is a unique pagination token for each page. Make the call
-- again using the returned token to retrieve the next page. Keep all other
-- arguments unchanged.
--
-- 'httpStatus', 'describeFleetAdvisorSchemasResponse_httpStatus' - The response's http status code.
newDescribeFleetAdvisorSchemasResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeFleetAdvisorSchemasResponse
newDescribeFleetAdvisorSchemasResponse :: Int -> DescribeFleetAdvisorSchemasResponse
newDescribeFleetAdvisorSchemasResponse Int
pHttpStatus_ =
  DescribeFleetAdvisorSchemasResponse'
    { $sel:fleetAdvisorSchemas:DescribeFleetAdvisorSchemasResponse' :: Maybe [SchemaResponse]
fleetAdvisorSchemas =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeFleetAdvisorSchemasResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeFleetAdvisorSchemasResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A collection of @SchemaResponse@ objects.
describeFleetAdvisorSchemasResponse_fleetAdvisorSchemas :: Lens.Lens' DescribeFleetAdvisorSchemasResponse (Prelude.Maybe [SchemaResponse])
describeFleetAdvisorSchemasResponse_fleetAdvisorSchemas :: Lens' DescribeFleetAdvisorSchemasResponse (Maybe [SchemaResponse])
describeFleetAdvisorSchemasResponse_fleetAdvisorSchemas = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetAdvisorSchemasResponse' {Maybe [SchemaResponse]
fleetAdvisorSchemas :: Maybe [SchemaResponse]
$sel:fleetAdvisorSchemas:DescribeFleetAdvisorSchemasResponse' :: DescribeFleetAdvisorSchemasResponse -> Maybe [SchemaResponse]
fleetAdvisorSchemas} -> Maybe [SchemaResponse]
fleetAdvisorSchemas) (\s :: DescribeFleetAdvisorSchemasResponse
s@DescribeFleetAdvisorSchemasResponse' {} Maybe [SchemaResponse]
a -> DescribeFleetAdvisorSchemasResponse
s {$sel:fleetAdvisorSchemas:DescribeFleetAdvisorSchemasResponse' :: Maybe [SchemaResponse]
fleetAdvisorSchemas = Maybe [SchemaResponse]
a} :: DescribeFleetAdvisorSchemasResponse) 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

-- | If @NextToken@ is returned, there are more results available. The value
-- of @NextToken@ is a unique pagination token for each page. Make the call
-- again using the returned token to retrieve the next page. Keep all other
-- arguments unchanged.
describeFleetAdvisorSchemasResponse_nextToken :: Lens.Lens' DescribeFleetAdvisorSchemasResponse (Prelude.Maybe Prelude.Text)
describeFleetAdvisorSchemasResponse_nextToken :: Lens' DescribeFleetAdvisorSchemasResponse (Maybe Text)
describeFleetAdvisorSchemasResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetAdvisorSchemasResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeFleetAdvisorSchemasResponse' :: DescribeFleetAdvisorSchemasResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeFleetAdvisorSchemasResponse
s@DescribeFleetAdvisorSchemasResponse' {} Maybe Text
a -> DescribeFleetAdvisorSchemasResponse
s {$sel:nextToken:DescribeFleetAdvisorSchemasResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeFleetAdvisorSchemasResponse)

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

instance
  Prelude.NFData
    DescribeFleetAdvisorSchemasResponse
  where
  rnf :: DescribeFleetAdvisorSchemasResponse -> ()
rnf DescribeFleetAdvisorSchemasResponse' {Int
Maybe [SchemaResponse]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
fleetAdvisorSchemas :: Maybe [SchemaResponse]
$sel:httpStatus:DescribeFleetAdvisorSchemasResponse' :: DescribeFleetAdvisorSchemasResponse -> Int
$sel:nextToken:DescribeFleetAdvisorSchemasResponse' :: DescribeFleetAdvisorSchemasResponse -> Maybe Text
$sel:fleetAdvisorSchemas:DescribeFleetAdvisorSchemasResponse' :: DescribeFleetAdvisorSchemasResponse -> Maybe [SchemaResponse]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [SchemaResponse]
fleetAdvisorSchemas
      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 Int
httpStatus