module Stratosphere.GlobalAccelerator.EndpointGroup.EndpointConfigurationProperty (
        EndpointConfigurationProperty(..), mkEndpointConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EndpointConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-endpointconfiguration.html>
    EndpointConfigurationProperty {EndpointConfigurationProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-endpointconfiguration.html#cfn-globalaccelerator-endpointgroup-endpointconfiguration-attachmentarn>
                                   EndpointConfigurationProperty -> Maybe (Value Text)
attachmentArn :: (Prelude.Maybe (Value Prelude.Text)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-endpointconfiguration.html#cfn-globalaccelerator-endpointgroup-endpointconfiguration-clientippreservationenabled>
                                   EndpointConfigurationProperty -> Maybe (Value Bool)
clientIPPreservationEnabled :: (Prelude.Maybe (Value Prelude.Bool)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-endpointconfiguration.html#cfn-globalaccelerator-endpointgroup-endpointconfiguration-endpointid>
                                   EndpointConfigurationProperty -> Value Text
endpointId :: (Value Prelude.Text),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-endpointconfiguration.html#cfn-globalaccelerator-endpointgroup-endpointconfiguration-weight>
                                   EndpointConfigurationProperty -> Maybe (Value Integer)
weight :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (EndpointConfigurationProperty
-> EndpointConfigurationProperty -> Bool
(EndpointConfigurationProperty
 -> EndpointConfigurationProperty -> Bool)
-> (EndpointConfigurationProperty
    -> EndpointConfigurationProperty -> Bool)
-> Eq EndpointConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EndpointConfigurationProperty
-> EndpointConfigurationProperty -> Bool
== :: EndpointConfigurationProperty
-> EndpointConfigurationProperty -> Bool
$c/= :: EndpointConfigurationProperty
-> EndpointConfigurationProperty -> Bool
/= :: EndpointConfigurationProperty
-> EndpointConfigurationProperty -> Bool
Prelude.Eq, Int -> EndpointConfigurationProperty -> ShowS
[EndpointConfigurationProperty] -> ShowS
EndpointConfigurationProperty -> String
(Int -> EndpointConfigurationProperty -> ShowS)
-> (EndpointConfigurationProperty -> String)
-> ([EndpointConfigurationProperty] -> ShowS)
-> Show EndpointConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EndpointConfigurationProperty -> ShowS
showsPrec :: Int -> EndpointConfigurationProperty -> ShowS
$cshow :: EndpointConfigurationProperty -> String
show :: EndpointConfigurationProperty -> String
$cshowList :: [EndpointConfigurationProperty] -> ShowS
showList :: [EndpointConfigurationProperty] -> ShowS
Prelude.Show)
mkEndpointConfigurationProperty ::
  Value Prelude.Text -> EndpointConfigurationProperty
mkEndpointConfigurationProperty :: Value Text -> EndpointConfigurationProperty
mkEndpointConfigurationProperty Value Text
endpointId
  = EndpointConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), endpointId :: Value Text
endpointId = Value Text
endpointId,
       attachmentArn :: Maybe (Value Text)
attachmentArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       clientIPPreservationEnabled :: Maybe (Value Bool)
clientIPPreservationEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       weight :: Maybe (Value Integer)
weight = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EndpointConfigurationProperty where
  toResourceProperties :: EndpointConfigurationProperty -> ResourceProperties
toResourceProperties EndpointConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EndpointConfigurationProperty -> ()
attachmentArn :: EndpointConfigurationProperty -> Maybe (Value Text)
clientIPPreservationEnabled :: EndpointConfigurationProperty -> Maybe (Value Bool)
endpointId :: EndpointConfigurationProperty -> Value Text
weight :: EndpointConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
attachmentArn :: Maybe (Value Text)
clientIPPreservationEnabled :: Maybe (Value Bool)
endpointId :: Value Text
weight :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GlobalAccelerator::EndpointGroup.EndpointConfiguration",
         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
"EndpointId" 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
endpointId]
                           ([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
"AttachmentArn" (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)
attachmentArn,
                               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..=) Key
"ClientIPPreservationEnabled"
                                 (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
clientIPPreservationEnabled,
                               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
"Weight" (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)
weight]))}
instance JSON.ToJSON EndpointConfigurationProperty where
  toJSON :: EndpointConfigurationProperty -> Value
toJSON EndpointConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EndpointConfigurationProperty -> ()
attachmentArn :: EndpointConfigurationProperty -> Maybe (Value Text)
clientIPPreservationEnabled :: EndpointConfigurationProperty -> Maybe (Value Bool)
endpointId :: EndpointConfigurationProperty -> Value Text
weight :: EndpointConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
attachmentArn :: Maybe (Value Text)
clientIPPreservationEnabled :: Maybe (Value Bool)
endpointId :: Value Text
weight :: Maybe (Value Integer)
..}
    = [(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
"EndpointId" 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
endpointId]
              ([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
"AttachmentArn" (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)
attachmentArn,
                  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..=) Key
"ClientIPPreservationEnabled"
                    (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
clientIPPreservationEnabled,
                  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
"Weight" (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)
weight])))
instance Property "AttachmentArn" EndpointConfigurationProperty where
  type PropertyType "AttachmentArn" EndpointConfigurationProperty = Value Prelude.Text
  set :: PropertyType "AttachmentArn" EndpointConfigurationProperty
-> EndpointConfigurationProperty -> EndpointConfigurationProperty
set PropertyType "AttachmentArn" EndpointConfigurationProperty
newValue EndpointConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EndpointConfigurationProperty -> ()
attachmentArn :: EndpointConfigurationProperty -> Maybe (Value Text)
clientIPPreservationEnabled :: EndpointConfigurationProperty -> Maybe (Value Bool)
endpointId :: EndpointConfigurationProperty -> Value Text
weight :: EndpointConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
attachmentArn :: Maybe (Value Text)
clientIPPreservationEnabled :: Maybe (Value Bool)
endpointId :: Value Text
weight :: Maybe (Value Integer)
..}
    = EndpointConfigurationProperty
        {attachmentArn :: Maybe (Value Text)
attachmentArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AttachmentArn" EndpointConfigurationProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
clientIPPreservationEnabled :: Maybe (Value Bool)
endpointId :: Value Text
weight :: Maybe (Value Integer)
haddock_workaround_ :: ()
clientIPPreservationEnabled :: Maybe (Value Bool)
endpointId :: Value Text
weight :: Maybe (Value Integer)
..}
instance Property "ClientIPPreservationEnabled" EndpointConfigurationProperty where
  type PropertyType "ClientIPPreservationEnabled" EndpointConfigurationProperty = Value Prelude.Bool
  set :: PropertyType
  "ClientIPPreservationEnabled" EndpointConfigurationProperty
-> EndpointConfigurationProperty -> EndpointConfigurationProperty
set PropertyType
  "ClientIPPreservationEnabled" EndpointConfigurationProperty
newValue EndpointConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EndpointConfigurationProperty -> ()
attachmentArn :: EndpointConfigurationProperty -> Maybe (Value Text)
clientIPPreservationEnabled :: EndpointConfigurationProperty -> Maybe (Value Bool)
endpointId :: EndpointConfigurationProperty -> Value Text
weight :: EndpointConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
attachmentArn :: Maybe (Value Text)
clientIPPreservationEnabled :: Maybe (Value Bool)
endpointId :: Value Text
weight :: Maybe (Value Integer)
..}
    = EndpointConfigurationProperty
        {clientIPPreservationEnabled :: Maybe (Value Bool)
clientIPPreservationEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ClientIPPreservationEnabled" EndpointConfigurationProperty
Value Bool
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
attachmentArn :: Maybe (Value Text)
endpointId :: Value Text
weight :: Maybe (Value Integer)
haddock_workaround_ :: ()
attachmentArn :: Maybe (Value Text)
endpointId :: Value Text
weight :: Maybe (Value Integer)
..}
instance Property "EndpointId" EndpointConfigurationProperty where
  type PropertyType "EndpointId" EndpointConfigurationProperty = Value Prelude.Text
  set :: PropertyType "EndpointId" EndpointConfigurationProperty
-> EndpointConfigurationProperty -> EndpointConfigurationProperty
set PropertyType "EndpointId" EndpointConfigurationProperty
newValue EndpointConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EndpointConfigurationProperty -> ()
attachmentArn :: EndpointConfigurationProperty -> Maybe (Value Text)
clientIPPreservationEnabled :: EndpointConfigurationProperty -> Maybe (Value Bool)
endpointId :: EndpointConfigurationProperty -> Value Text
weight :: EndpointConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
attachmentArn :: Maybe (Value Text)
clientIPPreservationEnabled :: Maybe (Value Bool)
endpointId :: Value Text
weight :: Maybe (Value Integer)
..}
    = EndpointConfigurationProperty {endpointId :: Value Text
endpointId = PropertyType "EndpointId" EndpointConfigurationProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
attachmentArn :: Maybe (Value Text)
clientIPPreservationEnabled :: Maybe (Value Bool)
weight :: Maybe (Value Integer)
haddock_workaround_ :: ()
attachmentArn :: Maybe (Value Text)
clientIPPreservationEnabled :: Maybe (Value Bool)
weight :: Maybe (Value Integer)
..}
instance Property "Weight" EndpointConfigurationProperty where
  type PropertyType "Weight" EndpointConfigurationProperty = Value Prelude.Integer
  set :: PropertyType "Weight" EndpointConfigurationProperty
-> EndpointConfigurationProperty -> EndpointConfigurationProperty
set PropertyType "Weight" EndpointConfigurationProperty
newValue EndpointConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EndpointConfigurationProperty -> ()
attachmentArn :: EndpointConfigurationProperty -> Maybe (Value Text)
clientIPPreservationEnabled :: EndpointConfigurationProperty -> Maybe (Value Bool)
endpointId :: EndpointConfigurationProperty -> Value Text
weight :: EndpointConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
attachmentArn :: Maybe (Value Text)
clientIPPreservationEnabled :: Maybe (Value Bool)
endpointId :: Value Text
weight :: Maybe (Value Integer)
..}
    = EndpointConfigurationProperty
        {weight :: Maybe (Value Integer)
weight = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Weight" EndpointConfigurationProperty
Value Integer
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
attachmentArn :: Maybe (Value Text)
clientIPPreservationEnabled :: Maybe (Value Bool)
endpointId :: Value Text
haddock_workaround_ :: ()
attachmentArn :: Maybe (Value Text)
clientIPPreservationEnabled :: Maybe (Value Bool)
endpointId :: Value Text
..}