{-# 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-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.Pinpoint.Types.NumberValidateResponse where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 county where the phone number was originally registered.
    NumberValidateResponse -> Maybe Text
county :: 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 numeric code for the country or region where the phone number was
    -- originally registered.
    NumberValidateResponse -> Maybe Text
countryCodeNumeric :: 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,
    -- | The phone number that was sent in the request body.
    NumberValidateResponse -> Maybe Text
originalPhoneNumber :: 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 description of the phone type. Valid values are: MOBILE, LANDLINE,
    -- VOIP, INVALID, PREPAID, and OTHER.
    NumberValidateResponse -> Maybe Text
phoneType :: 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 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 time zone for the location where the phone number was originally
    -- registered.
    NumberValidateResponse -> Maybe Text
timezone :: 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 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 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
  }
  deriving (NumberValidateResponse -> NumberValidateResponse -> Bool
(NumberValidateResponse -> NumberValidateResponse -> Bool)
-> (NumberValidateResponse -> NumberValidateResponse -> Bool)
-> Eq NumberValidateResponse
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]
(Int -> ReadS NumberValidateResponse)
-> ReadS [NumberValidateResponse]
-> ReadPrec NumberValidateResponse
-> ReadPrec [NumberValidateResponse]
-> Read 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
(Int -> NumberValidateResponse -> ShowS)
-> (NumberValidateResponse -> String)
-> ([NumberValidateResponse] -> ShowS)
-> Show NumberValidateResponse
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. NumberValidateResponse -> Rep NumberValidateResponse x)
-> (forall x.
    Rep NumberValidateResponse x -> NumberValidateResponse)
-> Generic NumberValidateResponse
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.
--
-- 'county', 'numberValidateResponse_county' - The name of the county where the phone number was originally registered.
--
-- 'country', 'numberValidateResponse_country' - The name of 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.
--
-- 'zipCode', 'numberValidateResponse_zipCode' - The postal or ZIP code for the location where the phone number was
-- originally registered.
--
-- 'originalPhoneNumber', 'numberValidateResponse_originalPhoneNumber' - The phone number that was sent in the request body.
--
-- '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).
--
-- 'phoneType', 'numberValidateResponse_phoneType' - The description of the phone type. Valid values are: MOBILE, LANDLINE,
-- VOIP, INVALID, PREPAID, and OTHER.
--
-- 'city', 'numberValidateResponse_city' - The name of the city 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.
--
-- 'timezone', 'numberValidateResponse_timezone' - The time zone for the location 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.
--
-- 'cleansedPhoneNumberNational', 'numberValidateResponse_cleansedPhoneNumberNational' - The cleansed phone number, in the format for the location 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.
newNumberValidateResponse ::
  NumberValidateResponse
newNumberValidateResponse :: NumberValidateResponse
newNumberValidateResponse =
  NumberValidateResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> NumberValidateResponse
NumberValidateResponse'
    { $sel:carrier:NumberValidateResponse' :: Maybe Text
carrier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:county:NumberValidateResponse' :: Maybe Text
county = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:country:NumberValidateResponse' :: Maybe Text
country = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:countryCodeNumeric:NumberValidateResponse' :: Maybe Text
countryCodeNumeric = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:zipCode:NumberValidateResponse' :: Maybe Text
zipCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:originalPhoneNumber:NumberValidateResponse' :: Maybe Text
originalPhoneNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:phoneTypeCode:NumberValidateResponse' :: Maybe Int
phoneTypeCode = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:phoneType:NumberValidateResponse' :: Maybe Text
phoneType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:city:NumberValidateResponse' :: Maybe Text
city = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:countryCodeIso2:NumberValidateResponse' :: Maybe Text
countryCodeIso2 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timezone:NumberValidateResponse' :: Maybe Text
timezone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:originalCountryCodeIso2:NumberValidateResponse' :: Maybe Text
originalCountryCodeIso2 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cleansedPhoneNumberNational:NumberValidateResponse' :: Maybe Text
cleansedPhoneNumberNational = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cleansedPhoneNumberE164:NumberValidateResponse' :: Maybe Text
cleansedPhoneNumberE164 = Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_carrier = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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 county where the phone number was originally registered.
numberValidateResponse_county :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_county :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_county = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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 name of the country or region where the phone number was originally
-- registered.
numberValidateResponse_country :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_country :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_country = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_countryCodeNumeric = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_zipCode = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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)

-- | The phone number that was sent in the request body.
numberValidateResponse_originalPhoneNumber :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_originalPhoneNumber :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_originalPhoneNumber = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Int -> f (Maybe Int))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_phoneTypeCode = (NumberValidateResponse -> Maybe Int)
-> (NumberValidateResponse -> Maybe Int -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Int)
     (Maybe Int)
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 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 :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_phoneType = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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 name of the city where the phone number was originally registered.
numberValidateResponse_city :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_city :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_city = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_countryCodeIso2 = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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 time zone for the location where the phone number was originally
-- registered.
numberValidateResponse_timezone :: Lens.Lens' NumberValidateResponse (Prelude.Maybe Prelude.Text)
numberValidateResponse_timezone :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_timezone = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_originalCountryCodeIso2 = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_cleansedPhoneNumberNational = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> NumberValidateResponse -> f NumberValidateResponse
numberValidateResponse_cleansedPhoneNumberE164 = (NumberValidateResponse -> Maybe Text)
-> (NumberValidateResponse -> Maybe Text -> NumberValidateResponse)
-> Lens
     NumberValidateResponse
     NumberValidateResponse
     (Maybe Text)
     (Maybe Text)
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)

instance Core.FromJSON NumberValidateResponse where
  parseJSON :: Value -> Parser NumberValidateResponse
parseJSON =
    String
-> (Object -> Parser NumberValidateResponse)
-> Value
-> Parser NumberValidateResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"NumberValidateResponse"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> NumberValidateResponse
NumberValidateResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> NumberValidateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NumberValidateResponse)
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
"Carrier")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NumberValidateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NumberValidateResponse)
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 Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NumberValidateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NumberValidateResponse)
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
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NumberValidateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NumberValidateResponse)
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
"CountryCodeNumeric")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NumberValidateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NumberValidateResponse)
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
"ZipCode")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NumberValidateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NumberValidateResponse)
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
"OriginalPhoneNumber")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NumberValidateResponse)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NumberValidateResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PhoneTypeCode")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NumberValidateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NumberValidateResponse)
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
"PhoneType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NumberValidateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NumberValidateResponse)
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
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NumberValidateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NumberValidateResponse)
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
"CountryCodeIso2")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NumberValidateResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> NumberValidateResponse)
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
"Timezone")
            Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> NumberValidateResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> NumberValidateResponse)
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
"OriginalCountryCodeIso2")
            Parser (Maybe Text -> Maybe Text -> NumberValidateResponse)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> NumberValidateResponse)
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
"CleansedPhoneNumberNational")
            Parser (Maybe Text -> NumberValidateResponse)
-> Parser (Maybe Text) -> Parser NumberValidateResponse
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
"CleansedPhoneNumberE164")
      )

instance Prelude.Hashable NumberValidateResponse

instance Prelude.NFData NumberValidateResponse