{-# 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.CloudFormation.TestType
-- 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)
--
-- Tests a registered extension to make sure it meets all necessary
-- requirements for being published in the CloudFormation registry.
--
-- -   For resource types, this includes passing all contracts tests
--     defined for the type.
--
-- -   For modules, this includes determining if the module\'s model meets
--     all necessary requirements.
--
-- For more information, see
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/publish-extension.html#publish-extension-testing Testing your public extension prior to publishing>
-- in the /CloudFormation CLI User Guide/.
--
-- If you do not specify a version, CloudFormation uses the default version
-- of the extension in your account and region for testing.
--
-- To perform testing, CloudFormation assumes the execution role specified
-- when the type was registered. For more information, see
-- <AWSCloudFormation/latest/APIReference/API_RegisterType.html RegisterType>.
--
-- Once you\'ve initiated testing on an extension using @TestType@, you can
-- use
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeType.html DescribeType>
-- to monitor the current test status and test status description for the
-- extension.
--
-- An extension must have a test status of @PASSED@ before it can be
-- published. For more information, see
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-publish.html Publishing extensions to make them available for public use>
-- in the /CloudFormation CLI User Guide/.
module Amazonka.CloudFormation.TestType
  ( -- * Creating a Request
    TestType (..),
    newTestType,

    -- * Request Lenses
    testType_versionId,
    testType_typeName,
    testType_arn,
    testType_logDeliveryBucket,
    testType_type,

    -- * Destructuring the Response
    TestTypeResponse (..),
    newTestTypeResponse,

    -- * Response Lenses
    testTypeResponse_typeVersionArn,
    testTypeResponse_httpStatus,
  )
where

import Amazonka.CloudFormation.Types
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

-- | /See:/ 'newTestType' smart constructor.
data TestType = TestType'
  { -- | The version of the extension to test.
    --
    -- You can specify the version id with either @Arn@, or with @TypeName@ and
    -- @Type@.
    --
    -- If you do not specify a version, CloudFormation uses the default version
    -- of the extension in this account and region for testing.
    TestType -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text,
    -- | The name of the extension to test.
    --
    -- Conditional: You must specify @Arn@, or @TypeName@ and @Type@.
    TestType -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Number (ARN) of the extension.
    --
    -- Conditional: You must specify @Arn@, or @TypeName@ and @Type@.
    TestType -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The S3 bucket to which CloudFormation delivers the contract test
    -- execution logs.
    --
    -- CloudFormation delivers the logs by the time contract testing has
    -- completed and the extension has been assigned a test type status of
    -- @PASSED@ or @FAILED@.
    --
    -- The user calling @TestType@ must be able to access items in the
    -- specified S3 bucket. Specifically, the user needs the following
    -- permissions:
    --
    -- -   GetObject
    --
    -- -   PutObject
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3.html Actions, Resources, and Condition Keys for Amazon S3>
    -- in the /Amazon Web Services Identity and Access Management User Guide/.
    TestType -> Maybe Text
logDeliveryBucket :: Prelude.Maybe Prelude.Text,
    -- | The type of the extension to test.
    --
    -- Conditional: You must specify @Arn@, or @TypeName@ and @Type@.
    TestType -> Maybe ThirdPartyType
type' :: Prelude.Maybe ThirdPartyType
  }
  deriving (TestType -> TestType -> Bool
(TestType -> TestType -> Bool)
-> (TestType -> TestType -> Bool) -> Eq TestType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TestType -> TestType -> Bool
$c/= :: TestType -> TestType -> Bool
== :: TestType -> TestType -> Bool
$c== :: TestType -> TestType -> Bool
Prelude.Eq, ReadPrec [TestType]
ReadPrec TestType
Int -> ReadS TestType
ReadS [TestType]
(Int -> ReadS TestType)
-> ReadS [TestType]
-> ReadPrec TestType
-> ReadPrec [TestType]
-> Read TestType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TestType]
$creadListPrec :: ReadPrec [TestType]
readPrec :: ReadPrec TestType
$creadPrec :: ReadPrec TestType
readList :: ReadS [TestType]
$creadList :: ReadS [TestType]
readsPrec :: Int -> ReadS TestType
$creadsPrec :: Int -> ReadS TestType
Prelude.Read, Int -> TestType -> ShowS
[TestType] -> ShowS
TestType -> String
(Int -> TestType -> ShowS)
-> (TestType -> String) -> ([TestType] -> ShowS) -> Show TestType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestType] -> ShowS
$cshowList :: [TestType] -> ShowS
show :: TestType -> String
$cshow :: TestType -> String
showsPrec :: Int -> TestType -> ShowS
$cshowsPrec :: Int -> TestType -> ShowS
Prelude.Show, (forall x. TestType -> Rep TestType x)
-> (forall x. Rep TestType x -> TestType) -> Generic TestType
forall x. Rep TestType x -> TestType
forall x. TestType -> Rep TestType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TestType x -> TestType
$cfrom :: forall x. TestType -> Rep TestType x
Prelude.Generic)

-- |
-- Create a value of 'TestType' 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:
--
-- 'versionId', 'testType_versionId' - The version of the extension to test.
--
-- You can specify the version id with either @Arn@, or with @TypeName@ and
-- @Type@.
--
-- If you do not specify a version, CloudFormation uses the default version
-- of the extension in this account and region for testing.
--
-- 'typeName', 'testType_typeName' - The name of the extension to test.
--
-- Conditional: You must specify @Arn@, or @TypeName@ and @Type@.
--
-- 'arn', 'testType_arn' - The Amazon Resource Number (ARN) of the extension.
--
-- Conditional: You must specify @Arn@, or @TypeName@ and @Type@.
--
-- 'logDeliveryBucket', 'testType_logDeliveryBucket' - The S3 bucket to which CloudFormation delivers the contract test
-- execution logs.
--
-- CloudFormation delivers the logs by the time contract testing has
-- completed and the extension has been assigned a test type status of
-- @PASSED@ or @FAILED@.
--
-- The user calling @TestType@ must be able to access items in the
-- specified S3 bucket. Specifically, the user needs the following
-- permissions:
--
-- -   GetObject
--
-- -   PutObject
--
-- For more information, see
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3.html Actions, Resources, and Condition Keys for Amazon S3>
-- in the /Amazon Web Services Identity and Access Management User Guide/.
--
-- 'type'', 'testType_type' - The type of the extension to test.
--
-- Conditional: You must specify @Arn@, or @TypeName@ and @Type@.
newTestType ::
  TestType
newTestType :: TestType
newTestType =
  TestType' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ThirdPartyType
-> TestType
TestType'
    { $sel:versionId:TestType' :: Maybe Text
versionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:typeName:TestType' :: Maybe Text
typeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:TestType' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logDeliveryBucket:TestType' :: Maybe Text
logDeliveryBucket = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':TestType' :: Maybe ThirdPartyType
type' = Maybe ThirdPartyType
forall a. Maybe a
Prelude.Nothing
    }

-- | The version of the extension to test.
--
-- You can specify the version id with either @Arn@, or with @TypeName@ and
-- @Type@.
--
-- If you do not specify a version, CloudFormation uses the default version
-- of the extension in this account and region for testing.
testType_versionId :: Lens.Lens' TestType (Prelude.Maybe Prelude.Text)
testType_versionId :: (Maybe Text -> f (Maybe Text)) -> TestType -> f TestType
testType_versionId = (TestType -> Maybe Text)
-> (TestType -> Maybe Text -> TestType)
-> Lens TestType TestType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestType' {Maybe Text
versionId :: Maybe Text
$sel:versionId:TestType' :: TestType -> Maybe Text
versionId} -> Maybe Text
versionId) (\s :: TestType
s@TestType' {} Maybe Text
a -> TestType
s {$sel:versionId:TestType' :: Maybe Text
versionId = Maybe Text
a} :: TestType)

-- | The name of the extension to test.
--
-- Conditional: You must specify @Arn@, or @TypeName@ and @Type@.
testType_typeName :: Lens.Lens' TestType (Prelude.Maybe Prelude.Text)
testType_typeName :: (Maybe Text -> f (Maybe Text)) -> TestType -> f TestType
testType_typeName = (TestType -> Maybe Text)
-> (TestType -> Maybe Text -> TestType)
-> Lens TestType TestType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestType' {Maybe Text
typeName :: Maybe Text
$sel:typeName:TestType' :: TestType -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: TestType
s@TestType' {} Maybe Text
a -> TestType
s {$sel:typeName:TestType' :: Maybe Text
typeName = Maybe Text
a} :: TestType)

-- | The Amazon Resource Number (ARN) of the extension.
--
-- Conditional: You must specify @Arn@, or @TypeName@ and @Type@.
testType_arn :: Lens.Lens' TestType (Prelude.Maybe Prelude.Text)
testType_arn :: (Maybe Text -> f (Maybe Text)) -> TestType -> f TestType
testType_arn = (TestType -> Maybe Text)
-> (TestType -> Maybe Text -> TestType)
-> Lens TestType TestType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestType' {Maybe Text
arn :: Maybe Text
$sel:arn:TestType' :: TestType -> Maybe Text
arn} -> Maybe Text
arn) (\s :: TestType
s@TestType' {} Maybe Text
a -> TestType
s {$sel:arn:TestType' :: Maybe Text
arn = Maybe Text
a} :: TestType)

-- | The S3 bucket to which CloudFormation delivers the contract test
-- execution logs.
--
-- CloudFormation delivers the logs by the time contract testing has
-- completed and the extension has been assigned a test type status of
-- @PASSED@ or @FAILED@.
--
-- The user calling @TestType@ must be able to access items in the
-- specified S3 bucket. Specifically, the user needs the following
-- permissions:
--
-- -   GetObject
--
-- -   PutObject
--
-- For more information, see
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3.html Actions, Resources, and Condition Keys for Amazon S3>
-- in the /Amazon Web Services Identity and Access Management User Guide/.
testType_logDeliveryBucket :: Lens.Lens' TestType (Prelude.Maybe Prelude.Text)
testType_logDeliveryBucket :: (Maybe Text -> f (Maybe Text)) -> TestType -> f TestType
testType_logDeliveryBucket = (TestType -> Maybe Text)
-> (TestType -> Maybe Text -> TestType)
-> Lens TestType TestType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestType' {Maybe Text
logDeliveryBucket :: Maybe Text
$sel:logDeliveryBucket:TestType' :: TestType -> Maybe Text
logDeliveryBucket} -> Maybe Text
logDeliveryBucket) (\s :: TestType
s@TestType' {} Maybe Text
a -> TestType
s {$sel:logDeliveryBucket:TestType' :: Maybe Text
logDeliveryBucket = Maybe Text
a} :: TestType)

-- | The type of the extension to test.
--
-- Conditional: You must specify @Arn@, or @TypeName@ and @Type@.
testType_type :: Lens.Lens' TestType (Prelude.Maybe ThirdPartyType)
testType_type :: (Maybe ThirdPartyType -> f (Maybe ThirdPartyType))
-> TestType -> f TestType
testType_type = (TestType -> Maybe ThirdPartyType)
-> (TestType -> Maybe ThirdPartyType -> TestType)
-> Lens
     TestType TestType (Maybe ThirdPartyType) (Maybe ThirdPartyType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestType' {Maybe ThirdPartyType
type' :: Maybe ThirdPartyType
$sel:type':TestType' :: TestType -> Maybe ThirdPartyType
type'} -> Maybe ThirdPartyType
type') (\s :: TestType
s@TestType' {} Maybe ThirdPartyType
a -> TestType
s {$sel:type':TestType' :: Maybe ThirdPartyType
type' = Maybe ThirdPartyType
a} :: TestType)

instance Core.AWSRequest TestType where
  type AWSResponse TestType = TestTypeResponse
  request :: TestType -> Request TestType
request = Service -> TestType -> Request TestType
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy TestType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse TestType)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse TestType))
-> Logger
-> Service
-> Proxy TestType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse TestType)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"TestTypeResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Int -> TestTypeResponse
TestTypeResponse'
            (Maybe Text -> Int -> TestTypeResponse)
-> Either String (Maybe Text)
-> Either String (Int -> TestTypeResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TypeVersionArn")
            Either String (Int -> TestTypeResponse)
-> Either String Int -> Either String TestTypeResponse
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 TestType

instance Prelude.NFData TestType

instance Core.ToHeaders TestType where
  toHeaders :: TestType -> ResponseHeaders
toHeaders = ResponseHeaders -> TestType -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery TestType where
  toQuery :: TestType -> QueryString
toQuery TestType' {Maybe Text
Maybe ThirdPartyType
type' :: Maybe ThirdPartyType
logDeliveryBucket :: Maybe Text
arn :: Maybe Text
typeName :: Maybe Text
versionId :: Maybe Text
$sel:type':TestType' :: TestType -> Maybe ThirdPartyType
$sel:logDeliveryBucket:TestType' :: TestType -> Maybe Text
$sel:arn:TestType' :: TestType -> Maybe Text
$sel:typeName:TestType' :: TestType -> Maybe Text
$sel:versionId:TestType' :: TestType -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action" ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"TestType" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"VersionId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
versionId,
        ByteString
"TypeName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
typeName,
        ByteString
"Arn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
arn,
        ByteString
"LogDeliveryBucket" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
logDeliveryBucket,
        ByteString
"Type" ByteString -> Maybe ThirdPartyType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ThirdPartyType
type'
      ]

-- | /See:/ 'newTestTypeResponse' smart constructor.
data TestTypeResponse = TestTypeResponse'
  { -- | The Amazon Resource Number (ARN) of the extension.
    TestTypeResponse -> Maybe Text
typeVersionArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    TestTypeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (TestTypeResponse -> TestTypeResponse -> Bool
(TestTypeResponse -> TestTypeResponse -> Bool)
-> (TestTypeResponse -> TestTypeResponse -> Bool)
-> Eq TestTypeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TestTypeResponse -> TestTypeResponse -> Bool
$c/= :: TestTypeResponse -> TestTypeResponse -> Bool
== :: TestTypeResponse -> TestTypeResponse -> Bool
$c== :: TestTypeResponse -> TestTypeResponse -> Bool
Prelude.Eq, ReadPrec [TestTypeResponse]
ReadPrec TestTypeResponse
Int -> ReadS TestTypeResponse
ReadS [TestTypeResponse]
(Int -> ReadS TestTypeResponse)
-> ReadS [TestTypeResponse]
-> ReadPrec TestTypeResponse
-> ReadPrec [TestTypeResponse]
-> Read TestTypeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TestTypeResponse]
$creadListPrec :: ReadPrec [TestTypeResponse]
readPrec :: ReadPrec TestTypeResponse
$creadPrec :: ReadPrec TestTypeResponse
readList :: ReadS [TestTypeResponse]
$creadList :: ReadS [TestTypeResponse]
readsPrec :: Int -> ReadS TestTypeResponse
$creadsPrec :: Int -> ReadS TestTypeResponse
Prelude.Read, Int -> TestTypeResponse -> ShowS
[TestTypeResponse] -> ShowS
TestTypeResponse -> String
(Int -> TestTypeResponse -> ShowS)
-> (TestTypeResponse -> String)
-> ([TestTypeResponse] -> ShowS)
-> Show TestTypeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TestTypeResponse] -> ShowS
$cshowList :: [TestTypeResponse] -> ShowS
show :: TestTypeResponse -> String
$cshow :: TestTypeResponse -> String
showsPrec :: Int -> TestTypeResponse -> ShowS
$cshowsPrec :: Int -> TestTypeResponse -> ShowS
Prelude.Show, (forall x. TestTypeResponse -> Rep TestTypeResponse x)
-> (forall x. Rep TestTypeResponse x -> TestTypeResponse)
-> Generic TestTypeResponse
forall x. Rep TestTypeResponse x -> TestTypeResponse
forall x. TestTypeResponse -> Rep TestTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TestTypeResponse x -> TestTypeResponse
$cfrom :: forall x. TestTypeResponse -> Rep TestTypeResponse x
Prelude.Generic)

-- |
-- Create a value of 'TestTypeResponse' 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:
--
-- 'typeVersionArn', 'testTypeResponse_typeVersionArn' - The Amazon Resource Number (ARN) of the extension.
--
-- 'httpStatus', 'testTypeResponse_httpStatus' - The response's http status code.
newTestTypeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  TestTypeResponse
newTestTypeResponse :: Int -> TestTypeResponse
newTestTypeResponse Int
pHttpStatus_ =
  TestTypeResponse' :: Maybe Text -> Int -> TestTypeResponse
TestTypeResponse'
    { $sel:typeVersionArn:TestTypeResponse' :: Maybe Text
typeVersionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:TestTypeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Number (ARN) of the extension.
testTypeResponse_typeVersionArn :: Lens.Lens' TestTypeResponse (Prelude.Maybe Prelude.Text)
testTypeResponse_typeVersionArn :: (Maybe Text -> f (Maybe Text))
-> TestTypeResponse -> f TestTypeResponse
testTypeResponse_typeVersionArn = (TestTypeResponse -> Maybe Text)
-> (TestTypeResponse -> Maybe Text -> TestTypeResponse)
-> Lens TestTypeResponse TestTypeResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TestTypeResponse' {Maybe Text
typeVersionArn :: Maybe Text
$sel:typeVersionArn:TestTypeResponse' :: TestTypeResponse -> Maybe Text
typeVersionArn} -> Maybe Text
typeVersionArn) (\s :: TestTypeResponse
s@TestTypeResponse' {} Maybe Text
a -> TestTypeResponse
s {$sel:typeVersionArn:TestTypeResponse' :: Maybe Text
typeVersionArn = Maybe Text
a} :: TestTypeResponse)

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

instance Prelude.NFData TestTypeResponse