module Stratosphere.Route53RecoveryReadiness.ResourceSet.ResourceProperty (
        module Exports, ResourceProperty(..), mkResourceProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Route53RecoveryReadiness.ResourceSet.DNSTargetResourceProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ResourceProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoveryreadiness-resourceset-resource.html>
    ResourceProperty {ResourceProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoveryreadiness-resourceset-resource.html#cfn-route53recoveryreadiness-resourceset-resource-componentid>
                      ResourceProperty -> Maybe (Value Text)
componentId :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoveryreadiness-resourceset-resource.html#cfn-route53recoveryreadiness-resourceset-resource-dnstargetresource>
                      ResourceProperty -> Maybe DNSTargetResourceProperty
dnsTargetResource :: (Prelude.Maybe DNSTargetResourceProperty),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoveryreadiness-resourceset-resource.html#cfn-route53recoveryreadiness-resourceset-resource-readinessscopes>
                      ResourceProperty -> Maybe (ValueList Text)
readinessScopes :: (Prelude.Maybe (ValueList Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53recoveryreadiness-resourceset-resource.html#cfn-route53recoveryreadiness-resourceset-resource-resourcearn>
                      ResourceProperty -> Maybe (Value Text)
resourceArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ResourceProperty -> ResourceProperty -> Bool
(ResourceProperty -> ResourceProperty -> Bool)
-> (ResourceProperty -> ResourceProperty -> Bool)
-> Eq ResourceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ResourceProperty -> ResourceProperty -> Bool
== :: ResourceProperty -> ResourceProperty -> Bool
$c/= :: ResourceProperty -> ResourceProperty -> Bool
/= :: ResourceProperty -> ResourceProperty -> Bool
Prelude.Eq, Int -> ResourceProperty -> ShowS
[ResourceProperty] -> ShowS
ResourceProperty -> String
(Int -> ResourceProperty -> ShowS)
-> (ResourceProperty -> String)
-> ([ResourceProperty] -> ShowS)
-> Show ResourceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ResourceProperty -> ShowS
showsPrec :: Int -> ResourceProperty -> ShowS
$cshow :: ResourceProperty -> String
show :: ResourceProperty -> String
$cshowList :: [ResourceProperty] -> ShowS
showList :: [ResourceProperty] -> ShowS
Prelude.Show)
mkResourceProperty :: ResourceProperty
mkResourceProperty :: ResourceProperty
mkResourceProperty
  = ResourceProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), componentId :: Maybe (Value Text)
componentId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       dnsTargetResource :: Maybe DNSTargetResourceProperty
dnsTargetResource = Maybe DNSTargetResourceProperty
forall a. Maybe a
Prelude.Nothing,
       readinessScopes :: Maybe (ValueList Text)
readinessScopes = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, resourceArn :: Maybe (Value Text)
resourceArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ResourceProperty where
  toResourceProperties :: ResourceProperty -> ResourceProperties
toResourceProperties ResourceProperty {Maybe (ValueList Text)
Maybe (Value Text)
Maybe DNSTargetResourceProperty
()
haddock_workaround_ :: ResourceProperty -> ()
componentId :: ResourceProperty -> Maybe (Value Text)
dnsTargetResource :: ResourceProperty -> Maybe DNSTargetResourceProperty
readinessScopes :: ResourceProperty -> Maybe (ValueList Text)
resourceArn :: ResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
componentId :: Maybe (Value Text)
dnsTargetResource :: Maybe DNSTargetResourceProperty
readinessScopes :: Maybe (ValueList Text)
resourceArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Route53RecoveryReadiness::ResourceSet.Resource",
         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
"ComponentId" (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)
componentId,
                            Key -> DNSTargetResourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DnsTargetResource" (DNSTargetResourceProperty -> (Key, Value))
-> Maybe DNSTargetResourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DNSTargetResourceProperty
dnsTargetResource,
                            Key -> ValueList 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
"ReadinessScopes" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
readinessScopes,
                            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
"ResourceArn" (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)
resourceArn])}
instance JSON.ToJSON ResourceProperty where
  toJSON :: ResourceProperty -> Value
toJSON ResourceProperty {Maybe (ValueList Text)
Maybe (Value Text)
Maybe DNSTargetResourceProperty
()
haddock_workaround_ :: ResourceProperty -> ()
componentId :: ResourceProperty -> Maybe (Value Text)
dnsTargetResource :: ResourceProperty -> Maybe DNSTargetResourceProperty
readinessScopes :: ResourceProperty -> Maybe (ValueList Text)
resourceArn :: ResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
componentId :: Maybe (Value Text)
dnsTargetResource :: Maybe DNSTargetResourceProperty
readinessScopes :: Maybe (ValueList Text)
resourceArn :: 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 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
"ComponentId" (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)
componentId,
               Key -> DNSTargetResourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DnsTargetResource" (DNSTargetResourceProperty -> (Key, Value))
-> Maybe DNSTargetResourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DNSTargetResourceProperty
dnsTargetResource,
               Key -> ValueList 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
"ReadinessScopes" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
readinessScopes,
               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
"ResourceArn" (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)
resourceArn]))
instance Property "ComponentId" ResourceProperty where
  type PropertyType "ComponentId" ResourceProperty = Value Prelude.Text
  set :: PropertyType "ComponentId" ResourceProperty
-> ResourceProperty -> ResourceProperty
set PropertyType "ComponentId" ResourceProperty
newValue ResourceProperty {Maybe (ValueList Text)
Maybe (Value Text)
Maybe DNSTargetResourceProperty
()
haddock_workaround_ :: ResourceProperty -> ()
componentId :: ResourceProperty -> Maybe (Value Text)
dnsTargetResource :: ResourceProperty -> Maybe DNSTargetResourceProperty
readinessScopes :: ResourceProperty -> Maybe (ValueList Text)
resourceArn :: ResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
componentId :: Maybe (Value Text)
dnsTargetResource :: Maybe DNSTargetResourceProperty
readinessScopes :: Maybe (ValueList Text)
resourceArn :: Maybe (Value Text)
..}
    = ResourceProperty {componentId :: Maybe (Value Text)
componentId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ComponentId" ResourceProperty
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
Maybe DNSTargetResourceProperty
()
haddock_workaround_ :: ()
dnsTargetResource :: Maybe DNSTargetResourceProperty
readinessScopes :: Maybe (ValueList Text)
resourceArn :: Maybe (Value Text)
haddock_workaround_ :: ()
dnsTargetResource :: Maybe DNSTargetResourceProperty
readinessScopes :: Maybe (ValueList Text)
resourceArn :: Maybe (Value Text)
..}
instance Property "DnsTargetResource" ResourceProperty where
  type PropertyType "DnsTargetResource" ResourceProperty = DNSTargetResourceProperty
  set :: PropertyType "DnsTargetResource" ResourceProperty
-> ResourceProperty -> ResourceProperty
set PropertyType "DnsTargetResource" ResourceProperty
newValue ResourceProperty {Maybe (ValueList Text)
Maybe (Value Text)
Maybe DNSTargetResourceProperty
()
haddock_workaround_ :: ResourceProperty -> ()
componentId :: ResourceProperty -> Maybe (Value Text)
dnsTargetResource :: ResourceProperty -> Maybe DNSTargetResourceProperty
readinessScopes :: ResourceProperty -> Maybe (ValueList Text)
resourceArn :: ResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
componentId :: Maybe (Value Text)
dnsTargetResource :: Maybe DNSTargetResourceProperty
readinessScopes :: Maybe (ValueList Text)
resourceArn :: Maybe (Value Text)
..}
    = ResourceProperty {dnsTargetResource :: Maybe DNSTargetResourceProperty
dnsTargetResource = DNSTargetResourceProperty -> Maybe DNSTargetResourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DnsTargetResource" ResourceProperty
DNSTargetResourceProperty
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
componentId :: Maybe (Value Text)
readinessScopes :: Maybe (ValueList Text)
resourceArn :: Maybe (Value Text)
haddock_workaround_ :: ()
componentId :: Maybe (Value Text)
readinessScopes :: Maybe (ValueList Text)
resourceArn :: Maybe (Value Text)
..}
instance Property "ReadinessScopes" ResourceProperty where
  type PropertyType "ReadinessScopes" ResourceProperty = ValueList Prelude.Text
  set :: PropertyType "ReadinessScopes" ResourceProperty
-> ResourceProperty -> ResourceProperty
set PropertyType "ReadinessScopes" ResourceProperty
newValue ResourceProperty {Maybe (ValueList Text)
Maybe (Value Text)
Maybe DNSTargetResourceProperty
()
haddock_workaround_ :: ResourceProperty -> ()
componentId :: ResourceProperty -> Maybe (Value Text)
dnsTargetResource :: ResourceProperty -> Maybe DNSTargetResourceProperty
readinessScopes :: ResourceProperty -> Maybe (ValueList Text)
resourceArn :: ResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
componentId :: Maybe (Value Text)
dnsTargetResource :: Maybe DNSTargetResourceProperty
readinessScopes :: Maybe (ValueList Text)
resourceArn :: Maybe (Value Text)
..}
    = ResourceProperty {readinessScopes :: Maybe (ValueList Text)
readinessScopes = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReadinessScopes" ResourceProperty
ValueList Text
newValue, Maybe (Value Text)
Maybe DNSTargetResourceProperty
()
haddock_workaround_ :: ()
componentId :: Maybe (Value Text)
dnsTargetResource :: Maybe DNSTargetResourceProperty
resourceArn :: Maybe (Value Text)
haddock_workaround_ :: ()
componentId :: Maybe (Value Text)
dnsTargetResource :: Maybe DNSTargetResourceProperty
resourceArn :: Maybe (Value Text)
..}
instance Property "ResourceArn" ResourceProperty where
  type PropertyType "ResourceArn" ResourceProperty = Value Prelude.Text
  set :: PropertyType "ResourceArn" ResourceProperty
-> ResourceProperty -> ResourceProperty
set PropertyType "ResourceArn" ResourceProperty
newValue ResourceProperty {Maybe (ValueList Text)
Maybe (Value Text)
Maybe DNSTargetResourceProperty
()
haddock_workaround_ :: ResourceProperty -> ()
componentId :: ResourceProperty -> Maybe (Value Text)
dnsTargetResource :: ResourceProperty -> Maybe DNSTargetResourceProperty
readinessScopes :: ResourceProperty -> Maybe (ValueList Text)
resourceArn :: ResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
componentId :: Maybe (Value Text)
dnsTargetResource :: Maybe DNSTargetResourceProperty
readinessScopes :: Maybe (ValueList Text)
resourceArn :: Maybe (Value Text)
..}
    = ResourceProperty {resourceArn :: Maybe (Value Text)
resourceArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ResourceArn" ResourceProperty
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
Maybe DNSTargetResourceProperty
()
haddock_workaround_ :: ()
componentId :: Maybe (Value Text)
dnsTargetResource :: Maybe DNSTargetResourceProperty
readinessScopes :: Maybe (ValueList Text)
haddock_workaround_ :: ()
componentId :: Maybe (Value Text)
dnsTargetResource :: Maybe DNSTargetResourceProperty
readinessScopes :: Maybe (ValueList Text)
..}