module Stratosphere.MediaPackageV2.OriginEndpoint.ForceEndpointErrorConfigurationProperty (
        ForceEndpointErrorConfigurationProperty(..),
        mkForceEndpointErrorConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ForceEndpointErrorConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-forceendpointerrorconfiguration.html>
    ForceEndpointErrorConfigurationProperty {ForceEndpointErrorConfigurationProperty -> ()
haddock_workaround_ :: (),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-forceendpointerrorconfiguration.html#cfn-mediapackagev2-originendpoint-forceendpointerrorconfiguration-endpointerrorconditions>
                                             ForceEndpointErrorConfigurationProperty -> Maybe (ValueList Text)
endpointErrorConditions :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (ForceEndpointErrorConfigurationProperty
-> ForceEndpointErrorConfigurationProperty -> Bool
(ForceEndpointErrorConfigurationProperty
 -> ForceEndpointErrorConfigurationProperty -> Bool)
-> (ForceEndpointErrorConfigurationProperty
    -> ForceEndpointErrorConfigurationProperty -> Bool)
-> Eq ForceEndpointErrorConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ForceEndpointErrorConfigurationProperty
-> ForceEndpointErrorConfigurationProperty -> Bool
== :: ForceEndpointErrorConfigurationProperty
-> ForceEndpointErrorConfigurationProperty -> Bool
$c/= :: ForceEndpointErrorConfigurationProperty
-> ForceEndpointErrorConfigurationProperty -> Bool
/= :: ForceEndpointErrorConfigurationProperty
-> ForceEndpointErrorConfigurationProperty -> Bool
Prelude.Eq, Int -> ForceEndpointErrorConfigurationProperty -> ShowS
[ForceEndpointErrorConfigurationProperty] -> ShowS
ForceEndpointErrorConfigurationProperty -> String
(Int -> ForceEndpointErrorConfigurationProperty -> ShowS)
-> (ForceEndpointErrorConfigurationProperty -> String)
-> ([ForceEndpointErrorConfigurationProperty] -> ShowS)
-> Show ForceEndpointErrorConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ForceEndpointErrorConfigurationProperty -> ShowS
showsPrec :: Int -> ForceEndpointErrorConfigurationProperty -> ShowS
$cshow :: ForceEndpointErrorConfigurationProperty -> String
show :: ForceEndpointErrorConfigurationProperty -> String
$cshowList :: [ForceEndpointErrorConfigurationProperty] -> ShowS
showList :: [ForceEndpointErrorConfigurationProperty] -> ShowS
Prelude.Show)
mkForceEndpointErrorConfigurationProperty ::
  ForceEndpointErrorConfigurationProperty
mkForceEndpointErrorConfigurationProperty :: ForceEndpointErrorConfigurationProperty
mkForceEndpointErrorConfigurationProperty
  = ForceEndpointErrorConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       endpointErrorConditions :: Maybe (ValueList Text)
endpointErrorConditions = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ForceEndpointErrorConfigurationProperty where
  toResourceProperties :: ForceEndpointErrorConfigurationProperty -> ResourceProperties
toResourceProperties ForceEndpointErrorConfigurationProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ForceEndpointErrorConfigurationProperty -> ()
endpointErrorConditions :: ForceEndpointErrorConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
endpointErrorConditions :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaPackageV2::OriginEndpoint.ForceEndpointErrorConfiguration",
         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 -> ValueList 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
"EndpointErrorConditions"
                              (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
endpointErrorConditions])}
instance JSON.ToJSON ForceEndpointErrorConfigurationProperty where
  toJSON :: ForceEndpointErrorConfigurationProperty -> Value
toJSON ForceEndpointErrorConfigurationProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ForceEndpointErrorConfigurationProperty -> ()
endpointErrorConditions :: ForceEndpointErrorConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
endpointErrorConditions :: Maybe (ValueList 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 -> ValueList 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
"EndpointErrorConditions"
                 (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
endpointErrorConditions]))
instance Property "EndpointErrorConditions" ForceEndpointErrorConfigurationProperty where
  type PropertyType "EndpointErrorConditions" ForceEndpointErrorConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType
  "EndpointErrorConditions" ForceEndpointErrorConfigurationProperty
-> ForceEndpointErrorConfigurationProperty
-> ForceEndpointErrorConfigurationProperty
set PropertyType
  "EndpointErrorConditions" ForceEndpointErrorConfigurationProperty
newValue ForceEndpointErrorConfigurationProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ForceEndpointErrorConfigurationProperty -> ()
endpointErrorConditions :: ForceEndpointErrorConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
endpointErrorConditions :: Maybe (ValueList Text)
..}
    = ForceEndpointErrorConfigurationProperty
        {endpointErrorConditions :: Maybe (ValueList Text)
endpointErrorConditions = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "EndpointErrorConditions" ForceEndpointErrorConfigurationProperty
ValueList Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}