{-# 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.CustomerProfiles.Types.Address
-- 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.CustomerProfiles.Types.Address where

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

-- | A generic address associated with the customer that is not mailing,
-- shipping, or billing.
--
-- /See:/ 'newAddress' smart constructor.
data Address = Address'
  { -- | The second line of a customer address.
    Address -> Maybe Text
address2 :: Prelude.Maybe Prelude.Text,
    -- | The state in which a customer lives.
    Address -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
    -- | The fourth line of a customer address.
    Address -> Maybe Text
address4 :: Prelude.Maybe Prelude.Text,
    -- | The county in which a customer lives.
    Address -> Maybe Text
county :: Prelude.Maybe Prelude.Text,
    -- | The third line of a customer address.
    Address -> Maybe Text
address3 :: Prelude.Maybe Prelude.Text,
    -- | The postal code of a customer address.
    Address -> Maybe Text
postalCode :: Prelude.Maybe Prelude.Text,
    -- | The country in which a customer lives.
    Address -> Maybe Text
country :: Prelude.Maybe Prelude.Text,
    -- | The city in which a customer lives.
    Address -> Maybe Text
city :: Prelude.Maybe Prelude.Text,
    -- | The first line of a customer address.
    Address -> Maybe Text
address1 :: Prelude.Maybe Prelude.Text,
    -- | The province in which a customer lives.
    Address -> Maybe Text
province :: Prelude.Maybe Prelude.Text
  }
  deriving (Address -> Address -> Bool
(Address -> Address -> Bool)
-> (Address -> Address -> Bool) -> Eq Address
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Address -> Address -> Bool
$c/= :: Address -> Address -> Bool
== :: Address -> Address -> Bool
$c== :: Address -> Address -> Bool
Prelude.Eq, ReadPrec [Address]
ReadPrec Address
Int -> ReadS Address
ReadS [Address]
(Int -> ReadS Address)
-> ReadS [Address]
-> ReadPrec Address
-> ReadPrec [Address]
-> Read Address
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Address]
$creadListPrec :: ReadPrec [Address]
readPrec :: ReadPrec Address
$creadPrec :: ReadPrec Address
readList :: ReadS [Address]
$creadList :: ReadS [Address]
readsPrec :: Int -> ReadS Address
$creadsPrec :: Int -> ReadS Address
Prelude.Read, Int -> Address -> ShowS
[Address] -> ShowS
Address -> String
(Int -> Address -> ShowS)
-> (Address -> String) -> ([Address] -> ShowS) -> Show Address
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Address] -> ShowS
$cshowList :: [Address] -> ShowS
show :: Address -> String
$cshow :: Address -> String
showsPrec :: Int -> Address -> ShowS
$cshowsPrec :: Int -> Address -> ShowS
Prelude.Show, (forall x. Address -> Rep Address x)
-> (forall x. Rep Address x -> Address) -> Generic Address
forall x. Rep Address x -> Address
forall x. Address -> Rep Address x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Address x -> Address
$cfrom :: forall x. Address -> Rep Address x
Prelude.Generic)

-- |
-- Create a value of 'Address' 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:
--
-- 'address2', 'address_address2' - The second line of a customer address.
--
-- 'state', 'address_state' - The state in which a customer lives.
--
-- 'address4', 'address_address4' - The fourth line of a customer address.
--
-- 'county', 'address_county' - The county in which a customer lives.
--
-- 'address3', 'address_address3' - The third line of a customer address.
--
-- 'postalCode', 'address_postalCode' - The postal code of a customer address.
--
-- 'country', 'address_country' - The country in which a customer lives.
--
-- 'city', 'address_city' - The city in which a customer lives.
--
-- 'address1', 'address_address1' - The first line of a customer address.
--
-- 'province', 'address_province' - The province in which a customer lives.
newAddress ::
  Address
newAddress :: Address
newAddress =
  Address' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Address
Address'
    { $sel:address2:Address' :: Maybe Text
address2 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:Address' :: Maybe Text
state = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:address4:Address' :: Maybe Text
address4 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:county:Address' :: Maybe Text
county = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:address3:Address' :: Maybe Text
address3 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:postalCode:Address' :: Maybe Text
postalCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:country:Address' :: Maybe Text
country = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:city:Address' :: Maybe Text
city = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:address1:Address' :: Maybe Text
address1 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:province:Address' :: Maybe Text
province = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The second line of a customer address.
address_address2 :: Lens.Lens' Address (Prelude.Maybe Prelude.Text)
address_address2 :: (Maybe Text -> f (Maybe Text)) -> Address -> f Address
address_address2 = (Address -> Maybe Text)
-> (Address -> Maybe Text -> Address)
-> Lens Address Address (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Address' {Maybe Text
address2 :: Maybe Text
$sel:address2:Address' :: Address -> Maybe Text
address2} -> Maybe Text
address2) (\s :: Address
s@Address' {} Maybe Text
a -> Address
s {$sel:address2:Address' :: Maybe Text
address2 = Maybe Text
a} :: Address)

-- | The state in which a customer lives.
address_state :: Lens.Lens' Address (Prelude.Maybe Prelude.Text)
address_state :: (Maybe Text -> f (Maybe Text)) -> Address -> f Address
address_state = (Address -> Maybe Text)
-> (Address -> Maybe Text -> Address)
-> Lens Address Address (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Address' {Maybe Text
state :: Maybe Text
$sel:state:Address' :: Address -> Maybe Text
state} -> Maybe Text
state) (\s :: Address
s@Address' {} Maybe Text
a -> Address
s {$sel:state:Address' :: Maybe Text
state = Maybe Text
a} :: Address)

-- | The fourth line of a customer address.
address_address4 :: Lens.Lens' Address (Prelude.Maybe Prelude.Text)
address_address4 :: (Maybe Text -> f (Maybe Text)) -> Address -> f Address
address_address4 = (Address -> Maybe Text)
-> (Address -> Maybe Text -> Address)
-> Lens Address Address (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Address' {Maybe Text
address4 :: Maybe Text
$sel:address4:Address' :: Address -> Maybe Text
address4} -> Maybe Text
address4) (\s :: Address
s@Address' {} Maybe Text
a -> Address
s {$sel:address4:Address' :: Maybe Text
address4 = Maybe Text
a} :: Address)

-- | The county in which a customer lives.
address_county :: Lens.Lens' Address (Prelude.Maybe Prelude.Text)
address_county :: (Maybe Text -> f (Maybe Text)) -> Address -> f Address
address_county = (Address -> Maybe Text)
-> (Address -> Maybe Text -> Address)
-> Lens Address Address (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Address' {Maybe Text
county :: Maybe Text
$sel:county:Address' :: Address -> Maybe Text
county} -> Maybe Text
county) (\s :: Address
s@Address' {} Maybe Text
a -> Address
s {$sel:county:Address' :: Maybe Text
county = Maybe Text
a} :: Address)

-- | The third line of a customer address.
address_address3 :: Lens.Lens' Address (Prelude.Maybe Prelude.Text)
address_address3 :: (Maybe Text -> f (Maybe Text)) -> Address -> f Address
address_address3 = (Address -> Maybe Text)
-> (Address -> Maybe Text -> Address)
-> Lens Address Address (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Address' {Maybe Text
address3 :: Maybe Text
$sel:address3:Address' :: Address -> Maybe Text
address3} -> Maybe Text
address3) (\s :: Address
s@Address' {} Maybe Text
a -> Address
s {$sel:address3:Address' :: Maybe Text
address3 = Maybe Text
a} :: Address)

-- | The postal code of a customer address.
address_postalCode :: Lens.Lens' Address (Prelude.Maybe Prelude.Text)
address_postalCode :: (Maybe Text -> f (Maybe Text)) -> Address -> f Address
address_postalCode = (Address -> Maybe Text)
-> (Address -> Maybe Text -> Address)
-> Lens Address Address (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Address' {Maybe Text
postalCode :: Maybe Text
$sel:postalCode:Address' :: Address -> Maybe Text
postalCode} -> Maybe Text
postalCode) (\s :: Address
s@Address' {} Maybe Text
a -> Address
s {$sel:postalCode:Address' :: Maybe Text
postalCode = Maybe Text
a} :: Address)

-- | The country in which a customer lives.
address_country :: Lens.Lens' Address (Prelude.Maybe Prelude.Text)
address_country :: (Maybe Text -> f (Maybe Text)) -> Address -> f Address
address_country = (Address -> Maybe Text)
-> (Address -> Maybe Text -> Address)
-> Lens Address Address (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Address' {Maybe Text
country :: Maybe Text
$sel:country:Address' :: Address -> Maybe Text
country} -> Maybe Text
country) (\s :: Address
s@Address' {} Maybe Text
a -> Address
s {$sel:country:Address' :: Maybe Text
country = Maybe Text
a} :: Address)

-- | The city in which a customer lives.
address_city :: Lens.Lens' Address (Prelude.Maybe Prelude.Text)
address_city :: (Maybe Text -> f (Maybe Text)) -> Address -> f Address
address_city = (Address -> Maybe Text)
-> (Address -> Maybe Text -> Address)
-> Lens Address Address (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Address' {Maybe Text
city :: Maybe Text
$sel:city:Address' :: Address -> Maybe Text
city} -> Maybe Text
city) (\s :: Address
s@Address' {} Maybe Text
a -> Address
s {$sel:city:Address' :: Maybe Text
city = Maybe Text
a} :: Address)

-- | The first line of a customer address.
address_address1 :: Lens.Lens' Address (Prelude.Maybe Prelude.Text)
address_address1 :: (Maybe Text -> f (Maybe Text)) -> Address -> f Address
address_address1 = (Address -> Maybe Text)
-> (Address -> Maybe Text -> Address)
-> Lens Address Address (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Address' {Maybe Text
address1 :: Maybe Text
$sel:address1:Address' :: Address -> Maybe Text
address1} -> Maybe Text
address1) (\s :: Address
s@Address' {} Maybe Text
a -> Address
s {$sel:address1:Address' :: Maybe Text
address1 = Maybe Text
a} :: Address)

-- | The province in which a customer lives.
address_province :: Lens.Lens' Address (Prelude.Maybe Prelude.Text)
address_province :: (Maybe Text -> f (Maybe Text)) -> Address -> f Address
address_province = (Address -> Maybe Text)
-> (Address -> Maybe Text -> Address)
-> Lens Address Address (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Address' {Maybe Text
province :: Maybe Text
$sel:province:Address' :: Address -> Maybe Text
province} -> Maybe Text
province) (\s :: Address
s@Address' {} Maybe Text
a -> Address
s {$sel:province:Address' :: Maybe Text
province = Maybe Text
a} :: Address)

instance Core.FromJSON Address where
  parseJSON :: Value -> Parser Address
parseJSON =
    String -> (Object -> Parser Address) -> Value -> Parser Address
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Address"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Address
Address'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Address)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Address)
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
"Address2")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Address)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Address)
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
"State")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Address)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Address)
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
"Address4")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Address)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Address)
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
"County")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Address)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Address)
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
"Address3")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Address)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Address)
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
"PostalCode")
            Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Address)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Address)
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
"Country")
            Parser (Maybe Text -> Maybe Text -> Maybe Text -> Address)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Address)
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
"City")
            Parser (Maybe Text -> Maybe Text -> Address)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Address)
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
"Address1")
            Parser (Maybe Text -> Address)
-> Parser (Maybe Text) -> Parser Address
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
"Province")
      )

instance Prelude.Hashable Address

instance Prelude.NFData Address

instance Core.ToJSON Address where
  toJSON :: Address -> Value
toJSON Address' {Maybe Text
province :: Maybe Text
address1 :: Maybe Text
city :: Maybe Text
country :: Maybe Text
postalCode :: Maybe Text
address3 :: Maybe Text
county :: Maybe Text
address4 :: Maybe Text
state :: Maybe Text
address2 :: Maybe Text
$sel:province:Address' :: Address -> Maybe Text
$sel:address1:Address' :: Address -> Maybe Text
$sel:city:Address' :: Address -> Maybe Text
$sel:country:Address' :: Address -> Maybe Text
$sel:postalCode:Address' :: Address -> Maybe Text
$sel:address3:Address' :: Address -> Maybe Text
$sel:county:Address' :: Address -> Maybe Text
$sel:address4:Address' :: Address -> Maybe Text
$sel:state:Address' :: Address -> Maybe Text
$sel:address2:Address' :: Address -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Address2" 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
address2,
            (Text
"State" 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
state,
            (Text
"Address4" 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
address4,
            (Text
"County" 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
county,
            (Text
"Address3" 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
address3,
            (Text
"PostalCode" 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
postalCode,
            (Text
"Country" 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
country,
            (Text
"City" 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
city,
            (Text
"Address1" 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
address1,
            (Text
"Province" 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
province
          ]
      )