{-# 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.Lightsail.Types.DomainEntry
-- 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.Lightsail.Types.DomainEntry where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes a domain recordset entry.
--
-- /See:/ 'newDomainEntry' smart constructor.
data DomainEntry = DomainEntry'
  { -- | When @true@, specifies whether the domain entry is an alias used by the
    -- Lightsail load balancer. You can include an alias (A type) record in
    -- your request, which points to a load balancer DNS name and routes
    -- traffic to your load balancer.
    DomainEntry -> Maybe Bool
isAlias :: Prelude.Maybe Prelude.Bool,
    -- | The name of the domain.
    DomainEntry -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The ID of the domain recordset entry.
    DomainEntry -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | (Deprecated) The options for the domain entry.
    --
    -- In releases prior to November 29, 2017, this parameter was not included
    -- in the API response. It is now deprecated.
    DomainEntry -> Maybe (HashMap Text Text)
options :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The type of domain entry, such as address for IPv4 (A), address for IPv6
    -- (AAAA), canonical name (CNAME), mail exchanger (MX), name server (NS),
    -- start of authority (SOA), service locator (SRV), or text (TXT).
    --
    -- The following domain entry types can be used:
    --
    -- -   @A@
    --
    -- -   @AAAA@
    --
    -- -   @CNAME@
    --
    -- -   @MX@
    --
    -- -   @NS@
    --
    -- -   @SOA@
    --
    -- -   @SRV@
    --
    -- -   @TXT@
    DomainEntry -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
    -- | The target IP address (e.g., @192.0.2.0@), or AWS name server (e.g.,
    -- @ns-111.awsdns-22.com.@).
    --
    -- For Lightsail load balancers, the value looks like
    -- @ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com@.
    -- For Lightsail distributions, the value looks like
    -- @exampled1182ne.cloudfront.net@. For Lightsail container services, the
    -- value looks like
    -- @container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com@.
    -- Be sure to also set @isAlias@ to @true@ when setting up an A record for
    -- a Lightsail load balancer, distribution, or container service.
    DomainEntry -> Maybe Text
target :: Prelude.Maybe Prelude.Text
  }
  deriving (DomainEntry -> DomainEntry -> Bool
(DomainEntry -> DomainEntry -> Bool)
-> (DomainEntry -> DomainEntry -> Bool) -> Eq DomainEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainEntry -> DomainEntry -> Bool
$c/= :: DomainEntry -> DomainEntry -> Bool
== :: DomainEntry -> DomainEntry -> Bool
$c== :: DomainEntry -> DomainEntry -> Bool
Prelude.Eq, ReadPrec [DomainEntry]
ReadPrec DomainEntry
Int -> ReadS DomainEntry
ReadS [DomainEntry]
(Int -> ReadS DomainEntry)
-> ReadS [DomainEntry]
-> ReadPrec DomainEntry
-> ReadPrec [DomainEntry]
-> Read DomainEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainEntry]
$creadListPrec :: ReadPrec [DomainEntry]
readPrec :: ReadPrec DomainEntry
$creadPrec :: ReadPrec DomainEntry
readList :: ReadS [DomainEntry]
$creadList :: ReadS [DomainEntry]
readsPrec :: Int -> ReadS DomainEntry
$creadsPrec :: Int -> ReadS DomainEntry
Prelude.Read, Int -> DomainEntry -> ShowS
[DomainEntry] -> ShowS
DomainEntry -> String
(Int -> DomainEntry -> ShowS)
-> (DomainEntry -> String)
-> ([DomainEntry] -> ShowS)
-> Show DomainEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainEntry] -> ShowS
$cshowList :: [DomainEntry] -> ShowS
show :: DomainEntry -> String
$cshow :: DomainEntry -> String
showsPrec :: Int -> DomainEntry -> ShowS
$cshowsPrec :: Int -> DomainEntry -> ShowS
Prelude.Show, (forall x. DomainEntry -> Rep DomainEntry x)
-> (forall x. Rep DomainEntry x -> DomainEntry)
-> Generic DomainEntry
forall x. Rep DomainEntry x -> DomainEntry
forall x. DomainEntry -> Rep DomainEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainEntry x -> DomainEntry
$cfrom :: forall x. DomainEntry -> Rep DomainEntry x
Prelude.Generic)

-- |
-- Create a value of 'DomainEntry' 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:
--
-- 'isAlias', 'domainEntry_isAlias' - When @true@, specifies whether the domain entry is an alias used by the
-- Lightsail load balancer. You can include an alias (A type) record in
-- your request, which points to a load balancer DNS name and routes
-- traffic to your load balancer.
--
-- 'name', 'domainEntry_name' - The name of the domain.
--
-- 'id', 'domainEntry_id' - The ID of the domain recordset entry.
--
-- 'options', 'domainEntry_options' - (Deprecated) The options for the domain entry.
--
-- In releases prior to November 29, 2017, this parameter was not included
-- in the API response. It is now deprecated.
--
-- 'type'', 'domainEntry_type' - The type of domain entry, such as address for IPv4 (A), address for IPv6
-- (AAAA), canonical name (CNAME), mail exchanger (MX), name server (NS),
-- start of authority (SOA), service locator (SRV), or text (TXT).
--
-- The following domain entry types can be used:
--
-- -   @A@
--
-- -   @AAAA@
--
-- -   @CNAME@
--
-- -   @MX@
--
-- -   @NS@
--
-- -   @SOA@
--
-- -   @SRV@
--
-- -   @TXT@
--
-- 'target', 'domainEntry_target' - The target IP address (e.g., @192.0.2.0@), or AWS name server (e.g.,
-- @ns-111.awsdns-22.com.@).
--
-- For Lightsail load balancers, the value looks like
-- @ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com@.
-- For Lightsail distributions, the value looks like
-- @exampled1182ne.cloudfront.net@. For Lightsail container services, the
-- value looks like
-- @container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com@.
-- Be sure to also set @isAlias@ to @true@ when setting up an A record for
-- a Lightsail load balancer, distribution, or container service.
newDomainEntry ::
  DomainEntry
newDomainEntry :: DomainEntry
newDomainEntry =
  DomainEntry' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DomainEntry
DomainEntry'
    { $sel:isAlias:DomainEntry' :: Maybe Bool
isAlias = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DomainEntry' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:DomainEntry' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:options:DomainEntry' :: Maybe (HashMap Text Text)
options = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:type':DomainEntry' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:target:DomainEntry' :: Maybe Text
target = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | When @true@, specifies whether the domain entry is an alias used by the
-- Lightsail load balancer. You can include an alias (A type) record in
-- your request, which points to a load balancer DNS name and routes
-- traffic to your load balancer.
domainEntry_isAlias :: Lens.Lens' DomainEntry (Prelude.Maybe Prelude.Bool)
domainEntry_isAlias :: (Maybe Bool -> f (Maybe Bool)) -> DomainEntry -> f DomainEntry
domainEntry_isAlias = (DomainEntry -> Maybe Bool)
-> (DomainEntry -> Maybe Bool -> DomainEntry)
-> Lens DomainEntry DomainEntry (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainEntry' {Maybe Bool
isAlias :: Maybe Bool
$sel:isAlias:DomainEntry' :: DomainEntry -> Maybe Bool
isAlias} -> Maybe Bool
isAlias) (\s :: DomainEntry
s@DomainEntry' {} Maybe Bool
a -> DomainEntry
s {$sel:isAlias:DomainEntry' :: Maybe Bool
isAlias = Maybe Bool
a} :: DomainEntry)

-- | The name of the domain.
domainEntry_name :: Lens.Lens' DomainEntry (Prelude.Maybe Prelude.Text)
domainEntry_name :: (Maybe Text -> f (Maybe Text)) -> DomainEntry -> f DomainEntry
domainEntry_name = (DomainEntry -> Maybe Text)
-> (DomainEntry -> Maybe Text -> DomainEntry)
-> Lens DomainEntry DomainEntry (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainEntry' {Maybe Text
name :: Maybe Text
$sel:name:DomainEntry' :: DomainEntry -> Maybe Text
name} -> Maybe Text
name) (\s :: DomainEntry
s@DomainEntry' {} Maybe Text
a -> DomainEntry
s {$sel:name:DomainEntry' :: Maybe Text
name = Maybe Text
a} :: DomainEntry)

-- | The ID of the domain recordset entry.
domainEntry_id :: Lens.Lens' DomainEntry (Prelude.Maybe Prelude.Text)
domainEntry_id :: (Maybe Text -> f (Maybe Text)) -> DomainEntry -> f DomainEntry
domainEntry_id = (DomainEntry -> Maybe Text)
-> (DomainEntry -> Maybe Text -> DomainEntry)
-> Lens DomainEntry DomainEntry (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainEntry' {Maybe Text
id :: Maybe Text
$sel:id:DomainEntry' :: DomainEntry -> Maybe Text
id} -> Maybe Text
id) (\s :: DomainEntry
s@DomainEntry' {} Maybe Text
a -> DomainEntry
s {$sel:id:DomainEntry' :: Maybe Text
id = Maybe Text
a} :: DomainEntry)

-- | (Deprecated) The options for the domain entry.
--
-- In releases prior to November 29, 2017, this parameter was not included
-- in the API response. It is now deprecated.
domainEntry_options :: Lens.Lens' DomainEntry (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
domainEntry_options :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DomainEntry -> f DomainEntry
domainEntry_options = (DomainEntry -> Maybe (HashMap Text Text))
-> (DomainEntry -> Maybe (HashMap Text Text) -> DomainEntry)
-> Lens
     DomainEntry
     DomainEntry
     (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 (\DomainEntry' {Maybe (HashMap Text Text)
options :: Maybe (HashMap Text Text)
$sel:options:DomainEntry' :: DomainEntry -> Maybe (HashMap Text Text)
options} -> Maybe (HashMap Text Text)
options) (\s :: DomainEntry
s@DomainEntry' {} Maybe (HashMap Text Text)
a -> DomainEntry
s {$sel:options:DomainEntry' :: Maybe (HashMap Text Text)
options = Maybe (HashMap Text Text)
a} :: DomainEntry) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DomainEntry -> f DomainEntry)
-> ((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)))
-> DomainEntry
-> f DomainEntry
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

-- | The type of domain entry, such as address for IPv4 (A), address for IPv6
-- (AAAA), canonical name (CNAME), mail exchanger (MX), name server (NS),
-- start of authority (SOA), service locator (SRV), or text (TXT).
--
-- The following domain entry types can be used:
--
-- -   @A@
--
-- -   @AAAA@
--
-- -   @CNAME@
--
-- -   @MX@
--
-- -   @NS@
--
-- -   @SOA@
--
-- -   @SRV@
--
-- -   @TXT@
domainEntry_type :: Lens.Lens' DomainEntry (Prelude.Maybe Prelude.Text)
domainEntry_type :: (Maybe Text -> f (Maybe Text)) -> DomainEntry -> f DomainEntry
domainEntry_type = (DomainEntry -> Maybe Text)
-> (DomainEntry -> Maybe Text -> DomainEntry)
-> Lens DomainEntry DomainEntry (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainEntry' {Maybe Text
type' :: Maybe Text
$sel:type':DomainEntry' :: DomainEntry -> Maybe Text
type'} -> Maybe Text
type') (\s :: DomainEntry
s@DomainEntry' {} Maybe Text
a -> DomainEntry
s {$sel:type':DomainEntry' :: Maybe Text
type' = Maybe Text
a} :: DomainEntry)

-- | The target IP address (e.g., @192.0.2.0@), or AWS name server (e.g.,
-- @ns-111.awsdns-22.com.@).
--
-- For Lightsail load balancers, the value looks like
-- @ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com@.
-- For Lightsail distributions, the value looks like
-- @exampled1182ne.cloudfront.net@. For Lightsail container services, the
-- value looks like
-- @container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com@.
-- Be sure to also set @isAlias@ to @true@ when setting up an A record for
-- a Lightsail load balancer, distribution, or container service.
domainEntry_target :: Lens.Lens' DomainEntry (Prelude.Maybe Prelude.Text)
domainEntry_target :: (Maybe Text -> f (Maybe Text)) -> DomainEntry -> f DomainEntry
domainEntry_target = (DomainEntry -> Maybe Text)
-> (DomainEntry -> Maybe Text -> DomainEntry)
-> Lens DomainEntry DomainEntry (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainEntry' {Maybe Text
target :: Maybe Text
$sel:target:DomainEntry' :: DomainEntry -> Maybe Text
target} -> Maybe Text
target) (\s :: DomainEntry
s@DomainEntry' {} Maybe Text
a -> DomainEntry
s {$sel:target:DomainEntry' :: Maybe Text
target = Maybe Text
a} :: DomainEntry)

instance Core.FromJSON DomainEntry where
  parseJSON :: Value -> Parser DomainEntry
parseJSON =
    String
-> (Object -> Parser DomainEntry) -> Value -> Parser DomainEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DomainEntry"
      ( \Object
x ->
          Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DomainEntry
DomainEntry'
            (Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Maybe Text
 -> DomainEntry)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> DomainEntry)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"isAlias")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> DomainEntry)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> DomainEntry)
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 (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> DomainEntry)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Text -> Maybe Text -> DomainEntry)
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
"id")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe Text -> Maybe Text -> DomainEntry)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe Text -> Maybe Text -> DomainEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"options" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> Maybe Text -> DomainEntry)
-> Parser (Maybe Text) -> Parser (Maybe Text -> DomainEntry)
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
"type")
            Parser (Maybe Text -> DomainEntry)
-> Parser (Maybe Text) -> Parser DomainEntry
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
"target")
      )

instance Prelude.Hashable DomainEntry

instance Prelude.NFData DomainEntry

instance Core.ToJSON DomainEntry where
  toJSON :: DomainEntry -> Value
toJSON DomainEntry' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
target :: Maybe Text
type' :: Maybe Text
options :: Maybe (HashMap Text Text)
id :: Maybe Text
name :: Maybe Text
isAlias :: Maybe Bool
$sel:target:DomainEntry' :: DomainEntry -> Maybe Text
$sel:type':DomainEntry' :: DomainEntry -> Maybe Text
$sel:options:DomainEntry' :: DomainEntry -> Maybe (HashMap Text Text)
$sel:id:DomainEntry' :: DomainEntry -> Maybe Text
$sel:name:DomainEntry' :: DomainEntry -> Maybe Text
$sel:isAlias:DomainEntry' :: DomainEntry -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"isAlias" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
isAlias,
            (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
"id" 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
id,
            (Text
"options" 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)
options,
            (Text
"type" 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
type',
            (Text
"target" 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
target
          ]
      )