{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DMS.Types.EndpointSetting
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DMS.Types.EndpointSetting where

import qualified Amazonka.Core as Core
import Amazonka.DMS.Types.EndpointSettingTypeValue
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Endpoint settings.
--
-- /See:/ 'newEndpointSetting' smart constructor.
data EndpointSetting = EndpointSetting'
  { -- | A value that marks this endpoint setting as sensitive.
    EndpointSetting -> Maybe Bool
sensitive :: Prelude.Maybe Prelude.Bool,
    -- | The maximum value of an endpoint setting that is of type @int@.
    EndpointSetting -> Maybe Int
intValueMax :: Prelude.Maybe Prelude.Int,
    -- | The relevance or validity of an endpoint setting for an engine name and
    -- its endpoint type.
    EndpointSetting -> Maybe Text
applicability :: Prelude.Maybe Prelude.Text,
    -- | The name that you want to give the endpoint settings.
    EndpointSetting -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The minimum value of an endpoint setting that is of type @int@.
    EndpointSetting -> Maybe Int
intValueMin :: Prelude.Maybe Prelude.Int,
    -- | The unit of measure for this endpoint setting.
    EndpointSetting -> Maybe Text
units :: Prelude.Maybe Prelude.Text,
    -- | The default value of the endpoint setting if no value is specified using
    -- @CreateEndpoint@ or @ModifyEndpoint@.
    EndpointSetting -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
    -- | The type of endpoint. Valid values are @source@ and @target@.
    EndpointSetting -> Maybe EndpointSettingTypeValue
type' :: Prelude.Maybe EndpointSettingTypeValue,
    -- | Enumerated values to use for this endpoint.
    EndpointSetting -> Maybe [Text]
enumValues :: Prelude.Maybe [Prelude.Text]
  }
  deriving (EndpointSetting -> EndpointSetting -> Bool
(EndpointSetting -> EndpointSetting -> Bool)
-> (EndpointSetting -> EndpointSetting -> Bool)
-> Eq EndpointSetting
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EndpointSetting -> EndpointSetting -> Bool
$c/= :: EndpointSetting -> EndpointSetting -> Bool
== :: EndpointSetting -> EndpointSetting -> Bool
$c== :: EndpointSetting -> EndpointSetting -> Bool
Prelude.Eq, ReadPrec [EndpointSetting]
ReadPrec EndpointSetting
Int -> ReadS EndpointSetting
ReadS [EndpointSetting]
(Int -> ReadS EndpointSetting)
-> ReadS [EndpointSetting]
-> ReadPrec EndpointSetting
-> ReadPrec [EndpointSetting]
-> Read EndpointSetting
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EndpointSetting]
$creadListPrec :: ReadPrec [EndpointSetting]
readPrec :: ReadPrec EndpointSetting
$creadPrec :: ReadPrec EndpointSetting
readList :: ReadS [EndpointSetting]
$creadList :: ReadS [EndpointSetting]
readsPrec :: Int -> ReadS EndpointSetting
$creadsPrec :: Int -> ReadS EndpointSetting
Prelude.Read, Int -> EndpointSetting -> ShowS
[EndpointSetting] -> ShowS
EndpointSetting -> String
(Int -> EndpointSetting -> ShowS)
-> (EndpointSetting -> String)
-> ([EndpointSetting] -> ShowS)
-> Show EndpointSetting
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EndpointSetting] -> ShowS
$cshowList :: [EndpointSetting] -> ShowS
show :: EndpointSetting -> String
$cshow :: EndpointSetting -> String
showsPrec :: Int -> EndpointSetting -> ShowS
$cshowsPrec :: Int -> EndpointSetting -> ShowS
Prelude.Show, (forall x. EndpointSetting -> Rep EndpointSetting x)
-> (forall x. Rep EndpointSetting x -> EndpointSetting)
-> Generic EndpointSetting
forall x. Rep EndpointSetting x -> EndpointSetting
forall x. EndpointSetting -> Rep EndpointSetting x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EndpointSetting x -> EndpointSetting
$cfrom :: forall x. EndpointSetting -> Rep EndpointSetting x
Prelude.Generic)

-- |
-- Create a value of 'EndpointSetting' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'sensitive', 'endpointSetting_sensitive' - A value that marks this endpoint setting as sensitive.
--
-- 'intValueMax', 'endpointSetting_intValueMax' - The maximum value of an endpoint setting that is of type @int@.
--
-- 'applicability', 'endpointSetting_applicability' - The relevance or validity of an endpoint setting for an engine name and
-- its endpoint type.
--
-- 'name', 'endpointSetting_name' - The name that you want to give the endpoint settings.
--
-- 'intValueMin', 'endpointSetting_intValueMin' - The minimum value of an endpoint setting that is of type @int@.
--
-- 'units', 'endpointSetting_units' - The unit of measure for this endpoint setting.
--
-- 'defaultValue', 'endpointSetting_defaultValue' - The default value of the endpoint setting if no value is specified using
-- @CreateEndpoint@ or @ModifyEndpoint@.
--
-- 'type'', 'endpointSetting_type' - The type of endpoint. Valid values are @source@ and @target@.
--
-- 'enumValues', 'endpointSetting_enumValues' - Enumerated values to use for this endpoint.
newEndpointSetting ::
  EndpointSetting
newEndpointSetting :: EndpointSetting
newEndpointSetting =
  EndpointSetting' :: Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting
EndpointSetting'
    { $sel:sensitive:EndpointSetting' :: Maybe Bool
sensitive = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:intValueMax:EndpointSetting' :: Maybe Int
intValueMax = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:applicability:EndpointSetting' :: Maybe Text
applicability = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:EndpointSetting' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:intValueMin:EndpointSetting' :: Maybe Int
intValueMin = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:units:EndpointSetting' :: Maybe Text
units = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultValue:EndpointSetting' :: Maybe Text
defaultValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':EndpointSetting' :: Maybe EndpointSettingTypeValue
type' = Maybe EndpointSettingTypeValue
forall a. Maybe a
Prelude.Nothing,
      $sel:enumValues:EndpointSetting' :: Maybe [Text]
enumValues = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
    }

-- | A value that marks this endpoint setting as sensitive.
endpointSetting_sensitive :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Bool)
endpointSetting_sensitive :: (Maybe Bool -> f (Maybe Bool))
-> EndpointSetting -> f EndpointSetting
endpointSetting_sensitive = (EndpointSetting -> Maybe Bool)
-> (EndpointSetting -> Maybe Bool -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Bool
sensitive :: Maybe Bool
$sel:sensitive:EndpointSetting' :: EndpointSetting -> Maybe Bool
sensitive} -> Maybe Bool
sensitive) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Bool
a -> EndpointSetting
s {$sel:sensitive:EndpointSetting' :: Maybe Bool
sensitive = Maybe Bool
a} :: EndpointSetting)

-- | The maximum value of an endpoint setting that is of type @int@.
endpointSetting_intValueMax :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Int)
endpointSetting_intValueMax :: (Maybe Int -> f (Maybe Int))
-> EndpointSetting -> f EndpointSetting
endpointSetting_intValueMax = (EndpointSetting -> Maybe Int)
-> (EndpointSetting -> Maybe Int -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Int
intValueMax :: Maybe Int
$sel:intValueMax:EndpointSetting' :: EndpointSetting -> Maybe Int
intValueMax} -> Maybe Int
intValueMax) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Int
a -> EndpointSetting
s {$sel:intValueMax:EndpointSetting' :: Maybe Int
intValueMax = Maybe Int
a} :: EndpointSetting)

-- | The relevance or validity of an endpoint setting for an engine name and
-- its endpoint type.
endpointSetting_applicability :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Text)
endpointSetting_applicability :: (Maybe Text -> f (Maybe Text))
-> EndpointSetting -> f EndpointSetting
endpointSetting_applicability = (EndpointSetting -> Maybe Text)
-> (EndpointSetting -> Maybe Text -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Text
applicability :: Maybe Text
$sel:applicability:EndpointSetting' :: EndpointSetting -> Maybe Text
applicability} -> Maybe Text
applicability) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Text
a -> EndpointSetting
s {$sel:applicability:EndpointSetting' :: Maybe Text
applicability = Maybe Text
a} :: EndpointSetting)

-- | The name that you want to give the endpoint settings.
endpointSetting_name :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Text)
endpointSetting_name :: (Maybe Text -> f (Maybe Text))
-> EndpointSetting -> f EndpointSetting
endpointSetting_name = (EndpointSetting -> Maybe Text)
-> (EndpointSetting -> Maybe Text -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Text
name :: Maybe Text
$sel:name:EndpointSetting' :: EndpointSetting -> Maybe Text
name} -> Maybe Text
name) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Text
a -> EndpointSetting
s {$sel:name:EndpointSetting' :: Maybe Text
name = Maybe Text
a} :: EndpointSetting)

-- | The minimum value of an endpoint setting that is of type @int@.
endpointSetting_intValueMin :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Int)
endpointSetting_intValueMin :: (Maybe Int -> f (Maybe Int))
-> EndpointSetting -> f EndpointSetting
endpointSetting_intValueMin = (EndpointSetting -> Maybe Int)
-> (EndpointSetting -> Maybe Int -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Int
intValueMin :: Maybe Int
$sel:intValueMin:EndpointSetting' :: EndpointSetting -> Maybe Int
intValueMin} -> Maybe Int
intValueMin) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Int
a -> EndpointSetting
s {$sel:intValueMin:EndpointSetting' :: Maybe Int
intValueMin = Maybe Int
a} :: EndpointSetting)

-- | The unit of measure for this endpoint setting.
endpointSetting_units :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Text)
endpointSetting_units :: (Maybe Text -> f (Maybe Text))
-> EndpointSetting -> f EndpointSetting
endpointSetting_units = (EndpointSetting -> Maybe Text)
-> (EndpointSetting -> Maybe Text -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Text
units :: Maybe Text
$sel:units:EndpointSetting' :: EndpointSetting -> Maybe Text
units} -> Maybe Text
units) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Text
a -> EndpointSetting
s {$sel:units:EndpointSetting' :: Maybe Text
units = Maybe Text
a} :: EndpointSetting)

-- | The default value of the endpoint setting if no value is specified using
-- @CreateEndpoint@ or @ModifyEndpoint@.
endpointSetting_defaultValue :: Lens.Lens' EndpointSetting (Prelude.Maybe Prelude.Text)
endpointSetting_defaultValue :: (Maybe Text -> f (Maybe Text))
-> EndpointSetting -> f EndpointSetting
endpointSetting_defaultValue = (EndpointSetting -> Maybe Text)
-> (EndpointSetting -> Maybe Text -> EndpointSetting)
-> Lens EndpointSetting EndpointSetting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe Text
defaultValue :: Maybe Text
$sel:defaultValue:EndpointSetting' :: EndpointSetting -> Maybe Text
defaultValue} -> Maybe Text
defaultValue) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe Text
a -> EndpointSetting
s {$sel:defaultValue:EndpointSetting' :: Maybe Text
defaultValue = Maybe Text
a} :: EndpointSetting)

-- | The type of endpoint. Valid values are @source@ and @target@.
endpointSetting_type :: Lens.Lens' EndpointSetting (Prelude.Maybe EndpointSettingTypeValue)
endpointSetting_type :: (Maybe EndpointSettingTypeValue
 -> f (Maybe EndpointSettingTypeValue))
-> EndpointSetting -> f EndpointSetting
endpointSetting_type = (EndpointSetting -> Maybe EndpointSettingTypeValue)
-> (EndpointSetting
    -> Maybe EndpointSettingTypeValue -> EndpointSetting)
-> Lens
     EndpointSetting
     EndpointSetting
     (Maybe EndpointSettingTypeValue)
     (Maybe EndpointSettingTypeValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe EndpointSettingTypeValue
type' :: Maybe EndpointSettingTypeValue
$sel:type':EndpointSetting' :: EndpointSetting -> Maybe EndpointSettingTypeValue
type'} -> Maybe EndpointSettingTypeValue
type') (\s :: EndpointSetting
s@EndpointSetting' {} Maybe EndpointSettingTypeValue
a -> EndpointSetting
s {$sel:type':EndpointSetting' :: Maybe EndpointSettingTypeValue
type' = Maybe EndpointSettingTypeValue
a} :: EndpointSetting)

-- | Enumerated values to use for this endpoint.
endpointSetting_enumValues :: Lens.Lens' EndpointSetting (Prelude.Maybe [Prelude.Text])
endpointSetting_enumValues :: (Maybe [Text] -> f (Maybe [Text]))
-> EndpointSetting -> f EndpointSetting
endpointSetting_enumValues = (EndpointSetting -> Maybe [Text])
-> (EndpointSetting -> Maybe [Text] -> EndpointSetting)
-> Lens
     EndpointSetting EndpointSetting (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EndpointSetting' {Maybe [Text]
enumValues :: Maybe [Text]
$sel:enumValues:EndpointSetting' :: EndpointSetting -> Maybe [Text]
enumValues} -> Maybe [Text]
enumValues) (\s :: EndpointSetting
s@EndpointSetting' {} Maybe [Text]
a -> EndpointSetting
s {$sel:enumValues:EndpointSetting' :: Maybe [Text]
enumValues = Maybe [Text]
a} :: EndpointSetting) ((Maybe [Text] -> f (Maybe [Text]))
 -> EndpointSetting -> f EndpointSetting)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> EndpointSetting
-> f EndpointSetting
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON EndpointSetting where
  parseJSON :: Value -> Parser EndpointSetting
parseJSON =
    String
-> (Object -> Parser EndpointSetting)
-> Value
-> Parser EndpointSetting
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EndpointSetting"
      ( \Object
x ->
          Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe EndpointSettingTypeValue
-> Maybe [Text]
-> EndpointSetting
EndpointSetting'
            (Maybe Bool
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe EndpointSettingTypeValue
 -> Maybe [Text]
 -> EndpointSetting)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointSettingTypeValue
      -> Maybe [Text]
      -> EndpointSetting)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Sensitive")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointSettingTypeValue
   -> Maybe [Text]
   -> EndpointSetting)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointSettingTypeValue
      -> Maybe [Text]
      -> EndpointSetting)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IntValueMax")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointSettingTypeValue
   -> Maybe [Text]
   -> EndpointSetting)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointSettingTypeValue
      -> Maybe [Text]
      -> EndpointSetting)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Applicability")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointSettingTypeValue
   -> Maybe [Text]
   -> EndpointSetting)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointSettingTypeValue
      -> Maybe [Text]
      -> EndpointSetting)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointSettingTypeValue
   -> Maybe [Text]
   -> EndpointSetting)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe EndpointSettingTypeValue
      -> Maybe [Text]
      -> EndpointSetting)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IntValueMin")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe EndpointSettingTypeValue
   -> Maybe [Text]
   -> EndpointSetting)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe EndpointSettingTypeValue
      -> Maybe [Text]
      -> EndpointSetting)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Units")
            Parser
  (Maybe Text
   -> Maybe EndpointSettingTypeValue
   -> Maybe [Text]
   -> EndpointSetting)
-> Parser (Maybe Text)
-> Parser
     (Maybe EndpointSettingTypeValue -> Maybe [Text] -> EndpointSetting)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultValue")
            Parser
  (Maybe EndpointSettingTypeValue -> Maybe [Text] -> EndpointSetting)
-> Parser (Maybe EndpointSettingTypeValue)
-> Parser (Maybe [Text] -> EndpointSetting)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EndpointSettingTypeValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
            Parser (Maybe [Text] -> EndpointSetting)
-> Parser (Maybe [Text]) -> Parser EndpointSetting
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnumValues" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable EndpointSetting

instance Prelude.NFData EndpointSetting