module Stratosphere.EC2.VerifiedAccessEndpoint.SseSpecificationProperty (
        SseSpecificationProperty(..), mkSseSpecificationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SseSpecificationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-verifiedaccessendpoint-ssespecification.html>
    SseSpecificationProperty {SseSpecificationProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-verifiedaccessendpoint-ssespecification.html#cfn-ec2-verifiedaccessendpoint-ssespecification-customermanagedkeyenabled>
                              SseSpecificationProperty -> Maybe (Value Bool)
customerManagedKeyEnabled :: (Prelude.Maybe (Value Prelude.Bool)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-verifiedaccessendpoint-ssespecification.html#cfn-ec2-verifiedaccessendpoint-ssespecification-kmskeyarn>
                              SseSpecificationProperty -> Maybe (Value Text)
kmsKeyArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (SseSpecificationProperty -> SseSpecificationProperty -> Bool
(SseSpecificationProperty -> SseSpecificationProperty -> Bool)
-> (SseSpecificationProperty -> SseSpecificationProperty -> Bool)
-> Eq SseSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SseSpecificationProperty -> SseSpecificationProperty -> Bool
== :: SseSpecificationProperty -> SseSpecificationProperty -> Bool
$c/= :: SseSpecificationProperty -> SseSpecificationProperty -> Bool
/= :: SseSpecificationProperty -> SseSpecificationProperty -> Bool
Prelude.Eq, Int -> SseSpecificationProperty -> ShowS
[SseSpecificationProperty] -> ShowS
SseSpecificationProperty -> String
(Int -> SseSpecificationProperty -> ShowS)
-> (SseSpecificationProperty -> String)
-> ([SseSpecificationProperty] -> ShowS)
-> Show SseSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SseSpecificationProperty -> ShowS
showsPrec :: Int -> SseSpecificationProperty -> ShowS
$cshow :: SseSpecificationProperty -> String
show :: SseSpecificationProperty -> String
$cshowList :: [SseSpecificationProperty] -> ShowS
showList :: [SseSpecificationProperty] -> ShowS
Prelude.Show)
mkSseSpecificationProperty :: SseSpecificationProperty
mkSseSpecificationProperty :: SseSpecificationProperty
mkSseSpecificationProperty
  = SseSpecificationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       customerManagedKeyEnabled :: Maybe (Value Bool)
customerManagedKeyEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       kmsKeyArn :: Maybe (Value Text)
kmsKeyArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SseSpecificationProperty where
  toResourceProperties :: SseSpecificationProperty -> ResourceProperties
toResourceProperties SseSpecificationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: SseSpecificationProperty -> ()
customerManagedKeyEnabled :: SseSpecificationProperty -> Maybe (Value Bool)
kmsKeyArn :: SseSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
customerManagedKeyEnabled :: Maybe (Value Bool)
kmsKeyArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::VerifiedAccessEndpoint.SseSpecification",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CustomerManagedKeyEnabled"
                              (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
customerManagedKeyEnabled,
                            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])}
instance JSON.ToJSON SseSpecificationProperty where
  toJSON :: SseSpecificationProperty -> Value
toJSON SseSpecificationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: SseSpecificationProperty -> ()
customerManagedKeyEnabled :: SseSpecificationProperty -> Maybe (Value Bool)
kmsKeyArn :: SseSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
customerManagedKeyEnabled :: Maybe (Value Bool)
kmsKeyArn :: Maybe (Value Text)
..}
    = [(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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CustomerManagedKeyEnabled"
                 (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
customerManagedKeyEnabled,
               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]))
instance Property "CustomerManagedKeyEnabled" SseSpecificationProperty where
  type PropertyType "CustomerManagedKeyEnabled" SseSpecificationProperty = Value Prelude.Bool
  set :: PropertyType "CustomerManagedKeyEnabled" SseSpecificationProperty
-> SseSpecificationProperty -> SseSpecificationProperty
set PropertyType "CustomerManagedKeyEnabled" SseSpecificationProperty
newValue SseSpecificationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: SseSpecificationProperty -> ()
customerManagedKeyEnabled :: SseSpecificationProperty -> Maybe (Value Bool)
kmsKeyArn :: SseSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
customerManagedKeyEnabled :: Maybe (Value Bool)
kmsKeyArn :: Maybe (Value Text)
..}
    = SseSpecificationProperty
        {customerManagedKeyEnabled :: Maybe (Value Bool)
customerManagedKeyEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CustomerManagedKeyEnabled" SseSpecificationProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
kmsKeyArn :: Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyArn :: Maybe (Value Text)
..}
instance Property "KmsKeyArn" SseSpecificationProperty where
  type PropertyType "KmsKeyArn" SseSpecificationProperty = Value Prelude.Text
  set :: PropertyType "KmsKeyArn" SseSpecificationProperty
-> SseSpecificationProperty -> SseSpecificationProperty
set PropertyType "KmsKeyArn" SseSpecificationProperty
newValue SseSpecificationProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: SseSpecificationProperty -> ()
customerManagedKeyEnabled :: SseSpecificationProperty -> Maybe (Value Bool)
kmsKeyArn :: SseSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
customerManagedKeyEnabled :: Maybe (Value Bool)
kmsKeyArn :: Maybe (Value Text)
..}
    = SseSpecificationProperty {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" SseSpecificationProperty
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
customerManagedKeyEnabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
customerManagedKeyEnabled :: Maybe (Value Bool)
..}