{-# 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.ApiGatewayV2.GetRouteResponse
-- 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)
--
-- Gets a RouteResponse.
module Amazonka.ApiGatewayV2.GetRouteResponse
  ( -- * Creating a Request
    GetRouteResponse (..),
    newGetRouteResponse,

    -- * Request Lenses
    getRouteResponse_routeResponseId,
    getRouteResponse_apiId,
    getRouteResponse_routeId,

    -- * Destructuring the Response
    GetRouteResponseResponse (..),
    newGetRouteResponseResponse,

    -- * Response Lenses
    getRouteResponseResponse_modelSelectionExpression,
    getRouteResponseResponse_responseModels,
    getRouteResponseResponse_routeResponseId,
    getRouteResponseResponse_routeResponseKey,
    getRouteResponseResponse_responseParameters,
    getRouteResponseResponse_httpStatus,
  )
where

import Amazonka.ApiGatewayV2.Types
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

-- | /See:/ 'newGetRouteResponse' smart constructor.
data GetRouteResponse = GetRouteResponse'
  { -- | The route response ID.
    GetRouteResponse -> Text
routeResponseId :: Prelude.Text,
    -- | The API identifier.
    GetRouteResponse -> Text
apiId :: Prelude.Text,
    -- | The route ID.
    GetRouteResponse -> Text
routeId :: Prelude.Text
  }
  deriving (GetRouteResponse -> GetRouteResponse -> Bool
(GetRouteResponse -> GetRouteResponse -> Bool)
-> (GetRouteResponse -> GetRouteResponse -> Bool)
-> Eq GetRouteResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRouteResponse -> GetRouteResponse -> Bool
$c/= :: GetRouteResponse -> GetRouteResponse -> Bool
== :: GetRouteResponse -> GetRouteResponse -> Bool
$c== :: GetRouteResponse -> GetRouteResponse -> Bool
Prelude.Eq, ReadPrec [GetRouteResponse]
ReadPrec GetRouteResponse
Int -> ReadS GetRouteResponse
ReadS [GetRouteResponse]
(Int -> ReadS GetRouteResponse)
-> ReadS [GetRouteResponse]
-> ReadPrec GetRouteResponse
-> ReadPrec [GetRouteResponse]
-> Read GetRouteResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRouteResponse]
$creadListPrec :: ReadPrec [GetRouteResponse]
readPrec :: ReadPrec GetRouteResponse
$creadPrec :: ReadPrec GetRouteResponse
readList :: ReadS [GetRouteResponse]
$creadList :: ReadS [GetRouteResponse]
readsPrec :: Int -> ReadS GetRouteResponse
$creadsPrec :: Int -> ReadS GetRouteResponse
Prelude.Read, Int -> GetRouteResponse -> ShowS
[GetRouteResponse] -> ShowS
GetRouteResponse -> String
(Int -> GetRouteResponse -> ShowS)
-> (GetRouteResponse -> String)
-> ([GetRouteResponse] -> ShowS)
-> Show GetRouteResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRouteResponse] -> ShowS
$cshowList :: [GetRouteResponse] -> ShowS
show :: GetRouteResponse -> String
$cshow :: GetRouteResponse -> String
showsPrec :: Int -> GetRouteResponse -> ShowS
$cshowsPrec :: Int -> GetRouteResponse -> ShowS
Prelude.Show, (forall x. GetRouteResponse -> Rep GetRouteResponse x)
-> (forall x. Rep GetRouteResponse x -> GetRouteResponse)
-> Generic GetRouteResponse
forall x. Rep GetRouteResponse x -> GetRouteResponse
forall x. GetRouteResponse -> Rep GetRouteResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetRouteResponse x -> GetRouteResponse
$cfrom :: forall x. GetRouteResponse -> Rep GetRouteResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetRouteResponse' 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:
--
-- 'routeResponseId', 'getRouteResponse_routeResponseId' - The route response ID.
--
-- 'apiId', 'getRouteResponse_apiId' - The API identifier.
--
-- 'routeId', 'getRouteResponse_routeId' - The route ID.
newGetRouteResponse ::
  -- | 'routeResponseId'
  Prelude.Text ->
  -- | 'apiId'
  Prelude.Text ->
  -- | 'routeId'
  Prelude.Text ->
  GetRouteResponse
newGetRouteResponse :: Text -> Text -> Text -> GetRouteResponse
newGetRouteResponse
  Text
pRouteResponseId_
  Text
pApiId_
  Text
pRouteId_ =
    GetRouteResponse' :: Text -> Text -> Text -> GetRouteResponse
GetRouteResponse'
      { $sel:routeResponseId:GetRouteResponse' :: Text
routeResponseId =
          Text
pRouteResponseId_,
        $sel:apiId:GetRouteResponse' :: Text
apiId = Text
pApiId_,
        $sel:routeId:GetRouteResponse' :: Text
routeId = Text
pRouteId_
      }

-- | The route response ID.
getRouteResponse_routeResponseId :: Lens.Lens' GetRouteResponse Prelude.Text
getRouteResponse_routeResponseId :: (Text -> f Text) -> GetRouteResponse -> f GetRouteResponse
getRouteResponse_routeResponseId = (GetRouteResponse -> Text)
-> (GetRouteResponse -> Text -> GetRouteResponse)
-> Lens GetRouteResponse GetRouteResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse' {Text
routeResponseId :: Text
$sel:routeResponseId:GetRouteResponse' :: GetRouteResponse -> Text
routeResponseId} -> Text
routeResponseId) (\s :: GetRouteResponse
s@GetRouteResponse' {} Text
a -> GetRouteResponse
s {$sel:routeResponseId:GetRouteResponse' :: Text
routeResponseId = Text
a} :: GetRouteResponse)

-- | The API identifier.
getRouteResponse_apiId :: Lens.Lens' GetRouteResponse Prelude.Text
getRouteResponse_apiId :: (Text -> f Text) -> GetRouteResponse -> f GetRouteResponse
getRouteResponse_apiId = (GetRouteResponse -> Text)
-> (GetRouteResponse -> Text -> GetRouteResponse)
-> Lens GetRouteResponse GetRouteResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse' {Text
apiId :: Text
$sel:apiId:GetRouteResponse' :: GetRouteResponse -> Text
apiId} -> Text
apiId) (\s :: GetRouteResponse
s@GetRouteResponse' {} Text
a -> GetRouteResponse
s {$sel:apiId:GetRouteResponse' :: Text
apiId = Text
a} :: GetRouteResponse)

-- | The route ID.
getRouteResponse_routeId :: Lens.Lens' GetRouteResponse Prelude.Text
getRouteResponse_routeId :: (Text -> f Text) -> GetRouteResponse -> f GetRouteResponse
getRouteResponse_routeId = (GetRouteResponse -> Text)
-> (GetRouteResponse -> Text -> GetRouteResponse)
-> Lens GetRouteResponse GetRouteResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponse' {Text
routeId :: Text
$sel:routeId:GetRouteResponse' :: GetRouteResponse -> Text
routeId} -> Text
routeId) (\s :: GetRouteResponse
s@GetRouteResponse' {} Text
a -> GetRouteResponse
s {$sel:routeId:GetRouteResponse' :: Text
routeId = Text
a} :: GetRouteResponse)

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

instance Prelude.NFData GetRouteResponse

instance Core.ToHeaders GetRouteResponse where
  toHeaders :: GetRouteResponse -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetRouteResponse -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath GetRouteResponse where
  toPath :: GetRouteResponse -> ByteString
toPath GetRouteResponse' {Text
routeId :: Text
apiId :: Text
routeResponseId :: Text
$sel:routeId:GetRouteResponse' :: GetRouteResponse -> Text
$sel:apiId:GetRouteResponse' :: GetRouteResponse -> Text
$sel:routeResponseId:GetRouteResponse' :: GetRouteResponse -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v2/apis/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
apiId,
        ByteString
"/routes/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
routeId,
        ByteString
"/routeresponses/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
routeResponseId
      ]

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

-- | /See:/ 'newGetRouteResponseResponse' smart constructor.
data GetRouteResponseResponse = GetRouteResponseResponse'
  { -- | Represents the model selection expression of a route response. Supported
    -- only for WebSocket APIs.
    GetRouteResponseResponse -> Maybe Text
modelSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | Represents the response models of a route response.
    GetRouteResponseResponse -> Maybe (HashMap Text Text)
responseModels :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Represents the identifier of a route response.
    GetRouteResponseResponse -> Maybe Text
routeResponseId :: Prelude.Maybe Prelude.Text,
    -- | Represents the route response key of a route response.
    GetRouteResponseResponse -> Maybe Text
routeResponseKey :: Prelude.Maybe Prelude.Text,
    -- | Represents the response parameters of a route response.
    GetRouteResponseResponse
-> Maybe (HashMap Text ParameterConstraints)
responseParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints),
    -- | The response's http status code.
    GetRouteResponseResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetRouteResponseResponse -> GetRouteResponseResponse -> Bool
(GetRouteResponseResponse -> GetRouteResponseResponse -> Bool)
-> (GetRouteResponseResponse -> GetRouteResponseResponse -> Bool)
-> Eq GetRouteResponseResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRouteResponseResponse -> GetRouteResponseResponse -> Bool
$c/= :: GetRouteResponseResponse -> GetRouteResponseResponse -> Bool
== :: GetRouteResponseResponse -> GetRouteResponseResponse -> Bool
$c== :: GetRouteResponseResponse -> GetRouteResponseResponse -> Bool
Prelude.Eq, ReadPrec [GetRouteResponseResponse]
ReadPrec GetRouteResponseResponse
Int -> ReadS GetRouteResponseResponse
ReadS [GetRouteResponseResponse]
(Int -> ReadS GetRouteResponseResponse)
-> ReadS [GetRouteResponseResponse]
-> ReadPrec GetRouteResponseResponse
-> ReadPrec [GetRouteResponseResponse]
-> Read GetRouteResponseResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRouteResponseResponse]
$creadListPrec :: ReadPrec [GetRouteResponseResponse]
readPrec :: ReadPrec GetRouteResponseResponse
$creadPrec :: ReadPrec GetRouteResponseResponse
readList :: ReadS [GetRouteResponseResponse]
$creadList :: ReadS [GetRouteResponseResponse]
readsPrec :: Int -> ReadS GetRouteResponseResponse
$creadsPrec :: Int -> ReadS GetRouteResponseResponse
Prelude.Read, Int -> GetRouteResponseResponse -> ShowS
[GetRouteResponseResponse] -> ShowS
GetRouteResponseResponse -> String
(Int -> GetRouteResponseResponse -> ShowS)
-> (GetRouteResponseResponse -> String)
-> ([GetRouteResponseResponse] -> ShowS)
-> Show GetRouteResponseResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRouteResponseResponse] -> ShowS
$cshowList :: [GetRouteResponseResponse] -> ShowS
show :: GetRouteResponseResponse -> String
$cshow :: GetRouteResponseResponse -> String
showsPrec :: Int -> GetRouteResponseResponse -> ShowS
$cshowsPrec :: Int -> GetRouteResponseResponse -> ShowS
Prelude.Show, (forall x.
 GetRouteResponseResponse -> Rep GetRouteResponseResponse x)
-> (forall x.
    Rep GetRouteResponseResponse x -> GetRouteResponseResponse)
-> Generic GetRouteResponseResponse
forall x.
Rep GetRouteResponseResponse x -> GetRouteResponseResponse
forall x.
GetRouteResponseResponse -> Rep GetRouteResponseResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetRouteResponseResponse x -> GetRouteResponseResponse
$cfrom :: forall x.
GetRouteResponseResponse -> Rep GetRouteResponseResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetRouteResponseResponse' 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:
--
-- 'modelSelectionExpression', 'getRouteResponseResponse_modelSelectionExpression' - Represents the model selection expression of a route response. Supported
-- only for WebSocket APIs.
--
-- 'responseModels', 'getRouteResponseResponse_responseModels' - Represents the response models of a route response.
--
-- 'routeResponseId', 'getRouteResponseResponse_routeResponseId' - Represents the identifier of a route response.
--
-- 'routeResponseKey', 'getRouteResponseResponse_routeResponseKey' - Represents the route response key of a route response.
--
-- 'responseParameters', 'getRouteResponseResponse_responseParameters' - Represents the response parameters of a route response.
--
-- 'httpStatus', 'getRouteResponseResponse_httpStatus' - The response's http status code.
newGetRouteResponseResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetRouteResponseResponse
newGetRouteResponseResponse :: Int -> GetRouteResponseResponse
newGetRouteResponseResponse Int
pHttpStatus_ =
  GetRouteResponseResponse' :: Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text ParameterConstraints)
-> Int
-> GetRouteResponseResponse
GetRouteResponseResponse'
    { $sel:modelSelectionExpression:GetRouteResponseResponse' :: Maybe Text
modelSelectionExpression =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:responseModels:GetRouteResponseResponse' :: Maybe (HashMap Text Text)
responseModels = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:routeResponseId:GetRouteResponseResponse' :: Maybe Text
routeResponseId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:routeResponseKey:GetRouteResponseResponse' :: Maybe Text
routeResponseKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:responseParameters:GetRouteResponseResponse' :: Maybe (HashMap Text ParameterConstraints)
responseParameters = Maybe (HashMap Text ParameterConstraints)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetRouteResponseResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Represents the model selection expression of a route response. Supported
-- only for WebSocket APIs.
getRouteResponseResponse_modelSelectionExpression :: Lens.Lens' GetRouteResponseResponse (Prelude.Maybe Prelude.Text)
getRouteResponseResponse_modelSelectionExpression :: (Maybe Text -> f (Maybe Text))
-> GetRouteResponseResponse -> f GetRouteResponseResponse
getRouteResponseResponse_modelSelectionExpression = (GetRouteResponseResponse -> Maybe Text)
-> (GetRouteResponseResponse
    -> Maybe Text -> GetRouteResponseResponse)
-> Lens
     GetRouteResponseResponse
     GetRouteResponseResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponseResponse' {Maybe Text
modelSelectionExpression :: Maybe Text
$sel:modelSelectionExpression:GetRouteResponseResponse' :: GetRouteResponseResponse -> Maybe Text
modelSelectionExpression} -> Maybe Text
modelSelectionExpression) (\s :: GetRouteResponseResponse
s@GetRouteResponseResponse' {} Maybe Text
a -> GetRouteResponseResponse
s {$sel:modelSelectionExpression:GetRouteResponseResponse' :: Maybe Text
modelSelectionExpression = Maybe Text
a} :: GetRouteResponseResponse)

-- | Represents the response models of a route response.
getRouteResponseResponse_responseModels :: Lens.Lens' GetRouteResponseResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getRouteResponseResponse_responseModels :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetRouteResponseResponse -> f GetRouteResponseResponse
getRouteResponseResponse_responseModels = (GetRouteResponseResponse -> Maybe (HashMap Text Text))
-> (GetRouteResponseResponse
    -> Maybe (HashMap Text Text) -> GetRouteResponseResponse)
-> Lens
     GetRouteResponseResponse
     GetRouteResponseResponse
     (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 (\GetRouteResponseResponse' {Maybe (HashMap Text Text)
responseModels :: Maybe (HashMap Text Text)
$sel:responseModels:GetRouteResponseResponse' :: GetRouteResponseResponse -> Maybe (HashMap Text Text)
responseModels} -> Maybe (HashMap Text Text)
responseModels) (\s :: GetRouteResponseResponse
s@GetRouteResponseResponse' {} Maybe (HashMap Text Text)
a -> GetRouteResponseResponse
s {$sel:responseModels:GetRouteResponseResponse' :: Maybe (HashMap Text Text)
responseModels = Maybe (HashMap Text Text)
a} :: GetRouteResponseResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetRouteResponseResponse -> f GetRouteResponseResponse)
-> ((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)))
-> GetRouteResponseResponse
-> f GetRouteResponseResponse
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

-- | Represents the identifier of a route response.
getRouteResponseResponse_routeResponseId :: Lens.Lens' GetRouteResponseResponse (Prelude.Maybe Prelude.Text)
getRouteResponseResponse_routeResponseId :: (Maybe Text -> f (Maybe Text))
-> GetRouteResponseResponse -> f GetRouteResponseResponse
getRouteResponseResponse_routeResponseId = (GetRouteResponseResponse -> Maybe Text)
-> (GetRouteResponseResponse
    -> Maybe Text -> GetRouteResponseResponse)
-> Lens
     GetRouteResponseResponse
     GetRouteResponseResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponseResponse' {Maybe Text
routeResponseId :: Maybe Text
$sel:routeResponseId:GetRouteResponseResponse' :: GetRouteResponseResponse -> Maybe Text
routeResponseId} -> Maybe Text
routeResponseId) (\s :: GetRouteResponseResponse
s@GetRouteResponseResponse' {} Maybe Text
a -> GetRouteResponseResponse
s {$sel:routeResponseId:GetRouteResponseResponse' :: Maybe Text
routeResponseId = Maybe Text
a} :: GetRouteResponseResponse)

-- | Represents the route response key of a route response.
getRouteResponseResponse_routeResponseKey :: Lens.Lens' GetRouteResponseResponse (Prelude.Maybe Prelude.Text)
getRouteResponseResponse_routeResponseKey :: (Maybe Text -> f (Maybe Text))
-> GetRouteResponseResponse -> f GetRouteResponseResponse
getRouteResponseResponse_routeResponseKey = (GetRouteResponseResponse -> Maybe Text)
-> (GetRouteResponseResponse
    -> Maybe Text -> GetRouteResponseResponse)
-> Lens
     GetRouteResponseResponse
     GetRouteResponseResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponseResponse' {Maybe Text
routeResponseKey :: Maybe Text
$sel:routeResponseKey:GetRouteResponseResponse' :: GetRouteResponseResponse -> Maybe Text
routeResponseKey} -> Maybe Text
routeResponseKey) (\s :: GetRouteResponseResponse
s@GetRouteResponseResponse' {} Maybe Text
a -> GetRouteResponseResponse
s {$sel:routeResponseKey:GetRouteResponseResponse' :: Maybe Text
routeResponseKey = Maybe Text
a} :: GetRouteResponseResponse)

-- | Represents the response parameters of a route response.
getRouteResponseResponse_responseParameters :: Lens.Lens' GetRouteResponseResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text ParameterConstraints))
getRouteResponseResponse_responseParameters :: (Maybe (HashMap Text ParameterConstraints)
 -> f (Maybe (HashMap Text ParameterConstraints)))
-> GetRouteResponseResponse -> f GetRouteResponseResponse
getRouteResponseResponse_responseParameters = (GetRouteResponseResponse
 -> Maybe (HashMap Text ParameterConstraints))
-> (GetRouteResponseResponse
    -> Maybe (HashMap Text ParameterConstraints)
    -> GetRouteResponseResponse)
-> Lens
     GetRouteResponseResponse
     GetRouteResponseResponse
     (Maybe (HashMap Text ParameterConstraints))
     (Maybe (HashMap Text ParameterConstraints))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRouteResponseResponse' {Maybe (HashMap Text ParameterConstraints)
responseParameters :: Maybe (HashMap Text ParameterConstraints)
$sel:responseParameters:GetRouteResponseResponse' :: GetRouteResponseResponse
-> Maybe (HashMap Text ParameterConstraints)
responseParameters} -> Maybe (HashMap Text ParameterConstraints)
responseParameters) (\s :: GetRouteResponseResponse
s@GetRouteResponseResponse' {} Maybe (HashMap Text ParameterConstraints)
a -> GetRouteResponseResponse
s {$sel:responseParameters:GetRouteResponseResponse' :: Maybe (HashMap Text ParameterConstraints)
responseParameters = Maybe (HashMap Text ParameterConstraints)
a} :: GetRouteResponseResponse) ((Maybe (HashMap Text ParameterConstraints)
  -> f (Maybe (HashMap Text ParameterConstraints)))
 -> GetRouteResponseResponse -> f GetRouteResponseResponse)
-> ((Maybe (HashMap Text ParameterConstraints)
     -> f (Maybe (HashMap Text ParameterConstraints)))
    -> Maybe (HashMap Text ParameterConstraints)
    -> f (Maybe (HashMap Text ParameterConstraints)))
-> (Maybe (HashMap Text ParameterConstraints)
    -> f (Maybe (HashMap Text ParameterConstraints)))
-> GetRouteResponseResponse
-> f GetRouteResponseResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text ParameterConstraints)
  (HashMap Text ParameterConstraints)
  (HashMap Text ParameterConstraints)
  (HashMap Text ParameterConstraints)
-> Iso
     (Maybe (HashMap Text ParameterConstraints))
     (Maybe (HashMap Text ParameterConstraints))
     (Maybe (HashMap Text ParameterConstraints))
     (Maybe (HashMap Text ParameterConstraints))
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 ParameterConstraints)
  (HashMap Text ParameterConstraints)
  (HashMap Text ParameterConstraints)
  (HashMap Text ParameterConstraints)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetRouteResponseResponse