module Stratosphere.CloudFront.Distribution.OriginCustomHeaderProperty (
        OriginCustomHeaderProperty(..), mkOriginCustomHeaderProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data OriginCustomHeaderProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origincustomheader.html>
    OriginCustomHeaderProperty {OriginCustomHeaderProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origincustomheader.html#cfn-cloudfront-distribution-origincustomheader-headername>
                                OriginCustomHeaderProperty -> Value Text
headerName :: (Value Prelude.Text),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-origincustomheader.html#cfn-cloudfront-distribution-origincustomheader-headervalue>
                                OriginCustomHeaderProperty -> Value Text
headerValue :: (Value Prelude.Text)}
  deriving stock (OriginCustomHeaderProperty -> OriginCustomHeaderProperty -> Bool
(OriginCustomHeaderProperty -> OriginCustomHeaderProperty -> Bool)
-> (OriginCustomHeaderProperty
    -> OriginCustomHeaderProperty -> Bool)
-> Eq OriginCustomHeaderProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OriginCustomHeaderProperty -> OriginCustomHeaderProperty -> Bool
== :: OriginCustomHeaderProperty -> OriginCustomHeaderProperty -> Bool
$c/= :: OriginCustomHeaderProperty -> OriginCustomHeaderProperty -> Bool
/= :: OriginCustomHeaderProperty -> OriginCustomHeaderProperty -> Bool
Prelude.Eq, Int -> OriginCustomHeaderProperty -> ShowS
[OriginCustomHeaderProperty] -> ShowS
OriginCustomHeaderProperty -> String
(Int -> OriginCustomHeaderProperty -> ShowS)
-> (OriginCustomHeaderProperty -> String)
-> ([OriginCustomHeaderProperty] -> ShowS)
-> Show OriginCustomHeaderProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OriginCustomHeaderProperty -> ShowS
showsPrec :: Int -> OriginCustomHeaderProperty -> ShowS
$cshow :: OriginCustomHeaderProperty -> String
show :: OriginCustomHeaderProperty -> String
$cshowList :: [OriginCustomHeaderProperty] -> ShowS
showList :: [OriginCustomHeaderProperty] -> ShowS
Prelude.Show)
mkOriginCustomHeaderProperty ::
  Value Prelude.Text
  -> Value Prelude.Text -> OriginCustomHeaderProperty
mkOriginCustomHeaderProperty :: Value Text -> Value Text -> OriginCustomHeaderProperty
mkOriginCustomHeaderProperty Value Text
headerName Value Text
headerValue
  = OriginCustomHeaderProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), headerName :: Value Text
headerName = Value Text
headerName,
       headerValue :: Value Text
headerValue = Value Text
headerValue}
instance ToResourceProperties OriginCustomHeaderProperty where
  toResourceProperties :: OriginCustomHeaderProperty -> ResourceProperties
toResourceProperties OriginCustomHeaderProperty {()
Value Text
haddock_workaround_ :: OriginCustomHeaderProperty -> ()
headerName :: OriginCustomHeaderProperty -> Value Text
headerValue :: OriginCustomHeaderProperty -> Value Text
haddock_workaround_ :: ()
headerName :: Value Text
headerValue :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudFront::Distribution.OriginCustomHeader",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"HeaderName" 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
headerName,
                       Key
"HeaderValue" 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
headerValue]}
instance JSON.ToJSON OriginCustomHeaderProperty where
  toJSON :: OriginCustomHeaderProperty -> Value
toJSON OriginCustomHeaderProperty {()
Value Text
haddock_workaround_ :: OriginCustomHeaderProperty -> ()
headerName :: OriginCustomHeaderProperty -> Value Text
headerValue :: OriginCustomHeaderProperty -> Value Text
haddock_workaround_ :: ()
headerName :: Value Text
headerValue :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        [Key
"HeaderName" 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
headerName,
         Key
"HeaderValue" 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
headerValue]
instance Property "HeaderName" OriginCustomHeaderProperty where
  type PropertyType "HeaderName" OriginCustomHeaderProperty = Value Prelude.Text
  set :: PropertyType "HeaderName" OriginCustomHeaderProperty
-> OriginCustomHeaderProperty -> OriginCustomHeaderProperty
set PropertyType "HeaderName" OriginCustomHeaderProperty
newValue OriginCustomHeaderProperty {()
Value Text
haddock_workaround_ :: OriginCustomHeaderProperty -> ()
headerName :: OriginCustomHeaderProperty -> Value Text
headerValue :: OriginCustomHeaderProperty -> Value Text
haddock_workaround_ :: ()
headerName :: Value Text
headerValue :: Value Text
..}
    = OriginCustomHeaderProperty {headerName :: Value Text
headerName = PropertyType "HeaderName" OriginCustomHeaderProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
headerValue :: Value Text
haddock_workaround_ :: ()
headerValue :: Value Text
..}
instance Property "HeaderValue" OriginCustomHeaderProperty where
  type PropertyType "HeaderValue" OriginCustomHeaderProperty = Value Prelude.Text
  set :: PropertyType "HeaderValue" OriginCustomHeaderProperty
-> OriginCustomHeaderProperty -> OriginCustomHeaderProperty
set PropertyType "HeaderValue" OriginCustomHeaderProperty
newValue OriginCustomHeaderProperty {()
Value Text
haddock_workaround_ :: OriginCustomHeaderProperty -> ()
headerName :: OriginCustomHeaderProperty -> Value Text
headerValue :: OriginCustomHeaderProperty -> Value Text
haddock_workaround_ :: ()
headerName :: Value Text
headerValue :: Value Text
..}
    = OriginCustomHeaderProperty {headerValue :: Value Text
headerValue = PropertyType "HeaderValue" OriginCustomHeaderProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
headerName :: Value Text
haddock_workaround_ :: ()
headerName :: Value Text
..}