module Stratosphere.Glue.Classifier.JsonClassifierProperty (
        JsonClassifierProperty(..), mkJsonClassifierProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data JsonClassifierProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-jsonclassifier.html>
    JsonClassifierProperty {JsonClassifierProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-jsonclassifier.html#cfn-glue-classifier-jsonclassifier-jsonpath>
                            JsonClassifierProperty -> Value Text
jsonPath :: (Value Prelude.Text),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-classifier-jsonclassifier.html#cfn-glue-classifier-jsonclassifier-name>
                            JsonClassifierProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (JsonClassifierProperty -> JsonClassifierProperty -> Bool
(JsonClassifierProperty -> JsonClassifierProperty -> Bool)
-> (JsonClassifierProperty -> JsonClassifierProperty -> Bool)
-> Eq JsonClassifierProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: JsonClassifierProperty -> JsonClassifierProperty -> Bool
== :: JsonClassifierProperty -> JsonClassifierProperty -> Bool
$c/= :: JsonClassifierProperty -> JsonClassifierProperty -> Bool
/= :: JsonClassifierProperty -> JsonClassifierProperty -> Bool
Prelude.Eq, Int -> JsonClassifierProperty -> ShowS
[JsonClassifierProperty] -> ShowS
JsonClassifierProperty -> String
(Int -> JsonClassifierProperty -> ShowS)
-> (JsonClassifierProperty -> String)
-> ([JsonClassifierProperty] -> ShowS)
-> Show JsonClassifierProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> JsonClassifierProperty -> ShowS
showsPrec :: Int -> JsonClassifierProperty -> ShowS
$cshow :: JsonClassifierProperty -> String
show :: JsonClassifierProperty -> String
$cshowList :: [JsonClassifierProperty] -> ShowS
showList :: [JsonClassifierProperty] -> ShowS
Prelude.Show)
mkJsonClassifierProperty ::
  Value Prelude.Text -> JsonClassifierProperty
mkJsonClassifierProperty :: Value Text -> JsonClassifierProperty
mkJsonClassifierProperty Value Text
jsonPath
  = JsonClassifierProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), jsonPath :: Value Text
jsonPath = Value Text
jsonPath,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties JsonClassifierProperty where
  toResourceProperties :: JsonClassifierProperty -> ResourceProperties
toResourceProperties JsonClassifierProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: JsonClassifierProperty -> ()
jsonPath :: JsonClassifierProperty -> Value Text
name :: JsonClassifierProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
jsonPath :: Value Text
name :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Glue::Classifier.JsonClassifier",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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
"JsonPath" 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
jsonPath]
                           ([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
"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 JsonClassifierProperty where
  toJSON :: JsonClassifierProperty -> Value
toJSON JsonClassifierProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: JsonClassifierProperty -> ()
jsonPath :: JsonClassifierProperty -> Value Text
name :: JsonClassifierProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
jsonPath :: 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
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"JsonPath" 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
jsonPath]
              ([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
"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 "JsonPath" JsonClassifierProperty where
  type PropertyType "JsonPath" JsonClassifierProperty = Value Prelude.Text
  set :: PropertyType "JsonPath" JsonClassifierProperty
-> JsonClassifierProperty -> JsonClassifierProperty
set PropertyType "JsonPath" JsonClassifierProperty
newValue JsonClassifierProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: JsonClassifierProperty -> ()
jsonPath :: JsonClassifierProperty -> Value Text
name :: JsonClassifierProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
jsonPath :: Value Text
name :: Maybe (Value Text)
..}
    = JsonClassifierProperty {jsonPath :: Value Text
jsonPath = PropertyType "JsonPath" JsonClassifierProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}
instance Property "Name" JsonClassifierProperty where
  type PropertyType "Name" JsonClassifierProperty = Value Prelude.Text
  set :: PropertyType "Name" JsonClassifierProperty
-> JsonClassifierProperty -> JsonClassifierProperty
set PropertyType "Name" JsonClassifierProperty
newValue JsonClassifierProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: JsonClassifierProperty -> ()
jsonPath :: JsonClassifierProperty -> Value Text
name :: JsonClassifierProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
jsonPath :: Value Text
name :: Maybe (Value Text)
..}
    = JsonClassifierProperty {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" JsonClassifierProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
jsonPath :: Value Text
haddock_workaround_ :: ()
jsonPath :: Value Text
..}