module Stratosphere.ApiGateway.ClientCertificate (
        ClientCertificate(..), mkClientCertificate
    ) 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 ClientCertificate
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-clientcertificate.html>
    ClientCertificate {ClientCertificate -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-clientcertificate.html#cfn-apigateway-clientcertificate-description>
                       ClientCertificate -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-clientcertificate.html#cfn-apigateway-clientcertificate-tags>
                       ClientCertificate -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (ClientCertificate -> ClientCertificate -> Bool
(ClientCertificate -> ClientCertificate -> Bool)
-> (ClientCertificate -> ClientCertificate -> Bool)
-> Eq ClientCertificate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClientCertificate -> ClientCertificate -> Bool
== :: ClientCertificate -> ClientCertificate -> Bool
$c/= :: ClientCertificate -> ClientCertificate -> Bool
/= :: ClientCertificate -> ClientCertificate -> Bool
Prelude.Eq, Int -> ClientCertificate -> ShowS
[ClientCertificate] -> ShowS
ClientCertificate -> String
(Int -> ClientCertificate -> ShowS)
-> (ClientCertificate -> String)
-> ([ClientCertificate] -> ShowS)
-> Show ClientCertificate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClientCertificate -> ShowS
showsPrec :: Int -> ClientCertificate -> ShowS
$cshow :: ClientCertificate -> String
show :: ClientCertificate -> String
$cshowList :: [ClientCertificate] -> ShowS
showList :: [ClientCertificate] -> ShowS
Prelude.Show)
mkClientCertificate :: ClientCertificate
mkClientCertificate :: ClientCertificate
mkClientCertificate
  = ClientCertificate
      {haddock_workaround_ :: ()
haddock_workaround_ = (), description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ClientCertificate where
  toResourceProperties :: ClientCertificate -> ResourceProperties
toResourceProperties ClientCertificate {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ClientCertificate -> ()
description :: ClientCertificate -> Maybe (Value Text)
tags :: ClientCertificate -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApiGateway::ClientCertificate",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([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 -> [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 ClientCertificate where
  toJSON :: ClientCertificate -> Value
toJSON ClientCertificate {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ClientCertificate -> ()
description :: ClientCertificate -> Maybe (Value Text)
tags :: ClientCertificate -> Maybe [Tag]
haddock_workaround_ :: ()
description :: 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
           ([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 -> [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" ClientCertificate where
  type PropertyType "Description" ClientCertificate = Value Prelude.Text
  set :: PropertyType "Description" ClientCertificate
-> ClientCertificate -> ClientCertificate
set PropertyType "Description" ClientCertificate
newValue ClientCertificate {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ClientCertificate -> ()
description :: ClientCertificate -> Maybe (Value Text)
tags :: ClientCertificate -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ClientCertificate {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" ClientCertificate
Value Text
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}
instance Property "Tags" ClientCertificate where
  type PropertyType "Tags" ClientCertificate = [Tag]
  set :: PropertyType "Tags" ClientCertificate
-> ClientCertificate -> ClientCertificate
set PropertyType "Tags" ClientCertificate
newValue ClientCertificate {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ClientCertificate -> ()
description :: ClientCertificate -> Maybe (Value Text)
tags :: ClientCertificate -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ClientCertificate {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" ClientCertificate
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
..}