{-# 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.ECR.DeleteLifecyclePolicy
-- 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)
--
-- Deletes the lifecycle policy associated with the specified repository.
module Amazonka.ECR.DeleteLifecyclePolicy
  ( -- * Creating a Request
    DeleteLifecyclePolicy (..),
    newDeleteLifecyclePolicy,

    -- * Request Lenses
    deleteLifecyclePolicy_registryId,
    deleteLifecyclePolicy_repositoryName,

    -- * Destructuring the Response
    DeleteLifecyclePolicyResponse (..),
    newDeleteLifecyclePolicyResponse,

    -- * Response Lenses
    deleteLifecyclePolicyResponse_registryId,
    deleteLifecyclePolicyResponse_lastEvaluatedAt,
    deleteLifecyclePolicyResponse_lifecyclePolicyText,
    deleteLifecyclePolicyResponse_repositoryName,
    deleteLifecyclePolicyResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDeleteLifecyclePolicy' smart constructor.
data DeleteLifecyclePolicy = DeleteLifecyclePolicy'
  { -- | The Amazon Web Services account ID associated with the registry that
    -- contains the repository. If you do not specify a registry, the default
    -- registry is assumed.
    DeleteLifecyclePolicy -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
    -- | The name of the repository.
    DeleteLifecyclePolicy -> Text
repositoryName :: Prelude.Text
  }
  deriving (DeleteLifecyclePolicy -> DeleteLifecyclePolicy -> Bool
(DeleteLifecyclePolicy -> DeleteLifecyclePolicy -> Bool)
-> (DeleteLifecyclePolicy -> DeleteLifecyclePolicy -> Bool)
-> Eq DeleteLifecyclePolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteLifecyclePolicy -> DeleteLifecyclePolicy -> Bool
$c/= :: DeleteLifecyclePolicy -> DeleteLifecyclePolicy -> Bool
== :: DeleteLifecyclePolicy -> DeleteLifecyclePolicy -> Bool
$c== :: DeleteLifecyclePolicy -> DeleteLifecyclePolicy -> Bool
Prelude.Eq, ReadPrec [DeleteLifecyclePolicy]
ReadPrec DeleteLifecyclePolicy
Int -> ReadS DeleteLifecyclePolicy
ReadS [DeleteLifecyclePolicy]
(Int -> ReadS DeleteLifecyclePolicy)
-> ReadS [DeleteLifecyclePolicy]
-> ReadPrec DeleteLifecyclePolicy
-> ReadPrec [DeleteLifecyclePolicy]
-> Read DeleteLifecyclePolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteLifecyclePolicy]
$creadListPrec :: ReadPrec [DeleteLifecyclePolicy]
readPrec :: ReadPrec DeleteLifecyclePolicy
$creadPrec :: ReadPrec DeleteLifecyclePolicy
readList :: ReadS [DeleteLifecyclePolicy]
$creadList :: ReadS [DeleteLifecyclePolicy]
readsPrec :: Int -> ReadS DeleteLifecyclePolicy
$creadsPrec :: Int -> ReadS DeleteLifecyclePolicy
Prelude.Read, Int -> DeleteLifecyclePolicy -> ShowS
[DeleteLifecyclePolicy] -> ShowS
DeleteLifecyclePolicy -> String
(Int -> DeleteLifecyclePolicy -> ShowS)
-> (DeleteLifecyclePolicy -> String)
-> ([DeleteLifecyclePolicy] -> ShowS)
-> Show DeleteLifecyclePolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteLifecyclePolicy] -> ShowS
$cshowList :: [DeleteLifecyclePolicy] -> ShowS
show :: DeleteLifecyclePolicy -> String
$cshow :: DeleteLifecyclePolicy -> String
showsPrec :: Int -> DeleteLifecyclePolicy -> ShowS
$cshowsPrec :: Int -> DeleteLifecyclePolicy -> ShowS
Prelude.Show, (forall x. DeleteLifecyclePolicy -> Rep DeleteLifecyclePolicy x)
-> (forall x. Rep DeleteLifecyclePolicy x -> DeleteLifecyclePolicy)
-> Generic DeleteLifecyclePolicy
forall x. Rep DeleteLifecyclePolicy x -> DeleteLifecyclePolicy
forall x. DeleteLifecyclePolicy -> Rep DeleteLifecyclePolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteLifecyclePolicy x -> DeleteLifecyclePolicy
$cfrom :: forall x. DeleteLifecyclePolicy -> Rep DeleteLifecyclePolicy x
Prelude.Generic)

-- |
-- Create a value of 'DeleteLifecyclePolicy' 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:
--
-- 'registryId', 'deleteLifecyclePolicy_registryId' - The Amazon Web Services account ID associated with the registry that
-- contains the repository. If you do not specify a registry, the default
-- registry is assumed.
--
-- 'repositoryName', 'deleteLifecyclePolicy_repositoryName' - The name of the repository.
newDeleteLifecyclePolicy ::
  -- | 'repositoryName'
  Prelude.Text ->
  DeleteLifecyclePolicy
newDeleteLifecyclePolicy :: Text -> DeleteLifecyclePolicy
newDeleteLifecyclePolicy Text
pRepositoryName_ =
  DeleteLifecyclePolicy' :: Maybe Text -> Text -> DeleteLifecyclePolicy
DeleteLifecyclePolicy'
    { $sel:registryId:DeleteLifecyclePolicy' :: Maybe Text
registryId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryName:DeleteLifecyclePolicy' :: Text
repositoryName = Text
pRepositoryName_
    }

-- | The Amazon Web Services account ID associated with the registry that
-- contains the repository. If you do not specify a registry, the default
-- registry is assumed.
deleteLifecyclePolicy_registryId :: Lens.Lens' DeleteLifecyclePolicy (Prelude.Maybe Prelude.Text)
deleteLifecyclePolicy_registryId :: (Maybe Text -> f (Maybe Text))
-> DeleteLifecyclePolicy -> f DeleteLifecyclePolicy
deleteLifecyclePolicy_registryId = (DeleteLifecyclePolicy -> Maybe Text)
-> (DeleteLifecyclePolicy -> Maybe Text -> DeleteLifecyclePolicy)
-> Lens
     DeleteLifecyclePolicy
     DeleteLifecyclePolicy
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLifecyclePolicy' {Maybe Text
registryId :: Maybe Text
$sel:registryId:DeleteLifecyclePolicy' :: DeleteLifecyclePolicy -> Maybe Text
registryId} -> Maybe Text
registryId) (\s :: DeleteLifecyclePolicy
s@DeleteLifecyclePolicy' {} Maybe Text
a -> DeleteLifecyclePolicy
s {$sel:registryId:DeleteLifecyclePolicy' :: Maybe Text
registryId = Maybe Text
a} :: DeleteLifecyclePolicy)

-- | The name of the repository.
deleteLifecyclePolicy_repositoryName :: Lens.Lens' DeleteLifecyclePolicy Prelude.Text
deleteLifecyclePolicy_repositoryName :: (Text -> f Text)
-> DeleteLifecyclePolicy -> f DeleteLifecyclePolicy
deleteLifecyclePolicy_repositoryName = (DeleteLifecyclePolicy -> Text)
-> (DeleteLifecyclePolicy -> Text -> DeleteLifecyclePolicy)
-> Lens DeleteLifecyclePolicy DeleteLifecyclePolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLifecyclePolicy' {Text
repositoryName :: Text
$sel:repositoryName:DeleteLifecyclePolicy' :: DeleteLifecyclePolicy -> Text
repositoryName} -> Text
repositoryName) (\s :: DeleteLifecyclePolicy
s@DeleteLifecyclePolicy' {} Text
a -> DeleteLifecyclePolicy
s {$sel:repositoryName:DeleteLifecyclePolicy' :: Text
repositoryName = Text
a} :: DeleteLifecyclePolicy)

instance Core.AWSRequest DeleteLifecyclePolicy where
  type
    AWSResponse DeleteLifecyclePolicy =
      DeleteLifecyclePolicyResponse
  request :: DeleteLifecyclePolicy -> Request DeleteLifecyclePolicy
request = Service -> DeleteLifecyclePolicy -> Request DeleteLifecyclePolicy
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteLifecyclePolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteLifecyclePolicy)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DeleteLifecyclePolicy))
-> Logger
-> Service
-> Proxy DeleteLifecyclePolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteLifecyclePolicy)))
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
-> Maybe Text
-> Maybe Text
-> Int
-> DeleteLifecyclePolicyResponse
DeleteLifecyclePolicyResponse'
            (Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DeleteLifecyclePolicyResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DeleteLifecyclePolicyResponse)
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
"registryId")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DeleteLifecyclePolicyResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text -> Maybe Text -> Int -> DeleteLifecyclePolicyResponse)
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
"lastEvaluatedAt")
            Either
  String
  (Maybe Text -> Maybe Text -> Int -> DeleteLifecyclePolicyResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> DeleteLifecyclePolicyResponse)
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
"lifecyclePolicyText")
            Either String (Maybe Text -> Int -> DeleteLifecyclePolicyResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DeleteLifecyclePolicyResponse)
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
"repositoryName")
            Either String (Int -> DeleteLifecyclePolicyResponse)
-> Either String Int -> Either String DeleteLifecyclePolicyResponse
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 DeleteLifecyclePolicy

instance Prelude.NFData DeleteLifecyclePolicy

instance Core.ToHeaders DeleteLifecyclePolicy where
  toHeaders :: DeleteLifecyclePolicy -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DeleteLifecyclePolicy -> 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
"AmazonEC2ContainerRegistry_V20150921.DeleteLifecyclePolicy" ::
                          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 DeleteLifecyclePolicy where
  toJSON :: DeleteLifecyclePolicy -> Value
toJSON DeleteLifecyclePolicy' {Maybe Text
Text
repositoryName :: Text
registryId :: Maybe Text
$sel:repositoryName:DeleteLifecyclePolicy' :: DeleteLifecyclePolicy -> Text
$sel:registryId:DeleteLifecyclePolicy' :: DeleteLifecyclePolicy -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"registryId" 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
registryId,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"repositoryName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
repositoryName)
          ]
      )

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

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

-- | /See:/ 'newDeleteLifecyclePolicyResponse' smart constructor.
data DeleteLifecyclePolicyResponse = DeleteLifecyclePolicyResponse'
  { -- | The registry ID associated with the request.
    DeleteLifecyclePolicyResponse -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
    -- | The time stamp of the last time that the lifecycle policy was run.
    DeleteLifecyclePolicyResponse -> Maybe POSIX
lastEvaluatedAt :: Prelude.Maybe Core.POSIX,
    -- | The JSON lifecycle policy text.
    DeleteLifecyclePolicyResponse -> Maybe Text
lifecyclePolicyText :: Prelude.Maybe Prelude.Text,
    -- | The repository name associated with the request.
    DeleteLifecyclePolicyResponse -> Maybe Text
repositoryName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DeleteLifecyclePolicyResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeleteLifecyclePolicyResponse
-> DeleteLifecyclePolicyResponse -> Bool
(DeleteLifecyclePolicyResponse
 -> DeleteLifecyclePolicyResponse -> Bool)
-> (DeleteLifecyclePolicyResponse
    -> DeleteLifecyclePolicyResponse -> Bool)
-> Eq DeleteLifecyclePolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteLifecyclePolicyResponse
-> DeleteLifecyclePolicyResponse -> Bool
$c/= :: DeleteLifecyclePolicyResponse
-> DeleteLifecyclePolicyResponse -> Bool
== :: DeleteLifecyclePolicyResponse
-> DeleteLifecyclePolicyResponse -> Bool
$c== :: DeleteLifecyclePolicyResponse
-> DeleteLifecyclePolicyResponse -> Bool
Prelude.Eq, ReadPrec [DeleteLifecyclePolicyResponse]
ReadPrec DeleteLifecyclePolicyResponse
Int -> ReadS DeleteLifecyclePolicyResponse
ReadS [DeleteLifecyclePolicyResponse]
(Int -> ReadS DeleteLifecyclePolicyResponse)
-> ReadS [DeleteLifecyclePolicyResponse]
-> ReadPrec DeleteLifecyclePolicyResponse
-> ReadPrec [DeleteLifecyclePolicyResponse]
-> Read DeleteLifecyclePolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteLifecyclePolicyResponse]
$creadListPrec :: ReadPrec [DeleteLifecyclePolicyResponse]
readPrec :: ReadPrec DeleteLifecyclePolicyResponse
$creadPrec :: ReadPrec DeleteLifecyclePolicyResponse
readList :: ReadS [DeleteLifecyclePolicyResponse]
$creadList :: ReadS [DeleteLifecyclePolicyResponse]
readsPrec :: Int -> ReadS DeleteLifecyclePolicyResponse
$creadsPrec :: Int -> ReadS DeleteLifecyclePolicyResponse
Prelude.Read, Int -> DeleteLifecyclePolicyResponse -> ShowS
[DeleteLifecyclePolicyResponse] -> ShowS
DeleteLifecyclePolicyResponse -> String
(Int -> DeleteLifecyclePolicyResponse -> ShowS)
-> (DeleteLifecyclePolicyResponse -> String)
-> ([DeleteLifecyclePolicyResponse] -> ShowS)
-> Show DeleteLifecyclePolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteLifecyclePolicyResponse] -> ShowS
$cshowList :: [DeleteLifecyclePolicyResponse] -> ShowS
show :: DeleteLifecyclePolicyResponse -> String
$cshow :: DeleteLifecyclePolicyResponse -> String
showsPrec :: Int -> DeleteLifecyclePolicyResponse -> ShowS
$cshowsPrec :: Int -> DeleteLifecyclePolicyResponse -> ShowS
Prelude.Show, (forall x.
 DeleteLifecyclePolicyResponse
 -> Rep DeleteLifecyclePolicyResponse x)
-> (forall x.
    Rep DeleteLifecyclePolicyResponse x
    -> DeleteLifecyclePolicyResponse)
-> Generic DeleteLifecyclePolicyResponse
forall x.
Rep DeleteLifecyclePolicyResponse x
-> DeleteLifecyclePolicyResponse
forall x.
DeleteLifecyclePolicyResponse
-> Rep DeleteLifecyclePolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteLifecyclePolicyResponse x
-> DeleteLifecyclePolicyResponse
$cfrom :: forall x.
DeleteLifecyclePolicyResponse
-> Rep DeleteLifecyclePolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteLifecyclePolicyResponse' 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:
--
-- 'registryId', 'deleteLifecyclePolicyResponse_registryId' - The registry ID associated with the request.
--
-- 'lastEvaluatedAt', 'deleteLifecyclePolicyResponse_lastEvaluatedAt' - The time stamp of the last time that the lifecycle policy was run.
--
-- 'lifecyclePolicyText', 'deleteLifecyclePolicyResponse_lifecyclePolicyText' - The JSON lifecycle policy text.
--
-- 'repositoryName', 'deleteLifecyclePolicyResponse_repositoryName' - The repository name associated with the request.
--
-- 'httpStatus', 'deleteLifecyclePolicyResponse_httpStatus' - The response's http status code.
newDeleteLifecyclePolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteLifecyclePolicyResponse
newDeleteLifecyclePolicyResponse :: Int -> DeleteLifecyclePolicyResponse
newDeleteLifecyclePolicyResponse Int
pHttpStatus_ =
  DeleteLifecyclePolicyResponse' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Int
-> DeleteLifecyclePolicyResponse
DeleteLifecyclePolicyResponse'
    { $sel:registryId:DeleteLifecyclePolicyResponse' :: Maybe Text
registryId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastEvaluatedAt:DeleteLifecyclePolicyResponse' :: Maybe POSIX
lastEvaluatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lifecyclePolicyText:DeleteLifecyclePolicyResponse' :: Maybe Text
lifecyclePolicyText = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryName:DeleteLifecyclePolicyResponse' :: Maybe Text
repositoryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteLifecyclePolicyResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The registry ID associated with the request.
deleteLifecyclePolicyResponse_registryId :: Lens.Lens' DeleteLifecyclePolicyResponse (Prelude.Maybe Prelude.Text)
deleteLifecyclePolicyResponse_registryId :: (Maybe Text -> f (Maybe Text))
-> DeleteLifecyclePolicyResponse -> f DeleteLifecyclePolicyResponse
deleteLifecyclePolicyResponse_registryId = (DeleteLifecyclePolicyResponse -> Maybe Text)
-> (DeleteLifecyclePolicyResponse
    -> Maybe Text -> DeleteLifecyclePolicyResponse)
-> Lens
     DeleteLifecyclePolicyResponse
     DeleteLifecyclePolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLifecyclePolicyResponse' {Maybe Text
registryId :: Maybe Text
$sel:registryId:DeleteLifecyclePolicyResponse' :: DeleteLifecyclePolicyResponse -> Maybe Text
registryId} -> Maybe Text
registryId) (\s :: DeleteLifecyclePolicyResponse
s@DeleteLifecyclePolicyResponse' {} Maybe Text
a -> DeleteLifecyclePolicyResponse
s {$sel:registryId:DeleteLifecyclePolicyResponse' :: Maybe Text
registryId = Maybe Text
a} :: DeleteLifecyclePolicyResponse)

-- | The time stamp of the last time that the lifecycle policy was run.
deleteLifecyclePolicyResponse_lastEvaluatedAt :: Lens.Lens' DeleteLifecyclePolicyResponse (Prelude.Maybe Prelude.UTCTime)
deleteLifecyclePolicyResponse_lastEvaluatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeleteLifecyclePolicyResponse -> f DeleteLifecyclePolicyResponse
deleteLifecyclePolicyResponse_lastEvaluatedAt = (DeleteLifecyclePolicyResponse -> Maybe POSIX)
-> (DeleteLifecyclePolicyResponse
    -> Maybe POSIX -> DeleteLifecyclePolicyResponse)
-> Lens
     DeleteLifecyclePolicyResponse
     DeleteLifecyclePolicyResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLifecyclePolicyResponse' {Maybe POSIX
lastEvaluatedAt :: Maybe POSIX
$sel:lastEvaluatedAt:DeleteLifecyclePolicyResponse' :: DeleteLifecyclePolicyResponse -> Maybe POSIX
lastEvaluatedAt} -> Maybe POSIX
lastEvaluatedAt) (\s :: DeleteLifecyclePolicyResponse
s@DeleteLifecyclePolicyResponse' {} Maybe POSIX
a -> DeleteLifecyclePolicyResponse
s {$sel:lastEvaluatedAt:DeleteLifecyclePolicyResponse' :: Maybe POSIX
lastEvaluatedAt = Maybe POSIX
a} :: DeleteLifecyclePolicyResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DeleteLifecyclePolicyResponse
 -> f DeleteLifecyclePolicyResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeleteLifecyclePolicyResponse
-> f DeleteLifecyclePolicyResponse
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 JSON lifecycle policy text.
deleteLifecyclePolicyResponse_lifecyclePolicyText :: Lens.Lens' DeleteLifecyclePolicyResponse (Prelude.Maybe Prelude.Text)
deleteLifecyclePolicyResponse_lifecyclePolicyText :: (Maybe Text -> f (Maybe Text))
-> DeleteLifecyclePolicyResponse -> f DeleteLifecyclePolicyResponse
deleteLifecyclePolicyResponse_lifecyclePolicyText = (DeleteLifecyclePolicyResponse -> Maybe Text)
-> (DeleteLifecyclePolicyResponse
    -> Maybe Text -> DeleteLifecyclePolicyResponse)
-> Lens
     DeleteLifecyclePolicyResponse
     DeleteLifecyclePolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLifecyclePolicyResponse' {Maybe Text
lifecyclePolicyText :: Maybe Text
$sel:lifecyclePolicyText:DeleteLifecyclePolicyResponse' :: DeleteLifecyclePolicyResponse -> Maybe Text
lifecyclePolicyText} -> Maybe Text
lifecyclePolicyText) (\s :: DeleteLifecyclePolicyResponse
s@DeleteLifecyclePolicyResponse' {} Maybe Text
a -> DeleteLifecyclePolicyResponse
s {$sel:lifecyclePolicyText:DeleteLifecyclePolicyResponse' :: Maybe Text
lifecyclePolicyText = Maybe Text
a} :: DeleteLifecyclePolicyResponse)

-- | The repository name associated with the request.
deleteLifecyclePolicyResponse_repositoryName :: Lens.Lens' DeleteLifecyclePolicyResponse (Prelude.Maybe Prelude.Text)
deleteLifecyclePolicyResponse_repositoryName :: (Maybe Text -> f (Maybe Text))
-> DeleteLifecyclePolicyResponse -> f DeleteLifecyclePolicyResponse
deleteLifecyclePolicyResponse_repositoryName = (DeleteLifecyclePolicyResponse -> Maybe Text)
-> (DeleteLifecyclePolicyResponse
    -> Maybe Text -> DeleteLifecyclePolicyResponse)
-> Lens
     DeleteLifecyclePolicyResponse
     DeleteLifecyclePolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLifecyclePolicyResponse' {Maybe Text
repositoryName :: Maybe Text
$sel:repositoryName:DeleteLifecyclePolicyResponse' :: DeleteLifecyclePolicyResponse -> Maybe Text
repositoryName} -> Maybe Text
repositoryName) (\s :: DeleteLifecyclePolicyResponse
s@DeleteLifecyclePolicyResponse' {} Maybe Text
a -> DeleteLifecyclePolicyResponse
s {$sel:repositoryName:DeleteLifecyclePolicyResponse' :: Maybe Text
repositoryName = Maybe Text
a} :: DeleteLifecyclePolicyResponse)

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

instance Prelude.NFData DeleteLifecyclePolicyResponse