module Stratosphere.ElasticLoadBalancing.LoadBalancer.AccessLoggingPolicyProperty (
        AccessLoggingPolicyProperty(..), mkAccessLoggingPolicyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccessLoggingPolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html>
    AccessLoggingPolicyProperty {AccessLoggingPolicyProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html#cfn-elb-accessloggingpolicy-emitinterval>
                                 AccessLoggingPolicyProperty -> Maybe (Value Integer)
emitInterval :: (Prelude.Maybe (Value Prelude.Integer)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html#cfn-elb-accessloggingpolicy-enabled>
                                 AccessLoggingPolicyProperty -> Value Bool
enabled :: (Value Prelude.Bool),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html#cfn-elb-accessloggingpolicy-s3bucketname>
                                 AccessLoggingPolicyProperty -> Value Text
s3BucketName :: (Value Prelude.Text),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-accessloggingpolicy.html#cfn-elb-accessloggingpolicy-s3bucketprefix>
                                 AccessLoggingPolicyProperty -> Maybe (Value Text)
s3BucketPrefix :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AccessLoggingPolicyProperty -> AccessLoggingPolicyProperty -> Bool
(AccessLoggingPolicyProperty
 -> AccessLoggingPolicyProperty -> Bool)
-> (AccessLoggingPolicyProperty
    -> AccessLoggingPolicyProperty -> Bool)
-> Eq AccessLoggingPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccessLoggingPolicyProperty -> AccessLoggingPolicyProperty -> Bool
== :: AccessLoggingPolicyProperty -> AccessLoggingPolicyProperty -> Bool
$c/= :: AccessLoggingPolicyProperty -> AccessLoggingPolicyProperty -> Bool
/= :: AccessLoggingPolicyProperty -> AccessLoggingPolicyProperty -> Bool
Prelude.Eq, Int -> AccessLoggingPolicyProperty -> ShowS
[AccessLoggingPolicyProperty] -> ShowS
AccessLoggingPolicyProperty -> String
(Int -> AccessLoggingPolicyProperty -> ShowS)
-> (AccessLoggingPolicyProperty -> String)
-> ([AccessLoggingPolicyProperty] -> ShowS)
-> Show AccessLoggingPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccessLoggingPolicyProperty -> ShowS
showsPrec :: Int -> AccessLoggingPolicyProperty -> ShowS
$cshow :: AccessLoggingPolicyProperty -> String
show :: AccessLoggingPolicyProperty -> String
$cshowList :: [AccessLoggingPolicyProperty] -> ShowS
showList :: [AccessLoggingPolicyProperty] -> ShowS
Prelude.Show)
mkAccessLoggingPolicyProperty ::
  Value Prelude.Bool
  -> Value Prelude.Text -> AccessLoggingPolicyProperty
mkAccessLoggingPolicyProperty :: Value Bool -> Value Text -> AccessLoggingPolicyProperty
mkAccessLoggingPolicyProperty Value Bool
enabled Value Text
s3BucketName
  = AccessLoggingPolicyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Value Bool
enabled = Value Bool
enabled,
       s3BucketName :: Value Text
s3BucketName = Value Text
s3BucketName, emitInterval :: Maybe (Value Integer)
emitInterval = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       s3BucketPrefix :: Maybe (Value Text)
s3BucketPrefix = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccessLoggingPolicyProperty where
  toResourceProperties :: AccessLoggingPolicyProperty -> ResourceProperties
toResourceProperties AccessLoggingPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: AccessLoggingPolicyProperty -> ()
emitInterval :: AccessLoggingPolicyProperty -> Maybe (Value Integer)
enabled :: AccessLoggingPolicyProperty -> Value Bool
s3BucketName :: AccessLoggingPolicyProperty -> Value Text
s3BucketPrefix :: AccessLoggingPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
emitInterval :: Maybe (Value Integer)
enabled :: Value Bool
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ElasticLoadBalancing::LoadBalancer.AccessLoggingPolicy",
         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
"Enabled" Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Bool
enabled, Key
"S3BucketName" 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
s3BucketName]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EmitInterval" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
emitInterval,
                               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
"S3BucketPrefix" (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)
s3BucketPrefix]))}
instance JSON.ToJSON AccessLoggingPolicyProperty where
  toJSON :: AccessLoggingPolicyProperty -> Value
toJSON AccessLoggingPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: AccessLoggingPolicyProperty -> ()
emitInterval :: AccessLoggingPolicyProperty -> Maybe (Value Integer)
enabled :: AccessLoggingPolicyProperty -> Value Bool
s3BucketName :: AccessLoggingPolicyProperty -> Value Text
s3BucketPrefix :: AccessLoggingPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
emitInterval :: Maybe (Value Integer)
enabled :: Value Bool
s3BucketName :: Value Text
s3BucketPrefix :: 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
"Enabled" Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Bool
enabled, Key
"S3BucketName" 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
s3BucketName]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EmitInterval" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
emitInterval,
                  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
"S3BucketPrefix" (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)
s3BucketPrefix])))
instance Property "EmitInterval" AccessLoggingPolicyProperty where
  type PropertyType "EmitInterval" AccessLoggingPolicyProperty = Value Prelude.Integer
  set :: PropertyType "EmitInterval" AccessLoggingPolicyProperty
-> AccessLoggingPolicyProperty -> AccessLoggingPolicyProperty
set PropertyType "EmitInterval" AccessLoggingPolicyProperty
newValue AccessLoggingPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: AccessLoggingPolicyProperty -> ()
emitInterval :: AccessLoggingPolicyProperty -> Maybe (Value Integer)
enabled :: AccessLoggingPolicyProperty -> Value Bool
s3BucketName :: AccessLoggingPolicyProperty -> Value Text
s3BucketPrefix :: AccessLoggingPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
emitInterval :: Maybe (Value Integer)
enabled :: Value Bool
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
..}
    = AccessLoggingPolicyProperty
        {emitInterval :: Maybe (Value Integer)
emitInterval = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EmitInterval" AccessLoggingPolicyProperty
Value Integer
newValue, Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: ()
enabled :: Value Bool
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Value Bool
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
..}
instance Property "Enabled" AccessLoggingPolicyProperty where
  type PropertyType "Enabled" AccessLoggingPolicyProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" AccessLoggingPolicyProperty
-> AccessLoggingPolicyProperty -> AccessLoggingPolicyProperty
set PropertyType "Enabled" AccessLoggingPolicyProperty
newValue AccessLoggingPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: AccessLoggingPolicyProperty -> ()
emitInterval :: AccessLoggingPolicyProperty -> Maybe (Value Integer)
enabled :: AccessLoggingPolicyProperty -> Value Bool
s3BucketName :: AccessLoggingPolicyProperty -> Value Text
s3BucketPrefix :: AccessLoggingPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
emitInterval :: Maybe (Value Integer)
enabled :: Value Bool
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
..}
    = AccessLoggingPolicyProperty {enabled :: Value Bool
enabled = PropertyType "Enabled" AccessLoggingPolicyProperty
Value Bool
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
emitInterval :: Maybe (Value Integer)
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
haddock_workaround_ :: ()
emitInterval :: Maybe (Value Integer)
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
..}
instance Property "S3BucketName" AccessLoggingPolicyProperty where
  type PropertyType "S3BucketName" AccessLoggingPolicyProperty = Value Prelude.Text
  set :: PropertyType "S3BucketName" AccessLoggingPolicyProperty
-> AccessLoggingPolicyProperty -> AccessLoggingPolicyProperty
set PropertyType "S3BucketName" AccessLoggingPolicyProperty
newValue AccessLoggingPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: AccessLoggingPolicyProperty -> ()
emitInterval :: AccessLoggingPolicyProperty -> Maybe (Value Integer)
enabled :: AccessLoggingPolicyProperty -> Value Bool
s3BucketName :: AccessLoggingPolicyProperty -> Value Text
s3BucketPrefix :: AccessLoggingPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
emitInterval :: Maybe (Value Integer)
enabled :: Value Bool
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
..}
    = AccessLoggingPolicyProperty {s3BucketName :: Value Text
s3BucketName = PropertyType "S3BucketName" AccessLoggingPolicyProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: ()
emitInterval :: Maybe (Value Integer)
enabled :: Value Bool
s3BucketPrefix :: Maybe (Value Text)
haddock_workaround_ :: ()
emitInterval :: Maybe (Value Integer)
enabled :: Value Bool
s3BucketPrefix :: Maybe (Value Text)
..}
instance Property "S3BucketPrefix" AccessLoggingPolicyProperty where
  type PropertyType "S3BucketPrefix" AccessLoggingPolicyProperty = Value Prelude.Text
  set :: PropertyType "S3BucketPrefix" AccessLoggingPolicyProperty
-> AccessLoggingPolicyProperty -> AccessLoggingPolicyProperty
set PropertyType "S3BucketPrefix" AccessLoggingPolicyProperty
newValue AccessLoggingPolicyProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Bool
Value Text
haddock_workaround_ :: AccessLoggingPolicyProperty -> ()
emitInterval :: AccessLoggingPolicyProperty -> Maybe (Value Integer)
enabled :: AccessLoggingPolicyProperty -> Value Bool
s3BucketName :: AccessLoggingPolicyProperty -> Value Text
s3BucketPrefix :: AccessLoggingPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
emitInterval :: Maybe (Value Integer)
enabled :: Value Bool
s3BucketName :: Value Text
s3BucketPrefix :: Maybe (Value Text)
..}
    = AccessLoggingPolicyProperty
        {s3BucketPrefix :: Maybe (Value Text)
s3BucketPrefix = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3BucketPrefix" AccessLoggingPolicyProperty
Value Text
newValue, Maybe (Value Integer)
()
Value Bool
Value Text
haddock_workaround_ :: ()
emitInterval :: Maybe (Value Integer)
enabled :: Value Bool
s3BucketName :: Value Text
haddock_workaround_ :: ()
emitInterval :: Maybe (Value Integer)
enabled :: Value Bool
s3BucketName :: Value Text
..}