{-# 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.EKS.Types.FargateProfile
-- 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.EKS.Types.FargateProfile where

import qualified Amazonka.Core as Core
import Amazonka.EKS.Types.FargateProfileSelector
import Amazonka.EKS.Types.FargateProfileStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | An object representing an Fargate profile.
--
-- /See:/ 'newFargateProfile' smart constructor.
data FargateProfile = FargateProfile'
  { -- | The full Amazon Resource Name (ARN) of the Fargate profile.
    FargateProfile -> Maybe Text
fargateProfileArn :: Prelude.Maybe Prelude.Text,
    -- | The current status of the Fargate profile.
    FargateProfile -> Maybe FargateProfileStatus
status :: Prelude.Maybe FargateProfileStatus,
    -- | The Unix epoch timestamp in seconds for when the Fargate profile was
    -- created.
    FargateProfile -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The IDs of subnets to launch pods into.
    FargateProfile -> Maybe [Text]
subnets :: Prelude.Maybe [Prelude.Text],
    -- | The name of the Amazon EKS cluster that the Fargate profile belongs to.
    FargateProfile -> Maybe Text
clusterName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the pod execution role to use for pods
    -- that match the selectors in the Fargate profile. For more information,
    -- see
    -- <https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html Pod Execution Role>
    -- in the /Amazon EKS User Guide/.
    FargateProfile -> Maybe Text
podExecutionRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the Fargate profile.
    FargateProfile -> Maybe Text
fargateProfileName :: Prelude.Maybe Prelude.Text,
    -- | The selectors to match for pods to use this Fargate profile.
    FargateProfile -> Maybe [FargateProfileSelector]
selectors :: Prelude.Maybe [FargateProfileSelector],
    -- | The metadata applied to the Fargate profile to assist with
    -- categorization and organization. Each tag consists of a key and an
    -- optional value, both of which you define. Fargate profile tags do not
    -- propagate to any other resources associated with the Fargate profile,
    -- such as the pods that are scheduled with it.
    FargateProfile -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (FargateProfile -> FargateProfile -> Bool
(FargateProfile -> FargateProfile -> Bool)
-> (FargateProfile -> FargateProfile -> Bool) -> Eq FargateProfile
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]
(Int -> ReadS FargateProfile)
-> ReadS [FargateProfile]
-> ReadPrec FargateProfile
-> ReadPrec [FargateProfile]
-> Read 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
(Int -> FargateProfile -> ShowS)
-> (FargateProfile -> String)
-> ([FargateProfile] -> ShowS)
-> Show FargateProfile
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. FargateProfile -> Rep FargateProfile x)
-> (forall x. Rep FargateProfile x -> FargateProfile)
-> Generic FargateProfile
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)

-- |
-- Create a value of 'FargateProfile' 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:
--
-- 'fargateProfileArn', 'fargateProfile_fargateProfileArn' - The full Amazon Resource Name (ARN) of the Fargate profile.
--
-- 'status', 'fargateProfile_status' - The current status of the Fargate profile.
--
-- 'createdAt', 'fargateProfile_createdAt' - The Unix epoch timestamp in seconds for when the Fargate profile was
-- created.
--
-- 'subnets', 'fargateProfile_subnets' - The IDs of subnets to launch pods into.
--
-- 'clusterName', 'fargateProfile_clusterName' - The name of the Amazon EKS cluster that the Fargate profile belongs to.
--
-- 'podExecutionRoleArn', 'fargateProfile_podExecutionRoleArn' - The Amazon Resource Name (ARN) of the pod execution role to use for pods
-- that match the selectors in the Fargate profile. For more information,
-- see
-- <https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html Pod Execution Role>
-- in the /Amazon EKS User Guide/.
--
-- 'fargateProfileName', 'fargateProfile_fargateProfileName' - The name of the Fargate profile.
--
-- 'selectors', 'fargateProfile_selectors' - The selectors to match for pods to use this Fargate profile.
--
-- 'tags', 'fargateProfile_tags' - The metadata applied to the Fargate profile to assist with
-- categorization and organization. Each tag consists of a key and an
-- optional value, both of which you define. Fargate profile tags do not
-- propagate to any other resources associated with the Fargate profile,
-- such as the pods that are scheduled with it.
newFargateProfile ::
  FargateProfile
newFargateProfile :: FargateProfile
newFargateProfile =
  FargateProfile' :: Maybe Text
-> Maybe FargateProfileStatus
-> Maybe POSIX
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [FargateProfileSelector]
-> Maybe (HashMap Text Text)
-> FargateProfile
FargateProfile'
    { $sel:fargateProfileArn:FargateProfile' :: Maybe Text
fargateProfileArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:FargateProfile' :: Maybe FargateProfileStatus
status = Maybe FargateProfileStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:FargateProfile' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:subnets:FargateProfile' :: Maybe [Text]
subnets = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterName:FargateProfile' :: Maybe Text
clusterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:podExecutionRoleArn:FargateProfile' :: Maybe Text
podExecutionRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fargateProfileName:FargateProfile' :: Maybe Text
fargateProfileName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:selectors:FargateProfile' :: Maybe [FargateProfileSelector]
selectors = Maybe [FargateProfileSelector]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:FargateProfile' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | The full Amazon Resource Name (ARN) of the Fargate profile.
fargateProfile_fargateProfileArn :: Lens.Lens' FargateProfile (Prelude.Maybe Prelude.Text)
fargateProfile_fargateProfileArn :: (Maybe Text -> f (Maybe Text))
-> FargateProfile -> f FargateProfile
fargateProfile_fargateProfileArn = (FargateProfile -> Maybe Text)
-> (FargateProfile -> Maybe Text -> FargateProfile)
-> Lens FargateProfile FargateProfile (Maybe Text) (Maybe Text)
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)

-- | The current status of the Fargate profile.
fargateProfile_status :: Lens.Lens' FargateProfile (Prelude.Maybe FargateProfileStatus)
fargateProfile_status :: (Maybe FargateProfileStatus -> f (Maybe FargateProfileStatus))
-> FargateProfile -> f FargateProfile
fargateProfile_status = (FargateProfile -> Maybe FargateProfileStatus)
-> (FargateProfile -> Maybe FargateProfileStatus -> FargateProfile)
-> Lens
     FargateProfile
     FargateProfile
     (Maybe FargateProfileStatus)
     (Maybe FargateProfileStatus)
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)

-- | The Unix epoch timestamp in seconds for when the Fargate profile was
-- created.
fargateProfile_createdAt :: Lens.Lens' FargateProfile (Prelude.Maybe Prelude.UTCTime)
fargateProfile_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> FargateProfile -> f FargateProfile
fargateProfile_createdAt = (FargateProfile -> Maybe POSIX)
-> (FargateProfile -> Maybe POSIX -> FargateProfile)
-> Lens FargateProfile FargateProfile (Maybe POSIX) (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> FargateProfile -> f FargateProfile)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> FargateProfile
-> f FargateProfile
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 IDs of subnets to launch pods into.
fargateProfile_subnets :: Lens.Lens' FargateProfile (Prelude.Maybe [Prelude.Text])
fargateProfile_subnets :: (Maybe [Text] -> f (Maybe [Text]))
-> FargateProfile -> f FargateProfile
fargateProfile_subnets = (FargateProfile -> Maybe [Text])
-> (FargateProfile -> Maybe [Text] -> FargateProfile)
-> Lens FargateProfile FargateProfile (Maybe [Text]) (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> FargateProfile -> f FargateProfile)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> FargateProfile
-> f FargateProfile
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

-- | The name of the Amazon EKS cluster that the Fargate profile belongs to.
fargateProfile_clusterName :: Lens.Lens' FargateProfile (Prelude.Maybe Prelude.Text)
fargateProfile_clusterName :: (Maybe Text -> f (Maybe Text))
-> FargateProfile -> f FargateProfile
fargateProfile_clusterName = (FargateProfile -> Maybe Text)
-> (FargateProfile -> Maybe Text -> FargateProfile)
-> Lens FargateProfile FargateProfile (Maybe Text) (Maybe Text)
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)

-- | The Amazon Resource Name (ARN) of the pod execution role to use for pods
-- that match the selectors in the Fargate profile. For more information,
-- see
-- <https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html Pod Execution Role>
-- in the /Amazon EKS User Guide/.
fargateProfile_podExecutionRoleArn :: Lens.Lens' FargateProfile (Prelude.Maybe Prelude.Text)
fargateProfile_podExecutionRoleArn :: (Maybe Text -> f (Maybe Text))
-> FargateProfile -> f FargateProfile
fargateProfile_podExecutionRoleArn = (FargateProfile -> Maybe Text)
-> (FargateProfile -> Maybe Text -> FargateProfile)
-> Lens FargateProfile FargateProfile (Maybe Text) (Maybe Text)
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)

-- | The name of the Fargate profile.
fargateProfile_fargateProfileName :: Lens.Lens' FargateProfile (Prelude.Maybe Prelude.Text)
fargateProfile_fargateProfileName :: (Maybe Text -> f (Maybe Text))
-> FargateProfile -> f FargateProfile
fargateProfile_fargateProfileName = (FargateProfile -> Maybe Text)
-> (FargateProfile -> Maybe Text -> FargateProfile)
-> Lens FargateProfile FargateProfile (Maybe Text) (Maybe Text)
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)

-- | The selectors to match for pods to use this Fargate profile.
fargateProfile_selectors :: Lens.Lens' FargateProfile (Prelude.Maybe [FargateProfileSelector])
fargateProfile_selectors :: (Maybe [FargateProfileSelector]
 -> f (Maybe [FargateProfileSelector]))
-> FargateProfile -> f FargateProfile
fargateProfile_selectors = (FargateProfile -> Maybe [FargateProfileSelector])
-> (FargateProfile
    -> Maybe [FargateProfileSelector] -> FargateProfile)
-> Lens
     FargateProfile
     FargateProfile
     (Maybe [FargateProfileSelector])
     (Maybe [FargateProfileSelector])
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) ((Maybe [FargateProfileSelector]
  -> f (Maybe [FargateProfileSelector]))
 -> FargateProfile -> f FargateProfile)
-> ((Maybe [FargateProfileSelector]
     -> f (Maybe [FargateProfileSelector]))
    -> Maybe [FargateProfileSelector]
    -> f (Maybe [FargateProfileSelector]))
-> (Maybe [FargateProfileSelector]
    -> f (Maybe [FargateProfileSelector]))
-> FargateProfile
-> f FargateProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [FargateProfileSelector]
  [FargateProfileSelector]
  [FargateProfileSelector]
  [FargateProfileSelector]
-> Iso
     (Maybe [FargateProfileSelector])
     (Maybe [FargateProfileSelector])
     (Maybe [FargateProfileSelector])
     (Maybe [FargateProfileSelector])
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
  [FargateProfileSelector]
  [FargateProfileSelector]
  [FargateProfileSelector]
  [FargateProfileSelector]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The metadata applied to the Fargate profile to assist with
-- categorization and organization. Each tag consists of a key and an
-- optional value, both of which you define. Fargate profile tags do not
-- propagate to any other resources associated with the Fargate profile,
-- such as the pods that are scheduled with it.
fargateProfile_tags :: Lens.Lens' FargateProfile (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
fargateProfile_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> FargateProfile -> f FargateProfile
fargateProfile_tags = (FargateProfile -> Maybe (HashMap Text Text))
-> (FargateProfile -> Maybe (HashMap Text Text) -> FargateProfile)
-> Lens
     FargateProfile
     FargateProfile
     (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 (\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) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> FargateProfile -> f FargateProfile)
-> ((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)))
-> FargateProfile
-> f FargateProfile
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

instance Core.FromJSON FargateProfile where
  parseJSON :: Value -> Parser FargateProfile
parseJSON =
    String
-> (Object -> Parser FargateProfile)
-> Value
-> Parser FargateProfile
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"FargateProfile"
      ( \Object
x ->
          Maybe Text
-> Maybe FargateProfileStatus
-> Maybe POSIX
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [FargateProfileSelector]
-> Maybe (HashMap Text Text)
-> FargateProfile
FargateProfile'
            (Maybe Text
 -> Maybe FargateProfileStatus
 -> Maybe POSIX
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [FargateProfileSelector]
 -> Maybe (HashMap Text Text)
 -> FargateProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe FargateProfileStatus
      -> Maybe POSIX
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FargateProfileSelector]
      -> Maybe (HashMap Text Text)
      -> FargateProfile)
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
"fargateProfileArn")
            Parser
  (Maybe FargateProfileStatus
   -> Maybe POSIX
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FargateProfileSelector]
   -> Maybe (HashMap Text Text)
   -> FargateProfile)
-> Parser (Maybe FargateProfileStatus)
-> Parser
     (Maybe POSIX
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FargateProfileSelector]
      -> Maybe (HashMap Text Text)
      -> FargateProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FargateProfileStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe POSIX
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FargateProfileSelector]
   -> Maybe (HashMap Text Text)
   -> FargateProfile)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FargateProfileSelector]
      -> Maybe (HashMap Text Text)
      -> FargateProfile)
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
"createdAt")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FargateProfileSelector]
   -> Maybe (HashMap Text Text)
   -> FargateProfile)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FargateProfileSelector]
      -> Maybe (HashMap Text Text)
      -> FargateProfile)
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
"subnets" 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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FargateProfileSelector]
   -> Maybe (HashMap Text Text)
   -> FargateProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [FargateProfileSelector]
      -> Maybe (HashMap Text Text)
      -> FargateProfile)
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
"clusterName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [FargateProfileSelector]
   -> Maybe (HashMap Text Text)
   -> FargateProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [FargateProfileSelector]
      -> Maybe (HashMap Text Text)
      -> FargateProfile)
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
"podExecutionRoleArn")
            Parser
  (Maybe Text
   -> Maybe [FargateProfileSelector]
   -> Maybe (HashMap Text Text)
   -> FargateProfile)
-> Parser (Maybe Text)
-> Parser
     (Maybe [FargateProfileSelector]
      -> Maybe (HashMap Text Text) -> FargateProfile)
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
"fargateProfileName")
            Parser
  (Maybe [FargateProfileSelector]
   -> Maybe (HashMap Text Text) -> FargateProfile)
-> Parser (Maybe [FargateProfileSelector])
-> Parser (Maybe (HashMap Text Text) -> FargateProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [FargateProfileSelector]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"selectors" Parser (Maybe (Maybe [FargateProfileSelector]))
-> Maybe [FargateProfileSelector]
-> Parser (Maybe [FargateProfileSelector])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [FargateProfileSelector]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe (HashMap Text Text) -> FargateProfile)
-> Parser (Maybe (HashMap Text Text)) -> Parser FargateProfile
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable FargateProfile

instance Prelude.NFData FargateProfile