{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CloudFront.ListConflictingAliases
(
ListConflictingAliases (..),
newListConflictingAliases,
listConflictingAliases_marker,
listConflictingAliases_maxItems,
listConflictingAliases_distributionId,
listConflictingAliases_alias,
ListConflictingAliasesResponse (..),
newListConflictingAliasesResponse,
listConflictingAliasesResponse_conflictingAliasesList,
listConflictingAliasesResponse_httpStatus,
)
where
import Amazonka.CloudFront.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListConflictingAliases = ListConflictingAliases'
{
ListConflictingAliases -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
ListConflictingAliases -> Maybe Int
maxItems :: Prelude.Maybe Prelude.Int,
ListConflictingAliases -> Text
distributionId :: Prelude.Text,
ListConflictingAliases -> Text
alias :: Prelude.Text
}
deriving (ListConflictingAliases -> ListConflictingAliases -> Bool
(ListConflictingAliases -> ListConflictingAliases -> Bool)
-> (ListConflictingAliases -> ListConflictingAliases -> Bool)
-> Eq ListConflictingAliases
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListConflictingAliases -> ListConflictingAliases -> Bool
$c/= :: ListConflictingAliases -> ListConflictingAliases -> Bool
== :: ListConflictingAliases -> ListConflictingAliases -> Bool
$c== :: ListConflictingAliases -> ListConflictingAliases -> Bool
Prelude.Eq, ReadPrec [ListConflictingAliases]
ReadPrec ListConflictingAliases
Int -> ReadS ListConflictingAliases
ReadS [ListConflictingAliases]
(Int -> ReadS ListConflictingAliases)
-> ReadS [ListConflictingAliases]
-> ReadPrec ListConflictingAliases
-> ReadPrec [ListConflictingAliases]
-> Read ListConflictingAliases
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListConflictingAliases]
$creadListPrec :: ReadPrec [ListConflictingAliases]
readPrec :: ReadPrec ListConflictingAliases
$creadPrec :: ReadPrec ListConflictingAliases
readList :: ReadS [ListConflictingAliases]
$creadList :: ReadS [ListConflictingAliases]
readsPrec :: Int -> ReadS ListConflictingAliases
$creadsPrec :: Int -> ReadS ListConflictingAliases
Prelude.Read, Int -> ListConflictingAliases -> ShowS
[ListConflictingAliases] -> ShowS
ListConflictingAliases -> String
(Int -> ListConflictingAliases -> ShowS)
-> (ListConflictingAliases -> String)
-> ([ListConflictingAliases] -> ShowS)
-> Show ListConflictingAliases
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListConflictingAliases] -> ShowS
$cshowList :: [ListConflictingAliases] -> ShowS
show :: ListConflictingAliases -> String
$cshow :: ListConflictingAliases -> String
showsPrec :: Int -> ListConflictingAliases -> ShowS
$cshowsPrec :: Int -> ListConflictingAliases -> ShowS
Prelude.Show, (forall x. ListConflictingAliases -> Rep ListConflictingAliases x)
-> (forall x.
Rep ListConflictingAliases x -> ListConflictingAliases)
-> Generic ListConflictingAliases
forall x. Rep ListConflictingAliases x -> ListConflictingAliases
forall x. ListConflictingAliases -> Rep ListConflictingAliases x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListConflictingAliases x -> ListConflictingAliases
$cfrom :: forall x. ListConflictingAliases -> Rep ListConflictingAliases x
Prelude.Generic)
newListConflictingAliases ::
Prelude.Text ->
Prelude.Text ->
ListConflictingAliases
newListConflictingAliases :: Text -> Text -> ListConflictingAliases
newListConflictingAliases Text
pDistributionId_ Text
pAlias_ =
ListConflictingAliases' :: Maybe Text -> Maybe Int -> Text -> Text -> ListConflictingAliases
ListConflictingAliases'
{ $sel:marker:ListConflictingAliases' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxItems:ListConflictingAliases' :: Maybe Int
maxItems = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:distributionId:ListConflictingAliases' :: Text
distributionId = Text
pDistributionId_,
$sel:alias:ListConflictingAliases' :: Text
alias = Text
pAlias_
}
listConflictingAliases_marker :: Lens.Lens' ListConflictingAliases (Prelude.Maybe Prelude.Text)
listConflictingAliases_marker :: (Maybe Text -> f (Maybe Text))
-> ListConflictingAliases -> f ListConflictingAliases
listConflictingAliases_marker = (ListConflictingAliases -> Maybe Text)
-> (ListConflictingAliases -> Maybe Text -> ListConflictingAliases)
-> Lens
ListConflictingAliases
ListConflictingAliases
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConflictingAliases' {Maybe Text
marker :: Maybe Text
$sel:marker:ListConflictingAliases' :: ListConflictingAliases -> Maybe Text
marker} -> Maybe Text
marker) (\s :: ListConflictingAliases
s@ListConflictingAliases' {} Maybe Text
a -> ListConflictingAliases
s {$sel:marker:ListConflictingAliases' :: Maybe Text
marker = Maybe Text
a} :: ListConflictingAliases)
listConflictingAliases_maxItems :: Lens.Lens' ListConflictingAliases (Prelude.Maybe Prelude.Int)
listConflictingAliases_maxItems :: (Maybe Int -> f (Maybe Int))
-> ListConflictingAliases -> f ListConflictingAliases
listConflictingAliases_maxItems = (ListConflictingAliases -> Maybe Int)
-> (ListConflictingAliases -> Maybe Int -> ListConflictingAliases)
-> Lens
ListConflictingAliases
ListConflictingAliases
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConflictingAliases' {Maybe Int
maxItems :: Maybe Int
$sel:maxItems:ListConflictingAliases' :: ListConflictingAliases -> Maybe Int
maxItems} -> Maybe Int
maxItems) (\s :: ListConflictingAliases
s@ListConflictingAliases' {} Maybe Int
a -> ListConflictingAliases
s {$sel:maxItems:ListConflictingAliases' :: Maybe Int
maxItems = Maybe Int
a} :: ListConflictingAliases)
listConflictingAliases_distributionId :: Lens.Lens' ListConflictingAliases Prelude.Text
listConflictingAliases_distributionId :: (Text -> f Text)
-> ListConflictingAliases -> f ListConflictingAliases
listConflictingAliases_distributionId = (ListConflictingAliases -> Text)
-> (ListConflictingAliases -> Text -> ListConflictingAliases)
-> Lens ListConflictingAliases ListConflictingAliases Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConflictingAliases' {Text
distributionId :: Text
$sel:distributionId:ListConflictingAliases' :: ListConflictingAliases -> Text
distributionId} -> Text
distributionId) (\s :: ListConflictingAliases
s@ListConflictingAliases' {} Text
a -> ListConflictingAliases
s {$sel:distributionId:ListConflictingAliases' :: Text
distributionId = Text
a} :: ListConflictingAliases)
listConflictingAliases_alias :: Lens.Lens' ListConflictingAliases Prelude.Text
listConflictingAliases_alias :: (Text -> f Text)
-> ListConflictingAliases -> f ListConflictingAliases
listConflictingAliases_alias = (ListConflictingAliases -> Text)
-> (ListConflictingAliases -> Text -> ListConflictingAliases)
-> Lens ListConflictingAliases ListConflictingAliases Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConflictingAliases' {Text
alias :: Text
$sel:alias:ListConflictingAliases' :: ListConflictingAliases -> Text
alias} -> Text
alias) (\s :: ListConflictingAliases
s@ListConflictingAliases' {} Text
a -> ListConflictingAliases
s {$sel:alias:ListConflictingAliases' :: Text
alias = Text
a} :: ListConflictingAliases)
instance Core.AWSRequest ListConflictingAliases where
type
AWSResponse ListConflictingAliases =
ListConflictingAliasesResponse
request :: ListConflictingAliases -> Request ListConflictingAliases
request = Service -> ListConflictingAliases -> Request ListConflictingAliases
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListConflictingAliases
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListConflictingAliases)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ListConflictingAliases))
-> Logger
-> Service
-> Proxy ListConflictingAliases
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListConflictingAliases)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe ConflictingAliasesList
-> Int -> ListConflictingAliasesResponse
ListConflictingAliasesResponse'
(Maybe ConflictingAliasesList
-> Int -> ListConflictingAliasesResponse)
-> Either String (Maybe ConflictingAliasesList)
-> Either String (Int -> ListConflictingAliasesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node] -> Either String (Maybe ConflictingAliasesList)
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
Either String (Int -> ListConflictingAliasesResponse)
-> Either String Int
-> Either String ListConflictingAliasesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ListConflictingAliases
instance Prelude.NFData ListConflictingAliases
instance Core.ToHeaders ListConflictingAliases where
toHeaders :: ListConflictingAliases -> ResponseHeaders
toHeaders = ResponseHeaders -> ListConflictingAliases -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ListConflictingAliases where
toPath :: ListConflictingAliases -> ByteString
toPath =
ByteString -> ListConflictingAliases -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2020-05-31/conflicting-alias"
instance Core.ToQuery ListConflictingAliases where
toQuery :: ListConflictingAliases -> QueryString
toQuery ListConflictingAliases' {Maybe Int
Maybe Text
Text
alias :: Text
distributionId :: Text
maxItems :: Maybe Int
marker :: Maybe Text
$sel:alias:ListConflictingAliases' :: ListConflictingAliases -> Text
$sel:distributionId:ListConflictingAliases' :: ListConflictingAliases -> Text
$sel:maxItems:ListConflictingAliases' :: ListConflictingAliases -> Maybe Int
$sel:marker:ListConflictingAliases' :: ListConflictingAliases -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
ByteString
"MaxItems" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxItems,
ByteString
"DistributionId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
distributionId,
ByteString
"Alias" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
alias
]
data ListConflictingAliasesResponse = ListConflictingAliasesResponse'
{
ListConflictingAliasesResponse -> Maybe ConflictingAliasesList
conflictingAliasesList :: Prelude.Maybe ConflictingAliasesList,
ListConflictingAliasesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListConflictingAliasesResponse
-> ListConflictingAliasesResponse -> Bool
(ListConflictingAliasesResponse
-> ListConflictingAliasesResponse -> Bool)
-> (ListConflictingAliasesResponse
-> ListConflictingAliasesResponse -> Bool)
-> Eq ListConflictingAliasesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListConflictingAliasesResponse
-> ListConflictingAliasesResponse -> Bool
$c/= :: ListConflictingAliasesResponse
-> ListConflictingAliasesResponse -> Bool
== :: ListConflictingAliasesResponse
-> ListConflictingAliasesResponse -> Bool
$c== :: ListConflictingAliasesResponse
-> ListConflictingAliasesResponse -> Bool
Prelude.Eq, ReadPrec [ListConflictingAliasesResponse]
ReadPrec ListConflictingAliasesResponse
Int -> ReadS ListConflictingAliasesResponse
ReadS [ListConflictingAliasesResponse]
(Int -> ReadS ListConflictingAliasesResponse)
-> ReadS [ListConflictingAliasesResponse]
-> ReadPrec ListConflictingAliasesResponse
-> ReadPrec [ListConflictingAliasesResponse]
-> Read ListConflictingAliasesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListConflictingAliasesResponse]
$creadListPrec :: ReadPrec [ListConflictingAliasesResponse]
readPrec :: ReadPrec ListConflictingAliasesResponse
$creadPrec :: ReadPrec ListConflictingAliasesResponse
readList :: ReadS [ListConflictingAliasesResponse]
$creadList :: ReadS [ListConflictingAliasesResponse]
readsPrec :: Int -> ReadS ListConflictingAliasesResponse
$creadsPrec :: Int -> ReadS ListConflictingAliasesResponse
Prelude.Read, Int -> ListConflictingAliasesResponse -> ShowS
[ListConflictingAliasesResponse] -> ShowS
ListConflictingAliasesResponse -> String
(Int -> ListConflictingAliasesResponse -> ShowS)
-> (ListConflictingAliasesResponse -> String)
-> ([ListConflictingAliasesResponse] -> ShowS)
-> Show ListConflictingAliasesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListConflictingAliasesResponse] -> ShowS
$cshowList :: [ListConflictingAliasesResponse] -> ShowS
show :: ListConflictingAliasesResponse -> String
$cshow :: ListConflictingAliasesResponse -> String
showsPrec :: Int -> ListConflictingAliasesResponse -> ShowS
$cshowsPrec :: Int -> ListConflictingAliasesResponse -> ShowS
Prelude.Show, (forall x.
ListConflictingAliasesResponse
-> Rep ListConflictingAliasesResponse x)
-> (forall x.
Rep ListConflictingAliasesResponse x
-> ListConflictingAliasesResponse)
-> Generic ListConflictingAliasesResponse
forall x.
Rep ListConflictingAliasesResponse x
-> ListConflictingAliasesResponse
forall x.
ListConflictingAliasesResponse
-> Rep ListConflictingAliasesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListConflictingAliasesResponse x
-> ListConflictingAliasesResponse
$cfrom :: forall x.
ListConflictingAliasesResponse
-> Rep ListConflictingAliasesResponse x
Prelude.Generic)
newListConflictingAliasesResponse ::
Prelude.Int ->
ListConflictingAliasesResponse
newListConflictingAliasesResponse :: Int -> ListConflictingAliasesResponse
newListConflictingAliasesResponse Int
pHttpStatus_ =
ListConflictingAliasesResponse' :: Maybe ConflictingAliasesList
-> Int -> ListConflictingAliasesResponse
ListConflictingAliasesResponse'
{ $sel:conflictingAliasesList:ListConflictingAliasesResponse' :: Maybe ConflictingAliasesList
conflictingAliasesList =
Maybe ConflictingAliasesList
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListConflictingAliasesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listConflictingAliasesResponse_conflictingAliasesList :: Lens.Lens' ListConflictingAliasesResponse (Prelude.Maybe ConflictingAliasesList)
listConflictingAliasesResponse_conflictingAliasesList :: (Maybe ConflictingAliasesList -> f (Maybe ConflictingAliasesList))
-> ListConflictingAliasesResponse
-> f ListConflictingAliasesResponse
listConflictingAliasesResponse_conflictingAliasesList = (ListConflictingAliasesResponse -> Maybe ConflictingAliasesList)
-> (ListConflictingAliasesResponse
-> Maybe ConflictingAliasesList -> ListConflictingAliasesResponse)
-> Lens
ListConflictingAliasesResponse
ListConflictingAliasesResponse
(Maybe ConflictingAliasesList)
(Maybe ConflictingAliasesList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConflictingAliasesResponse' {Maybe ConflictingAliasesList
conflictingAliasesList :: Maybe ConflictingAliasesList
$sel:conflictingAliasesList:ListConflictingAliasesResponse' :: ListConflictingAliasesResponse -> Maybe ConflictingAliasesList
conflictingAliasesList} -> Maybe ConflictingAliasesList
conflictingAliasesList) (\s :: ListConflictingAliasesResponse
s@ListConflictingAliasesResponse' {} Maybe ConflictingAliasesList
a -> ListConflictingAliasesResponse
s {$sel:conflictingAliasesList:ListConflictingAliasesResponse' :: Maybe ConflictingAliasesList
conflictingAliasesList = Maybe ConflictingAliasesList
a} :: ListConflictingAliasesResponse)
listConflictingAliasesResponse_httpStatus :: Lens.Lens' ListConflictingAliasesResponse Prelude.Int
listConflictingAliasesResponse_httpStatus :: (Int -> f Int)
-> ListConflictingAliasesResponse
-> f ListConflictingAliasesResponse
listConflictingAliasesResponse_httpStatus = (ListConflictingAliasesResponse -> Int)
-> (ListConflictingAliasesResponse
-> Int -> ListConflictingAliasesResponse)
-> Lens
ListConflictingAliasesResponse
ListConflictingAliasesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConflictingAliasesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListConflictingAliasesResponse' :: ListConflictingAliasesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListConflictingAliasesResponse
s@ListConflictingAliasesResponse' {} Int
a -> ListConflictingAliasesResponse
s {$sel:httpStatus:ListConflictingAliasesResponse' :: Int
httpStatus = Int
a} :: ListConflictingAliasesResponse)
instance
Prelude.NFData
ListConflictingAliasesResponse