module Stratosphere.VpcLattice.ServiceNetworkServiceAssociation (
        module Exports, ServiceNetworkServiceAssociation(..),
        mkServiceNetworkServiceAssociation
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.VpcLattice.ServiceNetworkServiceAssociation.DnsEntryProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ServiceNetworkServiceAssociation
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-servicenetworkserviceassociation.html>
    ServiceNetworkServiceAssociation {ServiceNetworkServiceAssociation -> ()
haddock_workaround_ :: (),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-servicenetworkserviceassociation.html#cfn-vpclattice-servicenetworkserviceassociation-dnsentry>
                                      ServiceNetworkServiceAssociation -> Maybe DnsEntryProperty
dnsEntry :: (Prelude.Maybe DnsEntryProperty),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-servicenetworkserviceassociation.html#cfn-vpclattice-servicenetworkserviceassociation-serviceidentifier>
                                      ServiceNetworkServiceAssociation -> Maybe (Value Text)
serviceIdentifier :: (Prelude.Maybe (Value Prelude.Text)),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-servicenetworkserviceassociation.html#cfn-vpclattice-servicenetworkserviceassociation-servicenetworkidentifier>
                                      ServiceNetworkServiceAssociation -> Maybe (Value Text)
serviceNetworkIdentifier :: (Prelude.Maybe (Value Prelude.Text)),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-servicenetworkserviceassociation.html#cfn-vpclattice-servicenetworkserviceassociation-tags>
                                      ServiceNetworkServiceAssociation -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation -> Bool
(ServiceNetworkServiceAssociation
 -> ServiceNetworkServiceAssociation -> Bool)
-> (ServiceNetworkServiceAssociation
    -> ServiceNetworkServiceAssociation -> Bool)
-> Eq ServiceNetworkServiceAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation -> Bool
== :: ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation -> Bool
$c/= :: ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation -> Bool
/= :: ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation -> Bool
Prelude.Eq, Int -> ServiceNetworkServiceAssociation -> ShowS
[ServiceNetworkServiceAssociation] -> ShowS
ServiceNetworkServiceAssociation -> String
(Int -> ServiceNetworkServiceAssociation -> ShowS)
-> (ServiceNetworkServiceAssociation -> String)
-> ([ServiceNetworkServiceAssociation] -> ShowS)
-> Show ServiceNetworkServiceAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ServiceNetworkServiceAssociation -> ShowS
showsPrec :: Int -> ServiceNetworkServiceAssociation -> ShowS
$cshow :: ServiceNetworkServiceAssociation -> String
show :: ServiceNetworkServiceAssociation -> String
$cshowList :: [ServiceNetworkServiceAssociation] -> ShowS
showList :: [ServiceNetworkServiceAssociation] -> ShowS
Prelude.Show)
mkServiceNetworkServiceAssociation ::
  ServiceNetworkServiceAssociation
mkServiceNetworkServiceAssociation :: ServiceNetworkServiceAssociation
mkServiceNetworkServiceAssociation
  = ServiceNetworkServiceAssociation
      {haddock_workaround_ :: ()
haddock_workaround_ = (), dnsEntry :: Maybe DnsEntryProperty
dnsEntry = Maybe DnsEntryProperty
forall a. Maybe a
Prelude.Nothing,
       serviceIdentifier :: Maybe (Value Text)
serviceIdentifier = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       serviceNetworkIdentifier :: Maybe (Value Text)
serviceNetworkIdentifier = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ServiceNetworkServiceAssociation where
  toResourceProperties :: ServiceNetworkServiceAssociation -> ResourceProperties
toResourceProperties ServiceNetworkServiceAssociation {Maybe [Tag]
Maybe (Value Text)
Maybe DnsEntryProperty
()
haddock_workaround_ :: ServiceNetworkServiceAssociation -> ()
dnsEntry :: ServiceNetworkServiceAssociation -> Maybe DnsEntryProperty
serviceIdentifier :: ServiceNetworkServiceAssociation -> Maybe (Value Text)
serviceNetworkIdentifier :: ServiceNetworkServiceAssociation -> Maybe (Value Text)
tags :: ServiceNetworkServiceAssociation -> Maybe [Tag]
haddock_workaround_ :: ()
dnsEntry :: Maybe DnsEntryProperty
serviceIdentifier :: Maybe (Value Text)
serviceNetworkIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::VpcLattice::ServiceNetworkServiceAssociation",
         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 -> DnsEntryProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DnsEntry" (DnsEntryProperty -> (Key, Value))
-> Maybe DnsEntryProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DnsEntryProperty
dnsEntry,
                            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
"ServiceIdentifier" (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)
serviceIdentifier,
                            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
"ServiceNetworkIdentifier"
                              (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)
serviceNetworkIdentifier,
                            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 ServiceNetworkServiceAssociation where
  toJSON :: ServiceNetworkServiceAssociation -> Value
toJSON ServiceNetworkServiceAssociation {Maybe [Tag]
Maybe (Value Text)
Maybe DnsEntryProperty
()
haddock_workaround_ :: ServiceNetworkServiceAssociation -> ()
dnsEntry :: ServiceNetworkServiceAssociation -> Maybe DnsEntryProperty
serviceIdentifier :: ServiceNetworkServiceAssociation -> Maybe (Value Text)
serviceNetworkIdentifier :: ServiceNetworkServiceAssociation -> Maybe (Value Text)
tags :: ServiceNetworkServiceAssociation -> Maybe [Tag]
haddock_workaround_ :: ()
dnsEntry :: Maybe DnsEntryProperty
serviceIdentifier :: Maybe (Value Text)
serviceNetworkIdentifier :: 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 -> DnsEntryProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DnsEntry" (DnsEntryProperty -> (Key, Value))
-> Maybe DnsEntryProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DnsEntryProperty
dnsEntry,
               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
"ServiceIdentifier" (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)
serviceIdentifier,
               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
"ServiceNetworkIdentifier"
                 (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)
serviceNetworkIdentifier,
               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 "DnsEntry" ServiceNetworkServiceAssociation where
  type PropertyType "DnsEntry" ServiceNetworkServiceAssociation = DnsEntryProperty
  set :: PropertyType "DnsEntry" ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation
set PropertyType "DnsEntry" ServiceNetworkServiceAssociation
newValue ServiceNetworkServiceAssociation {Maybe [Tag]
Maybe (Value Text)
Maybe DnsEntryProperty
()
haddock_workaround_ :: ServiceNetworkServiceAssociation -> ()
dnsEntry :: ServiceNetworkServiceAssociation -> Maybe DnsEntryProperty
serviceIdentifier :: ServiceNetworkServiceAssociation -> Maybe (Value Text)
serviceNetworkIdentifier :: ServiceNetworkServiceAssociation -> Maybe (Value Text)
tags :: ServiceNetworkServiceAssociation -> Maybe [Tag]
haddock_workaround_ :: ()
dnsEntry :: Maybe DnsEntryProperty
serviceIdentifier :: Maybe (Value Text)
serviceNetworkIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ServiceNetworkServiceAssociation
        {dnsEntry :: Maybe DnsEntryProperty
dnsEntry = DnsEntryProperty -> Maybe DnsEntryProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DnsEntry" ServiceNetworkServiceAssociation
DnsEntryProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
serviceIdentifier :: Maybe (Value Text)
serviceNetworkIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
serviceIdentifier :: Maybe (Value Text)
serviceNetworkIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "ServiceIdentifier" ServiceNetworkServiceAssociation where
  type PropertyType "ServiceIdentifier" ServiceNetworkServiceAssociation = Value Prelude.Text
  set :: PropertyType "ServiceIdentifier" ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation
set PropertyType "ServiceIdentifier" ServiceNetworkServiceAssociation
newValue ServiceNetworkServiceAssociation {Maybe [Tag]
Maybe (Value Text)
Maybe DnsEntryProperty
()
haddock_workaround_ :: ServiceNetworkServiceAssociation -> ()
dnsEntry :: ServiceNetworkServiceAssociation -> Maybe DnsEntryProperty
serviceIdentifier :: ServiceNetworkServiceAssociation -> Maybe (Value Text)
serviceNetworkIdentifier :: ServiceNetworkServiceAssociation -> Maybe (Value Text)
tags :: ServiceNetworkServiceAssociation -> Maybe [Tag]
haddock_workaround_ :: ()
dnsEntry :: Maybe DnsEntryProperty
serviceIdentifier :: Maybe (Value Text)
serviceNetworkIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ServiceNetworkServiceAssociation
        {serviceIdentifier :: Maybe (Value Text)
serviceIdentifier = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ServiceIdentifier" ServiceNetworkServiceAssociation
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe DnsEntryProperty
()
haddock_workaround_ :: ()
dnsEntry :: Maybe DnsEntryProperty
serviceNetworkIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dnsEntry :: Maybe DnsEntryProperty
serviceNetworkIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "ServiceNetworkIdentifier" ServiceNetworkServiceAssociation where
  type PropertyType "ServiceNetworkIdentifier" ServiceNetworkServiceAssociation = Value Prelude.Text
  set :: PropertyType
  "ServiceNetworkIdentifier" ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation
set PropertyType
  "ServiceNetworkIdentifier" ServiceNetworkServiceAssociation
newValue ServiceNetworkServiceAssociation {Maybe [Tag]
Maybe (Value Text)
Maybe DnsEntryProperty
()
haddock_workaround_ :: ServiceNetworkServiceAssociation -> ()
dnsEntry :: ServiceNetworkServiceAssociation -> Maybe DnsEntryProperty
serviceIdentifier :: ServiceNetworkServiceAssociation -> Maybe (Value Text)
serviceNetworkIdentifier :: ServiceNetworkServiceAssociation -> Maybe (Value Text)
tags :: ServiceNetworkServiceAssociation -> Maybe [Tag]
haddock_workaround_ :: ()
dnsEntry :: Maybe DnsEntryProperty
serviceIdentifier :: Maybe (Value Text)
serviceNetworkIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ServiceNetworkServiceAssociation
        {serviceNetworkIdentifier :: Maybe (Value Text)
serviceNetworkIdentifier = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ServiceNetworkIdentifier" ServiceNetworkServiceAssociation
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe DnsEntryProperty
()
haddock_workaround_ :: ()
dnsEntry :: Maybe DnsEntryProperty
serviceIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dnsEntry :: Maybe DnsEntryProperty
serviceIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" ServiceNetworkServiceAssociation where
  type PropertyType "Tags" ServiceNetworkServiceAssociation = [Tag]
  set :: PropertyType "Tags" ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation
-> ServiceNetworkServiceAssociation
set PropertyType "Tags" ServiceNetworkServiceAssociation
newValue ServiceNetworkServiceAssociation {Maybe [Tag]
Maybe (Value Text)
Maybe DnsEntryProperty
()
haddock_workaround_ :: ServiceNetworkServiceAssociation -> ()
dnsEntry :: ServiceNetworkServiceAssociation -> Maybe DnsEntryProperty
serviceIdentifier :: ServiceNetworkServiceAssociation -> Maybe (Value Text)
serviceNetworkIdentifier :: ServiceNetworkServiceAssociation -> Maybe (Value Text)
tags :: ServiceNetworkServiceAssociation -> Maybe [Tag]
haddock_workaround_ :: ()
dnsEntry :: Maybe DnsEntryProperty
serviceIdentifier :: Maybe (Value Text)
serviceNetworkIdentifier :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ServiceNetworkServiceAssociation
        {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" ServiceNetworkServiceAssociation
newValue, Maybe (Value Text)
Maybe DnsEntryProperty
()
haddock_workaround_ :: ()
dnsEntry :: Maybe DnsEntryProperty
serviceIdentifier :: Maybe (Value Text)
serviceNetworkIdentifier :: Maybe (Value Text)
haddock_workaround_ :: ()
dnsEntry :: Maybe DnsEntryProperty
serviceIdentifier :: Maybe (Value Text)
serviceNetworkIdentifier :: Maybe (Value Text)
..}