{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Glue.Types.UserDefinedFunction
-- 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)
module Amazonka.Glue.Types.UserDefinedFunction where

import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.PrincipalType
import Amazonka.Glue.Types.ResourceUri
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents the equivalent of a Hive user-defined function (@UDF@)
-- definition.
--
-- /See:/ 'newUserDefinedFunction' smart constructor.
data UserDefinedFunction = UserDefinedFunction'
  { -- | The owner of the function.
    UserDefinedFunction -> Maybe Text
ownerName :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Data Catalog in which the function resides.
    UserDefinedFunction -> Maybe Text
catalogId :: Prelude.Maybe Prelude.Text,
    -- | The resource URIs for the function.
    UserDefinedFunction -> Maybe [ResourceUri]
resourceUris :: Prelude.Maybe [ResourceUri],
    -- | The name of the catalog database that contains the function.
    UserDefinedFunction -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | The name of the function.
    UserDefinedFunction -> Maybe Text
functionName :: Prelude.Maybe Prelude.Text,
    -- | The owner type.
    UserDefinedFunction -> Maybe PrincipalType
ownerType :: Prelude.Maybe PrincipalType,
    -- | The time at which the function was created.
    UserDefinedFunction -> Maybe POSIX
createTime :: Prelude.Maybe Core.POSIX,
    -- | The Java class that contains the function code.
    UserDefinedFunction -> Maybe Text
className :: Prelude.Maybe Prelude.Text
  }
  deriving (UserDefinedFunction -> UserDefinedFunction -> Bool
(UserDefinedFunction -> UserDefinedFunction -> Bool)
-> (UserDefinedFunction -> UserDefinedFunction -> Bool)
-> Eq UserDefinedFunction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserDefinedFunction -> UserDefinedFunction -> Bool
$c/= :: UserDefinedFunction -> UserDefinedFunction -> Bool
== :: UserDefinedFunction -> UserDefinedFunction -> Bool
$c== :: UserDefinedFunction -> UserDefinedFunction -> Bool
Prelude.Eq, ReadPrec [UserDefinedFunction]
ReadPrec UserDefinedFunction
Int -> ReadS UserDefinedFunction
ReadS [UserDefinedFunction]
(Int -> ReadS UserDefinedFunction)
-> ReadS [UserDefinedFunction]
-> ReadPrec UserDefinedFunction
-> ReadPrec [UserDefinedFunction]
-> Read UserDefinedFunction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UserDefinedFunction]
$creadListPrec :: ReadPrec [UserDefinedFunction]
readPrec :: ReadPrec UserDefinedFunction
$creadPrec :: ReadPrec UserDefinedFunction
readList :: ReadS [UserDefinedFunction]
$creadList :: ReadS [UserDefinedFunction]
readsPrec :: Int -> ReadS UserDefinedFunction
$creadsPrec :: Int -> ReadS UserDefinedFunction
Prelude.Read, Int -> UserDefinedFunction -> ShowS
[UserDefinedFunction] -> ShowS
UserDefinedFunction -> String
(Int -> UserDefinedFunction -> ShowS)
-> (UserDefinedFunction -> String)
-> ([UserDefinedFunction] -> ShowS)
-> Show UserDefinedFunction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserDefinedFunction] -> ShowS
$cshowList :: [UserDefinedFunction] -> ShowS
show :: UserDefinedFunction -> String
$cshow :: UserDefinedFunction -> String
showsPrec :: Int -> UserDefinedFunction -> ShowS
$cshowsPrec :: Int -> UserDefinedFunction -> ShowS
Prelude.Show, (forall x. UserDefinedFunction -> Rep UserDefinedFunction x)
-> (forall x. Rep UserDefinedFunction x -> UserDefinedFunction)
-> Generic UserDefinedFunction
forall x. Rep UserDefinedFunction x -> UserDefinedFunction
forall x. UserDefinedFunction -> Rep UserDefinedFunction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UserDefinedFunction x -> UserDefinedFunction
$cfrom :: forall x. UserDefinedFunction -> Rep UserDefinedFunction x
Prelude.Generic)

-- |
-- Create a value of 'UserDefinedFunction' 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:
--
-- 'ownerName', 'userDefinedFunction_ownerName' - The owner of the function.
--
-- 'catalogId', 'userDefinedFunction_catalogId' - The ID of the Data Catalog in which the function resides.
--
-- 'resourceUris', 'userDefinedFunction_resourceUris' - The resource URIs for the function.
--
-- 'databaseName', 'userDefinedFunction_databaseName' - The name of the catalog database that contains the function.
--
-- 'functionName', 'userDefinedFunction_functionName' - The name of the function.
--
-- 'ownerType', 'userDefinedFunction_ownerType' - The owner type.
--
-- 'createTime', 'userDefinedFunction_createTime' - The time at which the function was created.
--
-- 'className', 'userDefinedFunction_className' - The Java class that contains the function code.
newUserDefinedFunction ::
  UserDefinedFunction
newUserDefinedFunction :: UserDefinedFunction
newUserDefinedFunction =
  UserDefinedFunction' :: Maybe Text
-> Maybe Text
-> Maybe [ResourceUri]
-> Maybe Text
-> Maybe Text
-> Maybe PrincipalType
-> Maybe POSIX
-> Maybe Text
-> UserDefinedFunction
UserDefinedFunction'
    { $sel:ownerName:UserDefinedFunction' :: Maybe Text
ownerName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:catalogId:UserDefinedFunction' :: Maybe Text
catalogId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceUris:UserDefinedFunction' :: Maybe [ResourceUri]
resourceUris = Maybe [ResourceUri]
forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:UserDefinedFunction' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:functionName:UserDefinedFunction' :: Maybe Text
functionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ownerType:UserDefinedFunction' :: Maybe PrincipalType
ownerType = Maybe PrincipalType
forall a. Maybe a
Prelude.Nothing,
      $sel:createTime:UserDefinedFunction' :: Maybe POSIX
createTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:className:UserDefinedFunction' :: Maybe Text
className = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The owner of the function.
userDefinedFunction_ownerName :: Lens.Lens' UserDefinedFunction (Prelude.Maybe Prelude.Text)
userDefinedFunction_ownerName :: (Maybe Text -> f (Maybe Text))
-> UserDefinedFunction -> f UserDefinedFunction
userDefinedFunction_ownerName = (UserDefinedFunction -> Maybe Text)
-> (UserDefinedFunction -> Maybe Text -> UserDefinedFunction)
-> Lens
     UserDefinedFunction UserDefinedFunction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDefinedFunction' {Maybe Text
ownerName :: Maybe Text
$sel:ownerName:UserDefinedFunction' :: UserDefinedFunction -> Maybe Text
ownerName} -> Maybe Text
ownerName) (\s :: UserDefinedFunction
s@UserDefinedFunction' {} Maybe Text
a -> UserDefinedFunction
s {$sel:ownerName:UserDefinedFunction' :: Maybe Text
ownerName = Maybe Text
a} :: UserDefinedFunction)

-- | The ID of the Data Catalog in which the function resides.
userDefinedFunction_catalogId :: Lens.Lens' UserDefinedFunction (Prelude.Maybe Prelude.Text)
userDefinedFunction_catalogId :: (Maybe Text -> f (Maybe Text))
-> UserDefinedFunction -> f UserDefinedFunction
userDefinedFunction_catalogId = (UserDefinedFunction -> Maybe Text)
-> (UserDefinedFunction -> Maybe Text -> UserDefinedFunction)
-> Lens
     UserDefinedFunction UserDefinedFunction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDefinedFunction' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:UserDefinedFunction' :: UserDefinedFunction -> Maybe Text
catalogId} -> Maybe Text
catalogId) (\s :: UserDefinedFunction
s@UserDefinedFunction' {} Maybe Text
a -> UserDefinedFunction
s {$sel:catalogId:UserDefinedFunction' :: Maybe Text
catalogId = Maybe Text
a} :: UserDefinedFunction)

-- | The resource URIs for the function.
userDefinedFunction_resourceUris :: Lens.Lens' UserDefinedFunction (Prelude.Maybe [ResourceUri])
userDefinedFunction_resourceUris :: (Maybe [ResourceUri] -> f (Maybe [ResourceUri]))
-> UserDefinedFunction -> f UserDefinedFunction
userDefinedFunction_resourceUris = (UserDefinedFunction -> Maybe [ResourceUri])
-> (UserDefinedFunction
    -> Maybe [ResourceUri] -> UserDefinedFunction)
-> Lens
     UserDefinedFunction
     UserDefinedFunction
     (Maybe [ResourceUri])
     (Maybe [ResourceUri])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDefinedFunction' {Maybe [ResourceUri]
resourceUris :: Maybe [ResourceUri]
$sel:resourceUris:UserDefinedFunction' :: UserDefinedFunction -> Maybe [ResourceUri]
resourceUris} -> Maybe [ResourceUri]
resourceUris) (\s :: UserDefinedFunction
s@UserDefinedFunction' {} Maybe [ResourceUri]
a -> UserDefinedFunction
s {$sel:resourceUris:UserDefinedFunction' :: Maybe [ResourceUri]
resourceUris = Maybe [ResourceUri]
a} :: UserDefinedFunction) ((Maybe [ResourceUri] -> f (Maybe [ResourceUri]))
 -> UserDefinedFunction -> f UserDefinedFunction)
-> ((Maybe [ResourceUri] -> f (Maybe [ResourceUri]))
    -> Maybe [ResourceUri] -> f (Maybe [ResourceUri]))
-> (Maybe [ResourceUri] -> f (Maybe [ResourceUri]))
-> UserDefinedFunction
-> f UserDefinedFunction
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ResourceUri] [ResourceUri] [ResourceUri] [ResourceUri]
-> Iso
     (Maybe [ResourceUri])
     (Maybe [ResourceUri])
     (Maybe [ResourceUri])
     (Maybe [ResourceUri])
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 [ResourceUri] [ResourceUri] [ResourceUri] [ResourceUri]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the catalog database that contains the function.
userDefinedFunction_databaseName :: Lens.Lens' UserDefinedFunction (Prelude.Maybe Prelude.Text)
userDefinedFunction_databaseName :: (Maybe Text -> f (Maybe Text))
-> UserDefinedFunction -> f UserDefinedFunction
userDefinedFunction_databaseName = (UserDefinedFunction -> Maybe Text)
-> (UserDefinedFunction -> Maybe Text -> UserDefinedFunction)
-> Lens
     UserDefinedFunction UserDefinedFunction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDefinedFunction' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:UserDefinedFunction' :: UserDefinedFunction -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: UserDefinedFunction
s@UserDefinedFunction' {} Maybe Text
a -> UserDefinedFunction
s {$sel:databaseName:UserDefinedFunction' :: Maybe Text
databaseName = Maybe Text
a} :: UserDefinedFunction)

-- | The name of the function.
userDefinedFunction_functionName :: Lens.Lens' UserDefinedFunction (Prelude.Maybe Prelude.Text)
userDefinedFunction_functionName :: (Maybe Text -> f (Maybe Text))
-> UserDefinedFunction -> f UserDefinedFunction
userDefinedFunction_functionName = (UserDefinedFunction -> Maybe Text)
-> (UserDefinedFunction -> Maybe Text -> UserDefinedFunction)
-> Lens
     UserDefinedFunction UserDefinedFunction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDefinedFunction' {Maybe Text
functionName :: Maybe Text
$sel:functionName:UserDefinedFunction' :: UserDefinedFunction -> Maybe Text
functionName} -> Maybe Text
functionName) (\s :: UserDefinedFunction
s@UserDefinedFunction' {} Maybe Text
a -> UserDefinedFunction
s {$sel:functionName:UserDefinedFunction' :: Maybe Text
functionName = Maybe Text
a} :: UserDefinedFunction)

-- | The owner type.
userDefinedFunction_ownerType :: Lens.Lens' UserDefinedFunction (Prelude.Maybe PrincipalType)
userDefinedFunction_ownerType :: (Maybe PrincipalType -> f (Maybe PrincipalType))
-> UserDefinedFunction -> f UserDefinedFunction
userDefinedFunction_ownerType = (UserDefinedFunction -> Maybe PrincipalType)
-> (UserDefinedFunction
    -> Maybe PrincipalType -> UserDefinedFunction)
-> Lens
     UserDefinedFunction
     UserDefinedFunction
     (Maybe PrincipalType)
     (Maybe PrincipalType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDefinedFunction' {Maybe PrincipalType
ownerType :: Maybe PrincipalType
$sel:ownerType:UserDefinedFunction' :: UserDefinedFunction -> Maybe PrincipalType
ownerType} -> Maybe PrincipalType
ownerType) (\s :: UserDefinedFunction
s@UserDefinedFunction' {} Maybe PrincipalType
a -> UserDefinedFunction
s {$sel:ownerType:UserDefinedFunction' :: Maybe PrincipalType
ownerType = Maybe PrincipalType
a} :: UserDefinedFunction)

-- | The time at which the function was created.
userDefinedFunction_createTime :: Lens.Lens' UserDefinedFunction (Prelude.Maybe Prelude.UTCTime)
userDefinedFunction_createTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UserDefinedFunction -> f UserDefinedFunction
userDefinedFunction_createTime = (UserDefinedFunction -> Maybe POSIX)
-> (UserDefinedFunction -> Maybe POSIX -> UserDefinedFunction)
-> Lens
     UserDefinedFunction UserDefinedFunction (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDefinedFunction' {Maybe POSIX
createTime :: Maybe POSIX
$sel:createTime:UserDefinedFunction' :: UserDefinedFunction -> Maybe POSIX
createTime} -> Maybe POSIX
createTime) (\s :: UserDefinedFunction
s@UserDefinedFunction' {} Maybe POSIX
a -> UserDefinedFunction
s {$sel:createTime:UserDefinedFunction' :: Maybe POSIX
createTime = Maybe POSIX
a} :: UserDefinedFunction) ((Maybe POSIX -> f (Maybe POSIX))
 -> UserDefinedFunction -> f UserDefinedFunction)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UserDefinedFunction
-> f UserDefinedFunction
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 Java class that contains the function code.
userDefinedFunction_className :: Lens.Lens' UserDefinedFunction (Prelude.Maybe Prelude.Text)
userDefinedFunction_className :: (Maybe Text -> f (Maybe Text))
-> UserDefinedFunction -> f UserDefinedFunction
userDefinedFunction_className = (UserDefinedFunction -> Maybe Text)
-> (UserDefinedFunction -> Maybe Text -> UserDefinedFunction)
-> Lens
     UserDefinedFunction UserDefinedFunction (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserDefinedFunction' {Maybe Text
className :: Maybe Text
$sel:className:UserDefinedFunction' :: UserDefinedFunction -> Maybe Text
className} -> Maybe Text
className) (\s :: UserDefinedFunction
s@UserDefinedFunction' {} Maybe Text
a -> UserDefinedFunction
s {$sel:className:UserDefinedFunction' :: Maybe Text
className = Maybe Text
a} :: UserDefinedFunction)

instance Core.FromJSON UserDefinedFunction where
  parseJSON :: Value -> Parser UserDefinedFunction
parseJSON =
    String
-> (Object -> Parser UserDefinedFunction)
-> Value
-> Parser UserDefinedFunction
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"UserDefinedFunction"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe [ResourceUri]
-> Maybe Text
-> Maybe Text
-> Maybe PrincipalType
-> Maybe POSIX
-> Maybe Text
-> UserDefinedFunction
UserDefinedFunction'
            (Maybe Text
 -> Maybe Text
 -> Maybe [ResourceUri]
 -> Maybe Text
 -> Maybe Text
 -> Maybe PrincipalType
 -> Maybe POSIX
 -> Maybe Text
 -> UserDefinedFunction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [ResourceUri]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PrincipalType
      -> Maybe POSIX
      -> Maybe Text
      -> UserDefinedFunction)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OwnerName")
            Parser
  (Maybe Text
   -> Maybe [ResourceUri]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PrincipalType
   -> Maybe POSIX
   -> Maybe Text
   -> UserDefinedFunction)
-> Parser (Maybe Text)
-> Parser
     (Maybe [ResourceUri]
      -> Maybe Text
      -> Maybe Text
      -> Maybe PrincipalType
      -> Maybe POSIX
      -> Maybe Text
      -> UserDefinedFunction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CatalogId")
            Parser
  (Maybe [ResourceUri]
   -> Maybe Text
   -> Maybe Text
   -> Maybe PrincipalType
   -> Maybe POSIX
   -> Maybe Text
   -> UserDefinedFunction)
-> Parser (Maybe [ResourceUri])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe PrincipalType
      -> Maybe POSIX
      -> Maybe Text
      -> UserDefinedFunction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [ResourceUri]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourceUris" Parser (Maybe (Maybe [ResourceUri]))
-> Maybe [ResourceUri] -> Parser (Maybe [ResourceUri])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ResourceUri]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe PrincipalType
   -> Maybe POSIX
   -> Maybe Text
   -> UserDefinedFunction)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe PrincipalType
      -> Maybe POSIX
      -> Maybe Text
      -> UserDefinedFunction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DatabaseName")
            Parser
  (Maybe Text
   -> Maybe PrincipalType
   -> Maybe POSIX
   -> Maybe Text
   -> UserDefinedFunction)
-> Parser (Maybe Text)
-> Parser
     (Maybe PrincipalType
      -> Maybe POSIX -> Maybe Text -> UserDefinedFunction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FunctionName")
            Parser
  (Maybe PrincipalType
   -> Maybe POSIX -> Maybe Text -> UserDefinedFunction)
-> Parser (Maybe PrincipalType)
-> Parser (Maybe POSIX -> Maybe Text -> UserDefinedFunction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PrincipalType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OwnerType")
            Parser (Maybe POSIX -> Maybe Text -> UserDefinedFunction)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> UserDefinedFunction)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreateTime")
            Parser (Maybe Text -> UserDefinedFunction)
-> Parser (Maybe Text) -> Parser UserDefinedFunction
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClassName")
      )

instance Prelude.Hashable UserDefinedFunction

instance Prelude.NFData UserDefinedFunction