{-# 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 #-}
module Amazonka.SageMaker.Types.Workforce where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.CognitoConfig
import Amazonka.SageMaker.Types.OidcConfigForResponse
import Amazonka.SageMaker.Types.SourceIpConfig
data Workforce = Workforce'
{
Workforce -> Maybe Text
subDomain :: Prelude.Maybe Prelude.Text,
Workforce -> Maybe POSIX
createDate :: Prelude.Maybe Core.POSIX,
Workforce -> Maybe SourceIpConfig
sourceIpConfig :: Prelude.Maybe SourceIpConfig,
Workforce -> Maybe CognitoConfig
cognitoConfig :: Prelude.Maybe CognitoConfig,
Workforce -> Maybe POSIX
lastUpdatedDate :: Prelude.Maybe Core.POSIX,
Workforce -> Maybe OidcConfigForResponse
oidcConfig :: Prelude.Maybe OidcConfigForResponse,
Workforce -> Text
workforceName :: Prelude.Text,
Workforce -> Text
workforceArn :: Prelude.Text
}
deriving (Workforce -> Workforce -> Bool
(Workforce -> Workforce -> Bool)
-> (Workforce -> Workforce -> Bool) -> Eq Workforce
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Workforce -> Workforce -> Bool
$c/= :: Workforce -> Workforce -> Bool
== :: Workforce -> Workforce -> Bool
$c== :: Workforce -> Workforce -> Bool
Prelude.Eq, ReadPrec [Workforce]
ReadPrec Workforce
Int -> ReadS Workforce
ReadS [Workforce]
(Int -> ReadS Workforce)
-> ReadS [Workforce]
-> ReadPrec Workforce
-> ReadPrec [Workforce]
-> Read Workforce
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Workforce]
$creadListPrec :: ReadPrec [Workforce]
readPrec :: ReadPrec Workforce
$creadPrec :: ReadPrec Workforce
readList :: ReadS [Workforce]
$creadList :: ReadS [Workforce]
readsPrec :: Int -> ReadS Workforce
$creadsPrec :: Int -> ReadS Workforce
Prelude.Read, Int -> Workforce -> ShowS
[Workforce] -> ShowS
Workforce -> String
(Int -> Workforce -> ShowS)
-> (Workforce -> String)
-> ([Workforce] -> ShowS)
-> Show Workforce
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Workforce] -> ShowS
$cshowList :: [Workforce] -> ShowS
show :: Workforce -> String
$cshow :: Workforce -> String
showsPrec :: Int -> Workforce -> ShowS
$cshowsPrec :: Int -> Workforce -> ShowS
Prelude.Show, (forall x. Workforce -> Rep Workforce x)
-> (forall x. Rep Workforce x -> Workforce) -> Generic Workforce
forall x. Rep Workforce x -> Workforce
forall x. Workforce -> Rep Workforce x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Workforce x -> Workforce
$cfrom :: forall x. Workforce -> Rep Workforce x
Prelude.Generic)
newWorkforce ::
Prelude.Text ->
Prelude.Text ->
Workforce
newWorkforce :: Text -> Text -> Workforce
newWorkforce Text
pWorkforceName_ Text
pWorkforceArn_ =
Workforce' :: Maybe Text
-> Maybe POSIX
-> Maybe SourceIpConfig
-> Maybe CognitoConfig
-> Maybe POSIX
-> Maybe OidcConfigForResponse
-> Text
-> Text
-> Workforce
Workforce'
{ $sel:subDomain:Workforce' :: Maybe Text
subDomain = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createDate:Workforce' :: Maybe POSIX
createDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:sourceIpConfig:Workforce' :: Maybe SourceIpConfig
sourceIpConfig = Maybe SourceIpConfig
forall a. Maybe a
Prelude.Nothing,
$sel:cognitoConfig:Workforce' :: Maybe CognitoConfig
cognitoConfig = Maybe CognitoConfig
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDate:Workforce' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:oidcConfig:Workforce' :: Maybe OidcConfigForResponse
oidcConfig = Maybe OidcConfigForResponse
forall a. Maybe a
Prelude.Nothing,
$sel:workforceName:Workforce' :: Text
workforceName = Text
pWorkforceName_,
$sel:workforceArn:Workforce' :: Text
workforceArn = Text
pWorkforceArn_
}
workforce_subDomain :: Lens.Lens' Workforce (Prelude.Maybe Prelude.Text)
workforce_subDomain :: (Maybe Text -> f (Maybe Text)) -> Workforce -> f Workforce
workforce_subDomain = (Workforce -> Maybe Text)
-> (Workforce -> Maybe Text -> Workforce)
-> Lens Workforce Workforce (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workforce' {Maybe Text
subDomain :: Maybe Text
$sel:subDomain:Workforce' :: Workforce -> Maybe Text
subDomain} -> Maybe Text
subDomain) (\s :: Workforce
s@Workforce' {} Maybe Text
a -> Workforce
s {$sel:subDomain:Workforce' :: Maybe Text
subDomain = Maybe Text
a} :: Workforce)
workforce_createDate :: Lens.Lens' Workforce (Prelude.Maybe Prelude.UTCTime)
workforce_createDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Workforce -> f Workforce
workforce_createDate = (Workforce -> Maybe POSIX)
-> (Workforce -> Maybe POSIX -> Workforce)
-> Lens Workforce Workforce (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workforce' {Maybe POSIX
createDate :: Maybe POSIX
$sel:createDate:Workforce' :: Workforce -> Maybe POSIX
createDate} -> Maybe POSIX
createDate) (\s :: Workforce
s@Workforce' {} Maybe POSIX
a -> Workforce
s {$sel:createDate:Workforce' :: Maybe POSIX
createDate = Maybe POSIX
a} :: Workforce) ((Maybe POSIX -> f (Maybe POSIX)) -> Workforce -> f Workforce)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Workforce
-> f Workforce
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
workforce_sourceIpConfig :: Lens.Lens' Workforce (Prelude.Maybe SourceIpConfig)
workforce_sourceIpConfig :: (Maybe SourceIpConfig -> f (Maybe SourceIpConfig))
-> Workforce -> f Workforce
workforce_sourceIpConfig = (Workforce -> Maybe SourceIpConfig)
-> (Workforce -> Maybe SourceIpConfig -> Workforce)
-> Lens
Workforce Workforce (Maybe SourceIpConfig) (Maybe SourceIpConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workforce' {Maybe SourceIpConfig
sourceIpConfig :: Maybe SourceIpConfig
$sel:sourceIpConfig:Workforce' :: Workforce -> Maybe SourceIpConfig
sourceIpConfig} -> Maybe SourceIpConfig
sourceIpConfig) (\s :: Workforce
s@Workforce' {} Maybe SourceIpConfig
a -> Workforce
s {$sel:sourceIpConfig:Workforce' :: Maybe SourceIpConfig
sourceIpConfig = Maybe SourceIpConfig
a} :: Workforce)
workforce_cognitoConfig :: Lens.Lens' Workforce (Prelude.Maybe CognitoConfig)
workforce_cognitoConfig :: (Maybe CognitoConfig -> f (Maybe CognitoConfig))
-> Workforce -> f Workforce
workforce_cognitoConfig = (Workforce -> Maybe CognitoConfig)
-> (Workforce -> Maybe CognitoConfig -> Workforce)
-> Lens
Workforce Workforce (Maybe CognitoConfig) (Maybe CognitoConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workforce' {Maybe CognitoConfig
cognitoConfig :: Maybe CognitoConfig
$sel:cognitoConfig:Workforce' :: Workforce -> Maybe CognitoConfig
cognitoConfig} -> Maybe CognitoConfig
cognitoConfig) (\s :: Workforce
s@Workforce' {} Maybe CognitoConfig
a -> Workforce
s {$sel:cognitoConfig:Workforce' :: Maybe CognitoConfig
cognitoConfig = Maybe CognitoConfig
a} :: Workforce)
workforce_lastUpdatedDate :: Lens.Lens' Workforce (Prelude.Maybe Prelude.UTCTime)
workforce_lastUpdatedDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Workforce -> f Workforce
workforce_lastUpdatedDate = (Workforce -> Maybe POSIX)
-> (Workforce -> Maybe POSIX -> Workforce)
-> Lens Workforce Workforce (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workforce' {Maybe POSIX
lastUpdatedDate :: Maybe POSIX
$sel:lastUpdatedDate:Workforce' :: Workforce -> Maybe POSIX
lastUpdatedDate} -> Maybe POSIX
lastUpdatedDate) (\s :: Workforce
s@Workforce' {} Maybe POSIX
a -> Workforce
s {$sel:lastUpdatedDate:Workforce' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
a} :: Workforce) ((Maybe POSIX -> f (Maybe POSIX)) -> Workforce -> f Workforce)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Workforce
-> f Workforce
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
workforce_oidcConfig :: Lens.Lens' Workforce (Prelude.Maybe OidcConfigForResponse)
workforce_oidcConfig :: (Maybe OidcConfigForResponse -> f (Maybe OidcConfigForResponse))
-> Workforce -> f Workforce
workforce_oidcConfig = (Workforce -> Maybe OidcConfigForResponse)
-> (Workforce -> Maybe OidcConfigForResponse -> Workforce)
-> Lens
Workforce
Workforce
(Maybe OidcConfigForResponse)
(Maybe OidcConfigForResponse)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workforce' {Maybe OidcConfigForResponse
oidcConfig :: Maybe OidcConfigForResponse
$sel:oidcConfig:Workforce' :: Workforce -> Maybe OidcConfigForResponse
oidcConfig} -> Maybe OidcConfigForResponse
oidcConfig) (\s :: Workforce
s@Workforce' {} Maybe OidcConfigForResponse
a -> Workforce
s {$sel:oidcConfig:Workforce' :: Maybe OidcConfigForResponse
oidcConfig = Maybe OidcConfigForResponse
a} :: Workforce)
workforce_workforceName :: Lens.Lens' Workforce Prelude.Text
workforce_workforceName :: (Text -> f Text) -> Workforce -> f Workforce
workforce_workforceName = (Workforce -> Text)
-> (Workforce -> Text -> Workforce)
-> Lens Workforce Workforce Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workforce' {Text
workforceName :: Text
$sel:workforceName:Workforce' :: Workforce -> Text
workforceName} -> Text
workforceName) (\s :: Workforce
s@Workforce' {} Text
a -> Workforce
s {$sel:workforceName:Workforce' :: Text
workforceName = Text
a} :: Workforce)
workforce_workforceArn :: Lens.Lens' Workforce Prelude.Text
workforce_workforceArn :: (Text -> f Text) -> Workforce -> f Workforce
workforce_workforceArn = (Workforce -> Text)
-> (Workforce -> Text -> Workforce)
-> Lens Workforce Workforce Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Workforce' {Text
workforceArn :: Text
$sel:workforceArn:Workforce' :: Workforce -> Text
workforceArn} -> Text
workforceArn) (\s :: Workforce
s@Workforce' {} Text
a -> Workforce
s {$sel:workforceArn:Workforce' :: Text
workforceArn = Text
a} :: Workforce)
instance Core.FromJSON Workforce where
parseJSON :: Value -> Parser Workforce
parseJSON =
String -> (Object -> Parser Workforce) -> Value -> Parser Workforce
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Workforce"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe SourceIpConfig
-> Maybe CognitoConfig
-> Maybe POSIX
-> Maybe OidcConfigForResponse
-> Text
-> Text
-> Workforce
Workforce'
(Maybe Text
-> Maybe POSIX
-> Maybe SourceIpConfig
-> Maybe CognitoConfig
-> Maybe POSIX
-> Maybe OidcConfigForResponse
-> Text
-> Text
-> Workforce)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe SourceIpConfig
-> Maybe CognitoConfig
-> Maybe POSIX
-> Maybe OidcConfigForResponse
-> Text
-> Text
-> Workforce)
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 POSIX
-> Maybe SourceIpConfig
-> Maybe CognitoConfig
-> Maybe POSIX
-> Maybe OidcConfigForResponse
-> Text
-> Text
-> Workforce)
-> Parser (Maybe POSIX)
-> Parser
(Maybe SourceIpConfig
-> Maybe CognitoConfig
-> Maybe POSIX
-> Maybe OidcConfigForResponse
-> Text
-> Text
-> Workforce)
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 SourceIpConfig
-> Maybe CognitoConfig
-> Maybe POSIX
-> Maybe OidcConfigForResponse
-> Text
-> Text
-> Workforce)
-> Parser (Maybe SourceIpConfig)
-> Parser
(Maybe CognitoConfig
-> Maybe POSIX
-> Maybe OidcConfigForResponse
-> Text
-> Text
-> Workforce)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SourceIpConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SourceIpConfig")
Parser
(Maybe CognitoConfig
-> Maybe POSIX
-> Maybe OidcConfigForResponse
-> Text
-> Text
-> Workforce)
-> Parser (Maybe CognitoConfig)
-> Parser
(Maybe POSIX
-> Maybe OidcConfigForResponse -> Text -> Text -> Workforce)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CognitoConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CognitoConfig")
Parser
(Maybe POSIX
-> Maybe OidcConfigForResponse -> Text -> Text -> Workforce)
-> Parser (Maybe POSIX)
-> Parser
(Maybe OidcConfigForResponse -> Text -> Text -> Workforce)
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 (Maybe OidcConfigForResponse -> Text -> Text -> Workforce)
-> Parser (Maybe OidcConfigForResponse)
-> Parser (Text -> Text -> Workforce)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OidcConfigForResponse)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OidcConfig")
Parser (Text -> Text -> Workforce)
-> Parser Text -> Parser (Text -> Workforce)
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
"WorkforceName")
Parser (Text -> Workforce) -> Parser Text -> Parser Workforce
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
"WorkforceArn")
)
instance Prelude.Hashable Workforce
instance Prelude.NFData Workforce