module Stratosphere.GlobalAccelerator.CrossAccountAttachment.ResourceProperty (
        ResourceProperty(..), mkResourceProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ResourceProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-crossaccountattachment-resource.html>
    ResourceProperty {ResourceProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-crossaccountattachment-resource.html#cfn-globalaccelerator-crossaccountattachment-resource-cidr>
                      ResourceProperty -> Maybe (Value Text)
cidr :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-crossaccountattachment-resource.html#cfn-globalaccelerator-crossaccountattachment-resource-endpointid>
                      ResourceProperty -> Maybe (Value Text)
endpointId :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-crossaccountattachment-resource.html#cfn-globalaccelerator-crossaccountattachment-resource-region>
                      ResourceProperty -> Maybe (Value Text)
region :: (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_ = (), cidr :: Maybe (Value Text)
cidr = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       endpointId :: Maybe (Value Text)
endpointId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, region :: Maybe (Value Text)
region = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ResourceProperty where
  toResourceProperties :: ResourceProperty -> ResourceProperties
toResourceProperties ResourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: ResourceProperty -> ()
cidr :: ResourceProperty -> Maybe (Value Text)
endpointId :: ResourceProperty -> Maybe (Value Text)
region :: ResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
endpointId :: Maybe (Value Text)
region :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GlobalAccelerator::CrossAccountAttachment.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
"Cidr" (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)
cidr,
                            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
"EndpointId" (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)
endpointId,
                            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
"Region" (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)
region])}
instance JSON.ToJSON ResourceProperty where
  toJSON :: ResourceProperty -> Value
toJSON ResourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: ResourceProperty -> ()
cidr :: ResourceProperty -> Maybe (Value Text)
endpointId :: ResourceProperty -> Maybe (Value Text)
region :: ResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
endpointId :: Maybe (Value Text)
region :: 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
"Cidr" (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)
cidr,
               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
"EndpointId" (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)
endpointId,
               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
"Region" (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)
region]))
instance Property "Cidr" ResourceProperty where
  type PropertyType "Cidr" ResourceProperty = Value Prelude.Text
  set :: PropertyType "Cidr" ResourceProperty
-> ResourceProperty -> ResourceProperty
set PropertyType "Cidr" ResourceProperty
newValue ResourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: ResourceProperty -> ()
cidr :: ResourceProperty -> Maybe (Value Text)
endpointId :: ResourceProperty -> Maybe (Value Text)
region :: ResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
endpointId :: Maybe (Value Text)
region :: Maybe (Value Text)
..}
    = ResourceProperty {cidr :: Maybe (Value Text)
cidr = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Cidr" ResourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
endpointId :: Maybe (Value Text)
region :: Maybe (Value Text)
haddock_workaround_ :: ()
endpointId :: Maybe (Value Text)
region :: Maybe (Value Text)
..}
instance Property "EndpointId" ResourceProperty where
  type PropertyType "EndpointId" ResourceProperty = Value Prelude.Text
  set :: PropertyType "EndpointId" ResourceProperty
-> ResourceProperty -> ResourceProperty
set PropertyType "EndpointId" ResourceProperty
newValue ResourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: ResourceProperty -> ()
cidr :: ResourceProperty -> Maybe (Value Text)
endpointId :: ResourceProperty -> Maybe (Value Text)
region :: ResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
endpointId :: Maybe (Value Text)
region :: Maybe (Value Text)
..}
    = ResourceProperty {endpointId :: Maybe (Value Text)
endpointId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EndpointId" ResourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
region :: Maybe (Value Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
region :: Maybe (Value Text)
..}
instance Property "Region" ResourceProperty where
  type PropertyType "Region" ResourceProperty = Value Prelude.Text
  set :: PropertyType "Region" ResourceProperty
-> ResourceProperty -> ResourceProperty
set PropertyType "Region" ResourceProperty
newValue ResourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: ResourceProperty -> ()
cidr :: ResourceProperty -> Maybe (Value Text)
endpointId :: ResourceProperty -> Maybe (Value Text)
region :: ResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
endpointId :: Maybe (Value Text)
region :: Maybe (Value Text)
..}
    = ResourceProperty {region :: Maybe (Value Text)
region = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Region" ResourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
endpointId :: Maybe (Value Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
endpointId :: Maybe (Value Text)
..}