{-# 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.Route53Domains.Types.ContactDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53Domains.Types.ContactType
import Amazonka.Route53Domains.Types.CountryCode
import Amazonka.Route53Domains.Types.ExtraParam
data ContactDetail = ContactDetail'
{
ContactDetail -> Maybe Text
addressLine1 :: Prelude.Maybe Prelude.Text,
ContactDetail -> Maybe Text
addressLine2 :: Prelude.Maybe Prelude.Text,
ContactDetail -> Maybe Text
city :: Prelude.Maybe Prelude.Text,
ContactDetail -> Maybe ContactType
contactType :: Prelude.Maybe ContactType,
ContactDetail -> Maybe CountryCode
countryCode :: Prelude.Maybe CountryCode,
ContactDetail -> Maybe Text
email :: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe [ExtraParam],
ContactDetail -> Maybe Text
fax :: Prelude.Maybe Prelude.Text,
ContactDetail -> Maybe Text
firstName :: Prelude.Maybe Prelude.Text,
ContactDetail -> Maybe Text
lastName :: Prelude.Maybe Prelude.Text,
ContactDetail -> Maybe Text
organizationName :: Prelude.Maybe Prelude.Text,
ContactDetail -> Maybe Text
phoneNumber :: Prelude.Maybe Prelude.Text,
ContactDetail -> Maybe Text
state :: Prelude.Maybe Prelude.Text,
ContactDetail -> Maybe Text
zipCode :: Prelude.Maybe Prelude.Text
}
deriving (ContactDetail -> ContactDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContactDetail -> ContactDetail -> Bool
$c/= :: ContactDetail -> ContactDetail -> Bool
== :: ContactDetail -> ContactDetail -> Bool
$c== :: ContactDetail -> ContactDetail -> Bool
Prelude.Eq, Int -> ContactDetail -> ShowS
[ContactDetail] -> ShowS
ContactDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContactDetail] -> ShowS
$cshowList :: [ContactDetail] -> ShowS
show :: ContactDetail -> String
$cshow :: ContactDetail -> String
showsPrec :: Int -> ContactDetail -> ShowS
$cshowsPrec :: Int -> ContactDetail -> ShowS
Prelude.Show, forall x. Rep ContactDetail x -> ContactDetail
forall x. ContactDetail -> Rep ContactDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContactDetail x -> ContactDetail
$cfrom :: forall x. ContactDetail -> Rep ContactDetail x
Prelude.Generic)
newContactDetail ::
ContactDetail
newContactDetail :: ContactDetail
newContactDetail =
ContactDetail'
{ $sel:addressLine1:ContactDetail' :: Maybe Text
addressLine1 = forall a. Maybe a
Prelude.Nothing,
$sel:addressLine2:ContactDetail' :: Maybe Text
addressLine2 = forall a. Maybe a
Prelude.Nothing,
$sel:city:ContactDetail' :: Maybe Text
city = forall a. Maybe a
Prelude.Nothing,
$sel:contactType:ContactDetail' :: Maybe ContactType
contactType = forall a. Maybe a
Prelude.Nothing,
$sel:countryCode:ContactDetail' :: Maybe CountryCode
countryCode = forall a. Maybe a
Prelude.Nothing,
$sel:email:ContactDetail' :: Maybe Text
email = forall a. Maybe a
Prelude.Nothing,
$sel:extraParams:ContactDetail' :: Maybe [ExtraParam]
extraParams = forall a. Maybe a
Prelude.Nothing,
$sel:fax:ContactDetail' :: Maybe Text
fax = forall a. Maybe a
Prelude.Nothing,
$sel:firstName:ContactDetail' :: Maybe Text
firstName = forall a. Maybe a
Prelude.Nothing,
$sel:lastName:ContactDetail' :: Maybe Text
lastName = forall a. Maybe a
Prelude.Nothing,
$sel:organizationName:ContactDetail' :: Maybe Text
organizationName = forall a. Maybe a
Prelude.Nothing,
$sel:phoneNumber:ContactDetail' :: Maybe Text
phoneNumber = forall a. Maybe a
Prelude.Nothing,
$sel:state:ContactDetail' :: Maybe Text
state = forall a. Maybe a
Prelude.Nothing,
$sel:zipCode:ContactDetail' :: Maybe Text
zipCode = forall a. Maybe a
Prelude.Nothing
}
contactDetail_addressLine1 :: Lens.Lens' ContactDetail (Prelude.Maybe Prelude.Text)
contactDetail_addressLine1 :: Lens' ContactDetail (Maybe Text)
contactDetail_addressLine1 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe Text
addressLine1 :: Maybe Text
$sel:addressLine1:ContactDetail' :: ContactDetail -> Maybe Text
addressLine1} -> Maybe Text
addressLine1) (\s :: ContactDetail
s@ContactDetail' {} Maybe Text
a -> ContactDetail
s {$sel:addressLine1:ContactDetail' :: Maybe Text
addressLine1 = Maybe Text
a} :: ContactDetail)
contactDetail_addressLine2 :: Lens.Lens' ContactDetail (Prelude.Maybe Prelude.Text)
contactDetail_addressLine2 :: Lens' ContactDetail (Maybe Text)
contactDetail_addressLine2 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe Text
addressLine2 :: Maybe Text
$sel:addressLine2:ContactDetail' :: ContactDetail -> Maybe Text
addressLine2} -> Maybe Text
addressLine2) (\s :: ContactDetail
s@ContactDetail' {} Maybe Text
a -> ContactDetail
s {$sel:addressLine2:ContactDetail' :: Maybe Text
addressLine2 = Maybe Text
a} :: ContactDetail)
contactDetail_city :: Lens.Lens' ContactDetail (Prelude.Maybe Prelude.Text)
contactDetail_city :: Lens' ContactDetail (Maybe Text)
contactDetail_city = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe Text
city :: Maybe Text
$sel:city:ContactDetail' :: ContactDetail -> Maybe Text
city} -> Maybe Text
city) (\s :: ContactDetail
s@ContactDetail' {} Maybe Text
a -> ContactDetail
s {$sel:city:ContactDetail' :: Maybe Text
city = Maybe Text
a} :: ContactDetail)
contactDetail_contactType :: Lens.Lens' ContactDetail (Prelude.Maybe ContactType)
contactDetail_contactType :: Lens' ContactDetail (Maybe ContactType)
contactDetail_contactType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe ContactType
contactType :: Maybe ContactType
$sel:contactType:ContactDetail' :: ContactDetail -> Maybe ContactType
contactType} -> Maybe ContactType
contactType) (\s :: ContactDetail
s@ContactDetail' {} Maybe ContactType
a -> ContactDetail
s {$sel:contactType:ContactDetail' :: Maybe ContactType
contactType = Maybe ContactType
a} :: ContactDetail)
contactDetail_countryCode :: Lens.Lens' ContactDetail (Prelude.Maybe CountryCode)
contactDetail_countryCode :: Lens' ContactDetail (Maybe CountryCode)
contactDetail_countryCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe CountryCode
countryCode :: Maybe CountryCode
$sel:countryCode:ContactDetail' :: ContactDetail -> Maybe CountryCode
countryCode} -> Maybe CountryCode
countryCode) (\s :: ContactDetail
s@ContactDetail' {} Maybe CountryCode
a -> ContactDetail
s {$sel:countryCode:ContactDetail' :: Maybe CountryCode
countryCode = Maybe CountryCode
a} :: ContactDetail)
contactDetail_email :: Lens.Lens' ContactDetail (Prelude.Maybe Prelude.Text)
contactDetail_email :: Lens' ContactDetail (Maybe Text)
contactDetail_email = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe Text
email :: Maybe Text
$sel:email:ContactDetail' :: ContactDetail -> Maybe Text
email} -> Maybe Text
email) (\s :: ContactDetail
s@ContactDetail' {} Maybe Text
a -> ContactDetail
s {$sel:email:ContactDetail' :: Maybe Text
email = Maybe Text
a} :: ContactDetail)
contactDetail_extraParams :: Lens.Lens' ContactDetail (Prelude.Maybe [ExtraParam])
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe [ExtraParam]
extraParams :: Maybe [ExtraParam]
$sel:extraParams:ContactDetail' :: ContactDetail -> Maybe [ExtraParam]
extraParams} -> Maybe [ExtraParam]
extraParams) (\s :: ContactDetail
s@ContactDetail' {} Maybe [ExtraParam]
a -> ContactDetail
s {$sel:extraParams:ContactDetail' :: Maybe [ExtraParam]
extraParams = Maybe [ExtraParam]
a} :: ContactDetail) 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
contactDetail_fax :: Lens.Lens' ContactDetail (Prelude.Maybe Prelude.Text)
contactDetail_fax :: Lens' ContactDetail (Maybe Text)
contactDetail_fax = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe Text
fax :: Maybe Text
$sel:fax:ContactDetail' :: ContactDetail -> Maybe Text
fax} -> Maybe Text
fax) (\s :: ContactDetail
s@ContactDetail' {} Maybe Text
a -> ContactDetail
s {$sel:fax:ContactDetail' :: Maybe Text
fax = Maybe Text
a} :: ContactDetail)
contactDetail_firstName :: Lens.Lens' ContactDetail (Prelude.Maybe Prelude.Text)
contactDetail_firstName :: Lens' ContactDetail (Maybe Text)
contactDetail_firstName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe Text
firstName :: Maybe Text
$sel:firstName:ContactDetail' :: ContactDetail -> Maybe Text
firstName} -> Maybe Text
firstName) (\s :: ContactDetail
s@ContactDetail' {} Maybe Text
a -> ContactDetail
s {$sel:firstName:ContactDetail' :: Maybe Text
firstName = Maybe Text
a} :: ContactDetail)
contactDetail_lastName :: Lens.Lens' ContactDetail (Prelude.Maybe Prelude.Text)
contactDetail_lastName :: Lens' ContactDetail (Maybe Text)
contactDetail_lastName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe Text
lastName :: Maybe Text
$sel:lastName:ContactDetail' :: ContactDetail -> Maybe Text
lastName} -> Maybe Text
lastName) (\s :: ContactDetail
s@ContactDetail' {} Maybe Text
a -> ContactDetail
s {$sel:lastName:ContactDetail' :: Maybe Text
lastName = Maybe Text
a} :: ContactDetail)
contactDetail_organizationName :: Lens.Lens' ContactDetail (Prelude.Maybe Prelude.Text)
contactDetail_organizationName :: Lens' ContactDetail (Maybe Text)
contactDetail_organizationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe Text
organizationName :: Maybe Text
$sel:organizationName:ContactDetail' :: ContactDetail -> Maybe Text
organizationName} -> Maybe Text
organizationName) (\s :: ContactDetail
s@ContactDetail' {} Maybe Text
a -> ContactDetail
s {$sel:organizationName:ContactDetail' :: Maybe Text
organizationName = Maybe Text
a} :: ContactDetail)
contactDetail_phoneNumber :: Lens.Lens' ContactDetail (Prelude.Maybe Prelude.Text)
contactDetail_phoneNumber :: Lens' ContactDetail (Maybe Text)
contactDetail_phoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe Text
phoneNumber :: Maybe Text
$sel:phoneNumber:ContactDetail' :: ContactDetail -> Maybe Text
phoneNumber} -> Maybe Text
phoneNumber) (\s :: ContactDetail
s@ContactDetail' {} Maybe Text
a -> ContactDetail
s {$sel:phoneNumber:ContactDetail' :: Maybe Text
phoneNumber = Maybe Text
a} :: ContactDetail)
contactDetail_state :: Lens.Lens' ContactDetail (Prelude.Maybe Prelude.Text)
contactDetail_state :: Lens' ContactDetail (Maybe Text)
contactDetail_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe Text
state :: Maybe Text
$sel:state:ContactDetail' :: ContactDetail -> Maybe Text
state} -> Maybe Text
state) (\s :: ContactDetail
s@ContactDetail' {} Maybe Text
a -> ContactDetail
s {$sel:state:ContactDetail' :: Maybe Text
state = Maybe Text
a} :: ContactDetail)
contactDetail_zipCode :: Lens.Lens' ContactDetail (Prelude.Maybe Prelude.Text)
contactDetail_zipCode :: Lens' ContactDetail (Maybe Text)
contactDetail_zipCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContactDetail' {Maybe Text
zipCode :: Maybe Text
$sel:zipCode:ContactDetail' :: ContactDetail -> Maybe Text
zipCode} -> Maybe Text
zipCode) (\s :: ContactDetail
s@ContactDetail' {} Maybe Text
a -> ContactDetail
s {$sel:zipCode:ContactDetail' :: Maybe Text
zipCode = Maybe Text
a} :: ContactDetail)
instance Data.FromJSON ContactDetail where
parseJSON :: Value -> Parser ContactDetail
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ContactDetail"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ContactType
-> Maybe CountryCode
-> Maybe Text
-> Maybe [ExtraParam]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ContactDetail
ContactDetail'
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
"AddressLine1")
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
"AddressLine2")
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
"City")
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
"ContactType")
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
"CountryCode")
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
"Email")
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
"ExtraParams" 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
"Fax")
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
"FirstName")
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
"LastName")
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
"OrganizationName")
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
"PhoneNumber")
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
"ZipCode")
)
instance Prelude.Hashable ContactDetail where
hashWithSalt :: Int -> ContactDetail -> Int
hashWithSalt Int
_salt ContactDetail' {Maybe [ExtraParam]
Maybe Text
Maybe ContactType
Maybe CountryCode
zipCode :: Maybe Text
state :: Maybe Text
phoneNumber :: Maybe Text
organizationName :: Maybe Text
lastName :: Maybe Text
firstName :: Maybe Text
fax :: Maybe Text
extraParams :: Maybe [ExtraParam]
email :: Maybe Text
countryCode :: Maybe CountryCode
contactType :: Maybe ContactType
city :: Maybe Text
addressLine2 :: Maybe Text
addressLine1 :: Maybe Text
$sel:zipCode:ContactDetail' :: ContactDetail -> Maybe Text
$sel:state:ContactDetail' :: ContactDetail -> Maybe Text
$sel:phoneNumber:ContactDetail' :: ContactDetail -> Maybe Text
$sel:organizationName:ContactDetail' :: ContactDetail -> Maybe Text
$sel:lastName:ContactDetail' :: ContactDetail -> Maybe Text
$sel:firstName:ContactDetail' :: ContactDetail -> Maybe Text
$sel:fax:ContactDetail' :: ContactDetail -> Maybe Text
$sel:extraParams:ContactDetail' :: ContactDetail -> Maybe [ExtraParam]
$sel:email:ContactDetail' :: ContactDetail -> Maybe Text
$sel:countryCode:ContactDetail' :: ContactDetail -> Maybe CountryCode
$sel:contactType:ContactDetail' :: ContactDetail -> Maybe ContactType
$sel:city:ContactDetail' :: ContactDetail -> Maybe Text
$sel:addressLine2:ContactDetail' :: ContactDetail -> Maybe Text
$sel:addressLine1:ContactDetail' :: ContactDetail -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
addressLine1
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
addressLine2
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
city
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ContactType
contactType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CountryCode
countryCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
email
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ExtraParam]
extraParams
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fax
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
firstName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
organizationName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
phoneNumber
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
zipCode
instance Prelude.NFData ContactDetail where
rnf :: ContactDetail -> ()
rnf ContactDetail' {Maybe [ExtraParam]
Maybe Text
Maybe ContactType
Maybe CountryCode
zipCode :: Maybe Text
state :: Maybe Text
phoneNumber :: Maybe Text
organizationName :: Maybe Text
lastName :: Maybe Text
firstName :: Maybe Text
fax :: Maybe Text
extraParams :: Maybe [ExtraParam]
email :: Maybe Text
countryCode :: Maybe CountryCode
contactType :: Maybe ContactType
city :: Maybe Text
addressLine2 :: Maybe Text
addressLine1 :: Maybe Text
$sel:zipCode:ContactDetail' :: ContactDetail -> Maybe Text
$sel:state:ContactDetail' :: ContactDetail -> Maybe Text
$sel:phoneNumber:ContactDetail' :: ContactDetail -> Maybe Text
$sel:organizationName:ContactDetail' :: ContactDetail -> Maybe Text
$sel:lastName:ContactDetail' :: ContactDetail -> Maybe Text
$sel:firstName:ContactDetail' :: ContactDetail -> Maybe Text
$sel:fax:ContactDetail' :: ContactDetail -> Maybe Text
$sel:extraParams:ContactDetail' :: ContactDetail -> Maybe [ExtraParam]
$sel:email:ContactDetail' :: ContactDetail -> Maybe Text
$sel:countryCode:ContactDetail' :: ContactDetail -> Maybe CountryCode
$sel:contactType:ContactDetail' :: ContactDetail -> Maybe ContactType
$sel:city:ContactDetail' :: ContactDetail -> Maybe Text
$sel:addressLine2:ContactDetail' :: ContactDetail -> Maybe Text
$sel:addressLine1:ContactDetail' :: ContactDetail -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
addressLine1
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
addressLine2
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
city
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ContactType
contactType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CountryCode
countryCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
email
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ExtraParam]
extraParams
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fax
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
firstName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
organizationName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
phoneNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
zipCode
instance Data.ToJSON ContactDetail where
toJSON :: ContactDetail -> Value
toJSON ContactDetail' {Maybe [ExtraParam]
Maybe Text
Maybe ContactType
Maybe CountryCode
zipCode :: Maybe Text
state :: Maybe Text
phoneNumber :: Maybe Text
organizationName :: Maybe Text
lastName :: Maybe Text
firstName :: Maybe Text
fax :: Maybe Text
extraParams :: Maybe [ExtraParam]
email :: Maybe Text
countryCode :: Maybe CountryCode
contactType :: Maybe ContactType
city :: Maybe Text
addressLine2 :: Maybe Text
addressLine1 :: Maybe Text
$sel:zipCode:ContactDetail' :: ContactDetail -> Maybe Text
$sel:state:ContactDetail' :: ContactDetail -> Maybe Text
$sel:phoneNumber:ContactDetail' :: ContactDetail -> Maybe Text
$sel:organizationName:ContactDetail' :: ContactDetail -> Maybe Text
$sel:lastName:ContactDetail' :: ContactDetail -> Maybe Text
$sel:firstName:ContactDetail' :: ContactDetail -> Maybe Text
$sel:fax:ContactDetail' :: ContactDetail -> Maybe Text
$sel:extraParams:ContactDetail' :: ContactDetail -> Maybe [ExtraParam]
$sel:email:ContactDetail' :: ContactDetail -> Maybe Text
$sel:countryCode:ContactDetail' :: ContactDetail -> Maybe CountryCode
$sel:contactType:ContactDetail' :: ContactDetail -> Maybe ContactType
$sel:city:ContactDetail' :: ContactDetail -> Maybe Text
$sel:addressLine2:ContactDetail' :: ContactDetail -> Maybe Text
$sel:addressLine1:ContactDetail' :: ContactDetail -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AddressLine1" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
addressLine1,
(Key
"AddressLine2" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
addressLine2,
(Key
"City" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
city,
(Key
"ContactType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ContactType
contactType,
(Key
"CountryCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CountryCode
countryCode,
(Key
"Email" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
email,
(Key
"ExtraParams" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ExtraParam]
extraParams,
(Key
"Fax" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
fax,
(Key
"FirstName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
firstName,
(Key
"LastName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
lastName,
(Key
"OrganizationName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
organizationName,
(Key
"PhoneNumber" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
phoneNumber,
(Key
"State" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
state,
(Key
"ZipCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
zipCode
]
)