{-# 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.Translate.CreateParallelData
-- 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)
--
-- Creates a parallel data resource in Amazon Translate by importing an
-- input file from Amazon S3. Parallel data files contain examples of
-- source phrases and their translations from your translation memory. By
-- adding parallel data, you can influence the style, tone, and word choice
-- in your translation output.
module Amazonka.Translate.CreateParallelData
  ( -- * Creating a Request
    CreateParallelData (..),
    newCreateParallelData,

    -- * Request Lenses
    createParallelData_encryptionKey,
    createParallelData_description,
    createParallelData_name,
    createParallelData_parallelDataConfig,
    createParallelData_clientToken,

    -- * Destructuring the Response
    CreateParallelDataResponse (..),
    newCreateParallelDataResponse,

    -- * Response Lenses
    createParallelDataResponse_status,
    createParallelDataResponse_name,
    createParallelDataResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateParallelData' smart constructor.
data CreateParallelData = CreateParallelData'
  { CreateParallelData -> Maybe EncryptionKey
encryptionKey :: Prelude.Maybe EncryptionKey,
    -- | A custom description for the parallel data resource in Amazon Translate.
    CreateParallelData -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A custom name for the parallel data resource in Amazon Translate. You
    -- must assign a name that is unique in the account and region.
    CreateParallelData -> Text
name :: Prelude.Text,
    -- | Specifies the format and S3 location of the parallel data input file.
    CreateParallelData -> ParallelDataConfig
parallelDataConfig :: ParallelDataConfig,
    -- | A unique identifier for the request. This token is automatically
    -- generated when you use Amazon Translate through an AWS SDK.
    CreateParallelData -> Text
clientToken :: Prelude.Text
  }
  deriving (CreateParallelData -> CreateParallelData -> Bool
(CreateParallelData -> CreateParallelData -> Bool)
-> (CreateParallelData -> CreateParallelData -> Bool)
-> Eq CreateParallelData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateParallelData -> CreateParallelData -> Bool
$c/= :: CreateParallelData -> CreateParallelData -> Bool
== :: CreateParallelData -> CreateParallelData -> Bool
$c== :: CreateParallelData -> CreateParallelData -> Bool
Prelude.Eq, ReadPrec [CreateParallelData]
ReadPrec CreateParallelData
Int -> ReadS CreateParallelData
ReadS [CreateParallelData]
(Int -> ReadS CreateParallelData)
-> ReadS [CreateParallelData]
-> ReadPrec CreateParallelData
-> ReadPrec [CreateParallelData]
-> Read CreateParallelData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateParallelData]
$creadListPrec :: ReadPrec [CreateParallelData]
readPrec :: ReadPrec CreateParallelData
$creadPrec :: ReadPrec CreateParallelData
readList :: ReadS [CreateParallelData]
$creadList :: ReadS [CreateParallelData]
readsPrec :: Int -> ReadS CreateParallelData
$creadsPrec :: Int -> ReadS CreateParallelData
Prelude.Read, Int -> CreateParallelData -> ShowS
[CreateParallelData] -> ShowS
CreateParallelData -> String
(Int -> CreateParallelData -> ShowS)
-> (CreateParallelData -> String)
-> ([CreateParallelData] -> ShowS)
-> Show CreateParallelData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateParallelData] -> ShowS
$cshowList :: [CreateParallelData] -> ShowS
show :: CreateParallelData -> String
$cshow :: CreateParallelData -> String
showsPrec :: Int -> CreateParallelData -> ShowS
$cshowsPrec :: Int -> CreateParallelData -> ShowS
Prelude.Show, (forall x. CreateParallelData -> Rep CreateParallelData x)
-> (forall x. Rep CreateParallelData x -> CreateParallelData)
-> Generic CreateParallelData
forall x. Rep CreateParallelData x -> CreateParallelData
forall x. CreateParallelData -> Rep CreateParallelData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateParallelData x -> CreateParallelData
$cfrom :: forall x. CreateParallelData -> Rep CreateParallelData x
Prelude.Generic)

-- |
-- Create a value of 'CreateParallelData' 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:
--
-- 'encryptionKey', 'createParallelData_encryptionKey' - Undocumented member.
--
-- 'description', 'createParallelData_description' - A custom description for the parallel data resource in Amazon Translate.
--
-- 'name', 'createParallelData_name' - A custom name for the parallel data resource in Amazon Translate. You
-- must assign a name that is unique in the account and region.
--
-- 'parallelDataConfig', 'createParallelData_parallelDataConfig' - Specifies the format and S3 location of the parallel data input file.
--
-- 'clientToken', 'createParallelData_clientToken' - A unique identifier for the request. This token is automatically
-- generated when you use Amazon Translate through an AWS SDK.
newCreateParallelData ::
  -- | 'name'
  Prelude.Text ->
  -- | 'parallelDataConfig'
  ParallelDataConfig ->
  -- | 'clientToken'
  Prelude.Text ->
  CreateParallelData
newCreateParallelData :: Text -> ParallelDataConfig -> Text -> CreateParallelData
newCreateParallelData
  Text
pName_
  ParallelDataConfig
pParallelDataConfig_
  Text
pClientToken_ =
    CreateParallelData' :: Maybe EncryptionKey
-> Maybe Text
-> Text
-> ParallelDataConfig
-> Text
-> CreateParallelData
CreateParallelData'
      { $sel:encryptionKey:CreateParallelData' :: Maybe EncryptionKey
encryptionKey =
          Maybe EncryptionKey
forall a. Maybe a
Prelude.Nothing,
        $sel:description:CreateParallelData' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:name:CreateParallelData' :: Text
name = Text
pName_,
        $sel:parallelDataConfig:CreateParallelData' :: ParallelDataConfig
parallelDataConfig = ParallelDataConfig
pParallelDataConfig_,
        $sel:clientToken:CreateParallelData' :: Text
clientToken = Text
pClientToken_
      }

-- | Undocumented member.
createParallelData_encryptionKey :: Lens.Lens' CreateParallelData (Prelude.Maybe EncryptionKey)
createParallelData_encryptionKey :: (Maybe EncryptionKey -> f (Maybe EncryptionKey))
-> CreateParallelData -> f CreateParallelData
createParallelData_encryptionKey = (CreateParallelData -> Maybe EncryptionKey)
-> (CreateParallelData
    -> Maybe EncryptionKey -> CreateParallelData)
-> Lens
     CreateParallelData
     CreateParallelData
     (Maybe EncryptionKey)
     (Maybe EncryptionKey)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateParallelData' {Maybe EncryptionKey
encryptionKey :: Maybe EncryptionKey
$sel:encryptionKey:CreateParallelData' :: CreateParallelData -> Maybe EncryptionKey
encryptionKey} -> Maybe EncryptionKey
encryptionKey) (\s :: CreateParallelData
s@CreateParallelData' {} Maybe EncryptionKey
a -> CreateParallelData
s {$sel:encryptionKey:CreateParallelData' :: Maybe EncryptionKey
encryptionKey = Maybe EncryptionKey
a} :: CreateParallelData)

-- | A custom description for the parallel data resource in Amazon Translate.
createParallelData_description :: Lens.Lens' CreateParallelData (Prelude.Maybe Prelude.Text)
createParallelData_description :: (Maybe Text -> f (Maybe Text))
-> CreateParallelData -> f CreateParallelData
createParallelData_description = (CreateParallelData -> Maybe Text)
-> (CreateParallelData -> Maybe Text -> CreateParallelData)
-> Lens
     CreateParallelData CreateParallelData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateParallelData' {Maybe Text
description :: Maybe Text
$sel:description:CreateParallelData' :: CreateParallelData -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateParallelData
s@CreateParallelData' {} Maybe Text
a -> CreateParallelData
s {$sel:description:CreateParallelData' :: Maybe Text
description = Maybe Text
a} :: CreateParallelData)

-- | A custom name for the parallel data resource in Amazon Translate. You
-- must assign a name that is unique in the account and region.
createParallelData_name :: Lens.Lens' CreateParallelData Prelude.Text
createParallelData_name :: (Text -> f Text) -> CreateParallelData -> f CreateParallelData
createParallelData_name = (CreateParallelData -> Text)
-> (CreateParallelData -> Text -> CreateParallelData)
-> Lens CreateParallelData CreateParallelData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateParallelData' {Text
name :: Text
$sel:name:CreateParallelData' :: CreateParallelData -> Text
name} -> Text
name) (\s :: CreateParallelData
s@CreateParallelData' {} Text
a -> CreateParallelData
s {$sel:name:CreateParallelData' :: Text
name = Text
a} :: CreateParallelData)

-- | Specifies the format and S3 location of the parallel data input file.
createParallelData_parallelDataConfig :: Lens.Lens' CreateParallelData ParallelDataConfig
createParallelData_parallelDataConfig :: (ParallelDataConfig -> f ParallelDataConfig)
-> CreateParallelData -> f CreateParallelData
createParallelData_parallelDataConfig = (CreateParallelData -> ParallelDataConfig)
-> (CreateParallelData -> ParallelDataConfig -> CreateParallelData)
-> Lens
     CreateParallelData
     CreateParallelData
     ParallelDataConfig
     ParallelDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateParallelData' {ParallelDataConfig
parallelDataConfig :: ParallelDataConfig
$sel:parallelDataConfig:CreateParallelData' :: CreateParallelData -> ParallelDataConfig
parallelDataConfig} -> ParallelDataConfig
parallelDataConfig) (\s :: CreateParallelData
s@CreateParallelData' {} ParallelDataConfig
a -> CreateParallelData
s {$sel:parallelDataConfig:CreateParallelData' :: ParallelDataConfig
parallelDataConfig = ParallelDataConfig
a} :: CreateParallelData)

-- | A unique identifier for the request. This token is automatically
-- generated when you use Amazon Translate through an AWS SDK.
createParallelData_clientToken :: Lens.Lens' CreateParallelData Prelude.Text
createParallelData_clientToken :: (Text -> f Text) -> CreateParallelData -> f CreateParallelData
createParallelData_clientToken = (CreateParallelData -> Text)
-> (CreateParallelData -> Text -> CreateParallelData)
-> Lens CreateParallelData CreateParallelData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateParallelData' {Text
clientToken :: Text
$sel:clientToken:CreateParallelData' :: CreateParallelData -> Text
clientToken} -> Text
clientToken) (\s :: CreateParallelData
s@CreateParallelData' {} Text
a -> CreateParallelData
s {$sel:clientToken:CreateParallelData' :: Text
clientToken = Text
a} :: CreateParallelData)

instance Core.AWSRequest CreateParallelData where
  type
    AWSResponse CreateParallelData =
      CreateParallelDataResponse
  request :: CreateParallelData -> Request CreateParallelData
request = Service -> CreateParallelData -> Request CreateParallelData
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateParallelData
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateParallelData)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateParallelData))
-> Logger
-> Service
-> Proxy CreateParallelData
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateParallelData)))
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 ParallelDataStatus
-> Maybe Text -> Int -> CreateParallelDataResponse
CreateParallelDataResponse'
            (Maybe ParallelDataStatus
 -> Maybe Text -> Int -> CreateParallelDataResponse)
-> Either String (Maybe ParallelDataStatus)
-> Either String (Maybe Text -> Int -> CreateParallelDataResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ParallelDataStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either String (Maybe Text -> Int -> CreateParallelDataResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateParallelDataResponse)
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
"Name")
            Either String (Int -> CreateParallelDataResponse)
-> Either String Int -> Either String CreateParallelDataResponse
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 CreateParallelData

instance Prelude.NFData CreateParallelData

instance Core.ToHeaders CreateParallelData where
  toHeaders :: CreateParallelData -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateParallelData -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSShineFrontendService_20170701.CreateParallelData" ::
                          Prelude.ByteString
                      ),
            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 CreateParallelData where
  toJSON :: CreateParallelData -> Value
toJSON CreateParallelData' {Maybe Text
Maybe EncryptionKey
Text
ParallelDataConfig
clientToken :: Text
parallelDataConfig :: ParallelDataConfig
name :: Text
description :: Maybe Text
encryptionKey :: Maybe EncryptionKey
$sel:clientToken:CreateParallelData' :: CreateParallelData -> Text
$sel:parallelDataConfig:CreateParallelData' :: CreateParallelData -> ParallelDataConfig
$sel:name:CreateParallelData' :: CreateParallelData -> Text
$sel:description:CreateParallelData' :: CreateParallelData -> Maybe Text
$sel:encryptionKey:CreateParallelData' :: CreateParallelData -> Maybe EncryptionKey
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"EncryptionKey" Text -> EncryptionKey -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EncryptionKey -> Pair) -> Maybe EncryptionKey -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionKey
encryptionKey,
            (Text
"Description" 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
description,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ParallelDataConfig" Text -> ParallelDataConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ParallelDataConfig
parallelDataConfig),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientToken)
          ]
      )

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

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

-- | /See:/ 'newCreateParallelDataResponse' smart constructor.
data CreateParallelDataResponse = CreateParallelDataResponse'
  { -- | The status of the parallel data resource. When the resource is ready for
    -- you to use, the status is @ACTIVE@.
    CreateParallelDataResponse -> Maybe ParallelDataStatus
status :: Prelude.Maybe ParallelDataStatus,
    -- | The custom name that you assigned to the parallel data resource.
    CreateParallelDataResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateParallelDataResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateParallelDataResponse -> CreateParallelDataResponse -> Bool
(CreateParallelDataResponse -> CreateParallelDataResponse -> Bool)
-> (CreateParallelDataResponse
    -> CreateParallelDataResponse -> Bool)
-> Eq CreateParallelDataResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateParallelDataResponse -> CreateParallelDataResponse -> Bool
$c/= :: CreateParallelDataResponse -> CreateParallelDataResponse -> Bool
== :: CreateParallelDataResponse -> CreateParallelDataResponse -> Bool
$c== :: CreateParallelDataResponse -> CreateParallelDataResponse -> Bool
Prelude.Eq, ReadPrec [CreateParallelDataResponse]
ReadPrec CreateParallelDataResponse
Int -> ReadS CreateParallelDataResponse
ReadS [CreateParallelDataResponse]
(Int -> ReadS CreateParallelDataResponse)
-> ReadS [CreateParallelDataResponse]
-> ReadPrec CreateParallelDataResponse
-> ReadPrec [CreateParallelDataResponse]
-> Read CreateParallelDataResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateParallelDataResponse]
$creadListPrec :: ReadPrec [CreateParallelDataResponse]
readPrec :: ReadPrec CreateParallelDataResponse
$creadPrec :: ReadPrec CreateParallelDataResponse
readList :: ReadS [CreateParallelDataResponse]
$creadList :: ReadS [CreateParallelDataResponse]
readsPrec :: Int -> ReadS CreateParallelDataResponse
$creadsPrec :: Int -> ReadS CreateParallelDataResponse
Prelude.Read, Int -> CreateParallelDataResponse -> ShowS
[CreateParallelDataResponse] -> ShowS
CreateParallelDataResponse -> String
(Int -> CreateParallelDataResponse -> ShowS)
-> (CreateParallelDataResponse -> String)
-> ([CreateParallelDataResponse] -> ShowS)
-> Show CreateParallelDataResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateParallelDataResponse] -> ShowS
$cshowList :: [CreateParallelDataResponse] -> ShowS
show :: CreateParallelDataResponse -> String
$cshow :: CreateParallelDataResponse -> String
showsPrec :: Int -> CreateParallelDataResponse -> ShowS
$cshowsPrec :: Int -> CreateParallelDataResponse -> ShowS
Prelude.Show, (forall x.
 CreateParallelDataResponse -> Rep CreateParallelDataResponse x)
-> (forall x.
    Rep CreateParallelDataResponse x -> CreateParallelDataResponse)
-> Generic CreateParallelDataResponse
forall x.
Rep CreateParallelDataResponse x -> CreateParallelDataResponse
forall x.
CreateParallelDataResponse -> Rep CreateParallelDataResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateParallelDataResponse x -> CreateParallelDataResponse
$cfrom :: forall x.
CreateParallelDataResponse -> Rep CreateParallelDataResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateParallelDataResponse' 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', 'createParallelDataResponse_status' - The status of the parallel data resource. When the resource is ready for
-- you to use, the status is @ACTIVE@.
--
-- 'name', 'createParallelDataResponse_name' - The custom name that you assigned to the parallel data resource.
--
-- 'httpStatus', 'createParallelDataResponse_httpStatus' - The response's http status code.
newCreateParallelDataResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateParallelDataResponse
newCreateParallelDataResponse :: Int -> CreateParallelDataResponse
newCreateParallelDataResponse Int
pHttpStatus_ =
  CreateParallelDataResponse' :: Maybe ParallelDataStatus
-> Maybe Text -> Int -> CreateParallelDataResponse
CreateParallelDataResponse'
    { $sel:status:CreateParallelDataResponse' :: Maybe ParallelDataStatus
status =
        Maybe ParallelDataStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateParallelDataResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateParallelDataResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The status of the parallel data resource. When the resource is ready for
-- you to use, the status is @ACTIVE@.
createParallelDataResponse_status :: Lens.Lens' CreateParallelDataResponse (Prelude.Maybe ParallelDataStatus)
createParallelDataResponse_status :: (Maybe ParallelDataStatus -> f (Maybe ParallelDataStatus))
-> CreateParallelDataResponse -> f CreateParallelDataResponse
createParallelDataResponse_status = (CreateParallelDataResponse -> Maybe ParallelDataStatus)
-> (CreateParallelDataResponse
    -> Maybe ParallelDataStatus -> CreateParallelDataResponse)
-> Lens
     CreateParallelDataResponse
     CreateParallelDataResponse
     (Maybe ParallelDataStatus)
     (Maybe ParallelDataStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateParallelDataResponse' {Maybe ParallelDataStatus
status :: Maybe ParallelDataStatus
$sel:status:CreateParallelDataResponse' :: CreateParallelDataResponse -> Maybe ParallelDataStatus
status} -> Maybe ParallelDataStatus
status) (\s :: CreateParallelDataResponse
s@CreateParallelDataResponse' {} Maybe ParallelDataStatus
a -> CreateParallelDataResponse
s {$sel:status:CreateParallelDataResponse' :: Maybe ParallelDataStatus
status = Maybe ParallelDataStatus
a} :: CreateParallelDataResponse)

-- | The custom name that you assigned to the parallel data resource.
createParallelDataResponse_name :: Lens.Lens' CreateParallelDataResponse (Prelude.Maybe Prelude.Text)
createParallelDataResponse_name :: (Maybe Text -> f (Maybe Text))
-> CreateParallelDataResponse -> f CreateParallelDataResponse
createParallelDataResponse_name = (CreateParallelDataResponse -> Maybe Text)
-> (CreateParallelDataResponse
    -> Maybe Text -> CreateParallelDataResponse)
-> Lens
     CreateParallelDataResponse
     CreateParallelDataResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateParallelDataResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateParallelDataResponse' :: CreateParallelDataResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateParallelDataResponse
s@CreateParallelDataResponse' {} Maybe Text
a -> CreateParallelDataResponse
s {$sel:name:CreateParallelDataResponse' :: Maybe Text
name = Maybe Text
a} :: CreateParallelDataResponse)

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

instance Prelude.NFData CreateParallelDataResponse