{-# 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.PutLifecyclePolicy
-- 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)
--
-- Creates or updates the lifecycle policy for the specified repository.
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html Lifecycle policy template>.
module Amazonka.ECR.PutLifecyclePolicy
  ( -- * Creating a Request
    PutLifecyclePolicy (..),
    newPutLifecyclePolicy,

    -- * Request Lenses
    putLifecyclePolicy_registryId,
    putLifecyclePolicy_repositoryName,
    putLifecyclePolicy_lifecyclePolicyText,

    -- * Destructuring the Response
    PutLifecyclePolicyResponse (..),
    newPutLifecyclePolicyResponse,

    -- * Response Lenses
    putLifecyclePolicyResponse_registryId,
    putLifecyclePolicyResponse_lifecyclePolicyText,
    putLifecyclePolicyResponse_repositoryName,
    putLifecyclePolicyResponse_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:/ 'newPutLifecyclePolicy' smart constructor.
data PutLifecyclePolicy = PutLifecyclePolicy'
  { -- | 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.
    PutLifecyclePolicy -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
    -- | The name of the repository to receive the policy.
    PutLifecyclePolicy -> Text
repositoryName :: Prelude.Text,
    -- | The JSON repository policy text to apply to the repository.
    PutLifecyclePolicy -> Text
lifecyclePolicyText :: Prelude.Text
  }
  deriving (PutLifecyclePolicy -> PutLifecyclePolicy -> Bool
(PutLifecyclePolicy -> PutLifecyclePolicy -> Bool)
-> (PutLifecyclePolicy -> PutLifecyclePolicy -> Bool)
-> Eq PutLifecyclePolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutLifecyclePolicy -> PutLifecyclePolicy -> Bool
$c/= :: PutLifecyclePolicy -> PutLifecyclePolicy -> Bool
== :: PutLifecyclePolicy -> PutLifecyclePolicy -> Bool
$c== :: PutLifecyclePolicy -> PutLifecyclePolicy -> Bool
Prelude.Eq, ReadPrec [PutLifecyclePolicy]
ReadPrec PutLifecyclePolicy
Int -> ReadS PutLifecyclePolicy
ReadS [PutLifecyclePolicy]
(Int -> ReadS PutLifecyclePolicy)
-> ReadS [PutLifecyclePolicy]
-> ReadPrec PutLifecyclePolicy
-> ReadPrec [PutLifecyclePolicy]
-> Read PutLifecyclePolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutLifecyclePolicy]
$creadListPrec :: ReadPrec [PutLifecyclePolicy]
readPrec :: ReadPrec PutLifecyclePolicy
$creadPrec :: ReadPrec PutLifecyclePolicy
readList :: ReadS [PutLifecyclePolicy]
$creadList :: ReadS [PutLifecyclePolicy]
readsPrec :: Int -> ReadS PutLifecyclePolicy
$creadsPrec :: Int -> ReadS PutLifecyclePolicy
Prelude.Read, Int -> PutLifecyclePolicy -> ShowS
[PutLifecyclePolicy] -> ShowS
PutLifecyclePolicy -> String
(Int -> PutLifecyclePolicy -> ShowS)
-> (PutLifecyclePolicy -> String)
-> ([PutLifecyclePolicy] -> ShowS)
-> Show PutLifecyclePolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutLifecyclePolicy] -> ShowS
$cshowList :: [PutLifecyclePolicy] -> ShowS
show :: PutLifecyclePolicy -> String
$cshow :: PutLifecyclePolicy -> String
showsPrec :: Int -> PutLifecyclePolicy -> ShowS
$cshowsPrec :: Int -> PutLifecyclePolicy -> ShowS
Prelude.Show, (forall x. PutLifecyclePolicy -> Rep PutLifecyclePolicy x)
-> (forall x. Rep PutLifecyclePolicy x -> PutLifecyclePolicy)
-> Generic PutLifecyclePolicy
forall x. Rep PutLifecyclePolicy x -> PutLifecyclePolicy
forall x. PutLifecyclePolicy -> Rep PutLifecyclePolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutLifecyclePolicy x -> PutLifecyclePolicy
$cfrom :: forall x. PutLifecyclePolicy -> Rep PutLifecyclePolicy x
Prelude.Generic)

-- |
-- Create a value of 'PutLifecyclePolicy' 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', 'putLifecyclePolicy_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', 'putLifecyclePolicy_repositoryName' - The name of the repository to receive the policy.
--
-- 'lifecyclePolicyText', 'putLifecyclePolicy_lifecyclePolicyText' - The JSON repository policy text to apply to the repository.
newPutLifecyclePolicy ::
  -- | 'repositoryName'
  Prelude.Text ->
  -- | 'lifecyclePolicyText'
  Prelude.Text ->
  PutLifecyclePolicy
newPutLifecyclePolicy :: Text -> Text -> PutLifecyclePolicy
newPutLifecyclePolicy
  Text
pRepositoryName_
  Text
pLifecyclePolicyText_ =
    PutLifecyclePolicy' :: Maybe Text -> Text -> Text -> PutLifecyclePolicy
PutLifecyclePolicy'
      { $sel:registryId:PutLifecyclePolicy' :: Maybe Text
registryId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:repositoryName:PutLifecyclePolicy' :: Text
repositoryName = Text
pRepositoryName_,
        $sel:lifecyclePolicyText:PutLifecyclePolicy' :: Text
lifecyclePolicyText = Text
pLifecyclePolicyText_
      }

-- | 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.
putLifecyclePolicy_registryId :: Lens.Lens' PutLifecyclePolicy (Prelude.Maybe Prelude.Text)
putLifecyclePolicy_registryId :: (Maybe Text -> f (Maybe Text))
-> PutLifecyclePolicy -> f PutLifecyclePolicy
putLifecyclePolicy_registryId = (PutLifecyclePolicy -> Maybe Text)
-> (PutLifecyclePolicy -> Maybe Text -> PutLifecyclePolicy)
-> Lens
     PutLifecyclePolicy PutLifecyclePolicy (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutLifecyclePolicy' {Maybe Text
registryId :: Maybe Text
$sel:registryId:PutLifecyclePolicy' :: PutLifecyclePolicy -> Maybe Text
registryId} -> Maybe Text
registryId) (\s :: PutLifecyclePolicy
s@PutLifecyclePolicy' {} Maybe Text
a -> PutLifecyclePolicy
s {$sel:registryId:PutLifecyclePolicy' :: Maybe Text
registryId = Maybe Text
a} :: PutLifecyclePolicy)

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

-- | The JSON repository policy text to apply to the repository.
putLifecyclePolicy_lifecyclePolicyText :: Lens.Lens' PutLifecyclePolicy Prelude.Text
putLifecyclePolicy_lifecyclePolicyText :: (Text -> f Text) -> PutLifecyclePolicy -> f PutLifecyclePolicy
putLifecyclePolicy_lifecyclePolicyText = (PutLifecyclePolicy -> Text)
-> (PutLifecyclePolicy -> Text -> PutLifecyclePolicy)
-> Lens PutLifecyclePolicy PutLifecyclePolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutLifecyclePolicy' {Text
lifecyclePolicyText :: Text
$sel:lifecyclePolicyText:PutLifecyclePolicy' :: PutLifecyclePolicy -> Text
lifecyclePolicyText} -> Text
lifecyclePolicyText) (\s :: PutLifecyclePolicy
s@PutLifecyclePolicy' {} Text
a -> PutLifecyclePolicy
s {$sel:lifecyclePolicyText:PutLifecyclePolicy' :: Text
lifecyclePolicyText = Text
a} :: PutLifecyclePolicy)

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

instance Prelude.NFData PutLifecyclePolicy

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

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

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

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

-- |
-- Create a value of 'PutLifecyclePolicyResponse' 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', 'putLifecyclePolicyResponse_registryId' - The registry ID associated with the request.
--
-- 'lifecyclePolicyText', 'putLifecyclePolicyResponse_lifecyclePolicyText' - The JSON repository policy text.
--
-- 'repositoryName', 'putLifecyclePolicyResponse_repositoryName' - The repository name associated with the request.
--
-- 'httpStatus', 'putLifecyclePolicyResponse_httpStatus' - The response's http status code.
newPutLifecyclePolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutLifecyclePolicyResponse
newPutLifecyclePolicyResponse :: Int -> PutLifecyclePolicyResponse
newPutLifecyclePolicyResponse Int
pHttpStatus_ =
  PutLifecyclePolicyResponse' :: Maybe Text
-> Maybe Text -> Maybe Text -> Int -> PutLifecyclePolicyResponse
PutLifecyclePolicyResponse'
    { $sel:registryId:PutLifecyclePolicyResponse' :: Maybe Text
registryId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lifecyclePolicyText:PutLifecyclePolicyResponse' :: Maybe Text
lifecyclePolicyText = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryName:PutLifecyclePolicyResponse' :: Maybe Text
repositoryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutLifecyclePolicyResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The JSON repository policy text.
putLifecyclePolicyResponse_lifecyclePolicyText :: Lens.Lens' PutLifecyclePolicyResponse (Prelude.Maybe Prelude.Text)
putLifecyclePolicyResponse_lifecyclePolicyText :: (Maybe Text -> f (Maybe Text))
-> PutLifecyclePolicyResponse -> f PutLifecyclePolicyResponse
putLifecyclePolicyResponse_lifecyclePolicyText = (PutLifecyclePolicyResponse -> Maybe Text)
-> (PutLifecyclePolicyResponse
    -> Maybe Text -> PutLifecyclePolicyResponse)
-> Lens
     PutLifecyclePolicyResponse
     PutLifecyclePolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutLifecyclePolicyResponse' {Maybe Text
lifecyclePolicyText :: Maybe Text
$sel:lifecyclePolicyText:PutLifecyclePolicyResponse' :: PutLifecyclePolicyResponse -> Maybe Text
lifecyclePolicyText} -> Maybe Text
lifecyclePolicyText) (\s :: PutLifecyclePolicyResponse
s@PutLifecyclePolicyResponse' {} Maybe Text
a -> PutLifecyclePolicyResponse
s {$sel:lifecyclePolicyText:PutLifecyclePolicyResponse' :: Maybe Text
lifecyclePolicyText = Maybe Text
a} :: PutLifecyclePolicyResponse)

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

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

instance Prelude.NFData PutLifecyclePolicyResponse