{-# 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.Connect.Types.ClaimedPhoneNumberSummary
-- 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.Connect.Types.ClaimedPhoneNumberSummary where

import Amazonka.Connect.Types.PhoneNumberCountryCode
import Amazonka.Connect.Types.PhoneNumberStatus
import Amazonka.Connect.Types.PhoneNumberType
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

-- | Information about a phone number that has been claimed to your Amazon
-- Connect instance or traffic distribution group.
--
-- /See:/ 'newClaimedPhoneNumberSummary' smart constructor.
data ClaimedPhoneNumberSummary = ClaimedPhoneNumberSummary'
  { -- | The phone number. Phone numbers are formatted
    -- @[+] [country code] [subscriber number including area code]@.
    ClaimedPhoneNumberSummary -> Maybe Text
phoneNumber :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the phone number.
    ClaimedPhoneNumberSummary -> Maybe Text
phoneNumberArn :: Prelude.Maybe Prelude.Text,
    -- | The ISO country code.
    ClaimedPhoneNumberSummary -> Maybe PhoneNumberCountryCode
phoneNumberCountryCode :: Prelude.Maybe PhoneNumberCountryCode,
    -- | The description of the phone number.
    ClaimedPhoneNumberSummary -> Maybe Text
phoneNumberDescription :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for the phone number.
    ClaimedPhoneNumberSummary -> Maybe Text
phoneNumberId :: Prelude.Maybe Prelude.Text,
    -- | The status of the phone number.
    --
    -- -   @CLAIMED@ means the previous
    --     <https://docs.aws.amazon.com/connect/latest/APIReference/API_ClaimedPhoneNumber.html ClaimedPhoneNumber>
    --     or
    --     <https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdatePhoneNumber.html UpdatePhoneNumber>
    --     operation succeeded.
    --
    -- -   @IN_PROGRESS@ means a
    --     <https://docs.aws.amazon.com/connect/latest/APIReference/API_ClaimedPhoneNumber.html ClaimedPhoneNumber>
    --     or
    --     <https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdatePhoneNumber.html UpdatePhoneNumber>
    --     operation is still in progress and has not yet completed. You can
    --     call
    --     <https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribePhoneNumber.html DescribePhoneNumber>
    --     at a later time to verify if the previous operation has completed.
    --
    -- -   @FAILED@ indicates that the previous
    --     <https://docs.aws.amazon.com/connect/latest/APIReference/API_ClaimedPhoneNumber.html ClaimedPhoneNumber>
    --     or
    --     <https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdatePhoneNumber.html UpdatePhoneNumber>
    --     operation has failed. It will include a message indicating the
    --     failure reason. A common reason for a failure may be that the
    --     @TargetArn@ value you are claiming or updating a phone number to has
    --     reached its limit of total claimed numbers. If you received a
    --     @FAILED@ status from a @ClaimPhoneNumber@ API call, you have one day
    --     to retry claiming the phone number before the number is released
    --     back to the inventory for other customers to claim.
    --
    -- You will not be billed for the phone number during the 1-day period if
    -- number claiming fails.
    ClaimedPhoneNumberSummary -> Maybe PhoneNumberStatus
phoneNumberStatus :: Prelude.Maybe PhoneNumberStatus,
    -- | The type of phone number.
    ClaimedPhoneNumberSummary -> Maybe PhoneNumberType
phoneNumberType :: Prelude.Maybe PhoneNumberType,
    -- | The tags used to organize, track, or control access for this resource.
    -- For example, { \"tags\": {\"key1\":\"value1\", \"key2\":\"value2\"} }.
    ClaimedPhoneNumberSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The Amazon Resource Name (ARN) for Amazon Connect instances or traffic
    -- distribution groups that phone numbers are claimed to.
    ClaimedPhoneNumberSummary -> Maybe Text
targetArn :: Prelude.Maybe Prelude.Text
  }
  deriving (ClaimedPhoneNumberSummary -> ClaimedPhoneNumberSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClaimedPhoneNumberSummary -> ClaimedPhoneNumberSummary -> Bool
$c/= :: ClaimedPhoneNumberSummary -> ClaimedPhoneNumberSummary -> Bool
== :: ClaimedPhoneNumberSummary -> ClaimedPhoneNumberSummary -> Bool
$c== :: ClaimedPhoneNumberSummary -> ClaimedPhoneNumberSummary -> Bool
Prelude.Eq, ReadPrec [ClaimedPhoneNumberSummary]
ReadPrec ClaimedPhoneNumberSummary
Int -> ReadS ClaimedPhoneNumberSummary
ReadS [ClaimedPhoneNumberSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClaimedPhoneNumberSummary]
$creadListPrec :: ReadPrec [ClaimedPhoneNumberSummary]
readPrec :: ReadPrec ClaimedPhoneNumberSummary
$creadPrec :: ReadPrec ClaimedPhoneNumberSummary
readList :: ReadS [ClaimedPhoneNumberSummary]
$creadList :: ReadS [ClaimedPhoneNumberSummary]
readsPrec :: Int -> ReadS ClaimedPhoneNumberSummary
$creadsPrec :: Int -> ReadS ClaimedPhoneNumberSummary
Prelude.Read, Int -> ClaimedPhoneNumberSummary -> ShowS
[ClaimedPhoneNumberSummary] -> ShowS
ClaimedPhoneNumberSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClaimedPhoneNumberSummary] -> ShowS
$cshowList :: [ClaimedPhoneNumberSummary] -> ShowS
show :: ClaimedPhoneNumberSummary -> String
$cshow :: ClaimedPhoneNumberSummary -> String
showsPrec :: Int -> ClaimedPhoneNumberSummary -> ShowS
$cshowsPrec :: Int -> ClaimedPhoneNumberSummary -> ShowS
Prelude.Show, forall x.
Rep ClaimedPhoneNumberSummary x -> ClaimedPhoneNumberSummary
forall x.
ClaimedPhoneNumberSummary -> Rep ClaimedPhoneNumberSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ClaimedPhoneNumberSummary x -> ClaimedPhoneNumberSummary
$cfrom :: forall x.
ClaimedPhoneNumberSummary -> Rep ClaimedPhoneNumberSummary x
Prelude.Generic)

-- |
-- Create a value of 'ClaimedPhoneNumberSummary' 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:
--
-- 'phoneNumber', 'claimedPhoneNumberSummary_phoneNumber' - The phone number. Phone numbers are formatted
-- @[+] [country code] [subscriber number including area code]@.
--
-- 'phoneNumberArn', 'claimedPhoneNumberSummary_phoneNumberArn' - The Amazon Resource Name (ARN) of the phone number.
--
-- 'phoneNumberCountryCode', 'claimedPhoneNumberSummary_phoneNumberCountryCode' - The ISO country code.
--
-- 'phoneNumberDescription', 'claimedPhoneNumberSummary_phoneNumberDescription' - The description of the phone number.
--
-- 'phoneNumberId', 'claimedPhoneNumberSummary_phoneNumberId' - A unique identifier for the phone number.
--
-- 'phoneNumberStatus', 'claimedPhoneNumberSummary_phoneNumberStatus' - The status of the phone number.
--
-- -   @CLAIMED@ means the previous
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_ClaimedPhoneNumber.html ClaimedPhoneNumber>
--     or
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdatePhoneNumber.html UpdatePhoneNumber>
--     operation succeeded.
--
-- -   @IN_PROGRESS@ means a
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_ClaimedPhoneNumber.html ClaimedPhoneNumber>
--     or
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdatePhoneNumber.html UpdatePhoneNumber>
--     operation is still in progress and has not yet completed. You can
--     call
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribePhoneNumber.html DescribePhoneNumber>
--     at a later time to verify if the previous operation has completed.
--
-- -   @FAILED@ indicates that the previous
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_ClaimedPhoneNumber.html ClaimedPhoneNumber>
--     or
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdatePhoneNumber.html UpdatePhoneNumber>
--     operation has failed. It will include a message indicating the
--     failure reason. A common reason for a failure may be that the
--     @TargetArn@ value you are claiming or updating a phone number to has
--     reached its limit of total claimed numbers. If you received a
--     @FAILED@ status from a @ClaimPhoneNumber@ API call, you have one day
--     to retry claiming the phone number before the number is released
--     back to the inventory for other customers to claim.
--
-- You will not be billed for the phone number during the 1-day period if
-- number claiming fails.
--
-- 'phoneNumberType', 'claimedPhoneNumberSummary_phoneNumberType' - The type of phone number.
--
-- 'tags', 'claimedPhoneNumberSummary_tags' - The tags used to organize, track, or control access for this resource.
-- For example, { \"tags\": {\"key1\":\"value1\", \"key2\":\"value2\"} }.
--
-- 'targetArn', 'claimedPhoneNumberSummary_targetArn' - The Amazon Resource Name (ARN) for Amazon Connect instances or traffic
-- distribution groups that phone numbers are claimed to.
newClaimedPhoneNumberSummary ::
  ClaimedPhoneNumberSummary
newClaimedPhoneNumberSummary :: ClaimedPhoneNumberSummary
newClaimedPhoneNumberSummary =
  ClaimedPhoneNumberSummary'
    { $sel:phoneNumber:ClaimedPhoneNumberSummary' :: Maybe Text
phoneNumber =
        forall a. Maybe a
Prelude.Nothing,
      $sel:phoneNumberArn:ClaimedPhoneNumberSummary' :: Maybe Text
phoneNumberArn = forall a. Maybe a
Prelude.Nothing,
      $sel:phoneNumberCountryCode:ClaimedPhoneNumberSummary' :: Maybe PhoneNumberCountryCode
phoneNumberCountryCode = forall a. Maybe a
Prelude.Nothing,
      $sel:phoneNumberDescription:ClaimedPhoneNumberSummary' :: Maybe Text
phoneNumberDescription = forall a. Maybe a
Prelude.Nothing,
      $sel:phoneNumberId:ClaimedPhoneNumberSummary' :: Maybe Text
phoneNumberId = forall a. Maybe a
Prelude.Nothing,
      $sel:phoneNumberStatus:ClaimedPhoneNumberSummary' :: Maybe PhoneNumberStatus
phoneNumberStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:phoneNumberType:ClaimedPhoneNumberSummary' :: Maybe PhoneNumberType
phoneNumberType = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ClaimedPhoneNumberSummary' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:targetArn:ClaimedPhoneNumberSummary' :: Maybe Text
targetArn = forall a. Maybe a
Prelude.Nothing
    }

-- | The phone number. Phone numbers are formatted
-- @[+] [country code] [subscriber number including area code]@.
claimedPhoneNumberSummary_phoneNumber :: Lens.Lens' ClaimedPhoneNumberSummary (Prelude.Maybe Prelude.Text)
claimedPhoneNumberSummary_phoneNumber :: Lens' ClaimedPhoneNumberSummary (Maybe Text)
claimedPhoneNumberSummary_phoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClaimedPhoneNumberSummary' {Maybe Text
phoneNumber :: Maybe Text
$sel:phoneNumber:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
phoneNumber} -> Maybe Text
phoneNumber) (\s :: ClaimedPhoneNumberSummary
s@ClaimedPhoneNumberSummary' {} Maybe Text
a -> ClaimedPhoneNumberSummary
s {$sel:phoneNumber:ClaimedPhoneNumberSummary' :: Maybe Text
phoneNumber = Maybe Text
a} :: ClaimedPhoneNumberSummary)

-- | The Amazon Resource Name (ARN) of the phone number.
claimedPhoneNumberSummary_phoneNumberArn :: Lens.Lens' ClaimedPhoneNumberSummary (Prelude.Maybe Prelude.Text)
claimedPhoneNumberSummary_phoneNumberArn :: Lens' ClaimedPhoneNumberSummary (Maybe Text)
claimedPhoneNumberSummary_phoneNumberArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClaimedPhoneNumberSummary' {Maybe Text
phoneNumberArn :: Maybe Text
$sel:phoneNumberArn:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
phoneNumberArn} -> Maybe Text
phoneNumberArn) (\s :: ClaimedPhoneNumberSummary
s@ClaimedPhoneNumberSummary' {} Maybe Text
a -> ClaimedPhoneNumberSummary
s {$sel:phoneNumberArn:ClaimedPhoneNumberSummary' :: Maybe Text
phoneNumberArn = Maybe Text
a} :: ClaimedPhoneNumberSummary)

-- | The ISO country code.
claimedPhoneNumberSummary_phoneNumberCountryCode :: Lens.Lens' ClaimedPhoneNumberSummary (Prelude.Maybe PhoneNumberCountryCode)
claimedPhoneNumberSummary_phoneNumberCountryCode :: Lens' ClaimedPhoneNumberSummary (Maybe PhoneNumberCountryCode)
claimedPhoneNumberSummary_phoneNumberCountryCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClaimedPhoneNumberSummary' {Maybe PhoneNumberCountryCode
phoneNumberCountryCode :: Maybe PhoneNumberCountryCode
$sel:phoneNumberCountryCode:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe PhoneNumberCountryCode
phoneNumberCountryCode} -> Maybe PhoneNumberCountryCode
phoneNumberCountryCode) (\s :: ClaimedPhoneNumberSummary
s@ClaimedPhoneNumberSummary' {} Maybe PhoneNumberCountryCode
a -> ClaimedPhoneNumberSummary
s {$sel:phoneNumberCountryCode:ClaimedPhoneNumberSummary' :: Maybe PhoneNumberCountryCode
phoneNumberCountryCode = Maybe PhoneNumberCountryCode
a} :: ClaimedPhoneNumberSummary)

-- | The description of the phone number.
claimedPhoneNumberSummary_phoneNumberDescription :: Lens.Lens' ClaimedPhoneNumberSummary (Prelude.Maybe Prelude.Text)
claimedPhoneNumberSummary_phoneNumberDescription :: Lens' ClaimedPhoneNumberSummary (Maybe Text)
claimedPhoneNumberSummary_phoneNumberDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClaimedPhoneNumberSummary' {Maybe Text
phoneNumberDescription :: Maybe Text
$sel:phoneNumberDescription:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
phoneNumberDescription} -> Maybe Text
phoneNumberDescription) (\s :: ClaimedPhoneNumberSummary
s@ClaimedPhoneNumberSummary' {} Maybe Text
a -> ClaimedPhoneNumberSummary
s {$sel:phoneNumberDescription:ClaimedPhoneNumberSummary' :: Maybe Text
phoneNumberDescription = Maybe Text
a} :: ClaimedPhoneNumberSummary)

-- | A unique identifier for the phone number.
claimedPhoneNumberSummary_phoneNumberId :: Lens.Lens' ClaimedPhoneNumberSummary (Prelude.Maybe Prelude.Text)
claimedPhoneNumberSummary_phoneNumberId :: Lens' ClaimedPhoneNumberSummary (Maybe Text)
claimedPhoneNumberSummary_phoneNumberId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClaimedPhoneNumberSummary' {Maybe Text
phoneNumberId :: Maybe Text
$sel:phoneNumberId:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
phoneNumberId} -> Maybe Text
phoneNumberId) (\s :: ClaimedPhoneNumberSummary
s@ClaimedPhoneNumberSummary' {} Maybe Text
a -> ClaimedPhoneNumberSummary
s {$sel:phoneNumberId:ClaimedPhoneNumberSummary' :: Maybe Text
phoneNumberId = Maybe Text
a} :: ClaimedPhoneNumberSummary)

-- | The status of the phone number.
--
-- -   @CLAIMED@ means the previous
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_ClaimedPhoneNumber.html ClaimedPhoneNumber>
--     or
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdatePhoneNumber.html UpdatePhoneNumber>
--     operation succeeded.
--
-- -   @IN_PROGRESS@ means a
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_ClaimedPhoneNumber.html ClaimedPhoneNumber>
--     or
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdatePhoneNumber.html UpdatePhoneNumber>
--     operation is still in progress and has not yet completed. You can
--     call
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribePhoneNumber.html DescribePhoneNumber>
--     at a later time to verify if the previous operation has completed.
--
-- -   @FAILED@ indicates that the previous
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_ClaimedPhoneNumber.html ClaimedPhoneNumber>
--     or
--     <https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdatePhoneNumber.html UpdatePhoneNumber>
--     operation has failed. It will include a message indicating the
--     failure reason. A common reason for a failure may be that the
--     @TargetArn@ value you are claiming or updating a phone number to has
--     reached its limit of total claimed numbers. If you received a
--     @FAILED@ status from a @ClaimPhoneNumber@ API call, you have one day
--     to retry claiming the phone number before the number is released
--     back to the inventory for other customers to claim.
--
-- You will not be billed for the phone number during the 1-day period if
-- number claiming fails.
claimedPhoneNumberSummary_phoneNumberStatus :: Lens.Lens' ClaimedPhoneNumberSummary (Prelude.Maybe PhoneNumberStatus)
claimedPhoneNumberSummary_phoneNumberStatus :: Lens' ClaimedPhoneNumberSummary (Maybe PhoneNumberStatus)
claimedPhoneNumberSummary_phoneNumberStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClaimedPhoneNumberSummary' {Maybe PhoneNumberStatus
phoneNumberStatus :: Maybe PhoneNumberStatus
$sel:phoneNumberStatus:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe PhoneNumberStatus
phoneNumberStatus} -> Maybe PhoneNumberStatus
phoneNumberStatus) (\s :: ClaimedPhoneNumberSummary
s@ClaimedPhoneNumberSummary' {} Maybe PhoneNumberStatus
a -> ClaimedPhoneNumberSummary
s {$sel:phoneNumberStatus:ClaimedPhoneNumberSummary' :: Maybe PhoneNumberStatus
phoneNumberStatus = Maybe PhoneNumberStatus
a} :: ClaimedPhoneNumberSummary)

-- | The type of phone number.
claimedPhoneNumberSummary_phoneNumberType :: Lens.Lens' ClaimedPhoneNumberSummary (Prelude.Maybe PhoneNumberType)
claimedPhoneNumberSummary_phoneNumberType :: Lens' ClaimedPhoneNumberSummary (Maybe PhoneNumberType)
claimedPhoneNumberSummary_phoneNumberType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClaimedPhoneNumberSummary' {Maybe PhoneNumberType
phoneNumberType :: Maybe PhoneNumberType
$sel:phoneNumberType:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe PhoneNumberType
phoneNumberType} -> Maybe PhoneNumberType
phoneNumberType) (\s :: ClaimedPhoneNumberSummary
s@ClaimedPhoneNumberSummary' {} Maybe PhoneNumberType
a -> ClaimedPhoneNumberSummary
s {$sel:phoneNumberType:ClaimedPhoneNumberSummary' :: Maybe PhoneNumberType
phoneNumberType = Maybe PhoneNumberType
a} :: ClaimedPhoneNumberSummary)

-- | The tags used to organize, track, or control access for this resource.
-- For example, { \"tags\": {\"key1\":\"value1\", \"key2\":\"value2\"} }.
claimedPhoneNumberSummary_tags :: Lens.Lens' ClaimedPhoneNumberSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
claimedPhoneNumberSummary_tags :: Lens' ClaimedPhoneNumberSummary (Maybe (HashMap Text Text))
claimedPhoneNumberSummary_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClaimedPhoneNumberSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ClaimedPhoneNumberSummary
s@ClaimedPhoneNumberSummary' {} Maybe (HashMap Text Text)
a -> ClaimedPhoneNumberSummary
s {$sel:tags:ClaimedPhoneNumberSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ClaimedPhoneNumberSummary) 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

-- | The Amazon Resource Name (ARN) for Amazon Connect instances or traffic
-- distribution groups that phone numbers are claimed to.
claimedPhoneNumberSummary_targetArn :: Lens.Lens' ClaimedPhoneNumberSummary (Prelude.Maybe Prelude.Text)
claimedPhoneNumberSummary_targetArn :: Lens' ClaimedPhoneNumberSummary (Maybe Text)
claimedPhoneNumberSummary_targetArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClaimedPhoneNumberSummary' {Maybe Text
targetArn :: Maybe Text
$sel:targetArn:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
targetArn} -> Maybe Text
targetArn) (\s :: ClaimedPhoneNumberSummary
s@ClaimedPhoneNumberSummary' {} Maybe Text
a -> ClaimedPhoneNumberSummary
s {$sel:targetArn:ClaimedPhoneNumberSummary' :: Maybe Text
targetArn = Maybe Text
a} :: ClaimedPhoneNumberSummary)

instance Data.FromJSON ClaimedPhoneNumberSummary where
  parseJSON :: Value -> Parser ClaimedPhoneNumberSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ClaimedPhoneNumberSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe PhoneNumberCountryCode
-> Maybe Text
-> Maybe Text
-> Maybe PhoneNumberStatus
-> Maybe PhoneNumberType
-> Maybe (HashMap Text Text)
-> Maybe Text
-> ClaimedPhoneNumberSummary
ClaimedPhoneNumberSummary'
            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
"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
"PhoneNumberArn")
            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
"PhoneNumberCountryCode")
            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
"PhoneNumberDescription")
            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
"PhoneNumberId")
            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
"PhoneNumberStatus")
            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
"PhoneNumberType")
            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
"Tags" 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
"TargetArn")
      )

instance Prelude.Hashable ClaimedPhoneNumberSummary where
  hashWithSalt :: Int -> ClaimedPhoneNumberSummary -> Int
hashWithSalt Int
_salt ClaimedPhoneNumberSummary' {Maybe Text
Maybe (HashMap Text Text)
Maybe PhoneNumberCountryCode
Maybe PhoneNumberType
Maybe PhoneNumberStatus
targetArn :: Maybe Text
tags :: Maybe (HashMap Text Text)
phoneNumberType :: Maybe PhoneNumberType
phoneNumberStatus :: Maybe PhoneNumberStatus
phoneNumberId :: Maybe Text
phoneNumberDescription :: Maybe Text
phoneNumberCountryCode :: Maybe PhoneNumberCountryCode
phoneNumberArn :: Maybe Text
phoneNumber :: Maybe Text
$sel:targetArn:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
$sel:tags:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe (HashMap Text Text)
$sel:phoneNumberType:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe PhoneNumberType
$sel:phoneNumberStatus:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe PhoneNumberStatus
$sel:phoneNumberId:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
$sel:phoneNumberDescription:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
$sel:phoneNumberCountryCode:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe PhoneNumberCountryCode
$sel:phoneNumberArn:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
$sel:phoneNumber:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
phoneNumber
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
phoneNumberArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PhoneNumberCountryCode
phoneNumberCountryCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
phoneNumberDescription
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
phoneNumberId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PhoneNumberStatus
phoneNumberStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PhoneNumberType
phoneNumberType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
targetArn

instance Prelude.NFData ClaimedPhoneNumberSummary where
  rnf :: ClaimedPhoneNumberSummary -> ()
rnf ClaimedPhoneNumberSummary' {Maybe Text
Maybe (HashMap Text Text)
Maybe PhoneNumberCountryCode
Maybe PhoneNumberType
Maybe PhoneNumberStatus
targetArn :: Maybe Text
tags :: Maybe (HashMap Text Text)
phoneNumberType :: Maybe PhoneNumberType
phoneNumberStatus :: Maybe PhoneNumberStatus
phoneNumberId :: Maybe Text
phoneNumberDescription :: Maybe Text
phoneNumberCountryCode :: Maybe PhoneNumberCountryCode
phoneNumberArn :: Maybe Text
phoneNumber :: Maybe Text
$sel:targetArn:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
$sel:tags:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe (HashMap Text Text)
$sel:phoneNumberType:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe PhoneNumberType
$sel:phoneNumberStatus:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe PhoneNumberStatus
$sel:phoneNumberId:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
$sel:phoneNumberDescription:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
$sel:phoneNumberCountryCode:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe PhoneNumberCountryCode
$sel:phoneNumberArn:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
$sel:phoneNumber:ClaimedPhoneNumberSummary' :: ClaimedPhoneNumberSummary -> Maybe Text
..} =
    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
phoneNumberArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PhoneNumberCountryCode
phoneNumberCountryCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
phoneNumberDescription
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
phoneNumberId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PhoneNumberStatus
phoneNumberStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PhoneNumberType
phoneNumberType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
targetArn