{-# 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.Lightsail.GetDistributionLatestCacheReset
-- 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 the timestamp and status of the last cache reset of a specific
-- Amazon Lightsail content delivery network (CDN) distribution.
module Amazonka.Lightsail.GetDistributionLatestCacheReset
  ( -- * Creating a Request
    GetDistributionLatestCacheReset (..),
    newGetDistributionLatestCacheReset,

    -- * Request Lenses
    getDistributionLatestCacheReset_distributionName,

    -- * Destructuring the Response
    GetDistributionLatestCacheResetResponse (..),
    newGetDistributionLatestCacheResetResponse,

    -- * Response Lenses
    getDistributionLatestCacheResetResponse_status,
    getDistributionLatestCacheResetResponse_createTime,
    getDistributionLatestCacheResetResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetDistributionLatestCacheReset' smart constructor.
data GetDistributionLatestCacheReset = GetDistributionLatestCacheReset'
  { -- | The name of the distribution for which to return the timestamp of the
    -- last cache reset.
    --
    -- Use the @GetDistributions@ action to get a list of distribution names
    -- that you can specify.
    --
    -- When omitted, the response includes the latest cache reset timestamp of
    -- all your distributions.
    GetDistributionLatestCacheReset -> Maybe Text
distributionName :: Prelude.Maybe Prelude.Text
  }
  deriving (GetDistributionLatestCacheReset
-> GetDistributionLatestCacheReset -> Bool
(GetDistributionLatestCacheReset
 -> GetDistributionLatestCacheReset -> Bool)
-> (GetDistributionLatestCacheReset
    -> GetDistributionLatestCacheReset -> Bool)
-> Eq GetDistributionLatestCacheReset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDistributionLatestCacheReset
-> GetDistributionLatestCacheReset -> Bool
$c/= :: GetDistributionLatestCacheReset
-> GetDistributionLatestCacheReset -> Bool
== :: GetDistributionLatestCacheReset
-> GetDistributionLatestCacheReset -> Bool
$c== :: GetDistributionLatestCacheReset
-> GetDistributionLatestCacheReset -> Bool
Prelude.Eq, ReadPrec [GetDistributionLatestCacheReset]
ReadPrec GetDistributionLatestCacheReset
Int -> ReadS GetDistributionLatestCacheReset
ReadS [GetDistributionLatestCacheReset]
(Int -> ReadS GetDistributionLatestCacheReset)
-> ReadS [GetDistributionLatestCacheReset]
-> ReadPrec GetDistributionLatestCacheReset
-> ReadPrec [GetDistributionLatestCacheReset]
-> Read GetDistributionLatestCacheReset
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDistributionLatestCacheReset]
$creadListPrec :: ReadPrec [GetDistributionLatestCacheReset]
readPrec :: ReadPrec GetDistributionLatestCacheReset
$creadPrec :: ReadPrec GetDistributionLatestCacheReset
readList :: ReadS [GetDistributionLatestCacheReset]
$creadList :: ReadS [GetDistributionLatestCacheReset]
readsPrec :: Int -> ReadS GetDistributionLatestCacheReset
$creadsPrec :: Int -> ReadS GetDistributionLatestCacheReset
Prelude.Read, Int -> GetDistributionLatestCacheReset -> ShowS
[GetDistributionLatestCacheReset] -> ShowS
GetDistributionLatestCacheReset -> String
(Int -> GetDistributionLatestCacheReset -> ShowS)
-> (GetDistributionLatestCacheReset -> String)
-> ([GetDistributionLatestCacheReset] -> ShowS)
-> Show GetDistributionLatestCacheReset
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDistributionLatestCacheReset] -> ShowS
$cshowList :: [GetDistributionLatestCacheReset] -> ShowS
show :: GetDistributionLatestCacheReset -> String
$cshow :: GetDistributionLatestCacheReset -> String
showsPrec :: Int -> GetDistributionLatestCacheReset -> ShowS
$cshowsPrec :: Int -> GetDistributionLatestCacheReset -> ShowS
Prelude.Show, (forall x.
 GetDistributionLatestCacheReset
 -> Rep GetDistributionLatestCacheReset x)
-> (forall x.
    Rep GetDistributionLatestCacheReset x
    -> GetDistributionLatestCacheReset)
-> Generic GetDistributionLatestCacheReset
forall x.
Rep GetDistributionLatestCacheReset x
-> GetDistributionLatestCacheReset
forall x.
GetDistributionLatestCacheReset
-> Rep GetDistributionLatestCacheReset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDistributionLatestCacheReset x
-> GetDistributionLatestCacheReset
$cfrom :: forall x.
GetDistributionLatestCacheReset
-> Rep GetDistributionLatestCacheReset x
Prelude.Generic)

-- |
-- Create a value of 'GetDistributionLatestCacheReset' 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:
--
-- 'distributionName', 'getDistributionLatestCacheReset_distributionName' - The name of the distribution for which to return the timestamp of the
-- last cache reset.
--
-- Use the @GetDistributions@ action to get a list of distribution names
-- that you can specify.
--
-- When omitted, the response includes the latest cache reset timestamp of
-- all your distributions.
newGetDistributionLatestCacheReset ::
  GetDistributionLatestCacheReset
newGetDistributionLatestCacheReset :: GetDistributionLatestCacheReset
newGetDistributionLatestCacheReset =
  GetDistributionLatestCacheReset' :: Maybe Text -> GetDistributionLatestCacheReset
GetDistributionLatestCacheReset'
    { $sel:distributionName:GetDistributionLatestCacheReset' :: Maybe Text
distributionName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the distribution for which to return the timestamp of the
-- last cache reset.
--
-- Use the @GetDistributions@ action to get a list of distribution names
-- that you can specify.
--
-- When omitted, the response includes the latest cache reset timestamp of
-- all your distributions.
getDistributionLatestCacheReset_distributionName :: Lens.Lens' GetDistributionLatestCacheReset (Prelude.Maybe Prelude.Text)
getDistributionLatestCacheReset_distributionName :: (Maybe Text -> f (Maybe Text))
-> GetDistributionLatestCacheReset
-> f GetDistributionLatestCacheReset
getDistributionLatestCacheReset_distributionName = (GetDistributionLatestCacheReset -> Maybe Text)
-> (GetDistributionLatestCacheReset
    -> Maybe Text -> GetDistributionLatestCacheReset)
-> Lens
     GetDistributionLatestCacheReset
     GetDistributionLatestCacheReset
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionLatestCacheReset' {Maybe Text
distributionName :: Maybe Text
$sel:distributionName:GetDistributionLatestCacheReset' :: GetDistributionLatestCacheReset -> Maybe Text
distributionName} -> Maybe Text
distributionName) (\s :: GetDistributionLatestCacheReset
s@GetDistributionLatestCacheReset' {} Maybe Text
a -> GetDistributionLatestCacheReset
s {$sel:distributionName:GetDistributionLatestCacheReset' :: Maybe Text
distributionName = Maybe Text
a} :: GetDistributionLatestCacheReset)

instance
  Core.AWSRequest
    GetDistributionLatestCacheReset
  where
  type
    AWSResponse GetDistributionLatestCacheReset =
      GetDistributionLatestCacheResetResponse
  request :: GetDistributionLatestCacheReset
-> Request GetDistributionLatestCacheReset
request = Service
-> GetDistributionLatestCacheReset
-> Request GetDistributionLatestCacheReset
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDistributionLatestCacheReset
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetDistributionLatestCacheReset)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDistributionLatestCacheReset))
-> Logger
-> Service
-> Proxy GetDistributionLatestCacheReset
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetDistributionLatestCacheReset)))
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 POSIX -> Int -> GetDistributionLatestCacheResetResponse
GetDistributionLatestCacheResetResponse'
            (Maybe Text
 -> Maybe POSIX -> Int -> GetDistributionLatestCacheResetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX -> Int -> GetDistributionLatestCacheResetResponse)
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
"status")
            Either
  String
  (Maybe POSIX -> Int -> GetDistributionLatestCacheResetResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> GetDistributionLatestCacheResetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createTime")
            Either String (Int -> GetDistributionLatestCacheResetResponse)
-> Either String Int
-> Either String GetDistributionLatestCacheResetResponse
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
    GetDistributionLatestCacheReset

instance
  Prelude.NFData
    GetDistributionLatestCacheReset

instance
  Core.ToHeaders
    GetDistributionLatestCacheReset
  where
  toHeaders :: GetDistributionLatestCacheReset -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> GetDistributionLatestCacheReset -> 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
"Lightsail_20161128.GetDistributionLatestCacheReset" ::
                          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 GetDistributionLatestCacheReset where
  toJSON :: GetDistributionLatestCacheReset -> Value
toJSON GetDistributionLatestCacheReset' {Maybe Text
distributionName :: Maybe Text
$sel:distributionName:GetDistributionLatestCacheReset' :: GetDistributionLatestCacheReset -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"distributionName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
distributionName
          ]
      )

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

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

-- | /See:/ 'newGetDistributionLatestCacheResetResponse' smart constructor.
data GetDistributionLatestCacheResetResponse = GetDistributionLatestCacheResetResponse'
  { -- | The status of the last cache reset.
    GetDistributionLatestCacheResetResponse -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The timestamp of the last cache reset (e.g., @1479734909.17@) in Unix
    -- time format.
    GetDistributionLatestCacheResetResponse -> Maybe POSIX
createTime :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    GetDistributionLatestCacheResetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetDistributionLatestCacheResetResponse
-> GetDistributionLatestCacheResetResponse -> Bool
(GetDistributionLatestCacheResetResponse
 -> GetDistributionLatestCacheResetResponse -> Bool)
-> (GetDistributionLatestCacheResetResponse
    -> GetDistributionLatestCacheResetResponse -> Bool)
-> Eq GetDistributionLatestCacheResetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDistributionLatestCacheResetResponse
-> GetDistributionLatestCacheResetResponse -> Bool
$c/= :: GetDistributionLatestCacheResetResponse
-> GetDistributionLatestCacheResetResponse -> Bool
== :: GetDistributionLatestCacheResetResponse
-> GetDistributionLatestCacheResetResponse -> Bool
$c== :: GetDistributionLatestCacheResetResponse
-> GetDistributionLatestCacheResetResponse -> Bool
Prelude.Eq, ReadPrec [GetDistributionLatestCacheResetResponse]
ReadPrec GetDistributionLatestCacheResetResponse
Int -> ReadS GetDistributionLatestCacheResetResponse
ReadS [GetDistributionLatestCacheResetResponse]
(Int -> ReadS GetDistributionLatestCacheResetResponse)
-> ReadS [GetDistributionLatestCacheResetResponse]
-> ReadPrec GetDistributionLatestCacheResetResponse
-> ReadPrec [GetDistributionLatestCacheResetResponse]
-> Read GetDistributionLatestCacheResetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDistributionLatestCacheResetResponse]
$creadListPrec :: ReadPrec [GetDistributionLatestCacheResetResponse]
readPrec :: ReadPrec GetDistributionLatestCacheResetResponse
$creadPrec :: ReadPrec GetDistributionLatestCacheResetResponse
readList :: ReadS [GetDistributionLatestCacheResetResponse]
$creadList :: ReadS [GetDistributionLatestCacheResetResponse]
readsPrec :: Int -> ReadS GetDistributionLatestCacheResetResponse
$creadsPrec :: Int -> ReadS GetDistributionLatestCacheResetResponse
Prelude.Read, Int -> GetDistributionLatestCacheResetResponse -> ShowS
[GetDistributionLatestCacheResetResponse] -> ShowS
GetDistributionLatestCacheResetResponse -> String
(Int -> GetDistributionLatestCacheResetResponse -> ShowS)
-> (GetDistributionLatestCacheResetResponse -> String)
-> ([GetDistributionLatestCacheResetResponse] -> ShowS)
-> Show GetDistributionLatestCacheResetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDistributionLatestCacheResetResponse] -> ShowS
$cshowList :: [GetDistributionLatestCacheResetResponse] -> ShowS
show :: GetDistributionLatestCacheResetResponse -> String
$cshow :: GetDistributionLatestCacheResetResponse -> String
showsPrec :: Int -> GetDistributionLatestCacheResetResponse -> ShowS
$cshowsPrec :: Int -> GetDistributionLatestCacheResetResponse -> ShowS
Prelude.Show, (forall x.
 GetDistributionLatestCacheResetResponse
 -> Rep GetDistributionLatestCacheResetResponse x)
-> (forall x.
    Rep GetDistributionLatestCacheResetResponse x
    -> GetDistributionLatestCacheResetResponse)
-> Generic GetDistributionLatestCacheResetResponse
forall x.
Rep GetDistributionLatestCacheResetResponse x
-> GetDistributionLatestCacheResetResponse
forall x.
GetDistributionLatestCacheResetResponse
-> Rep GetDistributionLatestCacheResetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDistributionLatestCacheResetResponse x
-> GetDistributionLatestCacheResetResponse
$cfrom :: forall x.
GetDistributionLatestCacheResetResponse
-> Rep GetDistributionLatestCacheResetResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDistributionLatestCacheResetResponse' 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:
--
-- 'status', 'getDistributionLatestCacheResetResponse_status' - The status of the last cache reset.
--
-- 'createTime', 'getDistributionLatestCacheResetResponse_createTime' - The timestamp of the last cache reset (e.g., @1479734909.17@) in Unix
-- time format.
--
-- 'httpStatus', 'getDistributionLatestCacheResetResponse_httpStatus' - The response's http status code.
newGetDistributionLatestCacheResetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDistributionLatestCacheResetResponse
newGetDistributionLatestCacheResetResponse :: Int -> GetDistributionLatestCacheResetResponse
newGetDistributionLatestCacheResetResponse
  Int
pHttpStatus_ =
    GetDistributionLatestCacheResetResponse' :: Maybe Text
-> Maybe POSIX -> Int -> GetDistributionLatestCacheResetResponse
GetDistributionLatestCacheResetResponse'
      { $sel:status:GetDistributionLatestCacheResetResponse' :: Maybe Text
status =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:createTime:GetDistributionLatestCacheResetResponse' :: Maybe POSIX
createTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetDistributionLatestCacheResetResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The status of the last cache reset.
getDistributionLatestCacheResetResponse_status :: Lens.Lens' GetDistributionLatestCacheResetResponse (Prelude.Maybe Prelude.Text)
getDistributionLatestCacheResetResponse_status :: (Maybe Text -> f (Maybe Text))
-> GetDistributionLatestCacheResetResponse
-> f GetDistributionLatestCacheResetResponse
getDistributionLatestCacheResetResponse_status = (GetDistributionLatestCacheResetResponse -> Maybe Text)
-> (GetDistributionLatestCacheResetResponse
    -> Maybe Text -> GetDistributionLatestCacheResetResponse)
-> Lens
     GetDistributionLatestCacheResetResponse
     GetDistributionLatestCacheResetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionLatestCacheResetResponse' {Maybe Text
status :: Maybe Text
$sel:status:GetDistributionLatestCacheResetResponse' :: GetDistributionLatestCacheResetResponse -> Maybe Text
status} -> Maybe Text
status) (\s :: GetDistributionLatestCacheResetResponse
s@GetDistributionLatestCacheResetResponse' {} Maybe Text
a -> GetDistributionLatestCacheResetResponse
s {$sel:status:GetDistributionLatestCacheResetResponse' :: Maybe Text
status = Maybe Text
a} :: GetDistributionLatestCacheResetResponse)

-- | The timestamp of the last cache reset (e.g., @1479734909.17@) in Unix
-- time format.
getDistributionLatestCacheResetResponse_createTime :: Lens.Lens' GetDistributionLatestCacheResetResponse (Prelude.Maybe Prelude.UTCTime)
getDistributionLatestCacheResetResponse_createTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDistributionLatestCacheResetResponse
-> f GetDistributionLatestCacheResetResponse
getDistributionLatestCacheResetResponse_createTime = (GetDistributionLatestCacheResetResponse -> Maybe POSIX)
-> (GetDistributionLatestCacheResetResponse
    -> Maybe POSIX -> GetDistributionLatestCacheResetResponse)
-> Lens
     GetDistributionLatestCacheResetResponse
     GetDistributionLatestCacheResetResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDistributionLatestCacheResetResponse' {Maybe POSIX
createTime :: Maybe POSIX
$sel:createTime:GetDistributionLatestCacheResetResponse' :: GetDistributionLatestCacheResetResponse -> Maybe POSIX
createTime} -> Maybe POSIX
createTime) (\s :: GetDistributionLatestCacheResetResponse
s@GetDistributionLatestCacheResetResponse' {} Maybe POSIX
a -> GetDistributionLatestCacheResetResponse
s {$sel:createTime:GetDistributionLatestCacheResetResponse' :: Maybe POSIX
createTime = Maybe POSIX
a} :: GetDistributionLatestCacheResetResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetDistributionLatestCacheResetResponse
 -> f GetDistributionLatestCacheResetResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDistributionLatestCacheResetResponse
-> f GetDistributionLatestCacheResetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

instance
  Prelude.NFData
    GetDistributionLatestCacheResetResponse