{-# 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.EKS.Types.FargateProfile where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EKS.Types.FargateProfileSelector
import Amazonka.EKS.Types.FargateProfileStatus
import qualified Amazonka.Prelude as Prelude
data FargateProfile = FargateProfile'
{
FargateProfile -> Maybe Text
clusterName :: Prelude.Maybe Prelude.Text,
FargateProfile -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
FargateProfile -> Maybe Text
fargateProfileArn :: Prelude.Maybe Prelude.Text,
FargateProfile -> Maybe Text
fargateProfileName :: Prelude.Maybe Prelude.Text,
FargateProfile -> Maybe Text
podExecutionRoleArn :: Prelude.Maybe Prelude.Text,
FargateProfile -> Maybe [FargateProfileSelector]
selectors :: Prelude.Maybe [FargateProfileSelector],
FargateProfile -> Maybe FargateProfileStatus
status :: Prelude.Maybe FargateProfileStatus,
FargateProfile -> Maybe [Text]
subnets :: Prelude.Maybe [Prelude.Text],
FargateProfile -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (FargateProfile -> FargateProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FargateProfile -> FargateProfile -> Bool
$c/= :: FargateProfile -> FargateProfile -> Bool
== :: FargateProfile -> FargateProfile -> Bool
$c== :: FargateProfile -> FargateProfile -> Bool
Prelude.Eq, ReadPrec [FargateProfile]
ReadPrec FargateProfile
Int -> ReadS FargateProfile
ReadS [FargateProfile]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FargateProfile]
$creadListPrec :: ReadPrec [FargateProfile]
readPrec :: ReadPrec FargateProfile
$creadPrec :: ReadPrec FargateProfile
readList :: ReadS [FargateProfile]
$creadList :: ReadS [FargateProfile]
readsPrec :: Int -> ReadS FargateProfile
$creadsPrec :: Int -> ReadS FargateProfile
Prelude.Read, Int -> FargateProfile -> ShowS
[FargateProfile] -> ShowS
FargateProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FargateProfile] -> ShowS
$cshowList :: [FargateProfile] -> ShowS
show :: FargateProfile -> String
$cshow :: FargateProfile -> String
showsPrec :: Int -> FargateProfile -> ShowS
$cshowsPrec :: Int -> FargateProfile -> ShowS
Prelude.Show, forall x. Rep FargateProfile x -> FargateProfile
forall x. FargateProfile -> Rep FargateProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FargateProfile x -> FargateProfile
$cfrom :: forall x. FargateProfile -> Rep FargateProfile x
Prelude.Generic)
newFargateProfile ::
FargateProfile
newFargateProfile :: FargateProfile
newFargateProfile =
FargateProfile'
{ $sel:clusterName:FargateProfile' :: Maybe Text
clusterName = forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:FargateProfile' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
$sel:fargateProfileArn:FargateProfile' :: Maybe Text
fargateProfileArn = forall a. Maybe a
Prelude.Nothing,
$sel:fargateProfileName:FargateProfile' :: Maybe Text
fargateProfileName = forall a. Maybe a
Prelude.Nothing,
$sel:podExecutionRoleArn:FargateProfile' :: Maybe Text
podExecutionRoleArn = forall a. Maybe a
Prelude.Nothing,
$sel:selectors:FargateProfile' :: Maybe [FargateProfileSelector]
selectors = forall a. Maybe a
Prelude.Nothing,
$sel:status:FargateProfile' :: Maybe FargateProfileStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:subnets:FargateProfile' :: Maybe [Text]
subnets = forall a. Maybe a
Prelude.Nothing,
$sel:tags:FargateProfile' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
}
fargateProfile_clusterName :: Lens.Lens' FargateProfile (Prelude.Maybe Prelude.Text)
fargateProfile_clusterName :: Lens' FargateProfile (Maybe Text)
fargateProfile_clusterName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FargateProfile' {Maybe Text
clusterName :: Maybe Text
$sel:clusterName:FargateProfile' :: FargateProfile -> Maybe Text
clusterName} -> Maybe Text
clusterName) (\s :: FargateProfile
s@FargateProfile' {} Maybe Text
a -> FargateProfile
s {$sel:clusterName:FargateProfile' :: Maybe Text
clusterName = Maybe Text
a} :: FargateProfile)
fargateProfile_createdAt :: Lens.Lens' FargateProfile (Prelude.Maybe Prelude.UTCTime)
fargateProfile_createdAt :: Lens' FargateProfile (Maybe UTCTime)
fargateProfile_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FargateProfile' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:FargateProfile' :: FargateProfile -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: FargateProfile
s@FargateProfile' {} Maybe POSIX
a -> FargateProfile
s {$sel:createdAt:FargateProfile' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: FargateProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
fargateProfile_fargateProfileArn :: Lens.Lens' FargateProfile (Prelude.Maybe Prelude.Text)
fargateProfile_fargateProfileArn :: Lens' FargateProfile (Maybe Text)
fargateProfile_fargateProfileArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FargateProfile' {Maybe Text
fargateProfileArn :: Maybe Text
$sel:fargateProfileArn:FargateProfile' :: FargateProfile -> Maybe Text
fargateProfileArn} -> Maybe Text
fargateProfileArn) (\s :: FargateProfile
s@FargateProfile' {} Maybe Text
a -> FargateProfile
s {$sel:fargateProfileArn:FargateProfile' :: Maybe Text
fargateProfileArn = Maybe Text
a} :: FargateProfile)
fargateProfile_fargateProfileName :: Lens.Lens' FargateProfile (Prelude.Maybe Prelude.Text)
fargateProfile_fargateProfileName :: Lens' FargateProfile (Maybe Text)
fargateProfile_fargateProfileName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FargateProfile' {Maybe Text
fargateProfileName :: Maybe Text
$sel:fargateProfileName:FargateProfile' :: FargateProfile -> Maybe Text
fargateProfileName} -> Maybe Text
fargateProfileName) (\s :: FargateProfile
s@FargateProfile' {} Maybe Text
a -> FargateProfile
s {$sel:fargateProfileName:FargateProfile' :: Maybe Text
fargateProfileName = Maybe Text
a} :: FargateProfile)
fargateProfile_podExecutionRoleArn :: Lens.Lens' FargateProfile (Prelude.Maybe Prelude.Text)
fargateProfile_podExecutionRoleArn :: Lens' FargateProfile (Maybe Text)
fargateProfile_podExecutionRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FargateProfile' {Maybe Text
podExecutionRoleArn :: Maybe Text
$sel:podExecutionRoleArn:FargateProfile' :: FargateProfile -> Maybe Text
podExecutionRoleArn} -> Maybe Text
podExecutionRoleArn) (\s :: FargateProfile
s@FargateProfile' {} Maybe Text
a -> FargateProfile
s {$sel:podExecutionRoleArn:FargateProfile' :: Maybe Text
podExecutionRoleArn = Maybe Text
a} :: FargateProfile)
fargateProfile_selectors :: Lens.Lens' FargateProfile (Prelude.Maybe [FargateProfileSelector])
fargateProfile_selectors :: Lens' FargateProfile (Maybe [FargateProfileSelector])
fargateProfile_selectors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FargateProfile' {Maybe [FargateProfileSelector]
selectors :: Maybe [FargateProfileSelector]
$sel:selectors:FargateProfile' :: FargateProfile -> Maybe [FargateProfileSelector]
selectors} -> Maybe [FargateProfileSelector]
selectors) (\s :: FargateProfile
s@FargateProfile' {} Maybe [FargateProfileSelector]
a -> FargateProfile
s {$sel:selectors:FargateProfile' :: Maybe [FargateProfileSelector]
selectors = Maybe [FargateProfileSelector]
a} :: FargateProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
fargateProfile_status :: Lens.Lens' FargateProfile (Prelude.Maybe FargateProfileStatus)
fargateProfile_status :: Lens' FargateProfile (Maybe FargateProfileStatus)
fargateProfile_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FargateProfile' {Maybe FargateProfileStatus
status :: Maybe FargateProfileStatus
$sel:status:FargateProfile' :: FargateProfile -> Maybe FargateProfileStatus
status} -> Maybe FargateProfileStatus
status) (\s :: FargateProfile
s@FargateProfile' {} Maybe FargateProfileStatus
a -> FargateProfile
s {$sel:status:FargateProfile' :: Maybe FargateProfileStatus
status = Maybe FargateProfileStatus
a} :: FargateProfile)
fargateProfile_subnets :: Lens.Lens' FargateProfile (Prelude.Maybe [Prelude.Text])
fargateProfile_subnets :: Lens' FargateProfile (Maybe [Text])
fargateProfile_subnets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FargateProfile' {Maybe [Text]
subnets :: Maybe [Text]
$sel:subnets:FargateProfile' :: FargateProfile -> Maybe [Text]
subnets} -> Maybe [Text]
subnets) (\s :: FargateProfile
s@FargateProfile' {} Maybe [Text]
a -> FargateProfile
s {$sel:subnets:FargateProfile' :: Maybe [Text]
subnets = Maybe [Text]
a} :: FargateProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
fargateProfile_tags :: Lens.Lens' FargateProfile (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
fargateProfile_tags :: Lens' FargateProfile (Maybe (HashMap Text Text))
fargateProfile_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FargateProfile' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:FargateProfile' :: FargateProfile -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: FargateProfile
s@FargateProfile' {} Maybe (HashMap Text Text)
a -> FargateProfile
s {$sel:tags:FargateProfile' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: FargateProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON FargateProfile where
parseJSON :: Value -> Parser FargateProfile
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FargateProfile"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [FargateProfileSelector]
-> Maybe FargateProfileStatus
-> Maybe [Text]
-> Maybe (HashMap Text Text)
-> FargateProfile
FargateProfile'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"clusterName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createdAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"fargateProfileArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"fargateProfileName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"podExecutionRoleArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"selectors" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"subnets" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable FargateProfile where
hashWithSalt :: Int -> FargateProfile -> Int
hashWithSalt Int
_salt FargateProfile' {Maybe [Text]
Maybe [FargateProfileSelector]
Maybe Text
Maybe (HashMap Text Text)
Maybe POSIX
Maybe FargateProfileStatus
tags :: Maybe (HashMap Text Text)
subnets :: Maybe [Text]
status :: Maybe FargateProfileStatus
selectors :: Maybe [FargateProfileSelector]
podExecutionRoleArn :: Maybe Text
fargateProfileName :: Maybe Text
fargateProfileArn :: Maybe Text
createdAt :: Maybe POSIX
clusterName :: Maybe Text
$sel:tags:FargateProfile' :: FargateProfile -> Maybe (HashMap Text Text)
$sel:subnets:FargateProfile' :: FargateProfile -> Maybe [Text]
$sel:status:FargateProfile' :: FargateProfile -> Maybe FargateProfileStatus
$sel:selectors:FargateProfile' :: FargateProfile -> Maybe [FargateProfileSelector]
$sel:podExecutionRoleArn:FargateProfile' :: FargateProfile -> Maybe Text
$sel:fargateProfileName:FargateProfile' :: FargateProfile -> Maybe Text
$sel:fargateProfileArn:FargateProfile' :: FargateProfile -> Maybe Text
$sel:createdAt:FargateProfile' :: FargateProfile -> Maybe POSIX
$sel:clusterName:FargateProfile' :: FargateProfile -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fargateProfileArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fargateProfileName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
podExecutionRoleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [FargateProfileSelector]
selectors
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FargateProfileStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
subnets
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
instance Prelude.NFData FargateProfile where
rnf :: FargateProfile -> ()
rnf FargateProfile' {Maybe [Text]
Maybe [FargateProfileSelector]
Maybe Text
Maybe (HashMap Text Text)
Maybe POSIX
Maybe FargateProfileStatus
tags :: Maybe (HashMap Text Text)
subnets :: Maybe [Text]
status :: Maybe FargateProfileStatus
selectors :: Maybe [FargateProfileSelector]
podExecutionRoleArn :: Maybe Text
fargateProfileName :: Maybe Text
fargateProfileArn :: Maybe Text
createdAt :: Maybe POSIX
clusterName :: Maybe Text
$sel:tags:FargateProfile' :: FargateProfile -> Maybe (HashMap Text Text)
$sel:subnets:FargateProfile' :: FargateProfile -> Maybe [Text]
$sel:status:FargateProfile' :: FargateProfile -> Maybe FargateProfileStatus
$sel:selectors:FargateProfile' :: FargateProfile -> Maybe [FargateProfileSelector]
$sel:podExecutionRoleArn:FargateProfile' :: FargateProfile -> Maybe Text
$sel:fargateProfileName:FargateProfile' :: FargateProfile -> Maybe Text
$sel:fargateProfileArn:FargateProfile' :: FargateProfile -> Maybe Text
$sel:createdAt:FargateProfile' :: FargateProfile -> Maybe POSIX
$sel:clusterName:FargateProfile' :: FargateProfile -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fargateProfileArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fargateProfileName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
podExecutionRoleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [FargateProfileSelector]
selectors
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FargateProfileStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
subnets
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags