module Stratosphere.EKS.FargateProfile (
        module Exports, FargateProfile(..), mkFargateProfile
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EKS.FargateProfile.SelectorProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data FargateProfile
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-fargateprofile.html>
    FargateProfile {FargateProfile -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-fargateprofile.html#cfn-eks-fargateprofile-clustername>
                    FargateProfile -> Value Text
clusterName :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-fargateprofile.html#cfn-eks-fargateprofile-fargateprofilename>
                    FargateProfile -> Maybe (Value Text)
fargateProfileName :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-fargateprofile.html#cfn-eks-fargateprofile-podexecutionrolearn>
                    FargateProfile -> Value Text
podExecutionRoleArn :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-fargateprofile.html#cfn-eks-fargateprofile-selectors>
                    FargateProfile -> [SelectorProperty]
selectors :: [SelectorProperty],
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-fargateprofile.html#cfn-eks-fargateprofile-subnets>
                    FargateProfile -> Maybe (ValueList Text)
subnets :: (Prelude.Maybe (ValueList Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-fargateprofile.html#cfn-eks-fargateprofile-tags>
                    FargateProfile -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (FargateProfile -> FargateProfile -> Bool
(FargateProfile -> FargateProfile -> Bool)
-> (FargateProfile -> FargateProfile -> Bool) -> Eq FargateProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FargateProfile -> FargateProfile -> Bool
== :: FargateProfile -> FargateProfile -> Bool
$c/= :: FargateProfile -> FargateProfile -> Bool
/= :: FargateProfile -> FargateProfile -> Bool
Prelude.Eq, 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
$cshowsPrec :: Int -> FargateProfile -> ShowS
showsPrec :: Int -> FargateProfile -> ShowS
$cshow :: FargateProfile -> String
show :: FargateProfile -> String
$cshowList :: [FargateProfile] -> ShowS
showList :: [FargateProfile] -> ShowS
Prelude.Show)
mkFargateProfile ::
  Value Prelude.Text
  -> Value Prelude.Text -> [SelectorProperty] -> FargateProfile
mkFargateProfile :: Value Text -> Value Text -> [SelectorProperty] -> FargateProfile
mkFargateProfile Value Text
clusterName Value Text
podExecutionRoleArn [SelectorProperty]
selectors
  = FargateProfile
      {haddock_workaround_ :: ()
haddock_workaround_ = (), clusterName :: Value Text
clusterName = Value Text
clusterName,
       podExecutionRoleArn :: Value Text
podExecutionRoleArn = Value Text
podExecutionRoleArn, selectors :: [SelectorProperty]
selectors = [SelectorProperty]
selectors,
       fargateProfileName :: Maybe (Value Text)
fargateProfileName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, subnets :: Maybe (ValueList Text)
subnets = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FargateProfile where
  toResourceProperties :: FargateProfile -> ResourceProperties
toResourceProperties FargateProfile {[SelectorProperty]
Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FargateProfile -> ()
clusterName :: FargateProfile -> Value Text
fargateProfileName :: FargateProfile -> Maybe (Value Text)
podExecutionRoleArn :: FargateProfile -> Value Text
selectors :: FargateProfile -> [SelectorProperty]
subnets :: FargateProfile -> Maybe (ValueList Text)
tags :: FargateProfile -> Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EKS::FargateProfile", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"ClusterName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
clusterName,
                            Key
"PodExecutionRoleArn" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
podExecutionRoleArn,
                            Key
"Selectors" Key -> [SelectorProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [SelectorProperty]
selectors]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FargateProfileName" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
fargateProfileName,
                               Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Subnets" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
subnets,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON FargateProfile where
  toJSON :: FargateProfile -> Value
toJSON FargateProfile {[SelectorProperty]
Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FargateProfile -> ()
clusterName :: FargateProfile -> Value Text
fargateProfileName :: FargateProfile -> Maybe (Value Text)
podExecutionRoleArn :: FargateProfile -> Value Text
selectors :: FargateProfile -> [SelectorProperty]
subnets :: FargateProfile -> Maybe (ValueList Text)
tags :: FargateProfile -> Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"ClusterName" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
clusterName,
               Key
"PodExecutionRoleArn" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
podExecutionRoleArn,
               Key
"Selectors" Key -> [SelectorProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [SelectorProperty]
selectors]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FargateProfileName" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
fargateProfileName,
                  Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Subnets" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
subnets,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "ClusterName" FargateProfile where
  type PropertyType "ClusterName" FargateProfile = Value Prelude.Text
  set :: PropertyType "ClusterName" FargateProfile
-> FargateProfile -> FargateProfile
set PropertyType "ClusterName" FargateProfile
newValue FargateProfile {[SelectorProperty]
Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FargateProfile -> ()
clusterName :: FargateProfile -> Value Text
fargateProfileName :: FargateProfile -> Maybe (Value Text)
podExecutionRoleArn :: FargateProfile -> Value Text
selectors :: FargateProfile -> [SelectorProperty]
subnets :: FargateProfile -> Maybe (ValueList Text)
tags :: FargateProfile -> Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = FargateProfile {clusterName :: Value Text
clusterName = PropertyType "ClusterName" FargateProfile
Value Text
newValue, [SelectorProperty]
Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "FargateProfileName" FargateProfile where
  type PropertyType "FargateProfileName" FargateProfile = Value Prelude.Text
  set :: PropertyType "FargateProfileName" FargateProfile
-> FargateProfile -> FargateProfile
set PropertyType "FargateProfileName" FargateProfile
newValue FargateProfile {[SelectorProperty]
Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FargateProfile -> ()
clusterName :: FargateProfile -> Value Text
fargateProfileName :: FargateProfile -> Maybe (Value Text)
podExecutionRoleArn :: FargateProfile -> Value Text
selectors :: FargateProfile -> [SelectorProperty]
subnets :: FargateProfile -> Maybe (ValueList Text)
tags :: FargateProfile -> Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = FargateProfile {fargateProfileName :: Maybe (Value Text)
fargateProfileName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FargateProfileName" FargateProfile
Value Text
newValue, [SelectorProperty]
Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
clusterName :: Value Text
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Value Text
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "PodExecutionRoleArn" FargateProfile where
  type PropertyType "PodExecutionRoleArn" FargateProfile = Value Prelude.Text
  set :: PropertyType "PodExecutionRoleArn" FargateProfile
-> FargateProfile -> FargateProfile
set PropertyType "PodExecutionRoleArn" FargateProfile
newValue FargateProfile {[SelectorProperty]
Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FargateProfile -> ()
clusterName :: FargateProfile -> Value Text
fargateProfileName :: FargateProfile -> Maybe (Value Text)
podExecutionRoleArn :: FargateProfile -> Value Text
selectors :: FargateProfile -> [SelectorProperty]
subnets :: FargateProfile -> Maybe (ValueList Text)
tags :: FargateProfile -> Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = FargateProfile {podExecutionRoleArn :: Value Text
podExecutionRoleArn = PropertyType "PodExecutionRoleArn" FargateProfile
Value Text
newValue, [SelectorProperty]
Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "Selectors" FargateProfile where
  type PropertyType "Selectors" FargateProfile = [SelectorProperty]
  set :: PropertyType "Selectors" FargateProfile
-> FargateProfile -> FargateProfile
set PropertyType "Selectors" FargateProfile
newValue FargateProfile {[SelectorProperty]
Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FargateProfile -> ()
clusterName :: FargateProfile -> Value Text
fargateProfileName :: FargateProfile -> Maybe (Value Text)
podExecutionRoleArn :: FargateProfile -> Value Text
selectors :: FargateProfile -> [SelectorProperty]
subnets :: FargateProfile -> Maybe (ValueList Text)
tags :: FargateProfile -> Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = FargateProfile {selectors :: [SelectorProperty]
selectors = [SelectorProperty]
PropertyType "Selectors" FargateProfile
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "Subnets" FargateProfile where
  type PropertyType "Subnets" FargateProfile = ValueList Prelude.Text
  set :: PropertyType "Subnets" FargateProfile
-> FargateProfile -> FargateProfile
set PropertyType "Subnets" FargateProfile
newValue FargateProfile {[SelectorProperty]
Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FargateProfile -> ()
clusterName :: FargateProfile -> Value Text
fargateProfileName :: FargateProfile -> Maybe (Value Text)
podExecutionRoleArn :: FargateProfile -> Value Text
selectors :: FargateProfile -> [SelectorProperty]
subnets :: FargateProfile -> Maybe (ValueList Text)
tags :: FargateProfile -> Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = FargateProfile {subnets :: Maybe (ValueList Text)
subnets = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Subnets" FargateProfile
ValueList Text
newValue, [SelectorProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
tags :: Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
tags :: Maybe [Tag]
..}
instance Property "Tags" FargateProfile where
  type PropertyType "Tags" FargateProfile = [Tag]
  set :: PropertyType "Tags" FargateProfile
-> FargateProfile -> FargateProfile
set PropertyType "Tags" FargateProfile
newValue FargateProfile {[SelectorProperty]
Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FargateProfile -> ()
clusterName :: FargateProfile -> Value Text
fargateProfileName :: FargateProfile -> Maybe (Value Text)
podExecutionRoleArn :: FargateProfile -> Value Text
selectors :: FargateProfile -> [SelectorProperty]
subnets :: FargateProfile -> Maybe (ValueList Text)
tags :: FargateProfile -> Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
    = FargateProfile {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" FargateProfile
newValue, [SelectorProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
haddock_workaround_ :: ()
clusterName :: Value Text
fargateProfileName :: Maybe (Value Text)
podExecutionRoleArn :: Value Text
selectors :: [SelectorProperty]
subnets :: Maybe (ValueList Text)
..}