{-# 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.SageMaker.CreateUserProfile
-- 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)
--
-- Creates a user profile. A user profile represents a single user within a
-- domain, and is the main way to reference a \"person\" for the purposes
-- of sharing, reporting, and other user-oriented features. This entity is
-- created when a user onboards to Amazon SageMaker Studio. If an
-- administrator invites a person by email or imports them from SSO, a user
-- profile is automatically created. A user profile is the primary holder
-- of settings for an individual user and has a reference to the user\'s
-- private Amazon Elastic File System (EFS) home directory.
module Amazonka.SageMaker.CreateUserProfile
  ( -- * Creating a Request
    CreateUserProfile (..),
    newCreateUserProfile,

    -- * Request Lenses
    createUserProfile_userSettings,
    createUserProfile_singleSignOnUserValue,
    createUserProfile_singleSignOnUserIdentifier,
    createUserProfile_tags,
    createUserProfile_domainId,
    createUserProfile_userProfileName,

    -- * Destructuring the Response
    CreateUserProfileResponse (..),
    newCreateUserProfileResponse,

    -- * Response Lenses
    createUserProfileResponse_userProfileArn,
    createUserProfileResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateUserProfile' smart constructor.
data CreateUserProfile = CreateUserProfile'
  { -- | A collection of settings.
    CreateUserProfile -> Maybe UserSettings
userSettings :: Prelude.Maybe UserSettings,
    -- | The username of the associated Amazon Web Services Single Sign-On User
    -- for this UserProfile. If the Domain\'s AuthMode is SSO, this field is
    -- required, and must match a valid username of a user in your directory.
    -- If the Domain\'s AuthMode is not SSO, this field cannot be specified.
    CreateUserProfile -> Maybe Text
singleSignOnUserValue :: Prelude.Maybe Prelude.Text,
    -- | A specifier for the type of value specified in SingleSignOnUserValue.
    -- Currently, the only supported value is \"UserName\". If the Domain\'s
    -- AuthMode is SSO, this field is required. If the Domain\'s AuthMode is
    -- not SSO, this field cannot be specified.
    CreateUserProfile -> Maybe Text
singleSignOnUserIdentifier :: Prelude.Maybe Prelude.Text,
    -- | Each tag consists of a key and an optional value. Tag keys must be
    -- unique per resource.
    --
    -- Tags that you specify for the User Profile are also added to all Apps
    -- that the User Profile launches.
    CreateUserProfile -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The ID of the associated Domain.
    CreateUserProfile -> Text
domainId :: Prelude.Text,
    -- | A name for the UserProfile. This value is not case sensitive.
    CreateUserProfile -> Text
userProfileName :: Prelude.Text
  }
  deriving (CreateUserProfile -> CreateUserProfile -> Bool
(CreateUserProfile -> CreateUserProfile -> Bool)
-> (CreateUserProfile -> CreateUserProfile -> Bool)
-> Eq CreateUserProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUserProfile -> CreateUserProfile -> Bool
$c/= :: CreateUserProfile -> CreateUserProfile -> Bool
== :: CreateUserProfile -> CreateUserProfile -> Bool
$c== :: CreateUserProfile -> CreateUserProfile -> Bool
Prelude.Eq, ReadPrec [CreateUserProfile]
ReadPrec CreateUserProfile
Int -> ReadS CreateUserProfile
ReadS [CreateUserProfile]
(Int -> ReadS CreateUserProfile)
-> ReadS [CreateUserProfile]
-> ReadPrec CreateUserProfile
-> ReadPrec [CreateUserProfile]
-> Read CreateUserProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUserProfile]
$creadListPrec :: ReadPrec [CreateUserProfile]
readPrec :: ReadPrec CreateUserProfile
$creadPrec :: ReadPrec CreateUserProfile
readList :: ReadS [CreateUserProfile]
$creadList :: ReadS [CreateUserProfile]
readsPrec :: Int -> ReadS CreateUserProfile
$creadsPrec :: Int -> ReadS CreateUserProfile
Prelude.Read, Int -> CreateUserProfile -> ShowS
[CreateUserProfile] -> ShowS
CreateUserProfile -> String
(Int -> CreateUserProfile -> ShowS)
-> (CreateUserProfile -> String)
-> ([CreateUserProfile] -> ShowS)
-> Show CreateUserProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUserProfile] -> ShowS
$cshowList :: [CreateUserProfile] -> ShowS
show :: CreateUserProfile -> String
$cshow :: CreateUserProfile -> String
showsPrec :: Int -> CreateUserProfile -> ShowS
$cshowsPrec :: Int -> CreateUserProfile -> ShowS
Prelude.Show, (forall x. CreateUserProfile -> Rep CreateUserProfile x)
-> (forall x. Rep CreateUserProfile x -> CreateUserProfile)
-> Generic CreateUserProfile
forall x. Rep CreateUserProfile x -> CreateUserProfile
forall x. CreateUserProfile -> Rep CreateUserProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateUserProfile x -> CreateUserProfile
$cfrom :: forall x. CreateUserProfile -> Rep CreateUserProfile x
Prelude.Generic)

-- |
-- Create a value of 'CreateUserProfile' 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:
--
-- 'userSettings', 'createUserProfile_userSettings' - A collection of settings.
--
-- 'singleSignOnUserValue', 'createUserProfile_singleSignOnUserValue' - The username of the associated Amazon Web Services Single Sign-On User
-- for this UserProfile. If the Domain\'s AuthMode is SSO, this field is
-- required, and must match a valid username of a user in your directory.
-- If the Domain\'s AuthMode is not SSO, this field cannot be specified.
--
-- 'singleSignOnUserIdentifier', 'createUserProfile_singleSignOnUserIdentifier' - A specifier for the type of value specified in SingleSignOnUserValue.
-- Currently, the only supported value is \"UserName\". If the Domain\'s
-- AuthMode is SSO, this field is required. If the Domain\'s AuthMode is
-- not SSO, this field cannot be specified.
--
-- 'tags', 'createUserProfile_tags' - Each tag consists of a key and an optional value. Tag keys must be
-- unique per resource.
--
-- Tags that you specify for the User Profile are also added to all Apps
-- that the User Profile launches.
--
-- 'domainId', 'createUserProfile_domainId' - The ID of the associated Domain.
--
-- 'userProfileName', 'createUserProfile_userProfileName' - A name for the UserProfile. This value is not case sensitive.
newCreateUserProfile ::
  -- | 'domainId'
  Prelude.Text ->
  -- | 'userProfileName'
  Prelude.Text ->
  CreateUserProfile
newCreateUserProfile :: Text -> Text -> CreateUserProfile
newCreateUserProfile Text
pDomainId_ Text
pUserProfileName_ =
  CreateUserProfile' :: Maybe UserSettings
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Text
-> CreateUserProfile
CreateUserProfile'
    { $sel:userSettings:CreateUserProfile' :: Maybe UserSettings
userSettings = Maybe UserSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:singleSignOnUserValue:CreateUserProfile' :: Maybe Text
singleSignOnUserValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:singleSignOnUserIdentifier:CreateUserProfile' :: Maybe Text
singleSignOnUserIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateUserProfile' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:domainId:CreateUserProfile' :: Text
domainId = Text
pDomainId_,
      $sel:userProfileName:CreateUserProfile' :: Text
userProfileName = Text
pUserProfileName_
    }

-- | A collection of settings.
createUserProfile_userSettings :: Lens.Lens' CreateUserProfile (Prelude.Maybe UserSettings)
createUserProfile_userSettings :: (Maybe UserSettings -> f (Maybe UserSettings))
-> CreateUserProfile -> f CreateUserProfile
createUserProfile_userSettings = (CreateUserProfile -> Maybe UserSettings)
-> (CreateUserProfile -> Maybe UserSettings -> CreateUserProfile)
-> Lens
     CreateUserProfile
     CreateUserProfile
     (Maybe UserSettings)
     (Maybe UserSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfile' {Maybe UserSettings
userSettings :: Maybe UserSettings
$sel:userSettings:CreateUserProfile' :: CreateUserProfile -> Maybe UserSettings
userSettings} -> Maybe UserSettings
userSettings) (\s :: CreateUserProfile
s@CreateUserProfile' {} Maybe UserSettings
a -> CreateUserProfile
s {$sel:userSettings:CreateUserProfile' :: Maybe UserSettings
userSettings = Maybe UserSettings
a} :: CreateUserProfile)

-- | The username of the associated Amazon Web Services Single Sign-On User
-- for this UserProfile. If the Domain\'s AuthMode is SSO, this field is
-- required, and must match a valid username of a user in your directory.
-- If the Domain\'s AuthMode is not SSO, this field cannot be specified.
createUserProfile_singleSignOnUserValue :: Lens.Lens' CreateUserProfile (Prelude.Maybe Prelude.Text)
createUserProfile_singleSignOnUserValue :: (Maybe Text -> f (Maybe Text))
-> CreateUserProfile -> f CreateUserProfile
createUserProfile_singleSignOnUserValue = (CreateUserProfile -> Maybe Text)
-> (CreateUserProfile -> Maybe Text -> CreateUserProfile)
-> Lens
     CreateUserProfile CreateUserProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfile' {Maybe Text
singleSignOnUserValue :: Maybe Text
$sel:singleSignOnUserValue:CreateUserProfile' :: CreateUserProfile -> Maybe Text
singleSignOnUserValue} -> Maybe Text
singleSignOnUserValue) (\s :: CreateUserProfile
s@CreateUserProfile' {} Maybe Text
a -> CreateUserProfile
s {$sel:singleSignOnUserValue:CreateUserProfile' :: Maybe Text
singleSignOnUserValue = Maybe Text
a} :: CreateUserProfile)

-- | A specifier for the type of value specified in SingleSignOnUserValue.
-- Currently, the only supported value is \"UserName\". If the Domain\'s
-- AuthMode is SSO, this field is required. If the Domain\'s AuthMode is
-- not SSO, this field cannot be specified.
createUserProfile_singleSignOnUserIdentifier :: Lens.Lens' CreateUserProfile (Prelude.Maybe Prelude.Text)
createUserProfile_singleSignOnUserIdentifier :: (Maybe Text -> f (Maybe Text))
-> CreateUserProfile -> f CreateUserProfile
createUserProfile_singleSignOnUserIdentifier = (CreateUserProfile -> Maybe Text)
-> (CreateUserProfile -> Maybe Text -> CreateUserProfile)
-> Lens
     CreateUserProfile CreateUserProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfile' {Maybe Text
singleSignOnUserIdentifier :: Maybe Text
$sel:singleSignOnUserIdentifier:CreateUserProfile' :: CreateUserProfile -> Maybe Text
singleSignOnUserIdentifier} -> Maybe Text
singleSignOnUserIdentifier) (\s :: CreateUserProfile
s@CreateUserProfile' {} Maybe Text
a -> CreateUserProfile
s {$sel:singleSignOnUserIdentifier:CreateUserProfile' :: Maybe Text
singleSignOnUserIdentifier = Maybe Text
a} :: CreateUserProfile)

-- | Each tag consists of a key and an optional value. Tag keys must be
-- unique per resource.
--
-- Tags that you specify for the User Profile are also added to all Apps
-- that the User Profile launches.
createUserProfile_tags :: Lens.Lens' CreateUserProfile (Prelude.Maybe [Tag])
createUserProfile_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateUserProfile -> f CreateUserProfile
createUserProfile_tags = (CreateUserProfile -> Maybe [Tag])
-> (CreateUserProfile -> Maybe [Tag] -> CreateUserProfile)
-> Lens
     CreateUserProfile CreateUserProfile (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfile' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateUserProfile' :: CreateUserProfile -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateUserProfile
s@CreateUserProfile' {} Maybe [Tag]
a -> CreateUserProfile
s {$sel:tags:CreateUserProfile' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateUserProfile) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateUserProfile -> f CreateUserProfile)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateUserProfile
-> f CreateUserProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the associated Domain.
createUserProfile_domainId :: Lens.Lens' CreateUserProfile Prelude.Text
createUserProfile_domainId :: (Text -> f Text) -> CreateUserProfile -> f CreateUserProfile
createUserProfile_domainId = (CreateUserProfile -> Text)
-> (CreateUserProfile -> Text -> CreateUserProfile)
-> Lens CreateUserProfile CreateUserProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfile' {Text
domainId :: Text
$sel:domainId:CreateUserProfile' :: CreateUserProfile -> Text
domainId} -> Text
domainId) (\s :: CreateUserProfile
s@CreateUserProfile' {} Text
a -> CreateUserProfile
s {$sel:domainId:CreateUserProfile' :: Text
domainId = Text
a} :: CreateUserProfile)

-- | A name for the UserProfile. This value is not case sensitive.
createUserProfile_userProfileName :: Lens.Lens' CreateUserProfile Prelude.Text
createUserProfile_userProfileName :: (Text -> f Text) -> CreateUserProfile -> f CreateUserProfile
createUserProfile_userProfileName = (CreateUserProfile -> Text)
-> (CreateUserProfile -> Text -> CreateUserProfile)
-> Lens CreateUserProfile CreateUserProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfile' {Text
userProfileName :: Text
$sel:userProfileName:CreateUserProfile' :: CreateUserProfile -> Text
userProfileName} -> Text
userProfileName) (\s :: CreateUserProfile
s@CreateUserProfile' {} Text
a -> CreateUserProfile
s {$sel:userProfileName:CreateUserProfile' :: Text
userProfileName = Text
a} :: CreateUserProfile)

instance Core.AWSRequest CreateUserProfile where
  type
    AWSResponse CreateUserProfile =
      CreateUserProfileResponse
  request :: CreateUserProfile -> Request CreateUserProfile
request = Service -> CreateUserProfile -> Request CreateUserProfile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateUserProfile
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateUserProfile)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateUserProfile))
-> Logger
-> Service
-> Proxy CreateUserProfile
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateUserProfile)))
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 Text -> Int -> CreateUserProfileResponse
CreateUserProfileResponse'
            (Maybe Text -> Int -> CreateUserProfileResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateUserProfileResponse)
forall (f :: * -> *) a b. Functor 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
"UserProfileArn")
            Either String (Int -> CreateUserProfileResponse)
-> Either String Int -> Either String CreateUserProfileResponse
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))
      )

instance Prelude.Hashable CreateUserProfile

instance Prelude.NFData CreateUserProfile

instance Core.ToHeaders CreateUserProfile where
  toHeaders :: CreateUserProfile -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateUserProfile -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SageMaker.CreateUserProfile" ::
                          Prelude.ByteString
                      ),
            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 CreateUserProfile where
  toJSON :: CreateUserProfile -> Value
toJSON CreateUserProfile' {Maybe [Tag]
Maybe Text
Maybe UserSettings
Text
userProfileName :: Text
domainId :: Text
tags :: Maybe [Tag]
singleSignOnUserIdentifier :: Maybe Text
singleSignOnUserValue :: Maybe Text
userSettings :: Maybe UserSettings
$sel:userProfileName:CreateUserProfile' :: CreateUserProfile -> Text
$sel:domainId:CreateUserProfile' :: CreateUserProfile -> Text
$sel:tags:CreateUserProfile' :: CreateUserProfile -> Maybe [Tag]
$sel:singleSignOnUserIdentifier:CreateUserProfile' :: CreateUserProfile -> Maybe Text
$sel:singleSignOnUserValue:CreateUserProfile' :: CreateUserProfile -> Maybe Text
$sel:userSettings:CreateUserProfile' :: CreateUserProfile -> Maybe UserSettings
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"UserSettings" Text -> UserSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (UserSettings -> Pair) -> Maybe UserSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UserSettings
userSettings,
            (Text
"SingleSignOnUserValue" 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
singleSignOnUserValue,
            (Text
"SingleSignOnUserIdentifier" 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
singleSignOnUserIdentifier,
            (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"UserProfileName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
userProfileName)
          ]
      )

instance Core.ToPath CreateUserProfile where
  toPath :: CreateUserProfile -> ByteString
toPath = ByteString -> CreateUserProfile -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newCreateUserProfileResponse' smart constructor.
data CreateUserProfileResponse = CreateUserProfileResponse'
  { -- | The user profile Amazon Resource Name (ARN).
    CreateUserProfileResponse -> Maybe Text
userProfileArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateUserProfileResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateUserProfileResponse -> CreateUserProfileResponse -> Bool
(CreateUserProfileResponse -> CreateUserProfileResponse -> Bool)
-> (CreateUserProfileResponse -> CreateUserProfileResponse -> Bool)
-> Eq CreateUserProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateUserProfileResponse -> CreateUserProfileResponse -> Bool
$c/= :: CreateUserProfileResponse -> CreateUserProfileResponse -> Bool
== :: CreateUserProfileResponse -> CreateUserProfileResponse -> Bool
$c== :: CreateUserProfileResponse -> CreateUserProfileResponse -> Bool
Prelude.Eq, ReadPrec [CreateUserProfileResponse]
ReadPrec CreateUserProfileResponse
Int -> ReadS CreateUserProfileResponse
ReadS [CreateUserProfileResponse]
(Int -> ReadS CreateUserProfileResponse)
-> ReadS [CreateUserProfileResponse]
-> ReadPrec CreateUserProfileResponse
-> ReadPrec [CreateUserProfileResponse]
-> Read CreateUserProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateUserProfileResponse]
$creadListPrec :: ReadPrec [CreateUserProfileResponse]
readPrec :: ReadPrec CreateUserProfileResponse
$creadPrec :: ReadPrec CreateUserProfileResponse
readList :: ReadS [CreateUserProfileResponse]
$creadList :: ReadS [CreateUserProfileResponse]
readsPrec :: Int -> ReadS CreateUserProfileResponse
$creadsPrec :: Int -> ReadS CreateUserProfileResponse
Prelude.Read, Int -> CreateUserProfileResponse -> ShowS
[CreateUserProfileResponse] -> ShowS
CreateUserProfileResponse -> String
(Int -> CreateUserProfileResponse -> ShowS)
-> (CreateUserProfileResponse -> String)
-> ([CreateUserProfileResponse] -> ShowS)
-> Show CreateUserProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateUserProfileResponse] -> ShowS
$cshowList :: [CreateUserProfileResponse] -> ShowS
show :: CreateUserProfileResponse -> String
$cshow :: CreateUserProfileResponse -> String
showsPrec :: Int -> CreateUserProfileResponse -> ShowS
$cshowsPrec :: Int -> CreateUserProfileResponse -> ShowS
Prelude.Show, (forall x.
 CreateUserProfileResponse -> Rep CreateUserProfileResponse x)
-> (forall x.
    Rep CreateUserProfileResponse x -> CreateUserProfileResponse)
-> Generic CreateUserProfileResponse
forall x.
Rep CreateUserProfileResponse x -> CreateUserProfileResponse
forall x.
CreateUserProfileResponse -> Rep CreateUserProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateUserProfileResponse x -> CreateUserProfileResponse
$cfrom :: forall x.
CreateUserProfileResponse -> Rep CreateUserProfileResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateUserProfileResponse' 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:
--
-- 'userProfileArn', 'createUserProfileResponse_userProfileArn' - The user profile Amazon Resource Name (ARN).
--
-- 'httpStatus', 'createUserProfileResponse_httpStatus' - The response's http status code.
newCreateUserProfileResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateUserProfileResponse
newCreateUserProfileResponse :: Int -> CreateUserProfileResponse
newCreateUserProfileResponse Int
pHttpStatus_ =
  CreateUserProfileResponse' :: Maybe Text -> Int -> CreateUserProfileResponse
CreateUserProfileResponse'
    { $sel:userProfileArn:CreateUserProfileResponse' :: Maybe Text
userProfileArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateUserProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The user profile Amazon Resource Name (ARN).
createUserProfileResponse_userProfileArn :: Lens.Lens' CreateUserProfileResponse (Prelude.Maybe Prelude.Text)
createUserProfileResponse_userProfileArn :: (Maybe Text -> f (Maybe Text))
-> CreateUserProfileResponse -> f CreateUserProfileResponse
createUserProfileResponse_userProfileArn = (CreateUserProfileResponse -> Maybe Text)
-> (CreateUserProfileResponse
    -> Maybe Text -> CreateUserProfileResponse)
-> Lens
     CreateUserProfileResponse
     CreateUserProfileResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateUserProfileResponse' {Maybe Text
userProfileArn :: Maybe Text
$sel:userProfileArn:CreateUserProfileResponse' :: CreateUserProfileResponse -> Maybe Text
userProfileArn} -> Maybe Text
userProfileArn) (\s :: CreateUserProfileResponse
s@CreateUserProfileResponse' {} Maybe Text
a -> CreateUserProfileResponse
s {$sel:userProfileArn:CreateUserProfileResponse' :: Maybe Text
userProfileArn = Maybe Text
a} :: CreateUserProfileResponse)

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

instance Prelude.NFData CreateUserProfileResponse