{-# 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.ElasticSearch.DescribeElasticsearchInstanceTypeLimits
-- 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)
--
-- Describe Elasticsearch Limits for a given InstanceType and
-- ElasticsearchVersion. When modifying existing Domain, specify the
-- @ DomainName @ to know what Limits are supported for modifying.
module Amazonka.ElasticSearch.DescribeElasticsearchInstanceTypeLimits
  ( -- * Creating a Request
    DescribeElasticsearchInstanceTypeLimits (..),
    newDescribeElasticsearchInstanceTypeLimits,

    -- * Request Lenses
    describeElasticsearchInstanceTypeLimits_domainName,
    describeElasticsearchInstanceTypeLimits_instanceType,
    describeElasticsearchInstanceTypeLimits_elasticsearchVersion,

    -- * Destructuring the Response
    DescribeElasticsearchInstanceTypeLimitsResponse (..),
    newDescribeElasticsearchInstanceTypeLimitsResponse,

    -- * Response Lenses
    describeElasticsearchInstanceTypeLimitsResponse_limitsByRole,
    describeElasticsearchInstanceTypeLimitsResponse_httpStatus,
  )
where

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

-- | Container for the parameters to
-- @ DescribeElasticsearchInstanceTypeLimits @ operation.
--
-- /See:/ 'newDescribeElasticsearchInstanceTypeLimits' smart constructor.
data DescribeElasticsearchInstanceTypeLimits = DescribeElasticsearchInstanceTypeLimits'
  { -- | DomainName represents the name of the Domain that we are trying to
    -- modify. This should be present only if we are querying for Elasticsearch
    -- @ Limits @ for existing domain.
    DescribeElasticsearchInstanceTypeLimits -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
    -- | The instance type for an Elasticsearch cluster for which Elasticsearch
    -- @ Limits @ are needed.
    DescribeElasticsearchInstanceTypeLimits -> ESPartitionInstanceType
instanceType :: ESPartitionInstanceType,
    -- | Version of Elasticsearch for which @ Limits @ are needed.
    DescribeElasticsearchInstanceTypeLimits -> Text
elasticsearchVersion :: Prelude.Text
  }
  deriving (DescribeElasticsearchInstanceTypeLimits
-> DescribeElasticsearchInstanceTypeLimits -> Bool
(DescribeElasticsearchInstanceTypeLimits
 -> DescribeElasticsearchInstanceTypeLimits -> Bool)
-> (DescribeElasticsearchInstanceTypeLimits
    -> DescribeElasticsearchInstanceTypeLimits -> Bool)
-> Eq DescribeElasticsearchInstanceTypeLimits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeElasticsearchInstanceTypeLimits
-> DescribeElasticsearchInstanceTypeLimits -> Bool
$c/= :: DescribeElasticsearchInstanceTypeLimits
-> DescribeElasticsearchInstanceTypeLimits -> Bool
== :: DescribeElasticsearchInstanceTypeLimits
-> DescribeElasticsearchInstanceTypeLimits -> Bool
$c== :: DescribeElasticsearchInstanceTypeLimits
-> DescribeElasticsearchInstanceTypeLimits -> Bool
Prelude.Eq, ReadPrec [DescribeElasticsearchInstanceTypeLimits]
ReadPrec DescribeElasticsearchInstanceTypeLimits
Int -> ReadS DescribeElasticsearchInstanceTypeLimits
ReadS [DescribeElasticsearchInstanceTypeLimits]
(Int -> ReadS DescribeElasticsearchInstanceTypeLimits)
-> ReadS [DescribeElasticsearchInstanceTypeLimits]
-> ReadPrec DescribeElasticsearchInstanceTypeLimits
-> ReadPrec [DescribeElasticsearchInstanceTypeLimits]
-> Read DescribeElasticsearchInstanceTypeLimits
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeElasticsearchInstanceTypeLimits]
$creadListPrec :: ReadPrec [DescribeElasticsearchInstanceTypeLimits]
readPrec :: ReadPrec DescribeElasticsearchInstanceTypeLimits
$creadPrec :: ReadPrec DescribeElasticsearchInstanceTypeLimits
readList :: ReadS [DescribeElasticsearchInstanceTypeLimits]
$creadList :: ReadS [DescribeElasticsearchInstanceTypeLimits]
readsPrec :: Int -> ReadS DescribeElasticsearchInstanceTypeLimits
$creadsPrec :: Int -> ReadS DescribeElasticsearchInstanceTypeLimits
Prelude.Read, Int -> DescribeElasticsearchInstanceTypeLimits -> ShowS
[DescribeElasticsearchInstanceTypeLimits] -> ShowS
DescribeElasticsearchInstanceTypeLimits -> String
(Int -> DescribeElasticsearchInstanceTypeLimits -> ShowS)
-> (DescribeElasticsearchInstanceTypeLimits -> String)
-> ([DescribeElasticsearchInstanceTypeLimits] -> ShowS)
-> Show DescribeElasticsearchInstanceTypeLimits
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeElasticsearchInstanceTypeLimits] -> ShowS
$cshowList :: [DescribeElasticsearchInstanceTypeLimits] -> ShowS
show :: DescribeElasticsearchInstanceTypeLimits -> String
$cshow :: DescribeElasticsearchInstanceTypeLimits -> String
showsPrec :: Int -> DescribeElasticsearchInstanceTypeLimits -> ShowS
$cshowsPrec :: Int -> DescribeElasticsearchInstanceTypeLimits -> ShowS
Prelude.Show, (forall x.
 DescribeElasticsearchInstanceTypeLimits
 -> Rep DescribeElasticsearchInstanceTypeLimits x)
-> (forall x.
    Rep DescribeElasticsearchInstanceTypeLimits x
    -> DescribeElasticsearchInstanceTypeLimits)
-> Generic DescribeElasticsearchInstanceTypeLimits
forall x.
Rep DescribeElasticsearchInstanceTypeLimits x
-> DescribeElasticsearchInstanceTypeLimits
forall x.
DescribeElasticsearchInstanceTypeLimits
-> Rep DescribeElasticsearchInstanceTypeLimits x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeElasticsearchInstanceTypeLimits x
-> DescribeElasticsearchInstanceTypeLimits
$cfrom :: forall x.
DescribeElasticsearchInstanceTypeLimits
-> Rep DescribeElasticsearchInstanceTypeLimits x
Prelude.Generic)

-- |
-- Create a value of 'DescribeElasticsearchInstanceTypeLimits' 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:
--
-- 'domainName', 'describeElasticsearchInstanceTypeLimits_domainName' - DomainName represents the name of the Domain that we are trying to
-- modify. This should be present only if we are querying for Elasticsearch
-- @ Limits @ for existing domain.
--
-- 'instanceType', 'describeElasticsearchInstanceTypeLimits_instanceType' - The instance type for an Elasticsearch cluster for which Elasticsearch
-- @ Limits @ are needed.
--
-- 'elasticsearchVersion', 'describeElasticsearchInstanceTypeLimits_elasticsearchVersion' - Version of Elasticsearch for which @ Limits @ are needed.
newDescribeElasticsearchInstanceTypeLimits ::
  -- | 'instanceType'
  ESPartitionInstanceType ->
  -- | 'elasticsearchVersion'
  Prelude.Text ->
  DescribeElasticsearchInstanceTypeLimits
newDescribeElasticsearchInstanceTypeLimits :: ESPartitionInstanceType
-> Text -> DescribeElasticsearchInstanceTypeLimits
newDescribeElasticsearchInstanceTypeLimits
  ESPartitionInstanceType
pInstanceType_
  Text
pElasticsearchVersion_ =
    DescribeElasticsearchInstanceTypeLimits' :: Maybe Text
-> ESPartitionInstanceType
-> Text
-> DescribeElasticsearchInstanceTypeLimits
DescribeElasticsearchInstanceTypeLimits'
      { $sel:domainName:DescribeElasticsearchInstanceTypeLimits' :: Maybe Text
domainName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:instanceType:DescribeElasticsearchInstanceTypeLimits' :: ESPartitionInstanceType
instanceType = ESPartitionInstanceType
pInstanceType_,
        $sel:elasticsearchVersion:DescribeElasticsearchInstanceTypeLimits' :: Text
elasticsearchVersion =
          Text
pElasticsearchVersion_
      }

-- | DomainName represents the name of the Domain that we are trying to
-- modify. This should be present only if we are querying for Elasticsearch
-- @ Limits @ for existing domain.
describeElasticsearchInstanceTypeLimits_domainName :: Lens.Lens' DescribeElasticsearchInstanceTypeLimits (Prelude.Maybe Prelude.Text)
describeElasticsearchInstanceTypeLimits_domainName :: (Maybe Text -> f (Maybe Text))
-> DescribeElasticsearchInstanceTypeLimits
-> f DescribeElasticsearchInstanceTypeLimits
describeElasticsearchInstanceTypeLimits_domainName = (DescribeElasticsearchInstanceTypeLimits -> Maybe Text)
-> (DescribeElasticsearchInstanceTypeLimits
    -> Maybe Text -> DescribeElasticsearchInstanceTypeLimits)
-> Lens
     DescribeElasticsearchInstanceTypeLimits
     DescribeElasticsearchInstanceTypeLimits
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeElasticsearchInstanceTypeLimits' {Maybe Text
domainName :: Maybe Text
$sel:domainName:DescribeElasticsearchInstanceTypeLimits' :: DescribeElasticsearchInstanceTypeLimits -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: DescribeElasticsearchInstanceTypeLimits
s@DescribeElasticsearchInstanceTypeLimits' {} Maybe Text
a -> DescribeElasticsearchInstanceTypeLimits
s {$sel:domainName:DescribeElasticsearchInstanceTypeLimits' :: Maybe Text
domainName = Maybe Text
a} :: DescribeElasticsearchInstanceTypeLimits)

-- | The instance type for an Elasticsearch cluster for which Elasticsearch
-- @ Limits @ are needed.
describeElasticsearchInstanceTypeLimits_instanceType :: Lens.Lens' DescribeElasticsearchInstanceTypeLimits ESPartitionInstanceType
describeElasticsearchInstanceTypeLimits_instanceType :: (ESPartitionInstanceType -> f ESPartitionInstanceType)
-> DescribeElasticsearchInstanceTypeLimits
-> f DescribeElasticsearchInstanceTypeLimits
describeElasticsearchInstanceTypeLimits_instanceType = (DescribeElasticsearchInstanceTypeLimits
 -> ESPartitionInstanceType)
-> (DescribeElasticsearchInstanceTypeLimits
    -> ESPartitionInstanceType
    -> DescribeElasticsearchInstanceTypeLimits)
-> Lens
     DescribeElasticsearchInstanceTypeLimits
     DescribeElasticsearchInstanceTypeLimits
     ESPartitionInstanceType
     ESPartitionInstanceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeElasticsearchInstanceTypeLimits' {ESPartitionInstanceType
instanceType :: ESPartitionInstanceType
$sel:instanceType:DescribeElasticsearchInstanceTypeLimits' :: DescribeElasticsearchInstanceTypeLimits -> ESPartitionInstanceType
instanceType} -> ESPartitionInstanceType
instanceType) (\s :: DescribeElasticsearchInstanceTypeLimits
s@DescribeElasticsearchInstanceTypeLimits' {} ESPartitionInstanceType
a -> DescribeElasticsearchInstanceTypeLimits
s {$sel:instanceType:DescribeElasticsearchInstanceTypeLimits' :: ESPartitionInstanceType
instanceType = ESPartitionInstanceType
a} :: DescribeElasticsearchInstanceTypeLimits)

-- | Version of Elasticsearch for which @ Limits @ are needed.
describeElasticsearchInstanceTypeLimits_elasticsearchVersion :: Lens.Lens' DescribeElasticsearchInstanceTypeLimits Prelude.Text
describeElasticsearchInstanceTypeLimits_elasticsearchVersion :: (Text -> f Text)
-> DescribeElasticsearchInstanceTypeLimits
-> f DescribeElasticsearchInstanceTypeLimits
describeElasticsearchInstanceTypeLimits_elasticsearchVersion = (DescribeElasticsearchInstanceTypeLimits -> Text)
-> (DescribeElasticsearchInstanceTypeLimits
    -> Text -> DescribeElasticsearchInstanceTypeLimits)
-> Lens
     DescribeElasticsearchInstanceTypeLimits
     DescribeElasticsearchInstanceTypeLimits
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeElasticsearchInstanceTypeLimits' {Text
elasticsearchVersion :: Text
$sel:elasticsearchVersion:DescribeElasticsearchInstanceTypeLimits' :: DescribeElasticsearchInstanceTypeLimits -> Text
elasticsearchVersion} -> Text
elasticsearchVersion) (\s :: DescribeElasticsearchInstanceTypeLimits
s@DescribeElasticsearchInstanceTypeLimits' {} Text
a -> DescribeElasticsearchInstanceTypeLimits
s {$sel:elasticsearchVersion:DescribeElasticsearchInstanceTypeLimits' :: Text
elasticsearchVersion = Text
a} :: DescribeElasticsearchInstanceTypeLimits)

instance
  Core.AWSRequest
    DescribeElasticsearchInstanceTypeLimits
  where
  type
    AWSResponse
      DescribeElasticsearchInstanceTypeLimits =
      DescribeElasticsearchInstanceTypeLimitsResponse
  request :: DescribeElasticsearchInstanceTypeLimits
-> Request DescribeElasticsearchInstanceTypeLimits
request = Service
-> DescribeElasticsearchInstanceTypeLimits
-> Request DescribeElasticsearchInstanceTypeLimits
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeElasticsearchInstanceTypeLimits
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeElasticsearchInstanceTypeLimits)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse DescribeElasticsearchInstanceTypeLimits))
-> Logger
-> Service
-> Proxy DescribeElasticsearchInstanceTypeLimits
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeElasticsearchInstanceTypeLimits)))
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 (HashMap Text Limits)
-> Int -> DescribeElasticsearchInstanceTypeLimitsResponse
DescribeElasticsearchInstanceTypeLimitsResponse'
            (Maybe (HashMap Text Limits)
 -> Int -> DescribeElasticsearchInstanceTypeLimitsResponse)
-> Either String (Maybe (HashMap Text Limits))
-> Either
     String (Int -> DescribeElasticsearchInstanceTypeLimitsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe (Maybe (HashMap Text Limits)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LimitsByRole" Either String (Maybe (Maybe (HashMap Text Limits)))
-> Maybe (HashMap Text Limits)
-> Either String (Maybe (HashMap Text Limits))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Limits)
forall a. Monoid a => a
Prelude.mempty)
              Either
  String (Int -> DescribeElasticsearchInstanceTypeLimitsResponse)
-> Either String Int
-> Either String DescribeElasticsearchInstanceTypeLimitsResponse
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
    DescribeElasticsearchInstanceTypeLimits

instance
  Prelude.NFData
    DescribeElasticsearchInstanceTypeLimits

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

instance
  Core.ToPath
    DescribeElasticsearchInstanceTypeLimits
  where
  toPath :: DescribeElasticsearchInstanceTypeLimits -> ByteString
toPath DescribeElasticsearchInstanceTypeLimits' {Maybe Text
Text
ESPartitionInstanceType
elasticsearchVersion :: Text
instanceType :: ESPartitionInstanceType
domainName :: Maybe Text
$sel:elasticsearchVersion:DescribeElasticsearchInstanceTypeLimits' :: DescribeElasticsearchInstanceTypeLimits -> Text
$sel:instanceType:DescribeElasticsearchInstanceTypeLimits' :: DescribeElasticsearchInstanceTypeLimits -> ESPartitionInstanceType
$sel:domainName:DescribeElasticsearchInstanceTypeLimits' :: DescribeElasticsearchInstanceTypeLimits -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2015-01-01/es/instanceTypeLimits/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
elasticsearchVersion,
        ByteString
"/",
        ESPartitionInstanceType -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS ESPartitionInstanceType
instanceType
      ]

instance
  Core.ToQuery
    DescribeElasticsearchInstanceTypeLimits
  where
  toQuery :: DescribeElasticsearchInstanceTypeLimits -> QueryString
toQuery DescribeElasticsearchInstanceTypeLimits' {Maybe Text
Text
ESPartitionInstanceType
elasticsearchVersion :: Text
instanceType :: ESPartitionInstanceType
domainName :: Maybe Text
$sel:elasticsearchVersion:DescribeElasticsearchInstanceTypeLimits' :: DescribeElasticsearchInstanceTypeLimits -> Text
$sel:instanceType:DescribeElasticsearchInstanceTypeLimits' :: DescribeElasticsearchInstanceTypeLimits -> ESPartitionInstanceType
$sel:domainName:DescribeElasticsearchInstanceTypeLimits' :: DescribeElasticsearchInstanceTypeLimits -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"domainName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
domainName]

-- | Container for the parameters received from
-- @ DescribeElasticsearchInstanceTypeLimits @ operation.
--
-- /See:/ 'newDescribeElasticsearchInstanceTypeLimitsResponse' smart constructor.
data DescribeElasticsearchInstanceTypeLimitsResponse = DescribeElasticsearchInstanceTypeLimitsResponse'
  { DescribeElasticsearchInstanceTypeLimitsResponse
-> Maybe (HashMap Text Limits)
limitsByRole :: Prelude.Maybe (Prelude.HashMap Prelude.Text Limits),
    -- | The response's http status code.
    DescribeElasticsearchInstanceTypeLimitsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeElasticsearchInstanceTypeLimitsResponse
-> DescribeElasticsearchInstanceTypeLimitsResponse -> Bool
(DescribeElasticsearchInstanceTypeLimitsResponse
 -> DescribeElasticsearchInstanceTypeLimitsResponse -> Bool)
-> (DescribeElasticsearchInstanceTypeLimitsResponse
    -> DescribeElasticsearchInstanceTypeLimitsResponse -> Bool)
-> Eq DescribeElasticsearchInstanceTypeLimitsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeElasticsearchInstanceTypeLimitsResponse
-> DescribeElasticsearchInstanceTypeLimitsResponse -> Bool
$c/= :: DescribeElasticsearchInstanceTypeLimitsResponse
-> DescribeElasticsearchInstanceTypeLimitsResponse -> Bool
== :: DescribeElasticsearchInstanceTypeLimitsResponse
-> DescribeElasticsearchInstanceTypeLimitsResponse -> Bool
$c== :: DescribeElasticsearchInstanceTypeLimitsResponse
-> DescribeElasticsearchInstanceTypeLimitsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeElasticsearchInstanceTypeLimitsResponse]
ReadPrec DescribeElasticsearchInstanceTypeLimitsResponse
Int -> ReadS DescribeElasticsearchInstanceTypeLimitsResponse
ReadS [DescribeElasticsearchInstanceTypeLimitsResponse]
(Int -> ReadS DescribeElasticsearchInstanceTypeLimitsResponse)
-> ReadS [DescribeElasticsearchInstanceTypeLimitsResponse]
-> ReadPrec DescribeElasticsearchInstanceTypeLimitsResponse
-> ReadPrec [DescribeElasticsearchInstanceTypeLimitsResponse]
-> Read DescribeElasticsearchInstanceTypeLimitsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeElasticsearchInstanceTypeLimitsResponse]
$creadListPrec :: ReadPrec [DescribeElasticsearchInstanceTypeLimitsResponse]
readPrec :: ReadPrec DescribeElasticsearchInstanceTypeLimitsResponse
$creadPrec :: ReadPrec DescribeElasticsearchInstanceTypeLimitsResponse
readList :: ReadS [DescribeElasticsearchInstanceTypeLimitsResponse]
$creadList :: ReadS [DescribeElasticsearchInstanceTypeLimitsResponse]
readsPrec :: Int -> ReadS DescribeElasticsearchInstanceTypeLimitsResponse
$creadsPrec :: Int -> ReadS DescribeElasticsearchInstanceTypeLimitsResponse
Prelude.Read, Int -> DescribeElasticsearchInstanceTypeLimitsResponse -> ShowS
[DescribeElasticsearchInstanceTypeLimitsResponse] -> ShowS
DescribeElasticsearchInstanceTypeLimitsResponse -> String
(Int -> DescribeElasticsearchInstanceTypeLimitsResponse -> ShowS)
-> (DescribeElasticsearchInstanceTypeLimitsResponse -> String)
-> ([DescribeElasticsearchInstanceTypeLimitsResponse] -> ShowS)
-> Show DescribeElasticsearchInstanceTypeLimitsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeElasticsearchInstanceTypeLimitsResponse] -> ShowS
$cshowList :: [DescribeElasticsearchInstanceTypeLimitsResponse] -> ShowS
show :: DescribeElasticsearchInstanceTypeLimitsResponse -> String
$cshow :: DescribeElasticsearchInstanceTypeLimitsResponse -> String
showsPrec :: Int -> DescribeElasticsearchInstanceTypeLimitsResponse -> ShowS
$cshowsPrec :: Int -> DescribeElasticsearchInstanceTypeLimitsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeElasticsearchInstanceTypeLimitsResponse
 -> Rep DescribeElasticsearchInstanceTypeLimitsResponse x)
-> (forall x.
    Rep DescribeElasticsearchInstanceTypeLimitsResponse x
    -> DescribeElasticsearchInstanceTypeLimitsResponse)
-> Generic DescribeElasticsearchInstanceTypeLimitsResponse
forall x.
Rep DescribeElasticsearchInstanceTypeLimitsResponse x
-> DescribeElasticsearchInstanceTypeLimitsResponse
forall x.
DescribeElasticsearchInstanceTypeLimitsResponse
-> Rep DescribeElasticsearchInstanceTypeLimitsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeElasticsearchInstanceTypeLimitsResponse x
-> DescribeElasticsearchInstanceTypeLimitsResponse
$cfrom :: forall x.
DescribeElasticsearchInstanceTypeLimitsResponse
-> Rep DescribeElasticsearchInstanceTypeLimitsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeElasticsearchInstanceTypeLimitsResponse' 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:
--
-- 'limitsByRole', 'describeElasticsearchInstanceTypeLimitsResponse_limitsByRole' - Undocumented member.
--
-- 'httpStatus', 'describeElasticsearchInstanceTypeLimitsResponse_httpStatus' - The response's http status code.
newDescribeElasticsearchInstanceTypeLimitsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeElasticsearchInstanceTypeLimitsResponse
newDescribeElasticsearchInstanceTypeLimitsResponse :: Int -> DescribeElasticsearchInstanceTypeLimitsResponse
newDescribeElasticsearchInstanceTypeLimitsResponse
  Int
pHttpStatus_ =
    DescribeElasticsearchInstanceTypeLimitsResponse' :: Maybe (HashMap Text Limits)
-> Int -> DescribeElasticsearchInstanceTypeLimitsResponse
DescribeElasticsearchInstanceTypeLimitsResponse'
      { $sel:limitsByRole:DescribeElasticsearchInstanceTypeLimitsResponse' :: Maybe (HashMap Text Limits)
limitsByRole =
          Maybe (HashMap Text Limits)
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeElasticsearchInstanceTypeLimitsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Undocumented member.
describeElasticsearchInstanceTypeLimitsResponse_limitsByRole :: Lens.Lens' DescribeElasticsearchInstanceTypeLimitsResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Limits))
describeElasticsearchInstanceTypeLimitsResponse_limitsByRole :: (Maybe (HashMap Text Limits) -> f (Maybe (HashMap Text Limits)))
-> DescribeElasticsearchInstanceTypeLimitsResponse
-> f DescribeElasticsearchInstanceTypeLimitsResponse
describeElasticsearchInstanceTypeLimitsResponse_limitsByRole = (DescribeElasticsearchInstanceTypeLimitsResponse
 -> Maybe (HashMap Text Limits))
-> (DescribeElasticsearchInstanceTypeLimitsResponse
    -> Maybe (HashMap Text Limits)
    -> DescribeElasticsearchInstanceTypeLimitsResponse)
-> Lens
     DescribeElasticsearchInstanceTypeLimitsResponse
     DescribeElasticsearchInstanceTypeLimitsResponse
     (Maybe (HashMap Text Limits))
     (Maybe (HashMap Text Limits))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeElasticsearchInstanceTypeLimitsResponse' {Maybe (HashMap Text Limits)
limitsByRole :: Maybe (HashMap Text Limits)
$sel:limitsByRole:DescribeElasticsearchInstanceTypeLimitsResponse' :: DescribeElasticsearchInstanceTypeLimitsResponse
-> Maybe (HashMap Text Limits)
limitsByRole} -> Maybe (HashMap Text Limits)
limitsByRole) (\s :: DescribeElasticsearchInstanceTypeLimitsResponse
s@DescribeElasticsearchInstanceTypeLimitsResponse' {} Maybe (HashMap Text Limits)
a -> DescribeElasticsearchInstanceTypeLimitsResponse
s {$sel:limitsByRole:DescribeElasticsearchInstanceTypeLimitsResponse' :: Maybe (HashMap Text Limits)
limitsByRole = Maybe (HashMap Text Limits)
a} :: DescribeElasticsearchInstanceTypeLimitsResponse) ((Maybe (HashMap Text Limits) -> f (Maybe (HashMap Text Limits)))
 -> DescribeElasticsearchInstanceTypeLimitsResponse
 -> f DescribeElasticsearchInstanceTypeLimitsResponse)
-> ((Maybe (HashMap Text Limits)
     -> f (Maybe (HashMap Text Limits)))
    -> Maybe (HashMap Text Limits) -> f (Maybe (HashMap Text Limits)))
-> (Maybe (HashMap Text Limits) -> f (Maybe (HashMap Text Limits)))
-> DescribeElasticsearchInstanceTypeLimitsResponse
-> f DescribeElasticsearchInstanceTypeLimitsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Limits)
  (HashMap Text Limits)
  (HashMap Text Limits)
  (HashMap Text Limits)
-> Iso
     (Maybe (HashMap Text Limits))
     (Maybe (HashMap Text Limits))
     (Maybe (HashMap Text Limits))
     (Maybe (HashMap Text Limits))
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 Limits)
  (HashMap Text Limits)
  (HashMap Text Limits)
  (HashMap Text Limits)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeElasticsearchInstanceTypeLimitsResponse