{-# 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.IoTDeviceAdvisor.UpdateSuiteDefinition
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a Device Advisor test suite.
module Amazonka.IoTDeviceAdvisor.UpdateSuiteDefinition
  ( -- * Creating a Request
    UpdateSuiteDefinition (..),
    newUpdateSuiteDefinition,

    -- * Request Lenses
    updateSuiteDefinition_suiteDefinitionConfiguration,
    updateSuiteDefinition_suiteDefinitionId,

    -- * Destructuring the Response
    UpdateSuiteDefinitionResponse (..),
    newUpdateSuiteDefinitionResponse,

    -- * Response Lenses
    updateSuiteDefinitionResponse_lastUpdatedAt,
    updateSuiteDefinitionResponse_createdAt,
    updateSuiteDefinitionResponse_suiteDefinitionArn,
    updateSuiteDefinitionResponse_suiteDefinitionId,
    updateSuiteDefinitionResponse_suiteDefinitionVersion,
    updateSuiteDefinitionResponse_suiteDefinitionName,
    updateSuiteDefinitionResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoTDeviceAdvisor.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:/ 'newUpdateSuiteDefinition' smart constructor.
data UpdateSuiteDefinition = UpdateSuiteDefinition'
  { -- | Updates a Device Advisor test suite with suite definition configuration.
    UpdateSuiteDefinition -> Maybe SuiteDefinitionConfiguration
suiteDefinitionConfiguration :: Prelude.Maybe SuiteDefinitionConfiguration,
    -- | Suite definition Id of the test suite to be updated.
    UpdateSuiteDefinition -> Text
suiteDefinitionId :: Prelude.Text
  }
  deriving (UpdateSuiteDefinition -> UpdateSuiteDefinition -> Bool
(UpdateSuiteDefinition -> UpdateSuiteDefinition -> Bool)
-> (UpdateSuiteDefinition -> UpdateSuiteDefinition -> Bool)
-> Eq UpdateSuiteDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSuiteDefinition -> UpdateSuiteDefinition -> Bool
$c/= :: UpdateSuiteDefinition -> UpdateSuiteDefinition -> Bool
== :: UpdateSuiteDefinition -> UpdateSuiteDefinition -> Bool
$c== :: UpdateSuiteDefinition -> UpdateSuiteDefinition -> Bool
Prelude.Eq, ReadPrec [UpdateSuiteDefinition]
ReadPrec UpdateSuiteDefinition
Int -> ReadS UpdateSuiteDefinition
ReadS [UpdateSuiteDefinition]
(Int -> ReadS UpdateSuiteDefinition)
-> ReadS [UpdateSuiteDefinition]
-> ReadPrec UpdateSuiteDefinition
-> ReadPrec [UpdateSuiteDefinition]
-> Read UpdateSuiteDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSuiteDefinition]
$creadListPrec :: ReadPrec [UpdateSuiteDefinition]
readPrec :: ReadPrec UpdateSuiteDefinition
$creadPrec :: ReadPrec UpdateSuiteDefinition
readList :: ReadS [UpdateSuiteDefinition]
$creadList :: ReadS [UpdateSuiteDefinition]
readsPrec :: Int -> ReadS UpdateSuiteDefinition
$creadsPrec :: Int -> ReadS UpdateSuiteDefinition
Prelude.Read, Int -> UpdateSuiteDefinition -> ShowS
[UpdateSuiteDefinition] -> ShowS
UpdateSuiteDefinition -> String
(Int -> UpdateSuiteDefinition -> ShowS)
-> (UpdateSuiteDefinition -> String)
-> ([UpdateSuiteDefinition] -> ShowS)
-> Show UpdateSuiteDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSuiteDefinition] -> ShowS
$cshowList :: [UpdateSuiteDefinition] -> ShowS
show :: UpdateSuiteDefinition -> String
$cshow :: UpdateSuiteDefinition -> String
showsPrec :: Int -> UpdateSuiteDefinition -> ShowS
$cshowsPrec :: Int -> UpdateSuiteDefinition -> ShowS
Prelude.Show, (forall x. UpdateSuiteDefinition -> Rep UpdateSuiteDefinition x)
-> (forall x. Rep UpdateSuiteDefinition x -> UpdateSuiteDefinition)
-> Generic UpdateSuiteDefinition
forall x. Rep UpdateSuiteDefinition x -> UpdateSuiteDefinition
forall x. UpdateSuiteDefinition -> Rep UpdateSuiteDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateSuiteDefinition x -> UpdateSuiteDefinition
$cfrom :: forall x. UpdateSuiteDefinition -> Rep UpdateSuiteDefinition x
Prelude.Generic)

-- |
-- Create a value of 'UpdateSuiteDefinition' 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:
--
-- 'suiteDefinitionConfiguration', 'updateSuiteDefinition_suiteDefinitionConfiguration' - Updates a Device Advisor test suite with suite definition configuration.
--
-- 'suiteDefinitionId', 'updateSuiteDefinition_suiteDefinitionId' - Suite definition Id of the test suite to be updated.
newUpdateSuiteDefinition ::
  -- | 'suiteDefinitionId'
  Prelude.Text ->
  UpdateSuiteDefinition
newUpdateSuiteDefinition :: Text -> UpdateSuiteDefinition
newUpdateSuiteDefinition Text
pSuiteDefinitionId_ =
  UpdateSuiteDefinition' :: Maybe SuiteDefinitionConfiguration -> Text -> UpdateSuiteDefinition
UpdateSuiteDefinition'
    { $sel:suiteDefinitionConfiguration:UpdateSuiteDefinition' :: Maybe SuiteDefinitionConfiguration
suiteDefinitionConfiguration =
        Maybe SuiteDefinitionConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:suiteDefinitionId:UpdateSuiteDefinition' :: Text
suiteDefinitionId = Text
pSuiteDefinitionId_
    }

-- | Updates a Device Advisor test suite with suite definition configuration.
updateSuiteDefinition_suiteDefinitionConfiguration :: Lens.Lens' UpdateSuiteDefinition (Prelude.Maybe SuiteDefinitionConfiguration)
updateSuiteDefinition_suiteDefinitionConfiguration :: (Maybe SuiteDefinitionConfiguration
 -> f (Maybe SuiteDefinitionConfiguration))
-> UpdateSuiteDefinition -> f UpdateSuiteDefinition
updateSuiteDefinition_suiteDefinitionConfiguration = (UpdateSuiteDefinition -> Maybe SuiteDefinitionConfiguration)
-> (UpdateSuiteDefinition
    -> Maybe SuiteDefinitionConfiguration -> UpdateSuiteDefinition)
-> Lens
     UpdateSuiteDefinition
     UpdateSuiteDefinition
     (Maybe SuiteDefinitionConfiguration)
     (Maybe SuiteDefinitionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSuiteDefinition' {Maybe SuiteDefinitionConfiguration
suiteDefinitionConfiguration :: Maybe SuiteDefinitionConfiguration
$sel:suiteDefinitionConfiguration:UpdateSuiteDefinition' :: UpdateSuiteDefinition -> Maybe SuiteDefinitionConfiguration
suiteDefinitionConfiguration} -> Maybe SuiteDefinitionConfiguration
suiteDefinitionConfiguration) (\s :: UpdateSuiteDefinition
s@UpdateSuiteDefinition' {} Maybe SuiteDefinitionConfiguration
a -> UpdateSuiteDefinition
s {$sel:suiteDefinitionConfiguration:UpdateSuiteDefinition' :: Maybe SuiteDefinitionConfiguration
suiteDefinitionConfiguration = Maybe SuiteDefinitionConfiguration
a} :: UpdateSuiteDefinition)

-- | Suite definition Id of the test suite to be updated.
updateSuiteDefinition_suiteDefinitionId :: Lens.Lens' UpdateSuiteDefinition Prelude.Text
updateSuiteDefinition_suiteDefinitionId :: (Text -> f Text)
-> UpdateSuiteDefinition -> f UpdateSuiteDefinition
updateSuiteDefinition_suiteDefinitionId = (UpdateSuiteDefinition -> Text)
-> (UpdateSuiteDefinition -> Text -> UpdateSuiteDefinition)
-> Lens UpdateSuiteDefinition UpdateSuiteDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSuiteDefinition' {Text
suiteDefinitionId :: Text
$sel:suiteDefinitionId:UpdateSuiteDefinition' :: UpdateSuiteDefinition -> Text
suiteDefinitionId} -> Text
suiteDefinitionId) (\s :: UpdateSuiteDefinition
s@UpdateSuiteDefinition' {} Text
a -> UpdateSuiteDefinition
s {$sel:suiteDefinitionId:UpdateSuiteDefinition' :: Text
suiteDefinitionId = Text
a} :: UpdateSuiteDefinition)

instance Core.AWSRequest UpdateSuiteDefinition where
  type
    AWSResponse UpdateSuiteDefinition =
      UpdateSuiteDefinitionResponse
  request :: UpdateSuiteDefinition -> Request UpdateSuiteDefinition
request = Service -> UpdateSuiteDefinition -> Request UpdateSuiteDefinition
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateSuiteDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateSuiteDefinition)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateSuiteDefinition))
-> Logger
-> Service
-> Proxy UpdateSuiteDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateSuiteDefinition)))
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 POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateSuiteDefinitionResponse
UpdateSuiteDefinitionResponse'
            (Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> UpdateSuiteDefinitionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateSuiteDefinitionResponse)
forall (f :: * -> *) a b. Functor 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
"lastUpdatedAt")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateSuiteDefinitionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateSuiteDefinitionResponse)
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
"createdAt")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateSuiteDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateSuiteDefinitionResponse)
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
"suiteDefinitionArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateSuiteDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe Text -> Int -> UpdateSuiteDefinitionResponse)
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
"suiteDefinitionId")
            Either
  String
  (Maybe Text -> Maybe Text -> Int -> UpdateSuiteDefinitionResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> UpdateSuiteDefinitionResponse)
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
"suiteDefinitionVersion")
            Either String (Maybe Text -> Int -> UpdateSuiteDefinitionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateSuiteDefinitionResponse)
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
"suiteDefinitionName")
            Either String (Int -> UpdateSuiteDefinitionResponse)
-> Either String Int -> Either String UpdateSuiteDefinitionResponse
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 UpdateSuiteDefinition

instance Prelude.NFData UpdateSuiteDefinition

instance Core.ToHeaders UpdateSuiteDefinition where
  toHeaders :: UpdateSuiteDefinition -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateSuiteDefinition -> 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.ToJSON UpdateSuiteDefinition where
  toJSON :: UpdateSuiteDefinition -> Value
toJSON UpdateSuiteDefinition' {Maybe SuiteDefinitionConfiguration
Text
suiteDefinitionId :: Text
suiteDefinitionConfiguration :: Maybe SuiteDefinitionConfiguration
$sel:suiteDefinitionId:UpdateSuiteDefinition' :: UpdateSuiteDefinition -> Text
$sel:suiteDefinitionConfiguration:UpdateSuiteDefinition' :: UpdateSuiteDefinition -> Maybe SuiteDefinitionConfiguration
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"suiteDefinitionConfiguration" Text -> SuiteDefinitionConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SuiteDefinitionConfiguration -> Pair)
-> Maybe SuiteDefinitionConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SuiteDefinitionConfiguration
suiteDefinitionConfiguration
          ]
      )

instance Core.ToPath UpdateSuiteDefinition where
  toPath :: UpdateSuiteDefinition -> ByteString
toPath UpdateSuiteDefinition' {Maybe SuiteDefinitionConfiguration
Text
suiteDefinitionId :: Text
suiteDefinitionConfiguration :: Maybe SuiteDefinitionConfiguration
$sel:suiteDefinitionId:UpdateSuiteDefinition' :: UpdateSuiteDefinition -> Text
$sel:suiteDefinitionConfiguration:UpdateSuiteDefinition' :: UpdateSuiteDefinition -> Maybe SuiteDefinitionConfiguration
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/suiteDefinitions/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
suiteDefinitionId]

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

-- | /See:/ 'newUpdateSuiteDefinitionResponse' smart constructor.
data UpdateSuiteDefinitionResponse = UpdateSuiteDefinitionResponse'
  { -- | Timestamp of when the test suite was updated.
    UpdateSuiteDefinitionResponse -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | Timestamp of when the test suite was created.
    UpdateSuiteDefinitionResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | Amazon Resource name of the updated test suite.
    UpdateSuiteDefinitionResponse -> Maybe Text
suiteDefinitionArn :: Prelude.Maybe Prelude.Text,
    -- | Suite definition Id of the updated test suite.
    UpdateSuiteDefinitionResponse -> Maybe Text
suiteDefinitionId :: Prelude.Maybe Prelude.Text,
    -- | Suite definition version of the updated test suite.
    UpdateSuiteDefinitionResponse -> Maybe Text
suiteDefinitionVersion :: Prelude.Maybe Prelude.Text,
    -- | Suite definition name of the updated test suite.
    UpdateSuiteDefinitionResponse -> Maybe Text
suiteDefinitionName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateSuiteDefinitionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateSuiteDefinitionResponse
-> UpdateSuiteDefinitionResponse -> Bool
(UpdateSuiteDefinitionResponse
 -> UpdateSuiteDefinitionResponse -> Bool)
-> (UpdateSuiteDefinitionResponse
    -> UpdateSuiteDefinitionResponse -> Bool)
-> Eq UpdateSuiteDefinitionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSuiteDefinitionResponse
-> UpdateSuiteDefinitionResponse -> Bool
$c/= :: UpdateSuiteDefinitionResponse
-> UpdateSuiteDefinitionResponse -> Bool
== :: UpdateSuiteDefinitionResponse
-> UpdateSuiteDefinitionResponse -> Bool
$c== :: UpdateSuiteDefinitionResponse
-> UpdateSuiteDefinitionResponse -> Bool
Prelude.Eq, ReadPrec [UpdateSuiteDefinitionResponse]
ReadPrec UpdateSuiteDefinitionResponse
Int -> ReadS UpdateSuiteDefinitionResponse
ReadS [UpdateSuiteDefinitionResponse]
(Int -> ReadS UpdateSuiteDefinitionResponse)
-> ReadS [UpdateSuiteDefinitionResponse]
-> ReadPrec UpdateSuiteDefinitionResponse
-> ReadPrec [UpdateSuiteDefinitionResponse]
-> Read UpdateSuiteDefinitionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSuiteDefinitionResponse]
$creadListPrec :: ReadPrec [UpdateSuiteDefinitionResponse]
readPrec :: ReadPrec UpdateSuiteDefinitionResponse
$creadPrec :: ReadPrec UpdateSuiteDefinitionResponse
readList :: ReadS [UpdateSuiteDefinitionResponse]
$creadList :: ReadS [UpdateSuiteDefinitionResponse]
readsPrec :: Int -> ReadS UpdateSuiteDefinitionResponse
$creadsPrec :: Int -> ReadS UpdateSuiteDefinitionResponse
Prelude.Read, Int -> UpdateSuiteDefinitionResponse -> ShowS
[UpdateSuiteDefinitionResponse] -> ShowS
UpdateSuiteDefinitionResponse -> String
(Int -> UpdateSuiteDefinitionResponse -> ShowS)
-> (UpdateSuiteDefinitionResponse -> String)
-> ([UpdateSuiteDefinitionResponse] -> ShowS)
-> Show UpdateSuiteDefinitionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSuiteDefinitionResponse] -> ShowS
$cshowList :: [UpdateSuiteDefinitionResponse] -> ShowS
show :: UpdateSuiteDefinitionResponse -> String
$cshow :: UpdateSuiteDefinitionResponse -> String
showsPrec :: Int -> UpdateSuiteDefinitionResponse -> ShowS
$cshowsPrec :: Int -> UpdateSuiteDefinitionResponse -> ShowS
Prelude.Show, (forall x.
 UpdateSuiteDefinitionResponse
 -> Rep UpdateSuiteDefinitionResponse x)
-> (forall x.
    Rep UpdateSuiteDefinitionResponse x
    -> UpdateSuiteDefinitionResponse)
-> Generic UpdateSuiteDefinitionResponse
forall x.
Rep UpdateSuiteDefinitionResponse x
-> UpdateSuiteDefinitionResponse
forall x.
UpdateSuiteDefinitionResponse
-> Rep UpdateSuiteDefinitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateSuiteDefinitionResponse x
-> UpdateSuiteDefinitionResponse
$cfrom :: forall x.
UpdateSuiteDefinitionResponse
-> Rep UpdateSuiteDefinitionResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateSuiteDefinitionResponse' 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:
--
-- 'lastUpdatedAt', 'updateSuiteDefinitionResponse_lastUpdatedAt' - Timestamp of when the test suite was updated.
--
-- 'createdAt', 'updateSuiteDefinitionResponse_createdAt' - Timestamp of when the test suite was created.
--
-- 'suiteDefinitionArn', 'updateSuiteDefinitionResponse_suiteDefinitionArn' - Amazon Resource name of the updated test suite.
--
-- 'suiteDefinitionId', 'updateSuiteDefinitionResponse_suiteDefinitionId' - Suite definition Id of the updated test suite.
--
-- 'suiteDefinitionVersion', 'updateSuiteDefinitionResponse_suiteDefinitionVersion' - Suite definition version of the updated test suite.
--
-- 'suiteDefinitionName', 'updateSuiteDefinitionResponse_suiteDefinitionName' - Suite definition name of the updated test suite.
--
-- 'httpStatus', 'updateSuiteDefinitionResponse_httpStatus' - The response's http status code.
newUpdateSuiteDefinitionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateSuiteDefinitionResponse
newUpdateSuiteDefinitionResponse :: Int -> UpdateSuiteDefinitionResponse
newUpdateSuiteDefinitionResponse Int
pHttpStatus_ =
  UpdateSuiteDefinitionResponse' :: Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateSuiteDefinitionResponse
UpdateSuiteDefinitionResponse'
    { $sel:lastUpdatedAt:UpdateSuiteDefinitionResponse' :: Maybe POSIX
lastUpdatedAt =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:UpdateSuiteDefinitionResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:suiteDefinitionArn:UpdateSuiteDefinitionResponse' :: Maybe Text
suiteDefinitionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:suiteDefinitionId:UpdateSuiteDefinitionResponse' :: Maybe Text
suiteDefinitionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:suiteDefinitionVersion:UpdateSuiteDefinitionResponse' :: Maybe Text
suiteDefinitionVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:suiteDefinitionName:UpdateSuiteDefinitionResponse' :: Maybe Text
suiteDefinitionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateSuiteDefinitionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Timestamp of when the test suite was updated.
updateSuiteDefinitionResponse_lastUpdatedAt :: Lens.Lens' UpdateSuiteDefinitionResponse (Prelude.Maybe Prelude.UTCTime)
updateSuiteDefinitionResponse_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateSuiteDefinitionResponse -> f UpdateSuiteDefinitionResponse
updateSuiteDefinitionResponse_lastUpdatedAt = (UpdateSuiteDefinitionResponse -> Maybe POSIX)
-> (UpdateSuiteDefinitionResponse
    -> Maybe POSIX -> UpdateSuiteDefinitionResponse)
-> Lens
     UpdateSuiteDefinitionResponse
     UpdateSuiteDefinitionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSuiteDefinitionResponse' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:UpdateSuiteDefinitionResponse' :: UpdateSuiteDefinitionResponse -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: UpdateSuiteDefinitionResponse
s@UpdateSuiteDefinitionResponse' {} Maybe POSIX
a -> UpdateSuiteDefinitionResponse
s {$sel:lastUpdatedAt:UpdateSuiteDefinitionResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: UpdateSuiteDefinitionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateSuiteDefinitionResponse
 -> f UpdateSuiteDefinitionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateSuiteDefinitionResponse
-> f UpdateSuiteDefinitionResponse
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

-- | Timestamp of when the test suite was created.
updateSuiteDefinitionResponse_createdAt :: Lens.Lens' UpdateSuiteDefinitionResponse (Prelude.Maybe Prelude.UTCTime)
updateSuiteDefinitionResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateSuiteDefinitionResponse -> f UpdateSuiteDefinitionResponse
updateSuiteDefinitionResponse_createdAt = (UpdateSuiteDefinitionResponse -> Maybe POSIX)
-> (UpdateSuiteDefinitionResponse
    -> Maybe POSIX -> UpdateSuiteDefinitionResponse)
-> Lens
     UpdateSuiteDefinitionResponse
     UpdateSuiteDefinitionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSuiteDefinitionResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:UpdateSuiteDefinitionResponse' :: UpdateSuiteDefinitionResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: UpdateSuiteDefinitionResponse
s@UpdateSuiteDefinitionResponse' {} Maybe POSIX
a -> UpdateSuiteDefinitionResponse
s {$sel:createdAt:UpdateSuiteDefinitionResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: UpdateSuiteDefinitionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateSuiteDefinitionResponse
 -> f UpdateSuiteDefinitionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateSuiteDefinitionResponse
-> f UpdateSuiteDefinitionResponse
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

-- | Amazon Resource name of the updated test suite.
updateSuiteDefinitionResponse_suiteDefinitionArn :: Lens.Lens' UpdateSuiteDefinitionResponse (Prelude.Maybe Prelude.Text)
updateSuiteDefinitionResponse_suiteDefinitionArn :: (Maybe Text -> f (Maybe Text))
-> UpdateSuiteDefinitionResponse -> f UpdateSuiteDefinitionResponse
updateSuiteDefinitionResponse_suiteDefinitionArn = (UpdateSuiteDefinitionResponse -> Maybe Text)
-> (UpdateSuiteDefinitionResponse
    -> Maybe Text -> UpdateSuiteDefinitionResponse)
-> Lens
     UpdateSuiteDefinitionResponse
     UpdateSuiteDefinitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSuiteDefinitionResponse' {Maybe Text
suiteDefinitionArn :: Maybe Text
$sel:suiteDefinitionArn:UpdateSuiteDefinitionResponse' :: UpdateSuiteDefinitionResponse -> Maybe Text
suiteDefinitionArn} -> Maybe Text
suiteDefinitionArn) (\s :: UpdateSuiteDefinitionResponse
s@UpdateSuiteDefinitionResponse' {} Maybe Text
a -> UpdateSuiteDefinitionResponse
s {$sel:suiteDefinitionArn:UpdateSuiteDefinitionResponse' :: Maybe Text
suiteDefinitionArn = Maybe Text
a} :: UpdateSuiteDefinitionResponse)

-- | Suite definition Id of the updated test suite.
updateSuiteDefinitionResponse_suiteDefinitionId :: Lens.Lens' UpdateSuiteDefinitionResponse (Prelude.Maybe Prelude.Text)
updateSuiteDefinitionResponse_suiteDefinitionId :: (Maybe Text -> f (Maybe Text))
-> UpdateSuiteDefinitionResponse -> f UpdateSuiteDefinitionResponse
updateSuiteDefinitionResponse_suiteDefinitionId = (UpdateSuiteDefinitionResponse -> Maybe Text)
-> (UpdateSuiteDefinitionResponse
    -> Maybe Text -> UpdateSuiteDefinitionResponse)
-> Lens
     UpdateSuiteDefinitionResponse
     UpdateSuiteDefinitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSuiteDefinitionResponse' {Maybe Text
suiteDefinitionId :: Maybe Text
$sel:suiteDefinitionId:UpdateSuiteDefinitionResponse' :: UpdateSuiteDefinitionResponse -> Maybe Text
suiteDefinitionId} -> Maybe Text
suiteDefinitionId) (\s :: UpdateSuiteDefinitionResponse
s@UpdateSuiteDefinitionResponse' {} Maybe Text
a -> UpdateSuiteDefinitionResponse
s {$sel:suiteDefinitionId:UpdateSuiteDefinitionResponse' :: Maybe Text
suiteDefinitionId = Maybe Text
a} :: UpdateSuiteDefinitionResponse)

-- | Suite definition version of the updated test suite.
updateSuiteDefinitionResponse_suiteDefinitionVersion :: Lens.Lens' UpdateSuiteDefinitionResponse (Prelude.Maybe Prelude.Text)
updateSuiteDefinitionResponse_suiteDefinitionVersion :: (Maybe Text -> f (Maybe Text))
-> UpdateSuiteDefinitionResponse -> f UpdateSuiteDefinitionResponse
updateSuiteDefinitionResponse_suiteDefinitionVersion = (UpdateSuiteDefinitionResponse -> Maybe Text)
-> (UpdateSuiteDefinitionResponse
    -> Maybe Text -> UpdateSuiteDefinitionResponse)
-> Lens
     UpdateSuiteDefinitionResponse
     UpdateSuiteDefinitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSuiteDefinitionResponse' {Maybe Text
suiteDefinitionVersion :: Maybe Text
$sel:suiteDefinitionVersion:UpdateSuiteDefinitionResponse' :: UpdateSuiteDefinitionResponse -> Maybe Text
suiteDefinitionVersion} -> Maybe Text
suiteDefinitionVersion) (\s :: UpdateSuiteDefinitionResponse
s@UpdateSuiteDefinitionResponse' {} Maybe Text
a -> UpdateSuiteDefinitionResponse
s {$sel:suiteDefinitionVersion:UpdateSuiteDefinitionResponse' :: Maybe Text
suiteDefinitionVersion = Maybe Text
a} :: UpdateSuiteDefinitionResponse)

-- | Suite definition name of the updated test suite.
updateSuiteDefinitionResponse_suiteDefinitionName :: Lens.Lens' UpdateSuiteDefinitionResponse (Prelude.Maybe Prelude.Text)
updateSuiteDefinitionResponse_suiteDefinitionName :: (Maybe Text -> f (Maybe Text))
-> UpdateSuiteDefinitionResponse -> f UpdateSuiteDefinitionResponse
updateSuiteDefinitionResponse_suiteDefinitionName = (UpdateSuiteDefinitionResponse -> Maybe Text)
-> (UpdateSuiteDefinitionResponse
    -> Maybe Text -> UpdateSuiteDefinitionResponse)
-> Lens
     UpdateSuiteDefinitionResponse
     UpdateSuiteDefinitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSuiteDefinitionResponse' {Maybe Text
suiteDefinitionName :: Maybe Text
$sel:suiteDefinitionName:UpdateSuiteDefinitionResponse' :: UpdateSuiteDefinitionResponse -> Maybe Text
suiteDefinitionName} -> Maybe Text
suiteDefinitionName) (\s :: UpdateSuiteDefinitionResponse
s@UpdateSuiteDefinitionResponse' {} Maybe Text
a -> UpdateSuiteDefinitionResponse
s {$sel:suiteDefinitionName:UpdateSuiteDefinitionResponse' :: Maybe Text
suiteDefinitionName = Maybe Text
a} :: UpdateSuiteDefinitionResponse)

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

instance Prelude.NFData UpdateSuiteDefinitionResponse