{-# 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.StorageGateway.RefreshCache
-- 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)
--
-- Refreshes the cached inventory of objects for the specified file share.
-- This operation finds objects in the Amazon S3 bucket that were added,
-- removed, or replaced since the gateway last listed the bucket\'s
-- contents and cached the results. This operation does not import files
-- into the S3 File Gateway cache storage. It only updates the cached
-- inventory to reflect changes in the inventory of the objects in the S3
-- bucket. This operation is only supported in the S3 File Gateway types.
--
-- You can subscribe to be notified through an Amazon CloudWatch event when
-- your @RefreshCache@ operation completes. For more information, see
-- <https://docs.aws.amazon.com/storagegateway/latest/userguide/monitoring-file-gateway.html#get-notification Getting notified about file operations>
-- in the /Storage Gateway User Guide/. This operation is Only supported
-- for S3 File Gateways.
--
-- When this API is called, it only initiates the refresh operation. When
-- the API call completes and returns a success code, it doesn\'t
-- necessarily mean that the file refresh has completed. You should use the
-- refresh-complete notification to determine that the operation has
-- completed before you check for new files on the gateway file share. You
-- can subscribe to be notified through a CloudWatch event when your
-- @RefreshCache@ operation completes.
--
-- Throttle limit: This API is asynchronous, so the gateway will accept no
-- more than two refreshes at any time. We recommend using the
-- refresh-complete CloudWatch event notification before issuing additional
-- requests. For more information, see
-- <https://docs.aws.amazon.com/storagegateway/latest/userguide/monitoring-file-gateway.html#get-notification Getting notified about file operations>
-- in the /Storage Gateway User Guide/.
--
-- If you invoke the RefreshCache API when two requests are already being
-- processed, any new request will cause an
-- @InvalidGatewayRequestException@ error because too many requests were
-- sent to the server.
--
-- For more information, see
-- <https://docs.aws.amazon.com/storagegateway/latest/userguide/monitoring-file-gateway.html#get-notification Getting notified about file operations>
-- in the /Storage Gateway User Guide/.
module Amazonka.StorageGateway.RefreshCache
  ( -- * Creating a Request
    RefreshCache (..),
    newRefreshCache,

    -- * Request Lenses
    refreshCache_folderList,
    refreshCache_recursive,
    refreshCache_fileShareARN,

    -- * Destructuring the Response
    RefreshCacheResponse (..),
    newRefreshCacheResponse,

    -- * Response Lenses
    refreshCacheResponse_fileShareARN,
    refreshCacheResponse_notificationId,
    refreshCacheResponse_httpStatus,
  )
where

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

-- | RefreshCacheInput
--
-- /See:/ 'newRefreshCache' smart constructor.
data RefreshCache = RefreshCache'
  { -- | A comma-separated list of the paths of folders to refresh in the cache.
    -- The default is [@\"\/\"@]. The default refreshes objects and folders at
    -- the root of the Amazon S3 bucket. If @Recursive@ is set to @true@, the
    -- entire S3 bucket that the file share has access to is refreshed.
    RefreshCache -> Maybe (NonEmpty Text)
folderList :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | A value that specifies whether to recursively refresh folders in the
    -- cache. The refresh includes folders that were in the cache the last time
    -- the gateway listed the folder\'s contents. If this value set to @true@,
    -- each folder that is listed in @FolderList@ is recursively updated.
    -- Otherwise, subfolders listed in @FolderList@ are not refreshed. Only
    -- objects that are in folders listed directly under @FolderList@ are found
    -- and used for the update. The default is @true@.
    --
    -- Valid Values: @true@ | @false@
    RefreshCache -> Maybe Bool
recursive :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the file share you want to refresh.
    RefreshCache -> Text
fileShareARN :: Prelude.Text
  }
  deriving (RefreshCache -> RefreshCache -> Bool
(RefreshCache -> RefreshCache -> Bool)
-> (RefreshCache -> RefreshCache -> Bool) -> Eq RefreshCache
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RefreshCache -> RefreshCache -> Bool
$c/= :: RefreshCache -> RefreshCache -> Bool
== :: RefreshCache -> RefreshCache -> Bool
$c== :: RefreshCache -> RefreshCache -> Bool
Prelude.Eq, ReadPrec [RefreshCache]
ReadPrec RefreshCache
Int -> ReadS RefreshCache
ReadS [RefreshCache]
(Int -> ReadS RefreshCache)
-> ReadS [RefreshCache]
-> ReadPrec RefreshCache
-> ReadPrec [RefreshCache]
-> Read RefreshCache
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RefreshCache]
$creadListPrec :: ReadPrec [RefreshCache]
readPrec :: ReadPrec RefreshCache
$creadPrec :: ReadPrec RefreshCache
readList :: ReadS [RefreshCache]
$creadList :: ReadS [RefreshCache]
readsPrec :: Int -> ReadS RefreshCache
$creadsPrec :: Int -> ReadS RefreshCache
Prelude.Read, Int -> RefreshCache -> ShowS
[RefreshCache] -> ShowS
RefreshCache -> String
(Int -> RefreshCache -> ShowS)
-> (RefreshCache -> String)
-> ([RefreshCache] -> ShowS)
-> Show RefreshCache
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RefreshCache] -> ShowS
$cshowList :: [RefreshCache] -> ShowS
show :: RefreshCache -> String
$cshow :: RefreshCache -> String
showsPrec :: Int -> RefreshCache -> ShowS
$cshowsPrec :: Int -> RefreshCache -> ShowS
Prelude.Show, (forall x. RefreshCache -> Rep RefreshCache x)
-> (forall x. Rep RefreshCache x -> RefreshCache)
-> Generic RefreshCache
forall x. Rep RefreshCache x -> RefreshCache
forall x. RefreshCache -> Rep RefreshCache x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RefreshCache x -> RefreshCache
$cfrom :: forall x. RefreshCache -> Rep RefreshCache x
Prelude.Generic)

-- |
-- Create a value of 'RefreshCache' 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:
--
-- 'folderList', 'refreshCache_folderList' - A comma-separated list of the paths of folders to refresh in the cache.
-- The default is [@\"\/\"@]. The default refreshes objects and folders at
-- the root of the Amazon S3 bucket. If @Recursive@ is set to @true@, the
-- entire S3 bucket that the file share has access to is refreshed.
--
-- 'recursive', 'refreshCache_recursive' - A value that specifies whether to recursively refresh folders in the
-- cache. The refresh includes folders that were in the cache the last time
-- the gateway listed the folder\'s contents. If this value set to @true@,
-- each folder that is listed in @FolderList@ is recursively updated.
-- Otherwise, subfolders listed in @FolderList@ are not refreshed. Only
-- objects that are in folders listed directly under @FolderList@ are found
-- and used for the update. The default is @true@.
--
-- Valid Values: @true@ | @false@
--
-- 'fileShareARN', 'refreshCache_fileShareARN' - The Amazon Resource Name (ARN) of the file share you want to refresh.
newRefreshCache ::
  -- | 'fileShareARN'
  Prelude.Text ->
  RefreshCache
newRefreshCache :: Text -> RefreshCache
newRefreshCache Text
pFileShareARN_ =
  RefreshCache' :: Maybe (NonEmpty Text) -> Maybe Bool -> Text -> RefreshCache
RefreshCache'
    { $sel:folderList:RefreshCache' :: Maybe (NonEmpty Text)
folderList = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:recursive:RefreshCache' :: Maybe Bool
recursive = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:fileShareARN:RefreshCache' :: Text
fileShareARN = Text
pFileShareARN_
    }

-- | A comma-separated list of the paths of folders to refresh in the cache.
-- The default is [@\"\/\"@]. The default refreshes objects and folders at
-- the root of the Amazon S3 bucket. If @Recursive@ is set to @true@, the
-- entire S3 bucket that the file share has access to is refreshed.
refreshCache_folderList :: Lens.Lens' RefreshCache (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
refreshCache_folderList :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> RefreshCache -> f RefreshCache
refreshCache_folderList = (RefreshCache -> Maybe (NonEmpty Text))
-> (RefreshCache -> Maybe (NonEmpty Text) -> RefreshCache)
-> Lens
     RefreshCache
     RefreshCache
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RefreshCache' {Maybe (NonEmpty Text)
folderList :: Maybe (NonEmpty Text)
$sel:folderList:RefreshCache' :: RefreshCache -> Maybe (NonEmpty Text)
folderList} -> Maybe (NonEmpty Text)
folderList) (\s :: RefreshCache
s@RefreshCache' {} Maybe (NonEmpty Text)
a -> RefreshCache
s {$sel:folderList:RefreshCache' :: Maybe (NonEmpty Text)
folderList = Maybe (NonEmpty Text)
a} :: RefreshCache) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> RefreshCache -> f RefreshCache)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> RefreshCache
-> f RefreshCache
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A value that specifies whether to recursively refresh folders in the
-- cache. The refresh includes folders that were in the cache the last time
-- the gateway listed the folder\'s contents. If this value set to @true@,
-- each folder that is listed in @FolderList@ is recursively updated.
-- Otherwise, subfolders listed in @FolderList@ are not refreshed. Only
-- objects that are in folders listed directly under @FolderList@ are found
-- and used for the update. The default is @true@.
--
-- Valid Values: @true@ | @false@
refreshCache_recursive :: Lens.Lens' RefreshCache (Prelude.Maybe Prelude.Bool)
refreshCache_recursive :: (Maybe Bool -> f (Maybe Bool)) -> RefreshCache -> f RefreshCache
refreshCache_recursive = (RefreshCache -> Maybe Bool)
-> (RefreshCache -> Maybe Bool -> RefreshCache)
-> Lens RefreshCache RefreshCache (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RefreshCache' {Maybe Bool
recursive :: Maybe Bool
$sel:recursive:RefreshCache' :: RefreshCache -> Maybe Bool
recursive} -> Maybe Bool
recursive) (\s :: RefreshCache
s@RefreshCache' {} Maybe Bool
a -> RefreshCache
s {$sel:recursive:RefreshCache' :: Maybe Bool
recursive = Maybe Bool
a} :: RefreshCache)

-- | The Amazon Resource Name (ARN) of the file share you want to refresh.
refreshCache_fileShareARN :: Lens.Lens' RefreshCache Prelude.Text
refreshCache_fileShareARN :: (Text -> f Text) -> RefreshCache -> f RefreshCache
refreshCache_fileShareARN = (RefreshCache -> Text)
-> (RefreshCache -> Text -> RefreshCache)
-> Lens RefreshCache RefreshCache Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RefreshCache' {Text
fileShareARN :: Text
$sel:fileShareARN:RefreshCache' :: RefreshCache -> Text
fileShareARN} -> Text
fileShareARN) (\s :: RefreshCache
s@RefreshCache' {} Text
a -> RefreshCache
s {$sel:fileShareARN:RefreshCache' :: Text
fileShareARN = Text
a} :: RefreshCache)

instance Core.AWSRequest RefreshCache where
  type AWSResponse RefreshCache = RefreshCacheResponse
  request :: RefreshCache -> Request RefreshCache
request = Service -> RefreshCache -> Request RefreshCache
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy RefreshCache
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RefreshCache)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse RefreshCache))
-> Logger
-> Service
-> Proxy RefreshCache
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RefreshCache)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Maybe Text -> Int -> RefreshCacheResponse
RefreshCacheResponse'
            (Maybe Text -> Maybe Text -> Int -> RefreshCacheResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> RefreshCacheResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FileShareARN")
            Either String (Maybe Text -> Int -> RefreshCacheResponse)
-> Either String (Maybe Text)
-> Either String (Int -> RefreshCacheResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NotificationId")
            Either String (Int -> RefreshCacheResponse)
-> Either String Int -> Either String RefreshCacheResponse
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 RefreshCache

instance Prelude.NFData RefreshCache

instance Core.ToHeaders RefreshCache where
  toHeaders :: RefreshCache -> ResponseHeaders
toHeaders =
    ResponseHeaders -> RefreshCache -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"StorageGateway_20130630.RefreshCache" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON RefreshCache where
  toJSON :: RefreshCache -> Value
toJSON RefreshCache' {Maybe Bool
Maybe (NonEmpty Text)
Text
fileShareARN :: Text
recursive :: Maybe Bool
folderList :: Maybe (NonEmpty Text)
$sel:fileShareARN:RefreshCache' :: RefreshCache -> Text
$sel:recursive:RefreshCache' :: RefreshCache -> Maybe Bool
$sel:folderList:RefreshCache' :: RefreshCache -> Maybe (NonEmpty Text)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"FolderList" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
folderList,
            (Text
"Recursive" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
recursive,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"FileShareARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fileShareARN)
          ]
      )

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

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

-- | RefreshCacheOutput
--
-- /See:/ 'newRefreshCacheResponse' smart constructor.
data RefreshCacheResponse = RefreshCacheResponse'
  { RefreshCacheResponse -> Maybe Text
fileShareARN :: Prelude.Maybe Prelude.Text,
    RefreshCacheResponse -> Maybe Text
notificationId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    RefreshCacheResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RefreshCacheResponse -> RefreshCacheResponse -> Bool
(RefreshCacheResponse -> RefreshCacheResponse -> Bool)
-> (RefreshCacheResponse -> RefreshCacheResponse -> Bool)
-> Eq RefreshCacheResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RefreshCacheResponse -> RefreshCacheResponse -> Bool
$c/= :: RefreshCacheResponse -> RefreshCacheResponse -> Bool
== :: RefreshCacheResponse -> RefreshCacheResponse -> Bool
$c== :: RefreshCacheResponse -> RefreshCacheResponse -> Bool
Prelude.Eq, ReadPrec [RefreshCacheResponse]
ReadPrec RefreshCacheResponse
Int -> ReadS RefreshCacheResponse
ReadS [RefreshCacheResponse]
(Int -> ReadS RefreshCacheResponse)
-> ReadS [RefreshCacheResponse]
-> ReadPrec RefreshCacheResponse
-> ReadPrec [RefreshCacheResponse]
-> Read RefreshCacheResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RefreshCacheResponse]
$creadListPrec :: ReadPrec [RefreshCacheResponse]
readPrec :: ReadPrec RefreshCacheResponse
$creadPrec :: ReadPrec RefreshCacheResponse
readList :: ReadS [RefreshCacheResponse]
$creadList :: ReadS [RefreshCacheResponse]
readsPrec :: Int -> ReadS RefreshCacheResponse
$creadsPrec :: Int -> ReadS RefreshCacheResponse
Prelude.Read, Int -> RefreshCacheResponse -> ShowS
[RefreshCacheResponse] -> ShowS
RefreshCacheResponse -> String
(Int -> RefreshCacheResponse -> ShowS)
-> (RefreshCacheResponse -> String)
-> ([RefreshCacheResponse] -> ShowS)
-> Show RefreshCacheResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RefreshCacheResponse] -> ShowS
$cshowList :: [RefreshCacheResponse] -> ShowS
show :: RefreshCacheResponse -> String
$cshow :: RefreshCacheResponse -> String
showsPrec :: Int -> RefreshCacheResponse -> ShowS
$cshowsPrec :: Int -> RefreshCacheResponse -> ShowS
Prelude.Show, (forall x. RefreshCacheResponse -> Rep RefreshCacheResponse x)
-> (forall x. Rep RefreshCacheResponse x -> RefreshCacheResponse)
-> Generic RefreshCacheResponse
forall x. Rep RefreshCacheResponse x -> RefreshCacheResponse
forall x. RefreshCacheResponse -> Rep RefreshCacheResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RefreshCacheResponse x -> RefreshCacheResponse
$cfrom :: forall x. RefreshCacheResponse -> Rep RefreshCacheResponse x
Prelude.Generic)

-- |
-- Create a value of 'RefreshCacheResponse' 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:
--
-- 'fileShareARN', 'refreshCacheResponse_fileShareARN' - Undocumented member.
--
-- 'notificationId', 'refreshCacheResponse_notificationId' - Undocumented member.
--
-- 'httpStatus', 'refreshCacheResponse_httpStatus' - The response's http status code.
newRefreshCacheResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RefreshCacheResponse
newRefreshCacheResponse :: Int -> RefreshCacheResponse
newRefreshCacheResponse Int
pHttpStatus_ =
  RefreshCacheResponse' :: Maybe Text -> Maybe Text -> Int -> RefreshCacheResponse
RefreshCacheResponse'
    { $sel:fileShareARN:RefreshCacheResponse' :: Maybe Text
fileShareARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationId:RefreshCacheResponse' :: Maybe Text
notificationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RefreshCacheResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
refreshCacheResponse_fileShareARN :: Lens.Lens' RefreshCacheResponse (Prelude.Maybe Prelude.Text)
refreshCacheResponse_fileShareARN :: (Maybe Text -> f (Maybe Text))
-> RefreshCacheResponse -> f RefreshCacheResponse
refreshCacheResponse_fileShareARN = (RefreshCacheResponse -> Maybe Text)
-> (RefreshCacheResponse -> Maybe Text -> RefreshCacheResponse)
-> Lens
     RefreshCacheResponse RefreshCacheResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RefreshCacheResponse' {Maybe Text
fileShareARN :: Maybe Text
$sel:fileShareARN:RefreshCacheResponse' :: RefreshCacheResponse -> Maybe Text
fileShareARN} -> Maybe Text
fileShareARN) (\s :: RefreshCacheResponse
s@RefreshCacheResponse' {} Maybe Text
a -> RefreshCacheResponse
s {$sel:fileShareARN:RefreshCacheResponse' :: Maybe Text
fileShareARN = Maybe Text
a} :: RefreshCacheResponse)

-- | Undocumented member.
refreshCacheResponse_notificationId :: Lens.Lens' RefreshCacheResponse (Prelude.Maybe Prelude.Text)
refreshCacheResponse_notificationId :: (Maybe Text -> f (Maybe Text))
-> RefreshCacheResponse -> f RefreshCacheResponse
refreshCacheResponse_notificationId = (RefreshCacheResponse -> Maybe Text)
-> (RefreshCacheResponse -> Maybe Text -> RefreshCacheResponse)
-> Lens
     RefreshCacheResponse RefreshCacheResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RefreshCacheResponse' {Maybe Text
notificationId :: Maybe Text
$sel:notificationId:RefreshCacheResponse' :: RefreshCacheResponse -> Maybe Text
notificationId} -> Maybe Text
notificationId) (\s :: RefreshCacheResponse
s@RefreshCacheResponse' {} Maybe Text
a -> RefreshCacheResponse
s {$sel:notificationId:RefreshCacheResponse' :: Maybe Text
notificationId = Maybe Text
a} :: RefreshCacheResponse)

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

instance Prelude.NFData RefreshCacheResponse