{-# 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.Pinpoint.Types.NumberValidateResponse
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Pinpoint.Types.NumberValidateResponse 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

-- | Provides information about a phone number.
--
-- /See:/ 'newNumberValidateResponse' smart constructor.
data NumberValidateResponse = NumberValidateResponse'
  { -- | The carrier or service provider that the phone number is currently
    -- registered with. In some countries and regions, this value may be the
    -- carrier or service provider that the phone number was originally
    -- registered with.
    NumberValidateResponse -> Maybe Text
carrier :: Prelude.Maybe Prelude.Text,
    -- | The name of the city where the phone number was originally registered.
    NumberValidateResponse -> Maybe Text
city :: Prelude.Maybe Prelude.Text,
    -- | The cleansed phone number, in E.164 format, for the location where the
    -- phone number was originally registered.
    NumberValidateResponse -> Maybe Text
cleansedPhoneNumberE164 :: Prelude.Maybe Prelude.Text,
    -- | The cleansed phone number, in the format for the location where the
    -- phone number was originally registered.
    NumberValidateResponse -> Maybe Text
cleansedPhoneNumberNational :: Prelude.Maybe Prelude.Text,
    -- | The name of the country or region where the phone number was originally
    -- registered.
    NumberValidateResponse -> Maybe Text
country :: Prelude.Maybe Prelude.Text,
    -- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or
    -- region where the phone number was originally registered.
    NumberValidateResponse -> Maybe Text
countryCodeIso2 :: Prelude.Maybe Prelude.Text,
    -- | The numeric code for the country or region where the phone number was
    -- originally registered.
    NumberValidateResponse -> Maybe Text
countryCodeNumeric :: Prelude.Maybe Prelude.Text,
    -- | The name of the county where the phone number was originally registered.
    NumberValidateResponse -> Maybe Text
county :: Prelude.Maybe Prelude.Text,
    -- | The two-character code, in ISO 3166-1 alpha-2 format, that was sent in
    -- the request body.
    NumberValidateResponse -> Maybe Text
originalCountryCodeIso2 :: Prelude.Maybe Prelude.Text,
    -- | The phone number that was sent in the request body.
    NumberValidateResponse -> Maybe Text
originalPhoneNumber :: Prelude.Maybe Prelude.Text,
    -- | The description of the phone type. Valid values are: MOBILE, LANDLINE,
    -- VOIP, INVALID, PREPAID, and OTHER.
    NumberValidateResponse -> Maybe Text
phoneType :: Prelude.Maybe Prelude.Text,
    -- | The phone type, represented by an integer. Valid values are: 0 (mobile),
    -- 1 (landline), 2 (VoIP), 3 (invalid), 4 (other), and 5 (prepaid).
    NumberValidateResponse -> Maybe Int
phoneTypeCode :: Prelude.Maybe Prelude.Int,
    -- | The time zone for the location where the phone number was originally
    -- registered.
    NumberValidateResponse -> Maybe Text
timezone :: Prelude.Maybe Prelude.Text,
    -- | The postal or ZIP code for the location where the phone number was
    -- originally registered.
    NumberValidateResponse -> Maybe Text
zipCode :: Prelude.Maybe Prelude.Text
  }
  deriving (NumberValidateResponse -> NumberValidateResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NumberValidateResponse -> NumberValidateResponse -> Bool
$c/= :: NumberValidateResponse -> NumberValidateResponse -> Bool
== :: NumberValidateResponse -> NumberValidateResponse -> Bool
$c== :: NumberValidateResponse -> NumberValidateResponse -> Bool
Prelude.Eq, ReadPrec [NumberValidateResponse]
ReadPrec NumberValidateResponse
Int -> ReadS NumberValidateResponse
ReadS [NumberValidateResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NumberValidateResponse]
$creadListPrec :: ReadPrec [NumberValidateResponse]
readPrec :: ReadPrec NumberValidateResponse
$creadPrec :: ReadPrec NumberValidateResponse
readList :: ReadS [NumberValidateResponse]
$creadList :: ReadS [NumberValidateResponse]
readsPrec :: Int -> ReadS NumberValidateResponse
$creadsPrec :: Int -> ReadS NumberValidateResponse
Prelude.Read, Int -> NumberValidateResponse -> ShowS
[NumberValidateResponse] -> ShowS
NumberValidateResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NumberValidateResponse] -> ShowS
$cshowList :: [NumberValidateResponse] -> ShowS
show :: NumberValidateResponse -> String
$cshow :: NumberValidateResponse -> String
showsPrec :: Int -> NumberValidateResponse -> ShowS
$cshowsPrec :: Int -> NumberValidateResponse -> ShowS
Prelude.Show, forall x. Rep NumberValidateResponse x -> NumberValidateResponse
forall x. NumberValidateResponse -> Rep NumberValidateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NumberValidateResponse x -> NumberValidateResponse
$cfrom :: forall x. NumberValidateResponse -> Rep NumberValidateResponse x
Prelude.Generic)

-- |
-- Create a value of 'NumberValidateResponse' 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:
--
-- 'carrier', 'numberValidateResponse_carrier' - The carrier or service provider that the phone number is currently
-- registered with. In some countries and regions, this value may be the
-- carrier or service provider that the phone number was originally
-- registered with.
--
-- 'city', 'numberValidateResponse_city' - The name of the city where the phone number was originally registered.
--
-- 'cleansedPhoneNumberE164', 'numberValidateResponse_cleansedPhoneNumberE164' - The cleansed phone number, in E.164 format, for the location where the
-- phone number was originally registered.
--
-- 'cleansedPhoneNumberNational', 'numberValidateResponse_cleansedPhoneNumberNational' - The cleansed phone number, in the format for the location where the
-- phone number was originally registered.
--
-- 'country', 'numberValidateResponse_country' - The name of the country or region where the phone number was originally
-- registered.
--
-- 'countryCodeIso2', 'numberValidateResponse_countryCodeIso2' - The two-character code, in ISO 3166-1 alpha-2 format, for the country or
-- region where the phone number was originally registered.
--
-- 'countryCodeNumeric', 'numberValidateResponse_countryCodeNumeric' - The numeric code for the country or region where the phone number was
-- originally registered.
--
-- 'county', 'numberValidateResponse_county' - The name of the county where the phone number was originally registered.
--
-- 'originalCountryCodeIso2', 'numberValidateResponse_originalCountryCodeIso2' - The two-character code, in ISO 3166-1 alpha-2 format, that was sent in
-- the request body.
--
-- 'originalPhoneNumber', 'numberValidateResponse_originalPhoneNumber' - The phone number that was sent in the request body.
--
-- 'phoneType', 'numberValidateResponse_phoneType' - The description of the phone type. Valid values are: MOBILE, LANDLINE,
-- VOIP, INVALID, PREPAID, and OTHER.
--
-- 'phoneTypeCode', 'numberValidateResponse_phoneTypeCode' - The phone type, represented by an integer. Valid values are: 0 (mobile),
-- 1 (landline), 2 (VoIP), 3 (invalid), 4 (other), and 5 (prepaid).
--
-- 'timezone', 'numberValidateResponse_timezone' - The time zone for the location where the phone number was originally
-- registered.
--
-- 'zipCode', 'numberValidateResponse_zipCode' - The postal or ZIP code for the location where the phone number was
-- originally registered.
newNumberValidateResponse ::
  NumberValidateResponse
newNumberValidateResponse :: NumberValidateResponse
newNumberValidateResponse =
  NumberValidateResponse'
    { $sel:carrier:NumberValidateResponse' :: Maybe Text
carrier = forall a. Maybe a
Prelude.Nothing,
      $sel:city:NumberValidateResponse' :: Maybe Text
city = forall a. Maybe a
Prelude.Nothing,
      $sel:cleansedPhoneNumberE164:NumberValidateResponse' :: Maybe Text
cleansedPhoneNumberE164 = forall a. Maybe a
Prelude.Nothing,
      $sel:cleansedPhoneNumberNational:NumberValidateResponse' :: Maybe Text
cleansedPhoneNumberNational = forall a. Maybe a
Prelude.Nothing,
      $sel:country:NumberValidateResponse' :: Maybe Text
country = forall a. Maybe a
Prelude.Nothing,
      $sel:countryCodeIso2:NumberValidateResponse' :: Maybe Text
countryCodeIso2 = forall a. Maybe a
Prelude.Nothing,
      $sel:countryCodeNumeric:NumberValidateResponse' :: Maybe Text
countryCodeNumeric = forall a. Maybe a
Prelude.Nothing,
      $sel:county:NumberValidateResponse' :: Maybe Text
county = forall a. Maybe a
Prelude.Nothing,
      $sel:originalCountryCodeIso2:NumberValidateResponse' :: Maybe Text
originalCountryCodeIso2 = forall a. Maybe a
Prelude.Nothing,
      $sel:originalPhoneNumber:NumberValidateResponse' :: Maybe Text
originalPhoneNumber = forall a. Maybe a
Prelude.Nothing,
      $sel:phoneType:NumberValidateResponse' :: Maybe Text
phoneType = forall a. Maybe a
Prelude.Nothing,
      $sel:phoneTypeCode:NumberValidateResponse' :: Maybe Int
phoneTypeCode = forall a. Maybe a
Prelude.Nothing,
      $sel:timezone:NumberValidateResponse' :: Maybe Text
timezone = forall a. Maybe a
Prelude.Nothing,
      $sel:zipCode:NumberValidateResponse' :: Maybe Text
zipCode = forall a. Maybe a
Prelude.Nothing
    }

-- | The carrier or service provider that the phone number is currently
-- registered with. In some countries and regions, this value may be the
-- carrier or service provider that the phone number was originally
-- registered with.
numberValidateResponse_carrier :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_carrier :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_carrier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
carrier :: Maybe Text
$sel:carrier:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
carrier} -> Maybe Text
carrier) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:carrier:NumberValidateResponse' :: Maybe Text
carrier = Maybe Text
a} :: NumberValidateResponse)

-- | The name of the city where the phone number was originally registered.
numberValidateResponse_city :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_city :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_city = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
city :: Maybe Text
$sel:city:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
city} -> Maybe Text
city) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:city:NumberValidateResponse' :: Maybe Text
city = Maybe Text
a} :: NumberValidateResponse)

-- | The cleansed phone number, in E.164 format, for the location where the
-- phone number was originally registered.
numberValidateResponse_cleansedPhoneNumberE164 :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_cleansedPhoneNumberE164 :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_cleansedPhoneNumberE164 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
cleansedPhoneNumberE164 :: Maybe Text
$sel:cleansedPhoneNumberE164:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
cleansedPhoneNumberE164} -> Maybe Text
cleansedPhoneNumberE164) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:cleansedPhoneNumberE164:NumberValidateResponse' :: Maybe Text
cleansedPhoneNumberE164 = Maybe Text
a} :: NumberValidateResponse)

-- | The cleansed phone number, in the format for the location where the
-- phone number was originally registered.
numberValidateResponse_cleansedPhoneNumberNational :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_cleansedPhoneNumberNational :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_cleansedPhoneNumberNational = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
cleansedPhoneNumberNational :: Maybe Text
$sel:cleansedPhoneNumberNational:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
cleansedPhoneNumberNational} -> Maybe Text
cleansedPhoneNumberNational) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:cleansedPhoneNumberNational:NumberValidateResponse' :: Maybe Text
cleansedPhoneNumberNational = Maybe Text
a} :: NumberValidateResponse)

-- | The name of the country or region where the phone number was originally
-- registered.
numberValidateResponse_country :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_country :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_country = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
country :: Maybe Text
$sel:country:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
country} -> Maybe Text
country) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:country:NumberValidateResponse' :: Maybe Text
country = Maybe Text
a} :: NumberValidateResponse)

-- | The two-character code, in ISO 3166-1 alpha-2 format, for the country or
-- region where the phone number was originally registered.
numberValidateResponse_countryCodeIso2 :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_countryCodeIso2 :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_countryCodeIso2 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
countryCodeIso2 :: Maybe Text
$sel:countryCodeIso2:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
countryCodeIso2} -> Maybe Text
countryCodeIso2) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:countryCodeIso2:NumberValidateResponse' :: Maybe Text
countryCodeIso2 = Maybe Text
a} :: NumberValidateResponse)

-- | The numeric code for the country or region where the phone number was
-- originally registered.
numberValidateResponse_countryCodeNumeric :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_countryCodeNumeric :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_countryCodeNumeric = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
countryCodeNumeric :: Maybe Text
$sel:countryCodeNumeric:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
countryCodeNumeric} -> Maybe Text
countryCodeNumeric) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:countryCodeNumeric:NumberValidateResponse' :: Maybe Text
countryCodeNumeric = Maybe Text
a} :: NumberValidateResponse)

-- | The name of the county where the phone number was originally registered.
numberValidateResponse_county :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_county :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_county = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
county :: Maybe Text
$sel:county:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
county} -> Maybe Text
county) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:county:NumberValidateResponse' :: Maybe Text
county = Maybe Text
a} :: NumberValidateResponse)

-- | The two-character code, in ISO 3166-1 alpha-2 format, that was sent in
-- the request body.
numberValidateResponse_originalCountryCodeIso2 :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_originalCountryCodeIso2 :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_originalCountryCodeIso2 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
originalCountryCodeIso2 :: Maybe Text
$sel:originalCountryCodeIso2:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
originalCountryCodeIso2} -> Maybe Text
originalCountryCodeIso2) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:originalCountryCodeIso2:NumberValidateResponse' :: Maybe Text
originalCountryCodeIso2 = Maybe Text
a} :: NumberValidateResponse)

-- | The phone number that was sent in the request body.
numberValidateResponse_originalPhoneNumber :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_originalPhoneNumber :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_originalPhoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
originalPhoneNumber :: Maybe Text
$sel:originalPhoneNumber:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
originalPhoneNumber} -> Maybe Text
originalPhoneNumber) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:originalPhoneNumber:NumberValidateResponse' :: Maybe Text
originalPhoneNumber = Maybe Text
a} :: NumberValidateResponse)

-- | The description of the phone type. Valid values are: MOBILE, LANDLINE,
-- VOIP, INVALID, PREPAID, and OTHER.
numberValidateResponse_phoneType :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_phoneType :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_phoneType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
phoneType :: Maybe Text
$sel:phoneType:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
phoneType} -> Maybe Text
phoneType) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:phoneType:NumberValidateResponse' :: Maybe Text
phoneType = Maybe Text
a} :: NumberValidateResponse)

-- | The phone type, represented by an integer. Valid values are: 0 (mobile),
-- 1 (landline), 2 (VoIP), 3 (invalid), 4 (other), and 5 (prepaid).
numberValidateResponse_phoneTypeCode :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Int)
numberValidateResponse_phoneTypeCode :: Lens' NumberValidateResponse (Maybe Int)
numberValidateResponse_phoneTypeCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Int
phoneTypeCode :: Maybe Int
$sel:phoneTypeCode:NumberValidateResponse' :: NumberValidateResponse -> Maybe Int
phoneTypeCode} -> Maybe Int
phoneTypeCode) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Int
a -> NumberValidateResponse
s {$sel:phoneTypeCode:NumberValidateResponse' :: Maybe Int
phoneTypeCode = Maybe Int
a} :: NumberValidateResponse)

-- | The time zone for the location where the phone number was originally
-- registered.
numberValidateResponse_timezone :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_timezone :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_timezone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
timezone :: Maybe Text
$sel:timezone:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
timezone} -> Maybe Text
timezone) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:timezone:NumberValidateResponse' :: Maybe Text
timezone = Maybe Text
a} :: NumberValidateResponse)

-- | The postal or ZIP code for the location where the phone number was
-- originally registered.
numberValidateResponse_zipCode :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_zipCode :: Lens' NumberValidateResponse (Maybe Text)
numberValidateResponse_zipCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NumberValidateResponse' {Maybe Text
zipCode :: Maybe Text
$sel:zipCode:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
zipCode} -> Maybe Text
zipCode) (\s :: NumberValidateResponse
s@NumberValidateResponse' {} Maybe Text
a -> NumberValidateResponse
s {$sel:zipCode:NumberValidateResponse' :: Maybe Text
zipCode = Maybe Text
a} :: NumberValidateResponse)

instance Data.FromJSON NumberValidateResponse where
  parseJSON :: Value -> Parser NumberValidateResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"NumberValidateResponse"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> NumberValidateResponse
NumberValidateResponse'
            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
"Carrier")
            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
"CleansedPhoneNumberE164")
            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
"CleansedPhoneNumberNational")
            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
"Country")
            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
"CountryCodeIso2")
            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
"CountryCodeNumeric")
            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
"County")
            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
"OriginalCountryCodeIso2")
            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
"OriginalPhoneNumber")
            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
"PhoneType")
            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
"PhoneTypeCode")
            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
"Timezone")
            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 NumberValidateResponse where
  hashWithSalt :: Int -> NumberValidateResponse -> Int
hashWithSalt Int
_salt NumberValidateResponse' {Maybe Int
Maybe Text
zipCode :: Maybe Text
timezone :: Maybe Text
phoneTypeCode :: Maybe Int
phoneType :: Maybe Text
originalPhoneNumber :: Maybe Text
originalCountryCodeIso2 :: Maybe Text
county :: Maybe Text
countryCodeNumeric :: Maybe Text
countryCodeIso2 :: Maybe Text
country :: Maybe Text
cleansedPhoneNumberNational :: Maybe Text
cleansedPhoneNumberE164 :: Maybe Text
city :: Maybe Text
carrier :: Maybe Text
$sel:zipCode:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:timezone:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:phoneTypeCode:NumberValidateResponse' :: NumberValidateResponse -> Maybe Int
$sel:phoneType:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:originalPhoneNumber:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:originalCountryCodeIso2:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:county:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:countryCodeNumeric:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:countryCodeIso2:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:country:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:cleansedPhoneNumberNational:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:cleansedPhoneNumberE164:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:city:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:carrier:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
carrier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
city
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cleansedPhoneNumberE164
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cleansedPhoneNumberNational
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
country
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
countryCodeIso2
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
countryCodeNumeric
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
county
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
originalCountryCodeIso2
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
originalPhoneNumber
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
phoneType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
phoneTypeCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
timezone
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
zipCode

instance Prelude.NFData NumberValidateResponse where
  rnf :: NumberValidateResponse -> ()
rnf NumberValidateResponse' {Maybe Int
Maybe Text
zipCode :: Maybe Text
timezone :: Maybe Text
phoneTypeCode :: Maybe Int
phoneType :: Maybe Text
originalPhoneNumber :: Maybe Text
originalCountryCodeIso2 :: Maybe Text
county :: Maybe Text
countryCodeNumeric :: Maybe Text
countryCodeIso2 :: Maybe Text
country :: Maybe Text
cleansedPhoneNumberNational :: Maybe Text
cleansedPhoneNumberE164 :: Maybe Text
city :: Maybe Text
carrier :: Maybe Text
$sel:zipCode:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:timezone:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:phoneTypeCode:NumberValidateResponse' :: NumberValidateResponse -> Maybe Int
$sel:phoneType:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:originalPhoneNumber:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:originalCountryCodeIso2:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:county:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:countryCodeNumeric:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:countryCodeIso2:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:country:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:cleansedPhoneNumberNational:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:cleansedPhoneNumberE164:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:city:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
$sel:carrier:NumberValidateResponse' :: NumberValidateResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
carrier
      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 Text
cleansedPhoneNumberE164
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cleansedPhoneNumberNational
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
country
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
countryCodeIso2
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
countryCodeNumeric
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
county
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
originalCountryCodeIso2
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
originalPhoneNumber
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
phoneType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
phoneTypeCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
timezone
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
zipCode