{-# 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.LexV2Models.Types.DataPrivacy -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.LexV2Models.Types.DataPrivacy where import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import qualified Amazonka.Prelude as Prelude -- | By default, data stored by Amazon Lex is encrypted. The @DataPrivacy@ -- structure provides settings that determine how Amazon Lex handles -- special cases of securing the data for your bot. -- -- /See:/ 'newDataPrivacy' smart constructor. data DataPrivacy = DataPrivacy' { -- | For each Amazon Lex bot created with the Amazon Lex Model Building -- Service, you must specify whether your use of Amazon Lex is related to a -- website, program, or other application that is directed or targeted, in -- whole or in part, to children under age 13 and subject to the -- Children\'s Online Privacy Protection Act (COPPA) by specifying @true@ -- or @false@ in the @childDirected@ field. By specifying @true@ in the -- @childDirected@ field, you confirm that your use of Amazon Lex __is__ -- related to a website, program, or other application that is directed or -- targeted, in whole or in part, to children under age 13 and subject to -- COPPA. By specifying @false@ in the @childDirected@ field, you confirm -- that your use of Amazon Lex __is not__ related to a website, program, or -- other application that is directed or targeted, in whole or in part, to -- children under age 13 and subject to COPPA. You may not specify a -- default value for the @childDirected@ field that does not accurately -- reflect whether your use of Amazon Lex is related to a website, program, -- or other application that is directed or targeted, in whole or in part, -- to children under age 13 and subject to COPPA. If your use of Amazon Lex -- relates to a website, program, or other application that is directed in -- whole or in part, to children under age 13, you must obtain any required -- verifiable parental consent under COPPA. For information regarding the -- use of Amazon Lex in connection with websites, programs, or other -- applications that are directed or targeted, in whole or in part, to -- children under age 13, see the -- <https://aws.amazon.com/lex/faqs#data-security Amazon Lex FAQ>. DataPrivacy -> Bool childDirected :: Prelude.Bool } deriving (DataPrivacy -> DataPrivacy -> Bool forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a /= :: DataPrivacy -> DataPrivacy -> Bool $c/= :: DataPrivacy -> DataPrivacy -> Bool == :: DataPrivacy -> DataPrivacy -> Bool $c== :: DataPrivacy -> DataPrivacy -> Bool Prelude.Eq, ReadPrec [DataPrivacy] ReadPrec DataPrivacy Int -> ReadS DataPrivacy ReadS [DataPrivacy] forall a. (Int -> ReadS a) -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a readListPrec :: ReadPrec [DataPrivacy] $creadListPrec :: ReadPrec [DataPrivacy] readPrec :: ReadPrec DataPrivacy $creadPrec :: ReadPrec DataPrivacy readList :: ReadS [DataPrivacy] $creadList :: ReadS [DataPrivacy] readsPrec :: Int -> ReadS DataPrivacy $creadsPrec :: Int -> ReadS DataPrivacy Prelude.Read, Int -> DataPrivacy -> ShowS [DataPrivacy] -> ShowS DataPrivacy -> String forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [DataPrivacy] -> ShowS $cshowList :: [DataPrivacy] -> ShowS show :: DataPrivacy -> String $cshow :: DataPrivacy -> String showsPrec :: Int -> DataPrivacy -> ShowS $cshowsPrec :: Int -> DataPrivacy -> ShowS Prelude.Show, forall x. Rep DataPrivacy x -> DataPrivacy forall x. DataPrivacy -> Rep DataPrivacy x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cto :: forall x. Rep DataPrivacy x -> DataPrivacy $cfrom :: forall x. DataPrivacy -> Rep DataPrivacy x Prelude.Generic) -- | -- Create a value of 'DataPrivacy' 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: -- -- 'childDirected', 'dataPrivacy_childDirected' - For each Amazon Lex bot created with the Amazon Lex Model Building -- Service, you must specify whether your use of Amazon Lex is related to a -- website, program, or other application that is directed or targeted, in -- whole or in part, to children under age 13 and subject to the -- Children\'s Online Privacy Protection Act (COPPA) by specifying @true@ -- or @false@ in the @childDirected@ field. By specifying @true@ in the -- @childDirected@ field, you confirm that your use of Amazon Lex __is__ -- related to a website, program, or other application that is directed or -- targeted, in whole or in part, to children under age 13 and subject to -- COPPA. By specifying @false@ in the @childDirected@ field, you confirm -- that your use of Amazon Lex __is not__ related to a website, program, or -- other application that is directed or targeted, in whole or in part, to -- children under age 13 and subject to COPPA. You may not specify a -- default value for the @childDirected@ field that does not accurately -- reflect whether your use of Amazon Lex is related to a website, program, -- or other application that is directed or targeted, in whole or in part, -- to children under age 13 and subject to COPPA. If your use of Amazon Lex -- relates to a website, program, or other application that is directed in -- whole or in part, to children under age 13, you must obtain any required -- verifiable parental consent under COPPA. For information regarding the -- use of Amazon Lex in connection with websites, programs, or other -- applications that are directed or targeted, in whole or in part, to -- children under age 13, see the -- <https://aws.amazon.com/lex/faqs#data-security Amazon Lex FAQ>. newDataPrivacy :: -- | 'childDirected' Prelude.Bool -> DataPrivacy newDataPrivacy :: Bool -> DataPrivacy newDataPrivacy Bool pChildDirected_ = DataPrivacy' {$sel:childDirected:DataPrivacy' :: Bool childDirected = Bool pChildDirected_} -- | For each Amazon Lex bot created with the Amazon Lex Model Building -- Service, you must specify whether your use of Amazon Lex is related to a -- website, program, or other application that is directed or targeted, in -- whole or in part, to children under age 13 and subject to the -- Children\'s Online Privacy Protection Act (COPPA) by specifying @true@ -- or @false@ in the @childDirected@ field. By specifying @true@ in the -- @childDirected@ field, you confirm that your use of Amazon Lex __is__ -- related to a website, program, or other application that is directed or -- targeted, in whole or in part, to children under age 13 and subject to -- COPPA. By specifying @false@ in the @childDirected@ field, you confirm -- that your use of Amazon Lex __is not__ related to a website, program, or -- other application that is directed or targeted, in whole or in part, to -- children under age 13 and subject to COPPA. You may not specify a -- default value for the @childDirected@ field that does not accurately -- reflect whether your use of Amazon Lex is related to a website, program, -- or other application that is directed or targeted, in whole or in part, -- to children under age 13 and subject to COPPA. If your use of Amazon Lex -- relates to a website, program, or other application that is directed in -- whole or in part, to children under age 13, you must obtain any required -- verifiable parental consent under COPPA. For information regarding the -- use of Amazon Lex in connection with websites, programs, or other -- applications that are directed or targeted, in whole or in part, to -- children under age 13, see the -- <https://aws.amazon.com/lex/faqs#data-security Amazon Lex FAQ>. dataPrivacy_childDirected :: Lens.Lens' DataPrivacy Prelude.Bool dataPrivacy_childDirected :: Lens' DataPrivacy Bool dataPrivacy_childDirected = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\DataPrivacy' {Bool childDirected :: Bool $sel:childDirected:DataPrivacy' :: DataPrivacy -> Bool childDirected} -> Bool childDirected) (\s :: DataPrivacy s@DataPrivacy' {} Bool a -> DataPrivacy s {$sel:childDirected:DataPrivacy' :: Bool childDirected = Bool a} :: DataPrivacy) instance Data.FromJSON DataPrivacy where parseJSON :: Value -> Parser DataPrivacy parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a Data.withObject String "DataPrivacy" ( \Object x -> Bool -> DataPrivacy DataPrivacy' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b Prelude.<$> (Object x forall a. FromJSON a => Object -> Key -> Parser a Data..: Key "childDirected") ) instance Prelude.Hashable DataPrivacy where hashWithSalt :: Int -> DataPrivacy -> Int hashWithSalt Int _salt DataPrivacy' {Bool childDirected :: Bool $sel:childDirected:DataPrivacy' :: DataPrivacy -> Bool ..} = Int _salt forall a. Hashable a => Int -> a -> Int `Prelude.hashWithSalt` Bool childDirected instance Prelude.NFData DataPrivacy where rnf :: DataPrivacy -> () rnf DataPrivacy' {Bool childDirected :: Bool $sel:childDirected:DataPrivacy' :: DataPrivacy -> Bool ..} = forall a. NFData a => a -> () Prelude.rnf Bool childDirected instance Data.ToJSON DataPrivacy where toJSON :: DataPrivacy -> Value toJSON DataPrivacy' {Bool childDirected :: Bool $sel:childDirected:DataPrivacy' :: DataPrivacy -> Bool ..} = [Pair] -> Value Data.object ( forall a. [Maybe a] -> [a] Prelude.catMaybes [ forall a. a -> Maybe a Prelude.Just (Key "childDirected" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv Data..= Bool childDirected) ] )