{-# 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.MediaPackageVOD.CreatePackagingGroup
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new MediaPackage VOD PackagingGroup resource.
module Amazonka.MediaPackageVOD.CreatePackagingGroup
  ( -- * Creating a Request
    CreatePackagingGroup (..),
    newCreatePackagingGroup,

    -- * Request Lenses
    createPackagingGroup_authorization,
    createPackagingGroup_egressAccessLogs,
    createPackagingGroup_tags,
    createPackagingGroup_id,

    -- * Destructuring the Response
    CreatePackagingGroupResponse (..),
    newCreatePackagingGroupResponse,

    -- * Response Lenses
    createPackagingGroupResponse_arn,
    createPackagingGroupResponse_authorization,
    createPackagingGroupResponse_domainName,
    createPackagingGroupResponse_egressAccessLogs,
    createPackagingGroupResponse_id,
    createPackagingGroupResponse_tags,
    createPackagingGroupResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaPackageVOD.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | A new MediaPackage VOD PackagingGroup resource configuration.
--
-- /See:/ 'newCreatePackagingGroup' smart constructor.
data CreatePackagingGroup = CreatePackagingGroup'
  { CreatePackagingGroup -> Maybe Authorization
authorization :: Prelude.Maybe Authorization,
    CreatePackagingGroup -> Maybe EgressAccessLogs
egressAccessLogs :: Prelude.Maybe EgressAccessLogs,
    CreatePackagingGroup -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The ID of the PackagingGroup.
    CreatePackagingGroup -> Text
id :: Prelude.Text
  }
  deriving (CreatePackagingGroup -> CreatePackagingGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePackagingGroup -> CreatePackagingGroup -> Bool
$c/= :: CreatePackagingGroup -> CreatePackagingGroup -> Bool
== :: CreatePackagingGroup -> CreatePackagingGroup -> Bool
$c== :: CreatePackagingGroup -> CreatePackagingGroup -> Bool
Prelude.Eq, ReadPrec [CreatePackagingGroup]
ReadPrec CreatePackagingGroup
Int -> ReadS CreatePackagingGroup
ReadS [CreatePackagingGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePackagingGroup]
$creadListPrec :: ReadPrec [CreatePackagingGroup]
readPrec :: ReadPrec CreatePackagingGroup
$creadPrec :: ReadPrec CreatePackagingGroup
readList :: ReadS [CreatePackagingGroup]
$creadList :: ReadS [CreatePackagingGroup]
readsPrec :: Int -> ReadS CreatePackagingGroup
$creadsPrec :: Int -> ReadS CreatePackagingGroup
Prelude.Read, Int -> CreatePackagingGroup -> ShowS
[CreatePackagingGroup] -> ShowS
CreatePackagingGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePackagingGroup] -> ShowS
$cshowList :: [CreatePackagingGroup] -> ShowS
show :: CreatePackagingGroup -> String
$cshow :: CreatePackagingGroup -> String
showsPrec :: Int -> CreatePackagingGroup -> ShowS
$cshowsPrec :: Int -> CreatePackagingGroup -> ShowS
Prelude.Show, forall x. Rep CreatePackagingGroup x -> CreatePackagingGroup
forall x. CreatePackagingGroup -> Rep CreatePackagingGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreatePackagingGroup x -> CreatePackagingGroup
$cfrom :: forall x. CreatePackagingGroup -> Rep CreatePackagingGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreatePackagingGroup' 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:
--
-- 'authorization', 'createPackagingGroup_authorization' - Undocumented member.
--
-- 'egressAccessLogs', 'createPackagingGroup_egressAccessLogs' - Undocumented member.
--
-- 'tags', 'createPackagingGroup_tags' - Undocumented member.
--
-- 'id', 'createPackagingGroup_id' - The ID of the PackagingGroup.
newCreatePackagingGroup ::
  -- | 'id'
  Prelude.Text ->
  CreatePackagingGroup
newCreatePackagingGroup :: Text -> CreatePackagingGroup
newCreatePackagingGroup Text
pId_ =
  CreatePackagingGroup'
    { $sel:authorization:CreatePackagingGroup' :: Maybe Authorization
authorization =
        forall a. Maybe a
Prelude.Nothing,
      $sel:egressAccessLogs:CreatePackagingGroup' :: Maybe EgressAccessLogs
egressAccessLogs = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreatePackagingGroup' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:id:CreatePackagingGroup' :: Text
id = Text
pId_
    }

-- | Undocumented member.
createPackagingGroup_authorization :: Lens.Lens' CreatePackagingGroup (Prelude.Maybe Authorization)
createPackagingGroup_authorization :: Lens' CreatePackagingGroup (Maybe Authorization)
createPackagingGroup_authorization = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePackagingGroup' {Maybe Authorization
authorization :: Maybe Authorization
$sel:authorization:CreatePackagingGroup' :: CreatePackagingGroup -> Maybe Authorization
authorization} -> Maybe Authorization
authorization) (\s :: CreatePackagingGroup
s@CreatePackagingGroup' {} Maybe Authorization
a -> CreatePackagingGroup
s {$sel:authorization:CreatePackagingGroup' :: Maybe Authorization
authorization = Maybe Authorization
a} :: CreatePackagingGroup)

-- | Undocumented member.
createPackagingGroup_egressAccessLogs :: Lens.Lens' CreatePackagingGroup (Prelude.Maybe EgressAccessLogs)
createPackagingGroup_egressAccessLogs :: Lens' CreatePackagingGroup (Maybe EgressAccessLogs)
createPackagingGroup_egressAccessLogs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePackagingGroup' {Maybe EgressAccessLogs
egressAccessLogs :: Maybe EgressAccessLogs
$sel:egressAccessLogs:CreatePackagingGroup' :: CreatePackagingGroup -> Maybe EgressAccessLogs
egressAccessLogs} -> Maybe EgressAccessLogs
egressAccessLogs) (\s :: CreatePackagingGroup
s@CreatePackagingGroup' {} Maybe EgressAccessLogs
a -> CreatePackagingGroup
s {$sel:egressAccessLogs:CreatePackagingGroup' :: Maybe EgressAccessLogs
egressAccessLogs = Maybe EgressAccessLogs
a} :: CreatePackagingGroup)

-- | Undocumented member.
createPackagingGroup_tags :: Lens.Lens' CreatePackagingGroup (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createPackagingGroup_tags :: Lens' CreatePackagingGroup (Maybe (HashMap Text Text))
createPackagingGroup_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePackagingGroup' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreatePackagingGroup' :: CreatePackagingGroup -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreatePackagingGroup
s@CreatePackagingGroup' {} Maybe (HashMap Text Text)
a -> CreatePackagingGroup
s {$sel:tags:CreatePackagingGroup' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreatePackagingGroup) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the PackagingGroup.
createPackagingGroup_id :: Lens.Lens' CreatePackagingGroup Prelude.Text
createPackagingGroup_id :: Lens' CreatePackagingGroup Text
createPackagingGroup_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePackagingGroup' {Text
id :: Text
$sel:id:CreatePackagingGroup' :: CreatePackagingGroup -> Text
id} -> Text
id) (\s :: CreatePackagingGroup
s@CreatePackagingGroup' {} Text
a -> CreatePackagingGroup
s {$sel:id:CreatePackagingGroup' :: Text
id = Text
a} :: CreatePackagingGroup)

instance Core.AWSRequest CreatePackagingGroup where
  type
    AWSResponse CreatePackagingGroup =
      CreatePackagingGroupResponse
  request :: (Service -> Service)
-> CreatePackagingGroup -> Request CreatePackagingGroup
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreatePackagingGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreatePackagingGroup)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Authorization
-> Maybe Text
-> Maybe EgressAccessLogs
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreatePackagingGroupResponse
CreatePackagingGroupResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"authorization")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"domainName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"egressAccessLogs")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreatePackagingGroup where
  hashWithSalt :: Int -> CreatePackagingGroup -> Int
hashWithSalt Int
_salt CreatePackagingGroup' {Maybe (HashMap Text Text)
Maybe Authorization
Maybe EgressAccessLogs
Text
id :: Text
tags :: Maybe (HashMap Text Text)
egressAccessLogs :: Maybe EgressAccessLogs
authorization :: Maybe Authorization
$sel:id:CreatePackagingGroup' :: CreatePackagingGroup -> Text
$sel:tags:CreatePackagingGroup' :: CreatePackagingGroup -> Maybe (HashMap Text Text)
$sel:egressAccessLogs:CreatePackagingGroup' :: CreatePackagingGroup -> Maybe EgressAccessLogs
$sel:authorization:CreatePackagingGroup' :: CreatePackagingGroup -> Maybe Authorization
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Authorization
authorization
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EgressAccessLogs
egressAccessLogs
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id

instance Prelude.NFData CreatePackagingGroup where
  rnf :: CreatePackagingGroup -> ()
rnf CreatePackagingGroup' {Maybe (HashMap Text Text)
Maybe Authorization
Maybe EgressAccessLogs
Text
id :: Text
tags :: Maybe (HashMap Text Text)
egressAccessLogs :: Maybe EgressAccessLogs
authorization :: Maybe Authorization
$sel:id:CreatePackagingGroup' :: CreatePackagingGroup -> Text
$sel:tags:CreatePackagingGroup' :: CreatePackagingGroup -> Maybe (HashMap Text Text)
$sel:egressAccessLogs:CreatePackagingGroup' :: CreatePackagingGroup -> Maybe EgressAccessLogs
$sel:authorization:CreatePackagingGroup' :: CreatePackagingGroup -> Maybe Authorization
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Authorization
authorization
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EgressAccessLogs
egressAccessLogs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id

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

instance Data.ToJSON CreatePackagingGroup where
  toJSON :: CreatePackagingGroup -> Value
toJSON CreatePackagingGroup' {Maybe (HashMap Text Text)
Maybe Authorization
Maybe EgressAccessLogs
Text
id :: Text
tags :: Maybe (HashMap Text Text)
egressAccessLogs :: Maybe EgressAccessLogs
authorization :: Maybe Authorization
$sel:id:CreatePackagingGroup' :: CreatePackagingGroup -> Text
$sel:tags:CreatePackagingGroup' :: CreatePackagingGroup -> Maybe (HashMap Text Text)
$sel:egressAccessLogs:CreatePackagingGroup' :: CreatePackagingGroup -> Maybe EgressAccessLogs
$sel:authorization:CreatePackagingGroup' :: CreatePackagingGroup -> Maybe Authorization
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"authorization" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Authorization
authorization,
            (Key
"egressAccessLogs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EgressAccessLogs
egressAccessLogs,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"id" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
id)
          ]
      )

instance Data.ToPath CreatePackagingGroup where
  toPath :: CreatePackagingGroup -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/packaging_groups"

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

-- | /See:/ 'newCreatePackagingGroupResponse' smart constructor.
data CreatePackagingGroupResponse = CreatePackagingGroupResponse'
  { -- | The ARN of the PackagingGroup.
    CreatePackagingGroupResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    CreatePackagingGroupResponse -> Maybe Authorization
authorization :: Prelude.Maybe Authorization,
    -- | The fully qualified domain name for Assets in the PackagingGroup.
    CreatePackagingGroupResponse -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
    CreatePackagingGroupResponse -> Maybe EgressAccessLogs
egressAccessLogs :: Prelude.Maybe EgressAccessLogs,
    -- | The ID of the PackagingGroup.
    CreatePackagingGroupResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    CreatePackagingGroupResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreatePackagingGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreatePackagingGroupResponse
-> CreatePackagingGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePackagingGroupResponse
-> CreatePackagingGroupResponse -> Bool
$c/= :: CreatePackagingGroupResponse
-> CreatePackagingGroupResponse -> Bool
== :: CreatePackagingGroupResponse
-> CreatePackagingGroupResponse -> Bool
$c== :: CreatePackagingGroupResponse
-> CreatePackagingGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreatePackagingGroupResponse]
ReadPrec CreatePackagingGroupResponse
Int -> ReadS CreatePackagingGroupResponse
ReadS [CreatePackagingGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePackagingGroupResponse]
$creadListPrec :: ReadPrec [CreatePackagingGroupResponse]
readPrec :: ReadPrec CreatePackagingGroupResponse
$creadPrec :: ReadPrec CreatePackagingGroupResponse
readList :: ReadS [CreatePackagingGroupResponse]
$creadList :: ReadS [CreatePackagingGroupResponse]
readsPrec :: Int -> ReadS CreatePackagingGroupResponse
$creadsPrec :: Int -> ReadS CreatePackagingGroupResponse
Prelude.Read, Int -> CreatePackagingGroupResponse -> ShowS
[CreatePackagingGroupResponse] -> ShowS
CreatePackagingGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePackagingGroupResponse] -> ShowS
$cshowList :: [CreatePackagingGroupResponse] -> ShowS
show :: CreatePackagingGroupResponse -> String
$cshow :: CreatePackagingGroupResponse -> String
showsPrec :: Int -> CreatePackagingGroupResponse -> ShowS
$cshowsPrec :: Int -> CreatePackagingGroupResponse -> ShowS
Prelude.Show, forall x.
Rep CreatePackagingGroupResponse x -> CreatePackagingGroupResponse
forall x.
CreatePackagingGroupResponse -> Rep CreatePackagingGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreatePackagingGroupResponse x -> CreatePackagingGroupResponse
$cfrom :: forall x.
CreatePackagingGroupResponse -> Rep CreatePackagingGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreatePackagingGroupResponse' 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', 'createPackagingGroupResponse_arn' - The ARN of the PackagingGroup.
--
-- 'authorization', 'createPackagingGroupResponse_authorization' - Undocumented member.
--
-- 'domainName', 'createPackagingGroupResponse_domainName' - The fully qualified domain name for Assets in the PackagingGroup.
--
-- 'egressAccessLogs', 'createPackagingGroupResponse_egressAccessLogs' - Undocumented member.
--
-- 'id', 'createPackagingGroupResponse_id' - The ID of the PackagingGroup.
--
-- 'tags', 'createPackagingGroupResponse_tags' - Undocumented member.
--
-- 'httpStatus', 'createPackagingGroupResponse_httpStatus' - The response's http status code.
newCreatePackagingGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreatePackagingGroupResponse
newCreatePackagingGroupResponse :: Int -> CreatePackagingGroupResponse
newCreatePackagingGroupResponse Int
pHttpStatus_ =
  CreatePackagingGroupResponse'
    { $sel:arn:CreatePackagingGroupResponse' :: Maybe Text
arn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:authorization:CreatePackagingGroupResponse' :: Maybe Authorization
authorization = forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:CreatePackagingGroupResponse' :: Maybe Text
domainName = forall a. Maybe a
Prelude.Nothing,
      $sel:egressAccessLogs:CreatePackagingGroupResponse' :: Maybe EgressAccessLogs
egressAccessLogs = forall a. Maybe a
Prelude.Nothing,
      $sel:id:CreatePackagingGroupResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreatePackagingGroupResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreatePackagingGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the PackagingGroup.
createPackagingGroupResponse_arn :: Lens.Lens' CreatePackagingGroupResponse (Prelude.Maybe Prelude.Text)
createPackagingGroupResponse_arn :: Lens' CreatePackagingGroupResponse (Maybe Text)
createPackagingGroupResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePackagingGroupResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreatePackagingGroupResponse
s@CreatePackagingGroupResponse' {} Maybe Text
a -> CreatePackagingGroupResponse
s {$sel:arn:CreatePackagingGroupResponse' :: Maybe Text
arn = Maybe Text
a} :: CreatePackagingGroupResponse)

-- | Undocumented member.
createPackagingGroupResponse_authorization :: Lens.Lens' CreatePackagingGroupResponse (Prelude.Maybe Authorization)
createPackagingGroupResponse_authorization :: Lens' CreatePackagingGroupResponse (Maybe Authorization)
createPackagingGroupResponse_authorization = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePackagingGroupResponse' {Maybe Authorization
authorization :: Maybe Authorization
$sel:authorization:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Maybe Authorization
authorization} -> Maybe Authorization
authorization) (\s :: CreatePackagingGroupResponse
s@CreatePackagingGroupResponse' {} Maybe Authorization
a -> CreatePackagingGroupResponse
s {$sel:authorization:CreatePackagingGroupResponse' :: Maybe Authorization
authorization = Maybe Authorization
a} :: CreatePackagingGroupResponse)

-- | The fully qualified domain name for Assets in the PackagingGroup.
createPackagingGroupResponse_domainName :: Lens.Lens' CreatePackagingGroupResponse (Prelude.Maybe Prelude.Text)
createPackagingGroupResponse_domainName :: Lens' CreatePackagingGroupResponse (Maybe Text)
createPackagingGroupResponse_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePackagingGroupResponse' {Maybe Text
domainName :: Maybe Text
$sel:domainName:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: CreatePackagingGroupResponse
s@CreatePackagingGroupResponse' {} Maybe Text
a -> CreatePackagingGroupResponse
s {$sel:domainName:CreatePackagingGroupResponse' :: Maybe Text
domainName = Maybe Text
a} :: CreatePackagingGroupResponse)

-- | Undocumented member.
createPackagingGroupResponse_egressAccessLogs :: Lens.Lens' CreatePackagingGroupResponse (Prelude.Maybe EgressAccessLogs)
createPackagingGroupResponse_egressAccessLogs :: Lens' CreatePackagingGroupResponse (Maybe EgressAccessLogs)
createPackagingGroupResponse_egressAccessLogs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePackagingGroupResponse' {Maybe EgressAccessLogs
egressAccessLogs :: Maybe EgressAccessLogs
$sel:egressAccessLogs:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Maybe EgressAccessLogs
egressAccessLogs} -> Maybe EgressAccessLogs
egressAccessLogs) (\s :: CreatePackagingGroupResponse
s@CreatePackagingGroupResponse' {} Maybe EgressAccessLogs
a -> CreatePackagingGroupResponse
s {$sel:egressAccessLogs:CreatePackagingGroupResponse' :: Maybe EgressAccessLogs
egressAccessLogs = Maybe EgressAccessLogs
a} :: CreatePackagingGroupResponse)

-- | The ID of the PackagingGroup.
createPackagingGroupResponse_id :: Lens.Lens' CreatePackagingGroupResponse (Prelude.Maybe Prelude.Text)
createPackagingGroupResponse_id :: Lens' CreatePackagingGroupResponse (Maybe Text)
createPackagingGroupResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePackagingGroupResponse' {Maybe Text
id :: Maybe Text
$sel:id:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: CreatePackagingGroupResponse
s@CreatePackagingGroupResponse' {} Maybe Text
a -> CreatePackagingGroupResponse
s {$sel:id:CreatePackagingGroupResponse' :: Maybe Text
id = Maybe Text
a} :: CreatePackagingGroupResponse)

-- | Undocumented member.
createPackagingGroupResponse_tags :: Lens.Lens' CreatePackagingGroupResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createPackagingGroupResponse_tags :: Lens' CreatePackagingGroupResponse (Maybe (HashMap Text Text))
createPackagingGroupResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePackagingGroupResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreatePackagingGroupResponse
s@CreatePackagingGroupResponse' {} Maybe (HashMap Text Text)
a -> CreatePackagingGroupResponse
s {$sel:tags:CreatePackagingGroupResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreatePackagingGroupResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData CreatePackagingGroupResponse where
  rnf :: CreatePackagingGroupResponse -> ()
rnf CreatePackagingGroupResponse' {Int
Maybe Text
Maybe (HashMap Text Text)
Maybe Authorization
Maybe EgressAccessLogs
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
id :: Maybe Text
egressAccessLogs :: Maybe EgressAccessLogs
domainName :: Maybe Text
authorization :: Maybe Authorization
arn :: Maybe Text
$sel:httpStatus:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Int
$sel:tags:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Maybe (HashMap Text Text)
$sel:id:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Maybe Text
$sel:egressAccessLogs:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Maybe EgressAccessLogs
$sel:domainName:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Maybe Text
$sel:authorization:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Maybe Authorization
$sel:arn:CreatePackagingGroupResponse' :: CreatePackagingGroupResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Authorization
authorization
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
domainName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EgressAccessLogs
egressAccessLogs
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus