{-# 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.IoTWireless.CreateServiceProfile
-- 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 new service profile.
module Amazonka.IoTWireless.CreateServiceProfile
  ( -- * Creating a Request
    CreateServiceProfile (..),
    newCreateServiceProfile,

    -- * Request Lenses
    createServiceProfile_loRaWAN,
    createServiceProfile_name,
    createServiceProfile_clientRequestToken,
    createServiceProfile_tags,

    -- * Destructuring the Response
    CreateServiceProfileResponse (..),
    newCreateServiceProfileResponse,

    -- * Response Lenses
    createServiceProfileResponse_arn,
    createServiceProfileResponse_id,
    createServiceProfileResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoTWireless.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:/ 'newCreateServiceProfile' smart constructor.
data CreateServiceProfile = CreateServiceProfile'
  { -- | The service profile information to use to create the service profile.
    CreateServiceProfile -> Maybe LoRaWANServiceProfile
loRaWAN :: Prelude.Maybe LoRaWANServiceProfile,
    -- | The name of the new resource.
    CreateServiceProfile -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Each resource must have a unique client request token. If you try to
    -- create a new resource with the same token as a resource that already
    -- exists, an exception occurs. If you omit this value, AWS SDKs will
    -- automatically generate a unique client request.
    CreateServiceProfile -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The tags to attach to the new service profile. Tags are metadata that
    -- you can use to manage a resource.
    CreateServiceProfile -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (CreateServiceProfile -> CreateServiceProfile -> Bool
(CreateServiceProfile -> CreateServiceProfile -> Bool)
-> (CreateServiceProfile -> CreateServiceProfile -> Bool)
-> Eq CreateServiceProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateServiceProfile -> CreateServiceProfile -> Bool
$c/= :: CreateServiceProfile -> CreateServiceProfile -> Bool
== :: CreateServiceProfile -> CreateServiceProfile -> Bool
$c== :: CreateServiceProfile -> CreateServiceProfile -> Bool
Prelude.Eq, ReadPrec [CreateServiceProfile]
ReadPrec CreateServiceProfile
Int -> ReadS CreateServiceProfile
ReadS [CreateServiceProfile]
(Int -> ReadS CreateServiceProfile)
-> ReadS [CreateServiceProfile]
-> ReadPrec CreateServiceProfile
-> ReadPrec [CreateServiceProfile]
-> Read CreateServiceProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateServiceProfile]
$creadListPrec :: ReadPrec [CreateServiceProfile]
readPrec :: ReadPrec CreateServiceProfile
$creadPrec :: ReadPrec CreateServiceProfile
readList :: ReadS [CreateServiceProfile]
$creadList :: ReadS [CreateServiceProfile]
readsPrec :: Int -> ReadS CreateServiceProfile
$creadsPrec :: Int -> ReadS CreateServiceProfile
Prelude.Read, Int -> CreateServiceProfile -> ShowS
[CreateServiceProfile] -> ShowS
CreateServiceProfile -> String
(Int -> CreateServiceProfile -> ShowS)
-> (CreateServiceProfile -> String)
-> ([CreateServiceProfile] -> ShowS)
-> Show CreateServiceProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateServiceProfile] -> ShowS
$cshowList :: [CreateServiceProfile] -> ShowS
show :: CreateServiceProfile -> String
$cshow :: CreateServiceProfile -> String
showsPrec :: Int -> CreateServiceProfile -> ShowS
$cshowsPrec :: Int -> CreateServiceProfile -> ShowS
Prelude.Show, (forall x. CreateServiceProfile -> Rep CreateServiceProfile x)
-> (forall x. Rep CreateServiceProfile x -> CreateServiceProfile)
-> Generic CreateServiceProfile
forall x. Rep CreateServiceProfile x -> CreateServiceProfile
forall x. CreateServiceProfile -> Rep CreateServiceProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateServiceProfile x -> CreateServiceProfile
$cfrom :: forall x. CreateServiceProfile -> Rep CreateServiceProfile x
Prelude.Generic)

-- |
-- Create a value of 'CreateServiceProfile' 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:
--
-- 'loRaWAN', 'createServiceProfile_loRaWAN' - The service profile information to use to create the service profile.
--
-- 'name', 'createServiceProfile_name' - The name of the new resource.
--
-- 'clientRequestToken', 'createServiceProfile_clientRequestToken' - Each resource must have a unique client request token. If you try to
-- create a new resource with the same token as a resource that already
-- exists, an exception occurs. If you omit this value, AWS SDKs will
-- automatically generate a unique client request.
--
-- 'tags', 'createServiceProfile_tags' - The tags to attach to the new service profile. Tags are metadata that
-- you can use to manage a resource.
newCreateServiceProfile ::
  CreateServiceProfile
newCreateServiceProfile :: CreateServiceProfile
newCreateServiceProfile =
  CreateServiceProfile' :: Maybe LoRaWANServiceProfile
-> Maybe Text -> Maybe Text -> Maybe [Tag] -> CreateServiceProfile
CreateServiceProfile'
    { $sel:loRaWAN:CreateServiceProfile' :: Maybe LoRaWANServiceProfile
loRaWAN = Maybe LoRaWANServiceProfile
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateServiceProfile' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:CreateServiceProfile' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateServiceProfile' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
    }

-- | The service profile information to use to create the service profile.
createServiceProfile_loRaWAN :: Lens.Lens' CreateServiceProfile (Prelude.Maybe LoRaWANServiceProfile)
createServiceProfile_loRaWAN :: (Maybe LoRaWANServiceProfile -> f (Maybe LoRaWANServiceProfile))
-> CreateServiceProfile -> f CreateServiceProfile
createServiceProfile_loRaWAN = (CreateServiceProfile -> Maybe LoRaWANServiceProfile)
-> (CreateServiceProfile
    -> Maybe LoRaWANServiceProfile -> CreateServiceProfile)
-> Lens
     CreateServiceProfile
     CreateServiceProfile
     (Maybe LoRaWANServiceProfile)
     (Maybe LoRaWANServiceProfile)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServiceProfile' {Maybe LoRaWANServiceProfile
loRaWAN :: Maybe LoRaWANServiceProfile
$sel:loRaWAN:CreateServiceProfile' :: CreateServiceProfile -> Maybe LoRaWANServiceProfile
loRaWAN} -> Maybe LoRaWANServiceProfile
loRaWAN) (\s :: CreateServiceProfile
s@CreateServiceProfile' {} Maybe LoRaWANServiceProfile
a -> CreateServiceProfile
s {$sel:loRaWAN:CreateServiceProfile' :: Maybe LoRaWANServiceProfile
loRaWAN = Maybe LoRaWANServiceProfile
a} :: CreateServiceProfile)

-- | The name of the new resource.
createServiceProfile_name :: Lens.Lens' CreateServiceProfile (Prelude.Maybe Prelude.Text)
createServiceProfile_name :: (Maybe Text -> f (Maybe Text))
-> CreateServiceProfile -> f CreateServiceProfile
createServiceProfile_name = (CreateServiceProfile -> Maybe Text)
-> (CreateServiceProfile -> Maybe Text -> CreateServiceProfile)
-> Lens
     CreateServiceProfile CreateServiceProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServiceProfile' {Maybe Text
name :: Maybe Text
$sel:name:CreateServiceProfile' :: CreateServiceProfile -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateServiceProfile
s@CreateServiceProfile' {} Maybe Text
a -> CreateServiceProfile
s {$sel:name:CreateServiceProfile' :: Maybe Text
name = Maybe Text
a} :: CreateServiceProfile)

-- | Each resource must have a unique client request token. If you try to
-- create a new resource with the same token as a resource that already
-- exists, an exception occurs. If you omit this value, AWS SDKs will
-- automatically generate a unique client request.
createServiceProfile_clientRequestToken :: Lens.Lens' CreateServiceProfile (Prelude.Maybe Prelude.Text)
createServiceProfile_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> CreateServiceProfile -> f CreateServiceProfile
createServiceProfile_clientRequestToken = (CreateServiceProfile -> Maybe Text)
-> (CreateServiceProfile -> Maybe Text -> CreateServiceProfile)
-> Lens
     CreateServiceProfile CreateServiceProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServiceProfile' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateServiceProfile' :: CreateServiceProfile -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateServiceProfile
s@CreateServiceProfile' {} Maybe Text
a -> CreateServiceProfile
s {$sel:clientRequestToken:CreateServiceProfile' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateServiceProfile)

-- | The tags to attach to the new service profile. Tags are metadata that
-- you can use to manage a resource.
createServiceProfile_tags :: Lens.Lens' CreateServiceProfile (Prelude.Maybe [Tag])
createServiceProfile_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateServiceProfile -> f CreateServiceProfile
createServiceProfile_tags = (CreateServiceProfile -> Maybe [Tag])
-> (CreateServiceProfile -> Maybe [Tag] -> CreateServiceProfile)
-> Lens
     CreateServiceProfile
     CreateServiceProfile
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServiceProfile' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateServiceProfile' :: CreateServiceProfile -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateServiceProfile
s@CreateServiceProfile' {} Maybe [Tag]
a -> CreateServiceProfile
s {$sel:tags:CreateServiceProfile' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateServiceProfile) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateServiceProfile -> f CreateServiceProfile)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateServiceProfile
-> f CreateServiceProfile
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

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

instance Prelude.NFData CreateServiceProfile

instance Core.ToHeaders CreateServiceProfile where
  toHeaders :: CreateServiceProfile -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateServiceProfile -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON CreateServiceProfile where
  toJSON :: CreateServiceProfile -> Value
toJSON CreateServiceProfile' {Maybe [Tag]
Maybe Text
Maybe LoRaWANServiceProfile
tags :: Maybe [Tag]
clientRequestToken :: Maybe Text
name :: Maybe Text
loRaWAN :: Maybe LoRaWANServiceProfile
$sel:tags:CreateServiceProfile' :: CreateServiceProfile -> Maybe [Tag]
$sel:clientRequestToken:CreateServiceProfile' :: CreateServiceProfile -> Maybe Text
$sel:name:CreateServiceProfile' :: CreateServiceProfile -> Maybe Text
$sel:loRaWAN:CreateServiceProfile' :: CreateServiceProfile -> Maybe LoRaWANServiceProfile
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"LoRaWAN" Text -> LoRaWANServiceProfile -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LoRaWANServiceProfile -> Pair)
-> Maybe LoRaWANServiceProfile -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoRaWANServiceProfile
loRaWAN,
            (Text
"Name" 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
name,
            (Text
"ClientRequestToken" 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
clientRequestToken,
            (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
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateServiceProfileResponse' 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:
--
-- 'arn', 'createServiceProfileResponse_arn' - The Amazon Resource Name of the new resource.
--
-- 'id', 'createServiceProfileResponse_id' - The ID of the new service profile.
--
-- 'httpStatus', 'createServiceProfileResponse_httpStatus' - The response's http status code.
newCreateServiceProfileResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateServiceProfileResponse
newCreateServiceProfileResponse :: Int -> CreateServiceProfileResponse
newCreateServiceProfileResponse Int
pHttpStatus_ =
  CreateServiceProfileResponse' :: Maybe Text -> Maybe Text -> Int -> CreateServiceProfileResponse
CreateServiceProfileResponse'
    { $sel:arn:CreateServiceProfileResponse' :: Maybe Text
arn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:CreateServiceProfileResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateServiceProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name of the new resource.
createServiceProfileResponse_arn :: Lens.Lens' CreateServiceProfileResponse (Prelude.Maybe Prelude.Text)
createServiceProfileResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateServiceProfileResponse -> f CreateServiceProfileResponse
createServiceProfileResponse_arn = (CreateServiceProfileResponse -> Maybe Text)
-> (CreateServiceProfileResponse
    -> Maybe Text -> CreateServiceProfileResponse)
-> Lens
     CreateServiceProfileResponse
     CreateServiceProfileResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServiceProfileResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateServiceProfileResponse' :: CreateServiceProfileResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateServiceProfileResponse
s@CreateServiceProfileResponse' {} Maybe Text
a -> CreateServiceProfileResponse
s {$sel:arn:CreateServiceProfileResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateServiceProfileResponse)

-- | The ID of the new service profile.
createServiceProfileResponse_id :: Lens.Lens' CreateServiceProfileResponse (Prelude.Maybe Prelude.Text)
createServiceProfileResponse_id :: (Maybe Text -> f (Maybe Text))
-> CreateServiceProfileResponse -> f CreateServiceProfileResponse
createServiceProfileResponse_id = (CreateServiceProfileResponse -> Maybe Text)
-> (CreateServiceProfileResponse
    -> Maybe Text -> CreateServiceProfileResponse)
-> Lens
     CreateServiceProfileResponse
     CreateServiceProfileResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateServiceProfileResponse' {Maybe Text
id :: Maybe Text
$sel:id:CreateServiceProfileResponse' :: CreateServiceProfileResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: CreateServiceProfileResponse
s@CreateServiceProfileResponse' {} Maybe Text
a -> CreateServiceProfileResponse
s {$sel:id:CreateServiceProfileResponse' :: Maybe Text
id = Maybe Text
a} :: CreateServiceProfileResponse)

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

instance Prelude.NFData CreateServiceProfileResponse