{-# 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.ElasticSearch.DescribeInboundCrossClusterSearchConnections
-- 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)
--
-- Lists all the inbound cross-cluster search connections for a destination
-- domain.
module Amazonka.ElasticSearch.DescribeInboundCrossClusterSearchConnections
  ( -- * Creating a Request
    DescribeInboundCrossClusterSearchConnections (..),
    newDescribeInboundCrossClusterSearchConnections,

    -- * Request Lenses
    describeInboundCrossClusterSearchConnections_filters,
    describeInboundCrossClusterSearchConnections_nextToken,
    describeInboundCrossClusterSearchConnections_maxResults,

    -- * Destructuring the Response
    DescribeInboundCrossClusterSearchConnectionsResponse (..),
    newDescribeInboundCrossClusterSearchConnectionsResponse,

    -- * Response Lenses
    describeInboundCrossClusterSearchConnectionsResponse_crossClusterSearchConnections,
    describeInboundCrossClusterSearchConnectionsResponse_nextToken,
    describeInboundCrossClusterSearchConnectionsResponse_httpStatus,
  )
where

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

-- | Container for the parameters to the
-- @DescribeInboundCrossClusterSearchConnections@ operation.
--
-- /See:/ 'newDescribeInboundCrossClusterSearchConnections' smart constructor.
data DescribeInboundCrossClusterSearchConnections = DescribeInboundCrossClusterSearchConnections'
  { -- | A list of filters used to match properties for inbound cross-cluster
    -- search connection. Available @Filter@ names for this operation are:
    --
    -- -   cross-cluster-search-connection-id
    -- -   source-domain-info.domain-name
    -- -   source-domain-info.owner-id
    -- -   source-domain-info.region
    -- -   destination-domain-info.domain-name
    DescribeInboundCrossClusterSearchConnections -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | NextToken is sent in case the earlier API call results contain the
    -- NextToken. It is used for pagination.
    DescribeInboundCrossClusterSearchConnections -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Set this value to limit the number of results returned. If not
    -- specified, defaults to 100.
    DescribeInboundCrossClusterSearchConnections -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeInboundCrossClusterSearchConnections
-> DescribeInboundCrossClusterSearchConnections -> Bool
(DescribeInboundCrossClusterSearchConnections
 -> DescribeInboundCrossClusterSearchConnections -> Bool)
-> (DescribeInboundCrossClusterSearchConnections
    -> DescribeInboundCrossClusterSearchConnections -> Bool)
-> Eq DescribeInboundCrossClusterSearchConnections
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInboundCrossClusterSearchConnections
-> DescribeInboundCrossClusterSearchConnections -> Bool
$c/= :: DescribeInboundCrossClusterSearchConnections
-> DescribeInboundCrossClusterSearchConnections -> Bool
== :: DescribeInboundCrossClusterSearchConnections
-> DescribeInboundCrossClusterSearchConnections -> Bool
$c== :: DescribeInboundCrossClusterSearchConnections
-> DescribeInboundCrossClusterSearchConnections -> Bool
Prelude.Eq, ReadPrec [DescribeInboundCrossClusterSearchConnections]
ReadPrec DescribeInboundCrossClusterSearchConnections
Int -> ReadS DescribeInboundCrossClusterSearchConnections
ReadS [DescribeInboundCrossClusterSearchConnections]
(Int -> ReadS DescribeInboundCrossClusterSearchConnections)
-> ReadS [DescribeInboundCrossClusterSearchConnections]
-> ReadPrec DescribeInboundCrossClusterSearchConnections
-> ReadPrec [DescribeInboundCrossClusterSearchConnections]
-> Read DescribeInboundCrossClusterSearchConnections
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInboundCrossClusterSearchConnections]
$creadListPrec :: ReadPrec [DescribeInboundCrossClusterSearchConnections]
readPrec :: ReadPrec DescribeInboundCrossClusterSearchConnections
$creadPrec :: ReadPrec DescribeInboundCrossClusterSearchConnections
readList :: ReadS [DescribeInboundCrossClusterSearchConnections]
$creadList :: ReadS [DescribeInboundCrossClusterSearchConnections]
readsPrec :: Int -> ReadS DescribeInboundCrossClusterSearchConnections
$creadsPrec :: Int -> ReadS DescribeInboundCrossClusterSearchConnections
Prelude.Read, Int -> DescribeInboundCrossClusterSearchConnections -> ShowS
[DescribeInboundCrossClusterSearchConnections] -> ShowS
DescribeInboundCrossClusterSearchConnections -> String
(Int -> DescribeInboundCrossClusterSearchConnections -> ShowS)
-> (DescribeInboundCrossClusterSearchConnections -> String)
-> ([DescribeInboundCrossClusterSearchConnections] -> ShowS)
-> Show DescribeInboundCrossClusterSearchConnections
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInboundCrossClusterSearchConnections] -> ShowS
$cshowList :: [DescribeInboundCrossClusterSearchConnections] -> ShowS
show :: DescribeInboundCrossClusterSearchConnections -> String
$cshow :: DescribeInboundCrossClusterSearchConnections -> String
showsPrec :: Int -> DescribeInboundCrossClusterSearchConnections -> ShowS
$cshowsPrec :: Int -> DescribeInboundCrossClusterSearchConnections -> ShowS
Prelude.Show, (forall x.
 DescribeInboundCrossClusterSearchConnections
 -> Rep DescribeInboundCrossClusterSearchConnections x)
-> (forall x.
    Rep DescribeInboundCrossClusterSearchConnections x
    -> DescribeInboundCrossClusterSearchConnections)
-> Generic DescribeInboundCrossClusterSearchConnections
forall x.
Rep DescribeInboundCrossClusterSearchConnections x
-> DescribeInboundCrossClusterSearchConnections
forall x.
DescribeInboundCrossClusterSearchConnections
-> Rep DescribeInboundCrossClusterSearchConnections x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeInboundCrossClusterSearchConnections x
-> DescribeInboundCrossClusterSearchConnections
$cfrom :: forall x.
DescribeInboundCrossClusterSearchConnections
-> Rep DescribeInboundCrossClusterSearchConnections x
Prelude.Generic)

-- |
-- Create a value of 'DescribeInboundCrossClusterSearchConnections' 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', 'describeInboundCrossClusterSearchConnections_filters' - A list of filters used to match properties for inbound cross-cluster
-- search connection. Available @Filter@ names for this operation are:
--
-- -   cross-cluster-search-connection-id
-- -   source-domain-info.domain-name
-- -   source-domain-info.owner-id
-- -   source-domain-info.region
-- -   destination-domain-info.domain-name
--
-- 'nextToken', 'describeInboundCrossClusterSearchConnections_nextToken' - NextToken is sent in case the earlier API call results contain the
-- NextToken. It is used for pagination.
--
-- 'maxResults', 'describeInboundCrossClusterSearchConnections_maxResults' - Set this value to limit the number of results returned. If not
-- specified, defaults to 100.
newDescribeInboundCrossClusterSearchConnections ::
  DescribeInboundCrossClusterSearchConnections
newDescribeInboundCrossClusterSearchConnections :: DescribeInboundCrossClusterSearchConnections
newDescribeInboundCrossClusterSearchConnections =
  DescribeInboundCrossClusterSearchConnections' :: Maybe [Filter]
-> Maybe Text
-> Maybe Int
-> DescribeInboundCrossClusterSearchConnections
DescribeInboundCrossClusterSearchConnections'
    { $sel:filters:DescribeInboundCrossClusterSearchConnections' :: Maybe [Filter]
filters =
        Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeInboundCrossClusterSearchConnections' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeInboundCrossClusterSearchConnections' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | A list of filters used to match properties for inbound cross-cluster
-- search connection. Available @Filter@ names for this operation are:
--
-- -   cross-cluster-search-connection-id
-- -   source-domain-info.domain-name
-- -   source-domain-info.owner-id
-- -   source-domain-info.region
-- -   destination-domain-info.domain-name
describeInboundCrossClusterSearchConnections_filters :: Lens.Lens' DescribeInboundCrossClusterSearchConnections (Prelude.Maybe [Filter])
describeInboundCrossClusterSearchConnections_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeInboundCrossClusterSearchConnections
-> f DescribeInboundCrossClusterSearchConnections
describeInboundCrossClusterSearchConnections_filters = (DescribeInboundCrossClusterSearchConnections -> Maybe [Filter])
-> (DescribeInboundCrossClusterSearchConnections
    -> Maybe [Filter] -> DescribeInboundCrossClusterSearchConnections)
-> Lens
     DescribeInboundCrossClusterSearchConnections
     DescribeInboundCrossClusterSearchConnections
     (Maybe [Filter])
     (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInboundCrossClusterSearchConnections' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeInboundCrossClusterSearchConnections' :: DescribeInboundCrossClusterSearchConnections -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeInboundCrossClusterSearchConnections
s@DescribeInboundCrossClusterSearchConnections' {} Maybe [Filter]
a -> DescribeInboundCrossClusterSearchConnections
s {$sel:filters:DescribeInboundCrossClusterSearchConnections' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeInboundCrossClusterSearchConnections) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> DescribeInboundCrossClusterSearchConnections
 -> f DescribeInboundCrossClusterSearchConnections)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeInboundCrossClusterSearchConnections
-> f DescribeInboundCrossClusterSearchConnections
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
     (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

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

instance
  Prelude.NFData
    DescribeInboundCrossClusterSearchConnections

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

instance
  Core.ToJSON
    DescribeInboundCrossClusterSearchConnections
  where
  toJSON :: DescribeInboundCrossClusterSearchConnections -> Value
toJSON
    DescribeInboundCrossClusterSearchConnections' {Maybe Int
Maybe [Filter]
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
filters :: Maybe [Filter]
$sel:maxResults:DescribeInboundCrossClusterSearchConnections' :: DescribeInboundCrossClusterSearchConnections -> Maybe Int
$sel:nextToken:DescribeInboundCrossClusterSearchConnections' :: DescribeInboundCrossClusterSearchConnections -> Maybe Text
$sel:filters:DescribeInboundCrossClusterSearchConnections' :: DescribeInboundCrossClusterSearchConnections -> Maybe [Filter]
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ (Text
"Filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
              (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 -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
            ]
        )

instance
  Core.ToPath
    DescribeInboundCrossClusterSearchConnections
  where
  toPath :: DescribeInboundCrossClusterSearchConnections -> ByteString
toPath =
    ByteString
-> DescribeInboundCrossClusterSearchConnections -> ByteString
forall a b. a -> b -> a
Prelude.const
      ByteString
"/2015-01-01/es/ccs/inboundConnection/search"

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

-- | The result of a @DescribeInboundCrossClusterSearchConnections@ request.
-- Contains the list of connections matching the filter criteria.
--
-- /See:/ 'newDescribeInboundCrossClusterSearchConnectionsResponse' smart constructor.
data DescribeInboundCrossClusterSearchConnectionsResponse = DescribeInboundCrossClusterSearchConnectionsResponse'
  { -- | Consists of list of @InboundCrossClusterSearchConnection@ matching the
    -- specified filter criteria.
    DescribeInboundCrossClusterSearchConnectionsResponse
-> Maybe [InboundCrossClusterSearchConnection]
crossClusterSearchConnections :: Prelude.Maybe [InboundCrossClusterSearchConnection],
    -- | If more results are available and NextToken is present, make the next
    -- request to the same API with the received NextToken to paginate the
    -- remaining results.
    DescribeInboundCrossClusterSearchConnectionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeInboundCrossClusterSearchConnectionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeInboundCrossClusterSearchConnectionsResponse
-> DescribeInboundCrossClusterSearchConnectionsResponse -> Bool
(DescribeInboundCrossClusterSearchConnectionsResponse
 -> DescribeInboundCrossClusterSearchConnectionsResponse -> Bool)
-> (DescribeInboundCrossClusterSearchConnectionsResponse
    -> DescribeInboundCrossClusterSearchConnectionsResponse -> Bool)
-> Eq DescribeInboundCrossClusterSearchConnectionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInboundCrossClusterSearchConnectionsResponse
-> DescribeInboundCrossClusterSearchConnectionsResponse -> Bool
$c/= :: DescribeInboundCrossClusterSearchConnectionsResponse
-> DescribeInboundCrossClusterSearchConnectionsResponse -> Bool
== :: DescribeInboundCrossClusterSearchConnectionsResponse
-> DescribeInboundCrossClusterSearchConnectionsResponse -> Bool
$c== :: DescribeInboundCrossClusterSearchConnectionsResponse
-> DescribeInboundCrossClusterSearchConnectionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeInboundCrossClusterSearchConnectionsResponse]
ReadPrec DescribeInboundCrossClusterSearchConnectionsResponse
Int -> ReadS DescribeInboundCrossClusterSearchConnectionsResponse
ReadS [DescribeInboundCrossClusterSearchConnectionsResponse]
(Int -> ReadS DescribeInboundCrossClusterSearchConnectionsResponse)
-> ReadS [DescribeInboundCrossClusterSearchConnectionsResponse]
-> ReadPrec DescribeInboundCrossClusterSearchConnectionsResponse
-> ReadPrec [DescribeInboundCrossClusterSearchConnectionsResponse]
-> Read DescribeInboundCrossClusterSearchConnectionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInboundCrossClusterSearchConnectionsResponse]
$creadListPrec :: ReadPrec [DescribeInboundCrossClusterSearchConnectionsResponse]
readPrec :: ReadPrec DescribeInboundCrossClusterSearchConnectionsResponse
$creadPrec :: ReadPrec DescribeInboundCrossClusterSearchConnectionsResponse
readList :: ReadS [DescribeInboundCrossClusterSearchConnectionsResponse]
$creadList :: ReadS [DescribeInboundCrossClusterSearchConnectionsResponse]
readsPrec :: Int -> ReadS DescribeInboundCrossClusterSearchConnectionsResponse
$creadsPrec :: Int -> ReadS DescribeInboundCrossClusterSearchConnectionsResponse
Prelude.Read, Int
-> DescribeInboundCrossClusterSearchConnectionsResponse -> ShowS
[DescribeInboundCrossClusterSearchConnectionsResponse] -> ShowS
DescribeInboundCrossClusterSearchConnectionsResponse -> String
(Int
 -> DescribeInboundCrossClusterSearchConnectionsResponse -> ShowS)
-> (DescribeInboundCrossClusterSearchConnectionsResponse -> String)
-> ([DescribeInboundCrossClusterSearchConnectionsResponse]
    -> ShowS)
-> Show DescribeInboundCrossClusterSearchConnectionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInboundCrossClusterSearchConnectionsResponse] -> ShowS
$cshowList :: [DescribeInboundCrossClusterSearchConnectionsResponse] -> ShowS
show :: DescribeInboundCrossClusterSearchConnectionsResponse -> String
$cshow :: DescribeInboundCrossClusterSearchConnectionsResponse -> String
showsPrec :: Int
-> DescribeInboundCrossClusterSearchConnectionsResponse -> ShowS
$cshowsPrec :: Int
-> DescribeInboundCrossClusterSearchConnectionsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeInboundCrossClusterSearchConnectionsResponse
 -> Rep DescribeInboundCrossClusterSearchConnectionsResponse x)
-> (forall x.
    Rep DescribeInboundCrossClusterSearchConnectionsResponse x
    -> DescribeInboundCrossClusterSearchConnectionsResponse)
-> Generic DescribeInboundCrossClusterSearchConnectionsResponse
forall x.
Rep DescribeInboundCrossClusterSearchConnectionsResponse x
-> DescribeInboundCrossClusterSearchConnectionsResponse
forall x.
DescribeInboundCrossClusterSearchConnectionsResponse
-> Rep DescribeInboundCrossClusterSearchConnectionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeInboundCrossClusterSearchConnectionsResponse x
-> DescribeInboundCrossClusterSearchConnectionsResponse
$cfrom :: forall x.
DescribeInboundCrossClusterSearchConnectionsResponse
-> Rep DescribeInboundCrossClusterSearchConnectionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeInboundCrossClusterSearchConnectionsResponse' 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:
--
-- 'crossClusterSearchConnections', 'describeInboundCrossClusterSearchConnectionsResponse_crossClusterSearchConnections' - Consists of list of @InboundCrossClusterSearchConnection@ matching the
-- specified filter criteria.
--
-- 'nextToken', 'describeInboundCrossClusterSearchConnectionsResponse_nextToken' - If more results are available and NextToken is present, make the next
-- request to the same API with the received NextToken to paginate the
-- remaining results.
--
-- 'httpStatus', 'describeInboundCrossClusterSearchConnectionsResponse_httpStatus' - The response's http status code.
newDescribeInboundCrossClusterSearchConnectionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeInboundCrossClusterSearchConnectionsResponse
newDescribeInboundCrossClusterSearchConnectionsResponse :: Int -> DescribeInboundCrossClusterSearchConnectionsResponse
newDescribeInboundCrossClusterSearchConnectionsResponse
  Int
pHttpStatus_ =
    DescribeInboundCrossClusterSearchConnectionsResponse' :: Maybe [InboundCrossClusterSearchConnection]
-> Maybe Text
-> Int
-> DescribeInboundCrossClusterSearchConnectionsResponse
DescribeInboundCrossClusterSearchConnectionsResponse'
      { $sel:crossClusterSearchConnections:DescribeInboundCrossClusterSearchConnectionsResponse' :: Maybe [InboundCrossClusterSearchConnection]
crossClusterSearchConnections =
          Maybe [InboundCrossClusterSearchConnection]
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeInboundCrossClusterSearchConnectionsResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeInboundCrossClusterSearchConnectionsResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | Consists of list of @InboundCrossClusterSearchConnection@ matching the
-- specified filter criteria.
describeInboundCrossClusterSearchConnectionsResponse_crossClusterSearchConnections :: Lens.Lens' DescribeInboundCrossClusterSearchConnectionsResponse (Prelude.Maybe [InboundCrossClusterSearchConnection])
describeInboundCrossClusterSearchConnectionsResponse_crossClusterSearchConnections :: (Maybe [InboundCrossClusterSearchConnection]
 -> f (Maybe [InboundCrossClusterSearchConnection]))
-> DescribeInboundCrossClusterSearchConnectionsResponse
-> f DescribeInboundCrossClusterSearchConnectionsResponse
describeInboundCrossClusterSearchConnectionsResponse_crossClusterSearchConnections = (DescribeInboundCrossClusterSearchConnectionsResponse
 -> Maybe [InboundCrossClusterSearchConnection])
-> (DescribeInboundCrossClusterSearchConnectionsResponse
    -> Maybe [InboundCrossClusterSearchConnection]
    -> DescribeInboundCrossClusterSearchConnectionsResponse)
-> Lens
     DescribeInboundCrossClusterSearchConnectionsResponse
     DescribeInboundCrossClusterSearchConnectionsResponse
     (Maybe [InboundCrossClusterSearchConnection])
     (Maybe [InboundCrossClusterSearchConnection])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInboundCrossClusterSearchConnectionsResponse' {Maybe [InboundCrossClusterSearchConnection]
crossClusterSearchConnections :: Maybe [InboundCrossClusterSearchConnection]
$sel:crossClusterSearchConnections:DescribeInboundCrossClusterSearchConnectionsResponse' :: DescribeInboundCrossClusterSearchConnectionsResponse
-> Maybe [InboundCrossClusterSearchConnection]
crossClusterSearchConnections} -> Maybe [InboundCrossClusterSearchConnection]
crossClusterSearchConnections) (\s :: DescribeInboundCrossClusterSearchConnectionsResponse
s@DescribeInboundCrossClusterSearchConnectionsResponse' {} Maybe [InboundCrossClusterSearchConnection]
a -> DescribeInboundCrossClusterSearchConnectionsResponse
s {$sel:crossClusterSearchConnections:DescribeInboundCrossClusterSearchConnectionsResponse' :: Maybe [InboundCrossClusterSearchConnection]
crossClusterSearchConnections = Maybe [InboundCrossClusterSearchConnection]
a} :: DescribeInboundCrossClusterSearchConnectionsResponse) ((Maybe [InboundCrossClusterSearchConnection]
  -> f (Maybe [InboundCrossClusterSearchConnection]))
 -> DescribeInboundCrossClusterSearchConnectionsResponse
 -> f DescribeInboundCrossClusterSearchConnectionsResponse)
-> ((Maybe [InboundCrossClusterSearchConnection]
     -> f (Maybe [InboundCrossClusterSearchConnection]))
    -> Maybe [InboundCrossClusterSearchConnection]
    -> f (Maybe [InboundCrossClusterSearchConnection]))
-> (Maybe [InboundCrossClusterSearchConnection]
    -> f (Maybe [InboundCrossClusterSearchConnection]))
-> DescribeInboundCrossClusterSearchConnectionsResponse
-> f DescribeInboundCrossClusterSearchConnectionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InboundCrossClusterSearchConnection]
  [InboundCrossClusterSearchConnection]
  [InboundCrossClusterSearchConnection]
  [InboundCrossClusterSearchConnection]
-> Iso
     (Maybe [InboundCrossClusterSearchConnection])
     (Maybe [InboundCrossClusterSearchConnection])
     (Maybe [InboundCrossClusterSearchConnection])
     (Maybe [InboundCrossClusterSearchConnection])
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
  [InboundCrossClusterSearchConnection]
  [InboundCrossClusterSearchConnection]
  [InboundCrossClusterSearchConnection]
  [InboundCrossClusterSearchConnection]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If more results are available and NextToken is present, make the next
-- request to the same API with the received NextToken to paginate the
-- remaining results.
describeInboundCrossClusterSearchConnectionsResponse_nextToken :: Lens.Lens' DescribeInboundCrossClusterSearchConnectionsResponse (Prelude.Maybe Prelude.Text)
describeInboundCrossClusterSearchConnectionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeInboundCrossClusterSearchConnectionsResponse
-> f DescribeInboundCrossClusterSearchConnectionsResponse
describeInboundCrossClusterSearchConnectionsResponse_nextToken = (DescribeInboundCrossClusterSearchConnectionsResponse
 -> Maybe Text)
-> (DescribeInboundCrossClusterSearchConnectionsResponse
    -> Maybe Text
    -> DescribeInboundCrossClusterSearchConnectionsResponse)
-> Lens
     DescribeInboundCrossClusterSearchConnectionsResponse
     DescribeInboundCrossClusterSearchConnectionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInboundCrossClusterSearchConnectionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeInboundCrossClusterSearchConnectionsResponse' :: DescribeInboundCrossClusterSearchConnectionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeInboundCrossClusterSearchConnectionsResponse
s@DescribeInboundCrossClusterSearchConnectionsResponse' {} Maybe Text
a -> DescribeInboundCrossClusterSearchConnectionsResponse
s {$sel:nextToken:DescribeInboundCrossClusterSearchConnectionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeInboundCrossClusterSearchConnectionsResponse)

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

instance
  Prelude.NFData
    DescribeInboundCrossClusterSearchConnectionsResponse