{-# 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.APIGateway.Types.DomainName
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.APIGateway.Types.DomainName where

import Amazonka.APIGateway.Types.DomainNameStatus
import Amazonka.APIGateway.Types.EndpointConfiguration
import Amazonka.APIGateway.Types.MutualTlsAuthentication
import Amazonka.APIGateway.Types.SecurityPolicy
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents a custom domain name as a user-friendly host name of an API
-- (RestApi).
--
-- When you deploy an API, API Gateway creates a default host name for the
-- API. This default API host name is of the
-- @{restapi-id}.execute-api.{region}.amazonaws.com@ format. With the
-- default host name, you can access the API\'s root resource with the URL
-- of
-- @https:\/\/{restapi-id}.execute-api.{region}.amazonaws.com\/{stage}\/@.
-- When you set up a custom domain name of @apis.example.com@ for this API,
-- you can then access the same resource using the URL of the
-- @https:\/\/apis.examples.com\/myApi@, where @myApi@ is the base path
-- mapping (BasePathMapping) of your API under the custom domain name.
--
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html Set a Custom Host Name for an API>
--
-- /See:/ 'newDomainName' smart constructor.
data DomainName = DomainName'
  { -- | The region-specific Amazon Route 53 Hosted Zone ID of the regional
    -- endpoint. For more information, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html Set up a Regional Custom Domain Name>
    -- and
    -- <https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region AWS Regions and Endpoints for API Gateway>.
    DomainName -> Maybe Text
regionalHostedZoneId :: Prelude.Maybe Prelude.Text,
    -- | The name of the certificate that will be used by edge-optimized endpoint
    -- for this domain name.
    DomainName -> Maybe Text
certificateName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the public certificate issued by ACM to validate ownership of
    -- your custom domain. Only required when configuring mutual TLS and using
    -- an ACM imported or private CA certificate ARN as the
    -- regionalCertificateArn.
    DomainName -> Maybe Text
ownershipVerificationCertificateArn :: Prelude.Maybe Prelude.Text,
    -- | The reference to an AWS-managed certificate that will be used for
    -- validating the regional domain name. AWS Certificate Manager is the only
    -- supported source.
    DomainName -> Maybe Text
regionalCertificateArn :: Prelude.Maybe Prelude.Text,
    -- | The reference to an AWS-managed certificate that will be used by
    -- edge-optimized endpoint for this domain name. AWS Certificate Manager is
    -- the only supported source.
    DomainName -> Maybe Text
certificateArn :: Prelude.Maybe Prelude.Text,
    -- | The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized
    -- endpoint. The valid value is @Z2FDTNDATAQYW2@ for all the regions. For
    -- more information, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html Set up a Regional Custom Domain Name>
    -- and
    -- <https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region AWS Regions and Endpoints for API Gateway>.
    DomainName -> Maybe Text
distributionHostedZoneId :: Prelude.Maybe Prelude.Text,
    -- | The Transport Layer Security (TLS) version + cipher suite for this
    -- DomainName. The valid values are @TLS_1_0@ and @TLS_1_2@.
    DomainName -> Maybe SecurityPolicy
securityPolicy :: Prelude.Maybe SecurityPolicy,
    -- | The custom domain name as an API host name, for example,
    -- @my-api.example.com@.
    DomainName -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
    -- | The mutual TLS authentication configuration for a custom domain name. If
    -- specified, API Gateway performs two-way authentication between the
    -- client and the server. Clients must present a trusted certificate to
    -- access your API.
    DomainName -> Maybe MutualTlsAuthentication
mutualTlsAuthentication :: Prelude.Maybe MutualTlsAuthentication,
    -- | The name of the certificate that will be used for validating the
    -- regional domain name.
    DomainName -> Maybe Text
regionalCertificateName :: Prelude.Maybe Prelude.Text,
    -- | The domain name associated with the regional endpoint for this custom
    -- domain name. You set up this association by adding a DNS record that
    -- points the custom domain name to this regional domain name. The regional
    -- domain name is returned by API Gateway when you create a regional
    -- endpoint.
    DomainName -> Maybe Text
regionalDomainName :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the certificate that was used by edge-optimized
    -- endpoint for this domain name was uploaded.
    DomainName -> Maybe POSIX
certificateUploadDate :: Prelude.Maybe Core.POSIX,
    -- | The domain name of the Amazon CloudFront distribution associated with
    -- this custom domain name for an edge-optimized endpoint. You set up this
    -- association when adding a DNS record pointing the custom domain name to
    -- this distribution name. For more information about CloudFront
    -- distributions, see the
    -- <https://aws.amazon.com/documentation/cloudfront/ Amazon CloudFront documentation>.
    DomainName -> Maybe Text
distributionDomainName :: Prelude.Maybe Prelude.Text,
    -- | An optional text message containing detailed information about status of
    -- the DomainName migration.
    DomainName -> Maybe Text
domainNameStatusMessage :: Prelude.Maybe Prelude.Text,
    -- | The endpoint configuration of this DomainName showing the endpoint types
    -- of the domain name.
    DomainName -> Maybe EndpointConfiguration
endpointConfiguration :: Prelude.Maybe EndpointConfiguration,
    -- | The status of the DomainName migration. The valid values are
    -- @AVAILABLE@, @UPDATING@, @PENDING_CERTIFICATE_REIMPORT@, and
    -- @PENDING_OWNERSHIP_VERIFICATION@. If the status is @UPDATING@, the
    -- domain cannot be modified further until the existing operation is
    -- complete. If it is @AVAILABLE@, the domain can be updated.
    DomainName -> Maybe DomainNameStatus
domainNameStatus :: Prelude.Maybe DomainNameStatus,
    -- | The collection of tags. Each tag element is associated with a given
    -- resource.
    DomainName -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (DomainName -> DomainName -> Bool
(DomainName -> DomainName -> Bool)
-> (DomainName -> DomainName -> Bool) -> Eq DomainName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainName -> DomainName -> Bool
$c/= :: DomainName -> DomainName -> Bool
== :: DomainName -> DomainName -> Bool
$c== :: DomainName -> DomainName -> Bool
Prelude.Eq, ReadPrec [DomainName]
ReadPrec DomainName
Int -> ReadS DomainName
ReadS [DomainName]
(Int -> ReadS DomainName)
-> ReadS [DomainName]
-> ReadPrec DomainName
-> ReadPrec [DomainName]
-> Read DomainName
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainName]
$creadListPrec :: ReadPrec [DomainName]
readPrec :: ReadPrec DomainName
$creadPrec :: ReadPrec DomainName
readList :: ReadS [DomainName]
$creadList :: ReadS [DomainName]
readsPrec :: Int -> ReadS DomainName
$creadsPrec :: Int -> ReadS DomainName
Prelude.Read, Int -> DomainName -> ShowS
[DomainName] -> ShowS
DomainName -> String
(Int -> DomainName -> ShowS)
-> (DomainName -> String)
-> ([DomainName] -> ShowS)
-> Show DomainName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainName] -> ShowS
$cshowList :: [DomainName] -> ShowS
show :: DomainName -> String
$cshow :: DomainName -> String
showsPrec :: Int -> DomainName -> ShowS
$cshowsPrec :: Int -> DomainName -> ShowS
Prelude.Show, (forall x. DomainName -> Rep DomainName x)
-> (forall x. Rep DomainName x -> DomainName) -> Generic DomainName
forall x. Rep DomainName x -> DomainName
forall x. DomainName -> Rep DomainName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainName x -> DomainName
$cfrom :: forall x. DomainName -> Rep DomainName x
Prelude.Generic)

-- |
-- Create a value of 'DomainName' 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:
--
-- 'regionalHostedZoneId', 'domainName_regionalHostedZoneId' - The region-specific Amazon Route 53 Hosted Zone ID of the regional
-- endpoint. For more information, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html Set up a Regional Custom Domain Name>
-- and
-- <https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region AWS Regions and Endpoints for API Gateway>.
--
-- 'certificateName', 'domainName_certificateName' - The name of the certificate that will be used by edge-optimized endpoint
-- for this domain name.
--
-- 'ownershipVerificationCertificateArn', 'domainName_ownershipVerificationCertificateArn' - The ARN of the public certificate issued by ACM to validate ownership of
-- your custom domain. Only required when configuring mutual TLS and using
-- an ACM imported or private CA certificate ARN as the
-- regionalCertificateArn.
--
-- 'regionalCertificateArn', 'domainName_regionalCertificateArn' - The reference to an AWS-managed certificate that will be used for
-- validating the regional domain name. AWS Certificate Manager is the only
-- supported source.
--
-- 'certificateArn', 'domainName_certificateArn' - The reference to an AWS-managed certificate that will be used by
-- edge-optimized endpoint for this domain name. AWS Certificate Manager is
-- the only supported source.
--
-- 'distributionHostedZoneId', 'domainName_distributionHostedZoneId' - The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized
-- endpoint. The valid value is @Z2FDTNDATAQYW2@ for all the regions. For
-- more information, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html Set up a Regional Custom Domain Name>
-- and
-- <https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region AWS Regions and Endpoints for API Gateway>.
--
-- 'securityPolicy', 'domainName_securityPolicy' - The Transport Layer Security (TLS) version + cipher suite for this
-- DomainName. The valid values are @TLS_1_0@ and @TLS_1_2@.
--
-- 'domainName', 'domainName_domainName' - The custom domain name as an API host name, for example,
-- @my-api.example.com@.
--
-- 'mutualTlsAuthentication', 'domainName_mutualTlsAuthentication' - The mutual TLS authentication configuration for a custom domain name. If
-- specified, API Gateway performs two-way authentication between the
-- client and the server. Clients must present a trusted certificate to
-- access your API.
--
-- 'regionalCertificateName', 'domainName_regionalCertificateName' - The name of the certificate that will be used for validating the
-- regional domain name.
--
-- 'regionalDomainName', 'domainName_regionalDomainName' - The domain name associated with the regional endpoint for this custom
-- domain name. You set up this association by adding a DNS record that
-- points the custom domain name to this regional domain name. The regional
-- domain name is returned by API Gateway when you create a regional
-- endpoint.
--
-- 'certificateUploadDate', 'domainName_certificateUploadDate' - The timestamp when the certificate that was used by edge-optimized
-- endpoint for this domain name was uploaded.
--
-- 'distributionDomainName', 'domainName_distributionDomainName' - The domain name of the Amazon CloudFront distribution associated with
-- this custom domain name for an edge-optimized endpoint. You set up this
-- association when adding a DNS record pointing the custom domain name to
-- this distribution name. For more information about CloudFront
-- distributions, see the
-- <https://aws.amazon.com/documentation/cloudfront/ Amazon CloudFront documentation>.
--
-- 'domainNameStatusMessage', 'domainName_domainNameStatusMessage' - An optional text message containing detailed information about status of
-- the DomainName migration.
--
-- 'endpointConfiguration', 'domainName_endpointConfiguration' - The endpoint configuration of this DomainName showing the endpoint types
-- of the domain name.
--
-- 'domainNameStatus', 'domainName_domainNameStatus' - The status of the DomainName migration. The valid values are
-- @AVAILABLE@, @UPDATING@, @PENDING_CERTIFICATE_REIMPORT@, and
-- @PENDING_OWNERSHIP_VERIFICATION@. If the status is @UPDATING@, the
-- domain cannot be modified further until the existing operation is
-- complete. If it is @AVAILABLE@, the domain can be updated.
--
-- 'tags', 'domainName_tags' - The collection of tags. Each tag element is associated with a given
-- resource.
newDomainName ::
  DomainName
newDomainName :: DomainName
newDomainName =
  DomainName' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SecurityPolicy
-> Maybe Text
-> Maybe MutualTlsAuthentication
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe EndpointConfiguration
-> Maybe DomainNameStatus
-> Maybe (HashMap Text Text)
-> DomainName
DomainName'
    { $sel:regionalHostedZoneId:DomainName' :: Maybe Text
regionalHostedZoneId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateName:DomainName' :: Maybe Text
certificateName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ownershipVerificationCertificateArn:DomainName' :: Maybe Text
ownershipVerificationCertificateArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:regionalCertificateArn:DomainName' :: Maybe Text
regionalCertificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateArn:DomainName' :: Maybe Text
certificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:distributionHostedZoneId:DomainName' :: Maybe Text
distributionHostedZoneId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:securityPolicy:DomainName' :: Maybe SecurityPolicy
securityPolicy = Maybe SecurityPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:DomainName' :: Maybe Text
domainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mutualTlsAuthentication:DomainName' :: Maybe MutualTlsAuthentication
mutualTlsAuthentication = Maybe MutualTlsAuthentication
forall a. Maybe a
Prelude.Nothing,
      $sel:regionalCertificateName:DomainName' :: Maybe Text
regionalCertificateName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:regionalDomainName:DomainName' :: Maybe Text
regionalDomainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateUploadDate:DomainName' :: Maybe POSIX
certificateUploadDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:distributionDomainName:DomainName' :: Maybe Text
distributionDomainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domainNameStatusMessage:DomainName' :: Maybe Text
domainNameStatusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointConfiguration:DomainName' :: Maybe EndpointConfiguration
endpointConfiguration = Maybe EndpointConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:domainNameStatus:DomainName' :: Maybe DomainNameStatus
domainNameStatus = Maybe DomainNameStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DomainName' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | The region-specific Amazon Route 53 Hosted Zone ID of the regional
-- endpoint. For more information, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html Set up a Regional Custom Domain Name>
-- and
-- <https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region AWS Regions and Endpoints for API Gateway>.
domainName_regionalHostedZoneId :: Lens.Lens' DomainName (Prelude.Maybe Prelude.Text)
domainName_regionalHostedZoneId :: (Maybe Text -> f (Maybe Text)) -> DomainName -> f DomainName
domainName_regionalHostedZoneId = (DomainName -> Maybe Text)
-> (DomainName -> Maybe Text -> DomainName)
-> Lens DomainName DomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe Text
regionalHostedZoneId :: Maybe Text
$sel:regionalHostedZoneId:DomainName' :: DomainName -> Maybe Text
regionalHostedZoneId} -> Maybe Text
regionalHostedZoneId) (\s :: DomainName
s@DomainName' {} Maybe Text
a -> DomainName
s {$sel:regionalHostedZoneId:DomainName' :: Maybe Text
regionalHostedZoneId = Maybe Text
a} :: DomainName)

-- | The name of the certificate that will be used by edge-optimized endpoint
-- for this domain name.
domainName_certificateName :: Lens.Lens' DomainName (Prelude.Maybe Prelude.Text)
domainName_certificateName :: (Maybe Text -> f (Maybe Text)) -> DomainName -> f DomainName
domainName_certificateName = (DomainName -> Maybe Text)
-> (DomainName -> Maybe Text -> DomainName)
-> Lens DomainName DomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe Text
certificateName :: Maybe Text
$sel:certificateName:DomainName' :: DomainName -> Maybe Text
certificateName} -> Maybe Text
certificateName) (\s :: DomainName
s@DomainName' {} Maybe Text
a -> DomainName
s {$sel:certificateName:DomainName' :: Maybe Text
certificateName = Maybe Text
a} :: DomainName)

-- | The ARN of the public certificate issued by ACM to validate ownership of
-- your custom domain. Only required when configuring mutual TLS and using
-- an ACM imported or private CA certificate ARN as the
-- regionalCertificateArn.
domainName_ownershipVerificationCertificateArn :: Lens.Lens' DomainName (Prelude.Maybe Prelude.Text)
domainName_ownershipVerificationCertificateArn :: (Maybe Text -> f (Maybe Text)) -> DomainName -> f DomainName
domainName_ownershipVerificationCertificateArn = (DomainName -> Maybe Text)
-> (DomainName -> Maybe Text -> DomainName)
-> Lens DomainName DomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe Text
ownershipVerificationCertificateArn :: Maybe Text
$sel:ownershipVerificationCertificateArn:DomainName' :: DomainName -> Maybe Text
ownershipVerificationCertificateArn} -> Maybe Text
ownershipVerificationCertificateArn) (\s :: DomainName
s@DomainName' {} Maybe Text
a -> DomainName
s {$sel:ownershipVerificationCertificateArn:DomainName' :: Maybe Text
ownershipVerificationCertificateArn = Maybe Text
a} :: DomainName)

-- | The reference to an AWS-managed certificate that will be used for
-- validating the regional domain name. AWS Certificate Manager is the only
-- supported source.
domainName_regionalCertificateArn :: Lens.Lens' DomainName (Prelude.Maybe Prelude.Text)
domainName_regionalCertificateArn :: (Maybe Text -> f (Maybe Text)) -> DomainName -> f DomainName
domainName_regionalCertificateArn = (DomainName -> Maybe Text)
-> (DomainName -> Maybe Text -> DomainName)
-> Lens DomainName DomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe Text
regionalCertificateArn :: Maybe Text
$sel:regionalCertificateArn:DomainName' :: DomainName -> Maybe Text
regionalCertificateArn} -> Maybe Text
regionalCertificateArn) (\s :: DomainName
s@DomainName' {} Maybe Text
a -> DomainName
s {$sel:regionalCertificateArn:DomainName' :: Maybe Text
regionalCertificateArn = Maybe Text
a} :: DomainName)

-- | The reference to an AWS-managed certificate that will be used by
-- edge-optimized endpoint for this domain name. AWS Certificate Manager is
-- the only supported source.
domainName_certificateArn :: Lens.Lens' DomainName (Prelude.Maybe Prelude.Text)
domainName_certificateArn :: (Maybe Text -> f (Maybe Text)) -> DomainName -> f DomainName
domainName_certificateArn = (DomainName -> Maybe Text)
-> (DomainName -> Maybe Text -> DomainName)
-> Lens DomainName DomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe Text
certificateArn :: Maybe Text
$sel:certificateArn:DomainName' :: DomainName -> Maybe Text
certificateArn} -> Maybe Text
certificateArn) (\s :: DomainName
s@DomainName' {} Maybe Text
a -> DomainName
s {$sel:certificateArn:DomainName' :: Maybe Text
certificateArn = Maybe Text
a} :: DomainName)

-- | The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized
-- endpoint. The valid value is @Z2FDTNDATAQYW2@ for all the regions. For
-- more information, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html Set up a Regional Custom Domain Name>
-- and
-- <https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region AWS Regions and Endpoints for API Gateway>.
domainName_distributionHostedZoneId :: Lens.Lens' DomainName (Prelude.Maybe Prelude.Text)
domainName_distributionHostedZoneId :: (Maybe Text -> f (Maybe Text)) -> DomainName -> f DomainName
domainName_distributionHostedZoneId = (DomainName -> Maybe Text)
-> (DomainName -> Maybe Text -> DomainName)
-> Lens DomainName DomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe Text
distributionHostedZoneId :: Maybe Text
$sel:distributionHostedZoneId:DomainName' :: DomainName -> Maybe Text
distributionHostedZoneId} -> Maybe Text
distributionHostedZoneId) (\s :: DomainName
s@DomainName' {} Maybe Text
a -> DomainName
s {$sel:distributionHostedZoneId:DomainName' :: Maybe Text
distributionHostedZoneId = Maybe Text
a} :: DomainName)

-- | The Transport Layer Security (TLS) version + cipher suite for this
-- DomainName. The valid values are @TLS_1_0@ and @TLS_1_2@.
domainName_securityPolicy :: Lens.Lens' DomainName (Prelude.Maybe SecurityPolicy)
domainName_securityPolicy :: (Maybe SecurityPolicy -> f (Maybe SecurityPolicy))
-> DomainName -> f DomainName
domainName_securityPolicy = (DomainName -> Maybe SecurityPolicy)
-> (DomainName -> Maybe SecurityPolicy -> DomainName)
-> Lens
     DomainName DomainName (Maybe SecurityPolicy) (Maybe SecurityPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe SecurityPolicy
securityPolicy :: Maybe SecurityPolicy
$sel:securityPolicy:DomainName' :: DomainName -> Maybe SecurityPolicy
securityPolicy} -> Maybe SecurityPolicy
securityPolicy) (\s :: DomainName
s@DomainName' {} Maybe SecurityPolicy
a -> DomainName
s {$sel:securityPolicy:DomainName' :: Maybe SecurityPolicy
securityPolicy = Maybe SecurityPolicy
a} :: DomainName)

-- | The custom domain name as an API host name, for example,
-- @my-api.example.com@.
domainName_domainName :: Lens.Lens' DomainName (Prelude.Maybe Prelude.Text)
domainName_domainName :: (Maybe Text -> f (Maybe Text)) -> DomainName -> f DomainName
domainName_domainName = (DomainName -> Maybe Text)
-> (DomainName -> Maybe Text -> DomainName)
-> Lens DomainName DomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe Text
domainName :: Maybe Text
$sel:domainName:DomainName' :: DomainName -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: DomainName
s@DomainName' {} Maybe Text
a -> DomainName
s {$sel:domainName:DomainName' :: Maybe Text
domainName = Maybe Text
a} :: DomainName)

-- | The mutual TLS authentication configuration for a custom domain name. If
-- specified, API Gateway performs two-way authentication between the
-- client and the server. Clients must present a trusted certificate to
-- access your API.
domainName_mutualTlsAuthentication :: Lens.Lens' DomainName (Prelude.Maybe MutualTlsAuthentication)
domainName_mutualTlsAuthentication :: (Maybe MutualTlsAuthentication
 -> f (Maybe MutualTlsAuthentication))
-> DomainName -> f DomainName
domainName_mutualTlsAuthentication = (DomainName -> Maybe MutualTlsAuthentication)
-> (DomainName -> Maybe MutualTlsAuthentication -> DomainName)
-> Lens
     DomainName
     DomainName
     (Maybe MutualTlsAuthentication)
     (Maybe MutualTlsAuthentication)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe MutualTlsAuthentication
mutualTlsAuthentication :: Maybe MutualTlsAuthentication
$sel:mutualTlsAuthentication:DomainName' :: DomainName -> Maybe MutualTlsAuthentication
mutualTlsAuthentication} -> Maybe MutualTlsAuthentication
mutualTlsAuthentication) (\s :: DomainName
s@DomainName' {} Maybe MutualTlsAuthentication
a -> DomainName
s {$sel:mutualTlsAuthentication:DomainName' :: Maybe MutualTlsAuthentication
mutualTlsAuthentication = Maybe MutualTlsAuthentication
a} :: DomainName)

-- | The name of the certificate that will be used for validating the
-- regional domain name.
domainName_regionalCertificateName :: Lens.Lens' DomainName (Prelude.Maybe Prelude.Text)
domainName_regionalCertificateName :: (Maybe Text -> f (Maybe Text)) -> DomainName -> f DomainName
domainName_regionalCertificateName = (DomainName -> Maybe Text)
-> (DomainName -> Maybe Text -> DomainName)
-> Lens DomainName DomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe Text
regionalCertificateName :: Maybe Text
$sel:regionalCertificateName:DomainName' :: DomainName -> Maybe Text
regionalCertificateName} -> Maybe Text
regionalCertificateName) (\s :: DomainName
s@DomainName' {} Maybe Text
a -> DomainName
s {$sel:regionalCertificateName:DomainName' :: Maybe Text
regionalCertificateName = Maybe Text
a} :: DomainName)

-- | The domain name associated with the regional endpoint for this custom
-- domain name. You set up this association by adding a DNS record that
-- points the custom domain name to this regional domain name. The regional
-- domain name is returned by API Gateway when you create a regional
-- endpoint.
domainName_regionalDomainName :: Lens.Lens' DomainName (Prelude.Maybe Prelude.Text)
domainName_regionalDomainName :: (Maybe Text -> f (Maybe Text)) -> DomainName -> f DomainName
domainName_regionalDomainName = (DomainName -> Maybe Text)
-> (DomainName -> Maybe Text -> DomainName)
-> Lens DomainName DomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe Text
regionalDomainName :: Maybe Text
$sel:regionalDomainName:DomainName' :: DomainName -> Maybe Text
regionalDomainName} -> Maybe Text
regionalDomainName) (\s :: DomainName
s@DomainName' {} Maybe Text
a -> DomainName
s {$sel:regionalDomainName:DomainName' :: Maybe Text
regionalDomainName = Maybe Text
a} :: DomainName)

-- | The timestamp when the certificate that was used by edge-optimized
-- endpoint for this domain name was uploaded.
domainName_certificateUploadDate :: Lens.Lens' DomainName (Prelude.Maybe Prelude.UTCTime)
domainName_certificateUploadDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> DomainName -> f DomainName
domainName_certificateUploadDate = (DomainName -> Maybe POSIX)
-> (DomainName -> Maybe POSIX -> DomainName)
-> Lens DomainName DomainName (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe POSIX
certificateUploadDate :: Maybe POSIX
$sel:certificateUploadDate:DomainName' :: DomainName -> Maybe POSIX
certificateUploadDate} -> Maybe POSIX
certificateUploadDate) (\s :: DomainName
s@DomainName' {} Maybe POSIX
a -> DomainName
s {$sel:certificateUploadDate:DomainName' :: Maybe POSIX
certificateUploadDate = Maybe POSIX
a} :: DomainName) ((Maybe POSIX -> f (Maybe POSIX)) -> DomainName -> f DomainName)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DomainName
-> f DomainName
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The domain name of the Amazon CloudFront distribution associated with
-- this custom domain name for an edge-optimized endpoint. You set up this
-- association when adding a DNS record pointing the custom domain name to
-- this distribution name. For more information about CloudFront
-- distributions, see the
-- <https://aws.amazon.com/documentation/cloudfront/ Amazon CloudFront documentation>.
domainName_distributionDomainName :: Lens.Lens' DomainName (Prelude.Maybe Prelude.Text)
domainName_distributionDomainName :: (Maybe Text -> f (Maybe Text)) -> DomainName -> f DomainName
domainName_distributionDomainName = (DomainName -> Maybe Text)
-> (DomainName -> Maybe Text -> DomainName)
-> Lens DomainName DomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe Text
distributionDomainName :: Maybe Text
$sel:distributionDomainName:DomainName' :: DomainName -> Maybe Text
distributionDomainName} -> Maybe Text
distributionDomainName) (\s :: DomainName
s@DomainName' {} Maybe Text
a -> DomainName
s {$sel:distributionDomainName:DomainName' :: Maybe Text
distributionDomainName = Maybe Text
a} :: DomainName)

-- | An optional text message containing detailed information about status of
-- the DomainName migration.
domainName_domainNameStatusMessage :: Lens.Lens' DomainName (Prelude.Maybe Prelude.Text)
domainName_domainNameStatusMessage :: (Maybe Text -> f (Maybe Text)) -> DomainName -> f DomainName
domainName_domainNameStatusMessage = (DomainName -> Maybe Text)
-> (DomainName -> Maybe Text -> DomainName)
-> Lens DomainName DomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe Text
domainNameStatusMessage :: Maybe Text
$sel:domainNameStatusMessage:DomainName' :: DomainName -> Maybe Text
domainNameStatusMessage} -> Maybe Text
domainNameStatusMessage) (\s :: DomainName
s@DomainName' {} Maybe Text
a -> DomainName
s {$sel:domainNameStatusMessage:DomainName' :: Maybe Text
domainNameStatusMessage = Maybe Text
a} :: DomainName)

-- | The endpoint configuration of this DomainName showing the endpoint types
-- of the domain name.
domainName_endpointConfiguration :: Lens.Lens' DomainName (Prelude.Maybe EndpointConfiguration)
domainName_endpointConfiguration :: (Maybe EndpointConfiguration -> f (Maybe EndpointConfiguration))
-> DomainName -> f DomainName
domainName_endpointConfiguration = (DomainName -> Maybe EndpointConfiguration)
-> (DomainName -> Maybe EndpointConfiguration -> DomainName)
-> Lens
     DomainName
     DomainName
     (Maybe EndpointConfiguration)
     (Maybe EndpointConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe EndpointConfiguration
endpointConfiguration :: Maybe EndpointConfiguration
$sel:endpointConfiguration:DomainName' :: DomainName -> Maybe EndpointConfiguration
endpointConfiguration} -> Maybe EndpointConfiguration
endpointConfiguration) (\s :: DomainName
s@DomainName' {} Maybe EndpointConfiguration
a -> DomainName
s {$sel:endpointConfiguration:DomainName' :: Maybe EndpointConfiguration
endpointConfiguration = Maybe EndpointConfiguration
a} :: DomainName)

-- | The status of the DomainName migration. The valid values are
-- @AVAILABLE@, @UPDATING@, @PENDING_CERTIFICATE_REIMPORT@, and
-- @PENDING_OWNERSHIP_VERIFICATION@. If the status is @UPDATING@, the
-- domain cannot be modified further until the existing operation is
-- complete. If it is @AVAILABLE@, the domain can be updated.
domainName_domainNameStatus :: Lens.Lens' DomainName (Prelude.Maybe DomainNameStatus)
domainName_domainNameStatus :: (Maybe DomainNameStatus -> f (Maybe DomainNameStatus))
-> DomainName -> f DomainName
domainName_domainNameStatus = (DomainName -> Maybe DomainNameStatus)
-> (DomainName -> Maybe DomainNameStatus -> DomainName)
-> Lens
     DomainName
     DomainName
     (Maybe DomainNameStatus)
     (Maybe DomainNameStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe DomainNameStatus
domainNameStatus :: Maybe DomainNameStatus
$sel:domainNameStatus:DomainName' :: DomainName -> Maybe DomainNameStatus
domainNameStatus} -> Maybe DomainNameStatus
domainNameStatus) (\s :: DomainName
s@DomainName' {} Maybe DomainNameStatus
a -> DomainName
s {$sel:domainNameStatus:DomainName' :: Maybe DomainNameStatus
domainNameStatus = Maybe DomainNameStatus
a} :: DomainName)

-- | The collection of tags. Each tag element is associated with a given
-- resource.
domainName_tags :: Lens.Lens' DomainName (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
domainName_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DomainName -> f DomainName
domainName_tags = (DomainName -> Maybe (HashMap Text Text))
-> (DomainName -> Maybe (HashMap Text Text) -> DomainName)
-> Lens
     DomainName
     DomainName
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainName' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DomainName' :: DomainName -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DomainName
s@DomainName' {} Maybe (HashMap Text Text)
a -> DomainName
s {$sel:tags:DomainName' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DomainName) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DomainName -> f DomainName)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DomainName
-> f DomainName
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON DomainName where
  parseJSON :: Value -> Parser DomainName
parseJSON =
    String
-> (Object -> Parser DomainName) -> Value -> Parser DomainName
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DomainName"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SecurityPolicy
-> Maybe Text
-> Maybe MutualTlsAuthentication
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe EndpointConfiguration
-> Maybe DomainNameStatus
-> Maybe (HashMap Text Text)
-> DomainName
DomainName'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe SecurityPolicy
 -> Maybe Text
 -> Maybe MutualTlsAuthentication
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe EndpointConfiguration
 -> Maybe DomainNameStatus
 -> Maybe (HashMap Text Text)
 -> DomainName)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SecurityPolicy
      -> Maybe Text
      -> Maybe MutualTlsAuthentication
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"regionalHostedZoneId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SecurityPolicy
   -> Maybe Text
   -> Maybe MutualTlsAuthentication
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SecurityPolicy
      -> Maybe Text
      -> Maybe MutualTlsAuthentication
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"certificateName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SecurityPolicy
   -> Maybe Text
   -> Maybe MutualTlsAuthentication
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe SecurityPolicy
      -> Maybe Text
      -> Maybe MutualTlsAuthentication
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ownershipVerificationCertificateArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe SecurityPolicy
   -> Maybe Text
   -> Maybe MutualTlsAuthentication
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SecurityPolicy
      -> Maybe Text
      -> Maybe MutualTlsAuthentication
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"regionalCertificateArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SecurityPolicy
   -> Maybe Text
   -> Maybe MutualTlsAuthentication
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SecurityPolicy
      -> Maybe Text
      -> Maybe MutualTlsAuthentication
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"certificateArn")
            Parser
  (Maybe Text
   -> Maybe SecurityPolicy
   -> Maybe Text
   -> Maybe MutualTlsAuthentication
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe Text)
-> Parser
     (Maybe SecurityPolicy
      -> Maybe Text
      -> Maybe MutualTlsAuthentication
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"distributionHostedZoneId")
            Parser
  (Maybe SecurityPolicy
   -> Maybe Text
   -> Maybe MutualTlsAuthentication
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe SecurityPolicy)
-> Parser
     (Maybe Text
      -> Maybe MutualTlsAuthentication
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SecurityPolicy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"securityPolicy")
            Parser
  (Maybe Text
   -> Maybe MutualTlsAuthentication
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe Text)
-> Parser
     (Maybe MutualTlsAuthentication
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"domainName")
            Parser
  (Maybe MutualTlsAuthentication
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe MutualTlsAuthentication)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MutualTlsAuthentication)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mutualTlsAuthentication")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"regionalCertificateName")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"regionalDomainName")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"certificateUploadDate")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"distributionDomainName")
            Parser
  (Maybe Text
   -> Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe Text)
-> Parser
     (Maybe EndpointConfiguration
      -> Maybe DomainNameStatus
      -> Maybe (HashMap Text Text)
      -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"domainNameStatusMessage")
            Parser
  (Maybe EndpointConfiguration
   -> Maybe DomainNameStatus
   -> Maybe (HashMap Text Text)
   -> DomainName)
-> Parser (Maybe EndpointConfiguration)
-> Parser
     (Maybe DomainNameStatus -> Maybe (HashMap Text Text) -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EndpointConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"endpointConfiguration")
            Parser
  (Maybe DomainNameStatus -> Maybe (HashMap Text Text) -> DomainName)
-> Parser (Maybe DomainNameStatus)
-> Parser (Maybe (HashMap Text Text) -> DomainName)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DomainNameStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"domainNameStatus")
            Parser (Maybe (HashMap Text Text) -> DomainName)
-> Parser (Maybe (HashMap Text Text)) -> Parser DomainName
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable DomainName

instance Prelude.NFData DomainName