{-# 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.PutImageScanningConfiguration
-- 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)
--
-- Updates the image scanning configuration for the specified repository.
module Amazonka.ECR.PutImageScanningConfiguration
  ( -- * Creating a Request
    PutImageScanningConfiguration (..),
    newPutImageScanningConfiguration,

    -- * Request Lenses
    putImageScanningConfiguration_registryId,
    putImageScanningConfiguration_repositoryName,
    putImageScanningConfiguration_imageScanningConfiguration,

    -- * Destructuring the Response
    PutImageScanningConfigurationResponse (..),
    newPutImageScanningConfigurationResponse,

    -- * Response Lenses
    putImageScanningConfigurationResponse_registryId,
    putImageScanningConfigurationResponse_imageScanningConfiguration,
    putImageScanningConfigurationResponse_repositoryName,
    putImageScanningConfigurationResponse_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:/ 'newPutImageScanningConfiguration' smart constructor.
data PutImageScanningConfiguration = PutImageScanningConfiguration'
  { -- | The Amazon Web Services account ID associated with the registry that
    -- contains the repository in which to update the image scanning
    -- configuration setting. If you do not specify a registry, the default
    -- registry is assumed.
    PutImageScanningConfiguration -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
    -- | The name of the repository in which to update the image scanning
    -- configuration setting.
    PutImageScanningConfiguration -> Text
repositoryName :: Prelude.Text,
    -- | The image scanning configuration for the repository. This setting
    -- determines whether images are scanned for known vulnerabilities after
    -- being pushed to the repository.
    PutImageScanningConfiguration -> ImageScanningConfiguration
imageScanningConfiguration :: ImageScanningConfiguration
  }
  deriving (PutImageScanningConfiguration
-> PutImageScanningConfiguration -> Bool
(PutImageScanningConfiguration
 -> PutImageScanningConfiguration -> Bool)
-> (PutImageScanningConfiguration
    -> PutImageScanningConfiguration -> Bool)
-> Eq PutImageScanningConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutImageScanningConfiguration
-> PutImageScanningConfiguration -> Bool
$c/= :: PutImageScanningConfiguration
-> PutImageScanningConfiguration -> Bool
== :: PutImageScanningConfiguration
-> PutImageScanningConfiguration -> Bool
$c== :: PutImageScanningConfiguration
-> PutImageScanningConfiguration -> Bool
Prelude.Eq, ReadPrec [PutImageScanningConfiguration]
ReadPrec PutImageScanningConfiguration
Int -> ReadS PutImageScanningConfiguration
ReadS [PutImageScanningConfiguration]
(Int -> ReadS PutImageScanningConfiguration)
-> ReadS [PutImageScanningConfiguration]
-> ReadPrec PutImageScanningConfiguration
-> ReadPrec [PutImageScanningConfiguration]
-> Read PutImageScanningConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutImageScanningConfiguration]
$creadListPrec :: ReadPrec [PutImageScanningConfiguration]
readPrec :: ReadPrec PutImageScanningConfiguration
$creadPrec :: ReadPrec PutImageScanningConfiguration
readList :: ReadS [PutImageScanningConfiguration]
$creadList :: ReadS [PutImageScanningConfiguration]
readsPrec :: Int -> ReadS PutImageScanningConfiguration
$creadsPrec :: Int -> ReadS PutImageScanningConfiguration
Prelude.Read, Int -> PutImageScanningConfiguration -> ShowS
[PutImageScanningConfiguration] -> ShowS
PutImageScanningConfiguration -> String
(Int -> PutImageScanningConfiguration -> ShowS)
-> (PutImageScanningConfiguration -> String)
-> ([PutImageScanningConfiguration] -> ShowS)
-> Show PutImageScanningConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutImageScanningConfiguration] -> ShowS
$cshowList :: [PutImageScanningConfiguration] -> ShowS
show :: PutImageScanningConfiguration -> String
$cshow :: PutImageScanningConfiguration -> String
showsPrec :: Int -> PutImageScanningConfiguration -> ShowS
$cshowsPrec :: Int -> PutImageScanningConfiguration -> ShowS
Prelude.Show, (forall x.
 PutImageScanningConfiguration
 -> Rep PutImageScanningConfiguration x)
-> (forall x.
    Rep PutImageScanningConfiguration x
    -> PutImageScanningConfiguration)
-> Generic PutImageScanningConfiguration
forall x.
Rep PutImageScanningConfiguration x
-> PutImageScanningConfiguration
forall x.
PutImageScanningConfiguration
-> Rep PutImageScanningConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutImageScanningConfiguration x
-> PutImageScanningConfiguration
$cfrom :: forall x.
PutImageScanningConfiguration
-> Rep PutImageScanningConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'PutImageScanningConfiguration' 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', 'putImageScanningConfiguration_registryId' - The Amazon Web Services account ID associated with the registry that
-- contains the repository in which to update the image scanning
-- configuration setting. If you do not specify a registry, the default
-- registry is assumed.
--
-- 'repositoryName', 'putImageScanningConfiguration_repositoryName' - The name of the repository in which to update the image scanning
-- configuration setting.
--
-- 'imageScanningConfiguration', 'putImageScanningConfiguration_imageScanningConfiguration' - The image scanning configuration for the repository. This setting
-- determines whether images are scanned for known vulnerabilities after
-- being pushed to the repository.
newPutImageScanningConfiguration ::
  -- | 'repositoryName'
  Prelude.Text ->
  -- | 'imageScanningConfiguration'
  ImageScanningConfiguration ->
  PutImageScanningConfiguration
newPutImageScanningConfiguration :: Text -> ImageScanningConfiguration -> PutImageScanningConfiguration
newPutImageScanningConfiguration
  Text
pRepositoryName_
  ImageScanningConfiguration
pImageScanningConfiguration_ =
    PutImageScanningConfiguration' :: Maybe Text
-> Text
-> ImageScanningConfiguration
-> PutImageScanningConfiguration
PutImageScanningConfiguration'
      { $sel:registryId:PutImageScanningConfiguration' :: Maybe Text
registryId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:repositoryName:PutImageScanningConfiguration' :: Text
repositoryName = Text
pRepositoryName_,
        $sel:imageScanningConfiguration:PutImageScanningConfiguration' :: ImageScanningConfiguration
imageScanningConfiguration =
          ImageScanningConfiguration
pImageScanningConfiguration_
      }

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

-- | The name of the repository in which to update the image scanning
-- configuration setting.
putImageScanningConfiguration_repositoryName :: Lens.Lens' PutImageScanningConfiguration Prelude.Text
putImageScanningConfiguration_repositoryName :: (Text -> f Text)
-> PutImageScanningConfiguration -> f PutImageScanningConfiguration
putImageScanningConfiguration_repositoryName = (PutImageScanningConfiguration -> Text)
-> (PutImageScanningConfiguration
    -> Text -> PutImageScanningConfiguration)
-> Lens
     PutImageScanningConfiguration
     PutImageScanningConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutImageScanningConfiguration' {Text
repositoryName :: Text
$sel:repositoryName:PutImageScanningConfiguration' :: PutImageScanningConfiguration -> Text
repositoryName} -> Text
repositoryName) (\s :: PutImageScanningConfiguration
s@PutImageScanningConfiguration' {} Text
a -> PutImageScanningConfiguration
s {$sel:repositoryName:PutImageScanningConfiguration' :: Text
repositoryName = Text
a} :: PutImageScanningConfiguration)

-- | The image scanning configuration for the repository. This setting
-- determines whether images are scanned for known vulnerabilities after
-- being pushed to the repository.
putImageScanningConfiguration_imageScanningConfiguration :: Lens.Lens' PutImageScanningConfiguration ImageScanningConfiguration
putImageScanningConfiguration_imageScanningConfiguration :: (ImageScanningConfiguration -> f ImageScanningConfiguration)
-> PutImageScanningConfiguration -> f PutImageScanningConfiguration
putImageScanningConfiguration_imageScanningConfiguration = (PutImageScanningConfiguration -> ImageScanningConfiguration)
-> (PutImageScanningConfiguration
    -> ImageScanningConfiguration -> PutImageScanningConfiguration)
-> Lens
     PutImageScanningConfiguration
     PutImageScanningConfiguration
     ImageScanningConfiguration
     ImageScanningConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutImageScanningConfiguration' {ImageScanningConfiguration
imageScanningConfiguration :: ImageScanningConfiguration
$sel:imageScanningConfiguration:PutImageScanningConfiguration' :: PutImageScanningConfiguration -> ImageScanningConfiguration
imageScanningConfiguration} -> ImageScanningConfiguration
imageScanningConfiguration) (\s :: PutImageScanningConfiguration
s@PutImageScanningConfiguration' {} ImageScanningConfiguration
a -> PutImageScanningConfiguration
s {$sel:imageScanningConfiguration:PutImageScanningConfiguration' :: ImageScanningConfiguration
imageScanningConfiguration = ImageScanningConfiguration
a} :: PutImageScanningConfiguration)

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

instance Prelude.NFData PutImageScanningConfiguration

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

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

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

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

-- |
-- Create a value of 'PutImageScanningConfigurationResponse' 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', 'putImageScanningConfigurationResponse_registryId' - The registry ID associated with the request.
--
-- 'imageScanningConfiguration', 'putImageScanningConfigurationResponse_imageScanningConfiguration' - The image scanning configuration setting for the repository.
--
-- 'repositoryName', 'putImageScanningConfigurationResponse_repositoryName' - The repository name associated with the request.
--
-- 'httpStatus', 'putImageScanningConfigurationResponse_httpStatus' - The response's http status code.
newPutImageScanningConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutImageScanningConfigurationResponse
newPutImageScanningConfigurationResponse :: Int -> PutImageScanningConfigurationResponse
newPutImageScanningConfigurationResponse Int
pHttpStatus_ =
  PutImageScanningConfigurationResponse' :: Maybe Text
-> Maybe ImageScanningConfiguration
-> Maybe Text
-> Int
-> PutImageScanningConfigurationResponse
PutImageScanningConfigurationResponse'
    { $sel:registryId:PutImageScanningConfigurationResponse' :: Maybe Text
registryId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imageScanningConfiguration:PutImageScanningConfigurationResponse' :: Maybe ImageScanningConfiguration
imageScanningConfiguration =
        Maybe ImageScanningConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryName:PutImageScanningConfigurationResponse' :: Maybe Text
repositoryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutImageScanningConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The image scanning configuration setting for the repository.
putImageScanningConfigurationResponse_imageScanningConfiguration :: Lens.Lens' PutImageScanningConfigurationResponse (Prelude.Maybe ImageScanningConfiguration)
putImageScanningConfigurationResponse_imageScanningConfiguration :: (Maybe ImageScanningConfiguration
 -> f (Maybe ImageScanningConfiguration))
-> PutImageScanningConfigurationResponse
-> f PutImageScanningConfigurationResponse
putImageScanningConfigurationResponse_imageScanningConfiguration = (PutImageScanningConfigurationResponse
 -> Maybe ImageScanningConfiguration)
-> (PutImageScanningConfigurationResponse
    -> Maybe ImageScanningConfiguration
    -> PutImageScanningConfigurationResponse)
-> Lens
     PutImageScanningConfigurationResponse
     PutImageScanningConfigurationResponse
     (Maybe ImageScanningConfiguration)
     (Maybe ImageScanningConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutImageScanningConfigurationResponse' {Maybe ImageScanningConfiguration
imageScanningConfiguration :: Maybe ImageScanningConfiguration
$sel:imageScanningConfiguration:PutImageScanningConfigurationResponse' :: PutImageScanningConfigurationResponse
-> Maybe ImageScanningConfiguration
imageScanningConfiguration} -> Maybe ImageScanningConfiguration
imageScanningConfiguration) (\s :: PutImageScanningConfigurationResponse
s@PutImageScanningConfigurationResponse' {} Maybe ImageScanningConfiguration
a -> PutImageScanningConfigurationResponse
s {$sel:imageScanningConfiguration:PutImageScanningConfigurationResponse' :: Maybe ImageScanningConfiguration
imageScanningConfiguration = Maybe ImageScanningConfiguration
a} :: PutImageScanningConfigurationResponse)

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

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

instance
  Prelude.NFData
    PutImageScanningConfigurationResponse