{-# 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.DataExchange.CreateDataSet
-- 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)
--
-- This operation creates a data set.
module Amazonka.DataExchange.CreateDataSet
  ( -- * Creating a Request
    CreateDataSet (..),
    newCreateDataSet,

    -- * Request Lenses
    createDataSet_tags,
    createDataSet_assetType,
    createDataSet_description,
    createDataSet_name,

    -- * Destructuring the Response
    CreateDataSetResponse (..),
    newCreateDataSetResponse,

    -- * Response Lenses
    createDataSetResponse_origin,
    createDataSetResponse_arn,
    createDataSetResponse_createdAt,
    createDataSetResponse_sourceId,
    createDataSetResponse_originDetails,
    createDataSetResponse_name,
    createDataSetResponse_id,
    createDataSetResponse_assetType,
    createDataSetResponse_updatedAt,
    createDataSetResponse_description,
    createDataSetResponse_tags,
    createDataSetResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DataExchange.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

-- | The request body for CreateDataSet.
--
-- /See:/ 'newCreateDataSet' smart constructor.
data CreateDataSet = CreateDataSet'
  { -- | A data set tag is an optional label that you can assign to a data set
    -- when you create it. Each tag consists of a key and an optional value,
    -- both of which you define. When you use tagging, you can also use
    -- tag-based access control in IAM policies to control access to these data
    -- sets and revisions.
    CreateDataSet -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The type of asset that is added to a data set.
    CreateDataSet -> AssetType
assetType :: AssetType,
    -- | A description for the data set. This value can be up to 16,348
    -- characters long.
    CreateDataSet -> Text
description :: Prelude.Text,
    -- | The name of the data set.
    CreateDataSet -> Text
name :: Prelude.Text
  }
  deriving (CreateDataSet -> CreateDataSet -> Bool
(CreateDataSet -> CreateDataSet -> Bool)
-> (CreateDataSet -> CreateDataSet -> Bool) -> Eq CreateDataSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDataSet -> CreateDataSet -> Bool
$c/= :: CreateDataSet -> CreateDataSet -> Bool
== :: CreateDataSet -> CreateDataSet -> Bool
$c== :: CreateDataSet -> CreateDataSet -> Bool
Prelude.Eq, ReadPrec [CreateDataSet]
ReadPrec CreateDataSet
Int -> ReadS CreateDataSet
ReadS [CreateDataSet]
(Int -> ReadS CreateDataSet)
-> ReadS [CreateDataSet]
-> ReadPrec CreateDataSet
-> ReadPrec [CreateDataSet]
-> Read CreateDataSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDataSet]
$creadListPrec :: ReadPrec [CreateDataSet]
readPrec :: ReadPrec CreateDataSet
$creadPrec :: ReadPrec CreateDataSet
readList :: ReadS [CreateDataSet]
$creadList :: ReadS [CreateDataSet]
readsPrec :: Int -> ReadS CreateDataSet
$creadsPrec :: Int -> ReadS CreateDataSet
Prelude.Read, Int -> CreateDataSet -> ShowS
[CreateDataSet] -> ShowS
CreateDataSet -> String
(Int -> CreateDataSet -> ShowS)
-> (CreateDataSet -> String)
-> ([CreateDataSet] -> ShowS)
-> Show CreateDataSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDataSet] -> ShowS
$cshowList :: [CreateDataSet] -> ShowS
show :: CreateDataSet -> String
$cshow :: CreateDataSet -> String
showsPrec :: Int -> CreateDataSet -> ShowS
$cshowsPrec :: Int -> CreateDataSet -> ShowS
Prelude.Show, (forall x. CreateDataSet -> Rep CreateDataSet x)
-> (forall x. Rep CreateDataSet x -> CreateDataSet)
-> Generic CreateDataSet
forall x. Rep CreateDataSet x -> CreateDataSet
forall x. CreateDataSet -> Rep CreateDataSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDataSet x -> CreateDataSet
$cfrom :: forall x. CreateDataSet -> Rep CreateDataSet x
Prelude.Generic)

-- |
-- Create a value of 'CreateDataSet' 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:
--
-- 'tags', 'createDataSet_tags' - A data set tag is an optional label that you can assign to a data set
-- when you create it. Each tag consists of a key and an optional value,
-- both of which you define. When you use tagging, you can also use
-- tag-based access control in IAM policies to control access to these data
-- sets and revisions.
--
-- 'assetType', 'createDataSet_assetType' - The type of asset that is added to a data set.
--
-- 'description', 'createDataSet_description' - A description for the data set. This value can be up to 16,348
-- characters long.
--
-- 'name', 'createDataSet_name' - The name of the data set.
newCreateDataSet ::
  -- | 'assetType'
  AssetType ->
  -- | 'description'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  CreateDataSet
newCreateDataSet :: AssetType -> Text -> Text -> CreateDataSet
newCreateDataSet AssetType
pAssetType_ Text
pDescription_ Text
pName_ =
  CreateDataSet' :: Maybe (HashMap Text Text)
-> AssetType -> Text -> Text -> CreateDataSet
CreateDataSet'
    { $sel:tags:CreateDataSet' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:assetType:CreateDataSet' :: AssetType
assetType = AssetType
pAssetType_,
      $sel:description:CreateDataSet' :: Text
description = Text
pDescription_,
      $sel:name:CreateDataSet' :: Text
name = Text
pName_
    }

-- | A data set tag is an optional label that you can assign to a data set
-- when you create it. Each tag consists of a key and an optional value,
-- both of which you define. When you use tagging, you can also use
-- tag-based access control in IAM policies to control access to these data
-- sets and revisions.
createDataSet_tags :: Lens.Lens' CreateDataSet (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createDataSet_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateDataSet -> f CreateDataSet
createDataSet_tags = (CreateDataSet -> Maybe (HashMap Text Text))
-> (CreateDataSet -> Maybe (HashMap Text Text) -> CreateDataSet)
-> Lens
     CreateDataSet
     CreateDataSet
     (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 (\CreateDataSet' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateDataSet' :: CreateDataSet -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateDataSet
s@CreateDataSet' {} Maybe (HashMap Text Text)
a -> CreateDataSet
s {$sel:tags:CreateDataSet' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateDataSet) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateDataSet -> f CreateDataSet)
-> ((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)))
-> CreateDataSet
-> f CreateDataSet
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 type of asset that is added to a data set.
createDataSet_assetType :: Lens.Lens' CreateDataSet AssetType
createDataSet_assetType :: (AssetType -> f AssetType) -> CreateDataSet -> f CreateDataSet
createDataSet_assetType = (CreateDataSet -> AssetType)
-> (CreateDataSet -> AssetType -> CreateDataSet)
-> Lens CreateDataSet CreateDataSet AssetType AssetType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSet' {AssetType
assetType :: AssetType
$sel:assetType:CreateDataSet' :: CreateDataSet -> AssetType
assetType} -> AssetType
assetType) (\s :: CreateDataSet
s@CreateDataSet' {} AssetType
a -> CreateDataSet
s {$sel:assetType:CreateDataSet' :: AssetType
assetType = AssetType
a} :: CreateDataSet)

-- | A description for the data set. This value can be up to 16,348
-- characters long.
createDataSet_description :: Lens.Lens' CreateDataSet Prelude.Text
createDataSet_description :: (Text -> f Text) -> CreateDataSet -> f CreateDataSet
createDataSet_description = (CreateDataSet -> Text)
-> (CreateDataSet -> Text -> CreateDataSet)
-> Lens CreateDataSet CreateDataSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSet' {Text
description :: Text
$sel:description:CreateDataSet' :: CreateDataSet -> Text
description} -> Text
description) (\s :: CreateDataSet
s@CreateDataSet' {} Text
a -> CreateDataSet
s {$sel:description:CreateDataSet' :: Text
description = Text
a} :: CreateDataSet)

-- | The name of the data set.
createDataSet_name :: Lens.Lens' CreateDataSet Prelude.Text
createDataSet_name :: (Text -> f Text) -> CreateDataSet -> f CreateDataSet
createDataSet_name = (CreateDataSet -> Text)
-> (CreateDataSet -> Text -> CreateDataSet)
-> Lens CreateDataSet CreateDataSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSet' {Text
name :: Text
$sel:name:CreateDataSet' :: CreateDataSet -> Text
name} -> Text
name) (\s :: CreateDataSet
s@CreateDataSet' {} Text
a -> CreateDataSet
s {$sel:name:CreateDataSet' :: Text
name = Text
a} :: CreateDataSet)

instance Core.AWSRequest CreateDataSet where
  type
    AWSResponse CreateDataSet =
      CreateDataSetResponse
  request :: CreateDataSet -> Request CreateDataSet
request = Service -> CreateDataSet -> Request CreateDataSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateDataSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDataSet)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateDataSet))
-> Logger
-> Service
-> Proxy CreateDataSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDataSet)))
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 Origin
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe OriginDetails
-> Maybe Text
-> Maybe Text
-> Maybe AssetType
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateDataSetResponse
CreateDataSetResponse'
            (Maybe Origin
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe OriginDetails
 -> Maybe Text
 -> Maybe Text
 -> Maybe AssetType
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> CreateDataSetResponse)
-> Either String (Maybe Origin)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe OriginDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateDataSetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Origin)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Origin")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe OriginDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe OriginDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateDataSetResponse)
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 POSIX
   -> Maybe Text
   -> Maybe OriginDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateDataSetResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe OriginDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateDataSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedAt")
            Either
  String
  (Maybe Text
   -> Maybe OriginDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe OriginDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateDataSetResponse)
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
"SourceId")
            Either
  String
  (Maybe OriginDetails
   -> Maybe Text
   -> Maybe Text
   -> Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateDataSetResponse)
-> Either String (Maybe OriginDetails)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateDataSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe OriginDetails)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"OriginDetails")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateDataSetResponse)
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
"Name")
            Either
  String
  (Maybe Text
   -> Maybe AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateDataSetResponse)
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 AssetType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateDataSetResponse)
-> Either String (Maybe AssetType)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateDataSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe AssetType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AssetType")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateDataSetResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> CreateDataSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"UpdatedAt")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> CreateDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> CreateDataSetResponse)
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
"Description")
            Either
  String (Maybe (HashMap Text Text) -> Int -> CreateDataSetResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateDataSetResponse)
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 -> CreateDataSetResponse)
-> Either String Int -> Either String CreateDataSetResponse
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 CreateDataSet

instance Prelude.NFData CreateDataSet

instance Core.ToHeaders CreateDataSet where
  toHeaders :: CreateDataSet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateDataSet -> 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 CreateDataSet where
  toJSON :: CreateDataSet -> Value
toJSON CreateDataSet' {Maybe (HashMap Text Text)
Text
AssetType
name :: Text
description :: Text
assetType :: AssetType
tags :: Maybe (HashMap Text Text)
$sel:name:CreateDataSet' :: CreateDataSet -> Text
$sel:description:CreateDataSet' :: CreateDataSet -> Text
$sel:assetType:CreateDataSet' :: CreateDataSet -> AssetType
$sel:tags:CreateDataSet' :: CreateDataSet -> Maybe (HashMap Text Text)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"AssetType" Text -> AssetType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AssetType
assetType),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
description),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
          ]
      )

instance Core.ToPath CreateDataSet where
  toPath :: CreateDataSet -> ByteString
toPath = ByteString -> CreateDataSet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/data-sets"

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

-- | /See:/ 'newCreateDataSetResponse' smart constructor.
data CreateDataSetResponse = CreateDataSetResponse'
  { -- | A property that defines the data set as OWNED by the account (for
    -- providers) or ENTITLED to the account (for subscribers).
    CreateDataSetResponse -> Maybe Origin
origin :: Prelude.Maybe Origin,
    -- | The ARN for the data set.
    CreateDataSetResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the data set was created, in ISO 8601 format.
    CreateDataSetResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The data set ID of the owned data set corresponding to the entitled data
    -- set being viewed. This parameter is returned when a data set owner is
    -- viewing the entitled copy of its owned data set.
    CreateDataSetResponse -> Maybe Text
sourceId :: Prelude.Maybe Prelude.Text,
    -- | If the origin of this data set is ENTITLED, includes the details for the
    -- product on AWS Marketplace.
    CreateDataSetResponse -> Maybe OriginDetails
originDetails :: Prelude.Maybe OriginDetails,
    -- | The name of the data set.
    CreateDataSetResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the data set.
    CreateDataSetResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The type of asset that is added to a data set.
    CreateDataSetResponse -> Maybe AssetType
assetType :: Prelude.Maybe AssetType,
    -- | The date and time that the data set was last updated, in ISO 8601
    -- format.
    CreateDataSetResponse -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
    -- | The description for the data set.
    CreateDataSetResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags for the data set.
    CreateDataSetResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreateDataSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateDataSetResponse -> CreateDataSetResponse -> Bool
(CreateDataSetResponse -> CreateDataSetResponse -> Bool)
-> (CreateDataSetResponse -> CreateDataSetResponse -> Bool)
-> Eq CreateDataSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDataSetResponse -> CreateDataSetResponse -> Bool
$c/= :: CreateDataSetResponse -> CreateDataSetResponse -> Bool
== :: CreateDataSetResponse -> CreateDataSetResponse -> Bool
$c== :: CreateDataSetResponse -> CreateDataSetResponse -> Bool
Prelude.Eq, ReadPrec [CreateDataSetResponse]
ReadPrec CreateDataSetResponse
Int -> ReadS CreateDataSetResponse
ReadS [CreateDataSetResponse]
(Int -> ReadS CreateDataSetResponse)
-> ReadS [CreateDataSetResponse]
-> ReadPrec CreateDataSetResponse
-> ReadPrec [CreateDataSetResponse]
-> Read CreateDataSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDataSetResponse]
$creadListPrec :: ReadPrec [CreateDataSetResponse]
readPrec :: ReadPrec CreateDataSetResponse
$creadPrec :: ReadPrec CreateDataSetResponse
readList :: ReadS [CreateDataSetResponse]
$creadList :: ReadS [CreateDataSetResponse]
readsPrec :: Int -> ReadS CreateDataSetResponse
$creadsPrec :: Int -> ReadS CreateDataSetResponse
Prelude.Read, Int -> CreateDataSetResponse -> ShowS
[CreateDataSetResponse] -> ShowS
CreateDataSetResponse -> String
(Int -> CreateDataSetResponse -> ShowS)
-> (CreateDataSetResponse -> String)
-> ([CreateDataSetResponse] -> ShowS)
-> Show CreateDataSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDataSetResponse] -> ShowS
$cshowList :: [CreateDataSetResponse] -> ShowS
show :: CreateDataSetResponse -> String
$cshow :: CreateDataSetResponse -> String
showsPrec :: Int -> CreateDataSetResponse -> ShowS
$cshowsPrec :: Int -> CreateDataSetResponse -> ShowS
Prelude.Show, (forall x. CreateDataSetResponse -> Rep CreateDataSetResponse x)
-> (forall x. Rep CreateDataSetResponse x -> CreateDataSetResponse)
-> Generic CreateDataSetResponse
forall x. Rep CreateDataSetResponse x -> CreateDataSetResponse
forall x. CreateDataSetResponse -> Rep CreateDataSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDataSetResponse x -> CreateDataSetResponse
$cfrom :: forall x. CreateDataSetResponse -> Rep CreateDataSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateDataSetResponse' 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:
--
-- 'origin', 'createDataSetResponse_origin' - A property that defines the data set as OWNED by the account (for
-- providers) or ENTITLED to the account (for subscribers).
--
-- 'arn', 'createDataSetResponse_arn' - The ARN for the data set.
--
-- 'createdAt', 'createDataSetResponse_createdAt' - The date and time that the data set was created, in ISO 8601 format.
--
-- 'sourceId', 'createDataSetResponse_sourceId' - The data set ID of the owned data set corresponding to the entitled data
-- set being viewed. This parameter is returned when a data set owner is
-- viewing the entitled copy of its owned data set.
--
-- 'originDetails', 'createDataSetResponse_originDetails' - If the origin of this data set is ENTITLED, includes the details for the
-- product on AWS Marketplace.
--
-- 'name', 'createDataSetResponse_name' - The name of the data set.
--
-- 'id', 'createDataSetResponse_id' - The unique identifier for the data set.
--
-- 'assetType', 'createDataSetResponse_assetType' - The type of asset that is added to a data set.
--
-- 'updatedAt', 'createDataSetResponse_updatedAt' - The date and time that the data set was last updated, in ISO 8601
-- format.
--
-- 'description', 'createDataSetResponse_description' - The description for the data set.
--
-- 'tags', 'createDataSetResponse_tags' - The tags for the data set.
--
-- 'httpStatus', 'createDataSetResponse_httpStatus' - The response's http status code.
newCreateDataSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDataSetResponse
newCreateDataSetResponse :: Int -> CreateDataSetResponse
newCreateDataSetResponse Int
pHttpStatus_ =
  CreateDataSetResponse' :: Maybe Origin
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe OriginDetails
-> Maybe Text
-> Maybe Text
-> Maybe AssetType
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateDataSetResponse
CreateDataSetResponse'
    { $sel:origin:CreateDataSetResponse' :: Maybe Origin
origin = Maybe Origin
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:CreateDataSetResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:CreateDataSetResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceId:CreateDataSetResponse' :: Maybe Text
sourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:originDetails:CreateDataSetResponse' :: Maybe OriginDetails
originDetails = Maybe OriginDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateDataSetResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:CreateDataSetResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:assetType:CreateDataSetResponse' :: Maybe AssetType
assetType = Maybe AssetType
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:CreateDataSetResponse' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateDataSetResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateDataSetResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDataSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A property that defines the data set as OWNED by the account (for
-- providers) or ENTITLED to the account (for subscribers).
createDataSetResponse_origin :: Lens.Lens' CreateDataSetResponse (Prelude.Maybe Origin)
createDataSetResponse_origin :: (Maybe Origin -> f (Maybe Origin))
-> CreateDataSetResponse -> f CreateDataSetResponse
createDataSetResponse_origin = (CreateDataSetResponse -> Maybe Origin)
-> (CreateDataSetResponse -> Maybe Origin -> CreateDataSetResponse)
-> Lens
     CreateDataSetResponse
     CreateDataSetResponse
     (Maybe Origin)
     (Maybe Origin)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSetResponse' {Maybe Origin
origin :: Maybe Origin
$sel:origin:CreateDataSetResponse' :: CreateDataSetResponse -> Maybe Origin
origin} -> Maybe Origin
origin) (\s :: CreateDataSetResponse
s@CreateDataSetResponse' {} Maybe Origin
a -> CreateDataSetResponse
s {$sel:origin:CreateDataSetResponse' :: Maybe Origin
origin = Maybe Origin
a} :: CreateDataSetResponse)

-- | The ARN for the data set.
createDataSetResponse_arn :: Lens.Lens' CreateDataSetResponse (Prelude.Maybe Prelude.Text)
createDataSetResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateDataSetResponse -> f CreateDataSetResponse
createDataSetResponse_arn = (CreateDataSetResponse -> Maybe Text)
-> (CreateDataSetResponse -> Maybe Text -> CreateDataSetResponse)
-> Lens
     CreateDataSetResponse
     CreateDataSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSetResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateDataSetResponse' :: CreateDataSetResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateDataSetResponse
s@CreateDataSetResponse' {} Maybe Text
a -> CreateDataSetResponse
s {$sel:arn:CreateDataSetResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateDataSetResponse)

-- | The date and time that the data set was created, in ISO 8601 format.
createDataSetResponse_createdAt :: Lens.Lens' CreateDataSetResponse (Prelude.Maybe Prelude.UTCTime)
createDataSetResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateDataSetResponse -> f CreateDataSetResponse
createDataSetResponse_createdAt = (CreateDataSetResponse -> Maybe POSIX)
-> (CreateDataSetResponse -> Maybe POSIX -> CreateDataSetResponse)
-> Lens
     CreateDataSetResponse
     CreateDataSetResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSetResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:CreateDataSetResponse' :: CreateDataSetResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: CreateDataSetResponse
s@CreateDataSetResponse' {} Maybe POSIX
a -> CreateDataSetResponse
s {$sel:createdAt:CreateDataSetResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: CreateDataSetResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> CreateDataSetResponse -> f CreateDataSetResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateDataSetResponse
-> f CreateDataSetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The data set ID of the owned data set corresponding to the entitled data
-- set being viewed. This parameter is returned when a data set owner is
-- viewing the entitled copy of its owned data set.
createDataSetResponse_sourceId :: Lens.Lens' CreateDataSetResponse (Prelude.Maybe Prelude.Text)
createDataSetResponse_sourceId :: (Maybe Text -> f (Maybe Text))
-> CreateDataSetResponse -> f CreateDataSetResponse
createDataSetResponse_sourceId = (CreateDataSetResponse -> Maybe Text)
-> (CreateDataSetResponse -> Maybe Text -> CreateDataSetResponse)
-> Lens
     CreateDataSetResponse
     CreateDataSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSetResponse' {Maybe Text
sourceId :: Maybe Text
$sel:sourceId:CreateDataSetResponse' :: CreateDataSetResponse -> Maybe Text
sourceId} -> Maybe Text
sourceId) (\s :: CreateDataSetResponse
s@CreateDataSetResponse' {} Maybe Text
a -> CreateDataSetResponse
s {$sel:sourceId:CreateDataSetResponse' :: Maybe Text
sourceId = Maybe Text
a} :: CreateDataSetResponse)

-- | If the origin of this data set is ENTITLED, includes the details for the
-- product on AWS Marketplace.
createDataSetResponse_originDetails :: Lens.Lens' CreateDataSetResponse (Prelude.Maybe OriginDetails)
createDataSetResponse_originDetails :: (Maybe OriginDetails -> f (Maybe OriginDetails))
-> CreateDataSetResponse -> f CreateDataSetResponse
createDataSetResponse_originDetails = (CreateDataSetResponse -> Maybe OriginDetails)
-> (CreateDataSetResponse
    -> Maybe OriginDetails -> CreateDataSetResponse)
-> Lens
     CreateDataSetResponse
     CreateDataSetResponse
     (Maybe OriginDetails)
     (Maybe OriginDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSetResponse' {Maybe OriginDetails
originDetails :: Maybe OriginDetails
$sel:originDetails:CreateDataSetResponse' :: CreateDataSetResponse -> Maybe OriginDetails
originDetails} -> Maybe OriginDetails
originDetails) (\s :: CreateDataSetResponse
s@CreateDataSetResponse' {} Maybe OriginDetails
a -> CreateDataSetResponse
s {$sel:originDetails:CreateDataSetResponse' :: Maybe OriginDetails
originDetails = Maybe OriginDetails
a} :: CreateDataSetResponse)

-- | The name of the data set.
createDataSetResponse_name :: Lens.Lens' CreateDataSetResponse (Prelude.Maybe Prelude.Text)
createDataSetResponse_name :: (Maybe Text -> f (Maybe Text))
-> CreateDataSetResponse -> f CreateDataSetResponse
createDataSetResponse_name = (CreateDataSetResponse -> Maybe Text)
-> (CreateDataSetResponse -> Maybe Text -> CreateDataSetResponse)
-> Lens
     CreateDataSetResponse
     CreateDataSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSetResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateDataSetResponse' :: CreateDataSetResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateDataSetResponse
s@CreateDataSetResponse' {} Maybe Text
a -> CreateDataSetResponse
s {$sel:name:CreateDataSetResponse' :: Maybe Text
name = Maybe Text
a} :: CreateDataSetResponse)

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

-- | The type of asset that is added to a data set.
createDataSetResponse_assetType :: Lens.Lens' CreateDataSetResponse (Prelude.Maybe AssetType)
createDataSetResponse_assetType :: (Maybe AssetType -> f (Maybe AssetType))
-> CreateDataSetResponse -> f CreateDataSetResponse
createDataSetResponse_assetType = (CreateDataSetResponse -> Maybe AssetType)
-> (CreateDataSetResponse
    -> Maybe AssetType -> CreateDataSetResponse)
-> Lens
     CreateDataSetResponse
     CreateDataSetResponse
     (Maybe AssetType)
     (Maybe AssetType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSetResponse' {Maybe AssetType
assetType :: Maybe AssetType
$sel:assetType:CreateDataSetResponse' :: CreateDataSetResponse -> Maybe AssetType
assetType} -> Maybe AssetType
assetType) (\s :: CreateDataSetResponse
s@CreateDataSetResponse' {} Maybe AssetType
a -> CreateDataSetResponse
s {$sel:assetType:CreateDataSetResponse' :: Maybe AssetType
assetType = Maybe AssetType
a} :: CreateDataSetResponse)

-- | The date and time that the data set was last updated, in ISO 8601
-- format.
createDataSetResponse_updatedAt :: Lens.Lens' CreateDataSetResponse (Prelude.Maybe Prelude.UTCTime)
createDataSetResponse_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateDataSetResponse -> f CreateDataSetResponse
createDataSetResponse_updatedAt = (CreateDataSetResponse -> Maybe POSIX)
-> (CreateDataSetResponse -> Maybe POSIX -> CreateDataSetResponse)
-> Lens
     CreateDataSetResponse
     CreateDataSetResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSetResponse' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:CreateDataSetResponse' :: CreateDataSetResponse -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: CreateDataSetResponse
s@CreateDataSetResponse' {} Maybe POSIX
a -> CreateDataSetResponse
s {$sel:updatedAt:CreateDataSetResponse' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: CreateDataSetResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> CreateDataSetResponse -> f CreateDataSetResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateDataSetResponse
-> f CreateDataSetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The description for the data set.
createDataSetResponse_description :: Lens.Lens' CreateDataSetResponse (Prelude.Maybe Prelude.Text)
createDataSetResponse_description :: (Maybe Text -> f (Maybe Text))
-> CreateDataSetResponse -> f CreateDataSetResponse
createDataSetResponse_description = (CreateDataSetResponse -> Maybe Text)
-> (CreateDataSetResponse -> Maybe Text -> CreateDataSetResponse)
-> Lens
     CreateDataSetResponse
     CreateDataSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSetResponse' {Maybe Text
description :: Maybe Text
$sel:description:CreateDataSetResponse' :: CreateDataSetResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateDataSetResponse
s@CreateDataSetResponse' {} Maybe Text
a -> CreateDataSetResponse
s {$sel:description:CreateDataSetResponse' :: Maybe Text
description = Maybe Text
a} :: CreateDataSetResponse)

-- | The tags for the data set.
createDataSetResponse_tags :: Lens.Lens' CreateDataSetResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createDataSetResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateDataSetResponse -> f CreateDataSetResponse
createDataSetResponse_tags = (CreateDataSetResponse -> Maybe (HashMap Text Text))
-> (CreateDataSetResponse
    -> Maybe (HashMap Text Text) -> CreateDataSetResponse)
-> Lens
     CreateDataSetResponse
     CreateDataSetResponse
     (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 (\CreateDataSetResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateDataSetResponse' :: CreateDataSetResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateDataSetResponse
s@CreateDataSetResponse' {} Maybe (HashMap Text Text)
a -> CreateDataSetResponse
s {$sel:tags:CreateDataSetResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateDataSetResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateDataSetResponse -> f CreateDataSetResponse)
-> ((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)))
-> CreateDataSetResponse
-> f CreateDataSetResponse
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.
createDataSetResponse_httpStatus :: Lens.Lens' CreateDataSetResponse Prelude.Int
createDataSetResponse_httpStatus :: (Int -> f Int) -> CreateDataSetResponse -> f CreateDataSetResponse
createDataSetResponse_httpStatus = (CreateDataSetResponse -> Int)
-> (CreateDataSetResponse -> Int -> CreateDataSetResponse)
-> Lens CreateDataSetResponse CreateDataSetResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateDataSetResponse' :: CreateDataSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateDataSetResponse
s@CreateDataSetResponse' {} Int
a -> CreateDataSetResponse
s {$sel:httpStatus:CreateDataSetResponse' :: Int
httpStatus = Int
a} :: CreateDataSetResponse)

instance Prelude.NFData CreateDataSetResponse