{-# 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.Greengrass.StartBulkDeployment
-- 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)
--
-- Deploys multiple groups in one operation. This action starts the bulk
-- deployment of a specified set of group versions. Each group version
-- deployment will be triggered with an adaptive rate that has a fixed
-- upper limit. We recommend that you include an
-- \'\'X-Amzn-Client-Token\'\' token in every \'\'StartBulkDeployment\'\'
-- request. These requests are idempotent with respect to the token and the
-- request parameters.
module Amazonka.Greengrass.StartBulkDeployment
  ( -- * Creating a Request
    StartBulkDeployment (..),
    newStartBulkDeployment,

    -- * Request Lenses
    startBulkDeployment_amznClientToken,
    startBulkDeployment_tags,
    startBulkDeployment_executionRoleArn,
    startBulkDeployment_inputFileUri,

    -- * Destructuring the Response
    StartBulkDeploymentResponse (..),
    newStartBulkDeploymentResponse,

    -- * Response Lenses
    startBulkDeploymentResponse_bulkDeploymentArn,
    startBulkDeploymentResponse_bulkDeploymentId,
    startBulkDeploymentResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Greengrass.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:/ 'newStartBulkDeployment' smart constructor.
data StartBulkDeployment = StartBulkDeployment'
  { -- | A client token used to correlate requests and responses.
    StartBulkDeployment -> Maybe Text
amznClientToken :: Prelude.Maybe Prelude.Text,
    -- | Tag(s) to add to the new resource.
    StartBulkDeployment -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The ARN of the execution role to associate with the bulk deployment
    -- operation. This IAM role must allow the
    -- \'\'greengrass:CreateDeployment\'\' action for all group versions that
    -- are listed in the input file. This IAM role must have access to the S3
    -- bucket containing the input file.
    StartBulkDeployment -> Text
executionRoleArn :: Prelude.Text,
    -- | The URI of the input file contained in the S3 bucket. The execution role
    -- must have \'\'getObject\'\' permissions on this bucket to access the
    -- input file. The input file is a JSON-serialized, line delimited file
    -- with UTF-8 encoding that provides a list of group and version IDs and
    -- the deployment type. This file must be less than 100 MB. Currently, AWS
    -- IoT Greengrass supports only \'\'NewDeployment\'\' deployment types.
    StartBulkDeployment -> Text
inputFileUri :: Prelude.Text
  }
  deriving (StartBulkDeployment -> StartBulkDeployment -> Bool
(StartBulkDeployment -> StartBulkDeployment -> Bool)
-> (StartBulkDeployment -> StartBulkDeployment -> Bool)
-> Eq StartBulkDeployment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartBulkDeployment -> StartBulkDeployment -> Bool
$c/= :: StartBulkDeployment -> StartBulkDeployment -> Bool
== :: StartBulkDeployment -> StartBulkDeployment -> Bool
$c== :: StartBulkDeployment -> StartBulkDeployment -> Bool
Prelude.Eq, ReadPrec [StartBulkDeployment]
ReadPrec StartBulkDeployment
Int -> ReadS StartBulkDeployment
ReadS [StartBulkDeployment]
(Int -> ReadS StartBulkDeployment)
-> ReadS [StartBulkDeployment]
-> ReadPrec StartBulkDeployment
-> ReadPrec [StartBulkDeployment]
-> Read StartBulkDeployment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartBulkDeployment]
$creadListPrec :: ReadPrec [StartBulkDeployment]
readPrec :: ReadPrec StartBulkDeployment
$creadPrec :: ReadPrec StartBulkDeployment
readList :: ReadS [StartBulkDeployment]
$creadList :: ReadS [StartBulkDeployment]
readsPrec :: Int -> ReadS StartBulkDeployment
$creadsPrec :: Int -> ReadS StartBulkDeployment
Prelude.Read, Int -> StartBulkDeployment -> ShowS
[StartBulkDeployment] -> ShowS
StartBulkDeployment -> String
(Int -> StartBulkDeployment -> ShowS)
-> (StartBulkDeployment -> String)
-> ([StartBulkDeployment] -> ShowS)
-> Show StartBulkDeployment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartBulkDeployment] -> ShowS
$cshowList :: [StartBulkDeployment] -> ShowS
show :: StartBulkDeployment -> String
$cshow :: StartBulkDeployment -> String
showsPrec :: Int -> StartBulkDeployment -> ShowS
$cshowsPrec :: Int -> StartBulkDeployment -> ShowS
Prelude.Show, (forall x. StartBulkDeployment -> Rep StartBulkDeployment x)
-> (forall x. Rep StartBulkDeployment x -> StartBulkDeployment)
-> Generic StartBulkDeployment
forall x. Rep StartBulkDeployment x -> StartBulkDeployment
forall x. StartBulkDeployment -> Rep StartBulkDeployment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartBulkDeployment x -> StartBulkDeployment
$cfrom :: forall x. StartBulkDeployment -> Rep StartBulkDeployment x
Prelude.Generic)

-- |
-- Create a value of 'StartBulkDeployment' 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:
--
-- 'amznClientToken', 'startBulkDeployment_amznClientToken' - A client token used to correlate requests and responses.
--
-- 'tags', 'startBulkDeployment_tags' - Tag(s) to add to the new resource.
--
-- 'executionRoleArn', 'startBulkDeployment_executionRoleArn' - The ARN of the execution role to associate with the bulk deployment
-- operation. This IAM role must allow the
-- \'\'greengrass:CreateDeployment\'\' action for all group versions that
-- are listed in the input file. This IAM role must have access to the S3
-- bucket containing the input file.
--
-- 'inputFileUri', 'startBulkDeployment_inputFileUri' - The URI of the input file contained in the S3 bucket. The execution role
-- must have \'\'getObject\'\' permissions on this bucket to access the
-- input file. The input file is a JSON-serialized, line delimited file
-- with UTF-8 encoding that provides a list of group and version IDs and
-- the deployment type. This file must be less than 100 MB. Currently, AWS
-- IoT Greengrass supports only \'\'NewDeployment\'\' deployment types.
newStartBulkDeployment ::
  -- | 'executionRoleArn'
  Prelude.Text ->
  -- | 'inputFileUri'
  Prelude.Text ->
  StartBulkDeployment
newStartBulkDeployment :: Text -> Text -> StartBulkDeployment
newStartBulkDeployment
  Text
pExecutionRoleArn_
  Text
pInputFileUri_ =
    StartBulkDeployment' :: Maybe Text
-> Maybe (HashMap Text Text) -> Text -> Text -> StartBulkDeployment
StartBulkDeployment'
      { $sel:amznClientToken:StartBulkDeployment' :: Maybe Text
amznClientToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:StartBulkDeployment' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:executionRoleArn:StartBulkDeployment' :: Text
executionRoleArn = Text
pExecutionRoleArn_,
        $sel:inputFileUri:StartBulkDeployment' :: Text
inputFileUri = Text
pInputFileUri_
      }

-- | A client token used to correlate requests and responses.
startBulkDeployment_amznClientToken :: Lens.Lens' StartBulkDeployment (Prelude.Maybe Prelude.Text)
startBulkDeployment_amznClientToken :: (Maybe Text -> f (Maybe Text))
-> StartBulkDeployment -> f StartBulkDeployment
startBulkDeployment_amznClientToken = (StartBulkDeployment -> Maybe Text)
-> (StartBulkDeployment -> Maybe Text -> StartBulkDeployment)
-> Lens
     StartBulkDeployment StartBulkDeployment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBulkDeployment' {Maybe Text
amznClientToken :: Maybe Text
$sel:amznClientToken:StartBulkDeployment' :: StartBulkDeployment -> Maybe Text
amznClientToken} -> Maybe Text
amznClientToken) (\s :: StartBulkDeployment
s@StartBulkDeployment' {} Maybe Text
a -> StartBulkDeployment
s {$sel:amznClientToken:StartBulkDeployment' :: Maybe Text
amznClientToken = Maybe Text
a} :: StartBulkDeployment)

-- | Tag(s) to add to the new resource.
startBulkDeployment_tags :: Lens.Lens' StartBulkDeployment (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startBulkDeployment_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartBulkDeployment -> f StartBulkDeployment
startBulkDeployment_tags = (StartBulkDeployment -> Maybe (HashMap Text Text))
-> (StartBulkDeployment
    -> Maybe (HashMap Text Text) -> StartBulkDeployment)
-> Lens
     StartBulkDeployment
     StartBulkDeployment
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBulkDeployment' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:StartBulkDeployment' :: StartBulkDeployment -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: StartBulkDeployment
s@StartBulkDeployment' {} Maybe (HashMap Text Text)
a -> StartBulkDeployment
s {$sel:tags:StartBulkDeployment' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: StartBulkDeployment) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> StartBulkDeployment -> f StartBulkDeployment)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartBulkDeployment
-> f StartBulkDeployment
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ARN of the execution role to associate with the bulk deployment
-- operation. This IAM role must allow the
-- \'\'greengrass:CreateDeployment\'\' action for all group versions that
-- are listed in the input file. This IAM role must have access to the S3
-- bucket containing the input file.
startBulkDeployment_executionRoleArn :: Lens.Lens' StartBulkDeployment Prelude.Text
startBulkDeployment_executionRoleArn :: (Text -> f Text) -> StartBulkDeployment -> f StartBulkDeployment
startBulkDeployment_executionRoleArn = (StartBulkDeployment -> Text)
-> (StartBulkDeployment -> Text -> StartBulkDeployment)
-> Lens StartBulkDeployment StartBulkDeployment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBulkDeployment' {Text
executionRoleArn :: Text
$sel:executionRoleArn:StartBulkDeployment' :: StartBulkDeployment -> Text
executionRoleArn} -> Text
executionRoleArn) (\s :: StartBulkDeployment
s@StartBulkDeployment' {} Text
a -> StartBulkDeployment
s {$sel:executionRoleArn:StartBulkDeployment' :: Text
executionRoleArn = Text
a} :: StartBulkDeployment)

-- | The URI of the input file contained in the S3 bucket. The execution role
-- must have \'\'getObject\'\' permissions on this bucket to access the
-- input file. The input file is a JSON-serialized, line delimited file
-- with UTF-8 encoding that provides a list of group and version IDs and
-- the deployment type. This file must be less than 100 MB. Currently, AWS
-- IoT Greengrass supports only \'\'NewDeployment\'\' deployment types.
startBulkDeployment_inputFileUri :: Lens.Lens' StartBulkDeployment Prelude.Text
startBulkDeployment_inputFileUri :: (Text -> f Text) -> StartBulkDeployment -> f StartBulkDeployment
startBulkDeployment_inputFileUri = (StartBulkDeployment -> Text)
-> (StartBulkDeployment -> Text -> StartBulkDeployment)
-> Lens StartBulkDeployment StartBulkDeployment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBulkDeployment' {Text
inputFileUri :: Text
$sel:inputFileUri:StartBulkDeployment' :: StartBulkDeployment -> Text
inputFileUri} -> Text
inputFileUri) (\s :: StartBulkDeployment
s@StartBulkDeployment' {} Text
a -> StartBulkDeployment
s {$sel:inputFileUri:StartBulkDeployment' :: Text
inputFileUri = Text
a} :: StartBulkDeployment)

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

instance Prelude.NFData StartBulkDeployment

instance Core.ToHeaders StartBulkDeployment where
  toHeaders :: StartBulkDeployment -> ResponseHeaders
toHeaders StartBulkDeployment' {Maybe Text
Maybe (HashMap Text Text)
Text
inputFileUri :: Text
executionRoleArn :: Text
tags :: Maybe (HashMap Text Text)
amznClientToken :: Maybe Text
$sel:inputFileUri:StartBulkDeployment' :: StartBulkDeployment -> Text
$sel:executionRoleArn:StartBulkDeployment' :: StartBulkDeployment -> Text
$sel:tags:StartBulkDeployment' :: StartBulkDeployment -> Maybe (HashMap Text Text)
$sel:amznClientToken:StartBulkDeployment' :: StartBulkDeployment -> Maybe Text
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"X-Amzn-Client-Token" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
amznClientToken,
        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 StartBulkDeployment where
  toJSON :: StartBulkDeployment -> Value
toJSON StartBulkDeployment' {Maybe Text
Maybe (HashMap Text Text)
Text
inputFileUri :: Text
executionRoleArn :: Text
tags :: Maybe (HashMap Text Text)
amznClientToken :: Maybe Text
$sel:inputFileUri:StartBulkDeployment' :: StartBulkDeployment -> Text
$sel:executionRoleArn:StartBulkDeployment' :: StartBulkDeployment -> Text
$sel:tags:StartBulkDeployment' :: StartBulkDeployment -> Maybe (HashMap Text Text)
$sel:amznClientToken:StartBulkDeployment' :: StartBulkDeployment -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ExecutionRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
executionRoleArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"InputFileUri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
inputFileUri)
          ]
      )

instance Core.ToPath StartBulkDeployment where
  toPath :: StartBulkDeployment -> ByteString
toPath = ByteString -> StartBulkDeployment -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/greengrass/bulk/deployments"

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

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

-- |
-- Create a value of 'StartBulkDeploymentResponse' 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:
--
-- 'bulkDeploymentArn', 'startBulkDeploymentResponse_bulkDeploymentArn' - The ARN of the bulk deployment.
--
-- 'bulkDeploymentId', 'startBulkDeploymentResponse_bulkDeploymentId' - The ID of the bulk deployment.
--
-- 'httpStatus', 'startBulkDeploymentResponse_httpStatus' - The response's http status code.
newStartBulkDeploymentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartBulkDeploymentResponse
newStartBulkDeploymentResponse :: Int -> StartBulkDeploymentResponse
newStartBulkDeploymentResponse Int
pHttpStatus_ =
  StartBulkDeploymentResponse' :: Maybe Text -> Maybe Text -> Int -> StartBulkDeploymentResponse
StartBulkDeploymentResponse'
    { $sel:bulkDeploymentArn:StartBulkDeploymentResponse' :: Maybe Text
bulkDeploymentArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bulkDeploymentId:StartBulkDeploymentResponse' :: Maybe Text
bulkDeploymentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartBulkDeploymentResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the bulk deployment.
startBulkDeploymentResponse_bulkDeploymentArn :: Lens.Lens' StartBulkDeploymentResponse (Prelude.Maybe Prelude.Text)
startBulkDeploymentResponse_bulkDeploymentArn :: (Maybe Text -> f (Maybe Text))
-> StartBulkDeploymentResponse -> f StartBulkDeploymentResponse
startBulkDeploymentResponse_bulkDeploymentArn = (StartBulkDeploymentResponse -> Maybe Text)
-> (StartBulkDeploymentResponse
    -> Maybe Text -> StartBulkDeploymentResponse)
-> Lens
     StartBulkDeploymentResponse
     StartBulkDeploymentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBulkDeploymentResponse' {Maybe Text
bulkDeploymentArn :: Maybe Text
$sel:bulkDeploymentArn:StartBulkDeploymentResponse' :: StartBulkDeploymentResponse -> Maybe Text
bulkDeploymentArn} -> Maybe Text
bulkDeploymentArn) (\s :: StartBulkDeploymentResponse
s@StartBulkDeploymentResponse' {} Maybe Text
a -> StartBulkDeploymentResponse
s {$sel:bulkDeploymentArn:StartBulkDeploymentResponse' :: Maybe Text
bulkDeploymentArn = Maybe Text
a} :: StartBulkDeploymentResponse)

-- | The ID of the bulk deployment.
startBulkDeploymentResponse_bulkDeploymentId :: Lens.Lens' StartBulkDeploymentResponse (Prelude.Maybe Prelude.Text)
startBulkDeploymentResponse_bulkDeploymentId :: (Maybe Text -> f (Maybe Text))
-> StartBulkDeploymentResponse -> f StartBulkDeploymentResponse
startBulkDeploymentResponse_bulkDeploymentId = (StartBulkDeploymentResponse -> Maybe Text)
-> (StartBulkDeploymentResponse
    -> Maybe Text -> StartBulkDeploymentResponse)
-> Lens
     StartBulkDeploymentResponse
     StartBulkDeploymentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartBulkDeploymentResponse' {Maybe Text
bulkDeploymentId :: Maybe Text
$sel:bulkDeploymentId:StartBulkDeploymentResponse' :: StartBulkDeploymentResponse -> Maybe Text
bulkDeploymentId} -> Maybe Text
bulkDeploymentId) (\s :: StartBulkDeploymentResponse
s@StartBulkDeploymentResponse' {} Maybe Text
a -> StartBulkDeploymentResponse
s {$sel:bulkDeploymentId:StartBulkDeploymentResponse' :: Maybe Text
bulkDeploymentId = Maybe Text
a} :: StartBulkDeploymentResponse)

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

instance Prelude.NFData StartBulkDeploymentResponse