{-# 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.AppFlow.DescribeFlow
-- 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)
--
-- Provides a description of the specified flow.
module Amazonka.AppFlow.DescribeFlow
  ( -- * Creating a Request
    DescribeFlow (..),
    newDescribeFlow,

    -- * Request Lenses
    describeFlow_flowName,

    -- * Destructuring the Response
    DescribeFlowResponse (..),
    newDescribeFlowResponse,

    -- * Response Lenses
    describeFlowResponse_lastUpdatedBy,
    describeFlowResponse_flowArn,
    describeFlowResponse_lastUpdatedAt,
    describeFlowResponse_createdAt,
    describeFlowResponse_createdBy,
    describeFlowResponse_tasks,
    describeFlowResponse_triggerConfig,
    describeFlowResponse_flowName,
    describeFlowResponse_sourceFlowConfig,
    describeFlowResponse_flowStatusMessage,
    describeFlowResponse_kmsArn,
    describeFlowResponse_lastRunExecutionDetails,
    describeFlowResponse_flowStatus,
    describeFlowResponse_destinationFlowConfigList,
    describeFlowResponse_description,
    describeFlowResponse_tags,
    describeFlowResponse_httpStatus,
  )
where

import Amazonka.AppFlow.Types
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

-- | /See:/ 'newDescribeFlow' smart constructor.
data DescribeFlow = DescribeFlow'
  { -- | The specified name of the flow. Spaces are not allowed. Use underscores
    -- (_) or hyphens (-) only.
    DescribeFlow -> Text
flowName :: Prelude.Text
  }
  deriving (DescribeFlow -> DescribeFlow -> Bool
(DescribeFlow -> DescribeFlow -> Bool)
-> (DescribeFlow -> DescribeFlow -> Bool) -> Eq DescribeFlow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFlow -> DescribeFlow -> Bool
$c/= :: DescribeFlow -> DescribeFlow -> Bool
== :: DescribeFlow -> DescribeFlow -> Bool
$c== :: DescribeFlow -> DescribeFlow -> Bool
Prelude.Eq, ReadPrec [DescribeFlow]
ReadPrec DescribeFlow
Int -> ReadS DescribeFlow
ReadS [DescribeFlow]
(Int -> ReadS DescribeFlow)
-> ReadS [DescribeFlow]
-> ReadPrec DescribeFlow
-> ReadPrec [DescribeFlow]
-> Read DescribeFlow
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFlow]
$creadListPrec :: ReadPrec [DescribeFlow]
readPrec :: ReadPrec DescribeFlow
$creadPrec :: ReadPrec DescribeFlow
readList :: ReadS [DescribeFlow]
$creadList :: ReadS [DescribeFlow]
readsPrec :: Int -> ReadS DescribeFlow
$creadsPrec :: Int -> ReadS DescribeFlow
Prelude.Read, Int -> DescribeFlow -> ShowS
[DescribeFlow] -> ShowS
DescribeFlow -> String
(Int -> DescribeFlow -> ShowS)
-> (DescribeFlow -> String)
-> ([DescribeFlow] -> ShowS)
-> Show DescribeFlow
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFlow] -> ShowS
$cshowList :: [DescribeFlow] -> ShowS
show :: DescribeFlow -> String
$cshow :: DescribeFlow -> String
showsPrec :: Int -> DescribeFlow -> ShowS
$cshowsPrec :: Int -> DescribeFlow -> ShowS
Prelude.Show, (forall x. DescribeFlow -> Rep DescribeFlow x)
-> (forall x. Rep DescribeFlow x -> DescribeFlow)
-> Generic DescribeFlow
forall x. Rep DescribeFlow x -> DescribeFlow
forall x. DescribeFlow -> Rep DescribeFlow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeFlow x -> DescribeFlow
$cfrom :: forall x. DescribeFlow -> Rep DescribeFlow x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFlow' 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:
--
-- 'flowName', 'describeFlow_flowName' - The specified name of the flow. Spaces are not allowed. Use underscores
-- (_) or hyphens (-) only.
newDescribeFlow ::
  -- | 'flowName'
  Prelude.Text ->
  DescribeFlow
newDescribeFlow :: Text -> DescribeFlow
newDescribeFlow Text
pFlowName_ =
  DescribeFlow' :: Text -> DescribeFlow
DescribeFlow' {$sel:flowName:DescribeFlow' :: Text
flowName = Text
pFlowName_}

-- | The specified name of the flow. Spaces are not allowed. Use underscores
-- (_) or hyphens (-) only.
describeFlow_flowName :: Lens.Lens' DescribeFlow Prelude.Text
describeFlow_flowName :: (Text -> f Text) -> DescribeFlow -> f DescribeFlow
describeFlow_flowName = (DescribeFlow -> Text)
-> (DescribeFlow -> Text -> DescribeFlow)
-> Lens DescribeFlow DescribeFlow Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlow' {Text
flowName :: Text
$sel:flowName:DescribeFlow' :: DescribeFlow -> Text
flowName} -> Text
flowName) (\s :: DescribeFlow
s@DescribeFlow' {} Text
a -> DescribeFlow
s {$sel:flowName:DescribeFlow' :: Text
flowName = Text
a} :: DescribeFlow)

instance Core.AWSRequest DescribeFlow where
  type AWSResponse DescribeFlow = DescribeFlowResponse
  request :: DescribeFlow -> Request DescribeFlow
request = Service -> DescribeFlow -> Request DescribeFlow
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeFlow
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeFlow)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeFlow))
-> Logger
-> Service
-> Proxy DescribeFlow
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeFlow)))
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
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe [Task]
-> Maybe TriggerConfig
-> Maybe Text
-> Maybe SourceFlowConfig
-> Maybe Text
-> Maybe Text
-> Maybe ExecutionDetails
-> Maybe FlowStatus
-> Maybe [DestinationFlowConfig]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeFlowResponse
DescribeFlowResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe [Task]
 -> Maybe TriggerConfig
 -> Maybe Text
 -> Maybe SourceFlowConfig
 -> Maybe Text
 -> Maybe Text
 -> Maybe ExecutionDetails
 -> Maybe FlowStatus
 -> Maybe [DestinationFlowConfig]
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> DescribeFlowResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Task]
      -> Maybe TriggerConfig
      -> Maybe Text
      -> Maybe SourceFlowConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe ExecutionDetails
      -> Maybe FlowStatus
      -> Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
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
"lastUpdatedBy")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Task]
   -> Maybe TriggerConfig
   -> Maybe Text
   -> Maybe SourceFlowConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe ExecutionDetails
   -> Maybe FlowStatus
   -> Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Task]
      -> Maybe TriggerConfig
      -> Maybe Text
      -> Maybe SourceFlowConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe ExecutionDetails
      -> Maybe FlowStatus
      -> Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
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
"flowArn")
            Either
  String
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Task]
   -> Maybe TriggerConfig
   -> Maybe Text
   -> Maybe SourceFlowConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe ExecutionDetails
   -> Maybe FlowStatus
   -> Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe [Task]
      -> Maybe TriggerConfig
      -> Maybe Text
      -> Maybe SourceFlowConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe ExecutionDetails
      -> Maybe FlowStatus
      -> Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastUpdatedAt")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe [Task]
   -> Maybe TriggerConfig
   -> Maybe Text
   -> Maybe SourceFlowConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe ExecutionDetails
   -> Maybe FlowStatus
   -> Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe [Task]
      -> Maybe TriggerConfig
      -> Maybe Text
      -> Maybe SourceFlowConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe ExecutionDetails
      -> Maybe FlowStatus
      -> Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdAt")
            Either
  String
  (Maybe Text
   -> Maybe [Task]
   -> Maybe TriggerConfig
   -> Maybe Text
   -> Maybe SourceFlowConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe ExecutionDetails
   -> Maybe FlowStatus
   -> Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Task]
      -> Maybe TriggerConfig
      -> Maybe Text
      -> Maybe SourceFlowConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe ExecutionDetails
      -> Maybe FlowStatus
      -> Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
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
"createdBy")
            Either
  String
  (Maybe [Task]
   -> Maybe TriggerConfig
   -> Maybe Text
   -> Maybe SourceFlowConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe ExecutionDetails
   -> Maybe FlowStatus
   -> Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe [Task])
-> Either
     String
     (Maybe TriggerConfig
      -> Maybe Text
      -> Maybe SourceFlowConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe ExecutionDetails
      -> Maybe FlowStatus
      -> Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Task]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tasks" Either String (Maybe (Maybe [Task]))
-> Maybe [Task] -> Either String (Maybe [Task])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Task]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe TriggerConfig
   -> Maybe Text
   -> Maybe SourceFlowConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe ExecutionDetails
   -> Maybe FlowStatus
   -> Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe TriggerConfig)
-> Either
     String
     (Maybe Text
      -> Maybe SourceFlowConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe ExecutionDetails
      -> Maybe FlowStatus
      -> Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe TriggerConfig)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"triggerConfig")
            Either
  String
  (Maybe Text
   -> Maybe SourceFlowConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe ExecutionDetails
   -> Maybe FlowStatus
   -> Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe SourceFlowConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe ExecutionDetails
      -> Maybe FlowStatus
      -> Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
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
"flowName")
            Either
  String
  (Maybe SourceFlowConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe ExecutionDetails
   -> Maybe FlowStatus
   -> Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe SourceFlowConfig)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ExecutionDetails
      -> Maybe FlowStatus
      -> Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe SourceFlowConfig)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"sourceFlowConfig")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ExecutionDetails
   -> Maybe FlowStatus
   -> Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ExecutionDetails
      -> Maybe FlowStatus
      -> Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
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
"flowStatusMessage")
            Either
  String
  (Maybe Text
   -> Maybe ExecutionDetails
   -> Maybe FlowStatus
   -> Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ExecutionDetails
      -> Maybe FlowStatus
      -> Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
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
"kmsArn")
            Either
  String
  (Maybe ExecutionDetails
   -> Maybe FlowStatus
   -> Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe ExecutionDetails)
-> Either
     String
     (Maybe FlowStatus
      -> Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ExecutionDetails)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastRunExecutionDetails")
            Either
  String
  (Maybe FlowStatus
   -> Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe FlowStatus)
-> Either
     String
     (Maybe [DestinationFlowConfig]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeFlowResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe FlowStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"flowStatus")
            Either
  String
  (Maybe [DestinationFlowConfig]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeFlowResponse)
-> Either String (Maybe [DestinationFlowConfig])
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> DescribeFlowResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [DestinationFlowConfig]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"destinationFlowConfigList"
                            Either String (Maybe (Maybe [DestinationFlowConfig]))
-> Maybe [DestinationFlowConfig]
-> Either String (Maybe [DestinationFlowConfig])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DestinationFlowConfig]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> DescribeFlowResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> DescribeFlowResponse)
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
"description")
            Either
  String (Maybe (HashMap Text Text) -> Int -> DescribeFlowResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DescribeFlowResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeFlowResponse)
-> Either String Int -> Either String DescribeFlowResponse
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 DescribeFlow

instance Prelude.NFData DescribeFlow

instance Core.ToHeaders DescribeFlow where
  toHeaders :: DescribeFlow -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeFlow -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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 DescribeFlow where
  toJSON :: DescribeFlow -> Value
toJSON DescribeFlow' {Text
flowName :: Text
$sel:flowName:DescribeFlow' :: DescribeFlow -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"flowName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
flowName)]
      )

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

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

-- | /See:/ 'newDescribeFlowResponse' smart constructor.
data DescribeFlowResponse = DescribeFlowResponse'
  { -- | Specifies the user name of the account that performed the most recent
    -- update.
    DescribeFlowResponse -> Maybe Text
lastUpdatedBy :: Prelude.Maybe Prelude.Text,
    -- | The flow\'s Amazon Resource Name (ARN).
    DescribeFlowResponse -> Maybe Text
flowArn :: Prelude.Maybe Prelude.Text,
    -- | Specifies when the flow was last updated.
    DescribeFlowResponse -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | Specifies when the flow was created.
    DescribeFlowResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The ARN of the user who created the flow.
    DescribeFlowResponse -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | A list of tasks that Amazon AppFlow performs while transferring the data
    -- in the flow run.
    DescribeFlowResponse -> Maybe [Task]
tasks :: Prelude.Maybe [Task],
    -- | The trigger settings that determine how and when the flow runs.
    DescribeFlowResponse -> Maybe TriggerConfig
triggerConfig :: Prelude.Maybe TriggerConfig,
    -- | The specified name of the flow. Spaces are not allowed. Use underscores
    -- (_) or hyphens (-) only.
    DescribeFlowResponse -> Maybe Text
flowName :: Prelude.Maybe Prelude.Text,
    -- | The configuration that controls how Amazon AppFlow retrieves data from
    -- the source connector.
    DescribeFlowResponse -> Maybe SourceFlowConfig
sourceFlowConfig :: Prelude.Maybe SourceFlowConfig,
    -- | Contains an error message if the flow status is in a suspended or error
    -- state. This applies only to scheduled or event-triggered flows.
    DescribeFlowResponse -> Maybe Text
flowStatusMessage :: Prelude.Maybe Prelude.Text,
    -- | The ARN (Amazon Resource Name) of the Key Management Service (KMS) key
    -- you provide for encryption. This is required if you do not want to use
    -- the Amazon AppFlow-managed KMS key. If you don\'t provide anything here,
    -- Amazon AppFlow uses the Amazon AppFlow-managed KMS key.
    DescribeFlowResponse -> Maybe Text
kmsArn :: Prelude.Maybe Prelude.Text,
    -- | Describes the details of the most recent flow run.
    DescribeFlowResponse -> Maybe ExecutionDetails
lastRunExecutionDetails :: Prelude.Maybe ExecutionDetails,
    -- | Indicates the current status of the flow.
    DescribeFlowResponse -> Maybe FlowStatus
flowStatus :: Prelude.Maybe FlowStatus,
    -- | The configuration that controls how Amazon AppFlow transfers data to the
    -- destination connector.
    DescribeFlowResponse -> Maybe [DestinationFlowConfig]
destinationFlowConfigList :: Prelude.Maybe [DestinationFlowConfig],
    -- | A description of the flow.
    DescribeFlowResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags used to organize, track, or control access for your flow.
    DescribeFlowResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeFlowResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeFlowResponse -> DescribeFlowResponse -> Bool
(DescribeFlowResponse -> DescribeFlowResponse -> Bool)
-> (DescribeFlowResponse -> DescribeFlowResponse -> Bool)
-> Eq DescribeFlowResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFlowResponse -> DescribeFlowResponse -> Bool
$c/= :: DescribeFlowResponse -> DescribeFlowResponse -> Bool
== :: DescribeFlowResponse -> DescribeFlowResponse -> Bool
$c== :: DescribeFlowResponse -> DescribeFlowResponse -> Bool
Prelude.Eq, ReadPrec [DescribeFlowResponse]
ReadPrec DescribeFlowResponse
Int -> ReadS DescribeFlowResponse
ReadS [DescribeFlowResponse]
(Int -> ReadS DescribeFlowResponse)
-> ReadS [DescribeFlowResponse]
-> ReadPrec DescribeFlowResponse
-> ReadPrec [DescribeFlowResponse]
-> Read DescribeFlowResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFlowResponse]
$creadListPrec :: ReadPrec [DescribeFlowResponse]
readPrec :: ReadPrec DescribeFlowResponse
$creadPrec :: ReadPrec DescribeFlowResponse
readList :: ReadS [DescribeFlowResponse]
$creadList :: ReadS [DescribeFlowResponse]
readsPrec :: Int -> ReadS DescribeFlowResponse
$creadsPrec :: Int -> ReadS DescribeFlowResponse
Prelude.Read, Int -> DescribeFlowResponse -> ShowS
[DescribeFlowResponse] -> ShowS
DescribeFlowResponse -> String
(Int -> DescribeFlowResponse -> ShowS)
-> (DescribeFlowResponse -> String)
-> ([DescribeFlowResponse] -> ShowS)
-> Show DescribeFlowResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFlowResponse] -> ShowS
$cshowList :: [DescribeFlowResponse] -> ShowS
show :: DescribeFlowResponse -> String
$cshow :: DescribeFlowResponse -> String
showsPrec :: Int -> DescribeFlowResponse -> ShowS
$cshowsPrec :: Int -> DescribeFlowResponse -> ShowS
Prelude.Show, (forall x. DescribeFlowResponse -> Rep DescribeFlowResponse x)
-> (forall x. Rep DescribeFlowResponse x -> DescribeFlowResponse)
-> Generic DescribeFlowResponse
forall x. Rep DescribeFlowResponse x -> DescribeFlowResponse
forall x. DescribeFlowResponse -> Rep DescribeFlowResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeFlowResponse x -> DescribeFlowResponse
$cfrom :: forall x. DescribeFlowResponse -> Rep DescribeFlowResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFlowResponse' 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:
--
-- 'lastUpdatedBy', 'describeFlowResponse_lastUpdatedBy' - Specifies the user name of the account that performed the most recent
-- update.
--
-- 'flowArn', 'describeFlowResponse_flowArn' - The flow\'s Amazon Resource Name (ARN).
--
-- 'lastUpdatedAt', 'describeFlowResponse_lastUpdatedAt' - Specifies when the flow was last updated.
--
-- 'createdAt', 'describeFlowResponse_createdAt' - Specifies when the flow was created.
--
-- 'createdBy', 'describeFlowResponse_createdBy' - The ARN of the user who created the flow.
--
-- 'tasks', 'describeFlowResponse_tasks' - A list of tasks that Amazon AppFlow performs while transferring the data
-- in the flow run.
--
-- 'triggerConfig', 'describeFlowResponse_triggerConfig' - The trigger settings that determine how and when the flow runs.
--
-- 'flowName', 'describeFlowResponse_flowName' - The specified name of the flow. Spaces are not allowed. Use underscores
-- (_) or hyphens (-) only.
--
-- 'sourceFlowConfig', 'describeFlowResponse_sourceFlowConfig' - The configuration that controls how Amazon AppFlow retrieves data from
-- the source connector.
--
-- 'flowStatusMessage', 'describeFlowResponse_flowStatusMessage' - Contains an error message if the flow status is in a suspended or error
-- state. This applies only to scheduled or event-triggered flows.
--
-- 'kmsArn', 'describeFlowResponse_kmsArn' - The ARN (Amazon Resource Name) of the Key Management Service (KMS) key
-- you provide for encryption. This is required if you do not want to use
-- the Amazon AppFlow-managed KMS key. If you don\'t provide anything here,
-- Amazon AppFlow uses the Amazon AppFlow-managed KMS key.
--
-- 'lastRunExecutionDetails', 'describeFlowResponse_lastRunExecutionDetails' - Describes the details of the most recent flow run.
--
-- 'flowStatus', 'describeFlowResponse_flowStatus' - Indicates the current status of the flow.
--
-- 'destinationFlowConfigList', 'describeFlowResponse_destinationFlowConfigList' - The configuration that controls how Amazon AppFlow transfers data to the
-- destination connector.
--
-- 'description', 'describeFlowResponse_description' - A description of the flow.
--
-- 'tags', 'describeFlowResponse_tags' - The tags used to organize, track, or control access for your flow.
--
-- 'httpStatus', 'describeFlowResponse_httpStatus' - The response's http status code.
newDescribeFlowResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeFlowResponse
newDescribeFlowResponse :: Int -> DescribeFlowResponse
newDescribeFlowResponse Int
pHttpStatus_ =
  DescribeFlowResponse' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe [Task]
-> Maybe TriggerConfig
-> Maybe Text
-> Maybe SourceFlowConfig
-> Maybe Text
-> Maybe Text
-> Maybe ExecutionDetails
-> Maybe FlowStatus
-> Maybe [DestinationFlowConfig]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeFlowResponse
DescribeFlowResponse'
    { $sel:lastUpdatedBy:DescribeFlowResponse' :: Maybe Text
lastUpdatedBy =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:flowArn:DescribeFlowResponse' :: Maybe Text
flowArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:DescribeFlowResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:DescribeFlowResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:DescribeFlowResponse' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tasks:DescribeFlowResponse' :: Maybe [Task]
tasks = Maybe [Task]
forall a. Maybe a
Prelude.Nothing,
      $sel:triggerConfig:DescribeFlowResponse' :: Maybe TriggerConfig
triggerConfig = Maybe TriggerConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:flowName:DescribeFlowResponse' :: Maybe Text
flowName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceFlowConfig:DescribeFlowResponse' :: Maybe SourceFlowConfig
sourceFlowConfig = Maybe SourceFlowConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:flowStatusMessage:DescribeFlowResponse' :: Maybe Text
flowStatusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsArn:DescribeFlowResponse' :: Maybe Text
kmsArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastRunExecutionDetails:DescribeFlowResponse' :: Maybe ExecutionDetails
lastRunExecutionDetails = Maybe ExecutionDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:flowStatus:DescribeFlowResponse' :: Maybe FlowStatus
flowStatus = Maybe FlowStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:destinationFlowConfigList:DescribeFlowResponse' :: Maybe [DestinationFlowConfig]
destinationFlowConfigList = Maybe [DestinationFlowConfig]
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeFlowResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeFlowResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeFlowResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Specifies the user name of the account that performed the most recent
-- update.
describeFlowResponse_lastUpdatedBy :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe Prelude.Text)
describeFlowResponse_lastUpdatedBy :: (Maybe Text -> f (Maybe Text))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_lastUpdatedBy = (DescribeFlowResponse -> Maybe Text)
-> (DescribeFlowResponse -> Maybe Text -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse DescribeFlowResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe Text
lastUpdatedBy :: Maybe Text
$sel:lastUpdatedBy:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe Text
lastUpdatedBy} -> Maybe Text
lastUpdatedBy) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe Text
a -> DescribeFlowResponse
s {$sel:lastUpdatedBy:DescribeFlowResponse' :: Maybe Text
lastUpdatedBy = Maybe Text
a} :: DescribeFlowResponse)

-- | The flow\'s Amazon Resource Name (ARN).
describeFlowResponse_flowArn :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe Prelude.Text)
describeFlowResponse_flowArn :: (Maybe Text -> f (Maybe Text))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_flowArn = (DescribeFlowResponse -> Maybe Text)
-> (DescribeFlowResponse -> Maybe Text -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse DescribeFlowResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe Text
flowArn :: Maybe Text
$sel:flowArn:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe Text
flowArn} -> Maybe Text
flowArn) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe Text
a -> DescribeFlowResponse
s {$sel:flowArn:DescribeFlowResponse' :: Maybe Text
flowArn = Maybe Text
a} :: DescribeFlowResponse)

-- | Specifies when the flow was last updated.
describeFlowResponse_lastUpdatedAt :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe Prelude.UTCTime)
describeFlowResponse_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_lastUpdatedAt = (DescribeFlowResponse -> Maybe POSIX)
-> (DescribeFlowResponse -> Maybe POSIX -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse
     DescribeFlowResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe POSIX
a -> DescribeFlowResponse
s {$sel:lastUpdatedAt:DescribeFlowResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: DescribeFlowResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Specifies when the flow was created.
describeFlowResponse_createdAt :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe Prelude.UTCTime)
describeFlowResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_createdAt = (DescribeFlowResponse -> Maybe POSIX)
-> (DescribeFlowResponse -> Maybe POSIX -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse
     DescribeFlowResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe POSIX
a -> DescribeFlowResponse
s {$sel:createdAt:DescribeFlowResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: DescribeFlowResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The ARN of the user who created the flow.
describeFlowResponse_createdBy :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe Prelude.Text)
describeFlowResponse_createdBy :: (Maybe Text -> f (Maybe Text))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_createdBy = (DescribeFlowResponse -> Maybe Text)
-> (DescribeFlowResponse -> Maybe Text -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse DescribeFlowResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe Text
a -> DescribeFlowResponse
s {$sel:createdBy:DescribeFlowResponse' :: Maybe Text
createdBy = Maybe Text
a} :: DescribeFlowResponse)

-- | A list of tasks that Amazon AppFlow performs while transferring the data
-- in the flow run.
describeFlowResponse_tasks :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe [Task])
describeFlowResponse_tasks :: (Maybe [Task] -> f (Maybe [Task]))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_tasks = (DescribeFlowResponse -> Maybe [Task])
-> (DescribeFlowResponse -> Maybe [Task] -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse
     DescribeFlowResponse
     (Maybe [Task])
     (Maybe [Task])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe [Task]
tasks :: Maybe [Task]
$sel:tasks:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe [Task]
tasks} -> Maybe [Task]
tasks) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe [Task]
a -> DescribeFlowResponse
s {$sel:tasks:DescribeFlowResponse' :: Maybe [Task]
tasks = Maybe [Task]
a} :: DescribeFlowResponse) ((Maybe [Task] -> f (Maybe [Task]))
 -> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((Maybe [Task] -> f (Maybe [Task]))
    -> Maybe [Task] -> f (Maybe [Task]))
-> (Maybe [Task] -> f (Maybe [Task]))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Task] [Task] [Task] [Task]
-> Iso (Maybe [Task]) (Maybe [Task]) (Maybe [Task]) (Maybe [Task])
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 [Task] [Task] [Task] [Task]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The trigger settings that determine how and when the flow runs.
describeFlowResponse_triggerConfig :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe TriggerConfig)
describeFlowResponse_triggerConfig :: (Maybe TriggerConfig -> f (Maybe TriggerConfig))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_triggerConfig = (DescribeFlowResponse -> Maybe TriggerConfig)
-> (DescribeFlowResponse
    -> Maybe TriggerConfig -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse
     DescribeFlowResponse
     (Maybe TriggerConfig)
     (Maybe TriggerConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe TriggerConfig
triggerConfig :: Maybe TriggerConfig
$sel:triggerConfig:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe TriggerConfig
triggerConfig} -> Maybe TriggerConfig
triggerConfig) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe TriggerConfig
a -> DescribeFlowResponse
s {$sel:triggerConfig:DescribeFlowResponse' :: Maybe TriggerConfig
triggerConfig = Maybe TriggerConfig
a} :: DescribeFlowResponse)

-- | The specified name of the flow. Spaces are not allowed. Use underscores
-- (_) or hyphens (-) only.
describeFlowResponse_flowName :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe Prelude.Text)
describeFlowResponse_flowName :: (Maybe Text -> f (Maybe Text))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_flowName = (DescribeFlowResponse -> Maybe Text)
-> (DescribeFlowResponse -> Maybe Text -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse DescribeFlowResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe Text
flowName :: Maybe Text
$sel:flowName:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe Text
flowName} -> Maybe Text
flowName) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe Text
a -> DescribeFlowResponse
s {$sel:flowName:DescribeFlowResponse' :: Maybe Text
flowName = Maybe Text
a} :: DescribeFlowResponse)

-- | The configuration that controls how Amazon AppFlow retrieves data from
-- the source connector.
describeFlowResponse_sourceFlowConfig :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe SourceFlowConfig)
describeFlowResponse_sourceFlowConfig :: (Maybe SourceFlowConfig -> f (Maybe SourceFlowConfig))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_sourceFlowConfig = (DescribeFlowResponse -> Maybe SourceFlowConfig)
-> (DescribeFlowResponse
    -> Maybe SourceFlowConfig -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse
     DescribeFlowResponse
     (Maybe SourceFlowConfig)
     (Maybe SourceFlowConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe SourceFlowConfig
sourceFlowConfig :: Maybe SourceFlowConfig
$sel:sourceFlowConfig:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe SourceFlowConfig
sourceFlowConfig} -> Maybe SourceFlowConfig
sourceFlowConfig) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe SourceFlowConfig
a -> DescribeFlowResponse
s {$sel:sourceFlowConfig:DescribeFlowResponse' :: Maybe SourceFlowConfig
sourceFlowConfig = Maybe SourceFlowConfig
a} :: DescribeFlowResponse)

-- | Contains an error message if the flow status is in a suspended or error
-- state. This applies only to scheduled or event-triggered flows.
describeFlowResponse_flowStatusMessage :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe Prelude.Text)
describeFlowResponse_flowStatusMessage :: (Maybe Text -> f (Maybe Text))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_flowStatusMessage = (DescribeFlowResponse -> Maybe Text)
-> (DescribeFlowResponse -> Maybe Text -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse DescribeFlowResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe Text
flowStatusMessage :: Maybe Text
$sel:flowStatusMessage:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe Text
flowStatusMessage} -> Maybe Text
flowStatusMessage) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe Text
a -> DescribeFlowResponse
s {$sel:flowStatusMessage:DescribeFlowResponse' :: Maybe Text
flowStatusMessage = Maybe Text
a} :: DescribeFlowResponse)

-- | The ARN (Amazon Resource Name) of the Key Management Service (KMS) key
-- you provide for encryption. This is required if you do not want to use
-- the Amazon AppFlow-managed KMS key. If you don\'t provide anything here,
-- Amazon AppFlow uses the Amazon AppFlow-managed KMS key.
describeFlowResponse_kmsArn :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe Prelude.Text)
describeFlowResponse_kmsArn :: (Maybe Text -> f (Maybe Text))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_kmsArn = (DescribeFlowResponse -> Maybe Text)
-> (DescribeFlowResponse -> Maybe Text -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse DescribeFlowResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe Text
kmsArn :: Maybe Text
$sel:kmsArn:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe Text
kmsArn} -> Maybe Text
kmsArn) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe Text
a -> DescribeFlowResponse
s {$sel:kmsArn:DescribeFlowResponse' :: Maybe Text
kmsArn = Maybe Text
a} :: DescribeFlowResponse)

-- | Describes the details of the most recent flow run.
describeFlowResponse_lastRunExecutionDetails :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe ExecutionDetails)
describeFlowResponse_lastRunExecutionDetails :: (Maybe ExecutionDetails -> f (Maybe ExecutionDetails))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_lastRunExecutionDetails = (DescribeFlowResponse -> Maybe ExecutionDetails)
-> (DescribeFlowResponse
    -> Maybe ExecutionDetails -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse
     DescribeFlowResponse
     (Maybe ExecutionDetails)
     (Maybe ExecutionDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe ExecutionDetails
lastRunExecutionDetails :: Maybe ExecutionDetails
$sel:lastRunExecutionDetails:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe ExecutionDetails
lastRunExecutionDetails} -> Maybe ExecutionDetails
lastRunExecutionDetails) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe ExecutionDetails
a -> DescribeFlowResponse
s {$sel:lastRunExecutionDetails:DescribeFlowResponse' :: Maybe ExecutionDetails
lastRunExecutionDetails = Maybe ExecutionDetails
a} :: DescribeFlowResponse)

-- | Indicates the current status of the flow.
describeFlowResponse_flowStatus :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe FlowStatus)
describeFlowResponse_flowStatus :: (Maybe FlowStatus -> f (Maybe FlowStatus))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_flowStatus = (DescribeFlowResponse -> Maybe FlowStatus)
-> (DescribeFlowResponse
    -> Maybe FlowStatus -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse
     DescribeFlowResponse
     (Maybe FlowStatus)
     (Maybe FlowStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe FlowStatus
flowStatus :: Maybe FlowStatus
$sel:flowStatus:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe FlowStatus
flowStatus} -> Maybe FlowStatus
flowStatus) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe FlowStatus
a -> DescribeFlowResponse
s {$sel:flowStatus:DescribeFlowResponse' :: Maybe FlowStatus
flowStatus = Maybe FlowStatus
a} :: DescribeFlowResponse)

-- | The configuration that controls how Amazon AppFlow transfers data to the
-- destination connector.
describeFlowResponse_destinationFlowConfigList :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe [DestinationFlowConfig])
describeFlowResponse_destinationFlowConfigList :: (Maybe [DestinationFlowConfig]
 -> f (Maybe [DestinationFlowConfig]))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_destinationFlowConfigList = (DescribeFlowResponse -> Maybe [DestinationFlowConfig])
-> (DescribeFlowResponse
    -> Maybe [DestinationFlowConfig] -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse
     DescribeFlowResponse
     (Maybe [DestinationFlowConfig])
     (Maybe [DestinationFlowConfig])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe [DestinationFlowConfig]
destinationFlowConfigList :: Maybe [DestinationFlowConfig]
$sel:destinationFlowConfigList:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe [DestinationFlowConfig]
destinationFlowConfigList} -> Maybe [DestinationFlowConfig]
destinationFlowConfigList) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe [DestinationFlowConfig]
a -> DescribeFlowResponse
s {$sel:destinationFlowConfigList:DescribeFlowResponse' :: Maybe [DestinationFlowConfig]
destinationFlowConfigList = Maybe [DestinationFlowConfig]
a} :: DescribeFlowResponse) ((Maybe [DestinationFlowConfig]
  -> f (Maybe [DestinationFlowConfig]))
 -> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((Maybe [DestinationFlowConfig]
     -> f (Maybe [DestinationFlowConfig]))
    -> Maybe [DestinationFlowConfig]
    -> f (Maybe [DestinationFlowConfig]))
-> (Maybe [DestinationFlowConfig]
    -> f (Maybe [DestinationFlowConfig]))
-> DescribeFlowResponse
-> f DescribeFlowResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DestinationFlowConfig]
  [DestinationFlowConfig]
  [DestinationFlowConfig]
  [DestinationFlowConfig]
-> Iso
     (Maybe [DestinationFlowConfig])
     (Maybe [DestinationFlowConfig])
     (Maybe [DestinationFlowConfig])
     (Maybe [DestinationFlowConfig])
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
  [DestinationFlowConfig]
  [DestinationFlowConfig]
  [DestinationFlowConfig]
  [DestinationFlowConfig]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A description of the flow.
describeFlowResponse_description :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe Prelude.Text)
describeFlowResponse_description :: (Maybe Text -> f (Maybe Text))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_description = (DescribeFlowResponse -> Maybe Text)
-> (DescribeFlowResponse -> Maybe Text -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse DescribeFlowResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Maybe Text
description :: Maybe Text
$sel:description:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe Text
a -> DescribeFlowResponse
s {$sel:description:DescribeFlowResponse' :: Maybe Text
description = Maybe Text
a} :: DescribeFlowResponse)

-- | The tags used to organize, track, or control access for your flow.
describeFlowResponse_tags :: Lens.Lens' DescribeFlowResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeFlowResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_tags = (DescribeFlowResponse -> Maybe (HashMap Text Text))
-> (DescribeFlowResponse
    -> Maybe (HashMap Text Text) -> DescribeFlowResponse)
-> Lens
     DescribeFlowResponse
     DescribeFlowResponse
     (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 (\DescribeFlowResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeFlowResponse' :: DescribeFlowResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Maybe (HashMap Text Text)
a -> DescribeFlowResponse
s {$sel:tags:DescribeFlowResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeFlowResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeFlowResponse -> f DescribeFlowResponse)
-> ((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)))
-> DescribeFlowResponse
-> f DescribeFlowResponse
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 response's http status code.
describeFlowResponse_httpStatus :: Lens.Lens' DescribeFlowResponse Prelude.Int
describeFlowResponse_httpStatus :: (Int -> f Int) -> DescribeFlowResponse -> f DescribeFlowResponse
describeFlowResponse_httpStatus = (DescribeFlowResponse -> Int)
-> (DescribeFlowResponse -> Int -> DescribeFlowResponse)
-> Lens DescribeFlowResponse DescribeFlowResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFlowResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeFlowResponse' :: DescribeFlowResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeFlowResponse
s@DescribeFlowResponse' {} Int
a -> DescribeFlowResponse
s {$sel:httpStatus:DescribeFlowResponse' :: Int
httpStatus = Int
a} :: DescribeFlowResponse)

instance Prelude.NFData DescribeFlowResponse