{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MigrationHubReFactorSpaces.Types.RouteSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MigrationHubReFactorSpaces.Types.RouteSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MigrationHubReFactorSpaces.Types.ErrorResponse
import Amazonka.MigrationHubReFactorSpaces.Types.HttpMethod
import Amazonka.MigrationHubReFactorSpaces.Types.RouteState
import Amazonka.MigrationHubReFactorSpaces.Types.RouteType
import qualified Amazonka.Prelude as Prelude

-- | The summary information for the routes as a response to @ListRoutes@.
--
-- /See:/ 'newRouteSummary' smart constructor.
data RouteSummary = RouteSummary'
  { -- | The unique identifier of the application.
    RouteSummary -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the route.
    RouteSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services account ID of the route creator.
    RouteSummary -> Maybe Text
createdByAccountId :: Prelude.Maybe Prelude.Text,
    -- | A timestamp that indicates when the route is created.
    RouteSummary -> Maybe POSIX
createdTime :: Prelude.Maybe Data.POSIX,
    -- | The unique identifier of the environment.
    RouteSummary -> Maybe Text
environmentId :: Prelude.Maybe Prelude.Text,
    -- | Any error associated with the route resource.
    RouteSummary -> Maybe ErrorResponse
error :: Prelude.Maybe ErrorResponse,
    -- | Indicates whether to match all subpaths of the given source path. If
    -- this value is @false@, requests must match the source path exactly
    -- before they are forwarded to this route\'s service.
    RouteSummary -> Maybe Bool
includeChildPaths :: Prelude.Maybe Prelude.Bool,
    -- | A timestamp that indicates when the route was last updated.
    RouteSummary -> Maybe POSIX
lastUpdatedTime :: Prelude.Maybe Data.POSIX,
    -- | A list of HTTP methods to match. An empty list matches all values. If a
    -- method is present, only HTTP requests using that method are forwarded to
    -- this route’s service.
    RouteSummary -> Maybe [HttpMethod]
methods :: Prelude.Maybe [HttpMethod],
    -- | The Amazon Web Services account ID of the route owner.
    RouteSummary -> Maybe Text
ownerAccountId :: Prelude.Maybe Prelude.Text,
    -- | A mapping of Amazon API Gateway path resources to resource IDs.
    RouteSummary -> Maybe (HashMap Text Text)
pathResourceToId :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The unique identifier of the route.
    RouteSummary -> Maybe Text
routeId :: Prelude.Maybe Prelude.Text,
    -- | The route type of the route.
    RouteSummary -> Maybe RouteType
routeType :: Prelude.Maybe RouteType,
    -- | The unique identifier of the service.
    RouteSummary -> Maybe Text
serviceId :: Prelude.Maybe Prelude.Text,
    -- | The path to use to match traffic. Paths must start with @\/@ and are
    -- relative to the base of the application.
    RouteSummary -> Maybe Text
sourcePath :: Prelude.Maybe Prelude.Text,
    -- | The current state of the route.
    RouteSummary -> Maybe RouteState
state :: Prelude.Maybe RouteState,
    -- | The tags assigned to the route.
    RouteSummary -> Maybe (Sensitive (HashMap Text Text))
tags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text))
  }
  deriving (RouteSummary -> RouteSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RouteSummary -> RouteSummary -> Bool
$c/= :: RouteSummary -> RouteSummary -> Bool
== :: RouteSummary -> RouteSummary -> Bool
$c== :: RouteSummary -> RouteSummary -> Bool
Prelude.Eq, Int -> RouteSummary -> ShowS
[RouteSummary] -> ShowS
RouteSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RouteSummary] -> ShowS
$cshowList :: [RouteSummary] -> ShowS
show :: RouteSummary -> String
$cshow :: RouteSummary -> String
showsPrec :: Int -> RouteSummary -> ShowS
$cshowsPrec :: Int -> RouteSummary -> ShowS
Prelude.Show, forall x. Rep RouteSummary x -> RouteSummary
forall x. RouteSummary -> Rep RouteSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RouteSummary x -> RouteSummary
$cfrom :: forall x. RouteSummary -> Rep RouteSummary x
Prelude.Generic)

-- |
-- Create a value of 'RouteSummary' 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:
--
-- 'applicationId', 'routeSummary_applicationId' - The unique identifier of the application.
--
-- 'arn', 'routeSummary_arn' - The Amazon Resource Name (ARN) of the route.
--
-- 'createdByAccountId', 'routeSummary_createdByAccountId' - The Amazon Web Services account ID of the route creator.
--
-- 'createdTime', 'routeSummary_createdTime' - A timestamp that indicates when the route is created.
--
-- 'environmentId', 'routeSummary_environmentId' - The unique identifier of the environment.
--
-- 'error', 'routeSummary_error' - Any error associated with the route resource.
--
-- 'includeChildPaths', 'routeSummary_includeChildPaths' - Indicates whether to match all subpaths of the given source path. If
-- this value is @false@, requests must match the source path exactly
-- before they are forwarded to this route\'s service.
--
-- 'lastUpdatedTime', 'routeSummary_lastUpdatedTime' - A timestamp that indicates when the route was last updated.
--
-- 'methods', 'routeSummary_methods' - A list of HTTP methods to match. An empty list matches all values. If a
-- method is present, only HTTP requests using that method are forwarded to
-- this route’s service.
--
-- 'ownerAccountId', 'routeSummary_ownerAccountId' - The Amazon Web Services account ID of the route owner.
--
-- 'pathResourceToId', 'routeSummary_pathResourceToId' - A mapping of Amazon API Gateway path resources to resource IDs.
--
-- 'routeId', 'routeSummary_routeId' - The unique identifier of the route.
--
-- 'routeType', 'routeSummary_routeType' - The route type of the route.
--
-- 'serviceId', 'routeSummary_serviceId' - The unique identifier of the service.
--
-- 'sourcePath', 'routeSummary_sourcePath' - The path to use to match traffic. Paths must start with @\/@ and are
-- relative to the base of the application.
--
-- 'state', 'routeSummary_state' - The current state of the route.
--
-- 'tags', 'routeSummary_tags' - The tags assigned to the route.
newRouteSummary ::
  RouteSummary
newRouteSummary :: RouteSummary
newRouteSummary =
  RouteSummary'
    { $sel:applicationId:RouteSummary' :: Maybe Text
applicationId = forall a. Maybe a
Prelude.Nothing,
      $sel:arn:RouteSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:createdByAccountId:RouteSummary' :: Maybe Text
createdByAccountId = forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:RouteSummary' :: Maybe POSIX
createdTime = forall a. Maybe a
Prelude.Nothing,
      $sel:environmentId:RouteSummary' :: Maybe Text
environmentId = forall a. Maybe a
Prelude.Nothing,
      $sel:error:RouteSummary' :: Maybe ErrorResponse
error = forall a. Maybe a
Prelude.Nothing,
      $sel:includeChildPaths:RouteSummary' :: Maybe Bool
includeChildPaths = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTime:RouteSummary' :: Maybe POSIX
lastUpdatedTime = forall a. Maybe a
Prelude.Nothing,
      $sel:methods:RouteSummary' :: Maybe [HttpMethod]
methods = forall a. Maybe a
Prelude.Nothing,
      $sel:ownerAccountId:RouteSummary' :: Maybe Text
ownerAccountId = forall a. Maybe a
Prelude.Nothing,
      $sel:pathResourceToId:RouteSummary' :: Maybe (HashMap Text Text)
pathResourceToId = forall a. Maybe a
Prelude.Nothing,
      $sel:routeId:RouteSummary' :: Maybe Text
routeId = forall a. Maybe a
Prelude.Nothing,
      $sel:routeType:RouteSummary' :: Maybe RouteType
routeType = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceId:RouteSummary' :: Maybe Text
serviceId = forall a. Maybe a
Prelude.Nothing,
      $sel:sourcePath:RouteSummary' :: Maybe Text
sourcePath = forall a. Maybe a
Prelude.Nothing,
      $sel:state:RouteSummary' :: Maybe RouteState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:RouteSummary' :: Maybe (Sensitive (HashMap Text Text))
tags = forall a. Maybe a
Prelude.Nothing
    }

-- | The unique identifier of the application.
routeSummary_applicationId :: Lens.Lens' RouteSummary (Prelude.Maybe Prelude.Text)
routeSummary_applicationId :: Lens' RouteSummary (Maybe Text)
routeSummary_applicationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:RouteSummary' :: RouteSummary -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: RouteSummary
s@RouteSummary' {} Maybe Text
a -> RouteSummary
s {$sel:applicationId:RouteSummary' :: Maybe Text
applicationId = Maybe Text
a} :: RouteSummary)

-- | The Amazon Resource Name (ARN) of the route.
routeSummary_arn :: Lens.Lens' RouteSummary (Prelude.Maybe Prelude.Text)
routeSummary_arn :: Lens' RouteSummary (Maybe Text)
routeSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:RouteSummary' :: RouteSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: RouteSummary
s@RouteSummary' {} Maybe Text
a -> RouteSummary
s {$sel:arn:RouteSummary' :: Maybe Text
arn = Maybe Text
a} :: RouteSummary)

-- | The Amazon Web Services account ID of the route creator.
routeSummary_createdByAccountId :: Lens.Lens' RouteSummary (Prelude.Maybe Prelude.Text)
routeSummary_createdByAccountId :: Lens' RouteSummary (Maybe Text)
routeSummary_createdByAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe Text
createdByAccountId :: Maybe Text
$sel:createdByAccountId:RouteSummary' :: RouteSummary -> Maybe Text
createdByAccountId} -> Maybe Text
createdByAccountId) (\s :: RouteSummary
s@RouteSummary' {} Maybe Text
a -> RouteSummary
s {$sel:createdByAccountId:RouteSummary' :: Maybe Text
createdByAccountId = Maybe Text
a} :: RouteSummary)

-- | A timestamp that indicates when the route is created.
routeSummary_createdTime :: Lens.Lens' RouteSummary (Prelude.Maybe Prelude.UTCTime)
routeSummary_createdTime :: Lens' RouteSummary (Maybe UTCTime)
routeSummary_createdTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:RouteSummary' :: RouteSummary -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: RouteSummary
s@RouteSummary' {} Maybe POSIX
a -> RouteSummary
s {$sel:createdTime:RouteSummary' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: RouteSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The unique identifier of the environment.
routeSummary_environmentId :: Lens.Lens' RouteSummary (Prelude.Maybe Prelude.Text)
routeSummary_environmentId :: Lens' RouteSummary (Maybe Text)
routeSummary_environmentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe Text
environmentId :: Maybe Text
$sel:environmentId:RouteSummary' :: RouteSummary -> Maybe Text
environmentId} -> Maybe Text
environmentId) (\s :: RouteSummary
s@RouteSummary' {} Maybe Text
a -> RouteSummary
s {$sel:environmentId:RouteSummary' :: Maybe Text
environmentId = Maybe Text
a} :: RouteSummary)

-- | Any error associated with the route resource.
routeSummary_error :: Lens.Lens' RouteSummary (Prelude.Maybe ErrorResponse)
routeSummary_error :: Lens' RouteSummary (Maybe ErrorResponse)
routeSummary_error = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe ErrorResponse
error :: Maybe ErrorResponse
$sel:error:RouteSummary' :: RouteSummary -> Maybe ErrorResponse
error} -> Maybe ErrorResponse
error) (\s :: RouteSummary
s@RouteSummary' {} Maybe ErrorResponse
a -> RouteSummary
s {$sel:error:RouteSummary' :: Maybe ErrorResponse
error = Maybe ErrorResponse
a} :: RouteSummary)

-- | Indicates whether to match all subpaths of the given source path. If
-- this value is @false@, requests must match the source path exactly
-- before they are forwarded to this route\'s service.
routeSummary_includeChildPaths :: Lens.Lens' RouteSummary (Prelude.Maybe Prelude.Bool)
routeSummary_includeChildPaths :: Lens' RouteSummary (Maybe Bool)
routeSummary_includeChildPaths = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe Bool
includeChildPaths :: Maybe Bool
$sel:includeChildPaths:RouteSummary' :: RouteSummary -> Maybe Bool
includeChildPaths} -> Maybe Bool
includeChildPaths) (\s :: RouteSummary
s@RouteSummary' {} Maybe Bool
a -> RouteSummary
s {$sel:includeChildPaths:RouteSummary' :: Maybe Bool
includeChildPaths = Maybe Bool
a} :: RouteSummary)

-- | A timestamp that indicates when the route was last updated.
routeSummary_lastUpdatedTime :: Lens.Lens' RouteSummary (Prelude.Maybe Prelude.UTCTime)
routeSummary_lastUpdatedTime :: Lens' RouteSummary (Maybe UTCTime)
routeSummary_lastUpdatedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe POSIX
lastUpdatedTime :: Maybe POSIX
$sel:lastUpdatedTime:RouteSummary' :: RouteSummary -> Maybe POSIX
lastUpdatedTime} -> Maybe POSIX
lastUpdatedTime) (\s :: RouteSummary
s@RouteSummary' {} Maybe POSIX
a -> RouteSummary
s {$sel:lastUpdatedTime:RouteSummary' :: Maybe POSIX
lastUpdatedTime = Maybe POSIX
a} :: RouteSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | A list of HTTP methods to match. An empty list matches all values. If a
-- method is present, only HTTP requests using that method are forwarded to
-- this route’s service.
routeSummary_methods :: Lens.Lens' RouteSummary (Prelude.Maybe [HttpMethod])
routeSummary_methods :: Lens' RouteSummary (Maybe [HttpMethod])
routeSummary_methods = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe [HttpMethod]
methods :: Maybe [HttpMethod]
$sel:methods:RouteSummary' :: RouteSummary -> Maybe [HttpMethod]
methods} -> Maybe [HttpMethod]
methods) (\s :: RouteSummary
s@RouteSummary' {} Maybe [HttpMethod]
a -> RouteSummary
s {$sel:methods:RouteSummary' :: Maybe [HttpMethod]
methods = Maybe [HttpMethod]
a} :: RouteSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Web Services account ID of the route owner.
routeSummary_ownerAccountId :: Lens.Lens' RouteSummary (Prelude.Maybe Prelude.Text)
routeSummary_ownerAccountId :: Lens' RouteSummary (Maybe Text)
routeSummary_ownerAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe Text
ownerAccountId :: Maybe Text
$sel:ownerAccountId:RouteSummary' :: RouteSummary -> Maybe Text
ownerAccountId} -> Maybe Text
ownerAccountId) (\s :: RouteSummary
s@RouteSummary' {} Maybe Text
a -> RouteSummary
s {$sel:ownerAccountId:RouteSummary' :: Maybe Text
ownerAccountId = Maybe Text
a} :: RouteSummary)

-- | A mapping of Amazon API Gateway path resources to resource IDs.
routeSummary_pathResourceToId :: Lens.Lens' RouteSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
routeSummary_pathResourceToId :: Lens' RouteSummary (Maybe (HashMap Text Text))
routeSummary_pathResourceToId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe (HashMap Text Text)
pathResourceToId :: Maybe (HashMap Text Text)
$sel:pathResourceToId:RouteSummary' :: RouteSummary -> Maybe (HashMap Text Text)
pathResourceToId} -> Maybe (HashMap Text Text)
pathResourceToId) (\s :: RouteSummary
s@RouteSummary' {} Maybe (HashMap Text Text)
a -> RouteSummary
s {$sel:pathResourceToId:RouteSummary' :: Maybe (HashMap Text Text)
pathResourceToId = Maybe (HashMap Text Text)
a} :: RouteSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The unique identifier of the route.
routeSummary_routeId :: Lens.Lens' RouteSummary (Prelude.Maybe Prelude.Text)
routeSummary_routeId :: Lens' RouteSummary (Maybe Text)
routeSummary_routeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe Text
routeId :: Maybe Text
$sel:routeId:RouteSummary' :: RouteSummary -> Maybe Text
routeId} -> Maybe Text
routeId) (\s :: RouteSummary
s@RouteSummary' {} Maybe Text
a -> RouteSummary
s {$sel:routeId:RouteSummary' :: Maybe Text
routeId = Maybe Text
a} :: RouteSummary)

-- | The route type of the route.
routeSummary_routeType :: Lens.Lens' RouteSummary (Prelude.Maybe RouteType)
routeSummary_routeType :: Lens' RouteSummary (Maybe RouteType)
routeSummary_routeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe RouteType
routeType :: Maybe RouteType
$sel:routeType:RouteSummary' :: RouteSummary -> Maybe RouteType
routeType} -> Maybe RouteType
routeType) (\s :: RouteSummary
s@RouteSummary' {} Maybe RouteType
a -> RouteSummary
s {$sel:routeType:RouteSummary' :: Maybe RouteType
routeType = Maybe RouteType
a} :: RouteSummary)

-- | The unique identifier of the service.
routeSummary_serviceId :: Lens.Lens' RouteSummary (Prelude.Maybe Prelude.Text)
routeSummary_serviceId :: Lens' RouteSummary (Maybe Text)
routeSummary_serviceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe Text
serviceId :: Maybe Text
$sel:serviceId:RouteSummary' :: RouteSummary -> Maybe Text
serviceId} -> Maybe Text
serviceId) (\s :: RouteSummary
s@RouteSummary' {} Maybe Text
a -> RouteSummary
s {$sel:serviceId:RouteSummary' :: Maybe Text
serviceId = Maybe Text
a} :: RouteSummary)

-- | The path to use to match traffic. Paths must start with @\/@ and are
-- relative to the base of the application.
routeSummary_sourcePath :: Lens.Lens' RouteSummary (Prelude.Maybe Prelude.Text)
routeSummary_sourcePath :: Lens' RouteSummary (Maybe Text)
routeSummary_sourcePath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe Text
sourcePath :: Maybe Text
$sel:sourcePath:RouteSummary' :: RouteSummary -> Maybe Text
sourcePath} -> Maybe Text
sourcePath) (\s :: RouteSummary
s@RouteSummary' {} Maybe Text
a -> RouteSummary
s {$sel:sourcePath:RouteSummary' :: Maybe Text
sourcePath = Maybe Text
a} :: RouteSummary)

-- | The current state of the route.
routeSummary_state :: Lens.Lens' RouteSummary (Prelude.Maybe RouteState)
routeSummary_state :: Lens' RouteSummary (Maybe RouteState)
routeSummary_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe RouteState
state :: Maybe RouteState
$sel:state:RouteSummary' :: RouteSummary -> Maybe RouteState
state} -> Maybe RouteState
state) (\s :: RouteSummary
s@RouteSummary' {} Maybe RouteState
a -> RouteSummary
s {$sel:state:RouteSummary' :: Maybe RouteState
state = Maybe RouteState
a} :: RouteSummary)

-- | The tags assigned to the route.
routeSummary_tags :: Lens.Lens' RouteSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
routeSummary_tags :: Lens' RouteSummary (Maybe (HashMap Text Text))
routeSummary_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteSummary' {Maybe (Sensitive (HashMap Text Text))
tags :: Maybe (Sensitive (HashMap Text Text))
$sel:tags:RouteSummary' :: RouteSummary -> Maybe (Sensitive (HashMap Text Text))
tags} -> Maybe (Sensitive (HashMap Text Text))
tags) (\s :: RouteSummary
s@RouteSummary' {} Maybe (Sensitive (HashMap Text Text))
a -> RouteSummary
s {$sel:tags:RouteSummary' :: Maybe (Sensitive (HashMap Text Text))
tags = Maybe (Sensitive (HashMap Text Text))
a} :: RouteSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

instance Data.FromJSON RouteSummary where
  parseJSON :: Value -> Parser RouteSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"RouteSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ErrorResponse
-> Maybe Bool
-> Maybe POSIX
-> Maybe [HttpMethod]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe RouteType
-> Maybe Text
-> Maybe Text
-> Maybe RouteState
-> Maybe (Sensitive (HashMap Text Text))
-> RouteSummary
RouteSummary'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ApplicationId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreatedByAccountId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreatedTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EnvironmentId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Error")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"IncludeChildPaths")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastUpdatedTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Methods" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OwnerAccountId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PathResourceToId"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RouteId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RouteType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ServiceId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SourcePath")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"State")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable RouteSummary where
  hashWithSalt :: Int -> RouteSummary -> Int
hashWithSalt Int
_salt RouteSummary' {Maybe Bool
Maybe [HttpMethod]
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive (HashMap Text Text))
Maybe POSIX
Maybe ErrorResponse
Maybe RouteState
Maybe RouteType
tags :: Maybe (Sensitive (HashMap Text Text))
state :: Maybe RouteState
sourcePath :: Maybe Text
serviceId :: Maybe Text
routeType :: Maybe RouteType
routeId :: Maybe Text
pathResourceToId :: Maybe (HashMap Text Text)
ownerAccountId :: Maybe Text
methods :: Maybe [HttpMethod]
lastUpdatedTime :: Maybe POSIX
includeChildPaths :: Maybe Bool
error :: Maybe ErrorResponse
environmentId :: Maybe Text
createdTime :: Maybe POSIX
createdByAccountId :: Maybe Text
arn :: Maybe Text
applicationId :: Maybe Text
$sel:tags:RouteSummary' :: RouteSummary -> Maybe (Sensitive (HashMap Text Text))
$sel:state:RouteSummary' :: RouteSummary -> Maybe RouteState
$sel:sourcePath:RouteSummary' :: RouteSummary -> Maybe Text
$sel:serviceId:RouteSummary' :: RouteSummary -> Maybe Text
$sel:routeType:RouteSummary' :: RouteSummary -> Maybe RouteType
$sel:routeId:RouteSummary' :: RouteSummary -> Maybe Text
$sel:pathResourceToId:RouteSummary' :: RouteSummary -> Maybe (HashMap Text Text)
$sel:ownerAccountId:RouteSummary' :: RouteSummary -> Maybe Text
$sel:methods:RouteSummary' :: RouteSummary -> Maybe [HttpMethod]
$sel:lastUpdatedTime:RouteSummary' :: RouteSummary -> Maybe POSIX
$sel:includeChildPaths:RouteSummary' :: RouteSummary -> Maybe Bool
$sel:error:RouteSummary' :: RouteSummary -> Maybe ErrorResponse
$sel:environmentId:RouteSummary' :: RouteSummary -> Maybe Text
$sel:createdTime:RouteSummary' :: RouteSummary -> Maybe POSIX
$sel:createdByAccountId:RouteSummary' :: RouteSummary -> Maybe Text
$sel:arn:RouteSummary' :: RouteSummary -> Maybe Text
$sel:applicationId:RouteSummary' :: RouteSummary -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
applicationId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
createdByAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
environmentId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ErrorResponse
error
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includeChildPaths
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [HttpMethod]
methods
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ownerAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
pathResourceToId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
routeId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RouteType
routeType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourcePath
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RouteState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text Text))
tags

instance Prelude.NFData RouteSummary where
  rnf :: RouteSummary -> ()
rnf RouteSummary' {Maybe Bool
Maybe [HttpMethod]
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive (HashMap Text Text))
Maybe POSIX
Maybe ErrorResponse
Maybe RouteState
Maybe RouteType
tags :: Maybe (Sensitive (HashMap Text Text))
state :: Maybe RouteState
sourcePath :: Maybe Text
serviceId :: Maybe Text
routeType :: Maybe RouteType
routeId :: Maybe Text
pathResourceToId :: Maybe (HashMap Text Text)
ownerAccountId :: Maybe Text
methods :: Maybe [HttpMethod]
lastUpdatedTime :: Maybe POSIX
includeChildPaths :: Maybe Bool
error :: Maybe ErrorResponse
environmentId :: Maybe Text
createdTime :: Maybe POSIX
createdByAccountId :: Maybe Text
arn :: Maybe Text
applicationId :: Maybe Text
$sel:tags:RouteSummary' :: RouteSummary -> Maybe (Sensitive (HashMap Text Text))
$sel:state:RouteSummary' :: RouteSummary -> Maybe RouteState
$sel:sourcePath:RouteSummary' :: RouteSummary -> Maybe Text
$sel:serviceId:RouteSummary' :: RouteSummary -> Maybe Text
$sel:routeType:RouteSummary' :: RouteSummary -> Maybe RouteType
$sel:routeId:RouteSummary' :: RouteSummary -> Maybe Text
$sel:pathResourceToId:RouteSummary' :: RouteSummary -> Maybe (HashMap Text Text)
$sel:ownerAccountId:RouteSummary' :: RouteSummary -> Maybe Text
$sel:methods:RouteSummary' :: RouteSummary -> Maybe [HttpMethod]
$sel:lastUpdatedTime:RouteSummary' :: RouteSummary -> Maybe POSIX
$sel:includeChildPaths:RouteSummary' :: RouteSummary -> Maybe Bool
$sel:error:RouteSummary' :: RouteSummary -> Maybe ErrorResponse
$sel:environmentId:RouteSummary' :: RouteSummary -> Maybe Text
$sel:createdTime:RouteSummary' :: RouteSummary -> Maybe POSIX
$sel:createdByAccountId:RouteSummary' :: RouteSummary -> Maybe Text
$sel:arn:RouteSummary' :: RouteSummary -> Maybe Text
$sel:applicationId:RouteSummary' :: RouteSummary -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
applicationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createdByAccountId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
environmentId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ErrorResponse
error
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeChildPaths
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [HttpMethod]
methods
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownerAccountId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
pathResourceToId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
routeId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RouteType
routeType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourcePath
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RouteState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text Text))
tags