module Stratosphere.Deadline.Farm (
        Farm(..), mkFarm
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Farm
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-deadline-farm.html>
    Farm {Farm -> ()
haddock_workaround_ :: (),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-deadline-farm.html#cfn-deadline-farm-description>
          Farm -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-deadline-farm.html#cfn-deadline-farm-displayname>
          Farm -> Value Text
displayName :: (Value Prelude.Text),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-deadline-farm.html#cfn-deadline-farm-kmskeyarn>
          Farm -> Maybe (Value Text)
kmsKeyArn :: (Prelude.Maybe (Value Prelude.Text)),
          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-deadline-farm.html#cfn-deadline-farm-tags>
          Farm -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (Farm -> Farm -> Bool
(Farm -> Farm -> Bool) -> (Farm -> Farm -> Bool) -> Eq Farm
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Farm -> Farm -> Bool
== :: Farm -> Farm -> Bool
$c/= :: Farm -> Farm -> Bool
/= :: Farm -> Farm -> Bool
Prelude.Eq, Int -> Farm -> ShowS
[Farm] -> ShowS
Farm -> String
(Int -> Farm -> ShowS)
-> (Farm -> String) -> ([Farm] -> ShowS) -> Show Farm
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Farm -> ShowS
showsPrec :: Int -> Farm -> ShowS
$cshow :: Farm -> String
show :: Farm -> String
$cshowList :: [Farm] -> ShowS
showList :: [Farm] -> ShowS
Prelude.Show)
mkFarm :: Value Prelude.Text -> Farm
mkFarm :: Value Text -> Farm
mkFarm Value Text
displayName
  = Farm
      {haddock_workaround_ :: ()
haddock_workaround_ = (), displayName :: Value Text
displayName = Value Text
displayName,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, kmsKeyArn :: Maybe (Value Text)
kmsKeyArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Farm where
  toResourceProperties :: Farm -> ResourceProperties
toResourceProperties Farm {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Farm -> ()
description :: Farm -> Maybe (Value Text)
displayName :: Farm -> Value Text
kmsKeyArn :: Farm -> Maybe (Value Text)
tags :: Farm -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
displayName :: Value Text
kmsKeyArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Deadline::Farm", 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
"DisplayName" 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
displayName]
                           ([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
"Description" (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)
description,
                               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
"KmsKeyArn" (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)
kmsKeyArn,
                               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 Farm where
  toJSON :: Farm -> Value
toJSON Farm {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Farm -> ()
description :: Farm -> Maybe (Value Text)
displayName :: Farm -> Value Text
kmsKeyArn :: Farm -> Maybe (Value Text)
tags :: Farm -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
displayName :: Value Text
kmsKeyArn :: Maybe (Value 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
"DisplayName" 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
displayName]
              ([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
"Description" (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)
description,
                  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
"KmsKeyArn" (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)
kmsKeyArn,
                  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 "Description" Farm where
  type PropertyType "Description" Farm = Value Prelude.Text
  set :: PropertyType "Description" Farm -> Farm -> Farm
set PropertyType "Description" Farm
newValue Farm {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Farm -> ()
description :: Farm -> Maybe (Value Text)
displayName :: Farm -> Value Text
kmsKeyArn :: Farm -> Maybe (Value Text)
tags :: Farm -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
displayName :: Value Text
kmsKeyArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = Farm {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Farm
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
displayName :: Value Text
kmsKeyArn :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
displayName :: Value Text
kmsKeyArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "DisplayName" Farm where
  type PropertyType "DisplayName" Farm = Value Prelude.Text
  set :: PropertyType "DisplayName" Farm -> Farm -> Farm
set PropertyType "DisplayName" Farm
newValue Farm {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Farm -> ()
description :: Farm -> Maybe (Value Text)
displayName :: Farm -> Value Text
kmsKeyArn :: Farm -> Maybe (Value Text)
tags :: Farm -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
displayName :: Value Text
kmsKeyArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..} = Farm {displayName :: Value Text
displayName = PropertyType "DisplayName" Farm
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
kmsKeyArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "KmsKeyArn" Farm where
  type PropertyType "KmsKeyArn" Farm = Value Prelude.Text
  set :: PropertyType "KmsKeyArn" Farm -> Farm -> Farm
set PropertyType "KmsKeyArn" Farm
newValue Farm {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Farm -> ()
description :: Farm -> Maybe (Value Text)
displayName :: Farm -> Value Text
kmsKeyArn :: Farm -> Maybe (Value Text)
tags :: Farm -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
displayName :: Value Text
kmsKeyArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = Farm {kmsKeyArn :: Maybe (Value Text)
kmsKeyArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KmsKeyArn" Farm
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
displayName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
displayName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" Farm where
  type PropertyType "Tags" Farm = [Tag]
  set :: PropertyType "Tags" Farm -> Farm -> Farm
set PropertyType "Tags" Farm
newValue Farm {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Farm -> ()
description :: Farm -> Maybe (Value Text)
displayName :: Farm -> Value Text
kmsKeyArn :: Farm -> Maybe (Value Text)
tags :: Farm -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
displayName :: Value Text
kmsKeyArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..} = Farm {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" Farm
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
displayName :: Value Text
kmsKeyArn :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
displayName :: Value Text
kmsKeyArn :: Maybe (Value Text)
..}