{-# 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.ImportExport.GetShippingLabel
(
GetShippingLabel (..),
newGetShippingLabel,
getShippingLabel_aPIVersion,
getShippingLabel_city,
getShippingLabel_company,
getShippingLabel_country,
getShippingLabel_name,
getShippingLabel_phoneNumber,
getShippingLabel_postalCode,
getShippingLabel_stateOrProvince,
getShippingLabel_street1,
getShippingLabel_street2,
getShippingLabel_street3,
getShippingLabel_jobIds,
GetShippingLabelResponse (..),
newGetShippingLabelResponse,
getShippingLabelResponse_shippingLabelURL,
getShippingLabelResponse_warning,
getShippingLabelResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ImportExport.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetShippingLabel = GetShippingLabel'
{ GetShippingLabel -> Maybe Text
aPIVersion :: Prelude.Maybe Prelude.Text,
GetShippingLabel -> Maybe Text
city :: Prelude.Maybe Prelude.Text,
GetShippingLabel -> Maybe Text
company :: Prelude.Maybe Prelude.Text,
GetShippingLabel -> Maybe Text
country :: Prelude.Maybe Prelude.Text,
GetShippingLabel -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
GetShippingLabel -> Maybe Text
phoneNumber :: Prelude.Maybe Prelude.Text,
GetShippingLabel -> Maybe Text
postalCode :: Prelude.Maybe Prelude.Text,
GetShippingLabel -> Maybe Text
stateOrProvince :: Prelude.Maybe Prelude.Text,
GetShippingLabel -> Maybe Text
street1 :: Prelude.Maybe Prelude.Text,
GetShippingLabel -> Maybe Text
street2 :: Prelude.Maybe Prelude.Text,
GetShippingLabel -> Maybe Text
street3 :: Prelude.Maybe Prelude.Text,
GetShippingLabel -> [Text]
jobIds :: [Prelude.Text]
}
deriving (GetShippingLabel -> GetShippingLabel -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetShippingLabel -> GetShippingLabel -> Bool
$c/= :: GetShippingLabel -> GetShippingLabel -> Bool
== :: GetShippingLabel -> GetShippingLabel -> Bool
$c== :: GetShippingLabel -> GetShippingLabel -> Bool
Prelude.Eq, ReadPrec [GetShippingLabel]
ReadPrec GetShippingLabel
Int -> ReadS GetShippingLabel
ReadS [GetShippingLabel]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetShippingLabel]
$creadListPrec :: ReadPrec [GetShippingLabel]
readPrec :: ReadPrec GetShippingLabel
$creadPrec :: ReadPrec GetShippingLabel
readList :: ReadS [GetShippingLabel]
$creadList :: ReadS [GetShippingLabel]
readsPrec :: Int -> ReadS GetShippingLabel
$creadsPrec :: Int -> ReadS GetShippingLabel
Prelude.Read, Int -> GetShippingLabel -> ShowS
[GetShippingLabel] -> ShowS
GetShippingLabel -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetShippingLabel] -> ShowS
$cshowList :: [GetShippingLabel] -> ShowS
show :: GetShippingLabel -> String
$cshow :: GetShippingLabel -> String
showsPrec :: Int -> GetShippingLabel -> ShowS
$cshowsPrec :: Int -> GetShippingLabel -> ShowS
Prelude.Show, forall x. Rep GetShippingLabel x -> GetShippingLabel
forall x. GetShippingLabel -> Rep GetShippingLabel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetShippingLabel x -> GetShippingLabel
$cfrom :: forall x. GetShippingLabel -> Rep GetShippingLabel x
Prelude.Generic)
newGetShippingLabel ::
GetShippingLabel
newGetShippingLabel :: GetShippingLabel
newGetShippingLabel =
GetShippingLabel'
{ $sel:aPIVersion:GetShippingLabel' :: Maybe Text
aPIVersion = forall a. Maybe a
Prelude.Nothing,
$sel:city:GetShippingLabel' :: Maybe Text
city = forall a. Maybe a
Prelude.Nothing,
$sel:company:GetShippingLabel' :: Maybe Text
company = forall a. Maybe a
Prelude.Nothing,
$sel:country:GetShippingLabel' :: Maybe Text
country = forall a. Maybe a
Prelude.Nothing,
$sel:name:GetShippingLabel' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:phoneNumber:GetShippingLabel' :: Maybe Text
phoneNumber = forall a. Maybe a
Prelude.Nothing,
$sel:postalCode:GetShippingLabel' :: Maybe Text
postalCode = forall a. Maybe a
Prelude.Nothing,
$sel:stateOrProvince:GetShippingLabel' :: Maybe Text
stateOrProvince = forall a. Maybe a
Prelude.Nothing,
$sel:street1:GetShippingLabel' :: Maybe Text
street1 = forall a. Maybe a
Prelude.Nothing,
$sel:street2:GetShippingLabel' :: Maybe Text
street2 = forall a. Maybe a
Prelude.Nothing,
$sel:street3:GetShippingLabel' :: Maybe Text
street3 = forall a. Maybe a
Prelude.Nothing,
$sel:jobIds:GetShippingLabel' :: [Text]
jobIds = forall a. Monoid a => a
Prelude.mempty
}
getShippingLabel_aPIVersion :: Lens.Lens' GetShippingLabel (Prelude.Maybe Prelude.Text)
getShippingLabel_aPIVersion :: Lens' GetShippingLabel (Maybe Text)
getShippingLabel_aPIVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabel' {Maybe Text
aPIVersion :: Maybe Text
$sel:aPIVersion:GetShippingLabel' :: GetShippingLabel -> Maybe Text
aPIVersion} -> Maybe Text
aPIVersion) (\s :: GetShippingLabel
s@GetShippingLabel' {} Maybe Text
a -> GetShippingLabel
s {$sel:aPIVersion:GetShippingLabel' :: Maybe Text
aPIVersion = Maybe Text
a} :: GetShippingLabel)
getShippingLabel_city :: Lens.Lens' GetShippingLabel (Prelude.Maybe Prelude.Text)
getShippingLabel_city :: Lens' GetShippingLabel (Maybe Text)
getShippingLabel_city = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabel' {Maybe Text
city :: Maybe Text
$sel:city:GetShippingLabel' :: GetShippingLabel -> Maybe Text
city} -> Maybe Text
city) (\s :: GetShippingLabel
s@GetShippingLabel' {} Maybe Text
a -> GetShippingLabel
s {$sel:city:GetShippingLabel' :: Maybe Text
city = Maybe Text
a} :: GetShippingLabel)
getShippingLabel_company :: Lens.Lens' GetShippingLabel (Prelude.Maybe Prelude.Text)
getShippingLabel_company :: Lens' GetShippingLabel (Maybe Text)
getShippingLabel_company = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabel' {Maybe Text
company :: Maybe Text
$sel:company:GetShippingLabel' :: GetShippingLabel -> Maybe Text
company} -> Maybe Text
company) (\s :: GetShippingLabel
s@GetShippingLabel' {} Maybe Text
a -> GetShippingLabel
s {$sel:company:GetShippingLabel' :: Maybe Text
company = Maybe Text
a} :: GetShippingLabel)
getShippingLabel_country :: Lens.Lens' GetShippingLabel (Prelude.Maybe Prelude.Text)
getShippingLabel_country :: Lens' GetShippingLabel (Maybe Text)
getShippingLabel_country = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabel' {Maybe Text
country :: Maybe Text
$sel:country:GetShippingLabel' :: GetShippingLabel -> Maybe Text
country} -> Maybe Text
country) (\s :: GetShippingLabel
s@GetShippingLabel' {} Maybe Text
a -> GetShippingLabel
s {$sel:country:GetShippingLabel' :: Maybe Text
country = Maybe Text
a} :: GetShippingLabel)
getShippingLabel_name :: Lens.Lens' GetShippingLabel (Prelude.Maybe Prelude.Text)
getShippingLabel_name :: Lens' GetShippingLabel (Maybe Text)
getShippingLabel_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabel' {Maybe Text
name :: Maybe Text
$sel:name:GetShippingLabel' :: GetShippingLabel -> Maybe Text
name} -> Maybe Text
name) (\s :: GetShippingLabel
s@GetShippingLabel' {} Maybe Text
a -> GetShippingLabel
s {$sel:name:GetShippingLabel' :: Maybe Text
name = Maybe Text
a} :: GetShippingLabel)
getShippingLabel_phoneNumber :: Lens.Lens' GetShippingLabel (Prelude.Maybe Prelude.Text)
getShippingLabel_phoneNumber :: Lens' GetShippingLabel (Maybe Text)
getShippingLabel_phoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabel' {Maybe Text
phoneNumber :: Maybe Text
$sel:phoneNumber:GetShippingLabel' :: GetShippingLabel -> Maybe Text
phoneNumber} -> Maybe Text
phoneNumber) (\s :: GetShippingLabel
s@GetShippingLabel' {} Maybe Text
a -> GetShippingLabel
s {$sel:phoneNumber:GetShippingLabel' :: Maybe Text
phoneNumber = Maybe Text
a} :: GetShippingLabel)
getShippingLabel_postalCode :: Lens.Lens' GetShippingLabel (Prelude.Maybe Prelude.Text)
getShippingLabel_postalCode :: Lens' GetShippingLabel (Maybe Text)
getShippingLabel_postalCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabel' {Maybe Text
postalCode :: Maybe Text
$sel:postalCode:GetShippingLabel' :: GetShippingLabel -> Maybe Text
postalCode} -> Maybe Text
postalCode) (\s :: GetShippingLabel
s@GetShippingLabel' {} Maybe Text
a -> GetShippingLabel
s {$sel:postalCode:GetShippingLabel' :: Maybe Text
postalCode = Maybe Text
a} :: GetShippingLabel)
getShippingLabel_stateOrProvince :: Lens.Lens' GetShippingLabel (Prelude.Maybe Prelude.Text)
getShippingLabel_stateOrProvince :: Lens' GetShippingLabel (Maybe Text)
getShippingLabel_stateOrProvince = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabel' {Maybe Text
stateOrProvince :: Maybe Text
$sel:stateOrProvince:GetShippingLabel' :: GetShippingLabel -> Maybe Text
stateOrProvince} -> Maybe Text
stateOrProvince) (\s :: GetShippingLabel
s@GetShippingLabel' {} Maybe Text
a -> GetShippingLabel
s {$sel:stateOrProvince:GetShippingLabel' :: Maybe Text
stateOrProvince = Maybe Text
a} :: GetShippingLabel)
getShippingLabel_street1 :: Lens.Lens' GetShippingLabel (Prelude.Maybe Prelude.Text)
getShippingLabel_street1 :: Lens' GetShippingLabel (Maybe Text)
getShippingLabel_street1 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabel' {Maybe Text
street1 :: Maybe Text
$sel:street1:GetShippingLabel' :: GetShippingLabel -> Maybe Text
street1} -> Maybe Text
street1) (\s :: GetShippingLabel
s@GetShippingLabel' {} Maybe Text
a -> GetShippingLabel
s {$sel:street1:GetShippingLabel' :: Maybe Text
street1 = Maybe Text
a} :: GetShippingLabel)
getShippingLabel_street2 :: Lens.Lens' GetShippingLabel (Prelude.Maybe Prelude.Text)
getShippingLabel_street2 :: Lens' GetShippingLabel (Maybe Text)
getShippingLabel_street2 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabel' {Maybe Text
street2 :: Maybe Text
$sel:street2:GetShippingLabel' :: GetShippingLabel -> Maybe Text
street2} -> Maybe Text
street2) (\s :: GetShippingLabel
s@GetShippingLabel' {} Maybe Text
a -> GetShippingLabel
s {$sel:street2:GetShippingLabel' :: Maybe Text
street2 = Maybe Text
a} :: GetShippingLabel)
getShippingLabel_street3 :: Lens.Lens' GetShippingLabel (Prelude.Maybe Prelude.Text)
getShippingLabel_street3 :: Lens' GetShippingLabel (Maybe Text)
getShippingLabel_street3 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabel' {Maybe Text
street3 :: Maybe Text
$sel:street3:GetShippingLabel' :: GetShippingLabel -> Maybe Text
street3} -> Maybe Text
street3) (\s :: GetShippingLabel
s@GetShippingLabel' {} Maybe Text
a -> GetShippingLabel
s {$sel:street3:GetShippingLabel' :: Maybe Text
street3 = Maybe Text
a} :: GetShippingLabel)
getShippingLabel_jobIds :: Lens.Lens' GetShippingLabel [Prelude.Text]
getShippingLabel_jobIds :: Lens' GetShippingLabel [Text]
getShippingLabel_jobIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabel' {[Text]
jobIds :: [Text]
$sel:jobIds:GetShippingLabel' :: GetShippingLabel -> [Text]
jobIds} -> [Text]
jobIds) (\s :: GetShippingLabel
s@GetShippingLabel' {} [Text]
a -> GetShippingLabel
s {$sel:jobIds:GetShippingLabel' :: [Text]
jobIds = [Text]
a} :: GetShippingLabel) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest GetShippingLabel where
type
AWSResponse GetShippingLabel =
GetShippingLabelResponse
request :: (Service -> Service)
-> GetShippingLabel -> Request GetShippingLabel
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetShippingLabel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetShippingLabel)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"GetShippingLabelResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text -> Maybe Text -> Int -> GetShippingLabelResponse
GetShippingLabelResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ShippingLabelURL")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Warning")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable GetShippingLabel where
hashWithSalt :: Int -> GetShippingLabel -> Int
hashWithSalt Int
_salt GetShippingLabel' {[Text]
Maybe Text
jobIds :: [Text]
street3 :: Maybe Text
street2 :: Maybe Text
street1 :: Maybe Text
stateOrProvince :: Maybe Text
postalCode :: Maybe Text
phoneNumber :: Maybe Text
name :: Maybe Text
country :: Maybe Text
company :: Maybe Text
city :: Maybe Text
aPIVersion :: Maybe Text
$sel:jobIds:GetShippingLabel' :: GetShippingLabel -> [Text]
$sel:street3:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:street2:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:street1:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:stateOrProvince:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:postalCode:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:phoneNumber:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:name:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:country:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:company:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:city:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:aPIVersion:GetShippingLabel' :: GetShippingLabel -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
aPIVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
city
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
company
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
country
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
phoneNumber
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
postalCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stateOrProvince
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
street1
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
street2
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
street3
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
jobIds
instance Prelude.NFData GetShippingLabel where
rnf :: GetShippingLabel -> ()
rnf GetShippingLabel' {[Text]
Maybe Text
jobIds :: [Text]
street3 :: Maybe Text
street2 :: Maybe Text
street1 :: Maybe Text
stateOrProvince :: Maybe Text
postalCode :: Maybe Text
phoneNumber :: Maybe Text
name :: Maybe Text
country :: Maybe Text
company :: Maybe Text
city :: Maybe Text
aPIVersion :: Maybe Text
$sel:jobIds:GetShippingLabel' :: GetShippingLabel -> [Text]
$sel:street3:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:street2:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:street1:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:stateOrProvince:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:postalCode:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:phoneNumber:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:name:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:country:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:company:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:city:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:aPIVersion:GetShippingLabel' :: GetShippingLabel -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
aPIVersion
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
company
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
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
phoneNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
postalCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stateOrProvince
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
street1
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
street2
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
street3
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
jobIds
instance Data.ToHeaders GetShippingLabel where
toHeaders :: GetShippingLabel -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath GetShippingLabel where
toPath :: GetShippingLabel -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery GetShippingLabel where
toQuery :: GetShippingLabel -> QueryString
toQuery GetShippingLabel' {[Text]
Maybe Text
jobIds :: [Text]
street3 :: Maybe Text
street2 :: Maybe Text
street1 :: Maybe Text
stateOrProvince :: Maybe Text
postalCode :: Maybe Text
phoneNumber :: Maybe Text
name :: Maybe Text
country :: Maybe Text
company :: Maybe Text
city :: Maybe Text
aPIVersion :: Maybe Text
$sel:jobIds:GetShippingLabel' :: GetShippingLabel -> [Text]
$sel:street3:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:street2:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:street1:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:stateOrProvince:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:postalCode:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:phoneNumber:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:name:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:country:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:company:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:city:GetShippingLabel' :: GetShippingLabel -> Maybe Text
$sel:aPIVersion:GetShippingLabel' :: GetShippingLabel -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ QueryString
"Operation=GetShippingLabel",
ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"GetShippingLabel" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-06-01" :: Prelude.ByteString),
ByteString
"APIVersion" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
aPIVersion,
ByteString
"city" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
city,
ByteString
"company" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
company,
ByteString
"country" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
country,
ByteString
"name" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
name,
ByteString
"phoneNumber" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
phoneNumber,
ByteString
"postalCode" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
postalCode,
ByteString
"stateOrProvince" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
stateOrProvince,
ByteString
"street1" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
street1,
ByteString
"street2" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
street2,
ByteString
"street3" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
street3,
ByteString
"jobIds" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" [Text]
jobIds
]
data GetShippingLabelResponse = GetShippingLabelResponse'
{ GetShippingLabelResponse -> Maybe Text
shippingLabelURL :: Prelude.Maybe Prelude.Text,
GetShippingLabelResponse -> Maybe Text
warning :: Prelude.Maybe Prelude.Text,
GetShippingLabelResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetShippingLabelResponse -> GetShippingLabelResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetShippingLabelResponse -> GetShippingLabelResponse -> Bool
$c/= :: GetShippingLabelResponse -> GetShippingLabelResponse -> Bool
== :: GetShippingLabelResponse -> GetShippingLabelResponse -> Bool
$c== :: GetShippingLabelResponse -> GetShippingLabelResponse -> Bool
Prelude.Eq, ReadPrec [GetShippingLabelResponse]
ReadPrec GetShippingLabelResponse
Int -> ReadS GetShippingLabelResponse
ReadS [GetShippingLabelResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetShippingLabelResponse]
$creadListPrec :: ReadPrec [GetShippingLabelResponse]
readPrec :: ReadPrec GetShippingLabelResponse
$creadPrec :: ReadPrec GetShippingLabelResponse
readList :: ReadS [GetShippingLabelResponse]
$creadList :: ReadS [GetShippingLabelResponse]
readsPrec :: Int -> ReadS GetShippingLabelResponse
$creadsPrec :: Int -> ReadS GetShippingLabelResponse
Prelude.Read, Int -> GetShippingLabelResponse -> ShowS
[GetShippingLabelResponse] -> ShowS
GetShippingLabelResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetShippingLabelResponse] -> ShowS
$cshowList :: [GetShippingLabelResponse] -> ShowS
show :: GetShippingLabelResponse -> String
$cshow :: GetShippingLabelResponse -> String
showsPrec :: Int -> GetShippingLabelResponse -> ShowS
$cshowsPrec :: Int -> GetShippingLabelResponse -> ShowS
Prelude.Show, forall x.
Rep GetShippingLabelResponse x -> GetShippingLabelResponse
forall x.
GetShippingLabelResponse -> Rep GetShippingLabelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetShippingLabelResponse x -> GetShippingLabelResponse
$cfrom :: forall x.
GetShippingLabelResponse -> Rep GetShippingLabelResponse x
Prelude.Generic)
newGetShippingLabelResponse ::
Prelude.Int ->
GetShippingLabelResponse
newGetShippingLabelResponse :: Int -> GetShippingLabelResponse
newGetShippingLabelResponse Int
pHttpStatus_ =
GetShippingLabelResponse'
{ $sel:shippingLabelURL:GetShippingLabelResponse' :: Maybe Text
shippingLabelURL =
forall a. Maybe a
Prelude.Nothing,
$sel:warning:GetShippingLabelResponse' :: Maybe Text
warning = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetShippingLabelResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getShippingLabelResponse_shippingLabelURL :: Lens.Lens' GetShippingLabelResponse (Prelude.Maybe Prelude.Text)
getShippingLabelResponse_shippingLabelURL :: Lens' GetShippingLabelResponse (Maybe Text)
getShippingLabelResponse_shippingLabelURL = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabelResponse' {Maybe Text
shippingLabelURL :: Maybe Text
$sel:shippingLabelURL:GetShippingLabelResponse' :: GetShippingLabelResponse -> Maybe Text
shippingLabelURL} -> Maybe Text
shippingLabelURL) (\s :: GetShippingLabelResponse
s@GetShippingLabelResponse' {} Maybe Text
a -> GetShippingLabelResponse
s {$sel:shippingLabelURL:GetShippingLabelResponse' :: Maybe Text
shippingLabelURL = Maybe Text
a} :: GetShippingLabelResponse)
getShippingLabelResponse_warning :: Lens.Lens' GetShippingLabelResponse (Prelude.Maybe Prelude.Text)
getShippingLabelResponse_warning :: Lens' GetShippingLabelResponse (Maybe Text)
getShippingLabelResponse_warning = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabelResponse' {Maybe Text
warning :: Maybe Text
$sel:warning:GetShippingLabelResponse' :: GetShippingLabelResponse -> Maybe Text
warning} -> Maybe Text
warning) (\s :: GetShippingLabelResponse
s@GetShippingLabelResponse' {} Maybe Text
a -> GetShippingLabelResponse
s {$sel:warning:GetShippingLabelResponse' :: Maybe Text
warning = Maybe Text
a} :: GetShippingLabelResponse)
getShippingLabelResponse_httpStatus :: Lens.Lens' GetShippingLabelResponse Prelude.Int
getShippingLabelResponse_httpStatus :: Lens' GetShippingLabelResponse Int
getShippingLabelResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetShippingLabelResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetShippingLabelResponse' :: GetShippingLabelResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetShippingLabelResponse
s@GetShippingLabelResponse' {} Int
a -> GetShippingLabelResponse
s {$sel:httpStatus:GetShippingLabelResponse' :: Int
httpStatus = Int
a} :: GetShippingLabelResponse)
instance Prelude.NFData GetShippingLabelResponse where
rnf :: GetShippingLabelResponse -> ()
rnf GetShippingLabelResponse' {Int
Maybe Text
httpStatus :: Int
warning :: Maybe Text
shippingLabelURL :: Maybe Text
$sel:httpStatus:GetShippingLabelResponse' :: GetShippingLabelResponse -> Int
$sel:warning:GetShippingLabelResponse' :: GetShippingLabelResponse -> Maybe Text
$sel:shippingLabelURL:GetShippingLabelResponse' :: GetShippingLabelResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
shippingLabelURL
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
warning
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus