{-# 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.StartChangeSet
-- 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)
--
-- This operation allows you to request changes for your entities. Within a
-- single ChangeSet, you cannot start the same change type against the same
-- entity multiple times. Additionally, when a ChangeSet is running, all
-- the entities targeted by the different changes are locked until the
-- ChangeSet has completed (either succeeded, cancelled, or failed). If you
-- try to start a ChangeSet containing a change against an entity that is
-- already locked, you will receive a @ResourceInUseException@.
--
-- For example, you cannot start the ChangeSet described in the
-- <https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/API_StartChangeSet.html#API_StartChangeSet_Examples example>
-- later in this topic, because it contains two changes to execute the same
-- change type (@AddRevisions@) against the same entity (@entity-id\@1)@.
--
-- For more information about working with change sets, see
-- <https://docs.aws.amazon.com/marketplace-catalog/latest/api-reference/welcome.html#working-with-change-sets Working with change sets>.
module Amazonka.MarketplaceCatalog.StartChangeSet
  ( -- * Creating a Request
    StartChangeSet (..),
    newStartChangeSet,

    -- * Request Lenses
    startChangeSet_changeSetName,
    startChangeSet_clientRequestToken,
    startChangeSet_catalog,
    startChangeSet_changeSet,

    -- * Destructuring the Response
    StartChangeSetResponse (..),
    newStartChangeSetResponse,

    -- * Response Lenses
    startChangeSetResponse_changeSetId,
    startChangeSetResponse_changeSetArn,
    startChangeSetResponse_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:/ 'newStartChangeSet' smart constructor.
data StartChangeSet = StartChangeSet'
  { -- | Optional case sensitive string of up to 100 ASCII characters. The change
    -- set name can be used to filter the list of change sets.
    StartChangeSet -> Maybe Text
changeSetName :: Prelude.Maybe Prelude.Text,
    -- | A unique token to identify the request to ensure idempotency.
    StartChangeSet -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The catalog related to the request. Fixed value: @AWSMarketplace@
    StartChangeSet -> Text
catalog :: Prelude.Text,
    -- | Array of @change@ object.
    StartChangeSet -> NonEmpty Change
changeSet :: Prelude.NonEmpty Change
  }
  deriving (StartChangeSet -> StartChangeSet -> Bool
(StartChangeSet -> StartChangeSet -> Bool)
-> (StartChangeSet -> StartChangeSet -> Bool) -> Eq StartChangeSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartChangeSet -> StartChangeSet -> Bool
$c/= :: StartChangeSet -> StartChangeSet -> Bool
== :: StartChangeSet -> StartChangeSet -> Bool
$c== :: StartChangeSet -> StartChangeSet -> Bool
Prelude.Eq, ReadPrec [StartChangeSet]
ReadPrec StartChangeSet
Int -> ReadS StartChangeSet
ReadS [StartChangeSet]
(Int -> ReadS StartChangeSet)
-> ReadS [StartChangeSet]
-> ReadPrec StartChangeSet
-> ReadPrec [StartChangeSet]
-> Read StartChangeSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartChangeSet]
$creadListPrec :: ReadPrec [StartChangeSet]
readPrec :: ReadPrec StartChangeSet
$creadPrec :: ReadPrec StartChangeSet
readList :: ReadS [StartChangeSet]
$creadList :: ReadS [StartChangeSet]
readsPrec :: Int -> ReadS StartChangeSet
$creadsPrec :: Int -> ReadS StartChangeSet
Prelude.Read, Int -> StartChangeSet -> ShowS
[StartChangeSet] -> ShowS
StartChangeSet -> String
(Int -> StartChangeSet -> ShowS)
-> (StartChangeSet -> String)
-> ([StartChangeSet] -> ShowS)
-> Show StartChangeSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartChangeSet] -> ShowS
$cshowList :: [StartChangeSet] -> ShowS
show :: StartChangeSet -> String
$cshow :: StartChangeSet -> String
showsPrec :: Int -> StartChangeSet -> ShowS
$cshowsPrec :: Int -> StartChangeSet -> ShowS
Prelude.Show, (forall x. StartChangeSet -> Rep StartChangeSet x)
-> (forall x. Rep StartChangeSet x -> StartChangeSet)
-> Generic StartChangeSet
forall x. Rep StartChangeSet x -> StartChangeSet
forall x. StartChangeSet -> Rep StartChangeSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartChangeSet x -> StartChangeSet
$cfrom :: forall x. StartChangeSet -> Rep StartChangeSet x
Prelude.Generic)

-- |
-- Create a value of 'StartChangeSet' 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:
--
-- 'changeSetName', 'startChangeSet_changeSetName' - Optional case sensitive string of up to 100 ASCII characters. The change
-- set name can be used to filter the list of change sets.
--
-- 'clientRequestToken', 'startChangeSet_clientRequestToken' - A unique token to identify the request to ensure idempotency.
--
-- 'catalog', 'startChangeSet_catalog' - The catalog related to the request. Fixed value: @AWSMarketplace@
--
-- 'changeSet', 'startChangeSet_changeSet' - Array of @change@ object.
newStartChangeSet ::
  -- | 'catalog'
  Prelude.Text ->
  -- | 'changeSet'
  Prelude.NonEmpty Change ->
  StartChangeSet
newStartChangeSet :: Text -> NonEmpty Change -> StartChangeSet
newStartChangeSet Text
pCatalog_ NonEmpty Change
pChangeSet_ =
  StartChangeSet' :: Maybe Text
-> Maybe Text -> Text -> NonEmpty Change -> StartChangeSet
StartChangeSet'
    { $sel:changeSetName:StartChangeSet' :: Maybe Text
changeSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:StartChangeSet' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:catalog:StartChangeSet' :: Text
catalog = Text
pCatalog_,
      $sel:changeSet:StartChangeSet' :: NonEmpty Change
changeSet = Tagged (NonEmpty Change) (Identity (NonEmpty Change))
-> Tagged (NonEmpty Change) (Identity (NonEmpty Change))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Change) (Identity (NonEmpty Change))
 -> Tagged (NonEmpty Change) (Identity (NonEmpty Change)))
-> NonEmpty Change -> NonEmpty Change
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Change
pChangeSet_
    }

-- | Optional case sensitive string of up to 100 ASCII characters. The change
-- set name can be used to filter the list of change sets.
startChangeSet_changeSetName :: Lens.Lens' StartChangeSet (Prelude.Maybe Prelude.Text)
startChangeSet_changeSetName :: (Maybe Text -> f (Maybe Text))
-> StartChangeSet -> f StartChangeSet
startChangeSet_changeSetName = (StartChangeSet -> Maybe Text)
-> (StartChangeSet -> Maybe Text -> StartChangeSet)
-> Lens StartChangeSet StartChangeSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeSet' {Maybe Text
changeSetName :: Maybe Text
$sel:changeSetName:StartChangeSet' :: StartChangeSet -> Maybe Text
changeSetName} -> Maybe Text
changeSetName) (\s :: StartChangeSet
s@StartChangeSet' {} Maybe Text
a -> StartChangeSet
s {$sel:changeSetName:StartChangeSet' :: Maybe Text
changeSetName = Maybe Text
a} :: StartChangeSet)

-- | A unique token to identify the request to ensure idempotency.
startChangeSet_clientRequestToken :: Lens.Lens' StartChangeSet (Prelude.Maybe Prelude.Text)
startChangeSet_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> StartChangeSet -> f StartChangeSet
startChangeSet_clientRequestToken = (StartChangeSet -> Maybe Text)
-> (StartChangeSet -> Maybe Text -> StartChangeSet)
-> Lens StartChangeSet StartChangeSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeSet' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StartChangeSet' :: StartChangeSet -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StartChangeSet
s@StartChangeSet' {} Maybe Text
a -> StartChangeSet
s {$sel:clientRequestToken:StartChangeSet' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StartChangeSet)

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

-- | Array of @change@ object.
startChangeSet_changeSet :: Lens.Lens' StartChangeSet (Prelude.NonEmpty Change)
startChangeSet_changeSet :: (NonEmpty Change -> f (NonEmpty Change))
-> StartChangeSet -> f StartChangeSet
startChangeSet_changeSet = (StartChangeSet -> NonEmpty Change)
-> (StartChangeSet -> NonEmpty Change -> StartChangeSet)
-> Lens
     StartChangeSet StartChangeSet (NonEmpty Change) (NonEmpty Change)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeSet' {NonEmpty Change
changeSet :: NonEmpty Change
$sel:changeSet:StartChangeSet' :: StartChangeSet -> NonEmpty Change
changeSet} -> NonEmpty Change
changeSet) (\s :: StartChangeSet
s@StartChangeSet' {} NonEmpty Change
a -> StartChangeSet
s {$sel:changeSet:StartChangeSet' :: NonEmpty Change
changeSet = NonEmpty Change
a} :: StartChangeSet) ((NonEmpty Change -> f (NonEmpty Change))
 -> StartChangeSet -> f StartChangeSet)
-> ((NonEmpty Change -> f (NonEmpty Change))
    -> NonEmpty Change -> f (NonEmpty Change))
-> (NonEmpty Change -> f (NonEmpty Change))
-> StartChangeSet
-> f StartChangeSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Change -> f (NonEmpty Change))
-> NonEmpty Change -> f (NonEmpty Change)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest StartChangeSet where
  type
    AWSResponse StartChangeSet =
      StartChangeSetResponse
  request :: StartChangeSet -> Request StartChangeSet
request = Service -> StartChangeSet -> Request StartChangeSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartChangeSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartChangeSet)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartChangeSet))
-> Logger
-> Service
-> Proxy StartChangeSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartChangeSet)))
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 Text -> Maybe Text -> Int -> StartChangeSetResponse
StartChangeSetResponse'
            (Maybe Text -> Maybe Text -> Int -> StartChangeSetResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> StartChangeSetResponse)
forall (f :: * -> *) a b. Functor 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 Text -> Int -> StartChangeSetResponse)
-> Either String (Maybe Text)
-> Either String (Int -> StartChangeSetResponse)
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 -> StartChangeSetResponse)
-> Either String Int -> Either String StartChangeSetResponse
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 StartChangeSet

instance Prelude.NFData StartChangeSet

instance Core.ToHeaders StartChangeSet where
  toHeaders :: StartChangeSet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StartChangeSet -> 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 StartChangeSet where
  toJSON :: StartChangeSet -> Value
toJSON StartChangeSet' {Maybe Text
NonEmpty Change
Text
changeSet :: NonEmpty Change
catalog :: Text
clientRequestToken :: Maybe Text
changeSetName :: Maybe Text
$sel:changeSet:StartChangeSet' :: StartChangeSet -> NonEmpty Change
$sel:catalog:StartChangeSet' :: StartChangeSet -> Text
$sel:clientRequestToken:StartChangeSet' :: StartChangeSet -> Maybe Text
$sel:changeSetName:StartChangeSet' :: StartChangeSet -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ChangeSetName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
changeSetName,
            (Text
"ClientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Catalog" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
catalog),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ChangeSet" Text -> NonEmpty Change -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Change
changeSet)
          ]
      )

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

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

-- | /See:/ 'newStartChangeSetResponse' smart constructor.
data StartChangeSetResponse = StartChangeSetResponse'
  { -- | Unique identifier generated for the request.
    StartChangeSetResponse -> Maybe Text
changeSetId :: Prelude.Maybe Prelude.Text,
    -- | The ARN associated to the unique identifier generated for the request.
    StartChangeSetResponse -> Maybe Text
changeSetArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    StartChangeSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartChangeSetResponse -> StartChangeSetResponse -> Bool
(StartChangeSetResponse -> StartChangeSetResponse -> Bool)
-> (StartChangeSetResponse -> StartChangeSetResponse -> Bool)
-> Eq StartChangeSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartChangeSetResponse -> StartChangeSetResponse -> Bool
$c/= :: StartChangeSetResponse -> StartChangeSetResponse -> Bool
== :: StartChangeSetResponse -> StartChangeSetResponse -> Bool
$c== :: StartChangeSetResponse -> StartChangeSetResponse -> Bool
Prelude.Eq, ReadPrec [StartChangeSetResponse]
ReadPrec StartChangeSetResponse
Int -> ReadS StartChangeSetResponse
ReadS [StartChangeSetResponse]
(Int -> ReadS StartChangeSetResponse)
-> ReadS [StartChangeSetResponse]
-> ReadPrec StartChangeSetResponse
-> ReadPrec [StartChangeSetResponse]
-> Read StartChangeSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartChangeSetResponse]
$creadListPrec :: ReadPrec [StartChangeSetResponse]
readPrec :: ReadPrec StartChangeSetResponse
$creadPrec :: ReadPrec StartChangeSetResponse
readList :: ReadS [StartChangeSetResponse]
$creadList :: ReadS [StartChangeSetResponse]
readsPrec :: Int -> ReadS StartChangeSetResponse
$creadsPrec :: Int -> ReadS StartChangeSetResponse
Prelude.Read, Int -> StartChangeSetResponse -> ShowS
[StartChangeSetResponse] -> ShowS
StartChangeSetResponse -> String
(Int -> StartChangeSetResponse -> ShowS)
-> (StartChangeSetResponse -> String)
-> ([StartChangeSetResponse] -> ShowS)
-> Show StartChangeSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartChangeSetResponse] -> ShowS
$cshowList :: [StartChangeSetResponse] -> ShowS
show :: StartChangeSetResponse -> String
$cshow :: StartChangeSetResponse -> String
showsPrec :: Int -> StartChangeSetResponse -> ShowS
$cshowsPrec :: Int -> StartChangeSetResponse -> ShowS
Prelude.Show, (forall x. StartChangeSetResponse -> Rep StartChangeSetResponse x)
-> (forall x.
    Rep StartChangeSetResponse x -> StartChangeSetResponse)
-> Generic StartChangeSetResponse
forall x. Rep StartChangeSetResponse x -> StartChangeSetResponse
forall x. StartChangeSetResponse -> Rep StartChangeSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartChangeSetResponse x -> StartChangeSetResponse
$cfrom :: forall x. StartChangeSetResponse -> Rep StartChangeSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartChangeSetResponse' 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:
--
-- 'changeSetId', 'startChangeSetResponse_changeSetId' - Unique identifier generated for the request.
--
-- 'changeSetArn', 'startChangeSetResponse_changeSetArn' - The ARN associated to the unique identifier generated for the request.
--
-- 'httpStatus', 'startChangeSetResponse_httpStatus' - The response's http status code.
newStartChangeSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartChangeSetResponse
newStartChangeSetResponse :: Int -> StartChangeSetResponse
newStartChangeSetResponse Int
pHttpStatus_ =
  StartChangeSetResponse' :: Maybe Text -> Maybe Text -> Int -> StartChangeSetResponse
StartChangeSetResponse'
    { $sel:changeSetId:StartChangeSetResponse' :: Maybe Text
changeSetId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:changeSetArn:StartChangeSetResponse' :: Maybe Text
changeSetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartChangeSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Unique identifier generated for the request.
startChangeSetResponse_changeSetId :: Lens.Lens' StartChangeSetResponse (Prelude.Maybe Prelude.Text)
startChangeSetResponse_changeSetId :: (Maybe Text -> f (Maybe Text))
-> StartChangeSetResponse -> f StartChangeSetResponse
startChangeSetResponse_changeSetId = (StartChangeSetResponse -> Maybe Text)
-> (StartChangeSetResponse -> Maybe Text -> StartChangeSetResponse)
-> Lens
     StartChangeSetResponse
     StartChangeSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeSetResponse' {Maybe Text
changeSetId :: Maybe Text
$sel:changeSetId:StartChangeSetResponse' :: StartChangeSetResponse -> Maybe Text
changeSetId} -> Maybe Text
changeSetId) (\s :: StartChangeSetResponse
s@StartChangeSetResponse' {} Maybe Text
a -> StartChangeSetResponse
s {$sel:changeSetId:StartChangeSetResponse' :: Maybe Text
changeSetId = Maybe Text
a} :: StartChangeSetResponse)

-- | The ARN associated to the unique identifier generated for the request.
startChangeSetResponse_changeSetArn :: Lens.Lens' StartChangeSetResponse (Prelude.Maybe Prelude.Text)
startChangeSetResponse_changeSetArn :: (Maybe Text -> f (Maybe Text))
-> StartChangeSetResponse -> f StartChangeSetResponse
startChangeSetResponse_changeSetArn = (StartChangeSetResponse -> Maybe Text)
-> (StartChangeSetResponse -> Maybe Text -> StartChangeSetResponse)
-> Lens
     StartChangeSetResponse
     StartChangeSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeSetResponse' {Maybe Text
changeSetArn :: Maybe Text
$sel:changeSetArn:StartChangeSetResponse' :: StartChangeSetResponse -> Maybe Text
changeSetArn} -> Maybe Text
changeSetArn) (\s :: StartChangeSetResponse
s@StartChangeSetResponse' {} Maybe Text
a -> StartChangeSetResponse
s {$sel:changeSetArn:StartChangeSetResponse' :: Maybe Text
changeSetArn = Maybe Text
a} :: StartChangeSetResponse)

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

instance Prelude.NFData StartChangeSetResponse