module Stratosphere.S3.MultiRegionAccessPoint.RegionProperty (
        RegionProperty(..), mkRegionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RegionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-multiregionaccesspoint-region.html>
    RegionProperty {RegionProperty -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-multiregionaccesspoint-region.html#cfn-s3-multiregionaccesspoint-region-bucket>
                    RegionProperty -> Value Text
bucket :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-multiregionaccesspoint-region.html#cfn-s3-multiregionaccesspoint-region-bucketaccountid>
                    RegionProperty -> Maybe (Value Text)
bucketAccountId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (RegionProperty -> RegionProperty -> Bool
(RegionProperty -> RegionProperty -> Bool)
-> (RegionProperty -> RegionProperty -> Bool) -> Eq RegionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RegionProperty -> RegionProperty -> Bool
== :: RegionProperty -> RegionProperty -> Bool
$c/= :: RegionProperty -> RegionProperty -> Bool
/= :: RegionProperty -> RegionProperty -> Bool
Prelude.Eq, Int -> RegionProperty -> ShowS
[RegionProperty] -> ShowS
RegionProperty -> String
(Int -> RegionProperty -> ShowS)
-> (RegionProperty -> String)
-> ([RegionProperty] -> ShowS)
-> Show RegionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RegionProperty -> ShowS
showsPrec :: Int -> RegionProperty -> ShowS
$cshow :: RegionProperty -> String
show :: RegionProperty -> String
$cshowList :: [RegionProperty] -> ShowS
showList :: [RegionProperty] -> ShowS
Prelude.Show)
mkRegionProperty :: Value Prelude.Text -> RegionProperty
mkRegionProperty :: Value Text -> RegionProperty
mkRegionProperty Value Text
bucket
  = RegionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), bucket :: Value Text
bucket = Value Text
bucket,
       bucketAccountId :: Maybe (Value Text)
bucketAccountId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RegionProperty where
  toResourceProperties :: RegionProperty -> ResourceProperties
toResourceProperties RegionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RegionProperty -> ()
bucket :: RegionProperty -> Value Text
bucketAccountId :: RegionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
bucketAccountId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3::MultiRegionAccessPoint.Region",
         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
"BucketAccountId" (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)
bucketAccountId]))}
instance JSON.ToJSON RegionProperty where
  toJSON :: RegionProperty -> Value
toJSON RegionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RegionProperty -> ()
bucket :: RegionProperty -> Value Text
bucketAccountId :: RegionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
bucketAccountId :: 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
"BucketAccountId" (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)
bucketAccountId])))
instance Property "Bucket" RegionProperty where
  type PropertyType "Bucket" RegionProperty = Value Prelude.Text
  set :: PropertyType "Bucket" RegionProperty
-> RegionProperty -> RegionProperty
set PropertyType "Bucket" RegionProperty
newValue RegionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RegionProperty -> ()
bucket :: RegionProperty -> Value Text
bucketAccountId :: RegionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
bucketAccountId :: Maybe (Value Text)
..}
    = RegionProperty {bucket :: Value Text
bucket = PropertyType "Bucket" RegionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
haddock_workaround_ :: ()
bucketAccountId :: Maybe (Value Text)
..}
instance Property "BucketAccountId" RegionProperty where
  type PropertyType "BucketAccountId" RegionProperty = Value Prelude.Text
  set :: PropertyType "BucketAccountId" RegionProperty
-> RegionProperty -> RegionProperty
set PropertyType "BucketAccountId" RegionProperty
newValue RegionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RegionProperty -> ()
bucket :: RegionProperty -> Value Text
bucketAccountId :: RegionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
bucket :: Value Text
bucketAccountId :: Maybe (Value Text)
..}
    = RegionProperty {bucketAccountId :: Maybe (Value Text)
bucketAccountId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BucketAccountId" RegionProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
bucket :: Value Text
haddock_workaround_ :: ()
bucket :: Value Text
..}