{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_format,
    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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Forecast.Types
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 format of the exported data, CSV or PARQUET. The default value is
    -- CSV.
    CreateForecastExportJob -> Maybe Text
format :: Prelude.Maybe Prelude.Text,
    -- | 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
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
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. 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:
--
-- 'format', 'createForecastExportJob_format' - The format of the exported data, CSV or PARQUET. The default value is
-- CSV.
--
-- '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'
      { $sel:format:CreateForecastExportJob' :: Maybe Text
format = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateForecastExportJob' :: Maybe [Tag]
tags = 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 format of the exported data, CSV or PARQUET. The default value is
-- CSV.
createForecastExportJob_format :: Lens.Lens' CreateForecastExportJob (Prelude.Maybe Prelude.Text)
createForecastExportJob_format :: Lens' CreateForecastExportJob (Maybe Text)
createForecastExportJob_format = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateForecastExportJob' {Maybe Text
format :: Maybe Text
$sel:format:CreateForecastExportJob' :: CreateForecastExportJob -> Maybe Text
format} -> Maybe Text
format) (\s :: CreateForecastExportJob
s@CreateForecastExportJob' {} Maybe Text
a -> CreateForecastExportJob
s {$sel:format:CreateForecastExportJob' :: Maybe Text
format = Maybe Text
a} :: 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_tags :: Lens.Lens' CreateForecastExportJob (Prelude.Maybe [Tag])
createForecastExportJob_tags :: Lens' CreateForecastExportJob (Maybe [Tag])
createForecastExportJob_tags = 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) 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

-- | The name for the forecast export job.
createForecastExportJob_forecastExportJobName :: Lens.Lens' CreateForecastExportJob Prelude.Text
createForecastExportJob_forecastExportJobName :: Lens' CreateForecastExportJob Text
createForecastExportJob_forecastExportJobName = 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 :: Lens' CreateForecastExportJob Text
createForecastExportJob_forecastArn = 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 :: Lens' CreateForecastExportJob DataDestination
createForecastExportJob_destination = 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 :: (Service -> Service)
-> CreateForecastExportJob -> Request CreateForecastExportJob
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 CreateForecastExportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateForecastExportJob)))
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 -> Int -> CreateForecastExportJobResponse
CreateForecastExportJobResponse'
            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
"ForecastExportJobArn")
            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 CreateForecastExportJob where
  hashWithSalt :: Int -> CreateForecastExportJob -> Int
hashWithSalt Int
_salt CreateForecastExportJob' {Maybe [Tag]
Maybe Text
Text
DataDestination
destination :: DataDestination
forecastArn :: Text
forecastExportJobName :: Text
tags :: Maybe [Tag]
format :: Maybe Text
$sel:destination:CreateForecastExportJob' :: CreateForecastExportJob -> DataDestination
$sel:forecastArn:CreateForecastExportJob' :: CreateForecastExportJob -> Text
$sel:forecastExportJobName:CreateForecastExportJob' :: CreateForecastExportJob -> Text
$sel:tags:CreateForecastExportJob' :: CreateForecastExportJob -> Maybe [Tag]
$sel:format:CreateForecastExportJob' :: CreateForecastExportJob -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
format
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
forecastExportJobName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
forecastArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DataDestination
destination

instance Prelude.NFData CreateForecastExportJob where
  rnf :: CreateForecastExportJob -> ()
rnf CreateForecastExportJob' {Maybe [Tag]
Maybe Text
Text
DataDestination
destination :: DataDestination
forecastArn :: Text
forecastExportJobName :: Text
tags :: Maybe [Tag]
format :: Maybe Text
$sel:destination:CreateForecastExportJob' :: CreateForecastExportJob -> DataDestination
$sel:forecastArn:CreateForecastExportJob' :: CreateForecastExportJob -> Text
$sel:forecastExportJobName:CreateForecastExportJob' :: CreateForecastExportJob -> Text
$sel:tags:CreateForecastExportJob' :: CreateForecastExportJob -> Maybe [Tag]
$sel:format:CreateForecastExportJob' :: CreateForecastExportJob -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
format
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
forecastExportJobName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
forecastArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DataDestination
destination

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

instance Data.ToJSON CreateForecastExportJob where
  toJSON :: CreateForecastExportJob -> Value
toJSON CreateForecastExportJob' {Maybe [Tag]
Maybe Text
Text
DataDestination
destination :: DataDestination
forecastArn :: Text
forecastExportJobName :: Text
tags :: Maybe [Tag]
format :: Maybe Text
$sel:destination:CreateForecastExportJob' :: CreateForecastExportJob -> DataDestination
$sel:forecastArn:CreateForecastExportJob' :: CreateForecastExportJob -> Text
$sel:forecastExportJobName:CreateForecastExportJob' :: CreateForecastExportJob -> Text
$sel:tags:CreateForecastExportJob' :: CreateForecastExportJob -> Maybe [Tag]
$sel:format:CreateForecastExportJob' :: CreateForecastExportJob -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Format" 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
format,
            (Key
"Tags" 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 [Tag]
tags,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"ForecastExportJobName"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
forecastExportJobName
              ),
            forall a. a -> Maybe a
Prelude.Just (Key
"ForecastArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
forecastArn),
            forall a. a -> Maybe a
Prelude.Just (Key
"Destination" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DataDestination
destination)
          ]
      )

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

instance Data.ToQuery CreateForecastExportJob where
  toQuery :: CreateForecastExportJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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.
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'
    { $sel:forecastExportJobArn:CreateForecastExportJobResponse' :: Maybe Text
forecastExportJobArn =
        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 :: Lens' CreateForecastExportJobResponse (Maybe Text)
createForecastExportJobResponse_forecastExportJobArn = 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 :: Lens' CreateForecastExportJobResponse Int
createForecastExportJobResponse_httpStatus = 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
  where
  rnf :: CreateForecastExportJobResponse -> ()
rnf CreateForecastExportJobResponse' {Int
Maybe Text
httpStatus :: Int
forecastExportJobArn :: Maybe Text
$sel:httpStatus:CreateForecastExportJobResponse' :: CreateForecastExportJobResponse -> Int
$sel:forecastExportJobArn:CreateForecastExportJobResponse' :: CreateForecastExportJobResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
forecastExportJobArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus