module Stratosphere.Logs.DeliveryDestination.DestinationPolicyProperty (
        DestinationPolicyProperty(..), mkDestinationPolicyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DestinationPolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-deliverydestination-destinationpolicy.html>
    DestinationPolicyProperty {DestinationPolicyProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-deliverydestination-destinationpolicy.html#cfn-logs-deliverydestination-destinationpolicy-deliverydestinationname>
                               DestinationPolicyProperty -> Maybe (Value Text)
deliveryDestinationName :: (Prelude.Maybe (Value Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-deliverydestination-destinationpolicy.html#cfn-logs-deliverydestination-destinationpolicy-deliverydestinationpolicy>
                               DestinationPolicyProperty -> Maybe Object
deliveryDestinationPolicy :: (Prelude.Maybe JSON.Object)}
  deriving stock (DestinationPolicyProperty -> DestinationPolicyProperty -> Bool
(DestinationPolicyProperty -> DestinationPolicyProperty -> Bool)
-> (DestinationPolicyProperty -> DestinationPolicyProperty -> Bool)
-> Eq DestinationPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DestinationPolicyProperty -> DestinationPolicyProperty -> Bool
== :: DestinationPolicyProperty -> DestinationPolicyProperty -> Bool
$c/= :: DestinationPolicyProperty -> DestinationPolicyProperty -> Bool
/= :: DestinationPolicyProperty -> DestinationPolicyProperty -> Bool
Prelude.Eq, Int -> DestinationPolicyProperty -> ShowS
[DestinationPolicyProperty] -> ShowS
DestinationPolicyProperty -> String
(Int -> DestinationPolicyProperty -> ShowS)
-> (DestinationPolicyProperty -> String)
-> ([DestinationPolicyProperty] -> ShowS)
-> Show DestinationPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DestinationPolicyProperty -> ShowS
showsPrec :: Int -> DestinationPolicyProperty -> ShowS
$cshow :: DestinationPolicyProperty -> String
show :: DestinationPolicyProperty -> String
$cshowList :: [DestinationPolicyProperty] -> ShowS
showList :: [DestinationPolicyProperty] -> ShowS
Prelude.Show)
mkDestinationPolicyProperty :: DestinationPolicyProperty
mkDestinationPolicyProperty :: DestinationPolicyProperty
mkDestinationPolicyProperty
  = DestinationPolicyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       deliveryDestinationName :: Maybe (Value Text)
deliveryDestinationName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       deliveryDestinationPolicy :: Maybe Object
deliveryDestinationPolicy = Maybe Object
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DestinationPolicyProperty where
  toResourceProperties :: DestinationPolicyProperty -> ResourceProperties
toResourceProperties DestinationPolicyProperty {Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: DestinationPolicyProperty -> ()
deliveryDestinationName :: DestinationPolicyProperty -> Maybe (Value Text)
deliveryDestinationPolicy :: DestinationPolicyProperty -> Maybe Object
haddock_workaround_ :: ()
deliveryDestinationName :: Maybe (Value Text)
deliveryDestinationPolicy :: Maybe Object
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Logs::DeliveryDestination.DestinationPolicy",
         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 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
"DeliveryDestinationName"
                              (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)
deliveryDestinationName,
                            Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeliveryDestinationPolicy"
                              (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
deliveryDestinationPolicy])}
instance JSON.ToJSON DestinationPolicyProperty where
  toJSON :: DestinationPolicyProperty -> Value
toJSON DestinationPolicyProperty {Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: DestinationPolicyProperty -> ()
deliveryDestinationName :: DestinationPolicyProperty -> Maybe (Value Text)
deliveryDestinationPolicy :: DestinationPolicyProperty -> Maybe Object
haddock_workaround_ :: ()
deliveryDestinationName :: Maybe (Value Text)
deliveryDestinationPolicy :: Maybe Object
..}
    = [(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
"DeliveryDestinationName"
                 (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)
deliveryDestinationName,
               Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeliveryDestinationPolicy"
                 (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
deliveryDestinationPolicy]))
instance Property "DeliveryDestinationName" DestinationPolicyProperty where
  type PropertyType "DeliveryDestinationName" DestinationPolicyProperty = Value Prelude.Text
  set :: PropertyType "DeliveryDestinationName" DestinationPolicyProperty
-> DestinationPolicyProperty -> DestinationPolicyProperty
set PropertyType "DeliveryDestinationName" DestinationPolicyProperty
newValue DestinationPolicyProperty {Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: DestinationPolicyProperty -> ()
deliveryDestinationName :: DestinationPolicyProperty -> Maybe (Value Text)
deliveryDestinationPolicy :: DestinationPolicyProperty -> Maybe Object
haddock_workaround_ :: ()
deliveryDestinationName :: Maybe (Value Text)
deliveryDestinationPolicy :: Maybe Object
..}
    = DestinationPolicyProperty
        {deliveryDestinationName :: Maybe (Value Text)
deliveryDestinationName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DeliveryDestinationName" DestinationPolicyProperty
Value Text
newValue, Maybe Object
()
haddock_workaround_ :: ()
deliveryDestinationPolicy :: Maybe Object
haddock_workaround_ :: ()
deliveryDestinationPolicy :: Maybe Object
..}
instance Property "DeliveryDestinationPolicy" DestinationPolicyProperty where
  type PropertyType "DeliveryDestinationPolicy" DestinationPolicyProperty = JSON.Object
  set :: PropertyType "DeliveryDestinationPolicy" DestinationPolicyProperty
-> DestinationPolicyProperty -> DestinationPolicyProperty
set PropertyType "DeliveryDestinationPolicy" DestinationPolicyProperty
newValue DestinationPolicyProperty {Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: DestinationPolicyProperty -> ()
deliveryDestinationName :: DestinationPolicyProperty -> Maybe (Value Text)
deliveryDestinationPolicy :: DestinationPolicyProperty -> Maybe Object
haddock_workaround_ :: ()
deliveryDestinationName :: Maybe (Value Text)
deliveryDestinationPolicy :: Maybe Object
..}
    = DestinationPolicyProperty
        {deliveryDestinationPolicy :: Maybe Object
deliveryDestinationPolicy = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "DeliveryDestinationPolicy" DestinationPolicyProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
deliveryDestinationName :: Maybe (Value Text)
haddock_workaround_ :: ()
deliveryDestinationName :: Maybe (Value Text)
..}