{-# 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 #-}
module Amazonka.Route53AutoNaming.DiscoverInstances
(
DiscoverInstances (..),
newDiscoverInstances,
discoverInstances_queryParameters,
discoverInstances_optionalParameters,
discoverInstances_healthStatus,
discoverInstances_maxResults,
discoverInstances_namespaceName,
discoverInstances_serviceName,
DiscoverInstancesResponse (..),
newDiscoverInstancesResponse,
discoverInstancesResponse_instances,
discoverInstancesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Route53AutoNaming.Types
data DiscoverInstances = DiscoverInstances'
{
DiscoverInstances -> Maybe (HashMap Text Text)
queryParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
DiscoverInstances -> Maybe (HashMap Text Text)
optionalParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
DiscoverInstances -> Maybe HealthStatusFilter
healthStatus :: Prelude.Maybe HealthStatusFilter,
DiscoverInstances -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
DiscoverInstances -> Text
namespaceName :: Prelude.Text,
DiscoverInstances -> Text
serviceName :: Prelude.Text
}
deriving (DiscoverInstances -> DiscoverInstances -> Bool
(DiscoverInstances -> DiscoverInstances -> Bool)
-> (DiscoverInstances -> DiscoverInstances -> Bool)
-> Eq DiscoverInstances
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DiscoverInstances -> DiscoverInstances -> Bool
$c/= :: DiscoverInstances -> DiscoverInstances -> Bool
== :: DiscoverInstances -> DiscoverInstances -> Bool
$c== :: DiscoverInstances -> DiscoverInstances -> Bool
Prelude.Eq, ReadPrec [DiscoverInstances]
ReadPrec DiscoverInstances
Int -> ReadS DiscoverInstances
ReadS [DiscoverInstances]
(Int -> ReadS DiscoverInstances)
-> ReadS [DiscoverInstances]
-> ReadPrec DiscoverInstances
-> ReadPrec [DiscoverInstances]
-> Read DiscoverInstances
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DiscoverInstances]
$creadListPrec :: ReadPrec [DiscoverInstances]
readPrec :: ReadPrec DiscoverInstances
$creadPrec :: ReadPrec DiscoverInstances
readList :: ReadS [DiscoverInstances]
$creadList :: ReadS [DiscoverInstances]
readsPrec :: Int -> ReadS DiscoverInstances
$creadsPrec :: Int -> ReadS DiscoverInstances
Prelude.Read, Int -> DiscoverInstances -> ShowS
[DiscoverInstances] -> ShowS
DiscoverInstances -> String
(Int -> DiscoverInstances -> ShowS)
-> (DiscoverInstances -> String)
-> ([DiscoverInstances] -> ShowS)
-> Show DiscoverInstances
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DiscoverInstances] -> ShowS
$cshowList :: [DiscoverInstances] -> ShowS
show :: DiscoverInstances -> String
$cshow :: DiscoverInstances -> String
showsPrec :: Int -> DiscoverInstances -> ShowS
$cshowsPrec :: Int -> DiscoverInstances -> ShowS
Prelude.Show, (forall x. DiscoverInstances -> Rep DiscoverInstances x)
-> (forall x. Rep DiscoverInstances x -> DiscoverInstances)
-> Generic DiscoverInstances
forall x. Rep DiscoverInstances x -> DiscoverInstances
forall x. DiscoverInstances -> Rep DiscoverInstances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DiscoverInstances x -> DiscoverInstances
$cfrom :: forall x. DiscoverInstances -> Rep DiscoverInstances x
Prelude.Generic)
newDiscoverInstances ::
Prelude.Text ->
Prelude.Text ->
DiscoverInstances
newDiscoverInstances :: Text -> Text -> DiscoverInstances
newDiscoverInstances Text
pNamespaceName_ Text
pServiceName_ =
DiscoverInstances' :: Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe HealthStatusFilter
-> Maybe Natural
-> Text
-> Text
-> DiscoverInstances
DiscoverInstances'
{ $sel:queryParameters:DiscoverInstances' :: Maybe (HashMap Text Text)
queryParameters =
Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:optionalParameters:DiscoverInstances' :: Maybe (HashMap Text Text)
optionalParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:healthStatus:DiscoverInstances' :: Maybe HealthStatusFilter
healthStatus = Maybe HealthStatusFilter
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DiscoverInstances' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:namespaceName:DiscoverInstances' :: Text
namespaceName = Text
pNamespaceName_,
$sel:serviceName:DiscoverInstances' :: Text
serviceName = Text
pServiceName_
}
discoverInstances_queryParameters :: Lens.Lens' DiscoverInstances (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
discoverInstances_queryParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DiscoverInstances -> f DiscoverInstances
discoverInstances_queryParameters = (DiscoverInstances -> Maybe (HashMap Text Text))
-> (DiscoverInstances
-> Maybe (HashMap Text Text) -> DiscoverInstances)
-> Lens
DiscoverInstances
DiscoverInstances
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiscoverInstances' {Maybe (HashMap Text Text)
queryParameters :: Maybe (HashMap Text Text)
$sel:queryParameters:DiscoverInstances' :: DiscoverInstances -> Maybe (HashMap Text Text)
queryParameters} -> Maybe (HashMap Text Text)
queryParameters) (\s :: DiscoverInstances
s@DiscoverInstances' {} Maybe (HashMap Text Text)
a -> DiscoverInstances
s {$sel:queryParameters:DiscoverInstances' :: Maybe (HashMap Text Text)
queryParameters = Maybe (HashMap Text Text)
a} :: DiscoverInstances) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DiscoverInstances -> f DiscoverInstances)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DiscoverInstances
-> f DiscoverInstances
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
discoverInstances_optionalParameters :: Lens.Lens' DiscoverInstances (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
discoverInstances_optionalParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DiscoverInstances -> f DiscoverInstances
discoverInstances_optionalParameters = (DiscoverInstances -> Maybe (HashMap Text Text))
-> (DiscoverInstances
-> Maybe (HashMap Text Text) -> DiscoverInstances)
-> Lens
DiscoverInstances
DiscoverInstances
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiscoverInstances' {Maybe (HashMap Text Text)
optionalParameters :: Maybe (HashMap Text Text)
$sel:optionalParameters:DiscoverInstances' :: DiscoverInstances -> Maybe (HashMap Text Text)
optionalParameters} -> Maybe (HashMap Text Text)
optionalParameters) (\s :: DiscoverInstances
s@DiscoverInstances' {} Maybe (HashMap Text Text)
a -> DiscoverInstances
s {$sel:optionalParameters:DiscoverInstances' :: Maybe (HashMap Text Text)
optionalParameters = Maybe (HashMap Text Text)
a} :: DiscoverInstances) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DiscoverInstances -> f DiscoverInstances)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DiscoverInstances
-> f DiscoverInstances
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
discoverInstances_healthStatus :: Lens.Lens' DiscoverInstances (Prelude.Maybe HealthStatusFilter)
discoverInstances_healthStatus :: (Maybe HealthStatusFilter -> f (Maybe HealthStatusFilter))
-> DiscoverInstances -> f DiscoverInstances
discoverInstances_healthStatus = (DiscoverInstances -> Maybe HealthStatusFilter)
-> (DiscoverInstances
-> Maybe HealthStatusFilter -> DiscoverInstances)
-> Lens
DiscoverInstances
DiscoverInstances
(Maybe HealthStatusFilter)
(Maybe HealthStatusFilter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiscoverInstances' {Maybe HealthStatusFilter
healthStatus :: Maybe HealthStatusFilter
$sel:healthStatus:DiscoverInstances' :: DiscoverInstances -> Maybe HealthStatusFilter
healthStatus} -> Maybe HealthStatusFilter
healthStatus) (\s :: DiscoverInstances
s@DiscoverInstances' {} Maybe HealthStatusFilter
a -> DiscoverInstances
s {$sel:healthStatus:DiscoverInstances' :: Maybe HealthStatusFilter
healthStatus = Maybe HealthStatusFilter
a} :: DiscoverInstances)
discoverInstances_maxResults :: Lens.Lens' DiscoverInstances (Prelude.Maybe Prelude.Natural)
discoverInstances_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DiscoverInstances -> f DiscoverInstances
discoverInstances_maxResults = (DiscoverInstances -> Maybe Natural)
-> (DiscoverInstances -> Maybe Natural -> DiscoverInstances)
-> Lens
DiscoverInstances DiscoverInstances (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiscoverInstances' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DiscoverInstances' :: DiscoverInstances -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DiscoverInstances
s@DiscoverInstances' {} Maybe Natural
a -> DiscoverInstances
s {$sel:maxResults:DiscoverInstances' :: Maybe Natural
maxResults = Maybe Natural
a} :: DiscoverInstances)
discoverInstances_namespaceName :: Lens.Lens' DiscoverInstances Prelude.Text
discoverInstances_namespaceName :: (Text -> f Text) -> DiscoverInstances -> f DiscoverInstances
discoverInstances_namespaceName = (DiscoverInstances -> Text)
-> (DiscoverInstances -> Text -> DiscoverInstances)
-> Lens DiscoverInstances DiscoverInstances Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiscoverInstances' {Text
namespaceName :: Text
$sel:namespaceName:DiscoverInstances' :: DiscoverInstances -> Text
namespaceName} -> Text
namespaceName) (\s :: DiscoverInstances
s@DiscoverInstances' {} Text
a -> DiscoverInstances
s {$sel:namespaceName:DiscoverInstances' :: Text
namespaceName = Text
a} :: DiscoverInstances)
discoverInstances_serviceName :: Lens.Lens' DiscoverInstances Prelude.Text
discoverInstances_serviceName :: (Text -> f Text) -> DiscoverInstances -> f DiscoverInstances
discoverInstances_serviceName = (DiscoverInstances -> Text)
-> (DiscoverInstances -> Text -> DiscoverInstances)
-> Lens DiscoverInstances DiscoverInstances Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiscoverInstances' {Text
serviceName :: Text
$sel:serviceName:DiscoverInstances' :: DiscoverInstances -> Text
serviceName} -> Text
serviceName) (\s :: DiscoverInstances
s@DiscoverInstances' {} Text
a -> DiscoverInstances
s {$sel:serviceName:DiscoverInstances' :: Text
serviceName = Text
a} :: DiscoverInstances)
instance Core.AWSRequest DiscoverInstances where
type
AWSResponse DiscoverInstances =
DiscoverInstancesResponse
request :: DiscoverInstances -> Request DiscoverInstances
request = Service -> DiscoverInstances -> Request DiscoverInstances
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DiscoverInstances
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DiscoverInstances)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DiscoverInstances))
-> Logger
-> Service
-> Proxy DiscoverInstances
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DiscoverInstances)))
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 [HttpInstanceSummary] -> Int -> DiscoverInstancesResponse
DiscoverInstancesResponse'
(Maybe [HttpInstanceSummary] -> Int -> DiscoverInstancesResponse)
-> Either String (Maybe [HttpInstanceSummary])
-> Either String (Int -> DiscoverInstancesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe (Maybe [HttpInstanceSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Instances" Either String (Maybe (Maybe [HttpInstanceSummary]))
-> Maybe [HttpInstanceSummary]
-> Either String (Maybe [HttpInstanceSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [HttpInstanceSummary]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> DiscoverInstancesResponse)
-> Either String Int -> Either String DiscoverInstancesResponse
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 DiscoverInstances
instance Prelude.NFData DiscoverInstances
instance Core.ToHeaders DiscoverInstances where
toHeaders :: DiscoverInstances -> ResponseHeaders
toHeaders =
ResponseHeaders -> DiscoverInstances -> 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
"Route53AutoNaming_v20170314.DiscoverInstances" ::
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 DiscoverInstances where
toJSON :: DiscoverInstances -> Value
toJSON DiscoverInstances' {Maybe Natural
Maybe (HashMap Text Text)
Maybe HealthStatusFilter
Text
serviceName :: Text
namespaceName :: Text
maxResults :: Maybe Natural
healthStatus :: Maybe HealthStatusFilter
optionalParameters :: Maybe (HashMap Text Text)
queryParameters :: Maybe (HashMap Text Text)
$sel:serviceName:DiscoverInstances' :: DiscoverInstances -> Text
$sel:namespaceName:DiscoverInstances' :: DiscoverInstances -> Text
$sel:maxResults:DiscoverInstances' :: DiscoverInstances -> Maybe Natural
$sel:healthStatus:DiscoverInstances' :: DiscoverInstances -> Maybe HealthStatusFilter
$sel:optionalParameters:DiscoverInstances' :: DiscoverInstances -> Maybe (HashMap Text Text)
$sel:queryParameters:DiscoverInstances' :: DiscoverInstances -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"QueryParameters" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
queryParameters,
(Text
"OptionalParameters" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
optionalParameters,
(Text
"HealthStatus" Text -> HealthStatusFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HealthStatusFilter -> Pair)
-> Maybe HealthStatusFilter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HealthStatusFilter
healthStatus,
(Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"NamespaceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
namespaceName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ServiceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceName)
]
)
instance Core.ToPath DiscoverInstances where
toPath :: DiscoverInstances -> ByteString
toPath = ByteString -> DiscoverInstances -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DiscoverInstances where
toQuery :: DiscoverInstances -> QueryString
toQuery = QueryString -> DiscoverInstances -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DiscoverInstancesResponse = DiscoverInstancesResponse'
{
DiscoverInstancesResponse -> Maybe [HttpInstanceSummary]
instances :: Prelude.Maybe [HttpInstanceSummary],
DiscoverInstancesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DiscoverInstancesResponse -> DiscoverInstancesResponse -> Bool
(DiscoverInstancesResponse -> DiscoverInstancesResponse -> Bool)
-> (DiscoverInstancesResponse -> DiscoverInstancesResponse -> Bool)
-> Eq DiscoverInstancesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DiscoverInstancesResponse -> DiscoverInstancesResponse -> Bool
$c/= :: DiscoverInstancesResponse -> DiscoverInstancesResponse -> Bool
== :: DiscoverInstancesResponse -> DiscoverInstancesResponse -> Bool
$c== :: DiscoverInstancesResponse -> DiscoverInstancesResponse -> Bool
Prelude.Eq, ReadPrec [DiscoverInstancesResponse]
ReadPrec DiscoverInstancesResponse
Int -> ReadS DiscoverInstancesResponse
ReadS [DiscoverInstancesResponse]
(Int -> ReadS DiscoverInstancesResponse)
-> ReadS [DiscoverInstancesResponse]
-> ReadPrec DiscoverInstancesResponse
-> ReadPrec [DiscoverInstancesResponse]
-> Read DiscoverInstancesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DiscoverInstancesResponse]
$creadListPrec :: ReadPrec [DiscoverInstancesResponse]
readPrec :: ReadPrec DiscoverInstancesResponse
$creadPrec :: ReadPrec DiscoverInstancesResponse
readList :: ReadS [DiscoverInstancesResponse]
$creadList :: ReadS [DiscoverInstancesResponse]
readsPrec :: Int -> ReadS DiscoverInstancesResponse
$creadsPrec :: Int -> ReadS DiscoverInstancesResponse
Prelude.Read, Int -> DiscoverInstancesResponse -> ShowS
[DiscoverInstancesResponse] -> ShowS
DiscoverInstancesResponse -> String
(Int -> DiscoverInstancesResponse -> ShowS)
-> (DiscoverInstancesResponse -> String)
-> ([DiscoverInstancesResponse] -> ShowS)
-> Show DiscoverInstancesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DiscoverInstancesResponse] -> ShowS
$cshowList :: [DiscoverInstancesResponse] -> ShowS
show :: DiscoverInstancesResponse -> String
$cshow :: DiscoverInstancesResponse -> String
showsPrec :: Int -> DiscoverInstancesResponse -> ShowS
$cshowsPrec :: Int -> DiscoverInstancesResponse -> ShowS
Prelude.Show, (forall x.
DiscoverInstancesResponse -> Rep DiscoverInstancesResponse x)
-> (forall x.
Rep DiscoverInstancesResponse x -> DiscoverInstancesResponse)
-> Generic DiscoverInstancesResponse
forall x.
Rep DiscoverInstancesResponse x -> DiscoverInstancesResponse
forall x.
DiscoverInstancesResponse -> Rep DiscoverInstancesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DiscoverInstancesResponse x -> DiscoverInstancesResponse
$cfrom :: forall x.
DiscoverInstancesResponse -> Rep DiscoverInstancesResponse x
Prelude.Generic)
newDiscoverInstancesResponse ::
Prelude.Int ->
DiscoverInstancesResponse
newDiscoverInstancesResponse :: Int -> DiscoverInstancesResponse
newDiscoverInstancesResponse Int
pHttpStatus_ =
DiscoverInstancesResponse' :: Maybe [HttpInstanceSummary] -> Int -> DiscoverInstancesResponse
DiscoverInstancesResponse'
{ $sel:instances:DiscoverInstancesResponse' :: Maybe [HttpInstanceSummary]
instances =
Maybe [HttpInstanceSummary]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DiscoverInstancesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
discoverInstancesResponse_instances :: Lens.Lens' DiscoverInstancesResponse (Prelude.Maybe [HttpInstanceSummary])
discoverInstancesResponse_instances :: (Maybe [HttpInstanceSummary] -> f (Maybe [HttpInstanceSummary]))
-> DiscoverInstancesResponse -> f DiscoverInstancesResponse
discoverInstancesResponse_instances = (DiscoverInstancesResponse -> Maybe [HttpInstanceSummary])
-> (DiscoverInstancesResponse
-> Maybe [HttpInstanceSummary] -> DiscoverInstancesResponse)
-> Lens
DiscoverInstancesResponse
DiscoverInstancesResponse
(Maybe [HttpInstanceSummary])
(Maybe [HttpInstanceSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiscoverInstancesResponse' {Maybe [HttpInstanceSummary]
instances :: Maybe [HttpInstanceSummary]
$sel:instances:DiscoverInstancesResponse' :: DiscoverInstancesResponse -> Maybe [HttpInstanceSummary]
instances} -> Maybe [HttpInstanceSummary]
instances) (\s :: DiscoverInstancesResponse
s@DiscoverInstancesResponse' {} Maybe [HttpInstanceSummary]
a -> DiscoverInstancesResponse
s {$sel:instances:DiscoverInstancesResponse' :: Maybe [HttpInstanceSummary]
instances = Maybe [HttpInstanceSummary]
a} :: DiscoverInstancesResponse) ((Maybe [HttpInstanceSummary] -> f (Maybe [HttpInstanceSummary]))
-> DiscoverInstancesResponse -> f DiscoverInstancesResponse)
-> ((Maybe [HttpInstanceSummary]
-> f (Maybe [HttpInstanceSummary]))
-> Maybe [HttpInstanceSummary] -> f (Maybe [HttpInstanceSummary]))
-> (Maybe [HttpInstanceSummary] -> f (Maybe [HttpInstanceSummary]))
-> DiscoverInstancesResponse
-> f DiscoverInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[HttpInstanceSummary]
[HttpInstanceSummary]
[HttpInstanceSummary]
[HttpInstanceSummary]
-> Iso
(Maybe [HttpInstanceSummary])
(Maybe [HttpInstanceSummary])
(Maybe [HttpInstanceSummary])
(Maybe [HttpInstanceSummary])
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
[HttpInstanceSummary]
[HttpInstanceSummary]
[HttpInstanceSummary]
[HttpInstanceSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
discoverInstancesResponse_httpStatus :: Lens.Lens' DiscoverInstancesResponse Prelude.Int
discoverInstancesResponse_httpStatus :: (Int -> f Int)
-> DiscoverInstancesResponse -> f DiscoverInstancesResponse
discoverInstancesResponse_httpStatus = (DiscoverInstancesResponse -> Int)
-> (DiscoverInstancesResponse -> Int -> DiscoverInstancesResponse)
-> Lens DiscoverInstancesResponse DiscoverInstancesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiscoverInstancesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DiscoverInstancesResponse' :: DiscoverInstancesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DiscoverInstancesResponse
s@DiscoverInstancesResponse' {} Int
a -> DiscoverInstancesResponse
s {$sel:httpStatus:DiscoverInstancesResponse' :: Int
httpStatus = Int
a} :: DiscoverInstancesResponse)
instance Prelude.NFData DiscoverInstancesResponse