{-# 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.IoT.CreateBillingGroup
-- 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 billing group.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions CreateBillingGroup>
-- action.
module Amazonka.IoT.CreateBillingGroup
  ( -- * Creating a Request
    CreateBillingGroup (..),
    newCreateBillingGroup,

    -- * Request Lenses
    createBillingGroup_billingGroupProperties,
    createBillingGroup_tags,
    createBillingGroup_billingGroupName,

    -- * Destructuring the Response
    CreateBillingGroupResponse (..),
    newCreateBillingGroupResponse,

    -- * Response Lenses
    createBillingGroupResponse_billingGroupArn,
    createBillingGroupResponse_billingGroupName,
    createBillingGroupResponse_billingGroupId,
    createBillingGroupResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.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:/ 'newCreateBillingGroup' smart constructor.
data CreateBillingGroup = CreateBillingGroup'
  { -- | The properties of the billing group.
    CreateBillingGroup -> Maybe BillingGroupProperties
billingGroupProperties :: Prelude.Maybe BillingGroupProperties,
    -- | Metadata which can be used to manage the billing group.
    CreateBillingGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name you wish to give to the billing group.
    CreateBillingGroup -> Text
billingGroupName :: Prelude.Text
  }
  deriving (CreateBillingGroup -> CreateBillingGroup -> Bool
(CreateBillingGroup -> CreateBillingGroup -> Bool)
-> (CreateBillingGroup -> CreateBillingGroup -> Bool)
-> Eq CreateBillingGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBillingGroup -> CreateBillingGroup -> Bool
$c/= :: CreateBillingGroup -> CreateBillingGroup -> Bool
== :: CreateBillingGroup -> CreateBillingGroup -> Bool
$c== :: CreateBillingGroup -> CreateBillingGroup -> Bool
Prelude.Eq, ReadPrec [CreateBillingGroup]
ReadPrec CreateBillingGroup
Int -> ReadS CreateBillingGroup
ReadS [CreateBillingGroup]
(Int -> ReadS CreateBillingGroup)
-> ReadS [CreateBillingGroup]
-> ReadPrec CreateBillingGroup
-> ReadPrec [CreateBillingGroup]
-> Read CreateBillingGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateBillingGroup]
$creadListPrec :: ReadPrec [CreateBillingGroup]
readPrec :: ReadPrec CreateBillingGroup
$creadPrec :: ReadPrec CreateBillingGroup
readList :: ReadS [CreateBillingGroup]
$creadList :: ReadS [CreateBillingGroup]
readsPrec :: Int -> ReadS CreateBillingGroup
$creadsPrec :: Int -> ReadS CreateBillingGroup
Prelude.Read, Int -> CreateBillingGroup -> ShowS
[CreateBillingGroup] -> ShowS
CreateBillingGroup -> String
(Int -> CreateBillingGroup -> ShowS)
-> (CreateBillingGroup -> String)
-> ([CreateBillingGroup] -> ShowS)
-> Show CreateBillingGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBillingGroup] -> ShowS
$cshowList :: [CreateBillingGroup] -> ShowS
show :: CreateBillingGroup -> String
$cshow :: CreateBillingGroup -> String
showsPrec :: Int -> CreateBillingGroup -> ShowS
$cshowsPrec :: Int -> CreateBillingGroup -> ShowS
Prelude.Show, (forall x. CreateBillingGroup -> Rep CreateBillingGroup x)
-> (forall x. Rep CreateBillingGroup x -> CreateBillingGroup)
-> Generic CreateBillingGroup
forall x. Rep CreateBillingGroup x -> CreateBillingGroup
forall x. CreateBillingGroup -> Rep CreateBillingGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateBillingGroup x -> CreateBillingGroup
$cfrom :: forall x. CreateBillingGroup -> Rep CreateBillingGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateBillingGroup' 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:
--
-- 'billingGroupProperties', 'createBillingGroup_billingGroupProperties' - The properties of the billing group.
--
-- 'tags', 'createBillingGroup_tags' - Metadata which can be used to manage the billing group.
--
-- 'billingGroupName', 'createBillingGroup_billingGroupName' - The name you wish to give to the billing group.
newCreateBillingGroup ::
  -- | 'billingGroupName'
  Prelude.Text ->
  CreateBillingGroup
newCreateBillingGroup :: Text -> CreateBillingGroup
newCreateBillingGroup Text
pBillingGroupName_ =
  CreateBillingGroup' :: Maybe BillingGroupProperties
-> Maybe [Tag] -> Text -> CreateBillingGroup
CreateBillingGroup'
    { $sel:billingGroupProperties:CreateBillingGroup' :: Maybe BillingGroupProperties
billingGroupProperties =
        Maybe BillingGroupProperties
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateBillingGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:billingGroupName:CreateBillingGroup' :: Text
billingGroupName = Text
pBillingGroupName_
    }

-- | The properties of the billing group.
createBillingGroup_billingGroupProperties :: Lens.Lens' CreateBillingGroup (Prelude.Maybe BillingGroupProperties)
createBillingGroup_billingGroupProperties :: (Maybe BillingGroupProperties -> f (Maybe BillingGroupProperties))
-> CreateBillingGroup -> f CreateBillingGroup
createBillingGroup_billingGroupProperties = (CreateBillingGroup -> Maybe BillingGroupProperties)
-> (CreateBillingGroup
    -> Maybe BillingGroupProperties -> CreateBillingGroup)
-> Lens
     CreateBillingGroup
     CreateBillingGroup
     (Maybe BillingGroupProperties)
     (Maybe BillingGroupProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBillingGroup' {Maybe BillingGroupProperties
billingGroupProperties :: Maybe BillingGroupProperties
$sel:billingGroupProperties:CreateBillingGroup' :: CreateBillingGroup -> Maybe BillingGroupProperties
billingGroupProperties} -> Maybe BillingGroupProperties
billingGroupProperties) (\s :: CreateBillingGroup
s@CreateBillingGroup' {} Maybe BillingGroupProperties
a -> CreateBillingGroup
s {$sel:billingGroupProperties:CreateBillingGroup' :: Maybe BillingGroupProperties
billingGroupProperties = Maybe BillingGroupProperties
a} :: CreateBillingGroup)

-- | Metadata which can be used to manage the billing group.
createBillingGroup_tags :: Lens.Lens' CreateBillingGroup (Prelude.Maybe [Tag])
createBillingGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateBillingGroup -> f CreateBillingGroup
createBillingGroup_tags = (CreateBillingGroup -> Maybe [Tag])
-> (CreateBillingGroup -> Maybe [Tag] -> CreateBillingGroup)
-> Lens
     CreateBillingGroup CreateBillingGroup (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBillingGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateBillingGroup' :: CreateBillingGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateBillingGroup
s@CreateBillingGroup' {} Maybe [Tag]
a -> CreateBillingGroup
s {$sel:tags:CreateBillingGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateBillingGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateBillingGroup -> f CreateBillingGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateBillingGroup
-> f CreateBillingGroup
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 name you wish to give to the billing group.
createBillingGroup_billingGroupName :: Lens.Lens' CreateBillingGroup Prelude.Text
createBillingGroup_billingGroupName :: (Text -> f Text) -> CreateBillingGroup -> f CreateBillingGroup
createBillingGroup_billingGroupName = (CreateBillingGroup -> Text)
-> (CreateBillingGroup -> Text -> CreateBillingGroup)
-> Lens CreateBillingGroup CreateBillingGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBillingGroup' {Text
billingGroupName :: Text
$sel:billingGroupName:CreateBillingGroup' :: CreateBillingGroup -> Text
billingGroupName} -> Text
billingGroupName) (\s :: CreateBillingGroup
s@CreateBillingGroup' {} Text
a -> CreateBillingGroup
s {$sel:billingGroupName:CreateBillingGroup' :: Text
billingGroupName = Text
a} :: CreateBillingGroup)

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

instance Prelude.NFData CreateBillingGroup

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

instance Core.ToJSON CreateBillingGroup where
  toJSON :: CreateBillingGroup -> Value
toJSON CreateBillingGroup' {Maybe [Tag]
Maybe BillingGroupProperties
Text
billingGroupName :: Text
tags :: Maybe [Tag]
billingGroupProperties :: Maybe BillingGroupProperties
$sel:billingGroupName:CreateBillingGroup' :: CreateBillingGroup -> Text
$sel:tags:CreateBillingGroup' :: CreateBillingGroup -> Maybe [Tag]
$sel:billingGroupProperties:CreateBillingGroup' :: CreateBillingGroup -> Maybe BillingGroupProperties
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"billingGroupProperties" Text -> BillingGroupProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BillingGroupProperties -> Pair)
-> Maybe BillingGroupProperties -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BillingGroupProperties
billingGroupProperties,
            (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 CreateBillingGroup where
  toPath :: CreateBillingGroup -> ByteString
toPath CreateBillingGroup' {Maybe [Tag]
Maybe BillingGroupProperties
Text
billingGroupName :: Text
tags :: Maybe [Tag]
billingGroupProperties :: Maybe BillingGroupProperties
$sel:billingGroupName:CreateBillingGroup' :: CreateBillingGroup -> Text
$sel:tags:CreateBillingGroup' :: CreateBillingGroup -> Maybe [Tag]
$sel:billingGroupProperties:CreateBillingGroup' :: CreateBillingGroup -> Maybe BillingGroupProperties
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/billing-groups/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
billingGroupName]

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

-- | /See:/ 'newCreateBillingGroupResponse' smart constructor.
data CreateBillingGroupResponse = CreateBillingGroupResponse'
  { -- | The ARN of the billing group.
    CreateBillingGroupResponse -> Maybe Text
billingGroupArn :: Prelude.Maybe Prelude.Text,
    -- | The name you gave to the billing group.
    CreateBillingGroupResponse -> Maybe Text
billingGroupName :: Prelude.Maybe Prelude.Text,
    -- | The ID of the billing group.
    CreateBillingGroupResponse -> Maybe Text
billingGroupId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateBillingGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateBillingGroupResponse -> CreateBillingGroupResponse -> Bool
(CreateBillingGroupResponse -> CreateBillingGroupResponse -> Bool)
-> (CreateBillingGroupResponse
    -> CreateBillingGroupResponse -> Bool)
-> Eq CreateBillingGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBillingGroupResponse -> CreateBillingGroupResponse -> Bool
$c/= :: CreateBillingGroupResponse -> CreateBillingGroupResponse -> Bool
== :: CreateBillingGroupResponse -> CreateBillingGroupResponse -> Bool
$c== :: CreateBillingGroupResponse -> CreateBillingGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateBillingGroupResponse]
ReadPrec CreateBillingGroupResponse
Int -> ReadS CreateBillingGroupResponse
ReadS [CreateBillingGroupResponse]
(Int -> ReadS CreateBillingGroupResponse)
-> ReadS [CreateBillingGroupResponse]
-> ReadPrec CreateBillingGroupResponse
-> ReadPrec [CreateBillingGroupResponse]
-> Read CreateBillingGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateBillingGroupResponse]
$creadListPrec :: ReadPrec [CreateBillingGroupResponse]
readPrec :: ReadPrec CreateBillingGroupResponse
$creadPrec :: ReadPrec CreateBillingGroupResponse
readList :: ReadS [CreateBillingGroupResponse]
$creadList :: ReadS [CreateBillingGroupResponse]
readsPrec :: Int -> ReadS CreateBillingGroupResponse
$creadsPrec :: Int -> ReadS CreateBillingGroupResponse
Prelude.Read, Int -> CreateBillingGroupResponse -> ShowS
[CreateBillingGroupResponse] -> ShowS
CreateBillingGroupResponse -> String
(Int -> CreateBillingGroupResponse -> ShowS)
-> (CreateBillingGroupResponse -> String)
-> ([CreateBillingGroupResponse] -> ShowS)
-> Show CreateBillingGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBillingGroupResponse] -> ShowS
$cshowList :: [CreateBillingGroupResponse] -> ShowS
show :: CreateBillingGroupResponse -> String
$cshow :: CreateBillingGroupResponse -> String
showsPrec :: Int -> CreateBillingGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateBillingGroupResponse -> ShowS
Prelude.Show, (forall x.
 CreateBillingGroupResponse -> Rep CreateBillingGroupResponse x)
-> (forall x.
    Rep CreateBillingGroupResponse x -> CreateBillingGroupResponse)
-> Generic CreateBillingGroupResponse
forall x.
Rep CreateBillingGroupResponse x -> CreateBillingGroupResponse
forall x.
CreateBillingGroupResponse -> Rep CreateBillingGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateBillingGroupResponse x -> CreateBillingGroupResponse
$cfrom :: forall x.
CreateBillingGroupResponse -> Rep CreateBillingGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateBillingGroupResponse' 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:
--
-- 'billingGroupArn', 'createBillingGroupResponse_billingGroupArn' - The ARN of the billing group.
--
-- 'billingGroupName', 'createBillingGroupResponse_billingGroupName' - The name you gave to the billing group.
--
-- 'billingGroupId', 'createBillingGroupResponse_billingGroupId' - The ID of the billing group.
--
-- 'httpStatus', 'createBillingGroupResponse_httpStatus' - The response's http status code.
newCreateBillingGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateBillingGroupResponse
newCreateBillingGroupResponse :: Int -> CreateBillingGroupResponse
newCreateBillingGroupResponse Int
pHttpStatus_ =
  CreateBillingGroupResponse' :: Maybe Text
-> Maybe Text -> Maybe Text -> Int -> CreateBillingGroupResponse
CreateBillingGroupResponse'
    { $sel:billingGroupArn:CreateBillingGroupResponse' :: Maybe Text
billingGroupArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:billingGroupName:CreateBillingGroupResponse' :: Maybe Text
billingGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:billingGroupId:CreateBillingGroupResponse' :: Maybe Text
billingGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateBillingGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the billing group.
createBillingGroupResponse_billingGroupArn :: Lens.Lens' CreateBillingGroupResponse (Prelude.Maybe Prelude.Text)
createBillingGroupResponse_billingGroupArn :: (Maybe Text -> f (Maybe Text))
-> CreateBillingGroupResponse -> f CreateBillingGroupResponse
createBillingGroupResponse_billingGroupArn = (CreateBillingGroupResponse -> Maybe Text)
-> (CreateBillingGroupResponse
    -> Maybe Text -> CreateBillingGroupResponse)
-> Lens
     CreateBillingGroupResponse
     CreateBillingGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBillingGroupResponse' {Maybe Text
billingGroupArn :: Maybe Text
$sel:billingGroupArn:CreateBillingGroupResponse' :: CreateBillingGroupResponse -> Maybe Text
billingGroupArn} -> Maybe Text
billingGroupArn) (\s :: CreateBillingGroupResponse
s@CreateBillingGroupResponse' {} Maybe Text
a -> CreateBillingGroupResponse
s {$sel:billingGroupArn:CreateBillingGroupResponse' :: Maybe Text
billingGroupArn = Maybe Text
a} :: CreateBillingGroupResponse)

-- | The name you gave to the billing group.
createBillingGroupResponse_billingGroupName :: Lens.Lens' CreateBillingGroupResponse (Prelude.Maybe Prelude.Text)
createBillingGroupResponse_billingGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateBillingGroupResponse -> f CreateBillingGroupResponse
createBillingGroupResponse_billingGroupName = (CreateBillingGroupResponse -> Maybe Text)
-> (CreateBillingGroupResponse
    -> Maybe Text -> CreateBillingGroupResponse)
-> Lens
     CreateBillingGroupResponse
     CreateBillingGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBillingGroupResponse' {Maybe Text
billingGroupName :: Maybe Text
$sel:billingGroupName:CreateBillingGroupResponse' :: CreateBillingGroupResponse -> Maybe Text
billingGroupName} -> Maybe Text
billingGroupName) (\s :: CreateBillingGroupResponse
s@CreateBillingGroupResponse' {} Maybe Text
a -> CreateBillingGroupResponse
s {$sel:billingGroupName:CreateBillingGroupResponse' :: Maybe Text
billingGroupName = Maybe Text
a} :: CreateBillingGroupResponse)

-- | The ID of the billing group.
createBillingGroupResponse_billingGroupId :: Lens.Lens' CreateBillingGroupResponse (Prelude.Maybe Prelude.Text)
createBillingGroupResponse_billingGroupId :: (Maybe Text -> f (Maybe Text))
-> CreateBillingGroupResponse -> f CreateBillingGroupResponse
createBillingGroupResponse_billingGroupId = (CreateBillingGroupResponse -> Maybe Text)
-> (CreateBillingGroupResponse
    -> Maybe Text -> CreateBillingGroupResponse)
-> Lens
     CreateBillingGroupResponse
     CreateBillingGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBillingGroupResponse' {Maybe Text
billingGroupId :: Maybe Text
$sel:billingGroupId:CreateBillingGroupResponse' :: CreateBillingGroupResponse -> Maybe Text
billingGroupId} -> Maybe Text
billingGroupId) (\s :: CreateBillingGroupResponse
s@CreateBillingGroupResponse' {} Maybe Text
a -> CreateBillingGroupResponse
s {$sel:billingGroupId:CreateBillingGroupResponse' :: Maybe Text
billingGroupId = Maybe Text
a} :: CreateBillingGroupResponse)

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

instance Prelude.NFData CreateBillingGroupResponse