{-# 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.MarketplaceCatalog.DescribeChangeSet
-- 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)
--
-- Provides information about a given change set.
module Amazonka.MarketplaceCatalog.DescribeChangeSet
  ( -- * Creating a Request
    DescribeChangeSet (..),
    newDescribeChangeSet,

    -- * Request Lenses
    describeChangeSet_catalog,
    describeChangeSet_changeSetId,

    -- * Destructuring the Response
    DescribeChangeSetResponse (..),
    newDescribeChangeSetResponse,

    -- * Response Lenses
    describeChangeSetResponse_status,
    describeChangeSetResponse_startTime,
    describeChangeSetResponse_failureCode,
    describeChangeSetResponse_changeSetName,
    describeChangeSetResponse_failureDescription,
    describeChangeSetResponse_changeSetId,
    describeChangeSetResponse_changeSet,
    describeChangeSetResponse_endTime,
    describeChangeSetResponse_changeSetArn,
    describeChangeSetResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeChangeSet' smart constructor.
data DescribeChangeSet = DescribeChangeSet'
  { -- | Required. The catalog related to the request. Fixed value:
    -- @AWSMarketplace@
    DescribeChangeSet -> Text
catalog :: Prelude.Text,
    -- | Required. The unique identifier for the @StartChangeSet@ request that
    -- you want to describe the details for.
    DescribeChangeSet -> Text
changeSetId :: Prelude.Text
  }
  deriving (DescribeChangeSet -> DescribeChangeSet -> Bool
(DescribeChangeSet -> DescribeChangeSet -> Bool)
-> (DescribeChangeSet -> DescribeChangeSet -> Bool)
-> Eq DescribeChangeSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeChangeSet -> DescribeChangeSet -> Bool
$c/= :: DescribeChangeSet -> DescribeChangeSet -> Bool
== :: DescribeChangeSet -> DescribeChangeSet -> Bool
$c== :: DescribeChangeSet -> DescribeChangeSet -> Bool
Prelude.Eq, ReadPrec [DescribeChangeSet]
ReadPrec DescribeChangeSet
Int -> ReadS DescribeChangeSet
ReadS [DescribeChangeSet]
(Int -> ReadS DescribeChangeSet)
-> ReadS [DescribeChangeSet]
-> ReadPrec DescribeChangeSet
-> ReadPrec [DescribeChangeSet]
-> Read DescribeChangeSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeChangeSet]
$creadListPrec :: ReadPrec [DescribeChangeSet]
readPrec :: ReadPrec DescribeChangeSet
$creadPrec :: ReadPrec DescribeChangeSet
readList :: ReadS [DescribeChangeSet]
$creadList :: ReadS [DescribeChangeSet]
readsPrec :: Int -> ReadS DescribeChangeSet
$creadsPrec :: Int -> ReadS DescribeChangeSet
Prelude.Read, Int -> DescribeChangeSet -> ShowS
[DescribeChangeSet] -> ShowS
DescribeChangeSet -> String
(Int -> DescribeChangeSet -> ShowS)
-> (DescribeChangeSet -> String)
-> ([DescribeChangeSet] -> ShowS)
-> Show DescribeChangeSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeChangeSet] -> ShowS
$cshowList :: [DescribeChangeSet] -> ShowS
show :: DescribeChangeSet -> String
$cshow :: DescribeChangeSet -> String
showsPrec :: Int -> DescribeChangeSet -> ShowS
$cshowsPrec :: Int -> DescribeChangeSet -> ShowS
Prelude.Show, (forall x. DescribeChangeSet -> Rep DescribeChangeSet x)
-> (forall x. Rep DescribeChangeSet x -> DescribeChangeSet)
-> Generic DescribeChangeSet
forall x. Rep DescribeChangeSet x -> DescribeChangeSet
forall x. DescribeChangeSet -> Rep DescribeChangeSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeChangeSet x -> DescribeChangeSet
$cfrom :: forall x. DescribeChangeSet -> Rep DescribeChangeSet x
Prelude.Generic)

-- |
-- Create a value of 'DescribeChangeSet' 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:
--
-- 'catalog', 'describeChangeSet_catalog' - Required. The catalog related to the request. Fixed value:
-- @AWSMarketplace@
--
-- 'changeSetId', 'describeChangeSet_changeSetId' - Required. The unique identifier for the @StartChangeSet@ request that
-- you want to describe the details for.
newDescribeChangeSet ::
  -- | 'catalog'
  Prelude.Text ->
  -- | 'changeSetId'
  Prelude.Text ->
  DescribeChangeSet
newDescribeChangeSet :: Text -> Text -> DescribeChangeSet
newDescribeChangeSet Text
pCatalog_ Text
pChangeSetId_ =
  DescribeChangeSet' :: Text -> Text -> DescribeChangeSet
DescribeChangeSet'
    { $sel:catalog:DescribeChangeSet' :: Text
catalog = Text
pCatalog_,
      $sel:changeSetId:DescribeChangeSet' :: Text
changeSetId = Text
pChangeSetId_
    }

-- | Required. The catalog related to the request. Fixed value:
-- @AWSMarketplace@
describeChangeSet_catalog :: Lens.Lens' DescribeChangeSet Prelude.Text
describeChangeSet_catalog :: (Text -> f Text) -> DescribeChangeSet -> f DescribeChangeSet
describeChangeSet_catalog = (DescribeChangeSet -> Text)
-> (DescribeChangeSet -> Text -> DescribeChangeSet)
-> Lens DescribeChangeSet DescribeChangeSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSet' {Text
catalog :: Text
$sel:catalog:DescribeChangeSet' :: DescribeChangeSet -> Text
catalog} -> Text
catalog) (\s :: DescribeChangeSet
s@DescribeChangeSet' {} Text
a -> DescribeChangeSet
s {$sel:catalog:DescribeChangeSet' :: Text
catalog = Text
a} :: DescribeChangeSet)

-- | Required. The unique identifier for the @StartChangeSet@ request that
-- you want to describe the details for.
describeChangeSet_changeSetId :: Lens.Lens' DescribeChangeSet Prelude.Text
describeChangeSet_changeSetId :: (Text -> f Text) -> DescribeChangeSet -> f DescribeChangeSet
describeChangeSet_changeSetId = (DescribeChangeSet -> Text)
-> (DescribeChangeSet -> Text -> DescribeChangeSet)
-> Lens DescribeChangeSet DescribeChangeSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSet' {Text
changeSetId :: Text
$sel:changeSetId:DescribeChangeSet' :: DescribeChangeSet -> Text
changeSetId} -> Text
changeSetId) (\s :: DescribeChangeSet
s@DescribeChangeSet' {} Text
a -> DescribeChangeSet
s {$sel:changeSetId:DescribeChangeSet' :: Text
changeSetId = Text
a} :: DescribeChangeSet)

instance Core.AWSRequest DescribeChangeSet where
  type
    AWSResponse DescribeChangeSet =
      DescribeChangeSetResponse
  request :: DescribeChangeSet -> Request DescribeChangeSet
request = Service -> DescribeChangeSet -> Request DescribeChangeSet
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeChangeSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeChangeSet)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeChangeSet))
-> Logger
-> Service
-> Proxy DescribeChangeSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeChangeSet)))
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 ChangeStatus
-> Maybe Text
-> Maybe FailureCode
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ChangeSummary]
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeChangeSetResponse
DescribeChangeSetResponse'
            (Maybe ChangeStatus
 -> Maybe Text
 -> Maybe FailureCode
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [ChangeSummary]
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeChangeSetResponse)
-> Either String (Maybe ChangeStatus)
-> Either
     String
     (Maybe Text
      -> Maybe FailureCode
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ChangeSummary]
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeChangeSetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ChangeStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe Text
   -> Maybe FailureCode
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ChangeSummary]
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeChangeSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe FailureCode
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ChangeSummary]
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeChangeSetResponse)
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
"StartTime")
            Either
  String
  (Maybe FailureCode
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ChangeSummary]
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeChangeSetResponse)
-> Either String (Maybe FailureCode)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ChangeSummary]
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeChangeSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe FailureCode)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FailureCode")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ChangeSummary]
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeChangeSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [ChangeSummary]
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeChangeSetResponse)
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
"ChangeSetName")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [ChangeSummary]
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeChangeSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [ChangeSummary]
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeChangeSetResponse)
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
"FailureDescription")
            Either
  String
  (Maybe Text
   -> Maybe [ChangeSummary]
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeChangeSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ChangeSummary]
      -> Maybe Text -> Maybe Text -> Int -> DescribeChangeSetResponse)
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
"ChangeSetId")
            Either
  String
  (Maybe [ChangeSummary]
   -> Maybe Text -> Maybe Text -> Int -> DescribeChangeSetResponse)
-> Either String (Maybe [ChangeSummary])
-> Either
     String
     (Maybe Text -> Maybe Text -> Int -> DescribeChangeSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [ChangeSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ChangeSet" Either String (Maybe (Maybe [ChangeSummary]))
-> Maybe [ChangeSummary] -> Either String (Maybe [ChangeSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ChangeSummary]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text -> Maybe Text -> Int -> DescribeChangeSetResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> DescribeChangeSetResponse)
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
"EndTime")
            Either String (Maybe Text -> Int -> DescribeChangeSetResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeChangeSetResponse)
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
"ChangeSetArn")
            Either String (Int -> DescribeChangeSetResponse)
-> Either String Int -> Either String DescribeChangeSetResponse
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 DescribeChangeSet

instance Prelude.NFData DescribeChangeSet

instance Core.ToHeaders DescribeChangeSet where
  toHeaders :: DescribeChangeSet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeChangeSet -> 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 DescribeChangeSet where
  toPath :: DescribeChangeSet -> ByteString
toPath = ByteString -> DescribeChangeSet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/DescribeChangeSet"

instance Core.ToQuery DescribeChangeSet where
  toQuery :: DescribeChangeSet -> QueryString
toQuery DescribeChangeSet' {Text
changeSetId :: Text
catalog :: Text
$sel:changeSetId:DescribeChangeSet' :: DescribeChangeSet -> Text
$sel:catalog:DescribeChangeSet' :: DescribeChangeSet -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"catalog" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
catalog,
        ByteString
"changeSetId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
changeSetId
      ]

-- | /See:/ 'newDescribeChangeSetResponse' smart constructor.
data DescribeChangeSetResponse = DescribeChangeSetResponse'
  { -- | The status of the change request.
    DescribeChangeSetResponse -> Maybe ChangeStatus
status :: Prelude.Maybe ChangeStatus,
    -- | The date and time, in ISO 8601 format (2018-02-27T13:45:22Z), the
    -- request started.
    DescribeChangeSetResponse -> Maybe Text
startTime :: Prelude.Maybe Prelude.Text,
    -- | Returned if the change set is in @FAILED@ status. Can be either
    -- @CLIENT_ERROR@, which means that there are issues with the request (see
    -- the @ErrorDetailList@), or @SERVER_FAULT@, which means that there is a
    -- problem in the system, and you should retry your request.
    DescribeChangeSetResponse -> Maybe FailureCode
failureCode :: Prelude.Maybe FailureCode,
    -- | The optional name provided in the @StartChangeSet@ request. If you do
    -- not provide a name, one is set by default.
    DescribeChangeSetResponse -> Maybe Text
changeSetName :: Prelude.Maybe Prelude.Text,
    -- | Returned if there is a failure on the change set, but that failure is
    -- not related to any of the changes in the request.
    DescribeChangeSetResponse -> Maybe Text
failureDescription :: Prelude.Maybe Prelude.Text,
    -- | Required. The unique identifier for the change set referenced in this
    -- request.
    DescribeChangeSetResponse -> Maybe Text
changeSetId :: Prelude.Maybe Prelude.Text,
    -- | An array of @ChangeSummary@ objects.
    DescribeChangeSetResponse -> Maybe [ChangeSummary]
changeSet :: Prelude.Maybe [ChangeSummary],
    -- | The date and time, in ISO 8601 format (2018-02-27T13:45:22Z), the
    -- request transitioned to a terminal state. The change cannot transition
    -- to a different state. Null if the request is not in a terminal state.
    DescribeChangeSetResponse -> Maybe Text
endTime :: Prelude.Maybe Prelude.Text,
    -- | The ARN associated with the unique identifier for the change set
    -- referenced in this request.
    DescribeChangeSetResponse -> Maybe Text
changeSetArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeChangeSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeChangeSetResponse -> DescribeChangeSetResponse -> Bool
(DescribeChangeSetResponse -> DescribeChangeSetResponse -> Bool)
-> (DescribeChangeSetResponse -> DescribeChangeSetResponse -> Bool)
-> Eq DescribeChangeSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeChangeSetResponse -> DescribeChangeSetResponse -> Bool
$c/= :: DescribeChangeSetResponse -> DescribeChangeSetResponse -> Bool
== :: DescribeChangeSetResponse -> DescribeChangeSetResponse -> Bool
$c== :: DescribeChangeSetResponse -> DescribeChangeSetResponse -> Bool
Prelude.Eq, ReadPrec [DescribeChangeSetResponse]
ReadPrec DescribeChangeSetResponse
Int -> ReadS DescribeChangeSetResponse
ReadS [DescribeChangeSetResponse]
(Int -> ReadS DescribeChangeSetResponse)
-> ReadS [DescribeChangeSetResponse]
-> ReadPrec DescribeChangeSetResponse
-> ReadPrec [DescribeChangeSetResponse]
-> Read DescribeChangeSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeChangeSetResponse]
$creadListPrec :: ReadPrec [DescribeChangeSetResponse]
readPrec :: ReadPrec DescribeChangeSetResponse
$creadPrec :: ReadPrec DescribeChangeSetResponse
readList :: ReadS [DescribeChangeSetResponse]
$creadList :: ReadS [DescribeChangeSetResponse]
readsPrec :: Int -> ReadS DescribeChangeSetResponse
$creadsPrec :: Int -> ReadS DescribeChangeSetResponse
Prelude.Read, Int -> DescribeChangeSetResponse -> ShowS
[DescribeChangeSetResponse] -> ShowS
DescribeChangeSetResponse -> String
(Int -> DescribeChangeSetResponse -> ShowS)
-> (DescribeChangeSetResponse -> String)
-> ([DescribeChangeSetResponse] -> ShowS)
-> Show DescribeChangeSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeChangeSetResponse] -> ShowS
$cshowList :: [DescribeChangeSetResponse] -> ShowS
show :: DescribeChangeSetResponse -> String
$cshow :: DescribeChangeSetResponse -> String
showsPrec :: Int -> DescribeChangeSetResponse -> ShowS
$cshowsPrec :: Int -> DescribeChangeSetResponse -> ShowS
Prelude.Show, (forall x.
 DescribeChangeSetResponse -> Rep DescribeChangeSetResponse x)
-> (forall x.
    Rep DescribeChangeSetResponse x -> DescribeChangeSetResponse)
-> Generic DescribeChangeSetResponse
forall x.
Rep DescribeChangeSetResponse x -> DescribeChangeSetResponse
forall x.
DescribeChangeSetResponse -> Rep DescribeChangeSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeChangeSetResponse x -> DescribeChangeSetResponse
$cfrom :: forall x.
DescribeChangeSetResponse -> Rep DescribeChangeSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeChangeSetResponse' 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', 'describeChangeSetResponse_status' - The status of the change request.
--
-- 'startTime', 'describeChangeSetResponse_startTime' - The date and time, in ISO 8601 format (2018-02-27T13:45:22Z), the
-- request started.
--
-- 'failureCode', 'describeChangeSetResponse_failureCode' - Returned if the change set is in @FAILED@ status. Can be either
-- @CLIENT_ERROR@, which means that there are issues with the request (see
-- the @ErrorDetailList@), or @SERVER_FAULT@, which means that there is a
-- problem in the system, and you should retry your request.
--
-- 'changeSetName', 'describeChangeSetResponse_changeSetName' - The optional name provided in the @StartChangeSet@ request. If you do
-- not provide a name, one is set by default.
--
-- 'failureDescription', 'describeChangeSetResponse_failureDescription' - Returned if there is a failure on the change set, but that failure is
-- not related to any of the changes in the request.
--
-- 'changeSetId', 'describeChangeSetResponse_changeSetId' - Required. The unique identifier for the change set referenced in this
-- request.
--
-- 'changeSet', 'describeChangeSetResponse_changeSet' - An array of @ChangeSummary@ objects.
--
-- 'endTime', 'describeChangeSetResponse_endTime' - The date and time, in ISO 8601 format (2018-02-27T13:45:22Z), the
-- request transitioned to a terminal state. The change cannot transition
-- to a different state. Null if the request is not in a terminal state.
--
-- 'changeSetArn', 'describeChangeSetResponse_changeSetArn' - The ARN associated with the unique identifier for the change set
-- referenced in this request.
--
-- 'httpStatus', 'describeChangeSetResponse_httpStatus' - The response's http status code.
newDescribeChangeSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeChangeSetResponse
newDescribeChangeSetResponse :: Int -> DescribeChangeSetResponse
newDescribeChangeSetResponse Int
pHttpStatus_ =
  DescribeChangeSetResponse' :: Maybe ChangeStatus
-> Maybe Text
-> Maybe FailureCode
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ChangeSummary]
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeChangeSetResponse
DescribeChangeSetResponse'
    { $sel:status:DescribeChangeSetResponse' :: Maybe ChangeStatus
status =
        Maybe ChangeStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:DescribeChangeSetResponse' :: Maybe Text
startTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:failureCode:DescribeChangeSetResponse' :: Maybe FailureCode
failureCode = Maybe FailureCode
forall a. Maybe a
Prelude.Nothing,
      $sel:changeSetName:DescribeChangeSetResponse' :: Maybe Text
changeSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:failureDescription:DescribeChangeSetResponse' :: Maybe Text
failureDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:changeSetId:DescribeChangeSetResponse' :: Maybe Text
changeSetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:changeSet:DescribeChangeSetResponse' :: Maybe [ChangeSummary]
changeSet = Maybe [ChangeSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:DescribeChangeSetResponse' :: Maybe Text
endTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:changeSetArn:DescribeChangeSetResponse' :: Maybe Text
changeSetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeChangeSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The status of the change request.
describeChangeSetResponse_status :: Lens.Lens' DescribeChangeSetResponse (Prelude.Maybe ChangeStatus)
describeChangeSetResponse_status :: (Maybe ChangeStatus -> f (Maybe ChangeStatus))
-> DescribeChangeSetResponse -> f DescribeChangeSetResponse
describeChangeSetResponse_status = (DescribeChangeSetResponse -> Maybe ChangeStatus)
-> (DescribeChangeSetResponse
    -> Maybe ChangeStatus -> DescribeChangeSetResponse)
-> Lens
     DescribeChangeSetResponse
     DescribeChangeSetResponse
     (Maybe ChangeStatus)
     (Maybe ChangeStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetResponse' {Maybe ChangeStatus
status :: Maybe ChangeStatus
$sel:status:DescribeChangeSetResponse' :: DescribeChangeSetResponse -> Maybe ChangeStatus
status} -> Maybe ChangeStatus
status) (\s :: DescribeChangeSetResponse
s@DescribeChangeSetResponse' {} Maybe ChangeStatus
a -> DescribeChangeSetResponse
s {$sel:status:DescribeChangeSetResponse' :: Maybe ChangeStatus
status = Maybe ChangeStatus
a} :: DescribeChangeSetResponse)

-- | The date and time, in ISO 8601 format (2018-02-27T13:45:22Z), the
-- request started.
describeChangeSetResponse_startTime :: Lens.Lens' DescribeChangeSetResponse (Prelude.Maybe Prelude.Text)
describeChangeSetResponse_startTime :: (Maybe Text -> f (Maybe Text))
-> DescribeChangeSetResponse -> f DescribeChangeSetResponse
describeChangeSetResponse_startTime = (DescribeChangeSetResponse -> Maybe Text)
-> (DescribeChangeSetResponse
    -> Maybe Text -> DescribeChangeSetResponse)
-> Lens
     DescribeChangeSetResponse
     DescribeChangeSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetResponse' {Maybe Text
startTime :: Maybe Text
$sel:startTime:DescribeChangeSetResponse' :: DescribeChangeSetResponse -> Maybe Text
startTime} -> Maybe Text
startTime) (\s :: DescribeChangeSetResponse
s@DescribeChangeSetResponse' {} Maybe Text
a -> DescribeChangeSetResponse
s {$sel:startTime:DescribeChangeSetResponse' :: Maybe Text
startTime = Maybe Text
a} :: DescribeChangeSetResponse)

-- | Returned if the change set is in @FAILED@ status. Can be either
-- @CLIENT_ERROR@, which means that there are issues with the request (see
-- the @ErrorDetailList@), or @SERVER_FAULT@, which means that there is a
-- problem in the system, and you should retry your request.
describeChangeSetResponse_failureCode :: Lens.Lens' DescribeChangeSetResponse (Prelude.Maybe FailureCode)
describeChangeSetResponse_failureCode :: (Maybe FailureCode -> f (Maybe FailureCode))
-> DescribeChangeSetResponse -> f DescribeChangeSetResponse
describeChangeSetResponse_failureCode = (DescribeChangeSetResponse -> Maybe FailureCode)
-> (DescribeChangeSetResponse
    -> Maybe FailureCode -> DescribeChangeSetResponse)
-> Lens
     DescribeChangeSetResponse
     DescribeChangeSetResponse
     (Maybe FailureCode)
     (Maybe FailureCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetResponse' {Maybe FailureCode
failureCode :: Maybe FailureCode
$sel:failureCode:DescribeChangeSetResponse' :: DescribeChangeSetResponse -> Maybe FailureCode
failureCode} -> Maybe FailureCode
failureCode) (\s :: DescribeChangeSetResponse
s@DescribeChangeSetResponse' {} Maybe FailureCode
a -> DescribeChangeSetResponse
s {$sel:failureCode:DescribeChangeSetResponse' :: Maybe FailureCode
failureCode = Maybe FailureCode
a} :: DescribeChangeSetResponse)

-- | The optional name provided in the @StartChangeSet@ request. If you do
-- not provide a name, one is set by default.
describeChangeSetResponse_changeSetName :: Lens.Lens' DescribeChangeSetResponse (Prelude.Maybe Prelude.Text)
describeChangeSetResponse_changeSetName :: (Maybe Text -> f (Maybe Text))
-> DescribeChangeSetResponse -> f DescribeChangeSetResponse
describeChangeSetResponse_changeSetName = (DescribeChangeSetResponse -> Maybe Text)
-> (DescribeChangeSetResponse
    -> Maybe Text -> DescribeChangeSetResponse)
-> Lens
     DescribeChangeSetResponse
     DescribeChangeSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetResponse' {Maybe Text
changeSetName :: Maybe Text
$sel:changeSetName:DescribeChangeSetResponse' :: DescribeChangeSetResponse -> Maybe Text
changeSetName} -> Maybe Text
changeSetName) (\s :: DescribeChangeSetResponse
s@DescribeChangeSetResponse' {} Maybe Text
a -> DescribeChangeSetResponse
s {$sel:changeSetName:DescribeChangeSetResponse' :: Maybe Text
changeSetName = Maybe Text
a} :: DescribeChangeSetResponse)

-- | Returned if there is a failure on the change set, but that failure is
-- not related to any of the changes in the request.
describeChangeSetResponse_failureDescription :: Lens.Lens' DescribeChangeSetResponse (Prelude.Maybe Prelude.Text)
describeChangeSetResponse_failureDescription :: (Maybe Text -> f (Maybe Text))
-> DescribeChangeSetResponse -> f DescribeChangeSetResponse
describeChangeSetResponse_failureDescription = (DescribeChangeSetResponse -> Maybe Text)
-> (DescribeChangeSetResponse
    -> Maybe Text -> DescribeChangeSetResponse)
-> Lens
     DescribeChangeSetResponse
     DescribeChangeSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetResponse' {Maybe Text
failureDescription :: Maybe Text
$sel:failureDescription:DescribeChangeSetResponse' :: DescribeChangeSetResponse -> Maybe Text
failureDescription} -> Maybe Text
failureDescription) (\s :: DescribeChangeSetResponse
s@DescribeChangeSetResponse' {} Maybe Text
a -> DescribeChangeSetResponse
s {$sel:failureDescription:DescribeChangeSetResponse' :: Maybe Text
failureDescription = Maybe Text
a} :: DescribeChangeSetResponse)

-- | Required. The unique identifier for the change set referenced in this
-- request.
describeChangeSetResponse_changeSetId :: Lens.Lens' DescribeChangeSetResponse (Prelude.Maybe Prelude.Text)
describeChangeSetResponse_changeSetId :: (Maybe Text -> f (Maybe Text))
-> DescribeChangeSetResponse -> f DescribeChangeSetResponse
describeChangeSetResponse_changeSetId = (DescribeChangeSetResponse -> Maybe Text)
-> (DescribeChangeSetResponse
    -> Maybe Text -> DescribeChangeSetResponse)
-> Lens
     DescribeChangeSetResponse
     DescribeChangeSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetResponse' {Maybe Text
changeSetId :: Maybe Text
$sel:changeSetId:DescribeChangeSetResponse' :: DescribeChangeSetResponse -> Maybe Text
changeSetId} -> Maybe Text
changeSetId) (\s :: DescribeChangeSetResponse
s@DescribeChangeSetResponse' {} Maybe Text
a -> DescribeChangeSetResponse
s {$sel:changeSetId:DescribeChangeSetResponse' :: Maybe Text
changeSetId = Maybe Text
a} :: DescribeChangeSetResponse)

-- | An array of @ChangeSummary@ objects.
describeChangeSetResponse_changeSet :: Lens.Lens' DescribeChangeSetResponse (Prelude.Maybe [ChangeSummary])
describeChangeSetResponse_changeSet :: (Maybe [ChangeSummary] -> f (Maybe [ChangeSummary]))
-> DescribeChangeSetResponse -> f DescribeChangeSetResponse
describeChangeSetResponse_changeSet = (DescribeChangeSetResponse -> Maybe [ChangeSummary])
-> (DescribeChangeSetResponse
    -> Maybe [ChangeSummary] -> DescribeChangeSetResponse)
-> Lens
     DescribeChangeSetResponse
     DescribeChangeSetResponse
     (Maybe [ChangeSummary])
     (Maybe [ChangeSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetResponse' {Maybe [ChangeSummary]
changeSet :: Maybe [ChangeSummary]
$sel:changeSet:DescribeChangeSetResponse' :: DescribeChangeSetResponse -> Maybe [ChangeSummary]
changeSet} -> Maybe [ChangeSummary]
changeSet) (\s :: DescribeChangeSetResponse
s@DescribeChangeSetResponse' {} Maybe [ChangeSummary]
a -> DescribeChangeSetResponse
s {$sel:changeSet:DescribeChangeSetResponse' :: Maybe [ChangeSummary]
changeSet = Maybe [ChangeSummary]
a} :: DescribeChangeSetResponse) ((Maybe [ChangeSummary] -> f (Maybe [ChangeSummary]))
 -> DescribeChangeSetResponse -> f DescribeChangeSetResponse)
-> ((Maybe [ChangeSummary] -> f (Maybe [ChangeSummary]))
    -> Maybe [ChangeSummary] -> f (Maybe [ChangeSummary]))
-> (Maybe [ChangeSummary] -> f (Maybe [ChangeSummary]))
-> DescribeChangeSetResponse
-> f DescribeChangeSetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ChangeSummary] [ChangeSummary] [ChangeSummary] [ChangeSummary]
-> Iso
     (Maybe [ChangeSummary])
     (Maybe [ChangeSummary])
     (Maybe [ChangeSummary])
     (Maybe [ChangeSummary])
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
  [ChangeSummary] [ChangeSummary] [ChangeSummary] [ChangeSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The date and time, in ISO 8601 format (2018-02-27T13:45:22Z), the
-- request transitioned to a terminal state. The change cannot transition
-- to a different state. Null if the request is not in a terminal state.
describeChangeSetResponse_endTime :: Lens.Lens' DescribeChangeSetResponse (Prelude.Maybe Prelude.Text)
describeChangeSetResponse_endTime :: (Maybe Text -> f (Maybe Text))
-> DescribeChangeSetResponse -> f DescribeChangeSetResponse
describeChangeSetResponse_endTime = (DescribeChangeSetResponse -> Maybe Text)
-> (DescribeChangeSetResponse
    -> Maybe Text -> DescribeChangeSetResponse)
-> Lens
     DescribeChangeSetResponse
     DescribeChangeSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetResponse' {Maybe Text
endTime :: Maybe Text
$sel:endTime:DescribeChangeSetResponse' :: DescribeChangeSetResponse -> Maybe Text
endTime} -> Maybe Text
endTime) (\s :: DescribeChangeSetResponse
s@DescribeChangeSetResponse' {} Maybe Text
a -> DescribeChangeSetResponse
s {$sel:endTime:DescribeChangeSetResponse' :: Maybe Text
endTime = Maybe Text
a} :: DescribeChangeSetResponse)

-- | The ARN associated with the unique identifier for the change set
-- referenced in this request.
describeChangeSetResponse_changeSetArn :: Lens.Lens' DescribeChangeSetResponse (Prelude.Maybe Prelude.Text)
describeChangeSetResponse_changeSetArn :: (Maybe Text -> f (Maybe Text))
-> DescribeChangeSetResponse -> f DescribeChangeSetResponse
describeChangeSetResponse_changeSetArn = (DescribeChangeSetResponse -> Maybe Text)
-> (DescribeChangeSetResponse
    -> Maybe Text -> DescribeChangeSetResponse)
-> Lens
     DescribeChangeSetResponse
     DescribeChangeSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeChangeSetResponse' {Maybe Text
changeSetArn :: Maybe Text
$sel:changeSetArn:DescribeChangeSetResponse' :: DescribeChangeSetResponse -> Maybe Text
changeSetArn} -> Maybe Text
changeSetArn) (\s :: DescribeChangeSetResponse
s@DescribeChangeSetResponse' {} Maybe Text
a -> DescribeChangeSetResponse
s {$sel:changeSetArn:DescribeChangeSetResponse' :: Maybe Text
changeSetArn = Maybe Text
a} :: DescribeChangeSetResponse)

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

instance Prelude.NFData DescribeChangeSetResponse