{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AppRunner.AssociateCustomDomain
-- 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)
--
-- Associate your own domain name with the App Runner subdomain URL of your
-- App Runner service.
--
-- After you call @AssociateCustomDomain@ and receive a successful
-- response, use the information in the CustomDomain record that\'s
-- returned to add CNAME records to your Domain Name System (DNS). For each
-- mapped domain name, add a mapping to the target App Runner subdomain and
-- one or more certificate validation records. App Runner then performs DNS
-- validation to verify that you own or control the domain name that you
-- associated. App Runner tracks domain validity in a certificate stored in
-- <https://docs.aws.amazon.com/acm/latest/userguide AWS Certificate Manager (ACM)>.
module Amazonka.AppRunner.AssociateCustomDomain
  ( -- * Creating a Request
    AssociateCustomDomain (..),
    newAssociateCustomDomain,

    -- * Request Lenses
    associateCustomDomain_enableWWWSubdomain,
    associateCustomDomain_serviceArn,
    associateCustomDomain_domainName,

    -- * Destructuring the Response
    AssociateCustomDomainResponse (..),
    newAssociateCustomDomainResponse,

    -- * Response Lenses
    associateCustomDomainResponse_httpStatus,
    associateCustomDomainResponse_dNSTarget,
    associateCustomDomainResponse_serviceArn,
    associateCustomDomainResponse_customDomain,
  )
where

import Amazonka.AppRunner.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

-- | /See:/ 'newAssociateCustomDomain' smart constructor.
data AssociateCustomDomain = AssociateCustomDomain'
  { -- | Set to @true@ to associate the subdomain @www.DomainName @ with the App
    -- Runner service in addition to the base domain.
    --
    -- Default: @true@
    AssociateCustomDomain -> Maybe Bool
enableWWWSubdomain :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the App Runner service that you want
    -- to associate a custom domain name with.
    AssociateCustomDomain -> Text
serviceArn :: Prelude.Text,
    -- | A custom domain endpoint to associate. Specify a root domain (for
    -- example, @example.com@), a subdomain (for example, @login.example.com@
    -- or @admin.login.example.com@), or a wildcard (for example,
    -- @*.example.com@).
    AssociateCustomDomain -> Text
domainName :: Prelude.Text
  }
  deriving (AssociateCustomDomain -> AssociateCustomDomain -> Bool
(AssociateCustomDomain -> AssociateCustomDomain -> Bool)
-> (AssociateCustomDomain -> AssociateCustomDomain -> Bool)
-> Eq AssociateCustomDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateCustomDomain -> AssociateCustomDomain -> Bool
$c/= :: AssociateCustomDomain -> AssociateCustomDomain -> Bool
== :: AssociateCustomDomain -> AssociateCustomDomain -> Bool
$c== :: AssociateCustomDomain -> AssociateCustomDomain -> Bool
Prelude.Eq, ReadPrec [AssociateCustomDomain]
ReadPrec AssociateCustomDomain
Int -> ReadS AssociateCustomDomain
ReadS [AssociateCustomDomain]
(Int -> ReadS AssociateCustomDomain)
-> ReadS [AssociateCustomDomain]
-> ReadPrec AssociateCustomDomain
-> ReadPrec [AssociateCustomDomain]
-> Read AssociateCustomDomain
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateCustomDomain]
$creadListPrec :: ReadPrec [AssociateCustomDomain]
readPrec :: ReadPrec AssociateCustomDomain
$creadPrec :: ReadPrec AssociateCustomDomain
readList :: ReadS [AssociateCustomDomain]
$creadList :: ReadS [AssociateCustomDomain]
readsPrec :: Int -> ReadS AssociateCustomDomain
$creadsPrec :: Int -> ReadS AssociateCustomDomain
Prelude.Read, Int -> AssociateCustomDomain -> ShowS
[AssociateCustomDomain] -> ShowS
AssociateCustomDomain -> String
(Int -> AssociateCustomDomain -> ShowS)
-> (AssociateCustomDomain -> String)
-> ([AssociateCustomDomain] -> ShowS)
-> Show AssociateCustomDomain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateCustomDomain] -> ShowS
$cshowList :: [AssociateCustomDomain] -> ShowS
show :: AssociateCustomDomain -> String
$cshow :: AssociateCustomDomain -> String
showsPrec :: Int -> AssociateCustomDomain -> ShowS
$cshowsPrec :: Int -> AssociateCustomDomain -> ShowS
Prelude.Show, (forall x. AssociateCustomDomain -> Rep AssociateCustomDomain x)
-> (forall x. Rep AssociateCustomDomain x -> AssociateCustomDomain)
-> Generic AssociateCustomDomain
forall x. Rep AssociateCustomDomain x -> AssociateCustomDomain
forall x. AssociateCustomDomain -> Rep AssociateCustomDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssociateCustomDomain x -> AssociateCustomDomain
$cfrom :: forall x. AssociateCustomDomain -> Rep AssociateCustomDomain x
Prelude.Generic)

-- |
-- Create a value of 'AssociateCustomDomain' 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:
--
-- 'enableWWWSubdomain', 'associateCustomDomain_enableWWWSubdomain' - Set to @true@ to associate the subdomain @www.DomainName @ with the App
-- Runner service in addition to the base domain.
--
-- Default: @true@
--
-- 'serviceArn', 'associateCustomDomain_serviceArn' - The Amazon Resource Name (ARN) of the App Runner service that you want
-- to associate a custom domain name with.
--
-- 'domainName', 'associateCustomDomain_domainName' - A custom domain endpoint to associate. Specify a root domain (for
-- example, @example.com@), a subdomain (for example, @login.example.com@
-- or @admin.login.example.com@), or a wildcard (for example,
-- @*.example.com@).
newAssociateCustomDomain ::
  -- | 'serviceArn'
  Prelude.Text ->
  -- | 'domainName'
  Prelude.Text ->
  AssociateCustomDomain
newAssociateCustomDomain :: Text -> Text -> AssociateCustomDomain
newAssociateCustomDomain Text
pServiceArn_ Text
pDomainName_ =
  AssociateCustomDomain' :: Maybe Bool -> Text -> Text -> AssociateCustomDomain
AssociateCustomDomain'
    { $sel:enableWWWSubdomain:AssociateCustomDomain' :: Maybe Bool
enableWWWSubdomain =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceArn:AssociateCustomDomain' :: Text
serviceArn = Text
pServiceArn_,
      $sel:domainName:AssociateCustomDomain' :: Text
domainName = Text
pDomainName_
    }

-- | Set to @true@ to associate the subdomain @www.DomainName @ with the App
-- Runner service in addition to the base domain.
--
-- Default: @true@
associateCustomDomain_enableWWWSubdomain :: Lens.Lens' AssociateCustomDomain (Prelude.Maybe Prelude.Bool)
associateCustomDomain_enableWWWSubdomain :: (Maybe Bool -> f (Maybe Bool))
-> AssociateCustomDomain -> f AssociateCustomDomain
associateCustomDomain_enableWWWSubdomain = (AssociateCustomDomain -> Maybe Bool)
-> (AssociateCustomDomain -> Maybe Bool -> AssociateCustomDomain)
-> Lens
     AssociateCustomDomain
     AssociateCustomDomain
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateCustomDomain' {Maybe Bool
enableWWWSubdomain :: Maybe Bool
$sel:enableWWWSubdomain:AssociateCustomDomain' :: AssociateCustomDomain -> Maybe Bool
enableWWWSubdomain} -> Maybe Bool
enableWWWSubdomain) (\s :: AssociateCustomDomain
s@AssociateCustomDomain' {} Maybe Bool
a -> AssociateCustomDomain
s {$sel:enableWWWSubdomain:AssociateCustomDomain' :: Maybe Bool
enableWWWSubdomain = Maybe Bool
a} :: AssociateCustomDomain)

-- | The Amazon Resource Name (ARN) of the App Runner service that you want
-- to associate a custom domain name with.
associateCustomDomain_serviceArn :: Lens.Lens' AssociateCustomDomain Prelude.Text
associateCustomDomain_serviceArn :: (Text -> f Text)
-> AssociateCustomDomain -> f AssociateCustomDomain
associateCustomDomain_serviceArn = (AssociateCustomDomain -> Text)
-> (AssociateCustomDomain -> Text -> AssociateCustomDomain)
-> Lens AssociateCustomDomain AssociateCustomDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateCustomDomain' {Text
serviceArn :: Text
$sel:serviceArn:AssociateCustomDomain' :: AssociateCustomDomain -> Text
serviceArn} -> Text
serviceArn) (\s :: AssociateCustomDomain
s@AssociateCustomDomain' {} Text
a -> AssociateCustomDomain
s {$sel:serviceArn:AssociateCustomDomain' :: Text
serviceArn = Text
a} :: AssociateCustomDomain)

-- | A custom domain endpoint to associate. Specify a root domain (for
-- example, @example.com@), a subdomain (for example, @login.example.com@
-- or @admin.login.example.com@), or a wildcard (for example,
-- @*.example.com@).
associateCustomDomain_domainName :: Lens.Lens' AssociateCustomDomain Prelude.Text
associateCustomDomain_domainName :: (Text -> f Text)
-> AssociateCustomDomain -> f AssociateCustomDomain
associateCustomDomain_domainName = (AssociateCustomDomain -> Text)
-> (AssociateCustomDomain -> Text -> AssociateCustomDomain)
-> Lens AssociateCustomDomain AssociateCustomDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateCustomDomain' {Text
domainName :: Text
$sel:domainName:AssociateCustomDomain' :: AssociateCustomDomain -> Text
domainName} -> Text
domainName) (\s :: AssociateCustomDomain
s@AssociateCustomDomain' {} Text
a -> AssociateCustomDomain
s {$sel:domainName:AssociateCustomDomain' :: Text
domainName = Text
a} :: AssociateCustomDomain)

instance Core.AWSRequest AssociateCustomDomain where
  type
    AWSResponse AssociateCustomDomain =
      AssociateCustomDomainResponse
  request :: AssociateCustomDomain -> Request AssociateCustomDomain
request = Service -> AssociateCustomDomain -> Request AssociateCustomDomain
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AssociateCustomDomain
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AssociateCustomDomain)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse AssociateCustomDomain))
-> Logger
-> Service
-> Proxy AssociateCustomDomain
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AssociateCustomDomain)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Int
-> Text -> Text -> CustomDomain -> AssociateCustomDomainResponse
AssociateCustomDomainResponse'
            (Int
 -> Text -> Text -> CustomDomain -> AssociateCustomDomainResponse)
-> Either String Int
-> Either
     String
     (Text -> Text -> CustomDomain -> AssociateCustomDomainResponse)
forall (f :: * -> *) a b. Functor 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))
            Either
  String
  (Text -> Text -> CustomDomain -> AssociateCustomDomainResponse)
-> Either String Text
-> Either
     String (Text -> CustomDomain -> AssociateCustomDomainResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"DNSTarget")
            Either
  String (Text -> CustomDomain -> AssociateCustomDomainResponse)
-> Either String Text
-> Either String (CustomDomain -> AssociateCustomDomainResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ServiceArn")
            Either String (CustomDomain -> AssociateCustomDomainResponse)
-> Either String CustomDomain
-> Either String AssociateCustomDomainResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String CustomDomain
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CustomDomain")
      )

instance Prelude.Hashable AssociateCustomDomain

instance Prelude.NFData AssociateCustomDomain

instance Core.ToHeaders AssociateCustomDomain where
  toHeaders :: AssociateCustomDomain -> ResponseHeaders
toHeaders =
    ResponseHeaders -> AssociateCustomDomain -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AppRunner.AssociateCustomDomain" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON AssociateCustomDomain where
  toJSON :: AssociateCustomDomain -> Value
toJSON AssociateCustomDomain' {Maybe Bool
Text
domainName :: Text
serviceArn :: Text
enableWWWSubdomain :: Maybe Bool
$sel:domainName:AssociateCustomDomain' :: AssociateCustomDomain -> Text
$sel:serviceArn:AssociateCustomDomain' :: AssociateCustomDomain -> Text
$sel:enableWWWSubdomain:AssociateCustomDomain' :: AssociateCustomDomain -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"EnableWWWSubdomain" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableWWWSubdomain,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ServiceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainName)
          ]
      )

instance Core.ToPath AssociateCustomDomain where
  toPath :: AssociateCustomDomain -> ByteString
toPath = ByteString -> AssociateCustomDomain -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery AssociateCustomDomain where
  toQuery :: AssociateCustomDomain -> QueryString
toQuery = QueryString -> AssociateCustomDomain -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newAssociateCustomDomainResponse' smart constructor.
data AssociateCustomDomainResponse = AssociateCustomDomainResponse'
  { -- | The response's http status code.
    AssociateCustomDomainResponse -> Int
httpStatus :: Prelude.Int,
    -- | The App Runner subdomain of the App Runner service. The custom domain
    -- name is mapped to this target name.
    AssociateCustomDomainResponse -> Text
dNSTarget :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the App Runner service with which a
    -- custom domain name is associated.
    AssociateCustomDomainResponse -> Text
serviceArn :: Prelude.Text,
    -- | A description of the domain name that\'s being associated.
    AssociateCustomDomainResponse -> CustomDomain
customDomain :: CustomDomain
  }
  deriving (AssociateCustomDomainResponse
-> AssociateCustomDomainResponse -> Bool
(AssociateCustomDomainResponse
 -> AssociateCustomDomainResponse -> Bool)
-> (AssociateCustomDomainResponse
    -> AssociateCustomDomainResponse -> Bool)
-> Eq AssociateCustomDomainResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateCustomDomainResponse
-> AssociateCustomDomainResponse -> Bool
$c/= :: AssociateCustomDomainResponse
-> AssociateCustomDomainResponse -> Bool
== :: AssociateCustomDomainResponse
-> AssociateCustomDomainResponse -> Bool
$c== :: AssociateCustomDomainResponse
-> AssociateCustomDomainResponse -> Bool
Prelude.Eq, ReadPrec [AssociateCustomDomainResponse]
ReadPrec AssociateCustomDomainResponse
Int -> ReadS AssociateCustomDomainResponse
ReadS [AssociateCustomDomainResponse]
(Int -> ReadS AssociateCustomDomainResponse)
-> ReadS [AssociateCustomDomainResponse]
-> ReadPrec AssociateCustomDomainResponse
-> ReadPrec [AssociateCustomDomainResponse]
-> Read AssociateCustomDomainResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateCustomDomainResponse]
$creadListPrec :: ReadPrec [AssociateCustomDomainResponse]
readPrec :: ReadPrec AssociateCustomDomainResponse
$creadPrec :: ReadPrec AssociateCustomDomainResponse
readList :: ReadS [AssociateCustomDomainResponse]
$creadList :: ReadS [AssociateCustomDomainResponse]
readsPrec :: Int -> ReadS AssociateCustomDomainResponse
$creadsPrec :: Int -> ReadS AssociateCustomDomainResponse
Prelude.Read, Int -> AssociateCustomDomainResponse -> ShowS
[AssociateCustomDomainResponse] -> ShowS
AssociateCustomDomainResponse -> String
(Int -> AssociateCustomDomainResponse -> ShowS)
-> (AssociateCustomDomainResponse -> String)
-> ([AssociateCustomDomainResponse] -> ShowS)
-> Show AssociateCustomDomainResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateCustomDomainResponse] -> ShowS
$cshowList :: [AssociateCustomDomainResponse] -> ShowS
show :: AssociateCustomDomainResponse -> String
$cshow :: AssociateCustomDomainResponse -> String
showsPrec :: Int -> AssociateCustomDomainResponse -> ShowS
$cshowsPrec :: Int -> AssociateCustomDomainResponse -> ShowS
Prelude.Show, (forall x.
 AssociateCustomDomainResponse
 -> Rep AssociateCustomDomainResponse x)
-> (forall x.
    Rep AssociateCustomDomainResponse x
    -> AssociateCustomDomainResponse)
-> Generic AssociateCustomDomainResponse
forall x.
Rep AssociateCustomDomainResponse x
-> AssociateCustomDomainResponse
forall x.
AssociateCustomDomainResponse
-> Rep AssociateCustomDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateCustomDomainResponse x
-> AssociateCustomDomainResponse
$cfrom :: forall x.
AssociateCustomDomainResponse
-> Rep AssociateCustomDomainResponse x
Prelude.Generic)

-- |
-- Create a value of 'AssociateCustomDomainResponse' 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:
--
-- 'httpStatus', 'associateCustomDomainResponse_httpStatus' - The response's http status code.
--
-- 'dNSTarget', 'associateCustomDomainResponse_dNSTarget' - The App Runner subdomain of the App Runner service. The custom domain
-- name is mapped to this target name.
--
-- 'serviceArn', 'associateCustomDomainResponse_serviceArn' - The Amazon Resource Name (ARN) of the App Runner service with which a
-- custom domain name is associated.
--
-- 'customDomain', 'associateCustomDomainResponse_customDomain' - A description of the domain name that\'s being associated.
newAssociateCustomDomainResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'dNSTarget'
  Prelude.Text ->
  -- | 'serviceArn'
  Prelude.Text ->
  -- | 'customDomain'
  CustomDomain ->
  AssociateCustomDomainResponse
newAssociateCustomDomainResponse :: Int
-> Text -> Text -> CustomDomain -> AssociateCustomDomainResponse
newAssociateCustomDomainResponse
  Int
pHttpStatus_
  Text
pDNSTarget_
  Text
pServiceArn_
  CustomDomain
pCustomDomain_ =
    AssociateCustomDomainResponse' :: Int
-> Text -> Text -> CustomDomain -> AssociateCustomDomainResponse
AssociateCustomDomainResponse'
      { $sel:httpStatus:AssociateCustomDomainResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:dNSTarget:AssociateCustomDomainResponse' :: Text
dNSTarget = Text
pDNSTarget_,
        $sel:serviceArn:AssociateCustomDomainResponse' :: Text
serviceArn = Text
pServiceArn_,
        $sel:customDomain:AssociateCustomDomainResponse' :: CustomDomain
customDomain = CustomDomain
pCustomDomain_
      }

-- | The response's http status code.
associateCustomDomainResponse_httpStatus :: Lens.Lens' AssociateCustomDomainResponse Prelude.Int
associateCustomDomainResponse_httpStatus :: (Int -> f Int)
-> AssociateCustomDomainResponse -> f AssociateCustomDomainResponse
associateCustomDomainResponse_httpStatus = (AssociateCustomDomainResponse -> Int)
-> (AssociateCustomDomainResponse
    -> Int -> AssociateCustomDomainResponse)
-> Lens
     AssociateCustomDomainResponse AssociateCustomDomainResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateCustomDomainResponse' {Int
httpStatus :: Int
$sel:httpStatus:AssociateCustomDomainResponse' :: AssociateCustomDomainResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AssociateCustomDomainResponse
s@AssociateCustomDomainResponse' {} Int
a -> AssociateCustomDomainResponse
s {$sel:httpStatus:AssociateCustomDomainResponse' :: Int
httpStatus = Int
a} :: AssociateCustomDomainResponse)

-- | The App Runner subdomain of the App Runner service. The custom domain
-- name is mapped to this target name.
associateCustomDomainResponse_dNSTarget :: Lens.Lens' AssociateCustomDomainResponse Prelude.Text
associateCustomDomainResponse_dNSTarget :: (Text -> f Text)
-> AssociateCustomDomainResponse -> f AssociateCustomDomainResponse
associateCustomDomainResponse_dNSTarget = (AssociateCustomDomainResponse -> Text)
-> (AssociateCustomDomainResponse
    -> Text -> AssociateCustomDomainResponse)
-> Lens
     AssociateCustomDomainResponse
     AssociateCustomDomainResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateCustomDomainResponse' {Text
dNSTarget :: Text
$sel:dNSTarget:AssociateCustomDomainResponse' :: AssociateCustomDomainResponse -> Text
dNSTarget} -> Text
dNSTarget) (\s :: AssociateCustomDomainResponse
s@AssociateCustomDomainResponse' {} Text
a -> AssociateCustomDomainResponse
s {$sel:dNSTarget:AssociateCustomDomainResponse' :: Text
dNSTarget = Text
a} :: AssociateCustomDomainResponse)

-- | The Amazon Resource Name (ARN) of the App Runner service with which a
-- custom domain name is associated.
associateCustomDomainResponse_serviceArn :: Lens.Lens' AssociateCustomDomainResponse Prelude.Text
associateCustomDomainResponse_serviceArn :: (Text -> f Text)
-> AssociateCustomDomainResponse -> f AssociateCustomDomainResponse
associateCustomDomainResponse_serviceArn = (AssociateCustomDomainResponse -> Text)
-> (AssociateCustomDomainResponse
    -> Text -> AssociateCustomDomainResponse)
-> Lens
     AssociateCustomDomainResponse
     AssociateCustomDomainResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateCustomDomainResponse' {Text
serviceArn :: Text
$sel:serviceArn:AssociateCustomDomainResponse' :: AssociateCustomDomainResponse -> Text
serviceArn} -> Text
serviceArn) (\s :: AssociateCustomDomainResponse
s@AssociateCustomDomainResponse' {} Text
a -> AssociateCustomDomainResponse
s {$sel:serviceArn:AssociateCustomDomainResponse' :: Text
serviceArn = Text
a} :: AssociateCustomDomainResponse)

-- | A description of the domain name that\'s being associated.
associateCustomDomainResponse_customDomain :: Lens.Lens' AssociateCustomDomainResponse CustomDomain
associateCustomDomainResponse_customDomain :: (CustomDomain -> f CustomDomain)
-> AssociateCustomDomainResponse -> f AssociateCustomDomainResponse
associateCustomDomainResponse_customDomain = (AssociateCustomDomainResponse -> CustomDomain)
-> (AssociateCustomDomainResponse
    -> CustomDomain -> AssociateCustomDomainResponse)
-> Lens
     AssociateCustomDomainResponse
     AssociateCustomDomainResponse
     CustomDomain
     CustomDomain
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateCustomDomainResponse' {CustomDomain
customDomain :: CustomDomain
$sel:customDomain:AssociateCustomDomainResponse' :: AssociateCustomDomainResponse -> CustomDomain
customDomain} -> CustomDomain
customDomain) (\s :: AssociateCustomDomainResponse
s@AssociateCustomDomainResponse' {} CustomDomain
a -> AssociateCustomDomainResponse
s {$sel:customDomain:AssociateCustomDomainResponse' :: CustomDomain
customDomain = CustomDomain
a} :: AssociateCustomDomainResponse)

instance Prelude.NFData AssociateCustomDomainResponse