{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_maxResults,
    describeOutboundCrossClusterSearchConnections_nextToken,

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

    -- * Response Lenses
    describeOutboundCrossClusterSearchConnectionsResponse_crossClusterSearchConnections,
    describeOutboundCrossClusterSearchConnectionsResponse_nextToken,
    describeOutboundCrossClusterSearchConnectionsResponse_httpStatus,
  )
where

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

-- | Container for the parameters to the
-- @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],
    -- | Set this value to limit the number of results returned. If not
    -- specified, defaults to 100.
    DescribeOutboundCrossClusterSearchConnections -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | 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
  }
  deriving (DescribeOutboundCrossClusterSearchConnections
-> DescribeOutboundCrossClusterSearchConnections -> Bool
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]
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
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.
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
--
-- 'maxResults', 'describeOutboundCrossClusterSearchConnections_maxResults' - Set this value to limit the number of results returned. If not
-- specified, defaults to 100.
--
-- 'nextToken', 'describeOutboundCrossClusterSearchConnections_nextToken' - NextToken is sent in case the earlier API call results contain the
-- NextToken. It is used for pagination.
newDescribeOutboundCrossClusterSearchConnections ::
  DescribeOutboundCrossClusterSearchConnections
newDescribeOutboundCrossClusterSearchConnections :: DescribeOutboundCrossClusterSearchConnections
newDescribeOutboundCrossClusterSearchConnections =
  DescribeOutboundCrossClusterSearchConnections'
    { $sel:filters:DescribeOutboundCrossClusterSearchConnections' :: Maybe [Filter]
filters =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeOutboundCrossClusterSearchConnections' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeOutboundCrossClusterSearchConnections' :: Maybe Text
nextToken = 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 :: Lens'
  DescribeOutboundCrossClusterSearchConnections (Maybe [Filter])
describeOutboundCrossClusterSearchConnections_filters = 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) 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

-- | 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 :: Lens' DescribeOutboundCrossClusterSearchConnections (Maybe Int)
describeOutboundCrossClusterSearchConnections_maxResults = 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)

-- | 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 :: Lens' DescribeOutboundCrossClusterSearchConnections (Maybe Text)
describeOutboundCrossClusterSearchConnections_nextToken = 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)

instance
  Core.AWSRequest
    DescribeOutboundCrossClusterSearchConnections
  where
  type
    AWSResponse
      DescribeOutboundCrossClusterSearchConnections =
      DescribeOutboundCrossClusterSearchConnectionsResponse
  request :: (Service -> Service)
-> DescribeOutboundCrossClusterSearchConnections
-> Request DescribeOutboundCrossClusterSearchConnections
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 DescribeOutboundCrossClusterSearchConnections
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeOutboundCrossClusterSearchConnections)))
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 [OutboundCrossClusterSearchConnection]
-> Maybe Text
-> Int
-> DescribeOutboundCrossClusterSearchConnectionsResponse
DescribeOutboundCrossClusterSearchConnectionsResponse'
            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
"CrossClusterSearchConnections"
                            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
    DescribeOutboundCrossClusterSearchConnections
  where
  hashWithSalt :: Int -> DescribeOutboundCrossClusterSearchConnections -> Int
hashWithSalt
    Int
_salt
    DescribeOutboundCrossClusterSearchConnections' {Maybe Int
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe [Filter]
$sel:nextToken:DescribeOutboundCrossClusterSearchConnections' :: DescribeOutboundCrossClusterSearchConnections -> Maybe Text
$sel:maxResults:DescribeOutboundCrossClusterSearchConnections' :: DescribeOutboundCrossClusterSearchConnections -> Maybe Int
$sel:filters:DescribeOutboundCrossClusterSearchConnections' :: DescribeOutboundCrossClusterSearchConnections -> 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
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance
  Prelude.NFData
    DescribeOutboundCrossClusterSearchConnections
  where
  rnf :: DescribeOutboundCrossClusterSearchConnections -> ()
rnf
    DescribeOutboundCrossClusterSearchConnections' {Maybe Int
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe [Filter]
$sel:nextToken:DescribeOutboundCrossClusterSearchConnections' :: DescribeOutboundCrossClusterSearchConnections -> Maybe Text
$sel:maxResults:DescribeOutboundCrossClusterSearchConnections' :: DescribeOutboundCrossClusterSearchConnections -> Maybe Int
$sel:filters:DescribeOutboundCrossClusterSearchConnections' :: DescribeOutboundCrossClusterSearchConnections -> 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
maxResults
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

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

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

instance
  Data.ToQuery
    DescribeOutboundCrossClusterSearchConnections
  where
  toQuery :: DescribeOutboundCrossClusterSearchConnections -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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.
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'
      { $sel:crossClusterSearchConnections:DescribeOutboundCrossClusterSearchConnectionsResponse' :: Maybe [OutboundCrossClusterSearchConnection]
crossClusterSearchConnections =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeOutboundCrossClusterSearchConnectionsResponse' :: Maybe Text
nextToken =
          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 :: Lens'
  DescribeOutboundCrossClusterSearchConnectionsResponse
  (Maybe [OutboundCrossClusterSearchConnection])
describeOutboundCrossClusterSearchConnectionsResponse_crossClusterSearchConnections = 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) 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 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 :: Lens'
  DescribeOutboundCrossClusterSearchConnectionsResponse (Maybe Text)
describeOutboundCrossClusterSearchConnectionsResponse_nextToken = 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 :: Lens' DescribeOutboundCrossClusterSearchConnectionsResponse Int
describeOutboundCrossClusterSearchConnectionsResponse_httpStatus = 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
  where
  rnf :: DescribeOutboundCrossClusterSearchConnectionsResponse -> ()
rnf
    DescribeOutboundCrossClusterSearchConnectionsResponse' {Int
Maybe [OutboundCrossClusterSearchConnection]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
crossClusterSearchConnections :: Maybe [OutboundCrossClusterSearchConnection]
$sel:httpStatus:DescribeOutboundCrossClusterSearchConnectionsResponse' :: DescribeOutboundCrossClusterSearchConnectionsResponse -> Int
$sel:nextToken:DescribeOutboundCrossClusterSearchConnectionsResponse' :: DescribeOutboundCrossClusterSearchConnectionsResponse -> Maybe Text
$sel:crossClusterSearchConnections:DescribeOutboundCrossClusterSearchConnectionsResponse' :: DescribeOutboundCrossClusterSearchConnectionsResponse
-> Maybe [OutboundCrossClusterSearchConnection]
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe [OutboundCrossClusterSearchConnection]
crossClusterSearchConnections
        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