module Stratosphere.IoT.Certificate (
Certificate(..), mkCertificate
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Certificate
=
Certificate {Certificate -> ()
haddock_workaround_ :: (),
Certificate -> Maybe (Value Text)
cACertificatePem :: (Prelude.Maybe (Value Prelude.Text)),
Certificate -> Maybe (Value Text)
certificateMode :: (Prelude.Maybe (Value Prelude.Text)),
Certificate -> Maybe (Value Text)
certificatePem :: (Prelude.Maybe (Value Prelude.Text)),
Certificate -> Maybe (Value Text)
certificateSigningRequest :: (Prelude.Maybe (Value Prelude.Text)),
Certificate -> Value Text
status :: (Value Prelude.Text)}
deriving stock (Certificate -> Certificate -> Bool
(Certificate -> Certificate -> Bool)
-> (Certificate -> Certificate -> Bool) -> Eq Certificate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Certificate -> Certificate -> Bool
== :: Certificate -> Certificate -> Bool
$c/= :: Certificate -> Certificate -> Bool
/= :: Certificate -> Certificate -> Bool
Prelude.Eq, Int -> Certificate -> ShowS
[Certificate] -> ShowS
Certificate -> String
(Int -> Certificate -> ShowS)
-> (Certificate -> String)
-> ([Certificate] -> ShowS)
-> Show Certificate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Certificate -> ShowS
showsPrec :: Int -> Certificate -> ShowS
$cshow :: Certificate -> String
show :: Certificate -> String
$cshowList :: [Certificate] -> ShowS
showList :: [Certificate] -> ShowS
Prelude.Show)
mkCertificate :: Value Prelude.Text -> Certificate
mkCertificate :: Value Text -> Certificate
mkCertificate Value Text
status
= Certificate
{haddock_workaround_ :: ()
haddock_workaround_ = (), status :: Value Text
status = Value Text
status,
cACertificatePem :: Maybe (Value Text)
cACertificatePem = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
certificateMode :: Maybe (Value Text)
certificateMode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
certificatePem :: Maybe (Value Text)
certificatePem = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
certificateSigningRequest :: Maybe (Value Text)
certificateSigningRequest = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Certificate where
toResourceProperties :: Certificate -> ResourceProperties
toResourceProperties Certificate {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Certificate -> ()
cACertificatePem :: Certificate -> Maybe (Value Text)
certificateMode :: Certificate -> Maybe (Value Text)
certificatePem :: Certificate -> Maybe (Value Text)
certificateSigningRequest :: Certificate -> Maybe (Value Text)
status :: Certificate -> Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoT::Certificate", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"Status" 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
status]
([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
"CACertificatePem" (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)
cACertificatePem,
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
"CertificateMode" (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)
certificateMode,
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
"CertificatePem" (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)
certificatePem,
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
"CertificateSigningRequest"
(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)
certificateSigningRequest]))}
instance JSON.ToJSON Certificate where
toJSON :: Certificate -> Value
toJSON Certificate {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Certificate -> ()
cACertificatePem :: Certificate -> Maybe (Value Text)
certificateMode :: Certificate -> Maybe (Value Text)
certificatePem :: Certificate -> Maybe (Value Text)
certificateSigningRequest :: Certificate -> Maybe (Value Text)
status :: Certificate -> Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
..}
= [(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
"Status" 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
status]
([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
"CACertificatePem" (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)
cACertificatePem,
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
"CertificateMode" (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)
certificateMode,
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
"CertificatePem" (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)
certificatePem,
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
"CertificateSigningRequest"
(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)
certificateSigningRequest])))
instance Property "CACertificatePem" Certificate where
type PropertyType "CACertificatePem" Certificate = Value Prelude.Text
set :: PropertyType "CACertificatePem" Certificate
-> Certificate -> Certificate
set PropertyType "CACertificatePem" Certificate
newValue Certificate {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Certificate -> ()
cACertificatePem :: Certificate -> Maybe (Value Text)
certificateMode :: Certificate -> Maybe (Value Text)
certificatePem :: Certificate -> Maybe (Value Text)
certificateSigningRequest :: Certificate -> Maybe (Value Text)
status :: Certificate -> Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
..}
= Certificate {cACertificatePem :: Maybe (Value Text)
cACertificatePem = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CACertificatePem" Certificate
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
haddock_workaround_ :: ()
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
..}
instance Property "CertificateMode" Certificate where
type PropertyType "CertificateMode" Certificate = Value Prelude.Text
set :: PropertyType "CertificateMode" Certificate
-> Certificate -> Certificate
set PropertyType "CertificateMode" Certificate
newValue Certificate {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Certificate -> ()
cACertificatePem :: Certificate -> Maybe (Value Text)
certificateMode :: Certificate -> Maybe (Value Text)
certificatePem :: Certificate -> Maybe (Value Text)
certificateSigningRequest :: Certificate -> Maybe (Value Text)
status :: Certificate -> Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
..}
= Certificate {certificateMode :: Maybe (Value Text)
certificateMode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CertificateMode" Certificate
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
..}
instance Property "CertificatePem" Certificate where
type PropertyType "CertificatePem" Certificate = Value Prelude.Text
set :: PropertyType "CertificatePem" Certificate
-> Certificate -> Certificate
set PropertyType "CertificatePem" Certificate
newValue Certificate {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Certificate -> ()
cACertificatePem :: Certificate -> Maybe (Value Text)
certificateMode :: Certificate -> Maybe (Value Text)
certificatePem :: Certificate -> Maybe (Value Text)
certificateSigningRequest :: Certificate -> Maybe (Value Text)
status :: Certificate -> Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
..}
= Certificate {certificatePem :: Maybe (Value Text)
certificatePem = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CertificatePem" Certificate
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
..}
instance Property "CertificateSigningRequest" Certificate where
type PropertyType "CertificateSigningRequest" Certificate = Value Prelude.Text
set :: PropertyType "CertificateSigningRequest" Certificate
-> Certificate -> Certificate
set PropertyType "CertificateSigningRequest" Certificate
newValue Certificate {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Certificate -> ()
cACertificatePem :: Certificate -> Maybe (Value Text)
certificateMode :: Certificate -> Maybe (Value Text)
certificatePem :: Certificate -> Maybe (Value Text)
certificateSigningRequest :: Certificate -> Maybe (Value Text)
status :: Certificate -> Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
..}
= Certificate
{certificateSigningRequest :: Maybe (Value Text)
certificateSigningRequest = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CertificateSigningRequest" Certificate
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
status :: Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
status :: Value Text
..}
instance Property "Status" Certificate where
type PropertyType "Status" Certificate = Value Prelude.Text
set :: PropertyType "Status" Certificate -> Certificate -> Certificate
set PropertyType "Status" Certificate
newValue Certificate {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Certificate -> ()
cACertificatePem :: Certificate -> Maybe (Value Text)
certificateMode :: Certificate -> Maybe (Value Text)
certificatePem :: Certificate -> Maybe (Value Text)
certificateSigningRequest :: Certificate -> Maybe (Value Text)
status :: Certificate -> Value Text
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
status :: Value Text
..} = Certificate {status :: Value Text
status = PropertyType "Status" Certificate
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
haddock_workaround_ :: ()
cACertificatePem :: Maybe (Value Text)
certificateMode :: Maybe (Value Text)
certificatePem :: Maybe (Value Text)
certificateSigningRequest :: Maybe (Value Text)
..}