module Stratosphere.Kendra.DataSource.ProxyConfigurationProperty (
        ProxyConfigurationProperty(..), mkProxyConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ProxyConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-proxyconfiguration.html>
    ProxyConfigurationProperty {ProxyConfigurationProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-proxyconfiguration.html#cfn-kendra-datasource-proxyconfiguration-credentials>
                                ProxyConfigurationProperty -> Maybe (Value Text)
credentials :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-proxyconfiguration.html#cfn-kendra-datasource-proxyconfiguration-host>
                                ProxyConfigurationProperty -> Value Text
host :: (Value Prelude.Text),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-proxyconfiguration.html#cfn-kendra-datasource-proxyconfiguration-port>
                                ProxyConfigurationProperty -> Value Integer
port :: (Value Prelude.Integer)}
  deriving stock (ProxyConfigurationProperty -> ProxyConfigurationProperty -> Bool
(ProxyConfigurationProperty -> ProxyConfigurationProperty -> Bool)
-> (ProxyConfigurationProperty
    -> ProxyConfigurationProperty -> Bool)
-> Eq ProxyConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ProxyConfigurationProperty -> ProxyConfigurationProperty -> Bool
== :: ProxyConfigurationProperty -> ProxyConfigurationProperty -> Bool
$c/= :: ProxyConfigurationProperty -> ProxyConfigurationProperty -> Bool
/= :: ProxyConfigurationProperty -> ProxyConfigurationProperty -> Bool
Prelude.Eq, Int -> ProxyConfigurationProperty -> ShowS
[ProxyConfigurationProperty] -> ShowS
ProxyConfigurationProperty -> String
(Int -> ProxyConfigurationProperty -> ShowS)
-> (ProxyConfigurationProperty -> String)
-> ([ProxyConfigurationProperty] -> ShowS)
-> Show ProxyConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ProxyConfigurationProperty -> ShowS
showsPrec :: Int -> ProxyConfigurationProperty -> ShowS
$cshow :: ProxyConfigurationProperty -> String
show :: ProxyConfigurationProperty -> String
$cshowList :: [ProxyConfigurationProperty] -> ShowS
showList :: [ProxyConfigurationProperty] -> ShowS
Prelude.Show)
mkProxyConfigurationProperty ::
  Value Prelude.Text
  -> Value Prelude.Integer -> ProxyConfigurationProperty
mkProxyConfigurationProperty :: Value Text -> Value Integer -> ProxyConfigurationProperty
mkProxyConfigurationProperty Value Text
host Value Integer
port
  = ProxyConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), host :: Value Text
host = Value Text
host, port :: Value Integer
port = Value Integer
port,
       credentials :: Maybe (Value Text)
credentials = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ProxyConfigurationProperty where
  toResourceProperties :: ProxyConfigurationProperty -> ResourceProperties
toResourceProperties ProxyConfigurationProperty {Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: ProxyConfigurationProperty -> ()
credentials :: ProxyConfigurationProperty -> Maybe (Value Text)
host :: ProxyConfigurationProperty -> Value Text
port :: ProxyConfigurationProperty -> Value Integer
haddock_workaround_ :: ()
credentials :: Maybe (Value Text)
host :: Value Text
port :: Value Integer
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Kendra::DataSource.ProxyConfiguration",
         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
"Host" 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
host, Key
"Port" 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..= Value Integer
port]
                           ([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
"Credentials" (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)
credentials]))}
instance JSON.ToJSON ProxyConfigurationProperty where
  toJSON :: ProxyConfigurationProperty -> Value
toJSON ProxyConfigurationProperty {Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: ProxyConfigurationProperty -> ()
credentials :: ProxyConfigurationProperty -> Maybe (Value Text)
host :: ProxyConfigurationProperty -> Value Text
port :: ProxyConfigurationProperty -> Value Integer
haddock_workaround_ :: ()
credentials :: Maybe (Value Text)
host :: Value Text
port :: 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
"Host" 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
host, Key
"Port" 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..= Value Integer
port]
              ([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
"Credentials" (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)
credentials])))
instance Property "Credentials" ProxyConfigurationProperty where
  type PropertyType "Credentials" ProxyConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Credentials" ProxyConfigurationProperty
-> ProxyConfigurationProperty -> ProxyConfigurationProperty
set PropertyType "Credentials" ProxyConfigurationProperty
newValue ProxyConfigurationProperty {Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: ProxyConfigurationProperty -> ()
credentials :: ProxyConfigurationProperty -> Maybe (Value Text)
host :: ProxyConfigurationProperty -> Value Text
port :: ProxyConfigurationProperty -> Value Integer
haddock_workaround_ :: ()
credentials :: Maybe (Value Text)
host :: Value Text
port :: Value Integer
..}
    = ProxyConfigurationProperty
        {credentials :: Maybe (Value Text)
credentials = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Credentials" ProxyConfigurationProperty
Value Text
newValue, ()
Value Integer
Value Text
haddock_workaround_ :: ()
host :: Value Text
port :: Value Integer
haddock_workaround_ :: ()
host :: Value Text
port :: Value Integer
..}
instance Property "Host" ProxyConfigurationProperty where
  type PropertyType "Host" ProxyConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Host" ProxyConfigurationProperty
-> ProxyConfigurationProperty -> ProxyConfigurationProperty
set PropertyType "Host" ProxyConfigurationProperty
newValue ProxyConfigurationProperty {Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: ProxyConfigurationProperty -> ()
credentials :: ProxyConfigurationProperty -> Maybe (Value Text)
host :: ProxyConfigurationProperty -> Value Text
port :: ProxyConfigurationProperty -> Value Integer
haddock_workaround_ :: ()
credentials :: Maybe (Value Text)
host :: Value Text
port :: Value Integer
..}
    = ProxyConfigurationProperty {host :: Value Text
host = PropertyType "Host" ProxyConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: ()
credentials :: Maybe (Value Text)
port :: Value Integer
haddock_workaround_ :: ()
credentials :: Maybe (Value Text)
port :: Value Integer
..}
instance Property "Port" ProxyConfigurationProperty where
  type PropertyType "Port" ProxyConfigurationProperty = Value Prelude.Integer
  set :: PropertyType "Port" ProxyConfigurationProperty
-> ProxyConfigurationProperty -> ProxyConfigurationProperty
set PropertyType "Port" ProxyConfigurationProperty
newValue ProxyConfigurationProperty {Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: ProxyConfigurationProperty -> ()
credentials :: ProxyConfigurationProperty -> Maybe (Value Text)
host :: ProxyConfigurationProperty -> Value Text
port :: ProxyConfigurationProperty -> Value Integer
haddock_workaround_ :: ()
credentials :: Maybe (Value Text)
host :: Value Text
port :: Value Integer
..}
    = ProxyConfigurationProperty {port :: Value Integer
port = PropertyType "Port" ProxyConfigurationProperty
Value Integer
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
credentials :: Maybe (Value Text)
host :: Value Text
haddock_workaround_ :: ()
credentials :: Maybe (Value Text)
host :: Value Text
..}