module Stratosphere.VpcLattice.AccessLogSubscription (
        AccessLogSubscription(..), mkAccessLogSubscription
    ) 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 AccessLogSubscription
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-accesslogsubscription.html>
    AccessLogSubscription {AccessLogSubscription -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-accesslogsubscription.html#cfn-vpclattice-accesslogsubscription-destinationarn>
                           AccessLogSubscription -> Value Text
destinationArn :: (Value Prelude.Text),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-accesslogsubscription.html#cfn-vpclattice-accesslogsubscription-resourceidentifier>
                           AccessLogSubscription -> Maybe (Value Text)
resourceIdentifier :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-accesslogsubscription.html#cfn-vpclattice-accesslogsubscription-servicenetworklogtype>
                           AccessLogSubscription -> Maybe (Value Text)
serviceNetworkLogType :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-accesslogsubscription.html#cfn-vpclattice-accesslogsubscription-tags>
                           AccessLogSubscription -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (AccessLogSubscription -> AccessLogSubscription -> Bool
(AccessLogSubscription -> AccessLogSubscription -> Bool)
-> (AccessLogSubscription -> AccessLogSubscription -> Bool)
-> Eq AccessLogSubscription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccessLogSubscription -> AccessLogSubscription -> Bool
== :: AccessLogSubscription -> AccessLogSubscription -> Bool
$c/= :: AccessLogSubscription -> AccessLogSubscription -> Bool
/= :: AccessLogSubscription -> AccessLogSubscription -> Bool
Prelude.Eq, Int -> AccessLogSubscription -> ShowS
[AccessLogSubscription] -> ShowS
AccessLogSubscription -> String
(Int -> AccessLogSubscription -> ShowS)
-> (AccessLogSubscription -> String)
-> ([AccessLogSubscription] -> ShowS)
-> Show AccessLogSubscription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccessLogSubscription -> ShowS
showsPrec :: Int -> AccessLogSubscription -> ShowS
$cshow :: AccessLogSubscription -> String
show :: AccessLogSubscription -> String
$cshowList :: [AccessLogSubscription] -> ShowS
showList :: [AccessLogSubscription] -> ShowS
Prelude.Show)
mkAccessLogSubscription ::
  Value Prelude.Text -> AccessLogSubscription
mkAccessLogSubscription :: Value Text -> AccessLogSubscription
mkAccessLogSubscription Value Text
destinationArn
  = AccessLogSubscription
      {haddock_workaround_ :: ()
haddock_workaround_ = (), destinationArn :: Value Text
destinationArn = Value Text
destinationArn,
       resourceIdentifier :: Maybe (Value Text)
resourceIdentifier = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       serviceNetworkLogType :: Maybe (Value Text)
serviceNetworkLogType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccessLogSubscription where
  toResourceProperties :: AccessLogSubscription -> ResourceProperties
toResourceProperties AccessLogSubscription {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccessLogSubscription -> ()
destinationArn :: AccessLogSubscription -> Value Text
resourceIdentifier :: AccessLogSubscription -> Maybe (Value Text)
serviceNetworkLogType :: AccessLogSubscription -> Maybe (Value Text)
tags :: AccessLogSubscription -> Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Value Text
resourceIdentifier :: Maybe (Value Text)
serviceNetworkLogType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::VpcLattice::AccessLogSubscription",
         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
"DestinationArn" 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
destinationArn]
                           ([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
"ResourceIdentifier" (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)
resourceIdentifier,
                               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
"ServiceNetworkLogType"
                                 (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)
serviceNetworkLogType,
                               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 AccessLogSubscription where
  toJSON :: AccessLogSubscription -> Value
toJSON AccessLogSubscription {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccessLogSubscription -> ()
destinationArn :: AccessLogSubscription -> Value Text
resourceIdentifier :: AccessLogSubscription -> Maybe (Value Text)
serviceNetworkLogType :: AccessLogSubscription -> Maybe (Value Text)
tags :: AccessLogSubscription -> Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Value Text
resourceIdentifier :: Maybe (Value Text)
serviceNetworkLogType :: 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
"DestinationArn" 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
destinationArn]
              ([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
"ResourceIdentifier" (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)
resourceIdentifier,
                  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
"ServiceNetworkLogType"
                    (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)
serviceNetworkLogType,
                  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 "DestinationArn" AccessLogSubscription where
  type PropertyType "DestinationArn" AccessLogSubscription = Value Prelude.Text
  set :: PropertyType "DestinationArn" AccessLogSubscription
-> AccessLogSubscription -> AccessLogSubscription
set PropertyType "DestinationArn" AccessLogSubscription
newValue AccessLogSubscription {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccessLogSubscription -> ()
destinationArn :: AccessLogSubscription -> Value Text
resourceIdentifier :: AccessLogSubscription -> Maybe (Value Text)
serviceNetworkLogType :: AccessLogSubscription -> Maybe (Value Text)
tags :: AccessLogSubscription -> Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Value Text
resourceIdentifier :: Maybe (Value Text)
serviceNetworkLogType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = AccessLogSubscription {destinationArn :: Value Text
destinationArn = PropertyType "DestinationArn" AccessLogSubscription
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
resourceIdentifier :: Maybe (Value Text)
serviceNetworkLogType :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
resourceIdentifier :: Maybe (Value Text)
serviceNetworkLogType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "ResourceIdentifier" AccessLogSubscription where
  type PropertyType "ResourceIdentifier" AccessLogSubscription = Value Prelude.Text
  set :: PropertyType "ResourceIdentifier" AccessLogSubscription
-> AccessLogSubscription -> AccessLogSubscription
set PropertyType "ResourceIdentifier" AccessLogSubscription
newValue AccessLogSubscription {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccessLogSubscription -> ()
destinationArn :: AccessLogSubscription -> Value Text
resourceIdentifier :: AccessLogSubscription -> Maybe (Value Text)
serviceNetworkLogType :: AccessLogSubscription -> Maybe (Value Text)
tags :: AccessLogSubscription -> Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Value Text
resourceIdentifier :: Maybe (Value Text)
serviceNetworkLogType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = AccessLogSubscription
        {resourceIdentifier :: Maybe (Value Text)
resourceIdentifier = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ResourceIdentifier" AccessLogSubscription
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
destinationArn :: Value Text
serviceNetworkLogType :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Value Text
serviceNetworkLogType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "ServiceNetworkLogType" AccessLogSubscription where
  type PropertyType "ServiceNetworkLogType" AccessLogSubscription = Value Prelude.Text
  set :: PropertyType "ServiceNetworkLogType" AccessLogSubscription
-> AccessLogSubscription -> AccessLogSubscription
set PropertyType "ServiceNetworkLogType" AccessLogSubscription
newValue AccessLogSubscription {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccessLogSubscription -> ()
destinationArn :: AccessLogSubscription -> Value Text
resourceIdentifier :: AccessLogSubscription -> Maybe (Value Text)
serviceNetworkLogType :: AccessLogSubscription -> Maybe (Value Text)
tags :: AccessLogSubscription -> Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Value Text
resourceIdentifier :: Maybe (Value Text)
serviceNetworkLogType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = AccessLogSubscription
        {serviceNetworkLogType :: Maybe (Value Text)
serviceNetworkLogType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ServiceNetworkLogType" AccessLogSubscription
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
destinationArn :: Value Text
resourceIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Value Text
resourceIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" AccessLogSubscription where
  type PropertyType "Tags" AccessLogSubscription = [Tag]
  set :: PropertyType "Tags" AccessLogSubscription
-> AccessLogSubscription -> AccessLogSubscription
set PropertyType "Tags" AccessLogSubscription
newValue AccessLogSubscription {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AccessLogSubscription -> ()
destinationArn :: AccessLogSubscription -> Value Text
resourceIdentifier :: AccessLogSubscription -> Maybe (Value Text)
serviceNetworkLogType :: AccessLogSubscription -> Maybe (Value Text)
tags :: AccessLogSubscription -> Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Value Text
resourceIdentifier :: Maybe (Value Text)
serviceNetworkLogType :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = AccessLogSubscription {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" AccessLogSubscription
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
destinationArn :: Value Text
resourceIdentifier :: Maybe (Value Text)
serviceNetworkLogType :: Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Value Text
resourceIdentifier :: Maybe (Value Text)
serviceNetworkLogType :: Maybe (Value Text)
..}