{-# 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.DescribeSnapshotCopyGrants
-- 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)
--
-- Returns a list of snapshot copy grants owned by the Amazon Web Services
-- account in the destination region.
--
-- For more information about managing snapshot copy grants, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html Amazon Redshift Database Encryption>
-- in the /Amazon Redshift Cluster Management Guide/.
--
-- This operation returns paginated results.
module Amazonka.Redshift.DescribeSnapshotCopyGrants
  ( -- * Creating a Request
    DescribeSnapshotCopyGrants (..),
    newDescribeSnapshotCopyGrants,

    -- * Request Lenses
    describeSnapshotCopyGrants_tagValues,
    describeSnapshotCopyGrants_tagKeys,
    describeSnapshotCopyGrants_marker,
    describeSnapshotCopyGrants_maxRecords,
    describeSnapshotCopyGrants_snapshotCopyGrantName,

    -- * Destructuring the Response
    DescribeSnapshotCopyGrantsResponse (..),
    newDescribeSnapshotCopyGrantsResponse,

    -- * Response Lenses
    describeSnapshotCopyGrantsResponse_snapshotCopyGrants,
    describeSnapshotCopyGrantsResponse_marker,
    describeSnapshotCopyGrantsResponse_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

-- | The result of the @DescribeSnapshotCopyGrants@ action.
--
-- /See:/ 'newDescribeSnapshotCopyGrants' smart constructor.
data DescribeSnapshotCopyGrants = DescribeSnapshotCopyGrants'
  { -- | A tag value or values for which you want to return all matching
    -- resources that are associated with the specified value or values. For
    -- example, suppose that you have resources tagged with values called
    -- @admin@ and @test@. If you specify both of these tag values in the
    -- request, Amazon Redshift returns a response with all resources that have
    -- either or both of these tag values associated with them.
    DescribeSnapshotCopyGrants -> Maybe [Text]
tagValues :: Prelude.Maybe [Prelude.Text],
    -- | A tag key or keys for which you want to return all matching resources
    -- that are associated with the specified key or keys. For example, suppose
    -- that you have resources tagged with keys called @owner@ and
    -- @environment@. If you specify both of these tag keys in the request,
    -- Amazon Redshift returns a response with all resources that have either
    -- or both of these tag keys associated with them.
    DescribeSnapshotCopyGrants -> Maybe [Text]
tagKeys :: Prelude.Maybe [Prelude.Text],
    -- | An optional parameter that specifies the starting point to return a set
    -- of response records. When the results of a @DescribeSnapshotCopyGrant@
    -- request exceed the value specified in @MaxRecords@, Amazon Web Services
    -- 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.
    --
    -- Constraints: You can specify either the __SnapshotCopyGrantName__
    -- parameter or the __Marker__ parameter, but not both.
    DescribeSnapshotCopyGrants -> 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.
    --
    -- Default: @100@
    --
    -- Constraints: minimum 20, maximum 100.
    DescribeSnapshotCopyGrants -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The name of the snapshot copy grant.
    DescribeSnapshotCopyGrants -> Maybe Text
snapshotCopyGrantName :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeSnapshotCopyGrants -> DescribeSnapshotCopyGrants -> Bool
(DescribeSnapshotCopyGrants -> DescribeSnapshotCopyGrants -> Bool)
-> (DescribeSnapshotCopyGrants
    -> DescribeSnapshotCopyGrants -> Bool)
-> Eq DescribeSnapshotCopyGrants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSnapshotCopyGrants -> DescribeSnapshotCopyGrants -> Bool
$c/= :: DescribeSnapshotCopyGrants -> DescribeSnapshotCopyGrants -> Bool
== :: DescribeSnapshotCopyGrants -> DescribeSnapshotCopyGrants -> Bool
$c== :: DescribeSnapshotCopyGrants -> DescribeSnapshotCopyGrants -> Bool
Prelude.Eq, ReadPrec [DescribeSnapshotCopyGrants]
ReadPrec DescribeSnapshotCopyGrants
Int -> ReadS DescribeSnapshotCopyGrants
ReadS [DescribeSnapshotCopyGrants]
(Int -> ReadS DescribeSnapshotCopyGrants)
-> ReadS [DescribeSnapshotCopyGrants]
-> ReadPrec DescribeSnapshotCopyGrants
-> ReadPrec [DescribeSnapshotCopyGrants]
-> Read DescribeSnapshotCopyGrants
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSnapshotCopyGrants]
$creadListPrec :: ReadPrec [DescribeSnapshotCopyGrants]
readPrec :: ReadPrec DescribeSnapshotCopyGrants
$creadPrec :: ReadPrec DescribeSnapshotCopyGrants
readList :: ReadS [DescribeSnapshotCopyGrants]
$creadList :: ReadS [DescribeSnapshotCopyGrants]
readsPrec :: Int -> ReadS DescribeSnapshotCopyGrants
$creadsPrec :: Int -> ReadS DescribeSnapshotCopyGrants
Prelude.Read, Int -> DescribeSnapshotCopyGrants -> ShowS
[DescribeSnapshotCopyGrants] -> ShowS
DescribeSnapshotCopyGrants -> String
(Int -> DescribeSnapshotCopyGrants -> ShowS)
-> (DescribeSnapshotCopyGrants -> String)
-> ([DescribeSnapshotCopyGrants] -> ShowS)
-> Show DescribeSnapshotCopyGrants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSnapshotCopyGrants] -> ShowS
$cshowList :: [DescribeSnapshotCopyGrants] -> ShowS
show :: DescribeSnapshotCopyGrants -> String
$cshow :: DescribeSnapshotCopyGrants -> String
showsPrec :: Int -> DescribeSnapshotCopyGrants -> ShowS
$cshowsPrec :: Int -> DescribeSnapshotCopyGrants -> ShowS
Prelude.Show, (forall x.
 DescribeSnapshotCopyGrants -> Rep DescribeSnapshotCopyGrants x)
-> (forall x.
    Rep DescribeSnapshotCopyGrants x -> DescribeSnapshotCopyGrants)
-> Generic DescribeSnapshotCopyGrants
forall x.
Rep DescribeSnapshotCopyGrants x -> DescribeSnapshotCopyGrants
forall x.
DescribeSnapshotCopyGrants -> Rep DescribeSnapshotCopyGrants x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSnapshotCopyGrants x -> DescribeSnapshotCopyGrants
$cfrom :: forall x.
DescribeSnapshotCopyGrants -> Rep DescribeSnapshotCopyGrants x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSnapshotCopyGrants' 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:
--
-- 'tagValues', 'describeSnapshotCopyGrants_tagValues' - A tag value or values for which you want to return all matching
-- resources that are associated with the specified value or values. For
-- example, suppose that you have resources tagged with values called
-- @admin@ and @test@. If you specify both of these tag values in the
-- request, Amazon Redshift returns a response with all resources that have
-- either or both of these tag values associated with them.
--
-- 'tagKeys', 'describeSnapshotCopyGrants_tagKeys' - A tag key or keys for which you want to return all matching resources
-- that are associated with the specified key or keys. For example, suppose
-- that you have resources tagged with keys called @owner@ and
-- @environment@. If you specify both of these tag keys in the request,
-- Amazon Redshift returns a response with all resources that have either
-- or both of these tag keys associated with them.
--
-- 'marker', 'describeSnapshotCopyGrants_marker' - An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a @DescribeSnapshotCopyGrant@
-- request exceed the value specified in @MaxRecords@, Amazon Web Services
-- 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.
--
-- Constraints: You can specify either the __SnapshotCopyGrantName__
-- parameter or the __Marker__ parameter, but not both.
--
-- 'maxRecords', 'describeSnapshotCopyGrants_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.
--
-- Default: @100@
--
-- Constraints: minimum 20, maximum 100.
--
-- 'snapshotCopyGrantName', 'describeSnapshotCopyGrants_snapshotCopyGrantName' - The name of the snapshot copy grant.
newDescribeSnapshotCopyGrants ::
  DescribeSnapshotCopyGrants
newDescribeSnapshotCopyGrants :: DescribeSnapshotCopyGrants
newDescribeSnapshotCopyGrants =
  DescribeSnapshotCopyGrants' :: Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> DescribeSnapshotCopyGrants
DescribeSnapshotCopyGrants'
    { $sel:tagValues:DescribeSnapshotCopyGrants' :: Maybe [Text]
tagValues =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:tagKeys:DescribeSnapshotCopyGrants' :: Maybe [Text]
tagKeys = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeSnapshotCopyGrants' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeSnapshotCopyGrants' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotCopyGrantName:DescribeSnapshotCopyGrants' :: Maybe Text
snapshotCopyGrantName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A tag value or values for which you want to return all matching
-- resources that are associated with the specified value or values. For
-- example, suppose that you have resources tagged with values called
-- @admin@ and @test@. If you specify both of these tag values in the
-- request, Amazon Redshift returns a response with all resources that have
-- either or both of these tag values associated with them.
describeSnapshotCopyGrants_tagValues :: Lens.Lens' DescribeSnapshotCopyGrants (Prelude.Maybe [Prelude.Text])
describeSnapshotCopyGrants_tagValues :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeSnapshotCopyGrants -> f DescribeSnapshotCopyGrants
describeSnapshotCopyGrants_tagValues = (DescribeSnapshotCopyGrants -> Maybe [Text])
-> (DescribeSnapshotCopyGrants
    -> Maybe [Text] -> DescribeSnapshotCopyGrants)
-> Lens
     DescribeSnapshotCopyGrants
     DescribeSnapshotCopyGrants
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotCopyGrants' {Maybe [Text]
tagValues :: Maybe [Text]
$sel:tagValues:DescribeSnapshotCopyGrants' :: DescribeSnapshotCopyGrants -> Maybe [Text]
tagValues} -> Maybe [Text]
tagValues) (\s :: DescribeSnapshotCopyGrants
s@DescribeSnapshotCopyGrants' {} Maybe [Text]
a -> DescribeSnapshotCopyGrants
s {$sel:tagValues:DescribeSnapshotCopyGrants' :: Maybe [Text]
tagValues = Maybe [Text]
a} :: DescribeSnapshotCopyGrants) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeSnapshotCopyGrants -> f DescribeSnapshotCopyGrants)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeSnapshotCopyGrants
-> f DescribeSnapshotCopyGrants
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A tag key or keys for which you want to return all matching resources
-- that are associated with the specified key or keys. For example, suppose
-- that you have resources tagged with keys called @owner@ and
-- @environment@. If you specify both of these tag keys in the request,
-- Amazon Redshift returns a response with all resources that have either
-- or both of these tag keys associated with them.
describeSnapshotCopyGrants_tagKeys :: Lens.Lens' DescribeSnapshotCopyGrants (Prelude.Maybe [Prelude.Text])
describeSnapshotCopyGrants_tagKeys :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeSnapshotCopyGrants -> f DescribeSnapshotCopyGrants
describeSnapshotCopyGrants_tagKeys = (DescribeSnapshotCopyGrants -> Maybe [Text])
-> (DescribeSnapshotCopyGrants
    -> Maybe [Text] -> DescribeSnapshotCopyGrants)
-> Lens
     DescribeSnapshotCopyGrants
     DescribeSnapshotCopyGrants
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotCopyGrants' {Maybe [Text]
tagKeys :: Maybe [Text]
$sel:tagKeys:DescribeSnapshotCopyGrants' :: DescribeSnapshotCopyGrants -> Maybe [Text]
tagKeys} -> Maybe [Text]
tagKeys) (\s :: DescribeSnapshotCopyGrants
s@DescribeSnapshotCopyGrants' {} Maybe [Text]
a -> DescribeSnapshotCopyGrants
s {$sel:tagKeys:DescribeSnapshotCopyGrants' :: Maybe [Text]
tagKeys = Maybe [Text]
a} :: DescribeSnapshotCopyGrants) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeSnapshotCopyGrants -> f DescribeSnapshotCopyGrants)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeSnapshotCopyGrants
-> f DescribeSnapshotCopyGrants
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a @DescribeSnapshotCopyGrant@
-- request exceed the value specified in @MaxRecords@, Amazon Web Services
-- 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.
--
-- Constraints: You can specify either the __SnapshotCopyGrantName__
-- parameter or the __Marker__ parameter, but not both.
describeSnapshotCopyGrants_marker :: Lens.Lens' DescribeSnapshotCopyGrants (Prelude.Maybe Prelude.Text)
describeSnapshotCopyGrants_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeSnapshotCopyGrants -> f DescribeSnapshotCopyGrants
describeSnapshotCopyGrants_marker = (DescribeSnapshotCopyGrants -> Maybe Text)
-> (DescribeSnapshotCopyGrants
    -> Maybe Text -> DescribeSnapshotCopyGrants)
-> Lens
     DescribeSnapshotCopyGrants
     DescribeSnapshotCopyGrants
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotCopyGrants' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeSnapshotCopyGrants' :: DescribeSnapshotCopyGrants -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeSnapshotCopyGrants
s@DescribeSnapshotCopyGrants' {} Maybe Text
a -> DescribeSnapshotCopyGrants
s {$sel:marker:DescribeSnapshotCopyGrants' :: Maybe Text
marker = Maybe Text
a} :: DescribeSnapshotCopyGrants)

-- | 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.
--
-- Default: @100@
--
-- Constraints: minimum 20, maximum 100.
describeSnapshotCopyGrants_maxRecords :: Lens.Lens' DescribeSnapshotCopyGrants (Prelude.Maybe Prelude.Int)
describeSnapshotCopyGrants_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeSnapshotCopyGrants -> f DescribeSnapshotCopyGrants
describeSnapshotCopyGrants_maxRecords = (DescribeSnapshotCopyGrants -> Maybe Int)
-> (DescribeSnapshotCopyGrants
    -> Maybe Int -> DescribeSnapshotCopyGrants)
-> Lens
     DescribeSnapshotCopyGrants
     DescribeSnapshotCopyGrants
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotCopyGrants' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeSnapshotCopyGrants' :: DescribeSnapshotCopyGrants -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeSnapshotCopyGrants
s@DescribeSnapshotCopyGrants' {} Maybe Int
a -> DescribeSnapshotCopyGrants
s {$sel:maxRecords:DescribeSnapshotCopyGrants' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeSnapshotCopyGrants)

-- | The name of the snapshot copy grant.
describeSnapshotCopyGrants_snapshotCopyGrantName :: Lens.Lens' DescribeSnapshotCopyGrants (Prelude.Maybe Prelude.Text)
describeSnapshotCopyGrants_snapshotCopyGrantName :: (Maybe Text -> f (Maybe Text))
-> DescribeSnapshotCopyGrants -> f DescribeSnapshotCopyGrants
describeSnapshotCopyGrants_snapshotCopyGrantName = (DescribeSnapshotCopyGrants -> Maybe Text)
-> (DescribeSnapshotCopyGrants
    -> Maybe Text -> DescribeSnapshotCopyGrants)
-> Lens
     DescribeSnapshotCopyGrants
     DescribeSnapshotCopyGrants
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotCopyGrants' {Maybe Text
snapshotCopyGrantName :: Maybe Text
$sel:snapshotCopyGrantName:DescribeSnapshotCopyGrants' :: DescribeSnapshotCopyGrants -> Maybe Text
snapshotCopyGrantName} -> Maybe Text
snapshotCopyGrantName) (\s :: DescribeSnapshotCopyGrants
s@DescribeSnapshotCopyGrants' {} Maybe Text
a -> DescribeSnapshotCopyGrants
s {$sel:snapshotCopyGrantName:DescribeSnapshotCopyGrants' :: Maybe Text
snapshotCopyGrantName = Maybe Text
a} :: DescribeSnapshotCopyGrants)

instance Core.AWSPager DescribeSnapshotCopyGrants where
  page :: DescribeSnapshotCopyGrants
-> AWSResponse DescribeSnapshotCopyGrants
-> Maybe DescribeSnapshotCopyGrants
page DescribeSnapshotCopyGrants
rq AWSResponse DescribeSnapshotCopyGrants
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeSnapshotCopyGrants
DescribeSnapshotCopyGrantsResponse
rs
            DescribeSnapshotCopyGrantsResponse
-> Getting (First Text) DescribeSnapshotCopyGrantsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeSnapshotCopyGrantsResponse
-> Const (First Text) DescribeSnapshotCopyGrantsResponse
Lens' DescribeSnapshotCopyGrantsResponse (Maybe Text)
describeSnapshotCopyGrantsResponse_marker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeSnapshotCopyGrantsResponse
 -> Const (First Text) DescribeSnapshotCopyGrantsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeSnapshotCopyGrantsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeSnapshotCopyGrants
forall a. Maybe a
Prelude.Nothing
    | Maybe [SnapshotCopyGrant] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeSnapshotCopyGrants
DescribeSnapshotCopyGrantsResponse
rs
            DescribeSnapshotCopyGrantsResponse
-> Getting
     (First [SnapshotCopyGrant])
     DescribeSnapshotCopyGrantsResponse
     [SnapshotCopyGrant]
-> Maybe [SnapshotCopyGrant]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [SnapshotCopyGrant]
 -> Const (First [SnapshotCopyGrant]) (Maybe [SnapshotCopyGrant]))
-> DescribeSnapshotCopyGrantsResponse
-> Const
     (First [SnapshotCopyGrant]) DescribeSnapshotCopyGrantsResponse
Lens'
  DescribeSnapshotCopyGrantsResponse (Maybe [SnapshotCopyGrant])
describeSnapshotCopyGrantsResponse_snapshotCopyGrants
              ((Maybe [SnapshotCopyGrant]
  -> Const (First [SnapshotCopyGrant]) (Maybe [SnapshotCopyGrant]))
 -> DescribeSnapshotCopyGrantsResponse
 -> Const
      (First [SnapshotCopyGrant]) DescribeSnapshotCopyGrantsResponse)
-> (([SnapshotCopyGrant]
     -> Const (First [SnapshotCopyGrant]) [SnapshotCopyGrant])
    -> Maybe [SnapshotCopyGrant]
    -> Const (First [SnapshotCopyGrant]) (Maybe [SnapshotCopyGrant]))
-> Getting
     (First [SnapshotCopyGrant])
     DescribeSnapshotCopyGrantsResponse
     [SnapshotCopyGrant]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([SnapshotCopyGrant]
 -> Const (First [SnapshotCopyGrant]) [SnapshotCopyGrant])
-> Maybe [SnapshotCopyGrant]
-> Const (First [SnapshotCopyGrant]) (Maybe [SnapshotCopyGrant])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeSnapshotCopyGrants
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeSnapshotCopyGrants -> Maybe DescribeSnapshotCopyGrants
forall a. a -> Maybe a
Prelude.Just (DescribeSnapshotCopyGrants -> Maybe DescribeSnapshotCopyGrants)
-> DescribeSnapshotCopyGrants -> Maybe DescribeSnapshotCopyGrants
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeSnapshotCopyGrants
rq
          DescribeSnapshotCopyGrants
-> (DescribeSnapshotCopyGrants -> DescribeSnapshotCopyGrants)
-> DescribeSnapshotCopyGrants
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeSnapshotCopyGrants
-> Identity DescribeSnapshotCopyGrants
Lens
  DescribeSnapshotCopyGrants
  DescribeSnapshotCopyGrants
  (Maybe Text)
  (Maybe Text)
describeSnapshotCopyGrants_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeSnapshotCopyGrants
 -> Identity DescribeSnapshotCopyGrants)
-> Maybe Text
-> DescribeSnapshotCopyGrants
-> DescribeSnapshotCopyGrants
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeSnapshotCopyGrants
DescribeSnapshotCopyGrantsResponse
rs
          DescribeSnapshotCopyGrantsResponse
-> Getting (First Text) DescribeSnapshotCopyGrantsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeSnapshotCopyGrantsResponse
-> Const (First Text) DescribeSnapshotCopyGrantsResponse
Lens' DescribeSnapshotCopyGrantsResponse (Maybe Text)
describeSnapshotCopyGrantsResponse_marker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeSnapshotCopyGrantsResponse
 -> Const (First Text) DescribeSnapshotCopyGrantsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeSnapshotCopyGrantsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeSnapshotCopyGrants where
  type
    AWSResponse DescribeSnapshotCopyGrants =
      DescribeSnapshotCopyGrantsResponse
  request :: DescribeSnapshotCopyGrants -> Request DescribeSnapshotCopyGrants
request = Service
-> DescribeSnapshotCopyGrants -> Request DescribeSnapshotCopyGrants
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeSnapshotCopyGrants
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSnapshotCopyGrants)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeSnapshotCopyGrants))
-> Logger
-> Service
-> Proxy DescribeSnapshotCopyGrants
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeSnapshotCopyGrants)))
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
"DescribeSnapshotCopyGrantsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [SnapshotCopyGrant]
-> Maybe Text -> Int -> DescribeSnapshotCopyGrantsResponse
DescribeSnapshotCopyGrantsResponse'
            (Maybe [SnapshotCopyGrant]
 -> Maybe Text -> Int -> DescribeSnapshotCopyGrantsResponse)
-> Either String (Maybe [SnapshotCopyGrant])
-> Either
     String (Maybe Text -> Int -> DescribeSnapshotCopyGrantsResponse)
forall (f :: * -> *) a b. Functor 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
"SnapshotCopyGrants"
                            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 [SnapshotCopyGrant]))
-> Either String (Maybe [SnapshotCopyGrant])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [SnapshotCopyGrant])
-> [Node] -> Either String (Maybe [SnapshotCopyGrant])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [SnapshotCopyGrant]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"SnapshotCopyGrant")
                        )
            Either
  String (Maybe Text -> Int -> DescribeSnapshotCopyGrantsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeSnapshotCopyGrantsResponse)
forall (f :: * -> *) a b. Applicative f => 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 (Int -> DescribeSnapshotCopyGrantsResponse)
-> Either String Int
-> Either String DescribeSnapshotCopyGrantsResponse
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 DescribeSnapshotCopyGrants

instance Prelude.NFData DescribeSnapshotCopyGrants

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

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

instance Core.ToQuery DescribeSnapshotCopyGrants where
  toQuery :: DescribeSnapshotCopyGrants -> QueryString
toQuery DescribeSnapshotCopyGrants' {Maybe Int
Maybe [Text]
Maybe Text
snapshotCopyGrantName :: Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
tagKeys :: Maybe [Text]
tagValues :: Maybe [Text]
$sel:snapshotCopyGrantName:DescribeSnapshotCopyGrants' :: DescribeSnapshotCopyGrants -> Maybe Text
$sel:maxRecords:DescribeSnapshotCopyGrants' :: DescribeSnapshotCopyGrants -> Maybe Int
$sel:marker:DescribeSnapshotCopyGrants' :: DescribeSnapshotCopyGrants -> Maybe Text
$sel:tagKeys:DescribeSnapshotCopyGrants' :: DescribeSnapshotCopyGrants -> Maybe [Text]
$sel:tagValues:DescribeSnapshotCopyGrants' :: DescribeSnapshotCopyGrants -> 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
"DescribeSnapshotCopyGrants" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"TagValues"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"TagValue" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tagValues),
        ByteString
"TagKeys"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"TagKey" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tagKeys),
        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
"SnapshotCopyGrantName"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snapshotCopyGrantName
      ]

-- |
--
-- /See:/ 'newDescribeSnapshotCopyGrantsResponse' smart constructor.
data DescribeSnapshotCopyGrantsResponse = DescribeSnapshotCopyGrantsResponse'
  { -- | The list of @SnapshotCopyGrant@ objects.
    DescribeSnapshotCopyGrantsResponse -> Maybe [SnapshotCopyGrant]
snapshotCopyGrants :: Prelude.Maybe [SnapshotCopyGrant],
    -- | An optional parameter that specifies the starting point to return a set
    -- of response records. When the results of a @DescribeSnapshotCopyGrant@
    -- request exceed the value specified in @MaxRecords@, Amazon Web Services
    -- 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.
    --
    -- Constraints: You can specify either the __SnapshotCopyGrantName__
    -- parameter or the __Marker__ parameter, but not both.
    DescribeSnapshotCopyGrantsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeSnapshotCopyGrantsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeSnapshotCopyGrantsResponse
-> DescribeSnapshotCopyGrantsResponse -> Bool
(DescribeSnapshotCopyGrantsResponse
 -> DescribeSnapshotCopyGrantsResponse -> Bool)
-> (DescribeSnapshotCopyGrantsResponse
    -> DescribeSnapshotCopyGrantsResponse -> Bool)
-> Eq DescribeSnapshotCopyGrantsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSnapshotCopyGrantsResponse
-> DescribeSnapshotCopyGrantsResponse -> Bool
$c/= :: DescribeSnapshotCopyGrantsResponse
-> DescribeSnapshotCopyGrantsResponse -> Bool
== :: DescribeSnapshotCopyGrantsResponse
-> DescribeSnapshotCopyGrantsResponse -> Bool
$c== :: DescribeSnapshotCopyGrantsResponse
-> DescribeSnapshotCopyGrantsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeSnapshotCopyGrantsResponse]
ReadPrec DescribeSnapshotCopyGrantsResponse
Int -> ReadS DescribeSnapshotCopyGrantsResponse
ReadS [DescribeSnapshotCopyGrantsResponse]
(Int -> ReadS DescribeSnapshotCopyGrantsResponse)
-> ReadS [DescribeSnapshotCopyGrantsResponse]
-> ReadPrec DescribeSnapshotCopyGrantsResponse
-> ReadPrec [DescribeSnapshotCopyGrantsResponse]
-> Read DescribeSnapshotCopyGrantsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSnapshotCopyGrantsResponse]
$creadListPrec :: ReadPrec [DescribeSnapshotCopyGrantsResponse]
readPrec :: ReadPrec DescribeSnapshotCopyGrantsResponse
$creadPrec :: ReadPrec DescribeSnapshotCopyGrantsResponse
readList :: ReadS [DescribeSnapshotCopyGrantsResponse]
$creadList :: ReadS [DescribeSnapshotCopyGrantsResponse]
readsPrec :: Int -> ReadS DescribeSnapshotCopyGrantsResponse
$creadsPrec :: Int -> ReadS DescribeSnapshotCopyGrantsResponse
Prelude.Read, Int -> DescribeSnapshotCopyGrantsResponse -> ShowS
[DescribeSnapshotCopyGrantsResponse] -> ShowS
DescribeSnapshotCopyGrantsResponse -> String
(Int -> DescribeSnapshotCopyGrantsResponse -> ShowS)
-> (DescribeSnapshotCopyGrantsResponse -> String)
-> ([DescribeSnapshotCopyGrantsResponse] -> ShowS)
-> Show DescribeSnapshotCopyGrantsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSnapshotCopyGrantsResponse] -> ShowS
$cshowList :: [DescribeSnapshotCopyGrantsResponse] -> ShowS
show :: DescribeSnapshotCopyGrantsResponse -> String
$cshow :: DescribeSnapshotCopyGrantsResponse -> String
showsPrec :: Int -> DescribeSnapshotCopyGrantsResponse -> ShowS
$cshowsPrec :: Int -> DescribeSnapshotCopyGrantsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeSnapshotCopyGrantsResponse
 -> Rep DescribeSnapshotCopyGrantsResponse x)
-> (forall x.
    Rep DescribeSnapshotCopyGrantsResponse x
    -> DescribeSnapshotCopyGrantsResponse)
-> Generic DescribeSnapshotCopyGrantsResponse
forall x.
Rep DescribeSnapshotCopyGrantsResponse x
-> DescribeSnapshotCopyGrantsResponse
forall x.
DescribeSnapshotCopyGrantsResponse
-> Rep DescribeSnapshotCopyGrantsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeSnapshotCopyGrantsResponse x
-> DescribeSnapshotCopyGrantsResponse
$cfrom :: forall x.
DescribeSnapshotCopyGrantsResponse
-> Rep DescribeSnapshotCopyGrantsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSnapshotCopyGrantsResponse' 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:
--
-- 'snapshotCopyGrants', 'describeSnapshotCopyGrantsResponse_snapshotCopyGrants' - The list of @SnapshotCopyGrant@ objects.
--
-- 'marker', 'describeSnapshotCopyGrantsResponse_marker' - An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a @DescribeSnapshotCopyGrant@
-- request exceed the value specified in @MaxRecords@, Amazon Web Services
-- 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.
--
-- Constraints: You can specify either the __SnapshotCopyGrantName__
-- parameter or the __Marker__ parameter, but not both.
--
-- 'httpStatus', 'describeSnapshotCopyGrantsResponse_httpStatus' - The response's http status code.
newDescribeSnapshotCopyGrantsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeSnapshotCopyGrantsResponse
newDescribeSnapshotCopyGrantsResponse :: Int -> DescribeSnapshotCopyGrantsResponse
newDescribeSnapshotCopyGrantsResponse Int
pHttpStatus_ =
  DescribeSnapshotCopyGrantsResponse' :: Maybe [SnapshotCopyGrant]
-> Maybe Text -> Int -> DescribeSnapshotCopyGrantsResponse
DescribeSnapshotCopyGrantsResponse'
    { $sel:snapshotCopyGrants:DescribeSnapshotCopyGrantsResponse' :: Maybe [SnapshotCopyGrant]
snapshotCopyGrants =
        Maybe [SnapshotCopyGrant]
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeSnapshotCopyGrantsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeSnapshotCopyGrantsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of @SnapshotCopyGrant@ objects.
describeSnapshotCopyGrantsResponse_snapshotCopyGrants :: Lens.Lens' DescribeSnapshotCopyGrantsResponse (Prelude.Maybe [SnapshotCopyGrant])
describeSnapshotCopyGrantsResponse_snapshotCopyGrants :: (Maybe [SnapshotCopyGrant] -> f (Maybe [SnapshotCopyGrant]))
-> DescribeSnapshotCopyGrantsResponse
-> f DescribeSnapshotCopyGrantsResponse
describeSnapshotCopyGrantsResponse_snapshotCopyGrants = (DescribeSnapshotCopyGrantsResponse -> Maybe [SnapshotCopyGrant])
-> (DescribeSnapshotCopyGrantsResponse
    -> Maybe [SnapshotCopyGrant] -> DescribeSnapshotCopyGrantsResponse)
-> Lens'
     DescribeSnapshotCopyGrantsResponse (Maybe [SnapshotCopyGrant])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotCopyGrantsResponse' {Maybe [SnapshotCopyGrant]
snapshotCopyGrants :: Maybe [SnapshotCopyGrant]
$sel:snapshotCopyGrants:DescribeSnapshotCopyGrantsResponse' :: DescribeSnapshotCopyGrantsResponse -> Maybe [SnapshotCopyGrant]
snapshotCopyGrants} -> Maybe [SnapshotCopyGrant]
snapshotCopyGrants) (\s :: DescribeSnapshotCopyGrantsResponse
s@DescribeSnapshotCopyGrantsResponse' {} Maybe [SnapshotCopyGrant]
a -> DescribeSnapshotCopyGrantsResponse
s {$sel:snapshotCopyGrants:DescribeSnapshotCopyGrantsResponse' :: Maybe [SnapshotCopyGrant]
snapshotCopyGrants = Maybe [SnapshotCopyGrant]
a} :: DescribeSnapshotCopyGrantsResponse) ((Maybe [SnapshotCopyGrant] -> f (Maybe [SnapshotCopyGrant]))
 -> DescribeSnapshotCopyGrantsResponse
 -> f DescribeSnapshotCopyGrantsResponse)
-> ((Maybe [SnapshotCopyGrant] -> f (Maybe [SnapshotCopyGrant]))
    -> Maybe [SnapshotCopyGrant] -> f (Maybe [SnapshotCopyGrant]))
-> (Maybe [SnapshotCopyGrant] -> f (Maybe [SnapshotCopyGrant]))
-> DescribeSnapshotCopyGrantsResponse
-> f DescribeSnapshotCopyGrantsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SnapshotCopyGrant]
  [SnapshotCopyGrant]
  [SnapshotCopyGrant]
  [SnapshotCopyGrant]
-> Iso
     (Maybe [SnapshotCopyGrant])
     (Maybe [SnapshotCopyGrant])
     (Maybe [SnapshotCopyGrant])
     (Maybe [SnapshotCopyGrant])
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
  [SnapshotCopyGrant]
  [SnapshotCopyGrant]
  [SnapshotCopyGrant]
  [SnapshotCopyGrant]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An optional parameter that specifies the starting point to return a set
-- of response records. When the results of a @DescribeSnapshotCopyGrant@
-- request exceed the value specified in @MaxRecords@, Amazon Web Services
-- 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.
--
-- Constraints: You can specify either the __SnapshotCopyGrantName__
-- parameter or the __Marker__ parameter, but not both.
describeSnapshotCopyGrantsResponse_marker :: Lens.Lens' DescribeSnapshotCopyGrantsResponse (Prelude.Maybe Prelude.Text)
describeSnapshotCopyGrantsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeSnapshotCopyGrantsResponse
-> f DescribeSnapshotCopyGrantsResponse
describeSnapshotCopyGrantsResponse_marker = (DescribeSnapshotCopyGrantsResponse -> Maybe Text)
-> (DescribeSnapshotCopyGrantsResponse
    -> Maybe Text -> DescribeSnapshotCopyGrantsResponse)
-> Lens' DescribeSnapshotCopyGrantsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSnapshotCopyGrantsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeSnapshotCopyGrantsResponse' :: DescribeSnapshotCopyGrantsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeSnapshotCopyGrantsResponse
s@DescribeSnapshotCopyGrantsResponse' {} Maybe Text
a -> DescribeSnapshotCopyGrantsResponse
s {$sel:marker:DescribeSnapshotCopyGrantsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeSnapshotCopyGrantsResponse)

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

instance
  Prelude.NFData
    DescribeSnapshotCopyGrantsResponse