{-# 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.PutCodeBinding
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Put code binding URI
module Amazonka.Schemas.PutCodeBinding
  ( -- * Creating a Request
    PutCodeBinding (..),
    newPutCodeBinding,

    -- * Request Lenses
    putCodeBinding_schemaVersion,
    putCodeBinding_registryName,
    putCodeBinding_schemaName,
    putCodeBinding_language,

    -- * Destructuring the Response
    PutCodeBindingResponse (..),
    newPutCodeBindingResponse,

    -- * Response Lenses
    putCodeBindingResponse_creationDate,
    putCodeBindingResponse_lastModified,
    putCodeBindingResponse_schemaVersion,
    putCodeBindingResponse_status,
    putCodeBindingResponse_httpStatus,
  )
where

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

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

-- |
-- Create a value of 'PutCodeBinding' 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', 'putCodeBinding_schemaVersion' - Specifying this limits the results to only this schema version.
--
-- 'registryName', 'putCodeBinding_registryName' - The name of the registry.
--
-- 'schemaName', 'putCodeBinding_schemaName' - The name of the schema.
--
-- 'language', 'putCodeBinding_language' - The language of the code binding.
newPutCodeBinding ::
  -- | 'registryName'
  Prelude.Text ->
  -- | 'schemaName'
  Prelude.Text ->
  -- | 'language'
  Prelude.Text ->
  PutCodeBinding
newPutCodeBinding :: Text -> Text -> Text -> PutCodeBinding
newPutCodeBinding
  Text
pRegistryName_
  Text
pSchemaName_
  Text
pLanguage_ =
    PutCodeBinding'
      { $sel:schemaVersion:PutCodeBinding' :: Maybe Text
schemaVersion = forall a. Maybe a
Prelude.Nothing,
        $sel:registryName:PutCodeBinding' :: Text
registryName = Text
pRegistryName_,
        $sel:schemaName:PutCodeBinding' :: Text
schemaName = Text
pSchemaName_,
        $sel:language:PutCodeBinding' :: Text
language = Text
pLanguage_
      }

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

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

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

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

instance Core.AWSRequest PutCodeBinding where
  type
    AWSResponse PutCodeBinding =
      PutCodeBindingResponse
  request :: (Service -> Service) -> PutCodeBinding -> Request PutCodeBinding
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy PutCodeBinding
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutCodeBinding)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe ISO8601
-> Maybe ISO8601
-> Maybe Text
-> Maybe CodeGenerationStatus
-> Int
-> PutCodeBindingResponse
PutCodeBindingResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreationDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LastModified")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SchemaVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable PutCodeBinding where
  hashWithSalt :: Int -> PutCodeBinding -> Int
hashWithSalt Int
_salt PutCodeBinding' {Maybe Text
Text
language :: Text
schemaName :: Text
registryName :: Text
schemaVersion :: Maybe Text
$sel:language:PutCodeBinding' :: PutCodeBinding -> Text
$sel:schemaName:PutCodeBinding' :: PutCodeBinding -> Text
$sel:registryName:PutCodeBinding' :: PutCodeBinding -> Text
$sel:schemaVersion:PutCodeBinding' :: PutCodeBinding -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
schemaVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
registryName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
schemaName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
language

instance Prelude.NFData PutCodeBinding where
  rnf :: PutCodeBinding -> ()
rnf PutCodeBinding' {Maybe Text
Text
language :: Text
schemaName :: Text
registryName :: Text
schemaVersion :: Maybe Text
$sel:language:PutCodeBinding' :: PutCodeBinding -> Text
$sel:schemaName:PutCodeBinding' :: PutCodeBinding -> Text
$sel:registryName:PutCodeBinding' :: PutCodeBinding -> Text
$sel:schemaVersion:PutCodeBinding' :: PutCodeBinding -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
schemaVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
registryName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
schemaName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
language

instance Data.ToHeaders PutCodeBinding where
  toHeaders :: PutCodeBinding -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON PutCodeBinding where
  toJSON :: PutCodeBinding -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)

instance Data.ToPath PutCodeBinding where
  toPath :: PutCodeBinding -> ByteString
toPath PutCodeBinding' {Maybe Text
Text
language :: Text
schemaName :: Text
registryName :: Text
schemaVersion :: Maybe Text
$sel:language:PutCodeBinding' :: PutCodeBinding -> Text
$sel:schemaName:PutCodeBinding' :: PutCodeBinding -> Text
$sel:registryName:PutCodeBinding' :: PutCodeBinding -> Text
$sel:schemaVersion:PutCodeBinding' :: PutCodeBinding -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v1/registries/name/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
registryName,
        ByteString
"/schemas/name/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
schemaName,
        ByteString
"/language/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
language
      ]

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

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

-- |
-- Create a value of 'PutCodeBindingResponse' 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:
--
-- 'creationDate', 'putCodeBindingResponse_creationDate' - The time and date that the code binding was created.
--
-- 'lastModified', 'putCodeBindingResponse_lastModified' - The date and time that code bindings were modified.
--
-- 'schemaVersion', 'putCodeBindingResponse_schemaVersion' - The version number of the schema.
--
-- 'status', 'putCodeBindingResponse_status' - The current status of code binding generation.
--
-- 'httpStatus', 'putCodeBindingResponse_httpStatus' - The response's http status code.
newPutCodeBindingResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutCodeBindingResponse
newPutCodeBindingResponse :: Int -> PutCodeBindingResponse
newPutCodeBindingResponse Int
pHttpStatus_ =
  PutCodeBindingResponse'
    { $sel:creationDate:PutCodeBindingResponse' :: Maybe ISO8601
creationDate =
        forall a. Maybe a
Prelude.Nothing,
      $sel:lastModified:PutCodeBindingResponse' :: Maybe ISO8601
lastModified = forall a. Maybe a
Prelude.Nothing,
      $sel:schemaVersion:PutCodeBindingResponse' :: Maybe Text
schemaVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:status:PutCodeBindingResponse' :: Maybe CodeGenerationStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:PutCodeBindingResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The time and date that the code binding was created.
putCodeBindingResponse_creationDate :: Lens.Lens' PutCodeBindingResponse (Prelude.Maybe Prelude.UTCTime)
putCodeBindingResponse_creationDate :: Lens' PutCodeBindingResponse (Maybe UTCTime)
putCodeBindingResponse_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutCodeBindingResponse' {Maybe ISO8601
creationDate :: Maybe ISO8601
$sel:creationDate:PutCodeBindingResponse' :: PutCodeBindingResponse -> Maybe ISO8601
creationDate} -> Maybe ISO8601
creationDate) (\s :: PutCodeBindingResponse
s@PutCodeBindingResponse' {} Maybe ISO8601
a -> PutCodeBindingResponse
s {$sel:creationDate:PutCodeBindingResponse' :: Maybe ISO8601
creationDate = Maybe ISO8601
a} :: PutCodeBindingResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The date and time that code bindings were modified.
putCodeBindingResponse_lastModified :: Lens.Lens' PutCodeBindingResponse (Prelude.Maybe Prelude.UTCTime)
putCodeBindingResponse_lastModified :: Lens' PutCodeBindingResponse (Maybe UTCTime)
putCodeBindingResponse_lastModified = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutCodeBindingResponse' {Maybe ISO8601
lastModified :: Maybe ISO8601
$sel:lastModified:PutCodeBindingResponse' :: PutCodeBindingResponse -> Maybe ISO8601
lastModified} -> Maybe ISO8601
lastModified) (\s :: PutCodeBindingResponse
s@PutCodeBindingResponse' {} Maybe ISO8601
a -> PutCodeBindingResponse
s {$sel:lastModified:PutCodeBindingResponse' :: Maybe ISO8601
lastModified = Maybe ISO8601
a} :: PutCodeBindingResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

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

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

instance Prelude.NFData PutCodeBindingResponse where
  rnf :: PutCodeBindingResponse -> ()
rnf PutCodeBindingResponse' {Int
Maybe Text
Maybe ISO8601
Maybe CodeGenerationStatus
httpStatus :: Int
status :: Maybe CodeGenerationStatus
schemaVersion :: Maybe Text
lastModified :: Maybe ISO8601
creationDate :: Maybe ISO8601
$sel:httpStatus:PutCodeBindingResponse' :: PutCodeBindingResponse -> Int
$sel:status:PutCodeBindingResponse' :: PutCodeBindingResponse -> Maybe CodeGenerationStatus
$sel:schemaVersion:PutCodeBindingResponse' :: PutCodeBindingResponse -> Maybe Text
$sel:lastModified:PutCodeBindingResponse' :: PutCodeBindingResponse -> Maybe ISO8601
$sel:creationDate:PutCodeBindingResponse' :: PutCodeBindingResponse -> Maybe ISO8601
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
creationDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
lastModified
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
schemaVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CodeGenerationStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus