module Stratosphere.Glue.Schema.RegistryProperty (
        RegistryProperty(..), mkRegistryProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RegistryProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schema-registry.html>
    RegistryProperty {RegistryProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schema-registry.html#cfn-glue-schema-registry-arn>
                      RegistryProperty -> Maybe (Value Text)
arn :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-schema-registry.html#cfn-glue-schema-registry-name>
                      RegistryProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (RegistryProperty -> RegistryProperty -> Bool
(RegistryProperty -> RegistryProperty -> Bool)
-> (RegistryProperty -> RegistryProperty -> Bool)
-> Eq RegistryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RegistryProperty -> RegistryProperty -> Bool
== :: RegistryProperty -> RegistryProperty -> Bool
$c/= :: RegistryProperty -> RegistryProperty -> Bool
/= :: RegistryProperty -> RegistryProperty -> Bool
Prelude.Eq, Int -> RegistryProperty -> ShowS
[RegistryProperty] -> ShowS
RegistryProperty -> String
(Int -> RegistryProperty -> ShowS)
-> (RegistryProperty -> String)
-> ([RegistryProperty] -> ShowS)
-> Show RegistryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RegistryProperty -> ShowS
showsPrec :: Int -> RegistryProperty -> ShowS
$cshow :: RegistryProperty -> String
show :: RegistryProperty -> String
$cshowList :: [RegistryProperty] -> ShowS
showList :: [RegistryProperty] -> ShowS
Prelude.Show)
mkRegistryProperty :: RegistryProperty
mkRegistryProperty :: RegistryProperty
mkRegistryProperty
  = RegistryProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), arn :: Maybe (Value Text)
arn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RegistryProperty where
  toResourceProperties :: RegistryProperty -> ResourceProperties
toResourceProperties RegistryProperty {Maybe (Value Text)
()
haddock_workaround_ :: RegistryProperty -> ()
arn :: RegistryProperty -> Maybe (Value Text)
name :: RegistryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
name :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Glue::Schema.Registry",
         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
"Arn" (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)
arn,
                            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
"Name" (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)
name])}
instance JSON.ToJSON RegistryProperty where
  toJSON :: RegistryProperty -> Value
toJSON RegistryProperty {Maybe (Value Text)
()
haddock_workaround_ :: RegistryProperty -> ()
arn :: RegistryProperty -> Maybe (Value Text)
name :: RegistryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
name :: 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
"Arn" (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)
arn,
               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
"Name" (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)
name]))
instance Property "Arn" RegistryProperty where
  type PropertyType "Arn" RegistryProperty = Value Prelude.Text
  set :: PropertyType "Arn" RegistryProperty
-> RegistryProperty -> RegistryProperty
set PropertyType "Arn" RegistryProperty
newValue RegistryProperty {Maybe (Value Text)
()
haddock_workaround_ :: RegistryProperty -> ()
arn :: RegistryProperty -> Maybe (Value Text)
name :: RegistryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
name :: Maybe (Value Text)
..}
    = RegistryProperty {arn :: Maybe (Value Text)
arn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Arn" RegistryProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}
instance Property "Name" RegistryProperty where
  type PropertyType "Name" RegistryProperty = Value Prelude.Text
  set :: PropertyType "Name" RegistryProperty
-> RegistryProperty -> RegistryProperty
set PropertyType "Name" RegistryProperty
newValue RegistryProperty {Maybe (Value Text)
()
haddock_workaround_ :: RegistryProperty -> ()
arn :: RegistryProperty -> Maybe (Value Text)
name :: RegistryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
name :: Maybe (Value Text)
..}
    = RegistryProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" RegistryProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
..}