module Stratosphere.DataBrew.Job.S3LocationProperty (
        S3LocationProperty(..), mkS3LocationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3LocationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-s3location.html>
    S3LocationProperty {S3LocationProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-s3location.html#cfn-databrew-job-s3location-bucket>
                        S3LocationProperty -> Value Text
bucket :: (Value Prelude.Text),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-s3location.html#cfn-databrew-job-s3location-bucketowner>
                        S3LocationProperty -> Maybe (Value Text)
bucketOwner :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-s3location.html#cfn-databrew-job-s3location-key>
                        S3LocationProperty -> Maybe (Value Text)
key :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (S3LocationProperty -> S3LocationProperty -> Bool
(S3LocationProperty -> S3LocationProperty -> Bool)
-> (S3LocationProperty -> S3LocationProperty -> Bool)
-> Eq S3LocationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: S3LocationProperty -> S3LocationProperty -> Bool
== :: S3LocationProperty -> S3LocationProperty -> Bool
$c/= :: S3LocationProperty -> S3LocationProperty -> Bool
/= :: S3LocationProperty -> S3LocationProperty -> Bool
Prelude.Eq, Int -> S3LocationProperty -> ShowS
[S3LocationProperty] -> ShowS
S3LocationProperty -> String
(Int -> S3LocationProperty -> ShowS)
-> (S3LocationProperty -> String)
-> ([S3LocationProperty] -> ShowS)
-> Show S3LocationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> S3LocationProperty -> ShowS
showsPrec :: Int -> S3LocationProperty -> ShowS
$cshow :: S3LocationProperty -> String
show :: S3LocationProperty -> String
$cshowList :: [S3LocationProperty] -> ShowS
showList :: [S3LocationProperty] -> ShowS
Prelude.Show)
mkS3LocationProperty :: Value Prelude.Text -> S3LocationProperty
mkS3LocationProperty :: Value Text -> S3LocationProperty
mkS3LocationProperty Value Text
bucket
  = S3LocationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), bucket :: Value Text
bucket = Value Text
bucket,
       bucketOwner :: Maybe (Value Text)
bucketOwner = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, key :: Maybe (Value Text)
key = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties S3LocationProperty where
  toResourceProperties :: S3LocationProperty -> ResourceProperties
toResourceProperties S3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3LocationProperty -> ()
bucket :: S3LocationProperty -> Value Text
bucketOwner :: S3LocationProperty -> Maybe (Value Text)
key :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
bucketOwner :: Maybe (Value Text)
key :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataBrew::Job.S3Location",
         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
"Bucket" 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
bucket]
                           ([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
"BucketOwner" (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)
bucketOwner,
                               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
"Key" (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)
key]))}
instance JSON.ToJSON S3LocationProperty where
  toJSON :: S3LocationProperty -> Value
toJSON S3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3LocationProperty -> ()
bucket :: S3LocationProperty -> Value Text
bucketOwner :: S3LocationProperty -> Maybe (Value Text)
key :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
bucketOwner :: Maybe (Value Text)
key :: 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
"Bucket" 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
bucket]
              ([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
"BucketOwner" (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)
bucketOwner,
                  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
"Key" (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)
key])))
instance Property "Bucket" S3LocationProperty where
  type PropertyType "Bucket" S3LocationProperty = Value Prelude.Text
  set :: PropertyType "Bucket" S3LocationProperty
-> S3LocationProperty -> S3LocationProperty
set PropertyType "Bucket" S3LocationProperty
newValue S3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3LocationProperty -> ()
bucket :: S3LocationProperty -> Value Text
bucketOwner :: S3LocationProperty -> Maybe (Value Text)
key :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
bucketOwner :: Maybe (Value Text)
key :: Maybe (Value Text)
..}
    = S3LocationProperty {bucket :: Value Text
bucket = PropertyType "Bucket" S3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
bucketOwner :: Maybe (Value Text)
key :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketOwner :: Maybe (Value Text)
key :: Maybe (Value Text)
..}
instance Property "BucketOwner" S3LocationProperty where
  type PropertyType "BucketOwner" S3LocationProperty = Value Prelude.Text
  set :: PropertyType "BucketOwner" S3LocationProperty
-> S3LocationProperty -> S3LocationProperty
set PropertyType "BucketOwner" S3LocationProperty
newValue S3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3LocationProperty -> ()
bucket :: S3LocationProperty -> Value Text
bucketOwner :: S3LocationProperty -> Maybe (Value Text)
key :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
bucketOwner :: Maybe (Value Text)
key :: Maybe (Value Text)
..}
    = S3LocationProperty {bucketOwner :: Maybe (Value Text)
bucketOwner = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BucketOwner" S3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucket :: Value Text
key :: Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
key :: Maybe (Value Text)
..}
instance Property "Key" S3LocationProperty where
  type PropertyType "Key" S3LocationProperty = Value Prelude.Text
  set :: PropertyType "Key" S3LocationProperty
-> S3LocationProperty -> S3LocationProperty
set PropertyType "Key" S3LocationProperty
newValue S3LocationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: S3LocationProperty -> ()
bucket :: S3LocationProperty -> Value Text
bucketOwner :: S3LocationProperty -> Maybe (Value Text)
key :: S3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
bucketOwner :: Maybe (Value Text)
key :: Maybe (Value Text)
..}
    = S3LocationProperty {key :: Maybe (Value Text)
key = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Key" S3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
bucket :: Value Text
bucketOwner :: Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
bucketOwner :: Maybe (Value Text)
..}