{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Allows you to request changes for your entities. Within a single
-- @ChangeSet@, you can\'t 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
-- change set has completed (either succeeded, cancelled, or failed). If
-- you try to start a change set containing a change against an entity that
-- is already locked, you will receive a @ResourceInUseException@ error.
--
-- For example, you can\'t 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 run 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_changeSetTags,
    startChangeSet_clientRequestToken,
    startChangeSet_catalog,
    startChangeSet_changeSet,

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

    -- * Response Lenses
    startChangeSetResponse_changeSetArn,
    startChangeSetResponse_changeSetId,
    startChangeSetResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 list of objects specifying each key name and value for the
    -- @ChangeSetTags@ property.
    StartChangeSet -> Maybe (NonEmpty Tag)
changeSetTags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | 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
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]
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
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. 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.
--
-- 'changeSetTags', 'startChangeSet_changeSetTags' - A list of objects specifying each key name and value for the
-- @ChangeSetTags@ property.
--
-- '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'
    { $sel:changeSetName:StartChangeSet' :: Maybe Text
changeSetName = forall a. Maybe a
Prelude.Nothing,
      $sel:changeSetTags:StartChangeSet' :: Maybe (NonEmpty Tag)
changeSetTags = forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:StartChangeSet' :: Maybe Text
clientRequestToken = forall a. Maybe a
Prelude.Nothing,
      $sel:catalog:StartChangeSet' :: Text
catalog = Text
pCatalog_,
      $sel:changeSet:StartChangeSet' :: NonEmpty Change
changeSet = forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced 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 :: Lens' StartChangeSet (Maybe Text)
startChangeSet_changeSetName = 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 list of objects specifying each key name and value for the
-- @ChangeSetTags@ property.
startChangeSet_changeSetTags :: Lens.Lens' StartChangeSet (Prelude.Maybe (Prelude.NonEmpty Tag))
startChangeSet_changeSetTags :: Lens' StartChangeSet (Maybe (NonEmpty Tag))
startChangeSet_changeSetTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeSet' {Maybe (NonEmpty Tag)
changeSetTags :: Maybe (NonEmpty Tag)
$sel:changeSetTags:StartChangeSet' :: StartChangeSet -> Maybe (NonEmpty Tag)
changeSetTags} -> Maybe (NonEmpty Tag)
changeSetTags) (\s :: StartChangeSet
s@StartChangeSet' {} Maybe (NonEmpty Tag)
a -> StartChangeSet
s {$sel:changeSetTags:StartChangeSet' :: Maybe (NonEmpty Tag)
changeSetTags = Maybe (NonEmpty Tag)
a} :: StartChangeSet) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A unique token to identify the request to ensure idempotency.
startChangeSet_clientRequestToken :: Lens.Lens' StartChangeSet (Prelude.Maybe Prelude.Text)
startChangeSet_clientRequestToken :: Lens' StartChangeSet (Maybe Text)
startChangeSet_clientRequestToken = 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 :: Lens' StartChangeSet Text
startChangeSet_catalog = 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 :: Lens' StartChangeSet (NonEmpty Change)
startChangeSet_changeSet = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 :: (Service -> Service) -> StartChangeSet -> Request StartChangeSet
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy StartChangeSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartChangeSet)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Maybe Text -> Int -> StartChangeSetResponse
StartChangeSetResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ChangeSetArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ChangeSetId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable StartChangeSet where
  hashWithSalt :: Int -> StartChangeSet -> Int
hashWithSalt Int
_salt StartChangeSet' {Maybe (NonEmpty Tag)
Maybe Text
NonEmpty Change
Text
changeSet :: NonEmpty Change
catalog :: Text
clientRequestToken :: Maybe Text
changeSetTags :: Maybe (NonEmpty Tag)
changeSetName :: Maybe Text
$sel:changeSet:StartChangeSet' :: StartChangeSet -> NonEmpty Change
$sel:catalog:StartChangeSet' :: StartChangeSet -> Text
$sel:clientRequestToken:StartChangeSet' :: StartChangeSet -> Maybe Text
$sel:changeSetTags:StartChangeSet' :: StartChangeSet -> Maybe (NonEmpty Tag)
$sel:changeSetName:StartChangeSet' :: StartChangeSet -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
changeSetName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
changeSetTags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
catalog
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty Change
changeSet

instance Prelude.NFData StartChangeSet where
  rnf :: StartChangeSet -> ()
rnf StartChangeSet' {Maybe (NonEmpty Tag)
Maybe Text
NonEmpty Change
Text
changeSet :: NonEmpty Change
catalog :: Text
clientRequestToken :: Maybe Text
changeSetTags :: Maybe (NonEmpty Tag)
changeSetName :: Maybe Text
$sel:changeSet:StartChangeSet' :: StartChangeSet -> NonEmpty Change
$sel:catalog:StartChangeSet' :: StartChangeSet -> Text
$sel:clientRequestToken:StartChangeSet' :: StartChangeSet -> Maybe Text
$sel:changeSetTags:StartChangeSet' :: StartChangeSet -> Maybe (NonEmpty Tag)
$sel:changeSetName:StartChangeSet' :: StartChangeSet -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
changeSetName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
changeSetTags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
catalog
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty Change
changeSet

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

instance Data.ToJSON StartChangeSet where
  toJSON :: StartChangeSet -> Value
toJSON StartChangeSet' {Maybe (NonEmpty Tag)
Maybe Text
NonEmpty Change
Text
changeSet :: NonEmpty Change
catalog :: Text
clientRequestToken :: Maybe Text
changeSetTags :: Maybe (NonEmpty Tag)
changeSetName :: Maybe Text
$sel:changeSet:StartChangeSet' :: StartChangeSet -> NonEmpty Change
$sel:catalog:StartChangeSet' :: StartChangeSet -> Text
$sel:clientRequestToken:StartChangeSet' :: StartChangeSet -> Maybe Text
$sel:changeSetTags:StartChangeSet' :: StartChangeSet -> Maybe (NonEmpty Tag)
$sel:changeSetName:StartChangeSet' :: StartChangeSet -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ChangeSetName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
changeSetName,
            (Key
"ChangeSetTags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Tag)
changeSetTags,
            (Key
"ClientRequestToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
            forall a. a -> Maybe a
Prelude.Just (Key
"Catalog" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
catalog),
            forall a. a -> Maybe a
Prelude.Just (Key
"ChangeSet" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty Change
changeSet)
          ]
      )

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

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

-- | /See:/ 'newStartChangeSetResponse' smart constructor.
data StartChangeSetResponse = StartChangeSetResponse'
  { -- | The ARN associated to the unique identifier generated for the request.
    StartChangeSetResponse -> Maybe Text
changeSetArn :: Prelude.Maybe Prelude.Text,
    -- | Unique identifier generated for the request.
    StartChangeSetResponse -> Maybe Text
changeSetId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    StartChangeSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartChangeSetResponse -> StartChangeSetResponse -> Bool
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]
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
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. 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:
--
-- 'changeSetArn', 'startChangeSetResponse_changeSetArn' - The ARN associated to the unique identifier generated for the request.
--
-- 'changeSetId', 'startChangeSetResponse_changeSetId' - 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'
    { $sel:changeSetArn:StartChangeSetResponse' :: Maybe Text
changeSetArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:changeSetId:StartChangeSetResponse' :: Maybe Text
changeSetId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartChangeSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN associated to the unique identifier generated for the request.
startChangeSetResponse_changeSetArn :: Lens.Lens' StartChangeSetResponse (Prelude.Maybe Prelude.Text)
startChangeSetResponse_changeSetArn :: Lens' StartChangeSetResponse (Maybe Text)
startChangeSetResponse_changeSetArn = 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)

-- | Unique identifier generated for the request.
startChangeSetResponse_changeSetId :: Lens.Lens' StartChangeSetResponse (Prelude.Maybe Prelude.Text)
startChangeSetResponse_changeSetId :: Lens' StartChangeSetResponse (Maybe Text)
startChangeSetResponse_changeSetId = 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 response's http status code.
startChangeSetResponse_httpStatus :: Lens.Lens' StartChangeSetResponse Prelude.Int
startChangeSetResponse_httpStatus :: Lens' StartChangeSetResponse Int
startChangeSetResponse_httpStatus = 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 where
  rnf :: StartChangeSetResponse -> ()
rnf StartChangeSetResponse' {Int
Maybe Text
httpStatus :: Int
changeSetId :: Maybe Text
changeSetArn :: Maybe Text
$sel:httpStatus:StartChangeSetResponse' :: StartChangeSetResponse -> Int
$sel:changeSetId:StartChangeSetResponse' :: StartChangeSetResponse -> Maybe Text
$sel:changeSetArn:StartChangeSetResponse' :: StartChangeSetResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
changeSetArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
changeSetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus