{-# 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.Schemas.DescribeCodeBinding
-- 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)
--
-- Describe the code binding URI.
module Amazonka.Schemas.DescribeCodeBinding
  ( -- * Creating a Request
    DescribeCodeBinding (..),
    newDescribeCodeBinding,

    -- * Request Lenses
    describeCodeBinding_schemaVersion,
    describeCodeBinding_registryName,
    describeCodeBinding_schemaName,
    describeCodeBinding_language,

    -- * Destructuring the Response
    DescribeCodeBindingResponse (..),
    newDescribeCodeBindingResponse,

    -- * Response Lenses
    describeCodeBindingResponse_status,
    describeCodeBindingResponse_schemaVersion,
    describeCodeBindingResponse_creationDate,
    describeCodeBindingResponse_lastModified,
    describeCodeBindingResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeCodeBinding' smart constructor.
data DescribeCodeBinding = DescribeCodeBinding'
  { -- | Specifying this limits the results to only this schema version.
    DescribeCodeBinding -> Maybe Text
schemaVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the registry.
    DescribeCodeBinding -> Text
registryName :: Prelude.Text,
    -- | The name of the schema.
    DescribeCodeBinding -> Text
schemaName :: Prelude.Text,
    -- | The language of the code binding.
    DescribeCodeBinding -> Text
language :: Prelude.Text
  }
  deriving (DescribeCodeBinding -> DescribeCodeBinding -> Bool
(DescribeCodeBinding -> DescribeCodeBinding -> Bool)
-> (DescribeCodeBinding -> DescribeCodeBinding -> Bool)
-> Eq DescribeCodeBinding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCodeBinding -> DescribeCodeBinding -> Bool
$c/= :: DescribeCodeBinding -> DescribeCodeBinding -> Bool
== :: DescribeCodeBinding -> DescribeCodeBinding -> Bool
$c== :: DescribeCodeBinding -> DescribeCodeBinding -> Bool
Prelude.Eq, ReadPrec [DescribeCodeBinding]
ReadPrec DescribeCodeBinding
Int -> ReadS DescribeCodeBinding
ReadS [DescribeCodeBinding]
(Int -> ReadS DescribeCodeBinding)
-> ReadS [DescribeCodeBinding]
-> ReadPrec DescribeCodeBinding
-> ReadPrec [DescribeCodeBinding]
-> Read DescribeCodeBinding
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCodeBinding]
$creadListPrec :: ReadPrec [DescribeCodeBinding]
readPrec :: ReadPrec DescribeCodeBinding
$creadPrec :: ReadPrec DescribeCodeBinding
readList :: ReadS [DescribeCodeBinding]
$creadList :: ReadS [DescribeCodeBinding]
readsPrec :: Int -> ReadS DescribeCodeBinding
$creadsPrec :: Int -> ReadS DescribeCodeBinding
Prelude.Read, Int -> DescribeCodeBinding -> ShowS
[DescribeCodeBinding] -> ShowS
DescribeCodeBinding -> String
(Int -> DescribeCodeBinding -> ShowS)
-> (DescribeCodeBinding -> String)
-> ([DescribeCodeBinding] -> ShowS)
-> Show DescribeCodeBinding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCodeBinding] -> ShowS
$cshowList :: [DescribeCodeBinding] -> ShowS
show :: DescribeCodeBinding -> String
$cshow :: DescribeCodeBinding -> String
showsPrec :: Int -> DescribeCodeBinding -> ShowS
$cshowsPrec :: Int -> DescribeCodeBinding -> ShowS
Prelude.Show, (forall x. DescribeCodeBinding -> Rep DescribeCodeBinding x)
-> (forall x. Rep DescribeCodeBinding x -> DescribeCodeBinding)
-> Generic DescribeCodeBinding
forall x. Rep DescribeCodeBinding x -> DescribeCodeBinding
forall x. DescribeCodeBinding -> Rep DescribeCodeBinding x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeCodeBinding x -> DescribeCodeBinding
$cfrom :: forall x. DescribeCodeBinding -> Rep DescribeCodeBinding x
Prelude.Generic)

-- |
-- Create a value of 'DescribeCodeBinding' 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:
--
-- 'schemaVersion', 'describeCodeBinding_schemaVersion' - Specifying this limits the results to only this schema version.
--
-- 'registryName', 'describeCodeBinding_registryName' - The name of the registry.
--
-- 'schemaName', 'describeCodeBinding_schemaName' - The name of the schema.
--
-- 'language', 'describeCodeBinding_language' - The language of the code binding.
newDescribeCodeBinding ::
  -- | 'registryName'
  Prelude.Text ->
  -- | 'schemaName'
  Prelude.Text ->
  -- | 'language'
  Prelude.Text ->
  DescribeCodeBinding
newDescribeCodeBinding :: Text -> Text -> Text -> DescribeCodeBinding
newDescribeCodeBinding
  Text
pRegistryName_
  Text
pSchemaName_
  Text
pLanguage_ =
    DescribeCodeBinding' :: Maybe Text -> Text -> Text -> Text -> DescribeCodeBinding
DescribeCodeBinding'
      { $sel:schemaVersion:DescribeCodeBinding' :: Maybe Text
schemaVersion =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:registryName:DescribeCodeBinding' :: Text
registryName = Text
pRegistryName_,
        $sel:schemaName:DescribeCodeBinding' :: Text
schemaName = Text
pSchemaName_,
        $sel:language:DescribeCodeBinding' :: Text
language = Text
pLanguage_
      }

-- | Specifying this limits the results to only this schema version.
describeCodeBinding_schemaVersion :: Lens.Lens' DescribeCodeBinding (Prelude.Maybe Prelude.Text)
describeCodeBinding_schemaVersion :: (Maybe Text -> f (Maybe Text))
-> DescribeCodeBinding -> f DescribeCodeBinding
describeCodeBinding_schemaVersion = (DescribeCodeBinding -> Maybe Text)
-> (DescribeCodeBinding -> Maybe Text -> DescribeCodeBinding)
-> Lens
     DescribeCodeBinding DescribeCodeBinding (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeBinding' {Maybe Text
schemaVersion :: Maybe Text
$sel:schemaVersion:DescribeCodeBinding' :: DescribeCodeBinding -> Maybe Text
schemaVersion} -> Maybe Text
schemaVersion) (\s :: DescribeCodeBinding
s@DescribeCodeBinding' {} Maybe Text
a -> DescribeCodeBinding
s {$sel:schemaVersion:DescribeCodeBinding' :: Maybe Text
schemaVersion = Maybe Text
a} :: DescribeCodeBinding)

-- | The name of the registry.
describeCodeBinding_registryName :: Lens.Lens' DescribeCodeBinding Prelude.Text
describeCodeBinding_registryName :: (Text -> f Text) -> DescribeCodeBinding -> f DescribeCodeBinding
describeCodeBinding_registryName = (DescribeCodeBinding -> Text)
-> (DescribeCodeBinding -> Text -> DescribeCodeBinding)
-> Lens DescribeCodeBinding DescribeCodeBinding Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeBinding' {Text
registryName :: Text
$sel:registryName:DescribeCodeBinding' :: DescribeCodeBinding -> Text
registryName} -> Text
registryName) (\s :: DescribeCodeBinding
s@DescribeCodeBinding' {} Text
a -> DescribeCodeBinding
s {$sel:registryName:DescribeCodeBinding' :: Text
registryName = Text
a} :: DescribeCodeBinding)

-- | The name of the schema.
describeCodeBinding_schemaName :: Lens.Lens' DescribeCodeBinding Prelude.Text
describeCodeBinding_schemaName :: (Text -> f Text) -> DescribeCodeBinding -> f DescribeCodeBinding
describeCodeBinding_schemaName = (DescribeCodeBinding -> Text)
-> (DescribeCodeBinding -> Text -> DescribeCodeBinding)
-> Lens DescribeCodeBinding DescribeCodeBinding Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeBinding' {Text
schemaName :: Text
$sel:schemaName:DescribeCodeBinding' :: DescribeCodeBinding -> Text
schemaName} -> Text
schemaName) (\s :: DescribeCodeBinding
s@DescribeCodeBinding' {} Text
a -> DescribeCodeBinding
s {$sel:schemaName:DescribeCodeBinding' :: Text
schemaName = Text
a} :: DescribeCodeBinding)

-- | The language of the code binding.
describeCodeBinding_language :: Lens.Lens' DescribeCodeBinding Prelude.Text
describeCodeBinding_language :: (Text -> f Text) -> DescribeCodeBinding -> f DescribeCodeBinding
describeCodeBinding_language = (DescribeCodeBinding -> Text)
-> (DescribeCodeBinding -> Text -> DescribeCodeBinding)
-> Lens DescribeCodeBinding DescribeCodeBinding Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeBinding' {Text
language :: Text
$sel:language:DescribeCodeBinding' :: DescribeCodeBinding -> Text
language} -> Text
language) (\s :: DescribeCodeBinding
s@DescribeCodeBinding' {} Text
a -> DescribeCodeBinding
s {$sel:language:DescribeCodeBinding' :: Text
language = Text
a} :: DescribeCodeBinding)

instance Core.AWSRequest DescribeCodeBinding where
  type
    AWSResponse DescribeCodeBinding =
      DescribeCodeBindingResponse
  request :: DescribeCodeBinding -> Request DescribeCodeBinding
request = Service -> DescribeCodeBinding -> Request DescribeCodeBinding
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeCodeBinding
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeCodeBinding)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeCodeBinding))
-> Logger
-> Service
-> Proxy DescribeCodeBinding
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeCodeBinding)))
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 CodeGenerationStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Int
-> DescribeCodeBindingResponse
DescribeCodeBindingResponse'
            (Maybe CodeGenerationStatus
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Int
 -> DescribeCodeBindingResponse)
-> Either String (Maybe CodeGenerationStatus)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Int
      -> DescribeCodeBindingResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe CodeGenerationStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Int
   -> DescribeCodeBindingResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX -> Maybe POSIX -> Int -> DescribeCodeBindingResponse)
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
"SchemaVersion")
            Either
  String
  (Maybe POSIX -> Maybe POSIX -> Int -> DescribeCodeBindingResponse)
-> Either String (Maybe POSIX)
-> Either
     String (Maybe POSIX -> Int -> DescribeCodeBindingResponse)
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
"CreationDate")
            Either String (Maybe POSIX -> Int -> DescribeCodeBindingResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> DescribeCodeBindingResponse)
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
"LastModified")
            Either String (Int -> DescribeCodeBindingResponse)
-> Either String Int -> Either String DescribeCodeBindingResponse
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 DescribeCodeBinding

instance Prelude.NFData DescribeCodeBinding

instance Core.ToHeaders DescribeCodeBinding where
  toHeaders :: DescribeCodeBinding -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeCodeBinding -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath DescribeCodeBinding where
  toPath :: DescribeCodeBinding -> ByteString
toPath DescribeCodeBinding' {Maybe Text
Text
language :: Text
schemaName :: Text
registryName :: Text
schemaVersion :: Maybe Text
$sel:language:DescribeCodeBinding' :: DescribeCodeBinding -> Text
$sel:schemaName:DescribeCodeBinding' :: DescribeCodeBinding -> Text
$sel:registryName:DescribeCodeBinding' :: DescribeCodeBinding -> Text
$sel:schemaVersion:DescribeCodeBinding' :: DescribeCodeBinding -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v1/registries/name/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
registryName,
        ByteString
"/schemas/name/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
schemaName,
        ByteString
"/language/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
language
      ]

instance Core.ToQuery DescribeCodeBinding where
  toQuery :: DescribeCodeBinding -> QueryString
toQuery DescribeCodeBinding' {Maybe Text
Text
language :: Text
schemaName :: Text
registryName :: Text
schemaVersion :: Maybe Text
$sel:language:DescribeCodeBinding' :: DescribeCodeBinding -> Text
$sel:schemaName:DescribeCodeBinding' :: DescribeCodeBinding -> Text
$sel:registryName:DescribeCodeBinding' :: DescribeCodeBinding -> Text
$sel:schemaVersion:DescribeCodeBinding' :: DescribeCodeBinding -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"schemaVersion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
schemaVersion]

-- | /See:/ 'newDescribeCodeBindingResponse' smart constructor.
data DescribeCodeBindingResponse = DescribeCodeBindingResponse'
  { -- | The current status of code binding generation.
    DescribeCodeBindingResponse -> Maybe CodeGenerationStatus
status :: Prelude.Maybe CodeGenerationStatus,
    -- | The version number of the schema.
    DescribeCodeBindingResponse -> Maybe Text
schemaVersion :: Prelude.Maybe Prelude.Text,
    -- | The time and date that the code binding was created.
    DescribeCodeBindingResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The date and time that code bindings were modified.
    DescribeCodeBindingResponse -> Maybe POSIX
lastModified :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    DescribeCodeBindingResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeCodeBindingResponse -> DescribeCodeBindingResponse -> Bool
(DescribeCodeBindingResponse
 -> DescribeCodeBindingResponse -> Bool)
-> (DescribeCodeBindingResponse
    -> DescribeCodeBindingResponse -> Bool)
-> Eq DescribeCodeBindingResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCodeBindingResponse -> DescribeCodeBindingResponse -> Bool
$c/= :: DescribeCodeBindingResponse -> DescribeCodeBindingResponse -> Bool
== :: DescribeCodeBindingResponse -> DescribeCodeBindingResponse -> Bool
$c== :: DescribeCodeBindingResponse -> DescribeCodeBindingResponse -> Bool
Prelude.Eq, ReadPrec [DescribeCodeBindingResponse]
ReadPrec DescribeCodeBindingResponse
Int -> ReadS DescribeCodeBindingResponse
ReadS [DescribeCodeBindingResponse]
(Int -> ReadS DescribeCodeBindingResponse)
-> ReadS [DescribeCodeBindingResponse]
-> ReadPrec DescribeCodeBindingResponse
-> ReadPrec [DescribeCodeBindingResponse]
-> Read DescribeCodeBindingResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCodeBindingResponse]
$creadListPrec :: ReadPrec [DescribeCodeBindingResponse]
readPrec :: ReadPrec DescribeCodeBindingResponse
$creadPrec :: ReadPrec DescribeCodeBindingResponse
readList :: ReadS [DescribeCodeBindingResponse]
$creadList :: ReadS [DescribeCodeBindingResponse]
readsPrec :: Int -> ReadS DescribeCodeBindingResponse
$creadsPrec :: Int -> ReadS DescribeCodeBindingResponse
Prelude.Read, Int -> DescribeCodeBindingResponse -> ShowS
[DescribeCodeBindingResponse] -> ShowS
DescribeCodeBindingResponse -> String
(Int -> DescribeCodeBindingResponse -> ShowS)
-> (DescribeCodeBindingResponse -> String)
-> ([DescribeCodeBindingResponse] -> ShowS)
-> Show DescribeCodeBindingResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCodeBindingResponse] -> ShowS
$cshowList :: [DescribeCodeBindingResponse] -> ShowS
show :: DescribeCodeBindingResponse -> String
$cshow :: DescribeCodeBindingResponse -> String
showsPrec :: Int -> DescribeCodeBindingResponse -> ShowS
$cshowsPrec :: Int -> DescribeCodeBindingResponse -> ShowS
Prelude.Show, (forall x.
 DescribeCodeBindingResponse -> Rep DescribeCodeBindingResponse x)
-> (forall x.
    Rep DescribeCodeBindingResponse x -> DescribeCodeBindingResponse)
-> Generic DescribeCodeBindingResponse
forall x.
Rep DescribeCodeBindingResponse x -> DescribeCodeBindingResponse
forall x.
DescribeCodeBindingResponse -> Rep DescribeCodeBindingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCodeBindingResponse x -> DescribeCodeBindingResponse
$cfrom :: forall x.
DescribeCodeBindingResponse -> Rep DescribeCodeBindingResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeCodeBindingResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'status', 'describeCodeBindingResponse_status' - The current status of code binding generation.
--
-- 'schemaVersion', 'describeCodeBindingResponse_schemaVersion' - The version number of the schema.
--
-- 'creationDate', 'describeCodeBindingResponse_creationDate' - The time and date that the code binding was created.
--
-- 'lastModified', 'describeCodeBindingResponse_lastModified' - The date and time that code bindings were modified.
--
-- 'httpStatus', 'describeCodeBindingResponse_httpStatus' - The response's http status code.
newDescribeCodeBindingResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeCodeBindingResponse
newDescribeCodeBindingResponse :: Int -> DescribeCodeBindingResponse
newDescribeCodeBindingResponse Int
pHttpStatus_ =
  DescribeCodeBindingResponse' :: Maybe CodeGenerationStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Int
-> DescribeCodeBindingResponse
DescribeCodeBindingResponse'
    { $sel:status:DescribeCodeBindingResponse' :: Maybe CodeGenerationStatus
status =
        Maybe CodeGenerationStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaVersion:DescribeCodeBindingResponse' :: Maybe Text
schemaVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:DescribeCodeBindingResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModified:DescribeCodeBindingResponse' :: Maybe POSIX
lastModified = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeCodeBindingResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current status of code binding generation.
describeCodeBindingResponse_status :: Lens.Lens' DescribeCodeBindingResponse (Prelude.Maybe CodeGenerationStatus)
describeCodeBindingResponse_status :: (Maybe CodeGenerationStatus -> f (Maybe CodeGenerationStatus))
-> DescribeCodeBindingResponse -> f DescribeCodeBindingResponse
describeCodeBindingResponse_status = (DescribeCodeBindingResponse -> Maybe CodeGenerationStatus)
-> (DescribeCodeBindingResponse
    -> Maybe CodeGenerationStatus -> DescribeCodeBindingResponse)
-> Lens
     DescribeCodeBindingResponse
     DescribeCodeBindingResponse
     (Maybe CodeGenerationStatus)
     (Maybe CodeGenerationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeBindingResponse' {Maybe CodeGenerationStatus
status :: Maybe CodeGenerationStatus
$sel:status:DescribeCodeBindingResponse' :: DescribeCodeBindingResponse -> Maybe CodeGenerationStatus
status} -> Maybe CodeGenerationStatus
status) (\s :: DescribeCodeBindingResponse
s@DescribeCodeBindingResponse' {} Maybe CodeGenerationStatus
a -> DescribeCodeBindingResponse
s {$sel:status:DescribeCodeBindingResponse' :: Maybe CodeGenerationStatus
status = Maybe CodeGenerationStatus
a} :: DescribeCodeBindingResponse)

-- | The version number of the schema.
describeCodeBindingResponse_schemaVersion :: Lens.Lens' DescribeCodeBindingResponse (Prelude.Maybe Prelude.Text)
describeCodeBindingResponse_schemaVersion :: (Maybe Text -> f (Maybe Text))
-> DescribeCodeBindingResponse -> f DescribeCodeBindingResponse
describeCodeBindingResponse_schemaVersion = (DescribeCodeBindingResponse -> Maybe Text)
-> (DescribeCodeBindingResponse
    -> Maybe Text -> DescribeCodeBindingResponse)
-> Lens
     DescribeCodeBindingResponse
     DescribeCodeBindingResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeBindingResponse' {Maybe Text
schemaVersion :: Maybe Text
$sel:schemaVersion:DescribeCodeBindingResponse' :: DescribeCodeBindingResponse -> Maybe Text
schemaVersion} -> Maybe Text
schemaVersion) (\s :: DescribeCodeBindingResponse
s@DescribeCodeBindingResponse' {} Maybe Text
a -> DescribeCodeBindingResponse
s {$sel:schemaVersion:DescribeCodeBindingResponse' :: Maybe Text
schemaVersion = Maybe Text
a} :: DescribeCodeBindingResponse)

-- | The time and date that the code binding was created.
describeCodeBindingResponse_creationDate :: Lens.Lens' DescribeCodeBindingResponse (Prelude.Maybe Prelude.UTCTime)
describeCodeBindingResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeCodeBindingResponse -> f DescribeCodeBindingResponse
describeCodeBindingResponse_creationDate = (DescribeCodeBindingResponse -> Maybe POSIX)
-> (DescribeCodeBindingResponse
    -> Maybe POSIX -> DescribeCodeBindingResponse)
-> Lens
     DescribeCodeBindingResponse
     DescribeCodeBindingResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeBindingResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:DescribeCodeBindingResponse' :: DescribeCodeBindingResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: DescribeCodeBindingResponse
s@DescribeCodeBindingResponse' {} Maybe POSIX
a -> DescribeCodeBindingResponse
s {$sel:creationDate:DescribeCodeBindingResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: DescribeCodeBindingResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeCodeBindingResponse -> f DescribeCodeBindingResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeCodeBindingResponse
-> f DescribeCodeBindingResponse
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 date and time that code bindings were modified.
describeCodeBindingResponse_lastModified :: Lens.Lens' DescribeCodeBindingResponse (Prelude.Maybe Prelude.UTCTime)
describeCodeBindingResponse_lastModified :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeCodeBindingResponse -> f DescribeCodeBindingResponse
describeCodeBindingResponse_lastModified = (DescribeCodeBindingResponse -> Maybe POSIX)
-> (DescribeCodeBindingResponse
    -> Maybe POSIX -> DescribeCodeBindingResponse)
-> Lens
     DescribeCodeBindingResponse
     DescribeCodeBindingResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCodeBindingResponse' {Maybe POSIX
lastModified :: Maybe POSIX
$sel:lastModified:DescribeCodeBindingResponse' :: DescribeCodeBindingResponse -> Maybe POSIX
lastModified} -> Maybe POSIX
lastModified) (\s :: DescribeCodeBindingResponse
s@DescribeCodeBindingResponse' {} Maybe POSIX
a -> DescribeCodeBindingResponse
s {$sel:lastModified:DescribeCodeBindingResponse' :: Maybe POSIX
lastModified = Maybe POSIX
a} :: DescribeCodeBindingResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeCodeBindingResponse -> f DescribeCodeBindingResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeCodeBindingResponse
-> f DescribeCodeBindingResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

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

instance Prelude.NFData DescribeCodeBindingResponse