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

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

-- |
-- Module      : Amazonka.CustomerProfiles.PutProfileObjectType
-- 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)
--
-- Defines a ProfileObjectType.
module Amazonka.CustomerProfiles.PutProfileObjectType
  ( -- * Creating a Request
    PutProfileObjectType (..),
    newPutProfileObjectType,

    -- * Request Lenses
    putProfileObjectType_expirationDays,
    putProfileObjectType_templateId,
    putProfileObjectType_keys,
    putProfileObjectType_encryptionKey,
    putProfileObjectType_allowProfileCreation,
    putProfileObjectType_fields,
    putProfileObjectType_tags,
    putProfileObjectType_domainName,
    putProfileObjectType_objectTypeName,
    putProfileObjectType_description,

    -- * Destructuring the Response
    PutProfileObjectTypeResponse (..),
    newPutProfileObjectTypeResponse,

    -- * Response Lenses
    putProfileObjectTypeResponse_expirationDays,
    putProfileObjectTypeResponse_lastUpdatedAt,
    putProfileObjectTypeResponse_createdAt,
    putProfileObjectTypeResponse_templateId,
    putProfileObjectTypeResponse_keys,
    putProfileObjectTypeResponse_encryptionKey,
    putProfileObjectTypeResponse_allowProfileCreation,
    putProfileObjectTypeResponse_fields,
    putProfileObjectTypeResponse_tags,
    putProfileObjectTypeResponse_httpStatus,
    putProfileObjectTypeResponse_objectTypeName,
    putProfileObjectTypeResponse_description,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.CustomerProfiles.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newPutProfileObjectType' smart constructor.
data PutProfileObjectType = PutProfileObjectType'
  { -- | The number of days until the data in the object expires.
    PutProfileObjectType -> Maybe Natural
expirationDays :: Prelude.Maybe Prelude.Natural,
    -- | A unique identifier for the object template.
    PutProfileObjectType -> Maybe Text
templateId :: Prelude.Maybe Prelude.Text,
    -- | A list of unique keys that can be used to map data to the profile.
    PutProfileObjectType -> Maybe (HashMap Text [ObjectTypeKey])
keys :: Prelude.Maybe (Prelude.HashMap Prelude.Text [ObjectTypeKey]),
    -- | The customer-provided key to encrypt the profile object that will be
    -- created in this profile object type.
    PutProfileObjectType -> Maybe Text
encryptionKey :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether a profile should be created when data is received if
    -- one doesn’t exist for an object of this type. The default is @FALSE@. If
    -- the AllowProfileCreation flag is set to @FALSE@, then the service tries
    -- to fetch a standard profile and associate this object with the profile.
    -- If it is set to @TRUE@, and if no match is found, then the service
    -- creates a new standard profile.
    PutProfileObjectType -> Maybe Bool
allowProfileCreation :: Prelude.Maybe Prelude.Bool,
    -- | A map of the name and ObjectType field.
    PutProfileObjectType -> Maybe (HashMap Text ObjectTypeField)
fields :: Prelude.Maybe (Prelude.HashMap Prelude.Text ObjectTypeField),
    -- | The tags used to organize, track, or control access for this resource.
    PutProfileObjectType -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The unique name of the domain.
    PutProfileObjectType -> Text
domainName :: Prelude.Text,
    -- | The name of the profile object type.
    PutProfileObjectType -> Text
objectTypeName :: Prelude.Text,
    -- | Description of the profile object type.
    PutProfileObjectType -> Text
description :: Prelude.Text
  }
  deriving (PutProfileObjectType -> PutProfileObjectType -> Bool
(PutProfileObjectType -> PutProfileObjectType -> Bool)
-> (PutProfileObjectType -> PutProfileObjectType -> Bool)
-> Eq PutProfileObjectType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutProfileObjectType -> PutProfileObjectType -> Bool
$c/= :: PutProfileObjectType -> PutProfileObjectType -> Bool
== :: PutProfileObjectType -> PutProfileObjectType -> Bool
$c== :: PutProfileObjectType -> PutProfileObjectType -> Bool
Prelude.Eq, ReadPrec [PutProfileObjectType]
ReadPrec PutProfileObjectType
Int -> ReadS PutProfileObjectType
ReadS [PutProfileObjectType]
(Int -> ReadS PutProfileObjectType)
-> ReadS [PutProfileObjectType]
-> ReadPrec PutProfileObjectType
-> ReadPrec [PutProfileObjectType]
-> Read PutProfileObjectType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutProfileObjectType]
$creadListPrec :: ReadPrec [PutProfileObjectType]
readPrec :: ReadPrec PutProfileObjectType
$creadPrec :: ReadPrec PutProfileObjectType
readList :: ReadS [PutProfileObjectType]
$creadList :: ReadS [PutProfileObjectType]
readsPrec :: Int -> ReadS PutProfileObjectType
$creadsPrec :: Int -> ReadS PutProfileObjectType
Prelude.Read, Int -> PutProfileObjectType -> ShowS
[PutProfileObjectType] -> ShowS
PutProfileObjectType -> String
(Int -> PutProfileObjectType -> ShowS)
-> (PutProfileObjectType -> String)
-> ([PutProfileObjectType] -> ShowS)
-> Show PutProfileObjectType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutProfileObjectType] -> ShowS
$cshowList :: [PutProfileObjectType] -> ShowS
show :: PutProfileObjectType -> String
$cshow :: PutProfileObjectType -> String
showsPrec :: Int -> PutProfileObjectType -> ShowS
$cshowsPrec :: Int -> PutProfileObjectType -> ShowS
Prelude.Show, (forall x. PutProfileObjectType -> Rep PutProfileObjectType x)
-> (forall x. Rep PutProfileObjectType x -> PutProfileObjectType)
-> Generic PutProfileObjectType
forall x. Rep PutProfileObjectType x -> PutProfileObjectType
forall x. PutProfileObjectType -> Rep PutProfileObjectType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutProfileObjectType x -> PutProfileObjectType
$cfrom :: forall x. PutProfileObjectType -> Rep PutProfileObjectType x
Prelude.Generic)

-- |
-- Create a value of 'PutProfileObjectType' 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:
--
-- 'expirationDays', 'putProfileObjectType_expirationDays' - The number of days until the data in the object expires.
--
-- 'templateId', 'putProfileObjectType_templateId' - A unique identifier for the object template.
--
-- 'keys', 'putProfileObjectType_keys' - A list of unique keys that can be used to map data to the profile.
--
-- 'encryptionKey', 'putProfileObjectType_encryptionKey' - The customer-provided key to encrypt the profile object that will be
-- created in this profile object type.
--
-- 'allowProfileCreation', 'putProfileObjectType_allowProfileCreation' - Indicates whether a profile should be created when data is received if
-- one doesn’t exist for an object of this type. The default is @FALSE@. If
-- the AllowProfileCreation flag is set to @FALSE@, then the service tries
-- to fetch a standard profile and associate this object with the profile.
-- If it is set to @TRUE@, and if no match is found, then the service
-- creates a new standard profile.
--
-- 'fields', 'putProfileObjectType_fields' - A map of the name and ObjectType field.
--
-- 'tags', 'putProfileObjectType_tags' - The tags used to organize, track, or control access for this resource.
--
-- 'domainName', 'putProfileObjectType_domainName' - The unique name of the domain.
--
-- 'objectTypeName', 'putProfileObjectType_objectTypeName' - The name of the profile object type.
--
-- 'description', 'putProfileObjectType_description' - Description of the profile object type.
newPutProfileObjectType ::
  -- | 'domainName'
  Prelude.Text ->
  -- | 'objectTypeName'
  Prelude.Text ->
  -- | 'description'
  Prelude.Text ->
  PutProfileObjectType
newPutProfileObjectType :: Text -> Text -> Text -> PutProfileObjectType
newPutProfileObjectType
  Text
pDomainName_
  Text
pObjectTypeName_
  Text
pDescription_ =
    PutProfileObjectType' :: Maybe Natural
-> Maybe Text
-> Maybe (HashMap Text [ObjectTypeKey])
-> Maybe Text
-> Maybe Bool
-> Maybe (HashMap Text ObjectTypeField)
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> PutProfileObjectType
PutProfileObjectType'
      { $sel:expirationDays:PutProfileObjectType' :: Maybe Natural
expirationDays =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:templateId:PutProfileObjectType' :: Maybe Text
templateId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:keys:PutProfileObjectType' :: Maybe (HashMap Text [ObjectTypeKey])
keys = Maybe (HashMap Text [ObjectTypeKey])
forall a. Maybe a
Prelude.Nothing,
        $sel:encryptionKey:PutProfileObjectType' :: Maybe Text
encryptionKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:allowProfileCreation:PutProfileObjectType' :: Maybe Bool
allowProfileCreation = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:fields:PutProfileObjectType' :: Maybe (HashMap Text ObjectTypeField)
fields = Maybe (HashMap Text ObjectTypeField)
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:PutProfileObjectType' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:domainName:PutProfileObjectType' :: Text
domainName = Text
pDomainName_,
        $sel:objectTypeName:PutProfileObjectType' :: Text
objectTypeName = Text
pObjectTypeName_,
        $sel:description:PutProfileObjectType' :: Text
description = Text
pDescription_
      }

-- | The number of days until the data in the object expires.
putProfileObjectType_expirationDays :: Lens.Lens' PutProfileObjectType (Prelude.Maybe Prelude.Natural)
putProfileObjectType_expirationDays :: (Maybe Natural -> f (Maybe Natural))
-> PutProfileObjectType -> f PutProfileObjectType
putProfileObjectType_expirationDays = (PutProfileObjectType -> Maybe Natural)
-> (PutProfileObjectType -> Maybe Natural -> PutProfileObjectType)
-> Lens
     PutProfileObjectType
     PutProfileObjectType
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectType' {Maybe Natural
expirationDays :: Maybe Natural
$sel:expirationDays:PutProfileObjectType' :: PutProfileObjectType -> Maybe Natural
expirationDays} -> Maybe Natural
expirationDays) (\s :: PutProfileObjectType
s@PutProfileObjectType' {} Maybe Natural
a -> PutProfileObjectType
s {$sel:expirationDays:PutProfileObjectType' :: Maybe Natural
expirationDays = Maybe Natural
a} :: PutProfileObjectType)

-- | A unique identifier for the object template.
putProfileObjectType_templateId :: Lens.Lens' PutProfileObjectType (Prelude.Maybe Prelude.Text)
putProfileObjectType_templateId :: (Maybe Text -> f (Maybe Text))
-> PutProfileObjectType -> f PutProfileObjectType
putProfileObjectType_templateId = (PutProfileObjectType -> Maybe Text)
-> (PutProfileObjectType -> Maybe Text -> PutProfileObjectType)
-> Lens
     PutProfileObjectType PutProfileObjectType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectType' {Maybe Text
templateId :: Maybe Text
$sel:templateId:PutProfileObjectType' :: PutProfileObjectType -> Maybe Text
templateId} -> Maybe Text
templateId) (\s :: PutProfileObjectType
s@PutProfileObjectType' {} Maybe Text
a -> PutProfileObjectType
s {$sel:templateId:PutProfileObjectType' :: Maybe Text
templateId = Maybe Text
a} :: PutProfileObjectType)

-- | A list of unique keys that can be used to map data to the profile.
putProfileObjectType_keys :: Lens.Lens' PutProfileObjectType (Prelude.Maybe (Prelude.HashMap Prelude.Text [ObjectTypeKey]))
putProfileObjectType_keys :: (Maybe (HashMap Text [ObjectTypeKey])
 -> f (Maybe (HashMap Text [ObjectTypeKey])))
-> PutProfileObjectType -> f PutProfileObjectType
putProfileObjectType_keys = (PutProfileObjectType -> Maybe (HashMap Text [ObjectTypeKey]))
-> (PutProfileObjectType
    -> Maybe (HashMap Text [ObjectTypeKey]) -> PutProfileObjectType)
-> Lens
     PutProfileObjectType
     PutProfileObjectType
     (Maybe (HashMap Text [ObjectTypeKey]))
     (Maybe (HashMap Text [ObjectTypeKey]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectType' {Maybe (HashMap Text [ObjectTypeKey])
keys :: Maybe (HashMap Text [ObjectTypeKey])
$sel:keys:PutProfileObjectType' :: PutProfileObjectType -> Maybe (HashMap Text [ObjectTypeKey])
keys} -> Maybe (HashMap Text [ObjectTypeKey])
keys) (\s :: PutProfileObjectType
s@PutProfileObjectType' {} Maybe (HashMap Text [ObjectTypeKey])
a -> PutProfileObjectType
s {$sel:keys:PutProfileObjectType' :: Maybe (HashMap Text [ObjectTypeKey])
keys = Maybe (HashMap Text [ObjectTypeKey])
a} :: PutProfileObjectType) ((Maybe (HashMap Text [ObjectTypeKey])
  -> f (Maybe (HashMap Text [ObjectTypeKey])))
 -> PutProfileObjectType -> f PutProfileObjectType)
-> ((Maybe (HashMap Text [ObjectTypeKey])
     -> f (Maybe (HashMap Text [ObjectTypeKey])))
    -> Maybe (HashMap Text [ObjectTypeKey])
    -> f (Maybe (HashMap Text [ObjectTypeKey])))
-> (Maybe (HashMap Text [ObjectTypeKey])
    -> f (Maybe (HashMap Text [ObjectTypeKey])))
-> PutProfileObjectType
-> f PutProfileObjectType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text [ObjectTypeKey])
  (HashMap Text [ObjectTypeKey])
  (HashMap Text [ObjectTypeKey])
  (HashMap Text [ObjectTypeKey])
-> Iso
     (Maybe (HashMap Text [ObjectTypeKey]))
     (Maybe (HashMap Text [ObjectTypeKey]))
     (Maybe (HashMap Text [ObjectTypeKey]))
     (Maybe (HashMap Text [ObjectTypeKey]))
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
  (HashMap Text [ObjectTypeKey])
  (HashMap Text [ObjectTypeKey])
  (HashMap Text [ObjectTypeKey])
  (HashMap Text [ObjectTypeKey])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The customer-provided key to encrypt the profile object that will be
-- created in this profile object type.
putProfileObjectType_encryptionKey :: Lens.Lens' PutProfileObjectType (Prelude.Maybe Prelude.Text)
putProfileObjectType_encryptionKey :: (Maybe Text -> f (Maybe Text))
-> PutProfileObjectType -> f PutProfileObjectType
putProfileObjectType_encryptionKey = (PutProfileObjectType -> Maybe Text)
-> (PutProfileObjectType -> Maybe Text -> PutProfileObjectType)
-> Lens
     PutProfileObjectType PutProfileObjectType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectType' {Maybe Text
encryptionKey :: Maybe Text
$sel:encryptionKey:PutProfileObjectType' :: PutProfileObjectType -> Maybe Text
encryptionKey} -> Maybe Text
encryptionKey) (\s :: PutProfileObjectType
s@PutProfileObjectType' {} Maybe Text
a -> PutProfileObjectType
s {$sel:encryptionKey:PutProfileObjectType' :: Maybe Text
encryptionKey = Maybe Text
a} :: PutProfileObjectType)

-- | Indicates whether a profile should be created when data is received if
-- one doesn’t exist for an object of this type. The default is @FALSE@. If
-- the AllowProfileCreation flag is set to @FALSE@, then the service tries
-- to fetch a standard profile and associate this object with the profile.
-- If it is set to @TRUE@, and if no match is found, then the service
-- creates a new standard profile.
putProfileObjectType_allowProfileCreation :: Lens.Lens' PutProfileObjectType (Prelude.Maybe Prelude.Bool)
putProfileObjectType_allowProfileCreation :: (Maybe Bool -> f (Maybe Bool))
-> PutProfileObjectType -> f PutProfileObjectType
putProfileObjectType_allowProfileCreation = (PutProfileObjectType -> Maybe Bool)
-> (PutProfileObjectType -> Maybe Bool -> PutProfileObjectType)
-> Lens
     PutProfileObjectType PutProfileObjectType (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectType' {Maybe Bool
allowProfileCreation :: Maybe Bool
$sel:allowProfileCreation:PutProfileObjectType' :: PutProfileObjectType -> Maybe Bool
allowProfileCreation} -> Maybe Bool
allowProfileCreation) (\s :: PutProfileObjectType
s@PutProfileObjectType' {} Maybe Bool
a -> PutProfileObjectType
s {$sel:allowProfileCreation:PutProfileObjectType' :: Maybe Bool
allowProfileCreation = Maybe Bool
a} :: PutProfileObjectType)

-- | A map of the name and ObjectType field.
putProfileObjectType_fields :: Lens.Lens' PutProfileObjectType (Prelude.Maybe (Prelude.HashMap Prelude.Text ObjectTypeField))
putProfileObjectType_fields :: (Maybe (HashMap Text ObjectTypeField)
 -> f (Maybe (HashMap Text ObjectTypeField)))
-> PutProfileObjectType -> f PutProfileObjectType
putProfileObjectType_fields = (PutProfileObjectType -> Maybe (HashMap Text ObjectTypeField))
-> (PutProfileObjectType
    -> Maybe (HashMap Text ObjectTypeField) -> PutProfileObjectType)
-> Lens
     PutProfileObjectType
     PutProfileObjectType
     (Maybe (HashMap Text ObjectTypeField))
     (Maybe (HashMap Text ObjectTypeField))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectType' {Maybe (HashMap Text ObjectTypeField)
fields :: Maybe (HashMap Text ObjectTypeField)
$sel:fields:PutProfileObjectType' :: PutProfileObjectType -> Maybe (HashMap Text ObjectTypeField)
fields} -> Maybe (HashMap Text ObjectTypeField)
fields) (\s :: PutProfileObjectType
s@PutProfileObjectType' {} Maybe (HashMap Text ObjectTypeField)
a -> PutProfileObjectType
s {$sel:fields:PutProfileObjectType' :: Maybe (HashMap Text ObjectTypeField)
fields = Maybe (HashMap Text ObjectTypeField)
a} :: PutProfileObjectType) ((Maybe (HashMap Text ObjectTypeField)
  -> f (Maybe (HashMap Text ObjectTypeField)))
 -> PutProfileObjectType -> f PutProfileObjectType)
-> ((Maybe (HashMap Text ObjectTypeField)
     -> f (Maybe (HashMap Text ObjectTypeField)))
    -> Maybe (HashMap Text ObjectTypeField)
    -> f (Maybe (HashMap Text ObjectTypeField)))
-> (Maybe (HashMap Text ObjectTypeField)
    -> f (Maybe (HashMap Text ObjectTypeField)))
-> PutProfileObjectType
-> f PutProfileObjectType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text ObjectTypeField)
  (HashMap Text ObjectTypeField)
  (HashMap Text ObjectTypeField)
  (HashMap Text ObjectTypeField)
-> Iso
     (Maybe (HashMap Text ObjectTypeField))
     (Maybe (HashMap Text ObjectTypeField))
     (Maybe (HashMap Text ObjectTypeField))
     (Maybe (HashMap Text ObjectTypeField))
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
  (HashMap Text ObjectTypeField)
  (HashMap Text ObjectTypeField)
  (HashMap Text ObjectTypeField)
  (HashMap Text ObjectTypeField)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The tags used to organize, track, or control access for this resource.
putProfileObjectType_tags :: Lens.Lens' PutProfileObjectType (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
putProfileObjectType_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutProfileObjectType -> f PutProfileObjectType
putProfileObjectType_tags = (PutProfileObjectType -> Maybe (HashMap Text Text))
-> (PutProfileObjectType
    -> Maybe (HashMap Text Text) -> PutProfileObjectType)
-> Lens
     PutProfileObjectType
     PutProfileObjectType
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectType' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:PutProfileObjectType' :: PutProfileObjectType -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: PutProfileObjectType
s@PutProfileObjectType' {} Maybe (HashMap Text Text)
a -> PutProfileObjectType
s {$sel:tags:PutProfileObjectType' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: PutProfileObjectType) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> PutProfileObjectType -> f PutProfileObjectType)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutProfileObjectType
-> f PutProfileObjectType
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The unique name of the domain.
putProfileObjectType_domainName :: Lens.Lens' PutProfileObjectType Prelude.Text
putProfileObjectType_domainName :: (Text -> f Text) -> PutProfileObjectType -> f PutProfileObjectType
putProfileObjectType_domainName = (PutProfileObjectType -> Text)
-> (PutProfileObjectType -> Text -> PutProfileObjectType)
-> Lens PutProfileObjectType PutProfileObjectType Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectType' {Text
domainName :: Text
$sel:domainName:PutProfileObjectType' :: PutProfileObjectType -> Text
domainName} -> Text
domainName) (\s :: PutProfileObjectType
s@PutProfileObjectType' {} Text
a -> PutProfileObjectType
s {$sel:domainName:PutProfileObjectType' :: Text
domainName = Text
a} :: PutProfileObjectType)

-- | The name of the profile object type.
putProfileObjectType_objectTypeName :: Lens.Lens' PutProfileObjectType Prelude.Text
putProfileObjectType_objectTypeName :: (Text -> f Text) -> PutProfileObjectType -> f PutProfileObjectType
putProfileObjectType_objectTypeName = (PutProfileObjectType -> Text)
-> (PutProfileObjectType -> Text -> PutProfileObjectType)
-> Lens PutProfileObjectType PutProfileObjectType Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectType' {Text
objectTypeName :: Text
$sel:objectTypeName:PutProfileObjectType' :: PutProfileObjectType -> Text
objectTypeName} -> Text
objectTypeName) (\s :: PutProfileObjectType
s@PutProfileObjectType' {} Text
a -> PutProfileObjectType
s {$sel:objectTypeName:PutProfileObjectType' :: Text
objectTypeName = Text
a} :: PutProfileObjectType)

-- | Description of the profile object type.
putProfileObjectType_description :: Lens.Lens' PutProfileObjectType Prelude.Text
putProfileObjectType_description :: (Text -> f Text) -> PutProfileObjectType -> f PutProfileObjectType
putProfileObjectType_description = (PutProfileObjectType -> Text)
-> (PutProfileObjectType -> Text -> PutProfileObjectType)
-> Lens PutProfileObjectType PutProfileObjectType Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectType' {Text
description :: Text
$sel:description:PutProfileObjectType' :: PutProfileObjectType -> Text
description} -> Text
description) (\s :: PutProfileObjectType
s@PutProfileObjectType' {} Text
a -> PutProfileObjectType
s {$sel:description:PutProfileObjectType' :: Text
description = Text
a} :: PutProfileObjectType)

instance Core.AWSRequest PutProfileObjectType where
  type
    AWSResponse PutProfileObjectType =
      PutProfileObjectTypeResponse
  request :: PutProfileObjectType -> Request PutProfileObjectType
request = Service -> PutProfileObjectType -> Request PutProfileObjectType
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutProfileObjectType
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutProfileObjectType)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse PutProfileObjectType))
-> Logger
-> Service
-> Proxy PutProfileObjectType
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutProfileObjectType)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Natural
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text [ObjectTypeKey])
-> Maybe Text
-> Maybe Bool
-> Maybe (HashMap Text ObjectTypeField)
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> Text
-> PutProfileObjectTypeResponse
PutProfileObjectTypeResponse'
            (Maybe Natural
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe (HashMap Text [ObjectTypeKey])
 -> Maybe Text
 -> Maybe Bool
 -> Maybe (HashMap Text ObjectTypeField)
 -> Maybe (HashMap Text Text)
 -> Int
 -> Text
 -> Text
 -> PutProfileObjectTypeResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text [ObjectTypeKey])
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text ObjectTypeField)
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Text
      -> PutProfileObjectTypeResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ExpirationDays")
            Either
  String
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text [ObjectTypeKey])
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text ObjectTypeField)
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Text
   -> PutProfileObjectTypeResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text [ObjectTypeKey])
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text ObjectTypeField)
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Text
      -> PutProfileObjectTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastUpdatedAt")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text [ObjectTypeKey])
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text ObjectTypeField)
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Text
   -> PutProfileObjectTypeResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text [ObjectTypeKey])
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text ObjectTypeField)
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Text
      -> PutProfileObjectTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedAt")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text [ObjectTypeKey])
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text ObjectTypeField)
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Text
   -> PutProfileObjectTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text [ObjectTypeKey])
      -> Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text ObjectTypeField)
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Text
      -> PutProfileObjectTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TemplateId")
            Either
  String
  (Maybe (HashMap Text [ObjectTypeKey])
   -> Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text ObjectTypeField)
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Text
   -> PutProfileObjectTypeResponse)
-> Either String (Maybe (HashMap Text [ObjectTypeKey]))
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe (HashMap Text ObjectTypeField)
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Text
      -> PutProfileObjectTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe (HashMap Text [ObjectTypeKey])))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Keys" Either String (Maybe (Maybe (HashMap Text [ObjectTypeKey])))
-> Maybe (HashMap Text [ObjectTypeKey])
-> Either String (Maybe (HashMap Text [ObjectTypeKey]))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text [ObjectTypeKey])
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe (HashMap Text ObjectTypeField)
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Text
   -> PutProfileObjectTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe (HashMap Text ObjectTypeField)
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Text
      -> PutProfileObjectTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EncryptionKey")
            Either
  String
  (Maybe Bool
   -> Maybe (HashMap Text ObjectTypeField)
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Text
   -> PutProfileObjectTypeResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe (HashMap Text ObjectTypeField)
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> Text
      -> PutProfileObjectTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AllowProfileCreation")
            Either
  String
  (Maybe (HashMap Text ObjectTypeField)
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> Text
   -> PutProfileObjectTypeResponse)
-> Either String (Maybe (HashMap Text ObjectTypeField))
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Int -> Text -> Text -> PutProfileObjectTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe (HashMap Text ObjectTypeField)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Fields" Either String (Maybe (Maybe (HashMap Text ObjectTypeField)))
-> Maybe (HashMap Text ObjectTypeField)
-> Either String (Maybe (HashMap Text ObjectTypeField))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text ObjectTypeField)
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe (HashMap Text Text)
   -> Int -> Text -> Text -> PutProfileObjectTypeResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String (Int -> Text -> Text -> PutProfileObjectTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> Text -> Text -> PutProfileObjectTypeResponse)
-> Either String Int
-> Either String (Text -> Text -> PutProfileObjectTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either String (Text -> Text -> PutProfileObjectTypeResponse)
-> Either String Text
-> Either String (Text -> PutProfileObjectTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ObjectTypeName")
            Either String (Text -> PutProfileObjectTypeResponse)
-> Either String Text -> Either String PutProfileObjectTypeResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Description")
      )

instance Prelude.Hashable PutProfileObjectType

instance Prelude.NFData PutProfileObjectType

instance Core.ToHeaders PutProfileObjectType where
  toHeaders :: PutProfileObjectType -> ResponseHeaders
toHeaders =
    ResponseHeaders -> PutProfileObjectType -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON PutProfileObjectType where
  toJSON :: PutProfileObjectType -> Value
toJSON PutProfileObjectType' {Maybe Bool
Maybe Natural
Maybe Text
Maybe (HashMap Text [ObjectTypeKey])
Maybe (HashMap Text Text)
Maybe (HashMap Text ObjectTypeField)
Text
description :: Text
objectTypeName :: Text
domainName :: Text
tags :: Maybe (HashMap Text Text)
fields :: Maybe (HashMap Text ObjectTypeField)
allowProfileCreation :: Maybe Bool
encryptionKey :: Maybe Text
keys :: Maybe (HashMap Text [ObjectTypeKey])
templateId :: Maybe Text
expirationDays :: Maybe Natural
$sel:description:PutProfileObjectType' :: PutProfileObjectType -> Text
$sel:objectTypeName:PutProfileObjectType' :: PutProfileObjectType -> Text
$sel:domainName:PutProfileObjectType' :: PutProfileObjectType -> Text
$sel:tags:PutProfileObjectType' :: PutProfileObjectType -> Maybe (HashMap Text Text)
$sel:fields:PutProfileObjectType' :: PutProfileObjectType -> Maybe (HashMap Text ObjectTypeField)
$sel:allowProfileCreation:PutProfileObjectType' :: PutProfileObjectType -> Maybe Bool
$sel:encryptionKey:PutProfileObjectType' :: PutProfileObjectType -> Maybe Text
$sel:keys:PutProfileObjectType' :: PutProfileObjectType -> Maybe (HashMap Text [ObjectTypeKey])
$sel:templateId:PutProfileObjectType' :: PutProfileObjectType -> Maybe Text
$sel:expirationDays:PutProfileObjectType' :: PutProfileObjectType -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ExpirationDays" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
expirationDays,
            (Text
"TemplateId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
templateId,
            (Text
"Keys" Text -> HashMap Text [ObjectTypeKey] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text [ObjectTypeKey] -> Pair)
-> Maybe (HashMap Text [ObjectTypeKey]) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text [ObjectTypeKey])
keys,
            (Text
"EncryptionKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
encryptionKey,
            (Text
"AllowProfileCreation" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
allowProfileCreation,
            (Text
"Fields" Text -> HashMap Text ObjectTypeField -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text ObjectTypeField -> Pair)
-> Maybe (HashMap Text ObjectTypeField) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text ObjectTypeField)
fields,
            (Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
description)
          ]
      )

instance Core.ToPath PutProfileObjectType where
  toPath :: PutProfileObjectType -> ByteString
toPath PutProfileObjectType' {Maybe Bool
Maybe Natural
Maybe Text
Maybe (HashMap Text [ObjectTypeKey])
Maybe (HashMap Text Text)
Maybe (HashMap Text ObjectTypeField)
Text
description :: Text
objectTypeName :: Text
domainName :: Text
tags :: Maybe (HashMap Text Text)
fields :: Maybe (HashMap Text ObjectTypeField)
allowProfileCreation :: Maybe Bool
encryptionKey :: Maybe Text
keys :: Maybe (HashMap Text [ObjectTypeKey])
templateId :: Maybe Text
expirationDays :: Maybe Natural
$sel:description:PutProfileObjectType' :: PutProfileObjectType -> Text
$sel:objectTypeName:PutProfileObjectType' :: PutProfileObjectType -> Text
$sel:domainName:PutProfileObjectType' :: PutProfileObjectType -> Text
$sel:tags:PutProfileObjectType' :: PutProfileObjectType -> Maybe (HashMap Text Text)
$sel:fields:PutProfileObjectType' :: PutProfileObjectType -> Maybe (HashMap Text ObjectTypeField)
$sel:allowProfileCreation:PutProfileObjectType' :: PutProfileObjectType -> Maybe Bool
$sel:encryptionKey:PutProfileObjectType' :: PutProfileObjectType -> Maybe Text
$sel:keys:PutProfileObjectType' :: PutProfileObjectType -> Maybe (HashMap Text [ObjectTypeKey])
$sel:templateId:PutProfileObjectType' :: PutProfileObjectType -> Maybe Text
$sel:expirationDays:PutProfileObjectType' :: PutProfileObjectType -> Maybe Natural
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/domains/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
domainName,
        ByteString
"/object-types/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
objectTypeName
      ]

instance Core.ToQuery PutProfileObjectType where
  toQuery :: PutProfileObjectType -> QueryString
toQuery = QueryString -> PutProfileObjectType -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newPutProfileObjectTypeResponse' smart constructor.
data PutProfileObjectTypeResponse = PutProfileObjectTypeResponse'
  { -- | The number of days until the data in the object expires.
    PutProfileObjectTypeResponse -> Maybe Natural
expirationDays :: Prelude.Maybe Prelude.Natural,
    -- | The timestamp of when the domain was most recently edited.
    PutProfileObjectTypeResponse -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The timestamp of when the domain was created.
    PutProfileObjectTypeResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | A unique identifier for the object template.
    PutProfileObjectTypeResponse -> Maybe Text
templateId :: Prelude.Maybe Prelude.Text,
    -- | A list of unique keys that can be used to map data to the profile.
    PutProfileObjectTypeResponse
-> Maybe (HashMap Text [ObjectTypeKey])
keys :: Prelude.Maybe (Prelude.HashMap Prelude.Text [ObjectTypeKey]),
    -- | The customer-provided key to encrypt the profile object that will be
    -- created in this profile object type.
    PutProfileObjectTypeResponse -> Maybe Text
encryptionKey :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether a profile should be created when data is received if
    -- one doesn’t exist for an object of this type. The default is @FALSE@. If
    -- the AllowProfileCreation flag is set to @FALSE@, then the service tries
    -- to fetch a standard profile and associate this object with the profile.
    -- If it is set to @TRUE@, and if no match is found, then the service
    -- creates a new standard profile.
    PutProfileObjectTypeResponse -> Maybe Bool
allowProfileCreation :: Prelude.Maybe Prelude.Bool,
    -- | A map of the name and ObjectType field.
    PutProfileObjectTypeResponse
-> Maybe (HashMap Text ObjectTypeField)
fields :: Prelude.Maybe (Prelude.HashMap Prelude.Text ObjectTypeField),
    -- | The tags used to organize, track, or control access for this resource.
    PutProfileObjectTypeResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    PutProfileObjectTypeResponse -> Int
httpStatus :: Prelude.Int,
    -- | The name of the profile object type.
    PutProfileObjectTypeResponse -> Text
objectTypeName :: Prelude.Text,
    -- | Description of the profile object type.
    PutProfileObjectTypeResponse -> Text
description :: Prelude.Text
  }
  deriving (PutProfileObjectTypeResponse
-> PutProfileObjectTypeResponse -> Bool
(PutProfileObjectTypeResponse
 -> PutProfileObjectTypeResponse -> Bool)
-> (PutProfileObjectTypeResponse
    -> PutProfileObjectTypeResponse -> Bool)
-> Eq PutProfileObjectTypeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutProfileObjectTypeResponse
-> PutProfileObjectTypeResponse -> Bool
$c/= :: PutProfileObjectTypeResponse
-> PutProfileObjectTypeResponse -> Bool
== :: PutProfileObjectTypeResponse
-> PutProfileObjectTypeResponse -> Bool
$c== :: PutProfileObjectTypeResponse
-> PutProfileObjectTypeResponse -> Bool
Prelude.Eq, ReadPrec [PutProfileObjectTypeResponse]
ReadPrec PutProfileObjectTypeResponse
Int -> ReadS PutProfileObjectTypeResponse
ReadS [PutProfileObjectTypeResponse]
(Int -> ReadS PutProfileObjectTypeResponse)
-> ReadS [PutProfileObjectTypeResponse]
-> ReadPrec PutProfileObjectTypeResponse
-> ReadPrec [PutProfileObjectTypeResponse]
-> Read PutProfileObjectTypeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutProfileObjectTypeResponse]
$creadListPrec :: ReadPrec [PutProfileObjectTypeResponse]
readPrec :: ReadPrec PutProfileObjectTypeResponse
$creadPrec :: ReadPrec PutProfileObjectTypeResponse
readList :: ReadS [PutProfileObjectTypeResponse]
$creadList :: ReadS [PutProfileObjectTypeResponse]
readsPrec :: Int -> ReadS PutProfileObjectTypeResponse
$creadsPrec :: Int -> ReadS PutProfileObjectTypeResponse
Prelude.Read, Int -> PutProfileObjectTypeResponse -> ShowS
[PutProfileObjectTypeResponse] -> ShowS
PutProfileObjectTypeResponse -> String
(Int -> PutProfileObjectTypeResponse -> ShowS)
-> (PutProfileObjectTypeResponse -> String)
-> ([PutProfileObjectTypeResponse] -> ShowS)
-> Show PutProfileObjectTypeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutProfileObjectTypeResponse] -> ShowS
$cshowList :: [PutProfileObjectTypeResponse] -> ShowS
show :: PutProfileObjectTypeResponse -> String
$cshow :: PutProfileObjectTypeResponse -> String
showsPrec :: Int -> PutProfileObjectTypeResponse -> ShowS
$cshowsPrec :: Int -> PutProfileObjectTypeResponse -> ShowS
Prelude.Show, (forall x.
 PutProfileObjectTypeResponse -> Rep PutProfileObjectTypeResponse x)
-> (forall x.
    Rep PutProfileObjectTypeResponse x -> PutProfileObjectTypeResponse)
-> Generic PutProfileObjectTypeResponse
forall x.
Rep PutProfileObjectTypeResponse x -> PutProfileObjectTypeResponse
forall x.
PutProfileObjectTypeResponse -> Rep PutProfileObjectTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutProfileObjectTypeResponse x -> PutProfileObjectTypeResponse
$cfrom :: forall x.
PutProfileObjectTypeResponse -> Rep PutProfileObjectTypeResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutProfileObjectTypeResponse' 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:
--
-- 'expirationDays', 'putProfileObjectTypeResponse_expirationDays' - The number of days until the data in the object expires.
--
-- 'lastUpdatedAt', 'putProfileObjectTypeResponse_lastUpdatedAt' - The timestamp of when the domain was most recently edited.
--
-- 'createdAt', 'putProfileObjectTypeResponse_createdAt' - The timestamp of when the domain was created.
--
-- 'templateId', 'putProfileObjectTypeResponse_templateId' - A unique identifier for the object template.
--
-- 'keys', 'putProfileObjectTypeResponse_keys' - A list of unique keys that can be used to map data to the profile.
--
-- 'encryptionKey', 'putProfileObjectTypeResponse_encryptionKey' - The customer-provided key to encrypt the profile object that will be
-- created in this profile object type.
--
-- 'allowProfileCreation', 'putProfileObjectTypeResponse_allowProfileCreation' - Indicates whether a profile should be created when data is received if
-- one doesn’t exist for an object of this type. The default is @FALSE@. If
-- the AllowProfileCreation flag is set to @FALSE@, then the service tries
-- to fetch a standard profile and associate this object with the profile.
-- If it is set to @TRUE@, and if no match is found, then the service
-- creates a new standard profile.
--
-- 'fields', 'putProfileObjectTypeResponse_fields' - A map of the name and ObjectType field.
--
-- 'tags', 'putProfileObjectTypeResponse_tags' - The tags used to organize, track, or control access for this resource.
--
-- 'httpStatus', 'putProfileObjectTypeResponse_httpStatus' - The response's http status code.
--
-- 'objectTypeName', 'putProfileObjectTypeResponse_objectTypeName' - The name of the profile object type.
--
-- 'description', 'putProfileObjectTypeResponse_description' - Description of the profile object type.
newPutProfileObjectTypeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'objectTypeName'
  Prelude.Text ->
  -- | 'description'
  Prelude.Text ->
  PutProfileObjectTypeResponse
newPutProfileObjectTypeResponse :: Int -> Text -> Text -> PutProfileObjectTypeResponse
newPutProfileObjectTypeResponse
  Int
pHttpStatus_
  Text
pObjectTypeName_
  Text
pDescription_ =
    PutProfileObjectTypeResponse' :: Maybe Natural
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text [ObjectTypeKey])
-> Maybe Text
-> Maybe Bool
-> Maybe (HashMap Text ObjectTypeField)
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> Text
-> PutProfileObjectTypeResponse
PutProfileObjectTypeResponse'
      { $sel:expirationDays:PutProfileObjectTypeResponse' :: Maybe Natural
expirationDays =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:lastUpdatedAt:PutProfileObjectTypeResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:createdAt:PutProfileObjectTypeResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:templateId:PutProfileObjectTypeResponse' :: Maybe Text
templateId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:keys:PutProfileObjectTypeResponse' :: Maybe (HashMap Text [ObjectTypeKey])
keys = Maybe (HashMap Text [ObjectTypeKey])
forall a. Maybe a
Prelude.Nothing,
        $sel:encryptionKey:PutProfileObjectTypeResponse' :: Maybe Text
encryptionKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:allowProfileCreation:PutProfileObjectTypeResponse' :: Maybe Bool
allowProfileCreation = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:fields:PutProfileObjectTypeResponse' :: Maybe (HashMap Text ObjectTypeField)
fields = Maybe (HashMap Text ObjectTypeField)
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:PutProfileObjectTypeResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:PutProfileObjectTypeResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:objectTypeName:PutProfileObjectTypeResponse' :: Text
objectTypeName = Text
pObjectTypeName_,
        $sel:description:PutProfileObjectTypeResponse' :: Text
description = Text
pDescription_
      }

-- | The number of days until the data in the object expires.
putProfileObjectTypeResponse_expirationDays :: Lens.Lens' PutProfileObjectTypeResponse (Prelude.Maybe Prelude.Natural)
putProfileObjectTypeResponse_expirationDays :: (Maybe Natural -> f (Maybe Natural))
-> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse
putProfileObjectTypeResponse_expirationDays = (PutProfileObjectTypeResponse -> Maybe Natural)
-> (PutProfileObjectTypeResponse
    -> Maybe Natural -> PutProfileObjectTypeResponse)
-> Lens
     PutProfileObjectTypeResponse
     PutProfileObjectTypeResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectTypeResponse' {Maybe Natural
expirationDays :: Maybe Natural
$sel:expirationDays:PutProfileObjectTypeResponse' :: PutProfileObjectTypeResponse -> Maybe Natural
expirationDays} -> Maybe Natural
expirationDays) (\s :: PutProfileObjectTypeResponse
s@PutProfileObjectTypeResponse' {} Maybe Natural
a -> PutProfileObjectTypeResponse
s {$sel:expirationDays:PutProfileObjectTypeResponse' :: Maybe Natural
expirationDays = Maybe Natural
a} :: PutProfileObjectTypeResponse)

-- | The timestamp of when the domain was most recently edited.
putProfileObjectTypeResponse_lastUpdatedAt :: Lens.Lens' PutProfileObjectTypeResponse (Prelude.Maybe Prelude.UTCTime)
putProfileObjectTypeResponse_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse
putProfileObjectTypeResponse_lastUpdatedAt = (PutProfileObjectTypeResponse -> Maybe POSIX)
-> (PutProfileObjectTypeResponse
    -> Maybe POSIX -> PutProfileObjectTypeResponse)
-> Lens
     PutProfileObjectTypeResponse
     PutProfileObjectTypeResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectTypeResponse' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:PutProfileObjectTypeResponse' :: PutProfileObjectTypeResponse -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: PutProfileObjectTypeResponse
s@PutProfileObjectTypeResponse' {} Maybe POSIX
a -> PutProfileObjectTypeResponse
s {$sel:lastUpdatedAt:PutProfileObjectTypeResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: PutProfileObjectTypeResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutProfileObjectTypeResponse
-> f PutProfileObjectTypeResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The timestamp of when the domain was created.
putProfileObjectTypeResponse_createdAt :: Lens.Lens' PutProfileObjectTypeResponse (Prelude.Maybe Prelude.UTCTime)
putProfileObjectTypeResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse
putProfileObjectTypeResponse_createdAt = (PutProfileObjectTypeResponse -> Maybe POSIX)
-> (PutProfileObjectTypeResponse
    -> Maybe POSIX -> PutProfileObjectTypeResponse)
-> Lens
     PutProfileObjectTypeResponse
     PutProfileObjectTypeResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectTypeResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:PutProfileObjectTypeResponse' :: PutProfileObjectTypeResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: PutProfileObjectTypeResponse
s@PutProfileObjectTypeResponse' {} Maybe POSIX
a -> PutProfileObjectTypeResponse
s {$sel:createdAt:PutProfileObjectTypeResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: PutProfileObjectTypeResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutProfileObjectTypeResponse
-> f PutProfileObjectTypeResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A unique identifier for the object template.
putProfileObjectTypeResponse_templateId :: Lens.Lens' PutProfileObjectTypeResponse (Prelude.Maybe Prelude.Text)
putProfileObjectTypeResponse_templateId :: (Maybe Text -> f (Maybe Text))
-> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse
putProfileObjectTypeResponse_templateId = (PutProfileObjectTypeResponse -> Maybe Text)
-> (PutProfileObjectTypeResponse
    -> Maybe Text -> PutProfileObjectTypeResponse)
-> Lens
     PutProfileObjectTypeResponse
     PutProfileObjectTypeResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectTypeResponse' {Maybe Text
templateId :: Maybe Text
$sel:templateId:PutProfileObjectTypeResponse' :: PutProfileObjectTypeResponse -> Maybe Text
templateId} -> Maybe Text
templateId) (\s :: PutProfileObjectTypeResponse
s@PutProfileObjectTypeResponse' {} Maybe Text
a -> PutProfileObjectTypeResponse
s {$sel:templateId:PutProfileObjectTypeResponse' :: Maybe Text
templateId = Maybe Text
a} :: PutProfileObjectTypeResponse)

-- | A list of unique keys that can be used to map data to the profile.
putProfileObjectTypeResponse_keys :: Lens.Lens' PutProfileObjectTypeResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text [ObjectTypeKey]))
putProfileObjectTypeResponse_keys :: (Maybe (HashMap Text [ObjectTypeKey])
 -> f (Maybe (HashMap Text [ObjectTypeKey])))
-> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse
putProfileObjectTypeResponse_keys = (PutProfileObjectTypeResponse
 -> Maybe (HashMap Text [ObjectTypeKey]))
-> (PutProfileObjectTypeResponse
    -> Maybe (HashMap Text [ObjectTypeKey])
    -> PutProfileObjectTypeResponse)
-> Lens
     PutProfileObjectTypeResponse
     PutProfileObjectTypeResponse
     (Maybe (HashMap Text [ObjectTypeKey]))
     (Maybe (HashMap Text [ObjectTypeKey]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectTypeResponse' {Maybe (HashMap Text [ObjectTypeKey])
keys :: Maybe (HashMap Text [ObjectTypeKey])
$sel:keys:PutProfileObjectTypeResponse' :: PutProfileObjectTypeResponse
-> Maybe (HashMap Text [ObjectTypeKey])
keys} -> Maybe (HashMap Text [ObjectTypeKey])
keys) (\s :: PutProfileObjectTypeResponse
s@PutProfileObjectTypeResponse' {} Maybe (HashMap Text [ObjectTypeKey])
a -> PutProfileObjectTypeResponse
s {$sel:keys:PutProfileObjectTypeResponse' :: Maybe (HashMap Text [ObjectTypeKey])
keys = Maybe (HashMap Text [ObjectTypeKey])
a} :: PutProfileObjectTypeResponse) ((Maybe (HashMap Text [ObjectTypeKey])
  -> f (Maybe (HashMap Text [ObjectTypeKey])))
 -> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse)
-> ((Maybe (HashMap Text [ObjectTypeKey])
     -> f (Maybe (HashMap Text [ObjectTypeKey])))
    -> Maybe (HashMap Text [ObjectTypeKey])
    -> f (Maybe (HashMap Text [ObjectTypeKey])))
-> (Maybe (HashMap Text [ObjectTypeKey])
    -> f (Maybe (HashMap Text [ObjectTypeKey])))
-> PutProfileObjectTypeResponse
-> f PutProfileObjectTypeResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text [ObjectTypeKey])
  (HashMap Text [ObjectTypeKey])
  (HashMap Text [ObjectTypeKey])
  (HashMap Text [ObjectTypeKey])
-> Iso
     (Maybe (HashMap Text [ObjectTypeKey]))
     (Maybe (HashMap Text [ObjectTypeKey]))
     (Maybe (HashMap Text [ObjectTypeKey]))
     (Maybe (HashMap Text [ObjectTypeKey]))
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
  (HashMap Text [ObjectTypeKey])
  (HashMap Text [ObjectTypeKey])
  (HashMap Text [ObjectTypeKey])
  (HashMap Text [ObjectTypeKey])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The customer-provided key to encrypt the profile object that will be
-- created in this profile object type.
putProfileObjectTypeResponse_encryptionKey :: Lens.Lens' PutProfileObjectTypeResponse (Prelude.Maybe Prelude.Text)
putProfileObjectTypeResponse_encryptionKey :: (Maybe Text -> f (Maybe Text))
-> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse
putProfileObjectTypeResponse_encryptionKey = (PutProfileObjectTypeResponse -> Maybe Text)
-> (PutProfileObjectTypeResponse
    -> Maybe Text -> PutProfileObjectTypeResponse)
-> Lens
     PutProfileObjectTypeResponse
     PutProfileObjectTypeResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectTypeResponse' {Maybe Text
encryptionKey :: Maybe Text
$sel:encryptionKey:PutProfileObjectTypeResponse' :: PutProfileObjectTypeResponse -> Maybe Text
encryptionKey} -> Maybe Text
encryptionKey) (\s :: PutProfileObjectTypeResponse
s@PutProfileObjectTypeResponse' {} Maybe Text
a -> PutProfileObjectTypeResponse
s {$sel:encryptionKey:PutProfileObjectTypeResponse' :: Maybe Text
encryptionKey = Maybe Text
a} :: PutProfileObjectTypeResponse)

-- | Indicates whether a profile should be created when data is received if
-- one doesn’t exist for an object of this type. The default is @FALSE@. If
-- the AllowProfileCreation flag is set to @FALSE@, then the service tries
-- to fetch a standard profile and associate this object with the profile.
-- If it is set to @TRUE@, and if no match is found, then the service
-- creates a new standard profile.
putProfileObjectTypeResponse_allowProfileCreation :: Lens.Lens' PutProfileObjectTypeResponse (Prelude.Maybe Prelude.Bool)
putProfileObjectTypeResponse_allowProfileCreation :: (Maybe Bool -> f (Maybe Bool))
-> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse
putProfileObjectTypeResponse_allowProfileCreation = (PutProfileObjectTypeResponse -> Maybe Bool)
-> (PutProfileObjectTypeResponse
    -> Maybe Bool -> PutProfileObjectTypeResponse)
-> Lens
     PutProfileObjectTypeResponse
     PutProfileObjectTypeResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectTypeResponse' {Maybe Bool
allowProfileCreation :: Maybe Bool
$sel:allowProfileCreation:PutProfileObjectTypeResponse' :: PutProfileObjectTypeResponse -> Maybe Bool
allowProfileCreation} -> Maybe Bool
allowProfileCreation) (\s :: PutProfileObjectTypeResponse
s@PutProfileObjectTypeResponse' {} Maybe Bool
a -> PutProfileObjectTypeResponse
s {$sel:allowProfileCreation:PutProfileObjectTypeResponse' :: Maybe Bool
allowProfileCreation = Maybe Bool
a} :: PutProfileObjectTypeResponse)

-- | A map of the name and ObjectType field.
putProfileObjectTypeResponse_fields :: Lens.Lens' PutProfileObjectTypeResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text ObjectTypeField))
putProfileObjectTypeResponse_fields :: (Maybe (HashMap Text ObjectTypeField)
 -> f (Maybe (HashMap Text ObjectTypeField)))
-> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse
putProfileObjectTypeResponse_fields = (PutProfileObjectTypeResponse
 -> Maybe (HashMap Text ObjectTypeField))
-> (PutProfileObjectTypeResponse
    -> Maybe (HashMap Text ObjectTypeField)
    -> PutProfileObjectTypeResponse)
-> Lens
     PutProfileObjectTypeResponse
     PutProfileObjectTypeResponse
     (Maybe (HashMap Text ObjectTypeField))
     (Maybe (HashMap Text ObjectTypeField))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectTypeResponse' {Maybe (HashMap Text ObjectTypeField)
fields :: Maybe (HashMap Text ObjectTypeField)
$sel:fields:PutProfileObjectTypeResponse' :: PutProfileObjectTypeResponse
-> Maybe (HashMap Text ObjectTypeField)
fields} -> Maybe (HashMap Text ObjectTypeField)
fields) (\s :: PutProfileObjectTypeResponse
s@PutProfileObjectTypeResponse' {} Maybe (HashMap Text ObjectTypeField)
a -> PutProfileObjectTypeResponse
s {$sel:fields:PutProfileObjectTypeResponse' :: Maybe (HashMap Text ObjectTypeField)
fields = Maybe (HashMap Text ObjectTypeField)
a} :: PutProfileObjectTypeResponse) ((Maybe (HashMap Text ObjectTypeField)
  -> f (Maybe (HashMap Text ObjectTypeField)))
 -> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse)
-> ((Maybe (HashMap Text ObjectTypeField)
     -> f (Maybe (HashMap Text ObjectTypeField)))
    -> Maybe (HashMap Text ObjectTypeField)
    -> f (Maybe (HashMap Text ObjectTypeField)))
-> (Maybe (HashMap Text ObjectTypeField)
    -> f (Maybe (HashMap Text ObjectTypeField)))
-> PutProfileObjectTypeResponse
-> f PutProfileObjectTypeResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text ObjectTypeField)
  (HashMap Text ObjectTypeField)
  (HashMap Text ObjectTypeField)
  (HashMap Text ObjectTypeField)
-> Iso
     (Maybe (HashMap Text ObjectTypeField))
     (Maybe (HashMap Text ObjectTypeField))
     (Maybe (HashMap Text ObjectTypeField))
     (Maybe (HashMap Text ObjectTypeField))
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
  (HashMap Text ObjectTypeField)
  (HashMap Text ObjectTypeField)
  (HashMap Text ObjectTypeField)
  (HashMap Text ObjectTypeField)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The tags used to organize, track, or control access for this resource.
putProfileObjectTypeResponse_tags :: Lens.Lens' PutProfileObjectTypeResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
putProfileObjectTypeResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse
putProfileObjectTypeResponse_tags = (PutProfileObjectTypeResponse -> Maybe (HashMap Text Text))
-> (PutProfileObjectTypeResponse
    -> Maybe (HashMap Text Text) -> PutProfileObjectTypeResponse)
-> Lens
     PutProfileObjectTypeResponse
     PutProfileObjectTypeResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectTypeResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:PutProfileObjectTypeResponse' :: PutProfileObjectTypeResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: PutProfileObjectTypeResponse
s@PutProfileObjectTypeResponse' {} Maybe (HashMap Text Text)
a -> PutProfileObjectTypeResponse
s {$sel:tags:PutProfileObjectTypeResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: PutProfileObjectTypeResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutProfileObjectTypeResponse
-> f PutProfileObjectTypeResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
putProfileObjectTypeResponse_httpStatus :: Lens.Lens' PutProfileObjectTypeResponse Prelude.Int
putProfileObjectTypeResponse_httpStatus :: (Int -> f Int)
-> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse
putProfileObjectTypeResponse_httpStatus = (PutProfileObjectTypeResponse -> Int)
-> (PutProfileObjectTypeResponse
    -> Int -> PutProfileObjectTypeResponse)
-> Lens
     PutProfileObjectTypeResponse PutProfileObjectTypeResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectTypeResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutProfileObjectTypeResponse' :: PutProfileObjectTypeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutProfileObjectTypeResponse
s@PutProfileObjectTypeResponse' {} Int
a -> PutProfileObjectTypeResponse
s {$sel:httpStatus:PutProfileObjectTypeResponse' :: Int
httpStatus = Int
a} :: PutProfileObjectTypeResponse)

-- | The name of the profile object type.
putProfileObjectTypeResponse_objectTypeName :: Lens.Lens' PutProfileObjectTypeResponse Prelude.Text
putProfileObjectTypeResponse_objectTypeName :: (Text -> f Text)
-> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse
putProfileObjectTypeResponse_objectTypeName = (PutProfileObjectTypeResponse -> Text)
-> (PutProfileObjectTypeResponse
    -> Text -> PutProfileObjectTypeResponse)
-> Lens
     PutProfileObjectTypeResponse PutProfileObjectTypeResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectTypeResponse' {Text
objectTypeName :: Text
$sel:objectTypeName:PutProfileObjectTypeResponse' :: PutProfileObjectTypeResponse -> Text
objectTypeName} -> Text
objectTypeName) (\s :: PutProfileObjectTypeResponse
s@PutProfileObjectTypeResponse' {} Text
a -> PutProfileObjectTypeResponse
s {$sel:objectTypeName:PutProfileObjectTypeResponse' :: Text
objectTypeName = Text
a} :: PutProfileObjectTypeResponse)

-- | Description of the profile object type.
putProfileObjectTypeResponse_description :: Lens.Lens' PutProfileObjectTypeResponse Prelude.Text
putProfileObjectTypeResponse_description :: (Text -> f Text)
-> PutProfileObjectTypeResponse -> f PutProfileObjectTypeResponse
putProfileObjectTypeResponse_description = (PutProfileObjectTypeResponse -> Text)
-> (PutProfileObjectTypeResponse
    -> Text -> PutProfileObjectTypeResponse)
-> Lens
     PutProfileObjectTypeResponse PutProfileObjectTypeResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutProfileObjectTypeResponse' {Text
description :: Text
$sel:description:PutProfileObjectTypeResponse' :: PutProfileObjectTypeResponse -> Text
description} -> Text
description) (\s :: PutProfileObjectTypeResponse
s@PutProfileObjectTypeResponse' {} Text
a -> PutProfileObjectTypeResponse
s {$sel:description:PutProfileObjectTypeResponse' :: Text
description = Text
a} :: PutProfileObjectTypeResponse)

instance Prelude.NFData PutProfileObjectTypeResponse