{-# 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.UpdateDataSet
-- 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 updates a data set.
module Amazonka.DataExchange.UpdateDataSet
  ( -- * Creating a Request
    UpdateDataSet (..),
    newUpdateDataSet,

    -- * Request Lenses
    updateDataSet_name,
    updateDataSet_description,
    updateDataSet_dataSetId,

    -- * Destructuring the Response
    UpdateDataSetResponse (..),
    newUpdateDataSetResponse,

    -- * Response Lenses
    updateDataSetResponse_origin,
    updateDataSetResponse_arn,
    updateDataSetResponse_createdAt,
    updateDataSetResponse_sourceId,
    updateDataSetResponse_originDetails,
    updateDataSetResponse_name,
    updateDataSetResponse_id,
    updateDataSetResponse_assetType,
    updateDataSetResponse_updatedAt,
    updateDataSetResponse_description,
    updateDataSetResponse_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 UpdateDataSet.
--
-- /See:/ 'newUpdateDataSet' smart constructor.
data UpdateDataSet = UpdateDataSet'
  { -- | The name of the data set.
    UpdateDataSet -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The description for the data set.
    UpdateDataSet -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for a data set.
    UpdateDataSet -> Text
dataSetId :: Prelude.Text
  }
  deriving (UpdateDataSet -> UpdateDataSet -> Bool
(UpdateDataSet -> UpdateDataSet -> Bool)
-> (UpdateDataSet -> UpdateDataSet -> Bool) -> Eq UpdateDataSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDataSet -> UpdateDataSet -> Bool
$c/= :: UpdateDataSet -> UpdateDataSet -> Bool
== :: UpdateDataSet -> UpdateDataSet -> Bool
$c== :: UpdateDataSet -> UpdateDataSet -> Bool
Prelude.Eq, ReadPrec [UpdateDataSet]
ReadPrec UpdateDataSet
Int -> ReadS UpdateDataSet
ReadS [UpdateDataSet]
(Int -> ReadS UpdateDataSet)
-> ReadS [UpdateDataSet]
-> ReadPrec UpdateDataSet
-> ReadPrec [UpdateDataSet]
-> Read UpdateDataSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDataSet]
$creadListPrec :: ReadPrec [UpdateDataSet]
readPrec :: ReadPrec UpdateDataSet
$creadPrec :: ReadPrec UpdateDataSet
readList :: ReadS [UpdateDataSet]
$creadList :: ReadS [UpdateDataSet]
readsPrec :: Int -> ReadS UpdateDataSet
$creadsPrec :: Int -> ReadS UpdateDataSet
Prelude.Read, Int -> UpdateDataSet -> ShowS
[UpdateDataSet] -> ShowS
UpdateDataSet -> String
(Int -> UpdateDataSet -> ShowS)
-> (UpdateDataSet -> String)
-> ([UpdateDataSet] -> ShowS)
-> Show UpdateDataSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDataSet] -> ShowS
$cshowList :: [UpdateDataSet] -> ShowS
show :: UpdateDataSet -> String
$cshow :: UpdateDataSet -> String
showsPrec :: Int -> UpdateDataSet -> ShowS
$cshowsPrec :: Int -> UpdateDataSet -> ShowS
Prelude.Show, (forall x. UpdateDataSet -> Rep UpdateDataSet x)
-> (forall x. Rep UpdateDataSet x -> UpdateDataSet)
-> Generic UpdateDataSet
forall x. Rep UpdateDataSet x -> UpdateDataSet
forall x. UpdateDataSet -> Rep UpdateDataSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDataSet x -> UpdateDataSet
$cfrom :: forall x. UpdateDataSet -> Rep UpdateDataSet x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDataSet' 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:
--
-- 'name', 'updateDataSet_name' - The name of the data set.
--
-- 'description', 'updateDataSet_description' - The description for the data set.
--
-- 'dataSetId', 'updateDataSet_dataSetId' - The unique identifier for a data set.
newUpdateDataSet ::
  -- | 'dataSetId'
  Prelude.Text ->
  UpdateDataSet
newUpdateDataSet :: Text -> UpdateDataSet
newUpdateDataSet Text
pDataSetId_ =
  UpdateDataSet' :: Maybe Text -> Maybe Text -> Text -> UpdateDataSet
UpdateDataSet'
    { $sel:name:UpdateDataSet' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateDataSet' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSetId:UpdateDataSet' :: Text
dataSetId = Text
pDataSetId_
    }

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

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

-- | The unique identifier for a data set.
updateDataSet_dataSetId :: Lens.Lens' UpdateDataSet Prelude.Text
updateDataSet_dataSetId :: (Text -> f Text) -> UpdateDataSet -> f UpdateDataSet
updateDataSet_dataSetId = (UpdateDataSet -> Text)
-> (UpdateDataSet -> Text -> UpdateDataSet)
-> Lens UpdateDataSet UpdateDataSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDataSet' {Text
dataSetId :: Text
$sel:dataSetId:UpdateDataSet' :: UpdateDataSet -> Text
dataSetId} -> Text
dataSetId) (\s :: UpdateDataSet
s@UpdateDataSet' {} Text
a -> UpdateDataSet
s {$sel:dataSetId:UpdateDataSet' :: Text
dataSetId = Text
a} :: UpdateDataSet)

instance Core.AWSRequest UpdateDataSet where
  type
    AWSResponse UpdateDataSet =
      UpdateDataSetResponse
  request :: UpdateDataSet -> Request UpdateDataSet
request = Service -> UpdateDataSet -> Request UpdateDataSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDataSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateDataSet)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateDataSet))
-> Logger
-> Service
-> Proxy UpdateDataSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateDataSet)))
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
-> Int
-> UpdateDataSetResponse
UpdateDataSetResponse'
            (Maybe Origin
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe OriginDetails
 -> Maybe Text
 -> Maybe Text
 -> Maybe AssetType
 -> Maybe POSIX
 -> Maybe Text
 -> Int
 -> UpdateDataSetResponse)
-> Either String (Maybe Origin)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe OriginDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> UpdateDataSetResponse)
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
   -> Int
   -> UpdateDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe OriginDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> UpdateDataSetResponse)
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
   -> Int
   -> UpdateDataSetResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe OriginDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> UpdateDataSetResponse)
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
   -> Int
   -> UpdateDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe OriginDetails
      -> Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> UpdateDataSetResponse)
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
   -> Int
   -> UpdateDataSetResponse)
-> Either String (Maybe OriginDetails)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> UpdateDataSetResponse)
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
   -> Int
   -> UpdateDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe AssetType
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> UpdateDataSetResponse)
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
   -> Int
   -> UpdateDataSetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe AssetType
      -> Maybe POSIX -> Maybe Text -> Int -> UpdateDataSetResponse)
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 -> Int -> UpdateDataSetResponse)
-> Either String (Maybe AssetType)
-> Either
     String (Maybe POSIX -> Maybe Text -> Int -> UpdateDataSetResponse)
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 -> Int -> UpdateDataSetResponse)
-> Either String (Maybe POSIX)
-> Either String (Maybe Text -> Int -> UpdateDataSetResponse)
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 -> Int -> UpdateDataSetResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateDataSetResponse)
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 (Int -> UpdateDataSetResponse)
-> Either String Int -> Either String UpdateDataSetResponse
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 UpdateDataSet

instance Prelude.NFData UpdateDataSet

instance Core.ToHeaders UpdateDataSet where
  toHeaders :: UpdateDataSet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateDataSet -> 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 UpdateDataSet where
  toJSON :: UpdateDataSet -> Value
toJSON UpdateDataSet' {Maybe Text
Text
dataSetId :: Text
description :: Maybe Text
name :: Maybe Text
$sel:dataSetId:UpdateDataSet' :: UpdateDataSet -> Text
$sel:description:UpdateDataSet' :: UpdateDataSet -> Maybe Text
$sel:name:UpdateDataSet' :: UpdateDataSet -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Text
"Description" 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
description
          ]
      )

instance Core.ToPath UpdateDataSet where
  toPath :: UpdateDataSet -> ByteString
toPath UpdateDataSet' {Maybe Text
Text
dataSetId :: Text
description :: Maybe Text
name :: Maybe Text
$sel:dataSetId:UpdateDataSet' :: UpdateDataSet -> Text
$sel:description:UpdateDataSet' :: UpdateDataSet -> Maybe Text
$sel:name:UpdateDataSet' :: UpdateDataSet -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v1/data-sets/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
dataSetId]

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

-- | /See:/ 'newUpdateDataSetResponse' smart constructor.
data UpdateDataSetResponse = UpdateDataSetResponse'
  { -- | A property that defines the data set as OWNED by the account (for
    -- providers) or ENTITLED to the account (for subscribers).
    UpdateDataSetResponse -> Maybe Origin
origin :: Prelude.Maybe Origin,
    -- | The ARN for the data set.
    UpdateDataSetResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the data set was created, in ISO 8601 format.
    UpdateDataSetResponse -> 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.
    UpdateDataSetResponse -> 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.
    UpdateDataSetResponse -> Maybe OriginDetails
originDetails :: Prelude.Maybe OriginDetails,
    -- | The name of the data set.
    UpdateDataSetResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the data set.
    UpdateDataSetResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The type of asset that is added to a data set.
    UpdateDataSetResponse -> Maybe AssetType
assetType :: Prelude.Maybe AssetType,
    -- | The date and time that the data set was last updated, in ISO 8601
    -- format.
    UpdateDataSetResponse -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
    -- | The description for the data set.
    UpdateDataSetResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateDataSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateDataSetResponse -> UpdateDataSetResponse -> Bool
(UpdateDataSetResponse -> UpdateDataSetResponse -> Bool)
-> (UpdateDataSetResponse -> UpdateDataSetResponse -> Bool)
-> Eq UpdateDataSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDataSetResponse -> UpdateDataSetResponse -> Bool
$c/= :: UpdateDataSetResponse -> UpdateDataSetResponse -> Bool
== :: UpdateDataSetResponse -> UpdateDataSetResponse -> Bool
$c== :: UpdateDataSetResponse -> UpdateDataSetResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDataSetResponse]
ReadPrec UpdateDataSetResponse
Int -> ReadS UpdateDataSetResponse
ReadS [UpdateDataSetResponse]
(Int -> ReadS UpdateDataSetResponse)
-> ReadS [UpdateDataSetResponse]
-> ReadPrec UpdateDataSetResponse
-> ReadPrec [UpdateDataSetResponse]
-> Read UpdateDataSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDataSetResponse]
$creadListPrec :: ReadPrec [UpdateDataSetResponse]
readPrec :: ReadPrec UpdateDataSetResponse
$creadPrec :: ReadPrec UpdateDataSetResponse
readList :: ReadS [UpdateDataSetResponse]
$creadList :: ReadS [UpdateDataSetResponse]
readsPrec :: Int -> ReadS UpdateDataSetResponse
$creadsPrec :: Int -> ReadS UpdateDataSetResponse
Prelude.Read, Int -> UpdateDataSetResponse -> ShowS
[UpdateDataSetResponse] -> ShowS
UpdateDataSetResponse -> String
(Int -> UpdateDataSetResponse -> ShowS)
-> (UpdateDataSetResponse -> String)
-> ([UpdateDataSetResponse] -> ShowS)
-> Show UpdateDataSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDataSetResponse] -> ShowS
$cshowList :: [UpdateDataSetResponse] -> ShowS
show :: UpdateDataSetResponse -> String
$cshow :: UpdateDataSetResponse -> String
showsPrec :: Int -> UpdateDataSetResponse -> ShowS
$cshowsPrec :: Int -> UpdateDataSetResponse -> ShowS
Prelude.Show, (forall x. UpdateDataSetResponse -> Rep UpdateDataSetResponse x)
-> (forall x. Rep UpdateDataSetResponse x -> UpdateDataSetResponse)
-> Generic UpdateDataSetResponse
forall x. Rep UpdateDataSetResponse x -> UpdateDataSetResponse
forall x. UpdateDataSetResponse -> Rep UpdateDataSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDataSetResponse x -> UpdateDataSetResponse
$cfrom :: forall x. UpdateDataSetResponse -> Rep UpdateDataSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDataSetResponse' 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', 'updateDataSetResponse_origin' - A property that defines the data set as OWNED by the account (for
-- providers) or ENTITLED to the account (for subscribers).
--
-- 'arn', 'updateDataSetResponse_arn' - The ARN for the data set.
--
-- 'createdAt', 'updateDataSetResponse_createdAt' - The date and time that the data set was created, in ISO 8601 format.
--
-- 'sourceId', 'updateDataSetResponse_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', 'updateDataSetResponse_originDetails' - If the origin of this data set is ENTITLED, includes the details for the
-- product on AWS Marketplace.
--
-- 'name', 'updateDataSetResponse_name' - The name of the data set.
--
-- 'id', 'updateDataSetResponse_id' - The unique identifier for the data set.
--
-- 'assetType', 'updateDataSetResponse_assetType' - The type of asset that is added to a data set.
--
-- 'updatedAt', 'updateDataSetResponse_updatedAt' - The date and time that the data set was last updated, in ISO 8601
-- format.
--
-- 'description', 'updateDataSetResponse_description' - The description for the data set.
--
-- 'httpStatus', 'updateDataSetResponse_httpStatus' - The response's http status code.
newUpdateDataSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateDataSetResponse
newUpdateDataSetResponse :: Int -> UpdateDataSetResponse
newUpdateDataSetResponse Int
pHttpStatus_ =
  UpdateDataSetResponse' :: Maybe Origin
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe OriginDetails
-> Maybe Text
-> Maybe Text
-> Maybe AssetType
-> Maybe POSIX
-> Maybe Text
-> Int
-> UpdateDataSetResponse
UpdateDataSetResponse'
    { $sel:origin:UpdateDataSetResponse' :: Maybe Origin
origin = Maybe Origin
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:UpdateDataSetResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:UpdateDataSetResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceId:UpdateDataSetResponse' :: Maybe Text
sourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:originDetails:UpdateDataSetResponse' :: Maybe OriginDetails
originDetails = Maybe OriginDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateDataSetResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:UpdateDataSetResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:assetType:UpdateDataSetResponse' :: Maybe AssetType
assetType = Maybe AssetType
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:UpdateDataSetResponse' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateDataSetResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateDataSetResponse' :: 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).
updateDataSetResponse_origin :: Lens.Lens' UpdateDataSetResponse (Prelude.Maybe Origin)
updateDataSetResponse_origin :: (Maybe Origin -> f (Maybe Origin))
-> UpdateDataSetResponse -> f UpdateDataSetResponse
updateDataSetResponse_origin = (UpdateDataSetResponse -> Maybe Origin)
-> (UpdateDataSetResponse -> Maybe Origin -> UpdateDataSetResponse)
-> Lens
     UpdateDataSetResponse
     UpdateDataSetResponse
     (Maybe Origin)
     (Maybe Origin)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDataSetResponse' {Maybe Origin
origin :: Maybe Origin
$sel:origin:UpdateDataSetResponse' :: UpdateDataSetResponse -> Maybe Origin
origin} -> Maybe Origin
origin) (\s :: UpdateDataSetResponse
s@UpdateDataSetResponse' {} Maybe Origin
a -> UpdateDataSetResponse
s {$sel:origin:UpdateDataSetResponse' :: Maybe Origin
origin = Maybe Origin
a} :: UpdateDataSetResponse)

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

-- | The date and time that the data set was created, in ISO 8601 format.
updateDataSetResponse_createdAt :: Lens.Lens' UpdateDataSetResponse (Prelude.Maybe Prelude.UTCTime)
updateDataSetResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateDataSetResponse -> f UpdateDataSetResponse
updateDataSetResponse_createdAt = (UpdateDataSetResponse -> Maybe POSIX)
-> (UpdateDataSetResponse -> Maybe POSIX -> UpdateDataSetResponse)
-> Lens
     UpdateDataSetResponse
     UpdateDataSetResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDataSetResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:UpdateDataSetResponse' :: UpdateDataSetResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: UpdateDataSetResponse
s@UpdateDataSetResponse' {} Maybe POSIX
a -> UpdateDataSetResponse
s {$sel:createdAt:UpdateDataSetResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: UpdateDataSetResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateDataSetResponse -> f UpdateDataSetResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateDataSetResponse
-> f UpdateDataSetResponse
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.
updateDataSetResponse_sourceId :: Lens.Lens' UpdateDataSetResponse (Prelude.Maybe Prelude.Text)
updateDataSetResponse_sourceId :: (Maybe Text -> f (Maybe Text))
-> UpdateDataSetResponse -> f UpdateDataSetResponse
updateDataSetResponse_sourceId = (UpdateDataSetResponse -> Maybe Text)
-> (UpdateDataSetResponse -> Maybe Text -> UpdateDataSetResponse)
-> Lens
     UpdateDataSetResponse
     UpdateDataSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDataSetResponse' {Maybe Text
sourceId :: Maybe Text
$sel:sourceId:UpdateDataSetResponse' :: UpdateDataSetResponse -> Maybe Text
sourceId} -> Maybe Text
sourceId) (\s :: UpdateDataSetResponse
s@UpdateDataSetResponse' {} Maybe Text
a -> UpdateDataSetResponse
s {$sel:sourceId:UpdateDataSetResponse' :: Maybe Text
sourceId = Maybe Text
a} :: UpdateDataSetResponse)

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

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

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

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

-- | The date and time that the data set was last updated, in ISO 8601
-- format.
updateDataSetResponse_updatedAt :: Lens.Lens' UpdateDataSetResponse (Prelude.Maybe Prelude.UTCTime)
updateDataSetResponse_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateDataSetResponse -> f UpdateDataSetResponse
updateDataSetResponse_updatedAt = (UpdateDataSetResponse -> Maybe POSIX)
-> (UpdateDataSetResponse -> Maybe POSIX -> UpdateDataSetResponse)
-> Lens
     UpdateDataSetResponse
     UpdateDataSetResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDataSetResponse' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:UpdateDataSetResponse' :: UpdateDataSetResponse -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: UpdateDataSetResponse
s@UpdateDataSetResponse' {} Maybe POSIX
a -> UpdateDataSetResponse
s {$sel:updatedAt:UpdateDataSetResponse' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: UpdateDataSetResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateDataSetResponse -> f UpdateDataSetResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateDataSetResponse
-> f UpdateDataSetResponse
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.
updateDataSetResponse_description :: Lens.Lens' UpdateDataSetResponse (Prelude.Maybe Prelude.Text)
updateDataSetResponse_description :: (Maybe Text -> f (Maybe Text))
-> UpdateDataSetResponse -> f UpdateDataSetResponse
updateDataSetResponse_description = (UpdateDataSetResponse -> Maybe Text)
-> (UpdateDataSetResponse -> Maybe Text -> UpdateDataSetResponse)
-> Lens
     UpdateDataSetResponse
     UpdateDataSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDataSetResponse' {Maybe Text
description :: Maybe Text
$sel:description:UpdateDataSetResponse' :: UpdateDataSetResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateDataSetResponse
s@UpdateDataSetResponse' {} Maybe Text
a -> UpdateDataSetResponse
s {$sel:description:UpdateDataSetResponse' :: Maybe Text
description = Maybe Text
a} :: UpdateDataSetResponse)

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

instance Prelude.NFData UpdateDataSetResponse