{-# 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.APIGateway.Types.DocumentationPartLocation
-- 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)
module Amazonka.APIGateway.Types.DocumentationPartLocation where

import Amazonka.APIGateway.Types.DocumentationPartType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Specifies the target API entity to which the documentation applies.
--
-- /See:/ 'newDocumentationPartLocation' smart constructor.
data DocumentationPartLocation = DocumentationPartLocation'
  { -- | The URL path of the target. It is a valid field for the API entity types
    -- of @RESOURCE@, @METHOD@, @PATH_PARAMETER@, @QUERY_PARAMETER@,
    -- @REQUEST_HEADER@, @REQUEST_BODY@, @RESPONSE@, @RESPONSE_HEADER@, and
    -- @RESPONSE_BODY@. The default value is @\/@ for the root resource. When
    -- an applicable child entity inherits the content of another entity of the
    -- same type with more general specifications of the other @location@
    -- attributes, the child entity\'s @path@ attribute must match that of the
    -- parent entity as a prefix.
    DocumentationPartLocation -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
    -- | The name of the targeted API entity. It is a valid and required field
    -- for the API entity types of @AUTHORIZER@, @MODEL@, @PATH_PARAMETER@,
    -- @QUERY_PARAMETER@, @REQUEST_HEADER@, @REQUEST_BODY@ and
    -- @RESPONSE_HEADER@. It is an invalid field for any other entity type.
    DocumentationPartLocation -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The HTTP verb of a method. It is a valid field for the API entity types
    -- of @METHOD@, @PATH_PARAMETER@, @QUERY_PARAMETER@, @REQUEST_HEADER@,
    -- @REQUEST_BODY@, @RESPONSE@, @RESPONSE_HEADER@, and @RESPONSE_BODY@. The
    -- default value is @*@ for any method. When an applicable child entity
    -- inherits the content of an entity of the same type with more general
    -- specifications of the other @location@ attributes, the child entity\'s
    -- @method@ attribute must match that of the parent entity exactly.
    DocumentationPartLocation -> Maybe Text
method :: Prelude.Maybe Prelude.Text,
    -- | The HTTP status code of a response. It is a valid field for the API
    -- entity types of @RESPONSE@, @RESPONSE_HEADER@, and @RESPONSE_BODY@. The
    -- default value is @*@ for any status code. When an applicable child
    -- entity inherits the content of an entity of the same type with more
    -- general specifications of the other @location@ attributes, the child
    -- entity\'s @statusCode@ attribute must match that of the parent entity
    -- exactly.
    DocumentationPartLocation -> Maybe Text
statusCode :: Prelude.Maybe Prelude.Text,
    -- | [Required] The type of API entity to which the documentation content
    -- applies. Valid values are @API@, @AUTHORIZER@, @MODEL@, @RESOURCE@,
    -- @METHOD@, @PATH_PARAMETER@, @QUERY_PARAMETER@, @REQUEST_HEADER@,
    -- @REQUEST_BODY@, @RESPONSE@, @RESPONSE_HEADER@, and @RESPONSE_BODY@.
    -- Content inheritance does not apply to any entity of the @API@,
    -- @AUTHORIZER@, @METHOD@, @MODEL@, @REQUEST_BODY@, or @RESOURCE@ type.
    DocumentationPartLocation -> DocumentationPartType
type' :: DocumentationPartType
  }
  deriving (DocumentationPartLocation -> DocumentationPartLocation -> Bool
(DocumentationPartLocation -> DocumentationPartLocation -> Bool)
-> (DocumentationPartLocation -> DocumentationPartLocation -> Bool)
-> Eq DocumentationPartLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocumentationPartLocation -> DocumentationPartLocation -> Bool
$c/= :: DocumentationPartLocation -> DocumentationPartLocation -> Bool
== :: DocumentationPartLocation -> DocumentationPartLocation -> Bool
$c== :: DocumentationPartLocation -> DocumentationPartLocation -> Bool
Prelude.Eq, ReadPrec [DocumentationPartLocation]
ReadPrec DocumentationPartLocation
Int -> ReadS DocumentationPartLocation
ReadS [DocumentationPartLocation]
(Int -> ReadS DocumentationPartLocation)
-> ReadS [DocumentationPartLocation]
-> ReadPrec DocumentationPartLocation
-> ReadPrec [DocumentationPartLocation]
-> Read DocumentationPartLocation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DocumentationPartLocation]
$creadListPrec :: ReadPrec [DocumentationPartLocation]
readPrec :: ReadPrec DocumentationPartLocation
$creadPrec :: ReadPrec DocumentationPartLocation
readList :: ReadS [DocumentationPartLocation]
$creadList :: ReadS [DocumentationPartLocation]
readsPrec :: Int -> ReadS DocumentationPartLocation
$creadsPrec :: Int -> ReadS DocumentationPartLocation
Prelude.Read, Int -> DocumentationPartLocation -> ShowS
[DocumentationPartLocation] -> ShowS
DocumentationPartLocation -> String
(Int -> DocumentationPartLocation -> ShowS)
-> (DocumentationPartLocation -> String)
-> ([DocumentationPartLocation] -> ShowS)
-> Show DocumentationPartLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocumentationPartLocation] -> ShowS
$cshowList :: [DocumentationPartLocation] -> ShowS
show :: DocumentationPartLocation -> String
$cshow :: DocumentationPartLocation -> String
showsPrec :: Int -> DocumentationPartLocation -> ShowS
$cshowsPrec :: Int -> DocumentationPartLocation -> ShowS
Prelude.Show, (forall x.
 DocumentationPartLocation -> Rep DocumentationPartLocation x)
-> (forall x.
    Rep DocumentationPartLocation x -> DocumentationPartLocation)
-> Generic DocumentationPartLocation
forall x.
Rep DocumentationPartLocation x -> DocumentationPartLocation
forall x.
DocumentationPartLocation -> Rep DocumentationPartLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DocumentationPartLocation x -> DocumentationPartLocation
$cfrom :: forall x.
DocumentationPartLocation -> Rep DocumentationPartLocation x
Prelude.Generic)

-- |
-- Create a value of 'DocumentationPartLocation' 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:
--
-- 'path', 'documentationPartLocation_path' - The URL path of the target. It is a valid field for the API entity types
-- of @RESOURCE@, @METHOD@, @PATH_PARAMETER@, @QUERY_PARAMETER@,
-- @REQUEST_HEADER@, @REQUEST_BODY@, @RESPONSE@, @RESPONSE_HEADER@, and
-- @RESPONSE_BODY@. The default value is @\/@ for the root resource. When
-- an applicable child entity inherits the content of another entity of the
-- same type with more general specifications of the other @location@
-- attributes, the child entity\'s @path@ attribute must match that of the
-- parent entity as a prefix.
--
-- 'name', 'documentationPartLocation_name' - The name of the targeted API entity. It is a valid and required field
-- for the API entity types of @AUTHORIZER@, @MODEL@, @PATH_PARAMETER@,
-- @QUERY_PARAMETER@, @REQUEST_HEADER@, @REQUEST_BODY@ and
-- @RESPONSE_HEADER@. It is an invalid field for any other entity type.
--
-- 'method', 'documentationPartLocation_method' - The HTTP verb of a method. It is a valid field for the API entity types
-- of @METHOD@, @PATH_PARAMETER@, @QUERY_PARAMETER@, @REQUEST_HEADER@,
-- @REQUEST_BODY@, @RESPONSE@, @RESPONSE_HEADER@, and @RESPONSE_BODY@. The
-- default value is @*@ for any method. When an applicable child entity
-- inherits the content of an entity of the same type with more general
-- specifications of the other @location@ attributes, the child entity\'s
-- @method@ attribute must match that of the parent entity exactly.
--
-- 'statusCode', 'documentationPartLocation_statusCode' - The HTTP status code of a response. It is a valid field for the API
-- entity types of @RESPONSE@, @RESPONSE_HEADER@, and @RESPONSE_BODY@. The
-- default value is @*@ for any status code. When an applicable child
-- entity inherits the content of an entity of the same type with more
-- general specifications of the other @location@ attributes, the child
-- entity\'s @statusCode@ attribute must match that of the parent entity
-- exactly.
--
-- 'type'', 'documentationPartLocation_type' - [Required] The type of API entity to which the documentation content
-- applies. Valid values are @API@, @AUTHORIZER@, @MODEL@, @RESOURCE@,
-- @METHOD@, @PATH_PARAMETER@, @QUERY_PARAMETER@, @REQUEST_HEADER@,
-- @REQUEST_BODY@, @RESPONSE@, @RESPONSE_HEADER@, and @RESPONSE_BODY@.
-- Content inheritance does not apply to any entity of the @API@,
-- @AUTHORIZER@, @METHOD@, @MODEL@, @REQUEST_BODY@, or @RESOURCE@ type.
newDocumentationPartLocation ::
  -- | 'type''
  DocumentationPartType ->
  DocumentationPartLocation
newDocumentationPartLocation :: DocumentationPartType -> DocumentationPartLocation
newDocumentationPartLocation DocumentationPartType
pType_ =
  DocumentationPartLocation' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DocumentationPartType
-> DocumentationPartLocation
DocumentationPartLocation'
    { $sel:path:DocumentationPartLocation' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DocumentationPartLocation' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:method:DocumentationPartLocation' :: Maybe Text
method = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusCode:DocumentationPartLocation' :: Maybe Text
statusCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':DocumentationPartLocation' :: DocumentationPartType
type' = DocumentationPartType
pType_
    }

-- | The URL path of the target. It is a valid field for the API entity types
-- of @RESOURCE@, @METHOD@, @PATH_PARAMETER@, @QUERY_PARAMETER@,
-- @REQUEST_HEADER@, @REQUEST_BODY@, @RESPONSE@, @RESPONSE_HEADER@, and
-- @RESPONSE_BODY@. The default value is @\/@ for the root resource. When
-- an applicable child entity inherits the content of another entity of the
-- same type with more general specifications of the other @location@
-- attributes, the child entity\'s @path@ attribute must match that of the
-- parent entity as a prefix.
documentationPartLocation_path :: Lens.Lens' DocumentationPartLocation (Prelude.Maybe Prelude.Text)
documentationPartLocation_path :: (Maybe Text -> f (Maybe Text))
-> DocumentationPartLocation -> f DocumentationPartLocation
documentationPartLocation_path = (DocumentationPartLocation -> Maybe Text)
-> (DocumentationPartLocation
    -> Maybe Text -> DocumentationPartLocation)
-> Lens
     DocumentationPartLocation
     DocumentationPartLocation
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentationPartLocation' {Maybe Text
path :: Maybe Text
$sel:path:DocumentationPartLocation' :: DocumentationPartLocation -> Maybe Text
path} -> Maybe Text
path) (\s :: DocumentationPartLocation
s@DocumentationPartLocation' {} Maybe Text
a -> DocumentationPartLocation
s {$sel:path:DocumentationPartLocation' :: Maybe Text
path = Maybe Text
a} :: DocumentationPartLocation)

-- | The name of the targeted API entity. It is a valid and required field
-- for the API entity types of @AUTHORIZER@, @MODEL@, @PATH_PARAMETER@,
-- @QUERY_PARAMETER@, @REQUEST_HEADER@, @REQUEST_BODY@ and
-- @RESPONSE_HEADER@. It is an invalid field for any other entity type.
documentationPartLocation_name :: Lens.Lens' DocumentationPartLocation (Prelude.Maybe Prelude.Text)
documentationPartLocation_name :: (Maybe Text -> f (Maybe Text))
-> DocumentationPartLocation -> f DocumentationPartLocation
documentationPartLocation_name = (DocumentationPartLocation -> Maybe Text)
-> (DocumentationPartLocation
    -> Maybe Text -> DocumentationPartLocation)
-> Lens
     DocumentationPartLocation
     DocumentationPartLocation
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentationPartLocation' {Maybe Text
name :: Maybe Text
$sel:name:DocumentationPartLocation' :: DocumentationPartLocation -> Maybe Text
name} -> Maybe Text
name) (\s :: DocumentationPartLocation
s@DocumentationPartLocation' {} Maybe Text
a -> DocumentationPartLocation
s {$sel:name:DocumentationPartLocation' :: Maybe Text
name = Maybe Text
a} :: DocumentationPartLocation)

-- | The HTTP verb of a method. It is a valid field for the API entity types
-- of @METHOD@, @PATH_PARAMETER@, @QUERY_PARAMETER@, @REQUEST_HEADER@,
-- @REQUEST_BODY@, @RESPONSE@, @RESPONSE_HEADER@, and @RESPONSE_BODY@. The
-- default value is @*@ for any method. When an applicable child entity
-- inherits the content of an entity of the same type with more general
-- specifications of the other @location@ attributes, the child entity\'s
-- @method@ attribute must match that of the parent entity exactly.
documentationPartLocation_method :: Lens.Lens' DocumentationPartLocation (Prelude.Maybe Prelude.Text)
documentationPartLocation_method :: (Maybe Text -> f (Maybe Text))
-> DocumentationPartLocation -> f DocumentationPartLocation
documentationPartLocation_method = (DocumentationPartLocation -> Maybe Text)
-> (DocumentationPartLocation
    -> Maybe Text -> DocumentationPartLocation)
-> Lens
     DocumentationPartLocation
     DocumentationPartLocation
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentationPartLocation' {Maybe Text
method :: Maybe Text
$sel:method:DocumentationPartLocation' :: DocumentationPartLocation -> Maybe Text
method} -> Maybe Text
method) (\s :: DocumentationPartLocation
s@DocumentationPartLocation' {} Maybe Text
a -> DocumentationPartLocation
s {$sel:method:DocumentationPartLocation' :: Maybe Text
method = Maybe Text
a} :: DocumentationPartLocation)

-- | The HTTP status code of a response. It is a valid field for the API
-- entity types of @RESPONSE@, @RESPONSE_HEADER@, and @RESPONSE_BODY@. The
-- default value is @*@ for any status code. When an applicable child
-- entity inherits the content of an entity of the same type with more
-- general specifications of the other @location@ attributes, the child
-- entity\'s @statusCode@ attribute must match that of the parent entity
-- exactly.
documentationPartLocation_statusCode :: Lens.Lens' DocumentationPartLocation (Prelude.Maybe Prelude.Text)
documentationPartLocation_statusCode :: (Maybe Text -> f (Maybe Text))
-> DocumentationPartLocation -> f DocumentationPartLocation
documentationPartLocation_statusCode = (DocumentationPartLocation -> Maybe Text)
-> (DocumentationPartLocation
    -> Maybe Text -> DocumentationPartLocation)
-> Lens
     DocumentationPartLocation
     DocumentationPartLocation
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentationPartLocation' {Maybe Text
statusCode :: Maybe Text
$sel:statusCode:DocumentationPartLocation' :: DocumentationPartLocation -> Maybe Text
statusCode} -> Maybe Text
statusCode) (\s :: DocumentationPartLocation
s@DocumentationPartLocation' {} Maybe Text
a -> DocumentationPartLocation
s {$sel:statusCode:DocumentationPartLocation' :: Maybe Text
statusCode = Maybe Text
a} :: DocumentationPartLocation)

-- | [Required] The type of API entity to which the documentation content
-- applies. Valid values are @API@, @AUTHORIZER@, @MODEL@, @RESOURCE@,
-- @METHOD@, @PATH_PARAMETER@, @QUERY_PARAMETER@, @REQUEST_HEADER@,
-- @REQUEST_BODY@, @RESPONSE@, @RESPONSE_HEADER@, and @RESPONSE_BODY@.
-- Content inheritance does not apply to any entity of the @API@,
-- @AUTHORIZER@, @METHOD@, @MODEL@, @REQUEST_BODY@, or @RESOURCE@ type.
documentationPartLocation_type :: Lens.Lens' DocumentationPartLocation DocumentationPartType
documentationPartLocation_type :: (DocumentationPartType -> f DocumentationPartType)
-> DocumentationPartLocation -> f DocumentationPartLocation
documentationPartLocation_type = (DocumentationPartLocation -> DocumentationPartType)
-> (DocumentationPartLocation
    -> DocumentationPartType -> DocumentationPartLocation)
-> Lens
     DocumentationPartLocation
     DocumentationPartLocation
     DocumentationPartType
     DocumentationPartType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentationPartLocation' {DocumentationPartType
type' :: DocumentationPartType
$sel:type':DocumentationPartLocation' :: DocumentationPartLocation -> DocumentationPartType
type'} -> DocumentationPartType
type') (\s :: DocumentationPartLocation
s@DocumentationPartLocation' {} DocumentationPartType
a -> DocumentationPartLocation
s {$sel:type':DocumentationPartLocation' :: DocumentationPartType
type' = DocumentationPartType
a} :: DocumentationPartLocation)

instance Core.FromJSON DocumentationPartLocation where
  parseJSON :: Value -> Parser DocumentationPartLocation
parseJSON =
    String
-> (Object -> Parser DocumentationPartLocation)
-> Value
-> Parser DocumentationPartLocation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DocumentationPartLocation"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DocumentationPartType
-> DocumentationPartLocation
DocumentationPartLocation'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> DocumentationPartType
 -> DocumentationPartLocation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> DocumentationPartType
      -> DocumentationPartLocation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"path")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> DocumentationPartType
   -> DocumentationPartLocation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> DocumentationPartType
      -> DocumentationPartLocation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
            Parser
  (Maybe Text
   -> Maybe Text
   -> DocumentationPartType
   -> DocumentationPartLocation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> DocumentationPartType -> DocumentationPartLocation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"method")
            Parser
  (Maybe Text -> DocumentationPartType -> DocumentationPartLocation)
-> Parser (Maybe Text)
-> Parser (DocumentationPartType -> DocumentationPartLocation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"statusCode")
            Parser (DocumentationPartType -> DocumentationPartLocation)
-> Parser DocumentationPartType -> Parser DocumentationPartLocation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser DocumentationPartType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"type")
      )

instance Prelude.Hashable DocumentationPartLocation

instance Prelude.NFData DocumentationPartLocation

instance Core.ToJSON DocumentationPartLocation where
  toJSON :: DocumentationPartLocation -> Value
toJSON DocumentationPartLocation' {Maybe Text
DocumentationPartType
type' :: DocumentationPartType
statusCode :: Maybe Text
method :: Maybe Text
name :: Maybe Text
path :: Maybe Text
$sel:type':DocumentationPartLocation' :: DocumentationPartLocation -> DocumentationPartType
$sel:statusCode:DocumentationPartLocation' :: DocumentationPartLocation -> Maybe Text
$sel:method:DocumentationPartLocation' :: DocumentationPartLocation -> Maybe Text
$sel:name:DocumentationPartLocation' :: DocumentationPartLocation -> Maybe Text
$sel:path:DocumentationPartLocation' :: DocumentationPartLocation -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"path" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
path,
            (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Text
"method" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
method,
            (Text
"statusCode" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
statusCode,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"type" Text -> DocumentationPartType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DocumentationPartType
type')
          ]
      )