module Stratosphere.S3.MultiRegionAccessPoint (
        module Exports, MultiRegionAccessPoint(..),
        mkMultiRegionAccessPoint
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3.MultiRegionAccessPoint.PublicAccessBlockConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.S3.MultiRegionAccessPoint.RegionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MultiRegionAccessPoint
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-multiregionaccesspoint.html>
    MultiRegionAccessPoint {MultiRegionAccessPoint -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-multiregionaccesspoint.html#cfn-s3-multiregionaccesspoint-name>
                            MultiRegionAccessPoint -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-multiregionaccesspoint.html#cfn-s3-multiregionaccesspoint-publicaccessblockconfiguration>
                            MultiRegionAccessPoint
-> Maybe PublicAccessBlockConfigurationProperty
publicAccessBlockConfiguration :: (Prelude.Maybe PublicAccessBlockConfigurationProperty),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-multiregionaccesspoint.html#cfn-s3-multiregionaccesspoint-regions>
                            MultiRegionAccessPoint -> [RegionProperty]
regions :: [RegionProperty]}
  deriving stock (MultiRegionAccessPoint -> MultiRegionAccessPoint -> Bool
(MultiRegionAccessPoint -> MultiRegionAccessPoint -> Bool)
-> (MultiRegionAccessPoint -> MultiRegionAccessPoint -> Bool)
-> Eq MultiRegionAccessPoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MultiRegionAccessPoint -> MultiRegionAccessPoint -> Bool
== :: MultiRegionAccessPoint -> MultiRegionAccessPoint -> Bool
$c/= :: MultiRegionAccessPoint -> MultiRegionAccessPoint -> Bool
/= :: MultiRegionAccessPoint -> MultiRegionAccessPoint -> Bool
Prelude.Eq, Int -> MultiRegionAccessPoint -> ShowS
[MultiRegionAccessPoint] -> ShowS
MultiRegionAccessPoint -> String
(Int -> MultiRegionAccessPoint -> ShowS)
-> (MultiRegionAccessPoint -> String)
-> ([MultiRegionAccessPoint] -> ShowS)
-> Show MultiRegionAccessPoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MultiRegionAccessPoint -> ShowS
showsPrec :: Int -> MultiRegionAccessPoint -> ShowS
$cshow :: MultiRegionAccessPoint -> String
show :: MultiRegionAccessPoint -> String
$cshowList :: [MultiRegionAccessPoint] -> ShowS
showList :: [MultiRegionAccessPoint] -> ShowS
Prelude.Show)
mkMultiRegionAccessPoint ::
  [RegionProperty] -> MultiRegionAccessPoint
mkMultiRegionAccessPoint :: [RegionProperty] -> MultiRegionAccessPoint
mkMultiRegionAccessPoint [RegionProperty]
regions
  = MultiRegionAccessPoint
      {haddock_workaround_ :: ()
haddock_workaround_ = (), regions :: [RegionProperty]
regions = [RegionProperty]
regions,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       publicAccessBlockConfiguration :: Maybe PublicAccessBlockConfigurationProperty
publicAccessBlockConfiguration = Maybe PublicAccessBlockConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MultiRegionAccessPoint where
  toResourceProperties :: MultiRegionAccessPoint -> ResourceProperties
toResourceProperties MultiRegionAccessPoint {[RegionProperty]
Maybe (Value Text)
Maybe PublicAccessBlockConfigurationProperty
()
haddock_workaround_ :: MultiRegionAccessPoint -> ()
name :: MultiRegionAccessPoint -> Maybe (Value Text)
publicAccessBlockConfiguration :: MultiRegionAccessPoint
-> Maybe PublicAccessBlockConfigurationProperty
regions :: MultiRegionAccessPoint -> [RegionProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
publicAccessBlockConfiguration :: Maybe PublicAccessBlockConfigurationProperty
regions :: [RegionProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3::MultiRegionAccessPoint",
         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
"Regions" Key -> [RegionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [RegionProperty]
regions]
                           ([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,
                               Key -> PublicAccessBlockConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PublicAccessBlockConfiguration"
                                 (PublicAccessBlockConfigurationProperty -> (Key, Value))
-> Maybe PublicAccessBlockConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PublicAccessBlockConfigurationProperty
publicAccessBlockConfiguration]))}
instance JSON.ToJSON MultiRegionAccessPoint where
  toJSON :: MultiRegionAccessPoint -> Value
toJSON MultiRegionAccessPoint {[RegionProperty]
Maybe (Value Text)
Maybe PublicAccessBlockConfigurationProperty
()
haddock_workaround_ :: MultiRegionAccessPoint -> ()
name :: MultiRegionAccessPoint -> Maybe (Value Text)
publicAccessBlockConfiguration :: MultiRegionAccessPoint
-> Maybe PublicAccessBlockConfigurationProperty
regions :: MultiRegionAccessPoint -> [RegionProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
publicAccessBlockConfiguration :: Maybe PublicAccessBlockConfigurationProperty
regions :: [RegionProperty]
..}
    = [(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
"Regions" Key -> [RegionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [RegionProperty]
regions]
              ([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,
                  Key -> PublicAccessBlockConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PublicAccessBlockConfiguration"
                    (PublicAccessBlockConfigurationProperty -> (Key, Value))
-> Maybe PublicAccessBlockConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PublicAccessBlockConfigurationProperty
publicAccessBlockConfiguration])))
instance Property "Name" MultiRegionAccessPoint where
  type PropertyType "Name" MultiRegionAccessPoint = Value Prelude.Text
  set :: PropertyType "Name" MultiRegionAccessPoint
-> MultiRegionAccessPoint -> MultiRegionAccessPoint
set PropertyType "Name" MultiRegionAccessPoint
newValue MultiRegionAccessPoint {[RegionProperty]
Maybe (Value Text)
Maybe PublicAccessBlockConfigurationProperty
()
haddock_workaround_ :: MultiRegionAccessPoint -> ()
name :: MultiRegionAccessPoint -> Maybe (Value Text)
publicAccessBlockConfiguration :: MultiRegionAccessPoint
-> Maybe PublicAccessBlockConfigurationProperty
regions :: MultiRegionAccessPoint -> [RegionProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
publicAccessBlockConfiguration :: Maybe PublicAccessBlockConfigurationProperty
regions :: [RegionProperty]
..}
    = MultiRegionAccessPoint {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" MultiRegionAccessPoint
Value Text
newValue, [RegionProperty]
Maybe PublicAccessBlockConfigurationProperty
()
haddock_workaround_ :: ()
publicAccessBlockConfiguration :: Maybe PublicAccessBlockConfigurationProperty
regions :: [RegionProperty]
haddock_workaround_ :: ()
publicAccessBlockConfiguration :: Maybe PublicAccessBlockConfigurationProperty
regions :: [RegionProperty]
..}
instance Property "PublicAccessBlockConfiguration" MultiRegionAccessPoint where
  type PropertyType "PublicAccessBlockConfiguration" MultiRegionAccessPoint = PublicAccessBlockConfigurationProperty
  set :: PropertyType
  "PublicAccessBlockConfiguration" MultiRegionAccessPoint
-> MultiRegionAccessPoint -> MultiRegionAccessPoint
set PropertyType
  "PublicAccessBlockConfiguration" MultiRegionAccessPoint
newValue MultiRegionAccessPoint {[RegionProperty]
Maybe (Value Text)
Maybe PublicAccessBlockConfigurationProperty
()
haddock_workaround_ :: MultiRegionAccessPoint -> ()
name :: MultiRegionAccessPoint -> Maybe (Value Text)
publicAccessBlockConfiguration :: MultiRegionAccessPoint
-> Maybe PublicAccessBlockConfigurationProperty
regions :: MultiRegionAccessPoint -> [RegionProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
publicAccessBlockConfiguration :: Maybe PublicAccessBlockConfigurationProperty
regions :: [RegionProperty]
..}
    = MultiRegionAccessPoint
        {publicAccessBlockConfiguration :: Maybe PublicAccessBlockConfigurationProperty
publicAccessBlockConfiguration = PublicAccessBlockConfigurationProperty
-> Maybe PublicAccessBlockConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "PublicAccessBlockConfiguration" MultiRegionAccessPoint
PublicAccessBlockConfigurationProperty
newValue, [RegionProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
regions :: [RegionProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
regions :: [RegionProperty]
..}
instance Property "Regions" MultiRegionAccessPoint where
  type PropertyType "Regions" MultiRegionAccessPoint = [RegionProperty]
  set :: PropertyType "Regions" MultiRegionAccessPoint
-> MultiRegionAccessPoint -> MultiRegionAccessPoint
set PropertyType "Regions" MultiRegionAccessPoint
newValue MultiRegionAccessPoint {[RegionProperty]
Maybe (Value Text)
Maybe PublicAccessBlockConfigurationProperty
()
haddock_workaround_ :: MultiRegionAccessPoint -> ()
name :: MultiRegionAccessPoint -> Maybe (Value Text)
publicAccessBlockConfiguration :: MultiRegionAccessPoint
-> Maybe PublicAccessBlockConfigurationProperty
regions :: MultiRegionAccessPoint -> [RegionProperty]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
publicAccessBlockConfiguration :: Maybe PublicAccessBlockConfigurationProperty
regions :: [RegionProperty]
..}
    = MultiRegionAccessPoint {regions :: [RegionProperty]
regions = [RegionProperty]
PropertyType "Regions" MultiRegionAccessPoint
newValue, Maybe (Value Text)
Maybe PublicAccessBlockConfigurationProperty
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
publicAccessBlockConfiguration :: Maybe PublicAccessBlockConfigurationProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
publicAccessBlockConfiguration :: Maybe PublicAccessBlockConfigurationProperty
..}