{-# 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 #-}
module Amazonka.CustomerProfiles.Types.UpdateAddress where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UpdateAddress = UpdateAddress'
{
UpdateAddress -> Maybe Text
address2 :: Prelude.Maybe Prelude.Text,
UpdateAddress -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
UpdateAddress -> Maybe Text
address4 :: Prelude.Maybe Prelude.Text,
UpdateAddress -> Maybe Text
county :: Prelude.Maybe Prelude.Text,
UpdateAddress -> Maybe Text
address3 :: Prelude.Maybe Prelude.Text,
UpdateAddress -> Maybe Text
postalCode :: Prelude.Maybe Prelude.Text,
UpdateAddress -> Maybe Text
country :: Prelude.Maybe Prelude.Text,
UpdateAddress -> Maybe Text
city :: Prelude.Maybe Prelude.Text,
UpdateAddress -> Maybe Text
address1 :: Prelude.Maybe Prelude.Text,
UpdateAddress -> Maybe Text
province :: Prelude.Maybe Prelude.Text
}
deriving (UpdateAddress -> UpdateAddress -> Bool
(UpdateAddress -> UpdateAddress -> Bool)
-> (UpdateAddress -> UpdateAddress -> Bool) -> Eq UpdateAddress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAddress -> UpdateAddress -> Bool
$c/= :: UpdateAddress -> UpdateAddress -> Bool
== :: UpdateAddress -> UpdateAddress -> Bool
$c== :: UpdateAddress -> UpdateAddress -> Bool
Prelude.Eq, ReadPrec [UpdateAddress]
ReadPrec UpdateAddress
Int -> ReadS UpdateAddress
ReadS [UpdateAddress]
(Int -> ReadS UpdateAddress)
-> ReadS [UpdateAddress]
-> ReadPrec UpdateAddress
-> ReadPrec [UpdateAddress]
-> Read UpdateAddress
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAddress]
$creadListPrec :: ReadPrec [UpdateAddress]
readPrec :: ReadPrec UpdateAddress
$creadPrec :: ReadPrec UpdateAddress
readList :: ReadS [UpdateAddress]
$creadList :: ReadS [UpdateAddress]
readsPrec :: Int -> ReadS UpdateAddress
$creadsPrec :: Int -> ReadS UpdateAddress
Prelude.Read, Int -> UpdateAddress -> ShowS
[UpdateAddress] -> ShowS
UpdateAddress -> String
(Int -> UpdateAddress -> ShowS)
-> (UpdateAddress -> String)
-> ([UpdateAddress] -> ShowS)
-> Show UpdateAddress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAddress] -> ShowS
$cshowList :: [UpdateAddress] -> ShowS
show :: UpdateAddress -> String
$cshow :: UpdateAddress -> String
showsPrec :: Int -> UpdateAddress -> ShowS
$cshowsPrec :: Int -> UpdateAddress -> ShowS
Prelude.Show, (forall x. UpdateAddress -> Rep UpdateAddress x)
-> (forall x. Rep UpdateAddress x -> UpdateAddress)
-> Generic UpdateAddress
forall x. Rep UpdateAddress x -> UpdateAddress
forall x. UpdateAddress -> Rep UpdateAddress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateAddress x -> UpdateAddress
$cfrom :: forall x. UpdateAddress -> Rep UpdateAddress x
Prelude.Generic)
newUpdateAddress ::
UpdateAddress
newUpdateAddress :: UpdateAddress
newUpdateAddress =
UpdateAddress' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> UpdateAddress
UpdateAddress'
{ $sel:address2:UpdateAddress' :: Maybe Text
address2 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:state:UpdateAddress' :: Maybe Text
state = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:address4:UpdateAddress' :: Maybe Text
address4 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:county:UpdateAddress' :: Maybe Text
county = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:address3:UpdateAddress' :: Maybe Text
address3 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:postalCode:UpdateAddress' :: Maybe Text
postalCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:country:UpdateAddress' :: Maybe Text
country = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:city:UpdateAddress' :: Maybe Text
city = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:address1:UpdateAddress' :: Maybe Text
address1 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:province:UpdateAddress' :: Maybe Text
province = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
updateAddress_address2 :: Lens.Lens' UpdateAddress (Prelude.Maybe Prelude.Text)
updateAddress_address2 :: (Maybe Text -> f (Maybe Text)) -> UpdateAddress -> f UpdateAddress
updateAddress_address2 = (UpdateAddress -> Maybe Text)
-> (UpdateAddress -> Maybe Text -> UpdateAddress)
-> Lens UpdateAddress UpdateAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAddress' {Maybe Text
address2 :: Maybe Text
$sel:address2:UpdateAddress' :: UpdateAddress -> Maybe Text
address2} -> Maybe Text
address2) (\s :: UpdateAddress
s@UpdateAddress' {} Maybe Text
a -> UpdateAddress
s {$sel:address2:UpdateAddress' :: Maybe Text
address2 = Maybe Text
a} :: UpdateAddress)
updateAddress_state :: Lens.Lens' UpdateAddress (Prelude.Maybe Prelude.Text)
updateAddress_state :: (Maybe Text -> f (Maybe Text)) -> UpdateAddress -> f UpdateAddress
updateAddress_state = (UpdateAddress -> Maybe Text)
-> (UpdateAddress -> Maybe Text -> UpdateAddress)
-> Lens UpdateAddress UpdateAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAddress' {Maybe Text
state :: Maybe Text
$sel:state:UpdateAddress' :: UpdateAddress -> Maybe Text
state} -> Maybe Text
state) (\s :: UpdateAddress
s@UpdateAddress' {} Maybe Text
a -> UpdateAddress
s {$sel:state:UpdateAddress' :: Maybe Text
state = Maybe Text
a} :: UpdateAddress)
updateAddress_address4 :: Lens.Lens' UpdateAddress (Prelude.Maybe Prelude.Text)
updateAddress_address4 :: (Maybe Text -> f (Maybe Text)) -> UpdateAddress -> f UpdateAddress
updateAddress_address4 = (UpdateAddress -> Maybe Text)
-> (UpdateAddress -> Maybe Text -> UpdateAddress)
-> Lens UpdateAddress UpdateAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAddress' {Maybe Text
address4 :: Maybe Text
$sel:address4:UpdateAddress' :: UpdateAddress -> Maybe Text
address4} -> Maybe Text
address4) (\s :: UpdateAddress
s@UpdateAddress' {} Maybe Text
a -> UpdateAddress
s {$sel:address4:UpdateAddress' :: Maybe Text
address4 = Maybe Text
a} :: UpdateAddress)
updateAddress_county :: Lens.Lens' UpdateAddress (Prelude.Maybe Prelude.Text)
updateAddress_county :: (Maybe Text -> f (Maybe Text)) -> UpdateAddress -> f UpdateAddress
updateAddress_county = (UpdateAddress -> Maybe Text)
-> (UpdateAddress -> Maybe Text -> UpdateAddress)
-> Lens UpdateAddress UpdateAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAddress' {Maybe Text
county :: Maybe Text
$sel:county:UpdateAddress' :: UpdateAddress -> Maybe Text
county} -> Maybe Text
county) (\s :: UpdateAddress
s@UpdateAddress' {} Maybe Text
a -> UpdateAddress
s {$sel:county:UpdateAddress' :: Maybe Text
county = Maybe Text
a} :: UpdateAddress)
updateAddress_address3 :: Lens.Lens' UpdateAddress (Prelude.Maybe Prelude.Text)
updateAddress_address3 :: (Maybe Text -> f (Maybe Text)) -> UpdateAddress -> f UpdateAddress
updateAddress_address3 = (UpdateAddress -> Maybe Text)
-> (UpdateAddress -> Maybe Text -> UpdateAddress)
-> Lens UpdateAddress UpdateAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAddress' {Maybe Text
address3 :: Maybe Text
$sel:address3:UpdateAddress' :: UpdateAddress -> Maybe Text
address3} -> Maybe Text
address3) (\s :: UpdateAddress
s@UpdateAddress' {} Maybe Text
a -> UpdateAddress
s {$sel:address3:UpdateAddress' :: Maybe Text
address3 = Maybe Text
a} :: UpdateAddress)
updateAddress_postalCode :: Lens.Lens' UpdateAddress (Prelude.Maybe Prelude.Text)
updateAddress_postalCode :: (Maybe Text -> f (Maybe Text)) -> UpdateAddress -> f UpdateAddress
updateAddress_postalCode = (UpdateAddress -> Maybe Text)
-> (UpdateAddress -> Maybe Text -> UpdateAddress)
-> Lens UpdateAddress UpdateAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAddress' {Maybe Text
postalCode :: Maybe Text
$sel:postalCode:UpdateAddress' :: UpdateAddress -> Maybe Text
postalCode} -> Maybe Text
postalCode) (\s :: UpdateAddress
s@UpdateAddress' {} Maybe Text
a -> UpdateAddress
s {$sel:postalCode:UpdateAddress' :: Maybe Text
postalCode = Maybe Text
a} :: UpdateAddress)
updateAddress_country :: Lens.Lens' UpdateAddress (Prelude.Maybe Prelude.Text)
updateAddress_country :: (Maybe Text -> f (Maybe Text)) -> UpdateAddress -> f UpdateAddress
updateAddress_country = (UpdateAddress -> Maybe Text)
-> (UpdateAddress -> Maybe Text -> UpdateAddress)
-> Lens UpdateAddress UpdateAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAddress' {Maybe Text
country :: Maybe Text
$sel:country:UpdateAddress' :: UpdateAddress -> Maybe Text
country} -> Maybe Text
country) (\s :: UpdateAddress
s@UpdateAddress' {} Maybe Text
a -> UpdateAddress
s {$sel:country:UpdateAddress' :: Maybe Text
country = Maybe Text
a} :: UpdateAddress)
updateAddress_city :: Lens.Lens' UpdateAddress (Prelude.Maybe Prelude.Text)
updateAddress_city :: (Maybe Text -> f (Maybe Text)) -> UpdateAddress -> f UpdateAddress
updateAddress_city = (UpdateAddress -> Maybe Text)
-> (UpdateAddress -> Maybe Text -> UpdateAddress)
-> Lens UpdateAddress UpdateAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAddress' {Maybe Text
city :: Maybe Text
$sel:city:UpdateAddress' :: UpdateAddress -> Maybe Text
city} -> Maybe Text
city) (\s :: UpdateAddress
s@UpdateAddress' {} Maybe Text
a -> UpdateAddress
s {$sel:city:UpdateAddress' :: Maybe Text
city = Maybe Text
a} :: UpdateAddress)
updateAddress_address1 :: Lens.Lens' UpdateAddress (Prelude.Maybe Prelude.Text)
updateAddress_address1 :: (Maybe Text -> f (Maybe Text)) -> UpdateAddress -> f UpdateAddress
updateAddress_address1 = (UpdateAddress -> Maybe Text)
-> (UpdateAddress -> Maybe Text -> UpdateAddress)
-> Lens UpdateAddress UpdateAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAddress' {Maybe Text
address1 :: Maybe Text
$sel:address1:UpdateAddress' :: UpdateAddress -> Maybe Text
address1} -> Maybe Text
address1) (\s :: UpdateAddress
s@UpdateAddress' {} Maybe Text
a -> UpdateAddress
s {$sel:address1:UpdateAddress' :: Maybe Text
address1 = Maybe Text
a} :: UpdateAddress)
updateAddress_province :: Lens.Lens' UpdateAddress (Prelude.Maybe Prelude.Text)
updateAddress_province :: (Maybe Text -> f (Maybe Text)) -> UpdateAddress -> f UpdateAddress
updateAddress_province = (UpdateAddress -> Maybe Text)
-> (UpdateAddress -> Maybe Text -> UpdateAddress)
-> Lens UpdateAddress UpdateAddress (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAddress' {Maybe Text
province :: Maybe Text
$sel:province:UpdateAddress' :: UpdateAddress -> Maybe Text
province} -> Maybe Text
province) (\s :: UpdateAddress
s@UpdateAddress' {} Maybe Text
a -> UpdateAddress
s {$sel:province:UpdateAddress' :: Maybe Text
province = Maybe Text
a} :: UpdateAddress)
instance Prelude.Hashable UpdateAddress
instance Prelude.NFData UpdateAddress
instance Core.ToJSON UpdateAddress where
toJSON :: UpdateAddress -> Value
toJSON UpdateAddress' {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:UpdateAddress' :: UpdateAddress -> Maybe Text
$sel:address1:UpdateAddress' :: UpdateAddress -> Maybe Text
$sel:city:UpdateAddress' :: UpdateAddress -> Maybe Text
$sel:country:UpdateAddress' :: UpdateAddress -> Maybe Text
$sel:postalCode:UpdateAddress' :: UpdateAddress -> Maybe Text
$sel:address3:UpdateAddress' :: UpdateAddress -> Maybe Text
$sel:county:UpdateAddress' :: UpdateAddress -> Maybe Text
$sel:address4:UpdateAddress' :: UpdateAddress -> Maybe Text
$sel:state:UpdateAddress' :: UpdateAddress -> Maybe Text
$sel:address2:UpdateAddress' :: UpdateAddress -> 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
]
)