{-# 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.StartImageScan
-- 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)
--
-- Starts an image vulnerability scan. An image scan can only be started
-- once per 24 hours on an individual image. This limit includes if an
-- image was scanned on initial push. For more information, see
-- <https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html Image scanning>
-- in the /Amazon Elastic Container Registry User Guide/.
module Amazonka.ECR.StartImageScan
  ( -- * Creating a Request
    StartImageScan (..),
    newStartImageScan,

    -- * Request Lenses
    startImageScan_registryId,
    startImageScan_repositoryName,
    startImageScan_imageId,

    -- * Destructuring the Response
    StartImageScanResponse (..),
    newStartImageScanResponse,

    -- * Response Lenses
    startImageScanResponse_registryId,
    startImageScanResponse_imageScanStatus,
    startImageScanResponse_imageId,
    startImageScanResponse_repositoryName,
    startImageScanResponse_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:/ 'newStartImageScan' smart constructor.
data StartImageScan = StartImageScan'
  { -- | The Amazon Web Services account ID associated with the registry that
    -- contains the repository in which to start an image scan request. If you
    -- do not specify a registry, the default registry is assumed.
    StartImageScan -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
    -- | The name of the repository that contains the images to scan.
    StartImageScan -> Text
repositoryName :: Prelude.Text,
    StartImageScan -> ImageIdentifier
imageId :: ImageIdentifier
  }
  deriving (StartImageScan -> StartImageScan -> Bool
(StartImageScan -> StartImageScan -> Bool)
-> (StartImageScan -> StartImageScan -> Bool) -> Eq StartImageScan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartImageScan -> StartImageScan -> Bool
$c/= :: StartImageScan -> StartImageScan -> Bool
== :: StartImageScan -> StartImageScan -> Bool
$c== :: StartImageScan -> StartImageScan -> Bool
Prelude.Eq, ReadPrec [StartImageScan]
ReadPrec StartImageScan
Int -> ReadS StartImageScan
ReadS [StartImageScan]
(Int -> ReadS StartImageScan)
-> ReadS [StartImageScan]
-> ReadPrec StartImageScan
-> ReadPrec [StartImageScan]
-> Read StartImageScan
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartImageScan]
$creadListPrec :: ReadPrec [StartImageScan]
readPrec :: ReadPrec StartImageScan
$creadPrec :: ReadPrec StartImageScan
readList :: ReadS [StartImageScan]
$creadList :: ReadS [StartImageScan]
readsPrec :: Int -> ReadS StartImageScan
$creadsPrec :: Int -> ReadS StartImageScan
Prelude.Read, Int -> StartImageScan -> ShowS
[StartImageScan] -> ShowS
StartImageScan -> String
(Int -> StartImageScan -> ShowS)
-> (StartImageScan -> String)
-> ([StartImageScan] -> ShowS)
-> Show StartImageScan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartImageScan] -> ShowS
$cshowList :: [StartImageScan] -> ShowS
show :: StartImageScan -> String
$cshow :: StartImageScan -> String
showsPrec :: Int -> StartImageScan -> ShowS
$cshowsPrec :: Int -> StartImageScan -> ShowS
Prelude.Show, (forall x. StartImageScan -> Rep StartImageScan x)
-> (forall x. Rep StartImageScan x -> StartImageScan)
-> Generic StartImageScan
forall x. Rep StartImageScan x -> StartImageScan
forall x. StartImageScan -> Rep StartImageScan x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartImageScan x -> StartImageScan
$cfrom :: forall x. StartImageScan -> Rep StartImageScan x
Prelude.Generic)

-- |
-- Create a value of 'StartImageScan' 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', 'startImageScan_registryId' - The Amazon Web Services account ID associated with the registry that
-- contains the repository in which to start an image scan request. If you
-- do not specify a registry, the default registry is assumed.
--
-- 'repositoryName', 'startImageScan_repositoryName' - The name of the repository that contains the images to scan.
--
-- 'imageId', 'startImageScan_imageId' - Undocumented member.
newStartImageScan ::
  -- | 'repositoryName'
  Prelude.Text ->
  -- | 'imageId'
  ImageIdentifier ->
  StartImageScan
newStartImageScan :: Text -> ImageIdentifier -> StartImageScan
newStartImageScan Text
pRepositoryName_ ImageIdentifier
pImageId_ =
  StartImageScan' :: Maybe Text -> Text -> ImageIdentifier -> StartImageScan
StartImageScan'
    { $sel:registryId:StartImageScan' :: Maybe Text
registryId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryName:StartImageScan' :: Text
repositoryName = Text
pRepositoryName_,
      $sel:imageId:StartImageScan' :: ImageIdentifier
imageId = ImageIdentifier
pImageId_
    }

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

-- | The name of the repository that contains the images to scan.
startImageScan_repositoryName :: Lens.Lens' StartImageScan Prelude.Text
startImageScan_repositoryName :: (Text -> f Text) -> StartImageScan -> f StartImageScan
startImageScan_repositoryName = (StartImageScan -> Text)
-> (StartImageScan -> Text -> StartImageScan)
-> Lens StartImageScan StartImageScan Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartImageScan' {Text
repositoryName :: Text
$sel:repositoryName:StartImageScan' :: StartImageScan -> Text
repositoryName} -> Text
repositoryName) (\s :: StartImageScan
s@StartImageScan' {} Text
a -> StartImageScan
s {$sel:repositoryName:StartImageScan' :: Text
repositoryName = Text
a} :: StartImageScan)

-- | Undocumented member.
startImageScan_imageId :: Lens.Lens' StartImageScan ImageIdentifier
startImageScan_imageId :: (ImageIdentifier -> f ImageIdentifier)
-> StartImageScan -> f StartImageScan
startImageScan_imageId = (StartImageScan -> ImageIdentifier)
-> (StartImageScan -> ImageIdentifier -> StartImageScan)
-> Lens
     StartImageScan StartImageScan ImageIdentifier ImageIdentifier
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartImageScan' {ImageIdentifier
imageId :: ImageIdentifier
$sel:imageId:StartImageScan' :: StartImageScan -> ImageIdentifier
imageId} -> ImageIdentifier
imageId) (\s :: StartImageScan
s@StartImageScan' {} ImageIdentifier
a -> StartImageScan
s {$sel:imageId:StartImageScan' :: ImageIdentifier
imageId = ImageIdentifier
a} :: StartImageScan)

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

instance Prelude.NFData StartImageScan

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

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

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

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

-- |
-- Create a value of 'StartImageScanResponse' 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', 'startImageScanResponse_registryId' - The registry ID associated with the request.
--
-- 'imageScanStatus', 'startImageScanResponse_imageScanStatus' - The current state of the scan.
--
-- 'imageId', 'startImageScanResponse_imageId' - Undocumented member.
--
-- 'repositoryName', 'startImageScanResponse_repositoryName' - The repository name associated with the request.
--
-- 'httpStatus', 'startImageScanResponse_httpStatus' - The response's http status code.
newStartImageScanResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartImageScanResponse
newStartImageScanResponse :: Int -> StartImageScanResponse
newStartImageScanResponse Int
pHttpStatus_ =
  StartImageScanResponse' :: Maybe Text
-> Maybe ImageScanStatus
-> Maybe ImageIdentifier
-> Maybe Text
-> Int
-> StartImageScanResponse
StartImageScanResponse'
    { $sel:registryId:StartImageScanResponse' :: Maybe Text
registryId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:imageScanStatus:StartImageScanResponse' :: Maybe ImageScanStatus
imageScanStatus = Maybe ImageScanStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:imageId:StartImageScanResponse' :: Maybe ImageIdentifier
imageId = Maybe ImageIdentifier
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryName:StartImageScanResponse' :: Maybe Text
repositoryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartImageScanResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The current state of the scan.
startImageScanResponse_imageScanStatus :: Lens.Lens' StartImageScanResponse (Prelude.Maybe ImageScanStatus)
startImageScanResponse_imageScanStatus :: (Maybe ImageScanStatus -> f (Maybe ImageScanStatus))
-> StartImageScanResponse -> f StartImageScanResponse
startImageScanResponse_imageScanStatus = (StartImageScanResponse -> Maybe ImageScanStatus)
-> (StartImageScanResponse
    -> Maybe ImageScanStatus -> StartImageScanResponse)
-> Lens
     StartImageScanResponse
     StartImageScanResponse
     (Maybe ImageScanStatus)
     (Maybe ImageScanStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartImageScanResponse' {Maybe ImageScanStatus
imageScanStatus :: Maybe ImageScanStatus
$sel:imageScanStatus:StartImageScanResponse' :: StartImageScanResponse -> Maybe ImageScanStatus
imageScanStatus} -> Maybe ImageScanStatus
imageScanStatus) (\s :: StartImageScanResponse
s@StartImageScanResponse' {} Maybe ImageScanStatus
a -> StartImageScanResponse
s {$sel:imageScanStatus:StartImageScanResponse' :: Maybe ImageScanStatus
imageScanStatus = Maybe ImageScanStatus
a} :: StartImageScanResponse)

-- | Undocumented member.
startImageScanResponse_imageId :: Lens.Lens' StartImageScanResponse (Prelude.Maybe ImageIdentifier)
startImageScanResponse_imageId :: (Maybe ImageIdentifier -> f (Maybe ImageIdentifier))
-> StartImageScanResponse -> f StartImageScanResponse
startImageScanResponse_imageId = (StartImageScanResponse -> Maybe ImageIdentifier)
-> (StartImageScanResponse
    -> Maybe ImageIdentifier -> StartImageScanResponse)
-> Lens
     StartImageScanResponse
     StartImageScanResponse
     (Maybe ImageIdentifier)
     (Maybe ImageIdentifier)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartImageScanResponse' {Maybe ImageIdentifier
imageId :: Maybe ImageIdentifier
$sel:imageId:StartImageScanResponse' :: StartImageScanResponse -> Maybe ImageIdentifier
imageId} -> Maybe ImageIdentifier
imageId) (\s :: StartImageScanResponse
s@StartImageScanResponse' {} Maybe ImageIdentifier
a -> StartImageScanResponse
s {$sel:imageId:StartImageScanResponse' :: Maybe ImageIdentifier
imageId = Maybe ImageIdentifier
a} :: StartImageScanResponse)

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

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

instance Prelude.NFData StartImageScanResponse