{-# 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.DescribeOutboundCrossClusterSearchConnections
-- 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 outbound cross-cluster search connections for a source
-- domain.
module Amazonka.ElasticSearch.DescribeOutboundCrossClusterSearchConnections
  ( -- * Creating a Request
    DescribeOutboundCrossClusterSearchConnections (..),
    newDescribeOutboundCrossClusterSearchConnections,

    -- * Request Lenses
    describeOutboundCrossClusterSearchConnections_filters,
    describeOutboundCrossClusterSearchConnections_nextToken,
    describeOutboundCrossClusterSearchConnections_maxResults,

    -- * Destructuring the Response
    DescribeOutboundCrossClusterSearchConnectionsResponse (..),
    newDescribeOutboundCrossClusterSearchConnectionsResponse,

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

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

-- | A list of filters used to match properties for outbound cross-cluster
-- search connection. Available @Filter@ names for this operation are:
--
-- -   cross-cluster-search-connection-id
-- -   destination-domain-info.domain-name
-- -   destination-domain-info.owner-id
-- -   destination-domain-info.region
-- -   source-domain-info.domain-name
describeOutboundCrossClusterSearchConnections_filters :: Lens.Lens' DescribeOutboundCrossClusterSearchConnections (Prelude.Maybe [Filter])
describeOutboundCrossClusterSearchConnections_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeOutboundCrossClusterSearchConnections
-> f DescribeOutboundCrossClusterSearchConnections
describeOutboundCrossClusterSearchConnections_filters = (DescribeOutboundCrossClusterSearchConnections -> Maybe [Filter])
-> (DescribeOutboundCrossClusterSearchConnections
    -> Maybe [Filter] -> DescribeOutboundCrossClusterSearchConnections)
-> Lens
     DescribeOutboundCrossClusterSearchConnections
     DescribeOutboundCrossClusterSearchConnections
     (Maybe [Filter])
     (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOutboundCrossClusterSearchConnections' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeOutboundCrossClusterSearchConnections' :: DescribeOutboundCrossClusterSearchConnections -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeOutboundCrossClusterSearchConnections
s@DescribeOutboundCrossClusterSearchConnections' {} Maybe [Filter]
a -> DescribeOutboundCrossClusterSearchConnections
s {$sel:filters:DescribeOutboundCrossClusterSearchConnections' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeOutboundCrossClusterSearchConnections) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> DescribeOutboundCrossClusterSearchConnections
 -> f DescribeOutboundCrossClusterSearchConnections)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeOutboundCrossClusterSearchConnections
-> f DescribeOutboundCrossClusterSearchConnections
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.
describeOutboundCrossClusterSearchConnections_nextToken :: Lens.Lens' DescribeOutboundCrossClusterSearchConnections (Prelude.Maybe Prelude.Text)
describeOutboundCrossClusterSearchConnections_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeOutboundCrossClusterSearchConnections
-> f DescribeOutboundCrossClusterSearchConnections
describeOutboundCrossClusterSearchConnections_nextToken = (DescribeOutboundCrossClusterSearchConnections -> Maybe Text)
-> (DescribeOutboundCrossClusterSearchConnections
    -> Maybe Text -> DescribeOutboundCrossClusterSearchConnections)
-> Lens
     DescribeOutboundCrossClusterSearchConnections
     DescribeOutboundCrossClusterSearchConnections
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOutboundCrossClusterSearchConnections' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeOutboundCrossClusterSearchConnections' :: DescribeOutboundCrossClusterSearchConnections -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeOutboundCrossClusterSearchConnections
s@DescribeOutboundCrossClusterSearchConnections' {} Maybe Text
a -> DescribeOutboundCrossClusterSearchConnections
s {$sel:nextToken:DescribeOutboundCrossClusterSearchConnections' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeOutboundCrossClusterSearchConnections)

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

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

instance
  Prelude.NFData
    DescribeOutboundCrossClusterSearchConnections

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

instance
  Core.ToJSON
    DescribeOutboundCrossClusterSearchConnections
  where
  toJSON :: DescribeOutboundCrossClusterSearchConnections -> Value
toJSON
    DescribeOutboundCrossClusterSearchConnections' {Maybe Int
Maybe [Filter]
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
filters :: Maybe [Filter]
$sel:maxResults:DescribeOutboundCrossClusterSearchConnections' :: DescribeOutboundCrossClusterSearchConnections -> Maybe Int
$sel:nextToken:DescribeOutboundCrossClusterSearchConnections' :: DescribeOutboundCrossClusterSearchConnections -> Maybe Text
$sel:filters:DescribeOutboundCrossClusterSearchConnections' :: DescribeOutboundCrossClusterSearchConnections -> 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
    DescribeOutboundCrossClusterSearchConnections
  where
  toPath :: DescribeOutboundCrossClusterSearchConnections -> ByteString
toPath =
    ByteString
-> DescribeOutboundCrossClusterSearchConnections -> ByteString
forall a b. a -> b -> a
Prelude.const
      ByteString
"/2015-01-01/es/ccs/outboundConnection/search"

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

-- | The result of a @DescribeOutboundCrossClusterSearchConnections@ request.
-- Contains the list of connections matching the filter criteria.
--
-- /See:/ 'newDescribeOutboundCrossClusterSearchConnectionsResponse' smart constructor.
data DescribeOutboundCrossClusterSearchConnectionsResponse = DescribeOutboundCrossClusterSearchConnectionsResponse'
  { -- | Consists of list of @OutboundCrossClusterSearchConnection@ matching the
    -- specified filter criteria.
    DescribeOutboundCrossClusterSearchConnectionsResponse
-> Maybe [OutboundCrossClusterSearchConnection]
crossClusterSearchConnections :: Prelude.Maybe [OutboundCrossClusterSearchConnection],
    -- | 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.
    DescribeOutboundCrossClusterSearchConnectionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeOutboundCrossClusterSearchConnectionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeOutboundCrossClusterSearchConnectionsResponse
-> DescribeOutboundCrossClusterSearchConnectionsResponse -> Bool
(DescribeOutboundCrossClusterSearchConnectionsResponse
 -> DescribeOutboundCrossClusterSearchConnectionsResponse -> Bool)
-> (DescribeOutboundCrossClusterSearchConnectionsResponse
    -> DescribeOutboundCrossClusterSearchConnectionsResponse -> Bool)
-> Eq DescribeOutboundCrossClusterSearchConnectionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeOutboundCrossClusterSearchConnectionsResponse
-> DescribeOutboundCrossClusterSearchConnectionsResponse -> Bool
$c/= :: DescribeOutboundCrossClusterSearchConnectionsResponse
-> DescribeOutboundCrossClusterSearchConnectionsResponse -> Bool
== :: DescribeOutboundCrossClusterSearchConnectionsResponse
-> DescribeOutboundCrossClusterSearchConnectionsResponse -> Bool
$c== :: DescribeOutboundCrossClusterSearchConnectionsResponse
-> DescribeOutboundCrossClusterSearchConnectionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeOutboundCrossClusterSearchConnectionsResponse]
ReadPrec DescribeOutboundCrossClusterSearchConnectionsResponse
Int -> ReadS DescribeOutboundCrossClusterSearchConnectionsResponse
ReadS [DescribeOutboundCrossClusterSearchConnectionsResponse]
(Int
 -> ReadS DescribeOutboundCrossClusterSearchConnectionsResponse)
-> ReadS [DescribeOutboundCrossClusterSearchConnectionsResponse]
-> ReadPrec DescribeOutboundCrossClusterSearchConnectionsResponse
-> ReadPrec [DescribeOutboundCrossClusterSearchConnectionsResponse]
-> Read DescribeOutboundCrossClusterSearchConnectionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeOutboundCrossClusterSearchConnectionsResponse]
$creadListPrec :: ReadPrec [DescribeOutboundCrossClusterSearchConnectionsResponse]
readPrec :: ReadPrec DescribeOutboundCrossClusterSearchConnectionsResponse
$creadPrec :: ReadPrec DescribeOutboundCrossClusterSearchConnectionsResponse
readList :: ReadS [DescribeOutboundCrossClusterSearchConnectionsResponse]
$creadList :: ReadS [DescribeOutboundCrossClusterSearchConnectionsResponse]
readsPrec :: Int -> ReadS DescribeOutboundCrossClusterSearchConnectionsResponse
$creadsPrec :: Int -> ReadS DescribeOutboundCrossClusterSearchConnectionsResponse
Prelude.Read, Int
-> DescribeOutboundCrossClusterSearchConnectionsResponse -> ShowS
[DescribeOutboundCrossClusterSearchConnectionsResponse] -> ShowS
DescribeOutboundCrossClusterSearchConnectionsResponse -> String
(Int
 -> DescribeOutboundCrossClusterSearchConnectionsResponse -> ShowS)
-> (DescribeOutboundCrossClusterSearchConnectionsResponse
    -> String)
-> ([DescribeOutboundCrossClusterSearchConnectionsResponse]
    -> ShowS)
-> Show DescribeOutboundCrossClusterSearchConnectionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeOutboundCrossClusterSearchConnectionsResponse] -> ShowS
$cshowList :: [DescribeOutboundCrossClusterSearchConnectionsResponse] -> ShowS
show :: DescribeOutboundCrossClusterSearchConnectionsResponse -> String
$cshow :: DescribeOutboundCrossClusterSearchConnectionsResponse -> String
showsPrec :: Int
-> DescribeOutboundCrossClusterSearchConnectionsResponse -> ShowS
$cshowsPrec :: Int
-> DescribeOutboundCrossClusterSearchConnectionsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeOutboundCrossClusterSearchConnectionsResponse
 -> Rep DescribeOutboundCrossClusterSearchConnectionsResponse x)
-> (forall x.
    Rep DescribeOutboundCrossClusterSearchConnectionsResponse x
    -> DescribeOutboundCrossClusterSearchConnectionsResponse)
-> Generic DescribeOutboundCrossClusterSearchConnectionsResponse
forall x.
Rep DescribeOutboundCrossClusterSearchConnectionsResponse x
-> DescribeOutboundCrossClusterSearchConnectionsResponse
forall x.
DescribeOutboundCrossClusterSearchConnectionsResponse
-> Rep DescribeOutboundCrossClusterSearchConnectionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeOutboundCrossClusterSearchConnectionsResponse x
-> DescribeOutboundCrossClusterSearchConnectionsResponse
$cfrom :: forall x.
DescribeOutboundCrossClusterSearchConnectionsResponse
-> Rep DescribeOutboundCrossClusterSearchConnectionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeOutboundCrossClusterSearchConnectionsResponse' 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', 'describeOutboundCrossClusterSearchConnectionsResponse_crossClusterSearchConnections' - Consists of list of @OutboundCrossClusterSearchConnection@ matching the
-- specified filter criteria.
--
-- 'nextToken', 'describeOutboundCrossClusterSearchConnectionsResponse_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', 'describeOutboundCrossClusterSearchConnectionsResponse_httpStatus' - The response's http status code.
newDescribeOutboundCrossClusterSearchConnectionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeOutboundCrossClusterSearchConnectionsResponse
newDescribeOutboundCrossClusterSearchConnectionsResponse :: Int -> DescribeOutboundCrossClusterSearchConnectionsResponse
newDescribeOutboundCrossClusterSearchConnectionsResponse
  Int
pHttpStatus_ =
    DescribeOutboundCrossClusterSearchConnectionsResponse' :: Maybe [OutboundCrossClusterSearchConnection]
-> Maybe Text
-> Int
-> DescribeOutboundCrossClusterSearchConnectionsResponse
DescribeOutboundCrossClusterSearchConnectionsResponse'
      { $sel:crossClusterSearchConnections:DescribeOutboundCrossClusterSearchConnectionsResponse' :: Maybe [OutboundCrossClusterSearchConnection]
crossClusterSearchConnections =
          Maybe [OutboundCrossClusterSearchConnection]
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeOutboundCrossClusterSearchConnectionsResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeOutboundCrossClusterSearchConnectionsResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | Consists of list of @OutboundCrossClusterSearchConnection@ matching the
-- specified filter criteria.
describeOutboundCrossClusterSearchConnectionsResponse_crossClusterSearchConnections :: Lens.Lens' DescribeOutboundCrossClusterSearchConnectionsResponse (Prelude.Maybe [OutboundCrossClusterSearchConnection])
describeOutboundCrossClusterSearchConnectionsResponse_crossClusterSearchConnections :: (Maybe [OutboundCrossClusterSearchConnection]
 -> f (Maybe [OutboundCrossClusterSearchConnection]))
-> DescribeOutboundCrossClusterSearchConnectionsResponse
-> f DescribeOutboundCrossClusterSearchConnectionsResponse
describeOutboundCrossClusterSearchConnectionsResponse_crossClusterSearchConnections = (DescribeOutboundCrossClusterSearchConnectionsResponse
 -> Maybe [OutboundCrossClusterSearchConnection])
-> (DescribeOutboundCrossClusterSearchConnectionsResponse
    -> Maybe [OutboundCrossClusterSearchConnection]
    -> DescribeOutboundCrossClusterSearchConnectionsResponse)
-> Lens
     DescribeOutboundCrossClusterSearchConnectionsResponse
     DescribeOutboundCrossClusterSearchConnectionsResponse
     (Maybe [OutboundCrossClusterSearchConnection])
     (Maybe [OutboundCrossClusterSearchConnection])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOutboundCrossClusterSearchConnectionsResponse' {Maybe [OutboundCrossClusterSearchConnection]
crossClusterSearchConnections :: Maybe [OutboundCrossClusterSearchConnection]
$sel:crossClusterSearchConnections:DescribeOutboundCrossClusterSearchConnectionsResponse' :: DescribeOutboundCrossClusterSearchConnectionsResponse
-> Maybe [OutboundCrossClusterSearchConnection]
crossClusterSearchConnections} -> Maybe [OutboundCrossClusterSearchConnection]
crossClusterSearchConnections) (\s :: DescribeOutboundCrossClusterSearchConnectionsResponse
s@DescribeOutboundCrossClusterSearchConnectionsResponse' {} Maybe [OutboundCrossClusterSearchConnection]
a -> DescribeOutboundCrossClusterSearchConnectionsResponse
s {$sel:crossClusterSearchConnections:DescribeOutboundCrossClusterSearchConnectionsResponse' :: Maybe [OutboundCrossClusterSearchConnection]
crossClusterSearchConnections = Maybe [OutboundCrossClusterSearchConnection]
a} :: DescribeOutboundCrossClusterSearchConnectionsResponse) ((Maybe [OutboundCrossClusterSearchConnection]
  -> f (Maybe [OutboundCrossClusterSearchConnection]))
 -> DescribeOutboundCrossClusterSearchConnectionsResponse
 -> f DescribeOutboundCrossClusterSearchConnectionsResponse)
-> ((Maybe [OutboundCrossClusterSearchConnection]
     -> f (Maybe [OutboundCrossClusterSearchConnection]))
    -> Maybe [OutboundCrossClusterSearchConnection]
    -> f (Maybe [OutboundCrossClusterSearchConnection]))
-> (Maybe [OutboundCrossClusterSearchConnection]
    -> f (Maybe [OutboundCrossClusterSearchConnection]))
-> DescribeOutboundCrossClusterSearchConnectionsResponse
-> f DescribeOutboundCrossClusterSearchConnectionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [OutboundCrossClusterSearchConnection]
  [OutboundCrossClusterSearchConnection]
  [OutboundCrossClusterSearchConnection]
  [OutboundCrossClusterSearchConnection]
-> Iso
     (Maybe [OutboundCrossClusterSearchConnection])
     (Maybe [OutboundCrossClusterSearchConnection])
     (Maybe [OutboundCrossClusterSearchConnection])
     (Maybe [OutboundCrossClusterSearchConnection])
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
  [OutboundCrossClusterSearchConnection]
  [OutboundCrossClusterSearchConnection]
  [OutboundCrossClusterSearchConnection]
  [OutboundCrossClusterSearchConnection]
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.
describeOutboundCrossClusterSearchConnectionsResponse_nextToken :: Lens.Lens' DescribeOutboundCrossClusterSearchConnectionsResponse (Prelude.Maybe Prelude.Text)
describeOutboundCrossClusterSearchConnectionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeOutboundCrossClusterSearchConnectionsResponse
-> f DescribeOutboundCrossClusterSearchConnectionsResponse
describeOutboundCrossClusterSearchConnectionsResponse_nextToken = (DescribeOutboundCrossClusterSearchConnectionsResponse
 -> Maybe Text)
-> (DescribeOutboundCrossClusterSearchConnectionsResponse
    -> Maybe Text
    -> DescribeOutboundCrossClusterSearchConnectionsResponse)
-> Lens
     DescribeOutboundCrossClusterSearchConnectionsResponse
     DescribeOutboundCrossClusterSearchConnectionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeOutboundCrossClusterSearchConnectionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeOutboundCrossClusterSearchConnectionsResponse' :: DescribeOutboundCrossClusterSearchConnectionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeOutboundCrossClusterSearchConnectionsResponse
s@DescribeOutboundCrossClusterSearchConnectionsResponse' {} Maybe Text
a -> DescribeOutboundCrossClusterSearchConnectionsResponse
s {$sel:nextToken:DescribeOutboundCrossClusterSearchConnectionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeOutboundCrossClusterSearchConnectionsResponse)

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

instance
  Prelude.NFData
    DescribeOutboundCrossClusterSearchConnectionsResponse