{-# 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.DataBrew.DescribeSchedule
-- 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)
--
-- Returns the definition of a specific DataBrew schedule.
module Amazonka.DataBrew.DescribeSchedule
  ( -- * Creating a Request
    DescribeSchedule (..),
    newDescribeSchedule,

    -- * Request Lenses
    describeSchedule_name,

    -- * Destructuring the Response
    DescribeScheduleResponse (..),
    newDescribeScheduleResponse,

    -- * Response Lenses
    describeScheduleResponse_lastModifiedDate,
    describeScheduleResponse_createDate,
    describeScheduleResponse_createdBy,
    describeScheduleResponse_resourceArn,
    describeScheduleResponse_cronExpression,
    describeScheduleResponse_lastModifiedBy,
    describeScheduleResponse_jobNames,
    describeScheduleResponse_tags,
    describeScheduleResponse_httpStatus,
    describeScheduleResponse_name,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DataBrew.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:/ 'newDescribeSchedule' smart constructor.
data DescribeSchedule = DescribeSchedule'
  { -- | The name of the schedule to be described.
    DescribeSchedule -> Text
name :: Prelude.Text
  }
  deriving (DescribeSchedule -> DescribeSchedule -> Bool
(DescribeSchedule -> DescribeSchedule -> Bool)
-> (DescribeSchedule -> DescribeSchedule -> Bool)
-> Eq DescribeSchedule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSchedule -> DescribeSchedule -> Bool
$c/= :: DescribeSchedule -> DescribeSchedule -> Bool
== :: DescribeSchedule -> DescribeSchedule -> Bool
$c== :: DescribeSchedule -> DescribeSchedule -> Bool
Prelude.Eq, ReadPrec [DescribeSchedule]
ReadPrec DescribeSchedule
Int -> ReadS DescribeSchedule
ReadS [DescribeSchedule]
(Int -> ReadS DescribeSchedule)
-> ReadS [DescribeSchedule]
-> ReadPrec DescribeSchedule
-> ReadPrec [DescribeSchedule]
-> Read DescribeSchedule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSchedule]
$creadListPrec :: ReadPrec [DescribeSchedule]
readPrec :: ReadPrec DescribeSchedule
$creadPrec :: ReadPrec DescribeSchedule
readList :: ReadS [DescribeSchedule]
$creadList :: ReadS [DescribeSchedule]
readsPrec :: Int -> ReadS DescribeSchedule
$creadsPrec :: Int -> ReadS DescribeSchedule
Prelude.Read, Int -> DescribeSchedule -> ShowS
[DescribeSchedule] -> ShowS
DescribeSchedule -> String
(Int -> DescribeSchedule -> ShowS)
-> (DescribeSchedule -> String)
-> ([DescribeSchedule] -> ShowS)
-> Show DescribeSchedule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSchedule] -> ShowS
$cshowList :: [DescribeSchedule] -> ShowS
show :: DescribeSchedule -> String
$cshow :: DescribeSchedule -> String
showsPrec :: Int -> DescribeSchedule -> ShowS
$cshowsPrec :: Int -> DescribeSchedule -> ShowS
Prelude.Show, (forall x. DescribeSchedule -> Rep DescribeSchedule x)
-> (forall x. Rep DescribeSchedule x -> DescribeSchedule)
-> Generic DescribeSchedule
forall x. Rep DescribeSchedule x -> DescribeSchedule
forall x. DescribeSchedule -> Rep DescribeSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeSchedule x -> DescribeSchedule
$cfrom :: forall x. DescribeSchedule -> Rep DescribeSchedule x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSchedule' 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:
--
-- 'name', 'describeSchedule_name' - The name of the schedule to be described.
newDescribeSchedule ::
  -- | 'name'
  Prelude.Text ->
  DescribeSchedule
newDescribeSchedule :: Text -> DescribeSchedule
newDescribeSchedule Text
pName_ =
  DescribeSchedule' :: Text -> DescribeSchedule
DescribeSchedule' {$sel:name:DescribeSchedule' :: Text
name = Text
pName_}

-- | The name of the schedule to be described.
describeSchedule_name :: Lens.Lens' DescribeSchedule Prelude.Text
describeSchedule_name :: (Text -> f Text) -> DescribeSchedule -> f DescribeSchedule
describeSchedule_name = (DescribeSchedule -> Text)
-> (DescribeSchedule -> Text -> DescribeSchedule)
-> Lens DescribeSchedule DescribeSchedule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSchedule' {Text
name :: Text
$sel:name:DescribeSchedule' :: DescribeSchedule -> Text
name} -> Text
name) (\s :: DescribeSchedule
s@DescribeSchedule' {} Text
a -> DescribeSchedule
s {$sel:name:DescribeSchedule' :: Text
name = Text
a} :: DescribeSchedule)

instance Core.AWSRequest DescribeSchedule where
  type
    AWSResponse DescribeSchedule =
      DescribeScheduleResponse
  request :: DescribeSchedule -> Request DescribeSchedule
request = Service -> DescribeSchedule -> Request DescribeSchedule
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeSchedule
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeSchedule)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeSchedule))
-> Logger
-> Service
-> Proxy DescribeSchedule
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeSchedule)))
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 POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> DescribeScheduleResponse
DescribeScheduleResponse'
            (Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe (HashMap Text Text)
 -> Int
 -> Text
 -> DescribeScheduleResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeScheduleResponse)
forall (f :: * -> *) a b. Functor 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
"LastModifiedDate")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeScheduleResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeScheduleResponse)
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
"CreateDate")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeScheduleResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeScheduleResponse)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeScheduleResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeScheduleResponse)
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
"ResourceArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeScheduleResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeScheduleResponse)
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
"CronExpression")
            Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeScheduleResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeScheduleResponse)
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
"LastModifiedBy")
            Either
  String
  (Maybe [Text]
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeScheduleResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Int -> Text -> DescribeScheduleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"JobNames" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe (HashMap Text Text)
   -> Int -> Text -> DescribeScheduleResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> Text -> DescribeScheduleResponse)
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 -> Text -> DescribeScheduleResponse)
-> Either String Int
-> Either String (Text -> DescribeScheduleResponse)
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))
            Either String (Text -> DescribeScheduleResponse)
-> Either String Text -> Either String DescribeScheduleResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Name")
      )

instance Prelude.Hashable DescribeSchedule

instance Prelude.NFData DescribeSchedule

instance Core.ToHeaders DescribeSchedule where
  toHeaders :: DescribeSchedule -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeSchedule -> 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.ToPath DescribeSchedule where
  toPath :: DescribeSchedule -> ByteString
toPath DescribeSchedule' {Text
name :: Text
$sel:name:DescribeSchedule' :: DescribeSchedule -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/schedules/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name]

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

-- | /See:/ 'newDescribeScheduleResponse' smart constructor.
data DescribeScheduleResponse = DescribeScheduleResponse'
  { -- | The date and time that the schedule was last modified.
    DescribeScheduleResponse -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | The date and time that the schedule was created.
    DescribeScheduleResponse -> Maybe POSIX
createDate :: Prelude.Maybe Core.POSIX,
    -- | The identifier (user name) of the user who created the schedule.
    DescribeScheduleResponse -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the schedule.
    DescribeScheduleResponse -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | The date or dates and time or times when the jobs are to be run for the
    -- schedule. For more information, see
    -- <https://docs.aws.amazon.com/databrew/latest/dg/jobs.cron.html Cron expressions>
    -- in the /Glue DataBrew Developer Guide/.
    DescribeScheduleResponse -> Maybe Text
cronExpression :: Prelude.Maybe Prelude.Text,
    -- | The identifier (user name) of the user who last modified the schedule.
    DescribeScheduleResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | The name or names of one or more jobs to be run by using the schedule.
    DescribeScheduleResponse -> Maybe [Text]
jobNames :: Prelude.Maybe [Prelude.Text],
    -- | Metadata tags associated with this schedule.
    DescribeScheduleResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeScheduleResponse -> Int
httpStatus :: Prelude.Int,
    -- | The name of the schedule.
    DescribeScheduleResponse -> Text
name :: Prelude.Text
  }
  deriving (DescribeScheduleResponse -> DescribeScheduleResponse -> Bool
(DescribeScheduleResponse -> DescribeScheduleResponse -> Bool)
-> (DescribeScheduleResponse -> DescribeScheduleResponse -> Bool)
-> Eq DescribeScheduleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScheduleResponse -> DescribeScheduleResponse -> Bool
$c/= :: DescribeScheduleResponse -> DescribeScheduleResponse -> Bool
== :: DescribeScheduleResponse -> DescribeScheduleResponse -> Bool
$c== :: DescribeScheduleResponse -> DescribeScheduleResponse -> Bool
Prelude.Eq, ReadPrec [DescribeScheduleResponse]
ReadPrec DescribeScheduleResponse
Int -> ReadS DescribeScheduleResponse
ReadS [DescribeScheduleResponse]
(Int -> ReadS DescribeScheduleResponse)
-> ReadS [DescribeScheduleResponse]
-> ReadPrec DescribeScheduleResponse
-> ReadPrec [DescribeScheduleResponse]
-> Read DescribeScheduleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScheduleResponse]
$creadListPrec :: ReadPrec [DescribeScheduleResponse]
readPrec :: ReadPrec DescribeScheduleResponse
$creadPrec :: ReadPrec DescribeScheduleResponse
readList :: ReadS [DescribeScheduleResponse]
$creadList :: ReadS [DescribeScheduleResponse]
readsPrec :: Int -> ReadS DescribeScheduleResponse
$creadsPrec :: Int -> ReadS DescribeScheduleResponse
Prelude.Read, Int -> DescribeScheduleResponse -> ShowS
[DescribeScheduleResponse] -> ShowS
DescribeScheduleResponse -> String
(Int -> DescribeScheduleResponse -> ShowS)
-> (DescribeScheduleResponse -> String)
-> ([DescribeScheduleResponse] -> ShowS)
-> Show DescribeScheduleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScheduleResponse] -> ShowS
$cshowList :: [DescribeScheduleResponse] -> ShowS
show :: DescribeScheduleResponse -> String
$cshow :: DescribeScheduleResponse -> String
showsPrec :: Int -> DescribeScheduleResponse -> ShowS
$cshowsPrec :: Int -> DescribeScheduleResponse -> ShowS
Prelude.Show, (forall x.
 DescribeScheduleResponse -> Rep DescribeScheduleResponse x)
-> (forall x.
    Rep DescribeScheduleResponse x -> DescribeScheduleResponse)
-> Generic DescribeScheduleResponse
forall x.
Rep DescribeScheduleResponse x -> DescribeScheduleResponse
forall x.
DescribeScheduleResponse -> Rep DescribeScheduleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeScheduleResponse x -> DescribeScheduleResponse
$cfrom :: forall x.
DescribeScheduleResponse -> Rep DescribeScheduleResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeScheduleResponse' 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:
--
-- 'lastModifiedDate', 'describeScheduleResponse_lastModifiedDate' - The date and time that the schedule was last modified.
--
-- 'createDate', 'describeScheduleResponse_createDate' - The date and time that the schedule was created.
--
-- 'createdBy', 'describeScheduleResponse_createdBy' - The identifier (user name) of the user who created the schedule.
--
-- 'resourceArn', 'describeScheduleResponse_resourceArn' - The Amazon Resource Name (ARN) of the schedule.
--
-- 'cronExpression', 'describeScheduleResponse_cronExpression' - The date or dates and time or times when the jobs are to be run for the
-- schedule. For more information, see
-- <https://docs.aws.amazon.com/databrew/latest/dg/jobs.cron.html Cron expressions>
-- in the /Glue DataBrew Developer Guide/.
--
-- 'lastModifiedBy', 'describeScheduleResponse_lastModifiedBy' - The identifier (user name) of the user who last modified the schedule.
--
-- 'jobNames', 'describeScheduleResponse_jobNames' - The name or names of one or more jobs to be run by using the schedule.
--
-- 'tags', 'describeScheduleResponse_tags' - Metadata tags associated with this schedule.
--
-- 'httpStatus', 'describeScheduleResponse_httpStatus' - The response's http status code.
--
-- 'name', 'describeScheduleResponse_name' - The name of the schedule.
newDescribeScheduleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'name'
  Prelude.Text ->
  DescribeScheduleResponse
newDescribeScheduleResponse :: Int -> Text -> DescribeScheduleResponse
newDescribeScheduleResponse Int
pHttpStatus_ Text
pName_ =
  DescribeScheduleResponse' :: Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> DescribeScheduleResponse
DescribeScheduleResponse'
    { $sel:lastModifiedDate:DescribeScheduleResponse' :: Maybe POSIX
lastModifiedDate =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createDate:DescribeScheduleResponse' :: Maybe POSIX
createDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:DescribeScheduleResponse' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:DescribeScheduleResponse' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cronExpression:DescribeScheduleResponse' :: Maybe Text
cronExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:DescribeScheduleResponse' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobNames:DescribeScheduleResponse' :: Maybe [Text]
jobNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeScheduleResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeScheduleResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:name:DescribeScheduleResponse' :: Text
name = Text
pName_
    }

-- | The date and time that the schedule was last modified.
describeScheduleResponse_lastModifiedDate :: Lens.Lens' DescribeScheduleResponse (Prelude.Maybe Prelude.UTCTime)
describeScheduleResponse_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeScheduleResponse -> f DescribeScheduleResponse
describeScheduleResponse_lastModifiedDate = (DescribeScheduleResponse -> Maybe POSIX)
-> (DescribeScheduleResponse
    -> Maybe POSIX -> DescribeScheduleResponse)
-> Lens
     DescribeScheduleResponse
     DescribeScheduleResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduleResponse' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:DescribeScheduleResponse' :: DescribeScheduleResponse -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: DescribeScheduleResponse
s@DescribeScheduleResponse' {} Maybe POSIX
a -> DescribeScheduleResponse
s {$sel:lastModifiedDate:DescribeScheduleResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: DescribeScheduleResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeScheduleResponse -> f DescribeScheduleResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeScheduleResponse
-> f DescribeScheduleResponse
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 date and time that the schedule was created.
describeScheduleResponse_createDate :: Lens.Lens' DescribeScheduleResponse (Prelude.Maybe Prelude.UTCTime)
describeScheduleResponse_createDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeScheduleResponse -> f DescribeScheduleResponse
describeScheduleResponse_createDate = (DescribeScheduleResponse -> Maybe POSIX)
-> (DescribeScheduleResponse
    -> Maybe POSIX -> DescribeScheduleResponse)
-> Lens
     DescribeScheduleResponse
     DescribeScheduleResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduleResponse' {Maybe POSIX
createDate :: Maybe POSIX
$sel:createDate:DescribeScheduleResponse' :: DescribeScheduleResponse -> Maybe POSIX
createDate} -> Maybe POSIX
createDate) (\s :: DescribeScheduleResponse
s@DescribeScheduleResponse' {} Maybe POSIX
a -> DescribeScheduleResponse
s {$sel:createDate:DescribeScheduleResponse' :: Maybe POSIX
createDate = Maybe POSIX
a} :: DescribeScheduleResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeScheduleResponse -> f DescribeScheduleResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeScheduleResponse
-> f DescribeScheduleResponse
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 identifier (user name) of the user who created the schedule.
describeScheduleResponse_createdBy :: Lens.Lens' DescribeScheduleResponse (Prelude.Maybe Prelude.Text)
describeScheduleResponse_createdBy :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduleResponse -> f DescribeScheduleResponse
describeScheduleResponse_createdBy = (DescribeScheduleResponse -> Maybe Text)
-> (DescribeScheduleResponse
    -> Maybe Text -> DescribeScheduleResponse)
-> Lens
     DescribeScheduleResponse
     DescribeScheduleResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduleResponse' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:DescribeScheduleResponse' :: DescribeScheduleResponse -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: DescribeScheduleResponse
s@DescribeScheduleResponse' {} Maybe Text
a -> DescribeScheduleResponse
s {$sel:createdBy:DescribeScheduleResponse' :: Maybe Text
createdBy = Maybe Text
a} :: DescribeScheduleResponse)

-- | The Amazon Resource Name (ARN) of the schedule.
describeScheduleResponse_resourceArn :: Lens.Lens' DescribeScheduleResponse (Prelude.Maybe Prelude.Text)
describeScheduleResponse_resourceArn :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduleResponse -> f DescribeScheduleResponse
describeScheduleResponse_resourceArn = (DescribeScheduleResponse -> Maybe Text)
-> (DescribeScheduleResponse
    -> Maybe Text -> DescribeScheduleResponse)
-> Lens
     DescribeScheduleResponse
     DescribeScheduleResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduleResponse' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:DescribeScheduleResponse' :: DescribeScheduleResponse -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: DescribeScheduleResponse
s@DescribeScheduleResponse' {} Maybe Text
a -> DescribeScheduleResponse
s {$sel:resourceArn:DescribeScheduleResponse' :: Maybe Text
resourceArn = Maybe Text
a} :: DescribeScheduleResponse)

-- | The date or dates and time or times when the jobs are to be run for the
-- schedule. For more information, see
-- <https://docs.aws.amazon.com/databrew/latest/dg/jobs.cron.html Cron expressions>
-- in the /Glue DataBrew Developer Guide/.
describeScheduleResponse_cronExpression :: Lens.Lens' DescribeScheduleResponse (Prelude.Maybe Prelude.Text)
describeScheduleResponse_cronExpression :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduleResponse -> f DescribeScheduleResponse
describeScheduleResponse_cronExpression = (DescribeScheduleResponse -> Maybe Text)
-> (DescribeScheduleResponse
    -> Maybe Text -> DescribeScheduleResponse)
-> Lens
     DescribeScheduleResponse
     DescribeScheduleResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduleResponse' {Maybe Text
cronExpression :: Maybe Text
$sel:cronExpression:DescribeScheduleResponse' :: DescribeScheduleResponse -> Maybe Text
cronExpression} -> Maybe Text
cronExpression) (\s :: DescribeScheduleResponse
s@DescribeScheduleResponse' {} Maybe Text
a -> DescribeScheduleResponse
s {$sel:cronExpression:DescribeScheduleResponse' :: Maybe Text
cronExpression = Maybe Text
a} :: DescribeScheduleResponse)

-- | The identifier (user name) of the user who last modified the schedule.
describeScheduleResponse_lastModifiedBy :: Lens.Lens' DescribeScheduleResponse (Prelude.Maybe Prelude.Text)
describeScheduleResponse_lastModifiedBy :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduleResponse -> f DescribeScheduleResponse
describeScheduleResponse_lastModifiedBy = (DescribeScheduleResponse -> Maybe Text)
-> (DescribeScheduleResponse
    -> Maybe Text -> DescribeScheduleResponse)
-> Lens
     DescribeScheduleResponse
     DescribeScheduleResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduleResponse' {Maybe Text
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:DescribeScheduleResponse' :: DescribeScheduleResponse -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: DescribeScheduleResponse
s@DescribeScheduleResponse' {} Maybe Text
a -> DescribeScheduleResponse
s {$sel:lastModifiedBy:DescribeScheduleResponse' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: DescribeScheduleResponse)

-- | The name or names of one or more jobs to be run by using the schedule.
describeScheduleResponse_jobNames :: Lens.Lens' DescribeScheduleResponse (Prelude.Maybe [Prelude.Text])
describeScheduleResponse_jobNames :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeScheduleResponse -> f DescribeScheduleResponse
describeScheduleResponse_jobNames = (DescribeScheduleResponse -> Maybe [Text])
-> (DescribeScheduleResponse
    -> Maybe [Text] -> DescribeScheduleResponse)
-> Lens
     DescribeScheduleResponse
     DescribeScheduleResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduleResponse' {Maybe [Text]
jobNames :: Maybe [Text]
$sel:jobNames:DescribeScheduleResponse' :: DescribeScheduleResponse -> Maybe [Text]
jobNames} -> Maybe [Text]
jobNames) (\s :: DescribeScheduleResponse
s@DescribeScheduleResponse' {} Maybe [Text]
a -> DescribeScheduleResponse
s {$sel:jobNames:DescribeScheduleResponse' :: Maybe [Text]
jobNames = Maybe [Text]
a} :: DescribeScheduleResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeScheduleResponse -> f DescribeScheduleResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeScheduleResponse
-> f DescribeScheduleResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Metadata tags associated with this schedule.
describeScheduleResponse_tags :: Lens.Lens' DescribeScheduleResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeScheduleResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeScheduleResponse -> f DescribeScheduleResponse
describeScheduleResponse_tags = (DescribeScheduleResponse -> Maybe (HashMap Text Text))
-> (DescribeScheduleResponse
    -> Maybe (HashMap Text Text) -> DescribeScheduleResponse)
-> Lens
     DescribeScheduleResponse
     DescribeScheduleResponse
     (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 (\DescribeScheduleResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeScheduleResponse' :: DescribeScheduleResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeScheduleResponse
s@DescribeScheduleResponse' {} Maybe (HashMap Text Text)
a -> DescribeScheduleResponse
s {$sel:tags:DescribeScheduleResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeScheduleResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeScheduleResponse -> f DescribeScheduleResponse)
-> ((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)))
-> DescribeScheduleResponse
-> f DescribeScheduleResponse
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.
describeScheduleResponse_httpStatus :: Lens.Lens' DescribeScheduleResponse Prelude.Int
describeScheduleResponse_httpStatus :: (Int -> f Int)
-> DescribeScheduleResponse -> f DescribeScheduleResponse
describeScheduleResponse_httpStatus = (DescribeScheduleResponse -> Int)
-> (DescribeScheduleResponse -> Int -> DescribeScheduleResponse)
-> Lens DescribeScheduleResponse DescribeScheduleResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduleResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeScheduleResponse' :: DescribeScheduleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeScheduleResponse
s@DescribeScheduleResponse' {} Int
a -> DescribeScheduleResponse
s {$sel:httpStatus:DescribeScheduleResponse' :: Int
httpStatus = Int
a} :: DescribeScheduleResponse)

-- | The name of the schedule.
describeScheduleResponse_name :: Lens.Lens' DescribeScheduleResponse Prelude.Text
describeScheduleResponse_name :: (Text -> f Text)
-> DescribeScheduleResponse -> f DescribeScheduleResponse
describeScheduleResponse_name = (DescribeScheduleResponse -> Text)
-> (DescribeScheduleResponse -> Text -> DescribeScheduleResponse)
-> Lens DescribeScheduleResponse DescribeScheduleResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduleResponse' {Text
name :: Text
$sel:name:DescribeScheduleResponse' :: DescribeScheduleResponse -> Text
name} -> Text
name) (\s :: DescribeScheduleResponse
s@DescribeScheduleResponse' {} Text
a -> DescribeScheduleResponse
s {$sel:name:DescribeScheduleResponse' :: Text
name = Text
a} :: DescribeScheduleResponse)

instance Prelude.NFData DescribeScheduleResponse