{-# 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.Redshift.DescribeDataShares
-- 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)
--
-- Shows the status of any inbound or outbound datashares available in the
-- specified account.
module Amazonka.Redshift.DescribeDataShares
  ( -- * Creating a Request
    DescribeDataShares (..),
    newDescribeDataShares,

    -- * Request Lenses
    describeDataShares_marker,
    describeDataShares_maxRecords,
    describeDataShares_dataShareArn,

    -- * Destructuring the Response
    DescribeDataSharesResponse (..),
    newDescribeDataSharesResponse,

    -- * Response Lenses
    describeDataSharesResponse_marker,
    describeDataSharesResponse_dataShares,
    describeDataSharesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeDataShares' smart constructor.
data DescribeDataShares = DescribeDataShares'
  { -- | An optional parameter that specifies the starting point to return a set
    -- of response records. When the results of a DescribeDataShares request
    -- exceed the value specified in @MaxRecords@, AWS returns a value in the
    -- @Marker@ field of the response. You can retrieve the next set of
    -- response records by providing the returned marker value in the @Marker@
    -- parameter and retrying the request.
    DescribeDataShares -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of response records to return in each call. If the
    -- number of remaining response records exceeds the specified @MaxRecords@
    -- value, a value is returned in a @marker@ field of the response. You can
    -- retrieve the next set of records by retrying the command with the
    -- returned marker value.
    DescribeDataShares -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The identifier of the datashare to describe details of.
    DescribeDataShares -> Maybe Text
dataShareArn :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeDataShares -> DescribeDataShares -> Bool
(DescribeDataShares -> DescribeDataShares -> Bool)
-> (DescribeDataShares -> DescribeDataShares -> Bool)
-> Eq DescribeDataShares
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDataShares -> DescribeDataShares -> Bool
$c/= :: DescribeDataShares -> DescribeDataShares -> Bool
== :: DescribeDataShares -> DescribeDataShares -> Bool
$c== :: DescribeDataShares -> DescribeDataShares -> Bool
Prelude.Eq, ReadPrec [DescribeDataShares]
ReadPrec DescribeDataShares
Int -> ReadS DescribeDataShares
ReadS [DescribeDataShares]
(Int -> ReadS DescribeDataShares)
-> ReadS [DescribeDataShares]
-> ReadPrec DescribeDataShares
-> ReadPrec [DescribeDataShares]
-> Read DescribeDataShares
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDataShares]
$creadListPrec :: ReadPrec [DescribeDataShares]
readPrec :: ReadPrec DescribeDataShares
$creadPrec :: ReadPrec DescribeDataShares
readList :: ReadS [DescribeDataShares]
$creadList :: ReadS [DescribeDataShares]
readsPrec :: Int -> ReadS DescribeDataShares
$creadsPrec :: Int -> ReadS DescribeDataShares
Prelude.Read, Int -> DescribeDataShares -> ShowS
[DescribeDataShares] -> ShowS
DescribeDataShares -> String
(Int -> DescribeDataShares -> ShowS)
-> (DescribeDataShares -> String)
-> ([DescribeDataShares] -> ShowS)
-> Show DescribeDataShares
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDataShares] -> ShowS
$cshowList :: [DescribeDataShares] -> ShowS
show :: DescribeDataShares -> String
$cshow :: DescribeDataShares -> String
showsPrec :: Int -> DescribeDataShares -> ShowS
$cshowsPrec :: Int -> DescribeDataShares -> ShowS
Prelude.Show, (forall x. DescribeDataShares -> Rep DescribeDataShares x)
-> (forall x. Rep DescribeDataShares x -> DescribeDataShares)
-> Generic DescribeDataShares
forall x. Rep DescribeDataShares x -> DescribeDataShares
forall x. DescribeDataShares -> Rep DescribeDataShares x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDataShares x -> DescribeDataShares
$cfrom :: forall x. DescribeDataShares -> Rep DescribeDataShares x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDataShares' 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:
--
-- 'marker', 'describeDataShares_marker' - An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a DescribeDataShares request
-- exceed the value specified in @MaxRecords@, AWS returns a value in the
-- @Marker@ field of the response. You can retrieve the next set of
-- response records by providing the returned marker value in the @Marker@
-- parameter and retrying the request.
--
-- 'maxRecords', 'describeDataShares_maxRecords' - The maximum number of response records to return in each call. If the
-- number of remaining response records exceeds the specified @MaxRecords@
-- value, a value is returned in a @marker@ field of the response. You can
-- retrieve the next set of records by retrying the command with the
-- returned marker value.
--
-- 'dataShareArn', 'describeDataShares_dataShareArn' - The identifier of the datashare to describe details of.
newDescribeDataShares ::
  DescribeDataShares
newDescribeDataShares :: DescribeDataShares
newDescribeDataShares =
  DescribeDataShares' :: Maybe Text -> Maybe Int -> Maybe Text -> DescribeDataShares
DescribeDataShares'
    { $sel:marker:DescribeDataShares' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeDataShares' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:dataShareArn:DescribeDataShares' :: Maybe Text
dataShareArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a DescribeDataShares request
-- exceed the value specified in @MaxRecords@, AWS returns a value in the
-- @Marker@ field of the response. You can retrieve the next set of
-- response records by providing the returned marker value in the @Marker@
-- parameter and retrying the request.
describeDataShares_marker :: Lens.Lens' DescribeDataShares (Prelude.Maybe Prelude.Text)
describeDataShares_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeDataShares -> f DescribeDataShares
describeDataShares_marker = (DescribeDataShares -> Maybe Text)
-> (DescribeDataShares -> Maybe Text -> DescribeDataShares)
-> Lens
     DescribeDataShares DescribeDataShares (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataShares' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeDataShares' :: DescribeDataShares -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeDataShares
s@DescribeDataShares' {} Maybe Text
a -> DescribeDataShares
s {$sel:marker:DescribeDataShares' :: Maybe Text
marker = Maybe Text
a} :: DescribeDataShares)

-- | The maximum number of response records to return in each call. If the
-- number of remaining response records exceeds the specified @MaxRecords@
-- value, a value is returned in a @marker@ field of the response. You can
-- retrieve the next set of records by retrying the command with the
-- returned marker value.
describeDataShares_maxRecords :: Lens.Lens' DescribeDataShares (Prelude.Maybe Prelude.Int)
describeDataShares_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeDataShares -> f DescribeDataShares
describeDataShares_maxRecords = (DescribeDataShares -> Maybe Int)
-> (DescribeDataShares -> Maybe Int -> DescribeDataShares)
-> Lens
     DescribeDataShares DescribeDataShares (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataShares' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeDataShares' :: DescribeDataShares -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeDataShares
s@DescribeDataShares' {} Maybe Int
a -> DescribeDataShares
s {$sel:maxRecords:DescribeDataShares' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeDataShares)

-- | The identifier of the datashare to describe details of.
describeDataShares_dataShareArn :: Lens.Lens' DescribeDataShares (Prelude.Maybe Prelude.Text)
describeDataShares_dataShareArn :: (Maybe Text -> f (Maybe Text))
-> DescribeDataShares -> f DescribeDataShares
describeDataShares_dataShareArn = (DescribeDataShares -> Maybe Text)
-> (DescribeDataShares -> Maybe Text -> DescribeDataShares)
-> Lens
     DescribeDataShares DescribeDataShares (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataShares' {Maybe Text
dataShareArn :: Maybe Text
$sel:dataShareArn:DescribeDataShares' :: DescribeDataShares -> Maybe Text
dataShareArn} -> Maybe Text
dataShareArn) (\s :: DescribeDataShares
s@DescribeDataShares' {} Maybe Text
a -> DescribeDataShares
s {$sel:dataShareArn:DescribeDataShares' :: Maybe Text
dataShareArn = Maybe Text
a} :: DescribeDataShares)

instance Core.AWSRequest DescribeDataShares where
  type
    AWSResponse DescribeDataShares =
      DescribeDataSharesResponse
  request :: DescribeDataShares -> Request DescribeDataShares
request = Service -> DescribeDataShares -> Request DescribeDataShares
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDataShares
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDataShares)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeDataShares))
-> Logger
-> Service
-> Proxy DescribeDataShares
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDataShares)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeDataSharesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [DataShare] -> Int -> DescribeDataSharesResponse
DescribeDataSharesResponse'
            (Maybe Text
 -> Maybe [DataShare] -> Int -> DescribeDataSharesResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [DataShare] -> Int -> DescribeDataSharesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Marker")
            Either
  String (Maybe [DataShare] -> Int -> DescribeDataSharesResponse)
-> Either String (Maybe [DataShare])
-> Either String (Int -> DescribeDataSharesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DataShares" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [DataShare]))
-> Either String (Maybe [DataShare])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [DataShare])
-> [Node] -> Either String (Maybe [DataShare])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [DataShare]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Int -> DescribeDataSharesResponse)
-> Either String Int -> Either String DescribeDataSharesResponse
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 DescribeDataShares

instance Prelude.NFData DescribeDataShares

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

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

instance Core.ToQuery DescribeDataShares where
  toQuery :: DescribeDataShares -> QueryString
toQuery DescribeDataShares' {Maybe Int
Maybe Text
dataShareArn :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
$sel:dataShareArn:DescribeDataShares' :: DescribeDataShares -> Maybe Text
$sel:maxRecords:DescribeDataShares' :: DescribeDataShares -> Maybe Int
$sel:marker:DescribeDataShares' :: DescribeDataShares -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeDataShares" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"MaxRecords" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxRecords,
        ByteString
"DataShareArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dataShareArn
      ]

-- | /See:/ 'newDescribeDataSharesResponse' smart constructor.
data DescribeDataSharesResponse = DescribeDataSharesResponse'
  { -- | An optional parameter that specifies the starting point to return a set
    -- of response records. When the results of a DescribeDataShares request
    -- exceed the value specified in @MaxRecords@, AWS returns a value in the
    -- @Marker@ field of the response. You can retrieve the next set of
    -- response records by providing the returned marker value in the @Marker@
    -- parameter and retrying the request.
    DescribeDataSharesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The results returned from describing datashares.
    DescribeDataSharesResponse -> Maybe [DataShare]
dataShares :: Prelude.Maybe [DataShare],
    -- | The response's http status code.
    DescribeDataSharesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDataSharesResponse -> DescribeDataSharesResponse -> Bool
(DescribeDataSharesResponse -> DescribeDataSharesResponse -> Bool)
-> (DescribeDataSharesResponse
    -> DescribeDataSharesResponse -> Bool)
-> Eq DescribeDataSharesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDataSharesResponse -> DescribeDataSharesResponse -> Bool
$c/= :: DescribeDataSharesResponse -> DescribeDataSharesResponse -> Bool
== :: DescribeDataSharesResponse -> DescribeDataSharesResponse -> Bool
$c== :: DescribeDataSharesResponse -> DescribeDataSharesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDataSharesResponse]
ReadPrec DescribeDataSharesResponse
Int -> ReadS DescribeDataSharesResponse
ReadS [DescribeDataSharesResponse]
(Int -> ReadS DescribeDataSharesResponse)
-> ReadS [DescribeDataSharesResponse]
-> ReadPrec DescribeDataSharesResponse
-> ReadPrec [DescribeDataSharesResponse]
-> Read DescribeDataSharesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDataSharesResponse]
$creadListPrec :: ReadPrec [DescribeDataSharesResponse]
readPrec :: ReadPrec DescribeDataSharesResponse
$creadPrec :: ReadPrec DescribeDataSharesResponse
readList :: ReadS [DescribeDataSharesResponse]
$creadList :: ReadS [DescribeDataSharesResponse]
readsPrec :: Int -> ReadS DescribeDataSharesResponse
$creadsPrec :: Int -> ReadS DescribeDataSharesResponse
Prelude.Read, Int -> DescribeDataSharesResponse -> ShowS
[DescribeDataSharesResponse] -> ShowS
DescribeDataSharesResponse -> String
(Int -> DescribeDataSharesResponse -> ShowS)
-> (DescribeDataSharesResponse -> String)
-> ([DescribeDataSharesResponse] -> ShowS)
-> Show DescribeDataSharesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDataSharesResponse] -> ShowS
$cshowList :: [DescribeDataSharesResponse] -> ShowS
show :: DescribeDataSharesResponse -> String
$cshow :: DescribeDataSharesResponse -> String
showsPrec :: Int -> DescribeDataSharesResponse -> ShowS
$cshowsPrec :: Int -> DescribeDataSharesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDataSharesResponse -> Rep DescribeDataSharesResponse x)
-> (forall x.
    Rep DescribeDataSharesResponse x -> DescribeDataSharesResponse)
-> Generic DescribeDataSharesResponse
forall x.
Rep DescribeDataSharesResponse x -> DescribeDataSharesResponse
forall x.
DescribeDataSharesResponse -> Rep DescribeDataSharesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDataSharesResponse x -> DescribeDataSharesResponse
$cfrom :: forall x.
DescribeDataSharesResponse -> Rep DescribeDataSharesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDataSharesResponse' 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:
--
-- 'marker', 'describeDataSharesResponse_marker' - An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a DescribeDataShares request
-- exceed the value specified in @MaxRecords@, AWS returns a value in the
-- @Marker@ field of the response. You can retrieve the next set of
-- response records by providing the returned marker value in the @Marker@
-- parameter and retrying the request.
--
-- 'dataShares', 'describeDataSharesResponse_dataShares' - The results returned from describing datashares.
--
-- 'httpStatus', 'describeDataSharesResponse_httpStatus' - The response's http status code.
newDescribeDataSharesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDataSharesResponse
newDescribeDataSharesResponse :: Int -> DescribeDataSharesResponse
newDescribeDataSharesResponse Int
pHttpStatus_ =
  DescribeDataSharesResponse' :: Maybe Text
-> Maybe [DataShare] -> Int -> DescribeDataSharesResponse
DescribeDataSharesResponse'
    { $sel:marker:DescribeDataSharesResponse' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dataShares:DescribeDataSharesResponse' :: Maybe [DataShare]
dataShares = Maybe [DataShare]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDataSharesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a DescribeDataShares request
-- exceed the value specified in @MaxRecords@, AWS returns a value in the
-- @Marker@ field of the response. You can retrieve the next set of
-- response records by providing the returned marker value in the @Marker@
-- parameter and retrying the request.
describeDataSharesResponse_marker :: Lens.Lens' DescribeDataSharesResponse (Prelude.Maybe Prelude.Text)
describeDataSharesResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeDataSharesResponse -> f DescribeDataSharesResponse
describeDataSharesResponse_marker = (DescribeDataSharesResponse -> Maybe Text)
-> (DescribeDataSharesResponse
    -> Maybe Text -> DescribeDataSharesResponse)
-> Lens
     DescribeDataSharesResponse
     DescribeDataSharesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSharesResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeDataSharesResponse' :: DescribeDataSharesResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeDataSharesResponse
s@DescribeDataSharesResponse' {} Maybe Text
a -> DescribeDataSharesResponse
s {$sel:marker:DescribeDataSharesResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeDataSharesResponse)

-- | The results returned from describing datashares.
describeDataSharesResponse_dataShares :: Lens.Lens' DescribeDataSharesResponse (Prelude.Maybe [DataShare])
describeDataSharesResponse_dataShares :: (Maybe [DataShare] -> f (Maybe [DataShare]))
-> DescribeDataSharesResponse -> f DescribeDataSharesResponse
describeDataSharesResponse_dataShares = (DescribeDataSharesResponse -> Maybe [DataShare])
-> (DescribeDataSharesResponse
    -> Maybe [DataShare] -> DescribeDataSharesResponse)
-> Lens
     DescribeDataSharesResponse
     DescribeDataSharesResponse
     (Maybe [DataShare])
     (Maybe [DataShare])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSharesResponse' {Maybe [DataShare]
dataShares :: Maybe [DataShare]
$sel:dataShares:DescribeDataSharesResponse' :: DescribeDataSharesResponse -> Maybe [DataShare]
dataShares} -> Maybe [DataShare]
dataShares) (\s :: DescribeDataSharesResponse
s@DescribeDataSharesResponse' {} Maybe [DataShare]
a -> DescribeDataSharesResponse
s {$sel:dataShares:DescribeDataSharesResponse' :: Maybe [DataShare]
dataShares = Maybe [DataShare]
a} :: DescribeDataSharesResponse) ((Maybe [DataShare] -> f (Maybe [DataShare]))
 -> DescribeDataSharesResponse -> f DescribeDataSharesResponse)
-> ((Maybe [DataShare] -> f (Maybe [DataShare]))
    -> Maybe [DataShare] -> f (Maybe [DataShare]))
-> (Maybe [DataShare] -> f (Maybe [DataShare]))
-> DescribeDataSharesResponse
-> f DescribeDataSharesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [DataShare] [DataShare] [DataShare] [DataShare]
-> Iso
     (Maybe [DataShare])
     (Maybe [DataShare])
     (Maybe [DataShare])
     (Maybe [DataShare])
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 [DataShare] [DataShare] [DataShare] [DataShare]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeDataSharesResponse