{-# 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.Forecast.CreateForecastExportJob
-- 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)
--
-- Exports a forecast created by the CreateForecast operation to your
-- Amazon Simple Storage Service (Amazon S3) bucket. The forecast file name
-- will match the following conventions:
--
-- \<ForecastExportJobName>_\<ExportTimestamp>_\<PartNumber>
--
-- where the \<ExportTimestamp> component is in Java SimpleDateFormat
-- (yyyy-MM-ddTHH-mm-ssZ).
--
-- You must specify a DataDestination object that includes an AWS Identity
-- and Access Management (IAM) role that Amazon Forecast can assume to
-- access the Amazon S3 bucket. For more information, see
-- aws-forecast-iam-roles.
--
-- For more information, see howitworks-forecast.
--
-- To get a list of all your forecast export jobs, use the
-- ListForecastExportJobs operation.
--
-- The @Status@ of the forecast export job must be @ACTIVE@ before you can
-- access the forecast in your Amazon S3 bucket. To get the status, use the
-- DescribeForecastExportJob operation.
module Amazonka.Forecast.CreateForecastExportJob
  ( -- * Creating a Request
    CreateForecastExportJob (..),
    newCreateForecastExportJob,

    -- * Request Lenses
    createForecastExportJob_tags,
    createForecastExportJob_forecastExportJobName,
    createForecastExportJob_forecastArn,
    createForecastExportJob_destination,

    -- * Destructuring the Response
    CreateForecastExportJobResponse (..),
    newCreateForecastExportJobResponse,

    -- * Response Lenses
    createForecastExportJobResponse_forecastExportJobArn,
    createForecastExportJobResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Forecast.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:/ 'newCreateForecastExportJob' smart constructor.
data CreateForecastExportJob = CreateForecastExportJob'
  { -- | The optional metadata that you apply to the forecast export job to help
    -- you categorize and organize them. Each tag consists of a key and an
    -- optional value, both of which you define.
    --
    -- The following basic restrictions apply to tags:
    --
    -- -   Maximum number of tags per resource - 50.
    --
    -- -   For each resource, each tag key must be unique, and each tag key can
    --     have only one value.
    --
    -- -   Maximum key length - 128 Unicode characters in UTF-8.
    --
    -- -   Maximum value length - 256 Unicode characters in UTF-8.
    --
    -- -   If your tagging schema is used across multiple services and
    --     resources, remember that other services may have restrictions on
    --     allowed characters. Generally allowed characters are: letters,
    --     numbers, and spaces representable in UTF-8, and the following
    --     characters: + - = . _ : \/ \@.
    --
    -- -   Tag keys and values are case sensitive.
    --
    -- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
    --     such as a prefix for keys as it is reserved for AWS use. You cannot
    --     edit or delete tag keys with this prefix. Values can have this
    --     prefix. If a tag value has @aws@ as its prefix but the key does not,
    --     then Forecast considers it to be a user tag and will count against
    --     the limit of 50 tags. Tags with only the key prefix of @aws@ do not
    --     count against your tags per resource limit.
    CreateForecastExportJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name for the forecast export job.
    CreateForecastExportJob -> Text
forecastExportJobName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the forecast that you want to export.
    CreateForecastExportJob -> Text
forecastArn :: Prelude.Text,
    -- | The location where you want to save the forecast and an AWS Identity and
    -- Access Management (IAM) role that Amazon Forecast can assume to access
    -- the location. The forecast must be exported to an Amazon S3 bucket.
    --
    -- If encryption is used, @Destination@ must include an AWS Key Management
    -- Service (KMS) key. The IAM role must allow Amazon Forecast permission to
    -- access the key.
    CreateForecastExportJob -> DataDestination
destination :: DataDestination
  }
  deriving (CreateForecastExportJob -> CreateForecastExportJob -> Bool
(CreateForecastExportJob -> CreateForecastExportJob -> Bool)
-> (CreateForecastExportJob -> CreateForecastExportJob -> Bool)
-> Eq CreateForecastExportJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateForecastExportJob -> CreateForecastExportJob -> Bool
$c/= :: CreateForecastExportJob -> CreateForecastExportJob -> Bool
== :: CreateForecastExportJob -> CreateForecastExportJob -> Bool
$c== :: CreateForecastExportJob -> CreateForecastExportJob -> Bool
Prelude.Eq, Int -> CreateForecastExportJob -> ShowS
[CreateForecastExportJob] -> ShowS
CreateForecastExportJob -> String
(Int -> CreateForecastExportJob -> ShowS)
-> (CreateForecastExportJob -> String)
-> ([CreateForecastExportJob] -> ShowS)
-> Show CreateForecastExportJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateForecastExportJob] -> ShowS
$cshowList :: [CreateForecastExportJob] -> ShowS
show :: CreateForecastExportJob -> String
$cshow :: CreateForecastExportJob -> String
showsPrec :: Int -> CreateForecastExportJob -> ShowS
$cshowsPrec :: Int -> CreateForecastExportJob -> ShowS
Prelude.Show, (forall x.
 CreateForecastExportJob -> Rep CreateForecastExportJob x)
-> (forall x.
    Rep CreateForecastExportJob x -> CreateForecastExportJob)
-> Generic CreateForecastExportJob
forall x. Rep CreateForecastExportJob x -> CreateForecastExportJob
forall x. CreateForecastExportJob -> Rep CreateForecastExportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateForecastExportJob x -> CreateForecastExportJob
$cfrom :: forall x. CreateForecastExportJob -> Rep CreateForecastExportJob x
Prelude.Generic)

-- |
-- Create a value of 'CreateForecastExportJob' 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:
--
-- 'tags', 'createForecastExportJob_tags' - The optional metadata that you apply to the forecast export job to help
-- you categorize and organize them. Each tag consists of a key and an
-- optional value, both of which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50.
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8.
--
-- -   Maximum value length - 256 Unicode characters in UTF-8.
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for keys as it is reserved for AWS use. You cannot
--     edit or delete tag keys with this prefix. Values can have this
--     prefix. If a tag value has @aws@ as its prefix but the key does not,
--     then Forecast considers it to be a user tag and will count against
--     the limit of 50 tags. Tags with only the key prefix of @aws@ do not
--     count against your tags per resource limit.
--
-- 'forecastExportJobName', 'createForecastExportJob_forecastExportJobName' - The name for the forecast export job.
--
-- 'forecastArn', 'createForecastExportJob_forecastArn' - The Amazon Resource Name (ARN) of the forecast that you want to export.
--
-- 'destination', 'createForecastExportJob_destination' - The location where you want to save the forecast and an AWS Identity and
-- Access Management (IAM) role that Amazon Forecast can assume to access
-- the location. The forecast must be exported to an Amazon S3 bucket.
--
-- If encryption is used, @Destination@ must include an AWS Key Management
-- Service (KMS) key. The IAM role must allow Amazon Forecast permission to
-- access the key.
newCreateForecastExportJob ::
  -- | 'forecastExportJobName'
  Prelude.Text ->
  -- | 'forecastArn'
  Prelude.Text ->
  -- | 'destination'
  DataDestination ->
  CreateForecastExportJob
newCreateForecastExportJob :: Text -> Text -> DataDestination -> CreateForecastExportJob
newCreateForecastExportJob
  Text
pForecastExportJobName_
  Text
pForecastArn_
  DataDestination
pDestination_ =
    CreateForecastExportJob' :: Maybe [Tag]
-> Text -> Text -> DataDestination -> CreateForecastExportJob
CreateForecastExportJob'
      { $sel:tags:CreateForecastExportJob' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:forecastExportJobName:CreateForecastExportJob' :: Text
forecastExportJobName = Text
pForecastExportJobName_,
        $sel:forecastArn:CreateForecastExportJob' :: Text
forecastArn = Text
pForecastArn_,
        $sel:destination:CreateForecastExportJob' :: DataDestination
destination = DataDestination
pDestination_
      }

-- | The optional metadata that you apply to the forecast export job to help
-- you categorize and organize them. Each tag consists of a key and an
-- optional value, both of which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50.
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8.
--
-- -   Maximum value length - 256 Unicode characters in UTF-8.
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for keys as it is reserved for AWS use. You cannot
--     edit or delete tag keys with this prefix. Values can have this
--     prefix. If a tag value has @aws@ as its prefix but the key does not,
--     then Forecast considers it to be a user tag and will count against
--     the limit of 50 tags. Tags with only the key prefix of @aws@ do not
--     count against your tags per resource limit.
createForecastExportJob_tags :: Lens.Lens' CreateForecastExportJob (Prelude.Maybe [Tag])
createForecastExportJob_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateForecastExportJob -> f CreateForecastExportJob
createForecastExportJob_tags = (CreateForecastExportJob -> Maybe [Tag])
-> (CreateForecastExportJob
    -> Maybe [Tag] -> CreateForecastExportJob)
-> Lens
     CreateForecastExportJob
     CreateForecastExportJob
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateForecastExportJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateForecastExportJob' :: CreateForecastExportJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateForecastExportJob
s@CreateForecastExportJob' {} Maybe [Tag]
a -> CreateForecastExportJob
s {$sel:tags:CreateForecastExportJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateForecastExportJob) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateForecastExportJob -> f CreateForecastExportJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateForecastExportJob
-> f CreateForecastExportJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name for the forecast export job.
createForecastExportJob_forecastExportJobName :: Lens.Lens' CreateForecastExportJob Prelude.Text
createForecastExportJob_forecastExportJobName :: (Text -> f Text)
-> CreateForecastExportJob -> f CreateForecastExportJob
createForecastExportJob_forecastExportJobName = (CreateForecastExportJob -> Text)
-> (CreateForecastExportJob -> Text -> CreateForecastExportJob)
-> Lens CreateForecastExportJob CreateForecastExportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateForecastExportJob' {Text
forecastExportJobName :: Text
$sel:forecastExportJobName:CreateForecastExportJob' :: CreateForecastExportJob -> Text
forecastExportJobName} -> Text
forecastExportJobName) (\s :: CreateForecastExportJob
s@CreateForecastExportJob' {} Text
a -> CreateForecastExportJob
s {$sel:forecastExportJobName:CreateForecastExportJob' :: Text
forecastExportJobName = Text
a} :: CreateForecastExportJob)

-- | The Amazon Resource Name (ARN) of the forecast that you want to export.
createForecastExportJob_forecastArn :: Lens.Lens' CreateForecastExportJob Prelude.Text
createForecastExportJob_forecastArn :: (Text -> f Text)
-> CreateForecastExportJob -> f CreateForecastExportJob
createForecastExportJob_forecastArn = (CreateForecastExportJob -> Text)
-> (CreateForecastExportJob -> Text -> CreateForecastExportJob)
-> Lens CreateForecastExportJob CreateForecastExportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateForecastExportJob' {Text
forecastArn :: Text
$sel:forecastArn:CreateForecastExportJob' :: CreateForecastExportJob -> Text
forecastArn} -> Text
forecastArn) (\s :: CreateForecastExportJob
s@CreateForecastExportJob' {} Text
a -> CreateForecastExportJob
s {$sel:forecastArn:CreateForecastExportJob' :: Text
forecastArn = Text
a} :: CreateForecastExportJob)

-- | The location where you want to save the forecast and an AWS Identity and
-- Access Management (IAM) role that Amazon Forecast can assume to access
-- the location. The forecast must be exported to an Amazon S3 bucket.
--
-- If encryption is used, @Destination@ must include an AWS Key Management
-- Service (KMS) key. The IAM role must allow Amazon Forecast permission to
-- access the key.
createForecastExportJob_destination :: Lens.Lens' CreateForecastExportJob DataDestination
createForecastExportJob_destination :: (DataDestination -> f DataDestination)
-> CreateForecastExportJob -> f CreateForecastExportJob
createForecastExportJob_destination = (CreateForecastExportJob -> DataDestination)
-> (CreateForecastExportJob
    -> DataDestination -> CreateForecastExportJob)
-> Lens
     CreateForecastExportJob
     CreateForecastExportJob
     DataDestination
     DataDestination
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateForecastExportJob' {DataDestination
destination :: DataDestination
$sel:destination:CreateForecastExportJob' :: CreateForecastExportJob -> DataDestination
destination} -> DataDestination
destination) (\s :: CreateForecastExportJob
s@CreateForecastExportJob' {} DataDestination
a -> CreateForecastExportJob
s {$sel:destination:CreateForecastExportJob' :: DataDestination
destination = DataDestination
a} :: CreateForecastExportJob)

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

instance Prelude.NFData CreateForecastExportJob

instance Core.ToHeaders CreateForecastExportJob where
  toHeaders :: CreateForecastExportJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateForecastExportJob -> 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
"AmazonForecast.CreateForecastExportJob" ::
                          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 CreateForecastExportJob where
  toJSON :: CreateForecastExportJob -> Value
toJSON CreateForecastExportJob' {Maybe [Tag]
Text
DataDestination
destination :: DataDestination
forecastArn :: Text
forecastExportJobName :: Text
tags :: Maybe [Tag]
$sel:destination:CreateForecastExportJob' :: CreateForecastExportJob -> DataDestination
$sel:forecastArn:CreateForecastExportJob' :: CreateForecastExportJob -> Text
$sel:forecastExportJobName:CreateForecastExportJob' :: CreateForecastExportJob -> Text
$sel:tags:CreateForecastExportJob' :: CreateForecastExportJob -> Maybe [Tag]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ForecastExportJobName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
forecastExportJobName
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ForecastArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
forecastArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Destination" Text -> DataDestination -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DataDestination
destination)
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateForecastExportJobResponse' 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:
--
-- 'forecastExportJobArn', 'createForecastExportJobResponse_forecastExportJobArn' - The Amazon Resource Name (ARN) of the export job.
--
-- 'httpStatus', 'createForecastExportJobResponse_httpStatus' - The response's http status code.
newCreateForecastExportJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateForecastExportJobResponse
newCreateForecastExportJobResponse :: Int -> CreateForecastExportJobResponse
newCreateForecastExportJobResponse Int
pHttpStatus_ =
  CreateForecastExportJobResponse' :: Maybe Text -> Int -> CreateForecastExportJobResponse
CreateForecastExportJobResponse'
    { $sel:forecastExportJobArn:CreateForecastExportJobResponse' :: Maybe Text
forecastExportJobArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateForecastExportJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the export job.
createForecastExportJobResponse_forecastExportJobArn :: Lens.Lens' CreateForecastExportJobResponse (Prelude.Maybe Prelude.Text)
createForecastExportJobResponse_forecastExportJobArn :: (Maybe Text -> f (Maybe Text))
-> CreateForecastExportJobResponse
-> f CreateForecastExportJobResponse
createForecastExportJobResponse_forecastExportJobArn = (CreateForecastExportJobResponse -> Maybe Text)
-> (CreateForecastExportJobResponse
    -> Maybe Text -> CreateForecastExportJobResponse)
-> Lens
     CreateForecastExportJobResponse
     CreateForecastExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateForecastExportJobResponse' {Maybe Text
forecastExportJobArn :: Maybe Text
$sel:forecastExportJobArn:CreateForecastExportJobResponse' :: CreateForecastExportJobResponse -> Maybe Text
forecastExportJobArn} -> Maybe Text
forecastExportJobArn) (\s :: CreateForecastExportJobResponse
s@CreateForecastExportJobResponse' {} Maybe Text
a -> CreateForecastExportJobResponse
s {$sel:forecastExportJobArn:CreateForecastExportJobResponse' :: Maybe Text
forecastExportJobArn = Maybe Text
a} :: CreateForecastExportJobResponse)

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

instance
  Prelude.NFData
    CreateForecastExportJobResponse