{-# 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.SageMaker.Types.Workteam
-- 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.SageMaker.Types.Workteam where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.MemberDefinition
import Amazonka.SageMaker.Types.NotificationConfiguration

-- | Provides details about a labeling work team.
--
-- /See:/ 'newWorkteam' smart constructor.
data Workteam = Workteam'
  { -- | The URI of the labeling job\'s user interface. Workers open this URI to
    -- start labeling your data objects.
    Workteam -> Maybe Text
subDomain :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Marketplace identifier for a vendor\'s work team.
    Workteam -> Maybe [Text]
productListingIds :: Prelude.Maybe [Prelude.Text],
    -- | Configures SNS notifications of available or expiring work items for
    -- work teams.
    Workteam -> Maybe NotificationConfiguration
notificationConfiguration :: Prelude.Maybe NotificationConfiguration,
    -- | The date and time that the work team was created (timestamp).
    Workteam -> Maybe POSIX
createDate :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the workforce.
    Workteam -> Maybe Text
workforceArn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the work team was last updated (timestamp).
    Workteam -> Maybe POSIX
lastUpdatedDate :: Prelude.Maybe Core.POSIX,
    -- | The name of the work team.
    Workteam -> Text
workteamName :: Prelude.Text,
    -- | A list of @MemberDefinition@ objects that contains objects that identify
    -- the workers that make up the work team.
    --
    -- Workforces can be created using Amazon Cognito or your own OIDC Identity
    -- Provider (IdP). For private workforces created using Amazon Cognito use
    -- @CognitoMemberDefinition@. For workforces created using your own OIDC
    -- identity provider (IdP) use @OidcMemberDefinition@.
    Workteam -> NonEmpty MemberDefinition
memberDefinitions :: Prelude.NonEmpty MemberDefinition,
    -- | The Amazon Resource Name (ARN) that identifies the work team.
    Workteam -> Text
workteamArn :: Prelude.Text,
    -- | A description of the work team.
    Workteam -> Text
description :: Prelude.Text
  }
  deriving (Workteam -> Workteam -> Bool
(Workteam -> Workteam -> Bool)
-> (Workteam -> Workteam -> Bool) -> Eq Workteam
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Workteam -> Workteam -> Bool
$c/= :: Workteam -> Workteam -> Bool
== :: Workteam -> Workteam -> Bool
$c== :: Workteam -> Workteam -> Bool
Prelude.Eq, ReadPrec [Workteam]
ReadPrec Workteam
Int -> ReadS Workteam
ReadS [Workteam]
(Int -> ReadS Workteam)
-> ReadS [Workteam]
-> ReadPrec Workteam
-> ReadPrec [Workteam]
-> Read Workteam
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Workteam]
$creadListPrec :: ReadPrec [Workteam]
readPrec :: ReadPrec Workteam
$creadPrec :: ReadPrec Workteam
readList :: ReadS [Workteam]
$creadList :: ReadS [Workteam]
readsPrec :: Int -> ReadS Workteam
$creadsPrec :: Int -> ReadS Workteam
Prelude.Read, Int -> Workteam -> ShowS
[Workteam] -> ShowS
Workteam -> String
(Int -> Workteam -> ShowS)
-> (Workteam -> String) -> ([Workteam] -> ShowS) -> Show Workteam
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Workteam] -> ShowS
$cshowList :: [Workteam] -> ShowS
show :: Workteam -> String
$cshow :: Workteam -> String
showsPrec :: Int -> Workteam -> ShowS
$cshowsPrec :: Int -> Workteam -> ShowS
Prelude.Show, (forall x. Workteam -> Rep Workteam x)
-> (forall x. Rep Workteam x -> Workteam) -> Generic Workteam
forall x. Rep Workteam x -> Workteam
forall x. Workteam -> Rep Workteam x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Workteam x -> Workteam
$cfrom :: forall x. Workteam -> Rep Workteam x
Prelude.Generic)

-- |
-- Create a value of 'Workteam' 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:
--
-- 'subDomain', 'workteam_subDomain' - The URI of the labeling job\'s user interface. Workers open this URI to
-- start labeling your data objects.
--
-- 'productListingIds', 'workteam_productListingIds' - The Amazon Marketplace identifier for a vendor\'s work team.
--
-- 'notificationConfiguration', 'workteam_notificationConfiguration' - Configures SNS notifications of available or expiring work items for
-- work teams.
--
-- 'createDate', 'workteam_createDate' - The date and time that the work team was created (timestamp).
--
-- 'workforceArn', 'workteam_workforceArn' - The Amazon Resource Name (ARN) of the workforce.
--
-- 'lastUpdatedDate', 'workteam_lastUpdatedDate' - The date and time that the work team was last updated (timestamp).
--
-- 'workteamName', 'workteam_workteamName' - The name of the work team.
--
-- 'memberDefinitions', 'workteam_memberDefinitions' - A list of @MemberDefinition@ objects that contains objects that identify
-- the workers that make up the work team.
--
-- Workforces can be created using Amazon Cognito or your own OIDC Identity
-- Provider (IdP). For private workforces created using Amazon Cognito use
-- @CognitoMemberDefinition@. For workforces created using your own OIDC
-- identity provider (IdP) use @OidcMemberDefinition@.
--
-- 'workteamArn', 'workteam_workteamArn' - The Amazon Resource Name (ARN) that identifies the work team.
--
-- 'description', 'workteam_description' - A description of the work team.
newWorkteam ::
  -- | 'workteamName'
  Prelude.Text ->
  -- | 'memberDefinitions'
  Prelude.NonEmpty MemberDefinition ->
  -- | 'workteamArn'
  Prelude.Text ->
  -- | 'description'
  Prelude.Text ->
  Workteam
newWorkteam :: Text -> NonEmpty MemberDefinition -> Text -> Text -> Workteam
newWorkteam
  Text
pWorkteamName_
  NonEmpty MemberDefinition
pMemberDefinitions_
  Text
pWorkteamArn_
  Text
pDescription_ =
    Workteam' :: Maybe Text
-> Maybe [Text]
-> Maybe NotificationConfiguration
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Text
-> NonEmpty MemberDefinition
-> Text
-> Text
-> Workteam
Workteam'
      { $sel:subDomain:Workteam' :: Maybe Text
subDomain = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:productListingIds:Workteam' :: Maybe [Text]
productListingIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:notificationConfiguration:Workteam' :: Maybe NotificationConfiguration
notificationConfiguration = Maybe NotificationConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:createDate:Workteam' :: Maybe POSIX
createDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:workforceArn:Workteam' :: Maybe Text
workforceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:lastUpdatedDate:Workteam' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:workteamName:Workteam' :: Text
workteamName = Text
pWorkteamName_,
        $sel:memberDefinitions:Workteam' :: NonEmpty MemberDefinition
memberDefinitions =
          Tagged
  (NonEmpty MemberDefinition) (Identity (NonEmpty MemberDefinition))
-> Tagged
     (NonEmpty MemberDefinition) (Identity (NonEmpty MemberDefinition))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
   (NonEmpty MemberDefinition) (Identity (NonEmpty MemberDefinition))
 -> Tagged
      (NonEmpty MemberDefinition) (Identity (NonEmpty MemberDefinition)))
-> NonEmpty MemberDefinition -> NonEmpty MemberDefinition
forall t b. AReview t b -> b -> t
Lens.# NonEmpty MemberDefinition
pMemberDefinitions_,
        $sel:workteamArn:Workteam' :: Text
workteamArn = Text
pWorkteamArn_,
        $sel:description:Workteam' :: Text
description = Text
pDescription_
      }

-- | The URI of the labeling job\'s user interface. Workers open this URI to
-- start labeling your data objects.
workteam_subDomain :: Lens.Lens' Workteam (Prelude.Maybe Prelude.Text)
workteam_subDomain :: (Maybe Text -> f (Maybe Text)) -> Workteam -> f Workteam
workteam_subDomain = (Workteam -> Maybe Text)
-> (Workteam -> Maybe Text -> Workteam)
-> Lens Workteam Workteam (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workteam' {Maybe Text
subDomain :: Maybe Text
$sel:subDomain:Workteam' :: Workteam -> Maybe Text
subDomain} -> Maybe Text
subDomain) (\s :: Workteam
s@Workteam' {} Maybe Text
a -> Workteam
s {$sel:subDomain:Workteam' :: Maybe Text
subDomain = Maybe Text
a} :: Workteam)

-- | The Amazon Marketplace identifier for a vendor\'s work team.
workteam_productListingIds :: Lens.Lens' Workteam (Prelude.Maybe [Prelude.Text])
workteam_productListingIds :: (Maybe [Text] -> f (Maybe [Text])) -> Workteam -> f Workteam
workteam_productListingIds = (Workteam -> Maybe [Text])
-> (Workteam -> Maybe [Text] -> Workteam)
-> Lens Workteam Workteam (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workteam' {Maybe [Text]
productListingIds :: Maybe [Text]
$sel:productListingIds:Workteam' :: Workteam -> Maybe [Text]
productListingIds} -> Maybe [Text]
productListingIds) (\s :: Workteam
s@Workteam' {} Maybe [Text]
a -> Workteam
s {$sel:productListingIds:Workteam' :: Maybe [Text]
productListingIds = Maybe [Text]
a} :: Workteam) ((Maybe [Text] -> f (Maybe [Text])) -> Workteam -> f Workteam)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Workteam
-> f Workteam
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

-- | Configures SNS notifications of available or expiring work items for
-- work teams.
workteam_notificationConfiguration :: Lens.Lens' Workteam (Prelude.Maybe NotificationConfiguration)
workteam_notificationConfiguration :: (Maybe NotificationConfiguration
 -> f (Maybe NotificationConfiguration))
-> Workteam -> f Workteam
workteam_notificationConfiguration = (Workteam -> Maybe NotificationConfiguration)
-> (Workteam -> Maybe NotificationConfiguration -> Workteam)
-> Lens
     Workteam
     Workteam
     (Maybe NotificationConfiguration)
     (Maybe NotificationConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workteam' {Maybe NotificationConfiguration
notificationConfiguration :: Maybe NotificationConfiguration
$sel:notificationConfiguration:Workteam' :: Workteam -> Maybe NotificationConfiguration
notificationConfiguration} -> Maybe NotificationConfiguration
notificationConfiguration) (\s :: Workteam
s@Workteam' {} Maybe NotificationConfiguration
a -> Workteam
s {$sel:notificationConfiguration:Workteam' :: Maybe NotificationConfiguration
notificationConfiguration = Maybe NotificationConfiguration
a} :: Workteam)

-- | The date and time that the work team was created (timestamp).
workteam_createDate :: Lens.Lens' Workteam (Prelude.Maybe Prelude.UTCTime)
workteam_createDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Workteam -> f Workteam
workteam_createDate = (Workteam -> Maybe POSIX)
-> (Workteam -> Maybe POSIX -> Workteam)
-> Lens Workteam Workteam (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workteam' {Maybe POSIX
createDate :: Maybe POSIX
$sel:createDate:Workteam' :: Workteam -> Maybe POSIX
createDate} -> Maybe POSIX
createDate) (\s :: Workteam
s@Workteam' {} Maybe POSIX
a -> Workteam
s {$sel:createDate:Workteam' :: Maybe POSIX
createDate = Maybe POSIX
a} :: Workteam) ((Maybe POSIX -> f (Maybe POSIX)) -> Workteam -> f Workteam)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Workteam
-> f Workteam
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 Amazon Resource Name (ARN) of the workforce.
workteam_workforceArn :: Lens.Lens' Workteam (Prelude.Maybe Prelude.Text)
workteam_workforceArn :: (Maybe Text -> f (Maybe Text)) -> Workteam -> f Workteam
workteam_workforceArn = (Workteam -> Maybe Text)
-> (Workteam -> Maybe Text -> Workteam)
-> Lens Workteam Workteam (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workteam' {Maybe Text
workforceArn :: Maybe Text
$sel:workforceArn:Workteam' :: Workteam -> Maybe Text
workforceArn} -> Maybe Text
workforceArn) (\s :: Workteam
s@Workteam' {} Maybe Text
a -> Workteam
s {$sel:workforceArn:Workteam' :: Maybe Text
workforceArn = Maybe Text
a} :: Workteam)

-- | The date and time that the work team was last updated (timestamp).
workteam_lastUpdatedDate :: Lens.Lens' Workteam (Prelude.Maybe Prelude.UTCTime)
workteam_lastUpdatedDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Workteam -> f Workteam
workteam_lastUpdatedDate = (Workteam -> Maybe POSIX)
-> (Workteam -> Maybe POSIX -> Workteam)
-> Lens Workteam Workteam (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workteam' {Maybe POSIX
lastUpdatedDate :: Maybe POSIX
$sel:lastUpdatedDate:Workteam' :: Workteam -> Maybe POSIX
lastUpdatedDate} -> Maybe POSIX
lastUpdatedDate) (\s :: Workteam
s@Workteam' {} Maybe POSIX
a -> Workteam
s {$sel:lastUpdatedDate:Workteam' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
a} :: Workteam) ((Maybe POSIX -> f (Maybe POSIX)) -> Workteam -> f Workteam)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Workteam
-> f Workteam
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 name of the work team.
workteam_workteamName :: Lens.Lens' Workteam Prelude.Text
workteam_workteamName :: (Text -> f Text) -> Workteam -> f Workteam
workteam_workteamName = (Workteam -> Text)
-> (Workteam -> Text -> Workteam)
-> Lens Workteam Workteam Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workteam' {Text
workteamName :: Text
$sel:workteamName:Workteam' :: Workteam -> Text
workteamName} -> Text
workteamName) (\s :: Workteam
s@Workteam' {} Text
a -> Workteam
s {$sel:workteamName:Workteam' :: Text
workteamName = Text
a} :: Workteam)

-- | A list of @MemberDefinition@ objects that contains objects that identify
-- the workers that make up the work team.
--
-- Workforces can be created using Amazon Cognito or your own OIDC Identity
-- Provider (IdP). For private workforces created using Amazon Cognito use
-- @CognitoMemberDefinition@. For workforces created using your own OIDC
-- identity provider (IdP) use @OidcMemberDefinition@.
workteam_memberDefinitions :: Lens.Lens' Workteam (Prelude.NonEmpty MemberDefinition)
workteam_memberDefinitions :: (NonEmpty MemberDefinition -> f (NonEmpty MemberDefinition))
-> Workteam -> f Workteam
workteam_memberDefinitions = (Workteam -> NonEmpty MemberDefinition)
-> (Workteam -> NonEmpty MemberDefinition -> Workteam)
-> Lens
     Workteam
     Workteam
     (NonEmpty MemberDefinition)
     (NonEmpty MemberDefinition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workteam' {NonEmpty MemberDefinition
memberDefinitions :: NonEmpty MemberDefinition
$sel:memberDefinitions:Workteam' :: Workteam -> NonEmpty MemberDefinition
memberDefinitions} -> NonEmpty MemberDefinition
memberDefinitions) (\s :: Workteam
s@Workteam' {} NonEmpty MemberDefinition
a -> Workteam
s {$sel:memberDefinitions:Workteam' :: NonEmpty MemberDefinition
memberDefinitions = NonEmpty MemberDefinition
a} :: Workteam) ((NonEmpty MemberDefinition -> f (NonEmpty MemberDefinition))
 -> Workteam -> f Workteam)
-> ((NonEmpty MemberDefinition -> f (NonEmpty MemberDefinition))
    -> NonEmpty MemberDefinition -> f (NonEmpty MemberDefinition))
-> (NonEmpty MemberDefinition -> f (NonEmpty MemberDefinition))
-> Workteam
-> f Workteam
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty MemberDefinition -> f (NonEmpty MemberDefinition))
-> NonEmpty MemberDefinition -> f (NonEmpty MemberDefinition)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) that identifies the work team.
workteam_workteamArn :: Lens.Lens' Workteam Prelude.Text
workteam_workteamArn :: (Text -> f Text) -> Workteam -> f Workteam
workteam_workteamArn = (Workteam -> Text)
-> (Workteam -> Text -> Workteam)
-> Lens Workteam Workteam Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workteam' {Text
workteamArn :: Text
$sel:workteamArn:Workteam' :: Workteam -> Text
workteamArn} -> Text
workteamArn) (\s :: Workteam
s@Workteam' {} Text
a -> Workteam
s {$sel:workteamArn:Workteam' :: Text
workteamArn = Text
a} :: Workteam)

-- | A description of the work team.
workteam_description :: Lens.Lens' Workteam Prelude.Text
workteam_description :: (Text -> f Text) -> Workteam -> f Workteam
workteam_description = (Workteam -> Text)
-> (Workteam -> Text -> Workteam)
-> Lens Workteam Workteam Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workteam' {Text
description :: Text
$sel:description:Workteam' :: Workteam -> Text
description} -> Text
description) (\s :: Workteam
s@Workteam' {} Text
a -> Workteam
s {$sel:description:Workteam' :: Text
description = Text
a} :: Workteam)

instance Core.FromJSON Workteam where
  parseJSON :: Value -> Parser Workteam
parseJSON =
    String -> (Object -> Parser Workteam) -> Value -> Parser Workteam
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Workteam"
      ( \Object
x ->
          Maybe Text
-> Maybe [Text]
-> Maybe NotificationConfiguration
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Text
-> NonEmpty MemberDefinition
-> Text
-> Text
-> Workteam
Workteam'
            (Maybe Text
 -> Maybe [Text]
 -> Maybe NotificationConfiguration
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe POSIX
 -> Text
 -> NonEmpty MemberDefinition
 -> Text
 -> Text
 -> Workteam)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe NotificationConfiguration
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Text
      -> NonEmpty MemberDefinition
      -> Text
      -> Text
      -> Workteam)
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
"SubDomain")
            Parser
  (Maybe [Text]
   -> Maybe NotificationConfiguration
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Text
   -> NonEmpty MemberDefinition
   -> Text
   -> Text
   -> Workteam)
-> Parser (Maybe [Text])
-> Parser
     (Maybe NotificationConfiguration
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Text
      -> NonEmpty MemberDefinition
      -> Text
      -> Text
      -> Workteam)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProductListingIds"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe NotificationConfiguration
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Text
   -> NonEmpty MemberDefinition
   -> Text
   -> Text
   -> Workteam)
-> Parser (Maybe NotificationConfiguration)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe POSIX
      -> Text
      -> NonEmpty MemberDefinition
      -> Text
      -> Text
      -> Workteam)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NotificationConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotificationConfiguration")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe POSIX
   -> Text
   -> NonEmpty MemberDefinition
   -> Text
   -> Text
   -> Workteam)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Text
      -> NonEmpty MemberDefinition
      -> Text
      -> Text
      -> Workteam)
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
"CreateDate")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Text
   -> NonEmpty MemberDefinition
   -> Text
   -> Text
   -> Workteam)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Text -> NonEmpty MemberDefinition -> Text -> Text -> Workteam)
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
"WorkforceArn")
            Parser
  (Maybe POSIX
   -> Text -> NonEmpty MemberDefinition -> Text -> Text -> Workteam)
-> Parser (Maybe POSIX)
-> Parser
     (Text -> NonEmpty MemberDefinition -> Text -> Text -> Workteam)
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
"LastUpdatedDate")
            Parser
  (Text -> NonEmpty MemberDefinition -> Text -> Text -> Workteam)
-> Parser Text
-> Parser (NonEmpty MemberDefinition -> Text -> Text -> Workteam)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"WorkteamName")
            Parser (NonEmpty MemberDefinition -> Text -> Text -> Workteam)
-> Parser (NonEmpty MemberDefinition)
-> Parser (Text -> Text -> Workteam)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (NonEmpty MemberDefinition)
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MemberDefinitions")
            Parser (Text -> Text -> Workteam)
-> Parser Text -> Parser (Text -> Workteam)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"WorkteamArn")
            Parser (Text -> Workteam) -> Parser Text -> Parser Workteam
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Description")
      )

instance Prelude.Hashable Workteam

instance Prelude.NFData Workteam