{-# 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.Forecast.CreateDatasetGroup
-- 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 dataset group, which holds a collection of related datasets.
-- You can add datasets to the dataset group when you create the dataset
-- group, or later by using the UpdateDatasetGroup operation.
--
-- After creating a dataset group and adding datasets, you use the dataset
-- group when you create a predictor. For more information, see
-- howitworks-datasets-groups.
--
-- To get a list of all your datasets groups, use the ListDatasetGroups
-- operation.
--
-- The @Status@ of a dataset group must be @ACTIVE@ before you can use the
-- dataset group to create a predictor. To get the status, use the
-- DescribeDatasetGroup operation.
module Amazonka.Forecast.CreateDatasetGroup
  ( -- * Creating a Request
    CreateDatasetGroup (..),
    newCreateDatasetGroup,

    -- * Request Lenses
    createDatasetGroup_datasetArns,
    createDatasetGroup_tags,
    createDatasetGroup_datasetGroupName,
    createDatasetGroup_domain,

    -- * Destructuring the Response
    CreateDatasetGroupResponse (..),
    newCreateDatasetGroupResponse,

    -- * Response Lenses
    createDatasetGroupResponse_datasetGroupArn,
    createDatasetGroupResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Forecast.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateDatasetGroup' smart constructor.
data CreateDatasetGroup = CreateDatasetGroup'
  { -- | An array of Amazon Resource Names (ARNs) of the datasets that you want
    -- to include in the dataset group.
    CreateDatasetGroup -> Maybe [Text]
datasetArns :: Prelude.Maybe [Prelude.Text],
    -- | The optional metadata that you apply to the dataset group to help you
    -- categorize and organize them. Each tag consists of a key and an optional
    -- value, both of which you define.
    --
    -- The following basic restrictions apply to tags:
    --
    -- -   Maximum number of tags per resource - 50.
    --
    -- -   For each resource, each tag key must be unique, and each tag key can
    --     have only one value.
    --
    -- -   Maximum key length - 128 Unicode characters in UTF-8.
    --
    -- -   Maximum value length - 256 Unicode characters in UTF-8.
    --
    -- -   If your tagging schema is used across multiple services and
    --     resources, remember that other services may have restrictions on
    --     allowed characters. Generally allowed characters are: letters,
    --     numbers, and spaces representable in UTF-8, and the following
    --     characters: + - = . _ : \/ \@.
    --
    -- -   Tag keys and values are case sensitive.
    --
    -- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
    --     such as a prefix for keys as it is reserved for AWS use. You cannot
    --     edit or delete tag keys with this prefix. Values can have this
    --     prefix. If a tag value has @aws@ as its prefix but the key does not,
    --     then Forecast considers it to be a user tag and will count against
    --     the limit of 50 tags. Tags with only the key prefix of @aws@ do not
    --     count against your tags per resource limit.
    CreateDatasetGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | A name for the dataset group.
    CreateDatasetGroup -> Text
datasetGroupName :: Prelude.Text,
    -- | The domain associated with the dataset group. When you add a dataset to
    -- a dataset group, this value and the value specified for the @Domain@
    -- parameter of the CreateDataset operation must match.
    --
    -- The @Domain@ and @DatasetType@ that you choose determine the fields that
    -- must be present in training data that you import to a dataset. For
    -- example, if you choose the @RETAIL@ domain and @TARGET_TIME_SERIES@ as
    -- the @DatasetType@, Amazon Forecast requires that @item_id@, @timestamp@,
    -- and @demand@ fields are present in your data. For more information, see
    -- howitworks-datasets-groups.
    CreateDatasetGroup -> Domain
domain :: Domain
  }
  deriving (CreateDatasetGroup -> CreateDatasetGroup -> Bool
(CreateDatasetGroup -> CreateDatasetGroup -> Bool)
-> (CreateDatasetGroup -> CreateDatasetGroup -> Bool)
-> Eq CreateDatasetGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDatasetGroup -> CreateDatasetGroup -> Bool
$c/= :: CreateDatasetGroup -> CreateDatasetGroup -> Bool
== :: CreateDatasetGroup -> CreateDatasetGroup -> Bool
$c== :: CreateDatasetGroup -> CreateDatasetGroup -> Bool
Prelude.Eq, Int -> CreateDatasetGroup -> ShowS
[CreateDatasetGroup] -> ShowS
CreateDatasetGroup -> String
(Int -> CreateDatasetGroup -> ShowS)
-> (CreateDatasetGroup -> String)
-> ([CreateDatasetGroup] -> ShowS)
-> Show CreateDatasetGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDatasetGroup] -> ShowS
$cshowList :: [CreateDatasetGroup] -> ShowS
show :: CreateDatasetGroup -> String
$cshow :: CreateDatasetGroup -> String
showsPrec :: Int -> CreateDatasetGroup -> ShowS
$cshowsPrec :: Int -> CreateDatasetGroup -> ShowS
Prelude.Show, (forall x. CreateDatasetGroup -> Rep CreateDatasetGroup x)
-> (forall x. Rep CreateDatasetGroup x -> CreateDatasetGroup)
-> Generic CreateDatasetGroup
forall x. Rep CreateDatasetGroup x -> CreateDatasetGroup
forall x. CreateDatasetGroup -> Rep CreateDatasetGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDatasetGroup x -> CreateDatasetGroup
$cfrom :: forall x. CreateDatasetGroup -> Rep CreateDatasetGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateDatasetGroup' 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:
--
-- 'datasetArns', 'createDatasetGroup_datasetArns' - An array of Amazon Resource Names (ARNs) of the datasets that you want
-- to include in the dataset group.
--
-- 'tags', 'createDatasetGroup_tags' - The optional metadata that you apply to the dataset group to help you
-- categorize and organize them. Each tag consists of a key and an optional
-- value, both of which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50.
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8.
--
-- -   Maximum value length - 256 Unicode characters in UTF-8.
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for keys as it is reserved for AWS use. You cannot
--     edit or delete tag keys with this prefix. Values can have this
--     prefix. If a tag value has @aws@ as its prefix but the key does not,
--     then Forecast considers it to be a user tag and will count against
--     the limit of 50 tags. Tags with only the key prefix of @aws@ do not
--     count against your tags per resource limit.
--
-- 'datasetGroupName', 'createDatasetGroup_datasetGroupName' - A name for the dataset group.
--
-- 'domain', 'createDatasetGroup_domain' - The domain associated with the dataset group. When you add a dataset to
-- a dataset group, this value and the value specified for the @Domain@
-- parameter of the CreateDataset operation must match.
--
-- The @Domain@ and @DatasetType@ that you choose determine the fields that
-- must be present in training data that you import to a dataset. For
-- example, if you choose the @RETAIL@ domain and @TARGET_TIME_SERIES@ as
-- the @DatasetType@, Amazon Forecast requires that @item_id@, @timestamp@,
-- and @demand@ fields are present in your data. For more information, see
-- howitworks-datasets-groups.
newCreateDatasetGroup ::
  -- | 'datasetGroupName'
  Prelude.Text ->
  -- | 'domain'
  Domain ->
  CreateDatasetGroup
newCreateDatasetGroup :: Text -> Domain -> CreateDatasetGroup
newCreateDatasetGroup Text
pDatasetGroupName_ Domain
pDomain_ =
  CreateDatasetGroup' :: Maybe [Text] -> Maybe [Tag] -> Text -> Domain -> CreateDatasetGroup
CreateDatasetGroup'
    { $sel:datasetArns:CreateDatasetGroup' :: Maybe [Text]
datasetArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateDatasetGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetGroupName:CreateDatasetGroup' :: Text
datasetGroupName = Text
pDatasetGroupName_,
      $sel:domain:CreateDatasetGroup' :: Domain
domain = Domain
pDomain_
    }

-- | An array of Amazon Resource Names (ARNs) of the datasets that you want
-- to include in the dataset group.
createDatasetGroup_datasetArns :: Lens.Lens' CreateDatasetGroup (Prelude.Maybe [Prelude.Text])
createDatasetGroup_datasetArns :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateDatasetGroup -> f CreateDatasetGroup
createDatasetGroup_datasetArns = (CreateDatasetGroup -> Maybe [Text])
-> (CreateDatasetGroup -> Maybe [Text] -> CreateDatasetGroup)
-> Lens
     CreateDatasetGroup CreateDatasetGroup (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetGroup' {Maybe [Text]
datasetArns :: Maybe [Text]
$sel:datasetArns:CreateDatasetGroup' :: CreateDatasetGroup -> Maybe [Text]
datasetArns} -> Maybe [Text]
datasetArns) (\s :: CreateDatasetGroup
s@CreateDatasetGroup' {} Maybe [Text]
a -> CreateDatasetGroup
s {$sel:datasetArns:CreateDatasetGroup' :: Maybe [Text]
datasetArns = Maybe [Text]
a} :: CreateDatasetGroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateDatasetGroup -> f CreateDatasetGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateDatasetGroup
-> f CreateDatasetGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The optional metadata that you apply to the dataset group to help you
-- categorize and organize them. Each tag consists of a key and an optional
-- value, both of which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50.
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8.
--
-- -   Maximum value length - 256 Unicode characters in UTF-8.
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for keys as it is reserved for AWS use. You cannot
--     edit or delete tag keys with this prefix. Values can have this
--     prefix. If a tag value has @aws@ as its prefix but the key does not,
--     then Forecast considers it to be a user tag and will count against
--     the limit of 50 tags. Tags with only the key prefix of @aws@ do not
--     count against your tags per resource limit.
createDatasetGroup_tags :: Lens.Lens' CreateDatasetGroup (Prelude.Maybe [Tag])
createDatasetGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDatasetGroup -> f CreateDatasetGroup
createDatasetGroup_tags = (CreateDatasetGroup -> Maybe [Tag])
-> (CreateDatasetGroup -> Maybe [Tag] -> CreateDatasetGroup)
-> Lens
     CreateDatasetGroup CreateDatasetGroup (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDatasetGroup' :: CreateDatasetGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDatasetGroup
s@CreateDatasetGroup' {} Maybe [Tag]
a -> CreateDatasetGroup
s {$sel:tags:CreateDatasetGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDatasetGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateDatasetGroup -> f CreateDatasetGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDatasetGroup
-> f CreateDatasetGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A name for the dataset group.
createDatasetGroup_datasetGroupName :: Lens.Lens' CreateDatasetGroup Prelude.Text
createDatasetGroup_datasetGroupName :: (Text -> f Text) -> CreateDatasetGroup -> f CreateDatasetGroup
createDatasetGroup_datasetGroupName = (CreateDatasetGroup -> Text)
-> (CreateDatasetGroup -> Text -> CreateDatasetGroup)
-> Lens CreateDatasetGroup CreateDatasetGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetGroup' {Text
datasetGroupName :: Text
$sel:datasetGroupName:CreateDatasetGroup' :: CreateDatasetGroup -> Text
datasetGroupName} -> Text
datasetGroupName) (\s :: CreateDatasetGroup
s@CreateDatasetGroup' {} Text
a -> CreateDatasetGroup
s {$sel:datasetGroupName:CreateDatasetGroup' :: Text
datasetGroupName = Text
a} :: CreateDatasetGroup)

-- | The domain associated with the dataset group. When you add a dataset to
-- a dataset group, this value and the value specified for the @Domain@
-- parameter of the CreateDataset operation must match.
--
-- The @Domain@ and @DatasetType@ that you choose determine the fields that
-- must be present in training data that you import to a dataset. For
-- example, if you choose the @RETAIL@ domain and @TARGET_TIME_SERIES@ as
-- the @DatasetType@, Amazon Forecast requires that @item_id@, @timestamp@,
-- and @demand@ fields are present in your data. For more information, see
-- howitworks-datasets-groups.
createDatasetGroup_domain :: Lens.Lens' CreateDatasetGroup Domain
createDatasetGroup_domain :: (Domain -> f Domain) -> CreateDatasetGroup -> f CreateDatasetGroup
createDatasetGroup_domain = (CreateDatasetGroup -> Domain)
-> (CreateDatasetGroup -> Domain -> CreateDatasetGroup)
-> Lens CreateDatasetGroup CreateDatasetGroup Domain Domain
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetGroup' {Domain
domain :: Domain
$sel:domain:CreateDatasetGroup' :: CreateDatasetGroup -> Domain
domain} -> Domain
domain) (\s :: CreateDatasetGroup
s@CreateDatasetGroup' {} Domain
a -> CreateDatasetGroup
s {$sel:domain:CreateDatasetGroup' :: Domain
domain = Domain
a} :: CreateDatasetGroup)

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

instance Prelude.NFData CreateDatasetGroup

instance Core.ToHeaders CreateDatasetGroup where
  toHeaders :: CreateDatasetGroup -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateDatasetGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonForecast.CreateDatasetGroup" ::
                          Prelude.ByteString
                      ),
            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 CreateDatasetGroup where
  toJSON :: CreateDatasetGroup -> Value
toJSON CreateDatasetGroup' {Maybe [Text]
Maybe [Tag]
Text
Domain
domain :: Domain
datasetGroupName :: Text
tags :: Maybe [Tag]
datasetArns :: Maybe [Text]
$sel:domain:CreateDatasetGroup' :: CreateDatasetGroup -> Domain
$sel:datasetGroupName:CreateDatasetGroup' :: CreateDatasetGroup -> Text
$sel:tags:CreateDatasetGroup' :: CreateDatasetGroup -> Maybe [Tag]
$sel:datasetArns:CreateDatasetGroup' :: CreateDatasetGroup -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DatasetArns" 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]
datasetArns,
            (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"DatasetGroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
datasetGroupName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Domain" Text -> Domain -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Domain
domain)
          ]
      )

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

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

-- | /See:/ 'newCreateDatasetGroupResponse' smart constructor.
data CreateDatasetGroupResponse = CreateDatasetGroupResponse'
  { -- | The Amazon Resource Name (ARN) of the dataset group.
    CreateDatasetGroupResponse -> Maybe Text
datasetGroupArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateDatasetGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateDatasetGroupResponse -> CreateDatasetGroupResponse -> Bool
(CreateDatasetGroupResponse -> CreateDatasetGroupResponse -> Bool)
-> (CreateDatasetGroupResponse
    -> CreateDatasetGroupResponse -> Bool)
-> Eq CreateDatasetGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDatasetGroupResponse -> CreateDatasetGroupResponse -> Bool
$c/= :: CreateDatasetGroupResponse -> CreateDatasetGroupResponse -> Bool
== :: CreateDatasetGroupResponse -> CreateDatasetGroupResponse -> Bool
$c== :: CreateDatasetGroupResponse -> CreateDatasetGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateDatasetGroupResponse]
ReadPrec CreateDatasetGroupResponse
Int -> ReadS CreateDatasetGroupResponse
ReadS [CreateDatasetGroupResponse]
(Int -> ReadS CreateDatasetGroupResponse)
-> ReadS [CreateDatasetGroupResponse]
-> ReadPrec CreateDatasetGroupResponse
-> ReadPrec [CreateDatasetGroupResponse]
-> Read CreateDatasetGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDatasetGroupResponse]
$creadListPrec :: ReadPrec [CreateDatasetGroupResponse]
readPrec :: ReadPrec CreateDatasetGroupResponse
$creadPrec :: ReadPrec CreateDatasetGroupResponse
readList :: ReadS [CreateDatasetGroupResponse]
$creadList :: ReadS [CreateDatasetGroupResponse]
readsPrec :: Int -> ReadS CreateDatasetGroupResponse
$creadsPrec :: Int -> ReadS CreateDatasetGroupResponse
Prelude.Read, Int -> CreateDatasetGroupResponse -> ShowS
[CreateDatasetGroupResponse] -> ShowS
CreateDatasetGroupResponse -> String
(Int -> CreateDatasetGroupResponse -> ShowS)
-> (CreateDatasetGroupResponse -> String)
-> ([CreateDatasetGroupResponse] -> ShowS)
-> Show CreateDatasetGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDatasetGroupResponse] -> ShowS
$cshowList :: [CreateDatasetGroupResponse] -> ShowS
show :: CreateDatasetGroupResponse -> String
$cshow :: CreateDatasetGroupResponse -> String
showsPrec :: Int -> CreateDatasetGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateDatasetGroupResponse -> ShowS
Prelude.Show, (forall x.
 CreateDatasetGroupResponse -> Rep CreateDatasetGroupResponse x)
-> (forall x.
    Rep CreateDatasetGroupResponse x -> CreateDatasetGroupResponse)
-> Generic CreateDatasetGroupResponse
forall x.
Rep CreateDatasetGroupResponse x -> CreateDatasetGroupResponse
forall x.
CreateDatasetGroupResponse -> Rep CreateDatasetGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDatasetGroupResponse x -> CreateDatasetGroupResponse
$cfrom :: forall x.
CreateDatasetGroupResponse -> Rep CreateDatasetGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateDatasetGroupResponse' 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:
--
-- 'datasetGroupArn', 'createDatasetGroupResponse_datasetGroupArn' - The Amazon Resource Name (ARN) of the dataset group.
--
-- 'httpStatus', 'createDatasetGroupResponse_httpStatus' - The response's http status code.
newCreateDatasetGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDatasetGroupResponse
newCreateDatasetGroupResponse :: Int -> CreateDatasetGroupResponse
newCreateDatasetGroupResponse Int
pHttpStatus_ =
  CreateDatasetGroupResponse' :: Maybe Text -> Int -> CreateDatasetGroupResponse
CreateDatasetGroupResponse'
    { $sel:datasetGroupArn:CreateDatasetGroupResponse' :: Maybe Text
datasetGroupArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDatasetGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the dataset group.
createDatasetGroupResponse_datasetGroupArn :: Lens.Lens' CreateDatasetGroupResponse (Prelude.Maybe Prelude.Text)
createDatasetGroupResponse_datasetGroupArn :: (Maybe Text -> f (Maybe Text))
-> CreateDatasetGroupResponse -> f CreateDatasetGroupResponse
createDatasetGroupResponse_datasetGroupArn = (CreateDatasetGroupResponse -> Maybe Text)
-> (CreateDatasetGroupResponse
    -> Maybe Text -> CreateDatasetGroupResponse)
-> Lens
     CreateDatasetGroupResponse
     CreateDatasetGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetGroupResponse' {Maybe Text
datasetGroupArn :: Maybe Text
$sel:datasetGroupArn:CreateDatasetGroupResponse' :: CreateDatasetGroupResponse -> Maybe Text
datasetGroupArn} -> Maybe Text
datasetGroupArn) (\s :: CreateDatasetGroupResponse
s@CreateDatasetGroupResponse' {} Maybe Text
a -> CreateDatasetGroupResponse
s {$sel:datasetGroupArn:CreateDatasetGroupResponse' :: Maybe Text
datasetGroupArn = Maybe Text
a} :: CreateDatasetGroupResponse)

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

instance Prelude.NFData CreateDatasetGroupResponse