{-# 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.Redshift.CreateClusterSubnetGroup
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new Amazon Redshift subnet group. You must provide a list of
-- one or more subnets in your existing Amazon Virtual Private Cloud
-- (Amazon VPC) when creating Amazon Redshift subnet group.
--
-- For information about subnet groups, go to
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-cluster-subnet-groups.html Amazon Redshift Cluster Subnet Groups>
-- in the /Amazon Redshift Cluster Management Guide/.
module Amazonka.Redshift.CreateClusterSubnetGroup
  ( -- * Creating a Request
    CreateClusterSubnetGroup (..),
    newCreateClusterSubnetGroup,

    -- * Request Lenses
    createClusterSubnetGroup_tags,
    createClusterSubnetGroup_clusterSubnetGroupName,
    createClusterSubnetGroup_description,
    createClusterSubnetGroup_subnetIds,

    -- * Destructuring the Response
    CreateClusterSubnetGroupResponse (..),
    newCreateClusterSubnetGroupResponse,

    -- * Response Lenses
    createClusterSubnetGroupResponse_clusterSubnetGroup,
    createClusterSubnetGroupResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newCreateClusterSubnetGroup' smart constructor.
data CreateClusterSubnetGroup = CreateClusterSubnetGroup'
  { -- | A list of tag instances.
    CreateClusterSubnetGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name for the subnet group. Amazon Redshift stores the value as a
    -- lowercase string.
    --
    -- Constraints:
    --
    -- -   Must contain no more than 255 alphanumeric characters or hyphens.
    --
    -- -   Must not be \"Default\".
    --
    -- -   Must be unique for all subnet groups that are created by your Amazon
    --     Web Services account.
    --
    -- Example: @examplesubnetgroup@
    CreateClusterSubnetGroup -> Text
clusterSubnetGroupName :: Prelude.Text,
    -- | A description for the subnet group.
    CreateClusterSubnetGroup -> Text
description :: Prelude.Text,
    -- | An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a
    -- single request.
    CreateClusterSubnetGroup -> [Text]
subnetIds :: [Prelude.Text]
  }
  deriving (CreateClusterSubnetGroup -> CreateClusterSubnetGroup -> Bool
(CreateClusterSubnetGroup -> CreateClusterSubnetGroup -> Bool)
-> (CreateClusterSubnetGroup -> CreateClusterSubnetGroup -> Bool)
-> Eq CreateClusterSubnetGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateClusterSubnetGroup -> CreateClusterSubnetGroup -> Bool
$c/= :: CreateClusterSubnetGroup -> CreateClusterSubnetGroup -> Bool
== :: CreateClusterSubnetGroup -> CreateClusterSubnetGroup -> Bool
$c== :: CreateClusterSubnetGroup -> CreateClusterSubnetGroup -> Bool
Prelude.Eq, ReadPrec [CreateClusterSubnetGroup]
ReadPrec CreateClusterSubnetGroup
Int -> ReadS CreateClusterSubnetGroup
ReadS [CreateClusterSubnetGroup]
(Int -> ReadS CreateClusterSubnetGroup)
-> ReadS [CreateClusterSubnetGroup]
-> ReadPrec CreateClusterSubnetGroup
-> ReadPrec [CreateClusterSubnetGroup]
-> Read CreateClusterSubnetGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateClusterSubnetGroup]
$creadListPrec :: ReadPrec [CreateClusterSubnetGroup]
readPrec :: ReadPrec CreateClusterSubnetGroup
$creadPrec :: ReadPrec CreateClusterSubnetGroup
readList :: ReadS [CreateClusterSubnetGroup]
$creadList :: ReadS [CreateClusterSubnetGroup]
readsPrec :: Int -> ReadS CreateClusterSubnetGroup
$creadsPrec :: Int -> ReadS CreateClusterSubnetGroup
Prelude.Read, Int -> CreateClusterSubnetGroup -> ShowS
[CreateClusterSubnetGroup] -> ShowS
CreateClusterSubnetGroup -> String
(Int -> CreateClusterSubnetGroup -> ShowS)
-> (CreateClusterSubnetGroup -> String)
-> ([CreateClusterSubnetGroup] -> ShowS)
-> Show CreateClusterSubnetGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateClusterSubnetGroup] -> ShowS
$cshowList :: [CreateClusterSubnetGroup] -> ShowS
show :: CreateClusterSubnetGroup -> String
$cshow :: CreateClusterSubnetGroup -> String
showsPrec :: Int -> CreateClusterSubnetGroup -> ShowS
$cshowsPrec :: Int -> CreateClusterSubnetGroup -> ShowS
Prelude.Show, (forall x.
 CreateClusterSubnetGroup -> Rep CreateClusterSubnetGroup x)
-> (forall x.
    Rep CreateClusterSubnetGroup x -> CreateClusterSubnetGroup)
-> Generic CreateClusterSubnetGroup
forall x.
Rep CreateClusterSubnetGroup x -> CreateClusterSubnetGroup
forall x.
CreateClusterSubnetGroup -> Rep CreateClusterSubnetGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateClusterSubnetGroup x -> CreateClusterSubnetGroup
$cfrom :: forall x.
CreateClusterSubnetGroup -> Rep CreateClusterSubnetGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateClusterSubnetGroup' 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', 'createClusterSubnetGroup_tags' - A list of tag instances.
--
-- 'clusterSubnetGroupName', 'createClusterSubnetGroup_clusterSubnetGroupName' - The name for the subnet group. Amazon Redshift stores the value as a
-- lowercase string.
--
-- Constraints:
--
-- -   Must contain no more than 255 alphanumeric characters or hyphens.
--
-- -   Must not be \"Default\".
--
-- -   Must be unique for all subnet groups that are created by your Amazon
--     Web Services account.
--
-- Example: @examplesubnetgroup@
--
-- 'description', 'createClusterSubnetGroup_description' - A description for the subnet group.
--
-- 'subnetIds', 'createClusterSubnetGroup_subnetIds' - An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a
-- single request.
newCreateClusterSubnetGroup ::
  -- | 'clusterSubnetGroupName'
  Prelude.Text ->
  -- | 'description'
  Prelude.Text ->
  CreateClusterSubnetGroup
newCreateClusterSubnetGroup :: Text -> Text -> CreateClusterSubnetGroup
newCreateClusterSubnetGroup
  Text
pClusterSubnetGroupName_
  Text
pDescription_ =
    CreateClusterSubnetGroup' :: Maybe [Tag] -> Text -> Text -> [Text] -> CreateClusterSubnetGroup
CreateClusterSubnetGroup'
      { $sel:tags:CreateClusterSubnetGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:clusterSubnetGroupName:CreateClusterSubnetGroup' :: Text
clusterSubnetGroupName = Text
pClusterSubnetGroupName_,
        $sel:description:CreateClusterSubnetGroup' :: Text
description = Text
pDescription_,
        $sel:subnetIds:CreateClusterSubnetGroup' :: [Text]
subnetIds = [Text]
forall a. Monoid a => a
Prelude.mempty
      }

-- | A list of tag instances.
createClusterSubnetGroup_tags :: Lens.Lens' CreateClusterSubnetGroup (Prelude.Maybe [Tag])
createClusterSubnetGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateClusterSubnetGroup -> f CreateClusterSubnetGroup
createClusterSubnetGroup_tags = (CreateClusterSubnetGroup -> Maybe [Tag])
-> (CreateClusterSubnetGroup
    -> Maybe [Tag] -> CreateClusterSubnetGroup)
-> Lens
     CreateClusterSubnetGroup
     CreateClusterSubnetGroup
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClusterSubnetGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateClusterSubnetGroup' :: CreateClusterSubnetGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateClusterSubnetGroup
s@CreateClusterSubnetGroup' {} Maybe [Tag]
a -> CreateClusterSubnetGroup
s {$sel:tags:CreateClusterSubnetGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateClusterSubnetGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateClusterSubnetGroup -> f CreateClusterSubnetGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateClusterSubnetGroup
-> f CreateClusterSubnetGroup
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

-- | The name for the subnet group. Amazon Redshift stores the value as a
-- lowercase string.
--
-- Constraints:
--
-- -   Must contain no more than 255 alphanumeric characters or hyphens.
--
-- -   Must not be \"Default\".
--
-- -   Must be unique for all subnet groups that are created by your Amazon
--     Web Services account.
--
-- Example: @examplesubnetgroup@
createClusterSubnetGroup_clusterSubnetGroupName :: Lens.Lens' CreateClusterSubnetGroup Prelude.Text
createClusterSubnetGroup_clusterSubnetGroupName :: (Text -> f Text)
-> CreateClusterSubnetGroup -> f CreateClusterSubnetGroup
createClusterSubnetGroup_clusterSubnetGroupName = (CreateClusterSubnetGroup -> Text)
-> (CreateClusterSubnetGroup -> Text -> CreateClusterSubnetGroup)
-> Lens CreateClusterSubnetGroup CreateClusterSubnetGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClusterSubnetGroup' {Text
clusterSubnetGroupName :: Text
$sel:clusterSubnetGroupName:CreateClusterSubnetGroup' :: CreateClusterSubnetGroup -> Text
clusterSubnetGroupName} -> Text
clusterSubnetGroupName) (\s :: CreateClusterSubnetGroup
s@CreateClusterSubnetGroup' {} Text
a -> CreateClusterSubnetGroup
s {$sel:clusterSubnetGroupName:CreateClusterSubnetGroup' :: Text
clusterSubnetGroupName = Text
a} :: CreateClusterSubnetGroup)

-- | A description for the subnet group.
createClusterSubnetGroup_description :: Lens.Lens' CreateClusterSubnetGroup Prelude.Text
createClusterSubnetGroup_description :: (Text -> f Text)
-> CreateClusterSubnetGroup -> f CreateClusterSubnetGroup
createClusterSubnetGroup_description = (CreateClusterSubnetGroup -> Text)
-> (CreateClusterSubnetGroup -> Text -> CreateClusterSubnetGroup)
-> Lens CreateClusterSubnetGroup CreateClusterSubnetGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClusterSubnetGroup' {Text
description :: Text
$sel:description:CreateClusterSubnetGroup' :: CreateClusterSubnetGroup -> Text
description} -> Text
description) (\s :: CreateClusterSubnetGroup
s@CreateClusterSubnetGroup' {} Text
a -> CreateClusterSubnetGroup
s {$sel:description:CreateClusterSubnetGroup' :: Text
description = Text
a} :: CreateClusterSubnetGroup)

-- | An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a
-- single request.
createClusterSubnetGroup_subnetIds :: Lens.Lens' CreateClusterSubnetGroup [Prelude.Text]
createClusterSubnetGroup_subnetIds :: ([Text] -> f [Text])
-> CreateClusterSubnetGroup -> f CreateClusterSubnetGroup
createClusterSubnetGroup_subnetIds = (CreateClusterSubnetGroup -> [Text])
-> (CreateClusterSubnetGroup -> [Text] -> CreateClusterSubnetGroup)
-> Lens
     CreateClusterSubnetGroup CreateClusterSubnetGroup [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClusterSubnetGroup' {[Text]
subnetIds :: [Text]
$sel:subnetIds:CreateClusterSubnetGroup' :: CreateClusterSubnetGroup -> [Text]
subnetIds} -> [Text]
subnetIds) (\s :: CreateClusterSubnetGroup
s@CreateClusterSubnetGroup' {} [Text]
a -> CreateClusterSubnetGroup
s {$sel:subnetIds:CreateClusterSubnetGroup' :: [Text]
subnetIds = [Text]
a} :: CreateClusterSubnetGroup) (([Text] -> f [Text])
 -> CreateClusterSubnetGroup -> f CreateClusterSubnetGroup)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> CreateClusterSubnetGroup
-> f CreateClusterSubnetGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest CreateClusterSubnetGroup where
  type
    AWSResponse CreateClusterSubnetGroup =
      CreateClusterSubnetGroupResponse
  request :: CreateClusterSubnetGroup -> Request CreateClusterSubnetGroup
request = Service
-> CreateClusterSubnetGroup -> Request CreateClusterSubnetGroup
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateClusterSubnetGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateClusterSubnetGroup)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateClusterSubnetGroup))
-> Logger
-> Service
-> Proxy CreateClusterSubnetGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateClusterSubnetGroup)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"CreateClusterSubnetGroupResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe ClusterSubnetGroup -> Int -> CreateClusterSubnetGroupResponse
CreateClusterSubnetGroupResponse'
            (Maybe ClusterSubnetGroup
 -> Int -> CreateClusterSubnetGroupResponse)
-> Either String (Maybe ClusterSubnetGroup)
-> Either String (Int -> CreateClusterSubnetGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ClusterSubnetGroup)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ClusterSubnetGroup")
            Either String (Int -> CreateClusterSubnetGroupResponse)
-> Either String Int
-> Either String CreateClusterSubnetGroupResponse
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 CreateClusterSubnetGroup

instance Prelude.NFData CreateClusterSubnetGroup

instance Core.ToHeaders CreateClusterSubnetGroup where
  toHeaders :: CreateClusterSubnetGroup -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateClusterSubnetGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery CreateClusterSubnetGroup where
  toQuery :: CreateClusterSubnetGroup -> QueryString
toQuery CreateClusterSubnetGroup' {[Text]
Maybe [Tag]
Text
subnetIds :: [Text]
description :: Text
clusterSubnetGroupName :: Text
tags :: Maybe [Tag]
$sel:subnetIds:CreateClusterSubnetGroup' :: CreateClusterSubnetGroup -> [Text]
$sel:description:CreateClusterSubnetGroup' :: CreateClusterSubnetGroup -> Text
$sel:clusterSubnetGroupName:CreateClusterSubnetGroup' :: CreateClusterSubnetGroup -> Text
$sel:tags:CreateClusterSubnetGroup' :: CreateClusterSubnetGroup -> Maybe [Tag]
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateClusterSubnetGroup" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"Tags"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Tag" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"ClusterSubnetGroupName"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
clusterSubnetGroupName,
        ByteString
"Description" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
description,
        ByteString
"SubnetIds"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"SubnetIdentifier" [Text]
subnetIds
      ]

-- | /See:/ 'newCreateClusterSubnetGroupResponse' smart constructor.
data CreateClusterSubnetGroupResponse = CreateClusterSubnetGroupResponse'
  { CreateClusterSubnetGroupResponse -> Maybe ClusterSubnetGroup
clusterSubnetGroup :: Prelude.Maybe ClusterSubnetGroup,
    -- | The response's http status code.
    CreateClusterSubnetGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateClusterSubnetGroupResponse
-> CreateClusterSubnetGroupResponse -> Bool
(CreateClusterSubnetGroupResponse
 -> CreateClusterSubnetGroupResponse -> Bool)
-> (CreateClusterSubnetGroupResponse
    -> CreateClusterSubnetGroupResponse -> Bool)
-> Eq CreateClusterSubnetGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateClusterSubnetGroupResponse
-> CreateClusterSubnetGroupResponse -> Bool
$c/= :: CreateClusterSubnetGroupResponse
-> CreateClusterSubnetGroupResponse -> Bool
== :: CreateClusterSubnetGroupResponse
-> CreateClusterSubnetGroupResponse -> Bool
$c== :: CreateClusterSubnetGroupResponse
-> CreateClusterSubnetGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateClusterSubnetGroupResponse]
ReadPrec CreateClusterSubnetGroupResponse
Int -> ReadS CreateClusterSubnetGroupResponse
ReadS [CreateClusterSubnetGroupResponse]
(Int -> ReadS CreateClusterSubnetGroupResponse)
-> ReadS [CreateClusterSubnetGroupResponse]
-> ReadPrec CreateClusterSubnetGroupResponse
-> ReadPrec [CreateClusterSubnetGroupResponse]
-> Read CreateClusterSubnetGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateClusterSubnetGroupResponse]
$creadListPrec :: ReadPrec [CreateClusterSubnetGroupResponse]
readPrec :: ReadPrec CreateClusterSubnetGroupResponse
$creadPrec :: ReadPrec CreateClusterSubnetGroupResponse
readList :: ReadS [CreateClusterSubnetGroupResponse]
$creadList :: ReadS [CreateClusterSubnetGroupResponse]
readsPrec :: Int -> ReadS CreateClusterSubnetGroupResponse
$creadsPrec :: Int -> ReadS CreateClusterSubnetGroupResponse
Prelude.Read, Int -> CreateClusterSubnetGroupResponse -> ShowS
[CreateClusterSubnetGroupResponse] -> ShowS
CreateClusterSubnetGroupResponse -> String
(Int -> CreateClusterSubnetGroupResponse -> ShowS)
-> (CreateClusterSubnetGroupResponse -> String)
-> ([CreateClusterSubnetGroupResponse] -> ShowS)
-> Show CreateClusterSubnetGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateClusterSubnetGroupResponse] -> ShowS
$cshowList :: [CreateClusterSubnetGroupResponse] -> ShowS
show :: CreateClusterSubnetGroupResponse -> String
$cshow :: CreateClusterSubnetGroupResponse -> String
showsPrec :: Int -> CreateClusterSubnetGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateClusterSubnetGroupResponse -> ShowS
Prelude.Show, (forall x.
 CreateClusterSubnetGroupResponse
 -> Rep CreateClusterSubnetGroupResponse x)
-> (forall x.
    Rep CreateClusterSubnetGroupResponse x
    -> CreateClusterSubnetGroupResponse)
-> Generic CreateClusterSubnetGroupResponse
forall x.
Rep CreateClusterSubnetGroupResponse x
-> CreateClusterSubnetGroupResponse
forall x.
CreateClusterSubnetGroupResponse
-> Rep CreateClusterSubnetGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateClusterSubnetGroupResponse x
-> CreateClusterSubnetGroupResponse
$cfrom :: forall x.
CreateClusterSubnetGroupResponse
-> Rep CreateClusterSubnetGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateClusterSubnetGroupResponse' 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:
--
-- 'clusterSubnetGroup', 'createClusterSubnetGroupResponse_clusterSubnetGroup' - Undocumented member.
--
-- 'httpStatus', 'createClusterSubnetGroupResponse_httpStatus' - The response's http status code.
newCreateClusterSubnetGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateClusterSubnetGroupResponse
newCreateClusterSubnetGroupResponse :: Int -> CreateClusterSubnetGroupResponse
newCreateClusterSubnetGroupResponse Int
pHttpStatus_ =
  CreateClusterSubnetGroupResponse' :: Maybe ClusterSubnetGroup -> Int -> CreateClusterSubnetGroupResponse
CreateClusterSubnetGroupResponse'
    { $sel:clusterSubnetGroup:CreateClusterSubnetGroupResponse' :: Maybe ClusterSubnetGroup
clusterSubnetGroup =
        Maybe ClusterSubnetGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateClusterSubnetGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createClusterSubnetGroupResponse_clusterSubnetGroup :: Lens.Lens' CreateClusterSubnetGroupResponse (Prelude.Maybe ClusterSubnetGroup)
createClusterSubnetGroupResponse_clusterSubnetGroup :: (Maybe ClusterSubnetGroup -> f (Maybe ClusterSubnetGroup))
-> CreateClusterSubnetGroupResponse
-> f CreateClusterSubnetGroupResponse
createClusterSubnetGroupResponse_clusterSubnetGroup = (CreateClusterSubnetGroupResponse -> Maybe ClusterSubnetGroup)
-> (CreateClusterSubnetGroupResponse
    -> Maybe ClusterSubnetGroup -> CreateClusterSubnetGroupResponse)
-> Lens
     CreateClusterSubnetGroupResponse
     CreateClusterSubnetGroupResponse
     (Maybe ClusterSubnetGroup)
     (Maybe ClusterSubnetGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClusterSubnetGroupResponse' {Maybe ClusterSubnetGroup
clusterSubnetGroup :: Maybe ClusterSubnetGroup
$sel:clusterSubnetGroup:CreateClusterSubnetGroupResponse' :: CreateClusterSubnetGroupResponse -> Maybe ClusterSubnetGroup
clusterSubnetGroup} -> Maybe ClusterSubnetGroup
clusterSubnetGroup) (\s :: CreateClusterSubnetGroupResponse
s@CreateClusterSubnetGroupResponse' {} Maybe ClusterSubnetGroup
a -> CreateClusterSubnetGroupResponse
s {$sel:clusterSubnetGroup:CreateClusterSubnetGroupResponse' :: Maybe ClusterSubnetGroup
clusterSubnetGroup = Maybe ClusterSubnetGroup
a} :: CreateClusterSubnetGroupResponse)

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

instance
  Prelude.NFData
    CreateClusterSubnetGroupResponse