{-# 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.CreateAsset
-- 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 MediaPackage VOD Asset resource.
module Amazonka.MediaPackageVOD.CreateAsset
  ( -- * Creating a Request
    CreateAsset (..),
    newCreateAsset,

    -- * Request Lenses
    createAsset_resourceId,
    createAsset_tags,
    createAsset_sourceArn,
    createAsset_id,
    createAsset_packagingGroupId,
    createAsset_sourceRoleArn,

    -- * Destructuring the Response
    CreateAssetResponse (..),
    newCreateAssetResponse,

    -- * Response Lenses
    createAssetResponse_resourceId,
    createAssetResponse_arn,
    createAssetResponse_createdAt,
    createAssetResponse_packagingGroupId,
    createAssetResponse_sourceArn,
    createAssetResponse_sourceRoleArn,
    createAssetResponse_id,
    createAssetResponse_egressEndpoints,
    createAssetResponse_tags,
    createAssetResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 Asset configuration.
--
-- /See:/ 'newCreateAsset' smart constructor.
data CreateAsset = CreateAsset'
  { -- | The resource ID to include in SPEKE key requests.
    CreateAsset -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
    CreateAsset -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | ARN of the source object in S3.
    CreateAsset -> Text
sourceArn :: Prelude.Text,
    -- | The unique identifier for the Asset.
    CreateAsset -> Text
id :: Prelude.Text,
    -- | The ID of the PackagingGroup for the Asset.
    CreateAsset -> Text
packagingGroupId :: Prelude.Text,
    -- | The IAM role ARN used to access the source S3 bucket.
    CreateAsset -> Text
sourceRoleArn :: Prelude.Text
  }
  deriving (CreateAsset -> CreateAsset -> Bool
(CreateAsset -> CreateAsset -> Bool)
-> (CreateAsset -> CreateAsset -> Bool) -> Eq CreateAsset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAsset -> CreateAsset -> Bool
$c/= :: CreateAsset -> CreateAsset -> Bool
== :: CreateAsset -> CreateAsset -> Bool
$c== :: CreateAsset -> CreateAsset -> Bool
Prelude.Eq, ReadPrec [CreateAsset]
ReadPrec CreateAsset
Int -> ReadS CreateAsset
ReadS [CreateAsset]
(Int -> ReadS CreateAsset)
-> ReadS [CreateAsset]
-> ReadPrec CreateAsset
-> ReadPrec [CreateAsset]
-> Read CreateAsset
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAsset]
$creadListPrec :: ReadPrec [CreateAsset]
readPrec :: ReadPrec CreateAsset
$creadPrec :: ReadPrec CreateAsset
readList :: ReadS [CreateAsset]
$creadList :: ReadS [CreateAsset]
readsPrec :: Int -> ReadS CreateAsset
$creadsPrec :: Int -> ReadS CreateAsset
Prelude.Read, Int -> CreateAsset -> ShowS
[CreateAsset] -> ShowS
CreateAsset -> String
(Int -> CreateAsset -> ShowS)
-> (CreateAsset -> String)
-> ([CreateAsset] -> ShowS)
-> Show CreateAsset
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAsset] -> ShowS
$cshowList :: [CreateAsset] -> ShowS
show :: CreateAsset -> String
$cshow :: CreateAsset -> String
showsPrec :: Int -> CreateAsset -> ShowS
$cshowsPrec :: Int -> CreateAsset -> ShowS
Prelude.Show, (forall x. CreateAsset -> Rep CreateAsset x)
-> (forall x. Rep CreateAsset x -> CreateAsset)
-> Generic CreateAsset
forall x. Rep CreateAsset x -> CreateAsset
forall x. CreateAsset -> Rep CreateAsset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAsset x -> CreateAsset
$cfrom :: forall x. CreateAsset -> Rep CreateAsset x
Prelude.Generic)

-- |
-- Create a value of 'CreateAsset' 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:
--
-- 'resourceId', 'createAsset_resourceId' - The resource ID to include in SPEKE key requests.
--
-- 'tags', 'createAsset_tags' - Undocumented member.
--
-- 'sourceArn', 'createAsset_sourceArn' - ARN of the source object in S3.
--
-- 'id', 'createAsset_id' - The unique identifier for the Asset.
--
-- 'packagingGroupId', 'createAsset_packagingGroupId' - The ID of the PackagingGroup for the Asset.
--
-- 'sourceRoleArn', 'createAsset_sourceRoleArn' - The IAM role ARN used to access the source S3 bucket.
newCreateAsset ::
  -- | 'sourceArn'
  Prelude.Text ->
  -- | 'id'
  Prelude.Text ->
  -- | 'packagingGroupId'
  Prelude.Text ->
  -- | 'sourceRoleArn'
  Prelude.Text ->
  CreateAsset
newCreateAsset :: Text -> Text -> Text -> Text -> CreateAsset
newCreateAsset
  Text
pSourceArn_
  Text
pId_
  Text
pPackagingGroupId_
  Text
pSourceRoleArn_ =
    CreateAsset' :: Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> Text
-> CreateAsset
CreateAsset'
      { $sel:resourceId:CreateAsset' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateAsset' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:sourceArn:CreateAsset' :: Text
sourceArn = Text
pSourceArn_,
        $sel:id:CreateAsset' :: Text
id = Text
pId_,
        $sel:packagingGroupId:CreateAsset' :: Text
packagingGroupId = Text
pPackagingGroupId_,
        $sel:sourceRoleArn:CreateAsset' :: Text
sourceRoleArn = Text
pSourceRoleArn_
      }

-- | The resource ID to include in SPEKE key requests.
createAsset_resourceId :: Lens.Lens' CreateAsset (Prelude.Maybe Prelude.Text)
createAsset_resourceId :: (Maybe Text -> f (Maybe Text)) -> CreateAsset -> f CreateAsset
createAsset_resourceId = (CreateAsset -> Maybe Text)
-> (CreateAsset -> Maybe Text -> CreateAsset)
-> Lens CreateAsset CreateAsset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAsset' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:CreateAsset' :: CreateAsset -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: CreateAsset
s@CreateAsset' {} Maybe Text
a -> CreateAsset
s {$sel:resourceId:CreateAsset' :: Maybe Text
resourceId = Maybe Text
a} :: CreateAsset)

-- | Undocumented member.
createAsset_tags :: Lens.Lens' CreateAsset (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createAsset_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAsset -> f CreateAsset
createAsset_tags = (CreateAsset -> Maybe (HashMap Text Text))
-> (CreateAsset -> Maybe (HashMap Text Text) -> CreateAsset)
-> Lens
     CreateAsset
     CreateAsset
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAsset' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateAsset' :: CreateAsset -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateAsset
s@CreateAsset' {} Maybe (HashMap Text Text)
a -> CreateAsset
s {$sel:tags:CreateAsset' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateAsset) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateAsset -> f CreateAsset)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAsset
-> f CreateAsset
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | ARN of the source object in S3.
createAsset_sourceArn :: Lens.Lens' CreateAsset Prelude.Text
createAsset_sourceArn :: (Text -> f Text) -> CreateAsset -> f CreateAsset
createAsset_sourceArn = (CreateAsset -> Text)
-> (CreateAsset -> Text -> CreateAsset)
-> Lens CreateAsset CreateAsset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAsset' {Text
sourceArn :: Text
$sel:sourceArn:CreateAsset' :: CreateAsset -> Text
sourceArn} -> Text
sourceArn) (\s :: CreateAsset
s@CreateAsset' {} Text
a -> CreateAsset
s {$sel:sourceArn:CreateAsset' :: Text
sourceArn = Text
a} :: CreateAsset)

-- | The unique identifier for the Asset.
createAsset_id :: Lens.Lens' CreateAsset Prelude.Text
createAsset_id :: (Text -> f Text) -> CreateAsset -> f CreateAsset
createAsset_id = (CreateAsset -> Text)
-> (CreateAsset -> Text -> CreateAsset)
-> Lens CreateAsset CreateAsset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAsset' {Text
id :: Text
$sel:id:CreateAsset' :: CreateAsset -> Text
id} -> Text
id) (\s :: CreateAsset
s@CreateAsset' {} Text
a -> CreateAsset
s {$sel:id:CreateAsset' :: Text
id = Text
a} :: CreateAsset)

-- | The ID of the PackagingGroup for the Asset.
createAsset_packagingGroupId :: Lens.Lens' CreateAsset Prelude.Text
createAsset_packagingGroupId :: (Text -> f Text) -> CreateAsset -> f CreateAsset
createAsset_packagingGroupId = (CreateAsset -> Text)
-> (CreateAsset -> Text -> CreateAsset)
-> Lens CreateAsset CreateAsset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAsset' {Text
packagingGroupId :: Text
$sel:packagingGroupId:CreateAsset' :: CreateAsset -> Text
packagingGroupId} -> Text
packagingGroupId) (\s :: CreateAsset
s@CreateAsset' {} Text
a -> CreateAsset
s {$sel:packagingGroupId:CreateAsset' :: Text
packagingGroupId = Text
a} :: CreateAsset)

-- | The IAM role ARN used to access the source S3 bucket.
createAsset_sourceRoleArn :: Lens.Lens' CreateAsset Prelude.Text
createAsset_sourceRoleArn :: (Text -> f Text) -> CreateAsset -> f CreateAsset
createAsset_sourceRoleArn = (CreateAsset -> Text)
-> (CreateAsset -> Text -> CreateAsset)
-> Lens CreateAsset CreateAsset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAsset' {Text
sourceRoleArn :: Text
$sel:sourceRoleArn:CreateAsset' :: CreateAsset -> Text
sourceRoleArn} -> Text
sourceRoleArn) (\s :: CreateAsset
s@CreateAsset' {} Text
a -> CreateAsset
s {$sel:sourceRoleArn:CreateAsset' :: Text
sourceRoleArn = Text
a} :: CreateAsset)

instance Core.AWSRequest CreateAsset where
  type AWSResponse CreateAsset = CreateAssetResponse
  request :: CreateAsset -> Request CreateAsset
request = Service -> CreateAsset -> Request CreateAsset
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateAsset
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAsset)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateAsset))
-> Logger
-> Service
-> Proxy CreateAsset
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAsset)))
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
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [EgressEndpoint]
-> Maybe (HashMap Text Text)
-> Int
-> CreateAssetResponse
CreateAssetResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [EgressEndpoint]
 -> Maybe (HashMap Text Text)
 -> Int
 -> CreateAssetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [EgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateAssetResponse)
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
"resourceId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [EgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateAssetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [EgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateAssetResponse)
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
"arn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [EgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateAssetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [EgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateAssetResponse)
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
"createdAt")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [EgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateAssetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [EgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateAssetResponse)
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
"packagingGroupId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [EgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateAssetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [EgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateAssetResponse)
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
"sourceArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [EgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateAssetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [EgressEndpoint]
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateAssetResponse)
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
"sourceRoleArn")
            Either
  String
  (Maybe Text
   -> Maybe [EgressEndpoint]
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateAssetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [EgressEndpoint]
      -> Maybe (HashMap Text Text) -> Int -> CreateAssetResponse)
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
  (Maybe [EgressEndpoint]
   -> Maybe (HashMap Text Text) -> Int -> CreateAssetResponse)
-> Either String (Maybe [EgressEndpoint])
-> Either
     String (Maybe (HashMap Text Text) -> Int -> CreateAssetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [EgressEndpoint]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"egressEndpoints"
                            Either String (Maybe (Maybe [EgressEndpoint]))
-> Maybe [EgressEndpoint] -> Either String (Maybe [EgressEndpoint])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EgressEndpoint]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String (Maybe (HashMap Text Text) -> Int -> CreateAssetResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateAssetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> CreateAssetResponse)
-> Either String Int -> Either String CreateAssetResponse
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 CreateAsset

instance Prelude.NFData CreateAsset

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

instance Core.ToJSON CreateAsset where
  toJSON :: CreateAsset -> Value
toJSON CreateAsset' {Maybe Text
Maybe (HashMap Text Text)
Text
sourceRoleArn :: Text
packagingGroupId :: Text
id :: Text
sourceArn :: Text
tags :: Maybe (HashMap Text Text)
resourceId :: Maybe Text
$sel:sourceRoleArn:CreateAsset' :: CreateAsset -> Text
$sel:packagingGroupId:CreateAsset' :: CreateAsset -> Text
$sel:id:CreateAsset' :: CreateAsset -> Text
$sel:sourceArn:CreateAsset' :: CreateAsset -> Text
$sel:tags:CreateAsset' :: CreateAsset -> Maybe (HashMap Text Text)
$sel:resourceId:CreateAsset' :: CreateAsset -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"resourceId" 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
resourceId,
            (Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"sourceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sourceArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
id),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"packagingGroupId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
packagingGroupId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"sourceRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sourceRoleArn)
          ]
      )

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

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

-- | /See:/ 'newCreateAssetResponse' smart constructor.
data CreateAssetResponse = CreateAssetResponse'
  { -- | The resource ID to include in SPEKE key requests.
    CreateAssetResponse -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the Asset.
    CreateAssetResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time the Asset was initially submitted for Ingest.
    CreateAssetResponse -> Maybe Text
createdAt :: Prelude.Maybe Prelude.Text,
    -- | The ID of the PackagingGroup for the Asset.
    CreateAssetResponse -> Maybe Text
packagingGroupId :: Prelude.Maybe Prelude.Text,
    -- | ARN of the source object in S3.
    CreateAssetResponse -> Maybe Text
sourceArn :: Prelude.Maybe Prelude.Text,
    -- | The IAM role_arn used to access the source S3 bucket.
    CreateAssetResponse -> Maybe Text
sourceRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the Asset.
    CreateAssetResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The list of egress endpoints available for the Asset.
    CreateAssetResponse -> Maybe [EgressEndpoint]
egressEndpoints :: Prelude.Maybe [EgressEndpoint],
    CreateAssetResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreateAssetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateAssetResponse -> CreateAssetResponse -> Bool
(CreateAssetResponse -> CreateAssetResponse -> Bool)
-> (CreateAssetResponse -> CreateAssetResponse -> Bool)
-> Eq CreateAssetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAssetResponse -> CreateAssetResponse -> Bool
$c/= :: CreateAssetResponse -> CreateAssetResponse -> Bool
== :: CreateAssetResponse -> CreateAssetResponse -> Bool
$c== :: CreateAssetResponse -> CreateAssetResponse -> Bool
Prelude.Eq, ReadPrec [CreateAssetResponse]
ReadPrec CreateAssetResponse
Int -> ReadS CreateAssetResponse
ReadS [CreateAssetResponse]
(Int -> ReadS CreateAssetResponse)
-> ReadS [CreateAssetResponse]
-> ReadPrec CreateAssetResponse
-> ReadPrec [CreateAssetResponse]
-> Read CreateAssetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAssetResponse]
$creadListPrec :: ReadPrec [CreateAssetResponse]
readPrec :: ReadPrec CreateAssetResponse
$creadPrec :: ReadPrec CreateAssetResponse
readList :: ReadS [CreateAssetResponse]
$creadList :: ReadS [CreateAssetResponse]
readsPrec :: Int -> ReadS CreateAssetResponse
$creadsPrec :: Int -> ReadS CreateAssetResponse
Prelude.Read, Int -> CreateAssetResponse -> ShowS
[CreateAssetResponse] -> ShowS
CreateAssetResponse -> String
(Int -> CreateAssetResponse -> ShowS)
-> (CreateAssetResponse -> String)
-> ([CreateAssetResponse] -> ShowS)
-> Show CreateAssetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAssetResponse] -> ShowS
$cshowList :: [CreateAssetResponse] -> ShowS
show :: CreateAssetResponse -> String
$cshow :: CreateAssetResponse -> String
showsPrec :: Int -> CreateAssetResponse -> ShowS
$cshowsPrec :: Int -> CreateAssetResponse -> ShowS
Prelude.Show, (forall x. CreateAssetResponse -> Rep CreateAssetResponse x)
-> (forall x. Rep CreateAssetResponse x -> CreateAssetResponse)
-> Generic CreateAssetResponse
forall x. Rep CreateAssetResponse x -> CreateAssetResponse
forall x. CreateAssetResponse -> Rep CreateAssetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAssetResponse x -> CreateAssetResponse
$cfrom :: forall x. CreateAssetResponse -> Rep CreateAssetResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateAssetResponse' 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:
--
-- 'resourceId', 'createAssetResponse_resourceId' - The resource ID to include in SPEKE key requests.
--
-- 'arn', 'createAssetResponse_arn' - The ARN of the Asset.
--
-- 'createdAt', 'createAssetResponse_createdAt' - The time the Asset was initially submitted for Ingest.
--
-- 'packagingGroupId', 'createAssetResponse_packagingGroupId' - The ID of the PackagingGroup for the Asset.
--
-- 'sourceArn', 'createAssetResponse_sourceArn' - ARN of the source object in S3.
--
-- 'sourceRoleArn', 'createAssetResponse_sourceRoleArn' - The IAM role_arn used to access the source S3 bucket.
--
-- 'id', 'createAssetResponse_id' - The unique identifier for the Asset.
--
-- 'egressEndpoints', 'createAssetResponse_egressEndpoints' - The list of egress endpoints available for the Asset.
--
-- 'tags', 'createAssetResponse_tags' - Undocumented member.
--
-- 'httpStatus', 'createAssetResponse_httpStatus' - The response's http status code.
newCreateAssetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateAssetResponse
newCreateAssetResponse :: Int -> CreateAssetResponse
newCreateAssetResponse Int
pHttpStatus_ =
  CreateAssetResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [EgressEndpoint]
-> Maybe (HashMap Text Text)
-> Int
-> CreateAssetResponse
CreateAssetResponse'
    { $sel:resourceId:CreateAssetResponse' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:CreateAssetResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:CreateAssetResponse' :: Maybe Text
createdAt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:packagingGroupId:CreateAssetResponse' :: Maybe Text
packagingGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceArn:CreateAssetResponse' :: Maybe Text
sourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceRoleArn:CreateAssetResponse' :: Maybe Text
sourceRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:CreateAssetResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:egressEndpoints:CreateAssetResponse' :: Maybe [EgressEndpoint]
egressEndpoints = Maybe [EgressEndpoint]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateAssetResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateAssetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The resource ID to include in SPEKE key requests.
createAssetResponse_resourceId :: Lens.Lens' CreateAssetResponse (Prelude.Maybe Prelude.Text)
createAssetResponse_resourceId :: (Maybe Text -> f (Maybe Text))
-> CreateAssetResponse -> f CreateAssetResponse
createAssetResponse_resourceId = (CreateAssetResponse -> Maybe Text)
-> (CreateAssetResponse -> Maybe Text -> CreateAssetResponse)
-> Lens
     CreateAssetResponse CreateAssetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetResponse' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:CreateAssetResponse' :: CreateAssetResponse -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: CreateAssetResponse
s@CreateAssetResponse' {} Maybe Text
a -> CreateAssetResponse
s {$sel:resourceId:CreateAssetResponse' :: Maybe Text
resourceId = Maybe Text
a} :: CreateAssetResponse)

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

-- | The time the Asset was initially submitted for Ingest.
createAssetResponse_createdAt :: Lens.Lens' CreateAssetResponse (Prelude.Maybe Prelude.Text)
createAssetResponse_createdAt :: (Maybe Text -> f (Maybe Text))
-> CreateAssetResponse -> f CreateAssetResponse
createAssetResponse_createdAt = (CreateAssetResponse -> Maybe Text)
-> (CreateAssetResponse -> Maybe Text -> CreateAssetResponse)
-> Lens
     CreateAssetResponse CreateAssetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetResponse' {Maybe Text
createdAt :: Maybe Text
$sel:createdAt:CreateAssetResponse' :: CreateAssetResponse -> Maybe Text
createdAt} -> Maybe Text
createdAt) (\s :: CreateAssetResponse
s@CreateAssetResponse' {} Maybe Text
a -> CreateAssetResponse
s {$sel:createdAt:CreateAssetResponse' :: Maybe Text
createdAt = Maybe Text
a} :: CreateAssetResponse)

-- | The ID of the PackagingGroup for the Asset.
createAssetResponse_packagingGroupId :: Lens.Lens' CreateAssetResponse (Prelude.Maybe Prelude.Text)
createAssetResponse_packagingGroupId :: (Maybe Text -> f (Maybe Text))
-> CreateAssetResponse -> f CreateAssetResponse
createAssetResponse_packagingGroupId = (CreateAssetResponse -> Maybe Text)
-> (CreateAssetResponse -> Maybe Text -> CreateAssetResponse)
-> Lens
     CreateAssetResponse CreateAssetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetResponse' {Maybe Text
packagingGroupId :: Maybe Text
$sel:packagingGroupId:CreateAssetResponse' :: CreateAssetResponse -> Maybe Text
packagingGroupId} -> Maybe Text
packagingGroupId) (\s :: CreateAssetResponse
s@CreateAssetResponse' {} Maybe Text
a -> CreateAssetResponse
s {$sel:packagingGroupId:CreateAssetResponse' :: Maybe Text
packagingGroupId = Maybe Text
a} :: CreateAssetResponse)

-- | ARN of the source object in S3.
createAssetResponse_sourceArn :: Lens.Lens' CreateAssetResponse (Prelude.Maybe Prelude.Text)
createAssetResponse_sourceArn :: (Maybe Text -> f (Maybe Text))
-> CreateAssetResponse -> f CreateAssetResponse
createAssetResponse_sourceArn = (CreateAssetResponse -> Maybe Text)
-> (CreateAssetResponse -> Maybe Text -> CreateAssetResponse)
-> Lens
     CreateAssetResponse CreateAssetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetResponse' {Maybe Text
sourceArn :: Maybe Text
$sel:sourceArn:CreateAssetResponse' :: CreateAssetResponse -> Maybe Text
sourceArn} -> Maybe Text
sourceArn) (\s :: CreateAssetResponse
s@CreateAssetResponse' {} Maybe Text
a -> CreateAssetResponse
s {$sel:sourceArn:CreateAssetResponse' :: Maybe Text
sourceArn = Maybe Text
a} :: CreateAssetResponse)

-- | The IAM role_arn used to access the source S3 bucket.
createAssetResponse_sourceRoleArn :: Lens.Lens' CreateAssetResponse (Prelude.Maybe Prelude.Text)
createAssetResponse_sourceRoleArn :: (Maybe Text -> f (Maybe Text))
-> CreateAssetResponse -> f CreateAssetResponse
createAssetResponse_sourceRoleArn = (CreateAssetResponse -> Maybe Text)
-> (CreateAssetResponse -> Maybe Text -> CreateAssetResponse)
-> Lens
     CreateAssetResponse CreateAssetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetResponse' {Maybe Text
sourceRoleArn :: Maybe Text
$sel:sourceRoleArn:CreateAssetResponse' :: CreateAssetResponse -> Maybe Text
sourceRoleArn} -> Maybe Text
sourceRoleArn) (\s :: CreateAssetResponse
s@CreateAssetResponse' {} Maybe Text
a -> CreateAssetResponse
s {$sel:sourceRoleArn:CreateAssetResponse' :: Maybe Text
sourceRoleArn = Maybe Text
a} :: CreateAssetResponse)

-- | The unique identifier for the Asset.
createAssetResponse_id :: Lens.Lens' CreateAssetResponse (Prelude.Maybe Prelude.Text)
createAssetResponse_id :: (Maybe Text -> f (Maybe Text))
-> CreateAssetResponse -> f CreateAssetResponse
createAssetResponse_id = (CreateAssetResponse -> Maybe Text)
-> (CreateAssetResponse -> Maybe Text -> CreateAssetResponse)
-> Lens
     CreateAssetResponse CreateAssetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetResponse' {Maybe Text
id :: Maybe Text
$sel:id:CreateAssetResponse' :: CreateAssetResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: CreateAssetResponse
s@CreateAssetResponse' {} Maybe Text
a -> CreateAssetResponse
s {$sel:id:CreateAssetResponse' :: Maybe Text
id = Maybe Text
a} :: CreateAssetResponse)

-- | The list of egress endpoints available for the Asset.
createAssetResponse_egressEndpoints :: Lens.Lens' CreateAssetResponse (Prelude.Maybe [EgressEndpoint])
createAssetResponse_egressEndpoints :: (Maybe [EgressEndpoint] -> f (Maybe [EgressEndpoint]))
-> CreateAssetResponse -> f CreateAssetResponse
createAssetResponse_egressEndpoints = (CreateAssetResponse -> Maybe [EgressEndpoint])
-> (CreateAssetResponse
    -> Maybe [EgressEndpoint] -> CreateAssetResponse)
-> Lens
     CreateAssetResponse
     CreateAssetResponse
     (Maybe [EgressEndpoint])
     (Maybe [EgressEndpoint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetResponse' {Maybe [EgressEndpoint]
egressEndpoints :: Maybe [EgressEndpoint]
$sel:egressEndpoints:CreateAssetResponse' :: CreateAssetResponse -> Maybe [EgressEndpoint]
egressEndpoints} -> Maybe [EgressEndpoint]
egressEndpoints) (\s :: CreateAssetResponse
s@CreateAssetResponse' {} Maybe [EgressEndpoint]
a -> CreateAssetResponse
s {$sel:egressEndpoints:CreateAssetResponse' :: Maybe [EgressEndpoint]
egressEndpoints = Maybe [EgressEndpoint]
a} :: CreateAssetResponse) ((Maybe [EgressEndpoint] -> f (Maybe [EgressEndpoint]))
 -> CreateAssetResponse -> f CreateAssetResponse)
-> ((Maybe [EgressEndpoint] -> f (Maybe [EgressEndpoint]))
    -> Maybe [EgressEndpoint] -> f (Maybe [EgressEndpoint]))
-> (Maybe [EgressEndpoint] -> f (Maybe [EgressEndpoint]))
-> CreateAssetResponse
-> f CreateAssetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EgressEndpoint] [EgressEndpoint] [EgressEndpoint] [EgressEndpoint]
-> Iso
     (Maybe [EgressEndpoint])
     (Maybe [EgressEndpoint])
     (Maybe [EgressEndpoint])
     (Maybe [EgressEndpoint])
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
  [EgressEndpoint] [EgressEndpoint] [EgressEndpoint] [EgressEndpoint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
createAssetResponse_tags :: Lens.Lens' CreateAssetResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createAssetResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAssetResponse -> f CreateAssetResponse
createAssetResponse_tags = (CreateAssetResponse -> Maybe (HashMap Text Text))
-> (CreateAssetResponse
    -> Maybe (HashMap Text Text) -> CreateAssetResponse)
-> Lens
     CreateAssetResponse
     CreateAssetResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateAssetResponse' :: CreateAssetResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateAssetResponse
s@CreateAssetResponse' {} Maybe (HashMap Text Text)
a -> CreateAssetResponse
s {$sel:tags:CreateAssetResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateAssetResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateAssetResponse -> f CreateAssetResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAssetResponse
-> f CreateAssetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData CreateAssetResponse