module Stratosphere.ApiGatewayV2.Api.BodyS3LocationProperty (
        BodyS3LocationProperty(..), mkBodyS3LocationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BodyS3LocationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html>
    BodyS3LocationProperty {BodyS3LocationProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html#cfn-apigatewayv2-api-bodys3location-bucket>
                            BodyS3LocationProperty -> Maybe (Value Text)
bucket :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html#cfn-apigatewayv2-api-bodys3location-etag>
                            BodyS3LocationProperty -> Maybe (Value Text)
etag :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html#cfn-apigatewayv2-api-bodys3location-key>
                            BodyS3LocationProperty -> Maybe (Value Text)
key :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html#cfn-apigatewayv2-api-bodys3location-version>
                            BodyS3LocationProperty -> Maybe (Value Text)
version :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (BodyS3LocationProperty -> BodyS3LocationProperty -> Bool
(BodyS3LocationProperty -> BodyS3LocationProperty -> Bool)
-> (BodyS3LocationProperty -> BodyS3LocationProperty -> Bool)
-> Eq BodyS3LocationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BodyS3LocationProperty -> BodyS3LocationProperty -> Bool
== :: BodyS3LocationProperty -> BodyS3LocationProperty -> Bool
$c/= :: BodyS3LocationProperty -> BodyS3LocationProperty -> Bool
/= :: BodyS3LocationProperty -> BodyS3LocationProperty -> Bool
Prelude.Eq, Int -> BodyS3LocationProperty -> ShowS
[BodyS3LocationProperty] -> ShowS
BodyS3LocationProperty -> String
(Int -> BodyS3LocationProperty -> ShowS)
-> (BodyS3LocationProperty -> String)
-> ([BodyS3LocationProperty] -> ShowS)
-> Show BodyS3LocationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BodyS3LocationProperty -> ShowS
showsPrec :: Int -> BodyS3LocationProperty -> ShowS
$cshow :: BodyS3LocationProperty -> String
show :: BodyS3LocationProperty -> String
$cshowList :: [BodyS3LocationProperty] -> ShowS
showList :: [BodyS3LocationProperty] -> ShowS
Prelude.Show)
mkBodyS3LocationProperty :: BodyS3LocationProperty
mkBodyS3LocationProperty :: BodyS3LocationProperty
mkBodyS3LocationProperty
  = BodyS3LocationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), bucket :: Maybe (Value Text)
bucket = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       etag :: Maybe (Value Text)
etag = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, key :: Maybe (Value Text)
key = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       version :: Maybe (Value Text)
version = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BodyS3LocationProperty where
  toResourceProperties :: BodyS3LocationProperty -> ResourceProperties
toResourceProperties BodyS3LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: BodyS3LocationProperty -> ()
bucket :: BodyS3LocationProperty -> Maybe (Value Text)
etag :: BodyS3LocationProperty -> Maybe (Value Text)
key :: BodyS3LocationProperty -> Maybe (Value Text)
version :: BodyS3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Maybe (Value Text)
etag :: Maybe (Value Text)
key :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApiGatewayV2::Api.BodyS3Location",
         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
"Bucket" (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)
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..=) Key
"Etag" (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)
etag, 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,
                            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
"Version" (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)
version])}
instance JSON.ToJSON BodyS3LocationProperty where
  toJSON :: BodyS3LocationProperty -> Value
toJSON BodyS3LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: BodyS3LocationProperty -> ()
bucket :: BodyS3LocationProperty -> Maybe (Value Text)
etag :: BodyS3LocationProperty -> Maybe (Value Text)
key :: BodyS3LocationProperty -> Maybe (Value Text)
version :: BodyS3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Maybe (Value Text)
etag :: Maybe (Value Text)
key :: Maybe (Value Text)
version :: 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
"Bucket" (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)
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..=) Key
"Etag" (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)
etag, 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,
               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
"Version" (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)
version]))
instance Property "Bucket" BodyS3LocationProperty where
  type PropertyType "Bucket" BodyS3LocationProperty = Value Prelude.Text
  set :: PropertyType "Bucket" BodyS3LocationProperty
-> BodyS3LocationProperty -> BodyS3LocationProperty
set PropertyType "Bucket" BodyS3LocationProperty
newValue BodyS3LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: BodyS3LocationProperty -> ()
bucket :: BodyS3LocationProperty -> Maybe (Value Text)
etag :: BodyS3LocationProperty -> Maybe (Value Text)
key :: BodyS3LocationProperty -> Maybe (Value Text)
version :: BodyS3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Maybe (Value Text)
etag :: Maybe (Value Text)
key :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = BodyS3LocationProperty {bucket :: Maybe (Value Text)
bucket = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Bucket" BodyS3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
etag :: Maybe (Value Text)
key :: Maybe (Value Text)
version :: Maybe (Value Text)
haddock_workaround_ :: ()
etag :: Maybe (Value Text)
key :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
instance Property "Etag" BodyS3LocationProperty where
  type PropertyType "Etag" BodyS3LocationProperty = Value Prelude.Text
  set :: PropertyType "Etag" BodyS3LocationProperty
-> BodyS3LocationProperty -> BodyS3LocationProperty
set PropertyType "Etag" BodyS3LocationProperty
newValue BodyS3LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: BodyS3LocationProperty -> ()
bucket :: BodyS3LocationProperty -> Maybe (Value Text)
etag :: BodyS3LocationProperty -> Maybe (Value Text)
key :: BodyS3LocationProperty -> Maybe (Value Text)
version :: BodyS3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Maybe (Value Text)
etag :: Maybe (Value Text)
key :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = BodyS3LocationProperty {etag :: Maybe (Value Text)
etag = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Etag" BodyS3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
bucket :: Maybe (Value Text)
key :: Maybe (Value Text)
version :: Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Maybe (Value Text)
key :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
instance Property "Key" BodyS3LocationProperty where
  type PropertyType "Key" BodyS3LocationProperty = Value Prelude.Text
  set :: PropertyType "Key" BodyS3LocationProperty
-> BodyS3LocationProperty -> BodyS3LocationProperty
set PropertyType "Key" BodyS3LocationProperty
newValue BodyS3LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: BodyS3LocationProperty -> ()
bucket :: BodyS3LocationProperty -> Maybe (Value Text)
etag :: BodyS3LocationProperty -> Maybe (Value Text)
key :: BodyS3LocationProperty -> Maybe (Value Text)
version :: BodyS3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Maybe (Value Text)
etag :: Maybe (Value Text)
key :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = BodyS3LocationProperty {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" BodyS3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
bucket :: Maybe (Value Text)
etag :: Maybe (Value Text)
version :: Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Maybe (Value Text)
etag :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
instance Property "Version" BodyS3LocationProperty where
  type PropertyType "Version" BodyS3LocationProperty = Value Prelude.Text
  set :: PropertyType "Version" BodyS3LocationProperty
-> BodyS3LocationProperty -> BodyS3LocationProperty
set PropertyType "Version" BodyS3LocationProperty
newValue BodyS3LocationProperty {Maybe (Value Text)
()
haddock_workaround_ :: BodyS3LocationProperty -> ()
bucket :: BodyS3LocationProperty -> Maybe (Value Text)
etag :: BodyS3LocationProperty -> Maybe (Value Text)
key :: BodyS3LocationProperty -> Maybe (Value Text)
version :: BodyS3LocationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Maybe (Value Text)
etag :: Maybe (Value Text)
key :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = BodyS3LocationProperty {version :: Maybe (Value Text)
version = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Version" BodyS3LocationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
bucket :: Maybe (Value Text)
etag :: Maybe (Value Text)
key :: Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Maybe (Value Text)
etag :: Maybe (Value Text)
key :: Maybe (Value Text)
..}