{-# 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.Route53Resolver.Types.Filter
-- 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.Route53Resolver.Types.Filter where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | For Resolver list operations
-- (<https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverEndpoints.html ListResolverEndpoints>,
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html ListResolverRules>,
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRuleAssociations.html ListResolverRuleAssociations>,
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverQueryLogConfigs.html ListResolverQueryLogConfigs>,
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverQueryLogConfigAssociations.html ListResolverQueryLogConfigAssociations>),
-- and
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverDnssecConfigs.html ListResolverDnssecConfigs>),
-- an optional specification to return a subset of objects.
--
-- To filter objects, such as Resolver endpoints or Resolver rules, you
-- specify @Name@ and @Values@. For example, to list only inbound Resolver
-- endpoints, specify @Direction@ for @Name@ and specify @INBOUND@ for
-- @Values@.
--
-- /See:/ 'newFilter' smart constructor.
data Filter = Filter'
  { -- | When you\'re using a @List@ operation and you want the operation to
    -- return a subset of objects, such as Resolver endpoints or Resolver
    -- rules, the value of the parameter that you want to use to filter
    -- objects. For example, to list only inbound Resolver endpoints, specify
    -- @Direction@ for @Name@ and specify @INBOUND@ for @Values@.
    Filter -> Maybe [Text]
values :: Prelude.Maybe [Prelude.Text],
    -- | The name of the parameter that you want to use to filter objects.
    --
    -- The valid values for @Name@ depend on the action that you\'re including
    -- the filter in,
    -- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverEndpoints.html ListResolverEndpoints>,
    -- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html ListResolverRules>,
    -- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRuleAssociations.html ListResolverRuleAssociations>,
    -- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverQueryLogConfigs.html ListResolverQueryLogConfigs>,
    -- or
    -- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverQueryLogConfigAssociations.html ListResolverQueryLogConfigAssociations>.
    --
    -- In early versions of Resolver, values for @Name@ were listed as
    -- uppercase, with underscore (_) delimiters. For example,
    -- @CreatorRequestId@ was originally listed as @CREATOR_REQUEST_ID@.
    -- Uppercase values for @Name@ are still supported.
    --
    -- __ListResolverEndpoints__
    --
    -- Valid values for @Name@ include the following:
    --
    -- -   @CreatorRequestId@: The value that you specified when you created
    --     the Resolver endpoint.
    --
    -- -   @Direction@: Whether you want to return inbound or outbound Resolver
    --     endpoints. If you specify @DIRECTION@ for @Name@, specify @INBOUND@
    --     or @OUTBOUND@ for @Values@.
    --
    -- -   @HostVPCId@: The ID of the VPC that inbound DNS queries pass through
    --     on the way from your network to your VPCs in a region, or the VPC
    --     that outbound queries pass through on the way from your VPCs to your
    --     network. In a
    --     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverEndpoint.html CreateResolverEndpoint>
    --     request, @SubnetId@ indirectly identifies the VPC. In a
    --     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html GetResolverEndpoint>
    --     request, the VPC ID for a Resolver endpoint is returned in the
    --     @HostVPCId@ element.
    --
    -- -   @IpAddressCount@: The number of IP addresses that you have
    --     associated with the Resolver endpoint.
    --
    -- -   @Name@: The name of the Resolver endpoint.
    --
    -- -   @SecurityGroupIds@: The IDs of the VPC security groups that you
    --     specified when you created the Resolver endpoint.
    --
    -- -   @Status@: The status of the Resolver endpoint. If you specify
    --     @Status@ for @Name@, specify one of the following status codes for
    --     @Values@: @CREATING@, @OPERATIONAL@, @UPDATING@, @AUTO_RECOVERING@,
    --     @ACTION_NEEDED@, or @DELETING@. For more information, see @Status@
    --     in
    --     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ResolverEndpoint.html ResolverEndpoint>.
    --
    -- __ListResolverRules__
    --
    -- Valid values for @Name@ include the following:
    --
    -- -   @CreatorRequestId@: The value that you specified when you created
    --     the Resolver rule.
    --
    -- -   @DomainName@: The domain name for which Resolver is forwarding DNS
    --     queries to your network. In the value that you specify for @Values@,
    --     include a trailing dot (.) after the domain name. For example, if
    --     the domain name is example.com, specify the following value. Note
    --     the \".\" after @com@:
    --
    --     @example.com.@
    --
    -- -   @Name@: The name of the Resolver rule.
    --
    -- -   @ResolverEndpointId@: The ID of the Resolver endpoint that the
    --     Resolver rule is associated with.
    --
    --     You can filter on the Resolver endpoint only for rules that have a
    --     value of @FORWARD@ for @RuleType@.
    --
    -- -   @Status@: The status of the Resolver rule. If you specify @Status@
    --     for @Name@, specify one of the following status codes for @Values@:
    --     @COMPLETE@, @DELETING@, @UPDATING@, or @FAILED@.
    --
    -- -   @Type@: The type of the Resolver rule. If you specify @TYPE@ for
    --     @Name@, specify @FORWARD@ or @SYSTEM@ for @Values@.
    --
    -- __ListResolverRuleAssociations__
    --
    -- Valid values for @Name@ include the following:
    --
    -- -   @Name@: The name of the Resolver rule association.
    --
    -- -   @ResolverRuleId@: The ID of the Resolver rule that is associated
    --     with one or more VPCs.
    --
    -- -   @Status@: The status of the Resolver rule association. If you
    --     specify @Status@ for @Name@, specify one of the following status
    --     codes for @Values@: @CREATING@, @COMPLETE@, @DELETING@, or @FAILED@.
    --
    -- -   @VPCId@: The ID of the VPC that the Resolver rule is associated
    --     with.
    --
    -- __ListResolverQueryLogConfigs__
    --
    -- Valid values for @Name@ include the following:
    --
    -- -   @Arn@: The ARN for the query logging configuration.
    --
    -- -   @AssociationCount@: The number of VPCs that are associated with the
    --     query logging configuration.
    --
    -- -   @CreationTime@: The date and time that the query logging
    --     configuration was created, in Unix time format and Coordinated
    --     Universal Time (UTC).
    --
    -- -   @CreatorRequestId@: A unique string that identifies the request that
    --     created the query logging configuration.
    --
    -- -   @Destination@: The Amazon Web Services service that you want to
    --     forward query logs to. Valid values include the following:
    --
    --     -   @S3@
    --
    --     -   @CloudWatchLogs@
    --
    --     -   @KinesisFirehose@
    --
    -- -   @DestinationArn@: The ARN of the location that Resolver is sending
    --     query logs to. This value can be the ARN for an S3 bucket, a
    --     CloudWatch Logs log group, or a Kinesis Data Firehose delivery
    --     stream.
    --
    -- -   @Id@: The ID of the query logging configuration
    --
    -- -   @Name@: The name of the query logging configuration
    --
    -- -   @OwnerId@: The Amazon Web Services account ID for the account that
    --     created the query logging configuration.
    --
    -- -   @ShareStatus@: An indication of whether the query logging
    --     configuration is shared with other Amazon Web Services accounts, or
    --     was shared with the current account by another Amazon Web Services
    --     account. Valid values include: @NOT_SHARED@, @SHARED_WITH_ME@, or
    --     @SHARED_BY_ME@.
    --
    -- -   @Status@: The status of the query logging configuration. If you
    --     specify @Status@ for @Name@, specify the applicable status code for
    --     @Values@: @CREATING@, @CREATED@, @DELETING@, or @FAILED@. For more
    --     information, see
    --     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ResolverQueryLogConfig.html#Route53Resolver-Type-route53resolver_ResolverQueryLogConfig-Status Status>.
    --
    -- __ListResolverQueryLogConfigAssociations__
    --
    -- Valid values for @Name@ include the following:
    --
    -- -   @CreationTime@: The date and time that the VPC was associated with
    --     the query logging configuration, in Unix time format and Coordinated
    --     Universal Time (UTC).
    --
    -- -   @Error@: If the value of @Status@ is @FAILED@, specify the cause:
    --     @DESTINATION_NOT_FOUND@ or @ACCESS_DENIED@.
    --
    -- -   @Id@: The ID of the query logging association.
    --
    -- -   @ResolverQueryLogConfigId@: The ID of the query logging
    --     configuration that a VPC is associated with.
    --
    -- -   @ResourceId@: The ID of the Amazon VPC that is associated with the
    --     query logging configuration.
    --
    -- -   @Status@: The status of the query logging association. If you
    --     specify @Status@ for @Name@, specify the applicable status code for
    --     @Values@: @CREATING@, @CREATED@, @DELETING@, or @FAILED@. For more
    --     information, see
    --     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ResolverQueryLogConfigAssociation.html#Route53Resolver-Type-route53resolver_ResolverQueryLogConfigAssociation-Status Status>.
    Filter -> Maybe Text
name :: Prelude.Maybe Prelude.Text
  }
  deriving (Filter -> Filter -> Bool
(Filter -> Filter -> Bool)
-> (Filter -> Filter -> Bool) -> Eq Filter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Filter -> Filter -> Bool
$c/= :: Filter -> Filter -> Bool
== :: Filter -> Filter -> Bool
$c== :: Filter -> Filter -> Bool
Prelude.Eq, ReadPrec [Filter]
ReadPrec Filter
Int -> ReadS Filter
ReadS [Filter]
(Int -> ReadS Filter)
-> ReadS [Filter]
-> ReadPrec Filter
-> ReadPrec [Filter]
-> Read Filter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Filter]
$creadListPrec :: ReadPrec [Filter]
readPrec :: ReadPrec Filter
$creadPrec :: ReadPrec Filter
readList :: ReadS [Filter]
$creadList :: ReadS [Filter]
readsPrec :: Int -> ReadS Filter
$creadsPrec :: Int -> ReadS Filter
Prelude.Read, Int -> Filter -> ShowS
[Filter] -> ShowS
Filter -> String
(Int -> Filter -> ShowS)
-> (Filter -> String) -> ([Filter] -> ShowS) -> Show Filter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Filter] -> ShowS
$cshowList :: [Filter] -> ShowS
show :: Filter -> String
$cshow :: Filter -> String
showsPrec :: Int -> Filter -> ShowS
$cshowsPrec :: Int -> Filter -> ShowS
Prelude.Show, (forall x. Filter -> Rep Filter x)
-> (forall x. Rep Filter x -> Filter) -> Generic Filter
forall x. Rep Filter x -> Filter
forall x. Filter -> Rep Filter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Filter x -> Filter
$cfrom :: forall x. Filter -> Rep Filter x
Prelude.Generic)

-- |
-- Create a value of 'Filter' 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:
--
-- 'values', 'filter_values' - When you\'re using a @List@ operation and you want the operation to
-- return a subset of objects, such as Resolver endpoints or Resolver
-- rules, the value of the parameter that you want to use to filter
-- objects. For example, to list only inbound Resolver endpoints, specify
-- @Direction@ for @Name@ and specify @INBOUND@ for @Values@.
--
-- 'name', 'filter_name' - The name of the parameter that you want to use to filter objects.
--
-- The valid values for @Name@ depend on the action that you\'re including
-- the filter in,
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverEndpoints.html ListResolverEndpoints>,
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html ListResolverRules>,
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRuleAssociations.html ListResolverRuleAssociations>,
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverQueryLogConfigs.html ListResolverQueryLogConfigs>,
-- or
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverQueryLogConfigAssociations.html ListResolverQueryLogConfigAssociations>.
--
-- In early versions of Resolver, values for @Name@ were listed as
-- uppercase, with underscore (_) delimiters. For example,
-- @CreatorRequestId@ was originally listed as @CREATOR_REQUEST_ID@.
-- Uppercase values for @Name@ are still supported.
--
-- __ListResolverEndpoints__
--
-- Valid values for @Name@ include the following:
--
-- -   @CreatorRequestId@: The value that you specified when you created
--     the Resolver endpoint.
--
-- -   @Direction@: Whether you want to return inbound or outbound Resolver
--     endpoints. If you specify @DIRECTION@ for @Name@, specify @INBOUND@
--     or @OUTBOUND@ for @Values@.
--
-- -   @HostVPCId@: The ID of the VPC that inbound DNS queries pass through
--     on the way from your network to your VPCs in a region, or the VPC
--     that outbound queries pass through on the way from your VPCs to your
--     network. In a
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverEndpoint.html CreateResolverEndpoint>
--     request, @SubnetId@ indirectly identifies the VPC. In a
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html GetResolverEndpoint>
--     request, the VPC ID for a Resolver endpoint is returned in the
--     @HostVPCId@ element.
--
-- -   @IpAddressCount@: The number of IP addresses that you have
--     associated with the Resolver endpoint.
--
-- -   @Name@: The name of the Resolver endpoint.
--
-- -   @SecurityGroupIds@: The IDs of the VPC security groups that you
--     specified when you created the Resolver endpoint.
--
-- -   @Status@: The status of the Resolver endpoint. If you specify
--     @Status@ for @Name@, specify one of the following status codes for
--     @Values@: @CREATING@, @OPERATIONAL@, @UPDATING@, @AUTO_RECOVERING@,
--     @ACTION_NEEDED@, or @DELETING@. For more information, see @Status@
--     in
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ResolverEndpoint.html ResolverEndpoint>.
--
-- __ListResolverRules__
--
-- Valid values for @Name@ include the following:
--
-- -   @CreatorRequestId@: The value that you specified when you created
--     the Resolver rule.
--
-- -   @DomainName@: The domain name for which Resolver is forwarding DNS
--     queries to your network. In the value that you specify for @Values@,
--     include a trailing dot (.) after the domain name. For example, if
--     the domain name is example.com, specify the following value. Note
--     the \".\" after @com@:
--
--     @example.com.@
--
-- -   @Name@: The name of the Resolver rule.
--
-- -   @ResolverEndpointId@: The ID of the Resolver endpoint that the
--     Resolver rule is associated with.
--
--     You can filter on the Resolver endpoint only for rules that have a
--     value of @FORWARD@ for @RuleType@.
--
-- -   @Status@: The status of the Resolver rule. If you specify @Status@
--     for @Name@, specify one of the following status codes for @Values@:
--     @COMPLETE@, @DELETING@, @UPDATING@, or @FAILED@.
--
-- -   @Type@: The type of the Resolver rule. If you specify @TYPE@ for
--     @Name@, specify @FORWARD@ or @SYSTEM@ for @Values@.
--
-- __ListResolverRuleAssociations__
--
-- Valid values for @Name@ include the following:
--
-- -   @Name@: The name of the Resolver rule association.
--
-- -   @ResolverRuleId@: The ID of the Resolver rule that is associated
--     with one or more VPCs.
--
-- -   @Status@: The status of the Resolver rule association. If you
--     specify @Status@ for @Name@, specify one of the following status
--     codes for @Values@: @CREATING@, @COMPLETE@, @DELETING@, or @FAILED@.
--
-- -   @VPCId@: The ID of the VPC that the Resolver rule is associated
--     with.
--
-- __ListResolverQueryLogConfigs__
--
-- Valid values for @Name@ include the following:
--
-- -   @Arn@: The ARN for the query logging configuration.
--
-- -   @AssociationCount@: The number of VPCs that are associated with the
--     query logging configuration.
--
-- -   @CreationTime@: The date and time that the query logging
--     configuration was created, in Unix time format and Coordinated
--     Universal Time (UTC).
--
-- -   @CreatorRequestId@: A unique string that identifies the request that
--     created the query logging configuration.
--
-- -   @Destination@: The Amazon Web Services service that you want to
--     forward query logs to. Valid values include the following:
--
--     -   @S3@
--
--     -   @CloudWatchLogs@
--
--     -   @KinesisFirehose@
--
-- -   @DestinationArn@: The ARN of the location that Resolver is sending
--     query logs to. This value can be the ARN for an S3 bucket, a
--     CloudWatch Logs log group, or a Kinesis Data Firehose delivery
--     stream.
--
-- -   @Id@: The ID of the query logging configuration
--
-- -   @Name@: The name of the query logging configuration
--
-- -   @OwnerId@: The Amazon Web Services account ID for the account that
--     created the query logging configuration.
--
-- -   @ShareStatus@: An indication of whether the query logging
--     configuration is shared with other Amazon Web Services accounts, or
--     was shared with the current account by another Amazon Web Services
--     account. Valid values include: @NOT_SHARED@, @SHARED_WITH_ME@, or
--     @SHARED_BY_ME@.
--
-- -   @Status@: The status of the query logging configuration. If you
--     specify @Status@ for @Name@, specify the applicable status code for
--     @Values@: @CREATING@, @CREATED@, @DELETING@, or @FAILED@. For more
--     information, see
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ResolverQueryLogConfig.html#Route53Resolver-Type-route53resolver_ResolverQueryLogConfig-Status Status>.
--
-- __ListResolverQueryLogConfigAssociations__
--
-- Valid values for @Name@ include the following:
--
-- -   @CreationTime@: The date and time that the VPC was associated with
--     the query logging configuration, in Unix time format and Coordinated
--     Universal Time (UTC).
--
-- -   @Error@: If the value of @Status@ is @FAILED@, specify the cause:
--     @DESTINATION_NOT_FOUND@ or @ACCESS_DENIED@.
--
-- -   @Id@: The ID of the query logging association.
--
-- -   @ResolverQueryLogConfigId@: The ID of the query logging
--     configuration that a VPC is associated with.
--
-- -   @ResourceId@: The ID of the Amazon VPC that is associated with the
--     query logging configuration.
--
-- -   @Status@: The status of the query logging association. If you
--     specify @Status@ for @Name@, specify the applicable status code for
--     @Values@: @CREATING@, @CREATED@, @DELETING@, or @FAILED@. For more
--     information, see
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ResolverQueryLogConfigAssociation.html#Route53Resolver-Type-route53resolver_ResolverQueryLogConfigAssociation-Status Status>.
newFilter ::
  Filter
newFilter :: Filter
newFilter =
  Filter' :: Maybe [Text] -> Maybe Text -> Filter
Filter'
    { $sel:values:Filter' :: Maybe [Text]
values = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Filter' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | When you\'re using a @List@ operation and you want the operation to
-- return a subset of objects, such as Resolver endpoints or Resolver
-- rules, the value of the parameter that you want to use to filter
-- objects. For example, to list only inbound Resolver endpoints, specify
-- @Direction@ for @Name@ and specify @INBOUND@ for @Values@.
filter_values :: Lens.Lens' Filter (Prelude.Maybe [Prelude.Text])
filter_values :: (Maybe [Text] -> f (Maybe [Text])) -> Filter -> f Filter
filter_values = (Filter -> Maybe [Text])
-> (Filter -> Maybe [Text] -> Filter)
-> Lens Filter Filter (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Filter' {Maybe [Text]
values :: Maybe [Text]
$sel:values:Filter' :: Filter -> Maybe [Text]
values} -> Maybe [Text]
values) (\s :: Filter
s@Filter' {} Maybe [Text]
a -> Filter
s {$sel:values:Filter' :: Maybe [Text]
values = Maybe [Text]
a} :: Filter) ((Maybe [Text] -> f (Maybe [Text])) -> Filter -> f Filter)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Filter
-> f Filter
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the parameter that you want to use to filter objects.
--
-- The valid values for @Name@ depend on the action that you\'re including
-- the filter in,
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverEndpoints.html ListResolverEndpoints>,
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html ListResolverRules>,
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRuleAssociations.html ListResolverRuleAssociations>,
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverQueryLogConfigs.html ListResolverQueryLogConfigs>,
-- or
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverQueryLogConfigAssociations.html ListResolverQueryLogConfigAssociations>.
--
-- In early versions of Resolver, values for @Name@ were listed as
-- uppercase, with underscore (_) delimiters. For example,
-- @CreatorRequestId@ was originally listed as @CREATOR_REQUEST_ID@.
-- Uppercase values for @Name@ are still supported.
--
-- __ListResolverEndpoints__
--
-- Valid values for @Name@ include the following:
--
-- -   @CreatorRequestId@: The value that you specified when you created
--     the Resolver endpoint.
--
-- -   @Direction@: Whether you want to return inbound or outbound Resolver
--     endpoints. If you specify @DIRECTION@ for @Name@, specify @INBOUND@
--     or @OUTBOUND@ for @Values@.
--
-- -   @HostVPCId@: The ID of the VPC that inbound DNS queries pass through
--     on the way from your network to your VPCs in a region, or the VPC
--     that outbound queries pass through on the way from your VPCs to your
--     network. In a
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverEndpoint.html CreateResolverEndpoint>
--     request, @SubnetId@ indirectly identifies the VPC. In a
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html GetResolverEndpoint>
--     request, the VPC ID for a Resolver endpoint is returned in the
--     @HostVPCId@ element.
--
-- -   @IpAddressCount@: The number of IP addresses that you have
--     associated with the Resolver endpoint.
--
-- -   @Name@: The name of the Resolver endpoint.
--
-- -   @SecurityGroupIds@: The IDs of the VPC security groups that you
--     specified when you created the Resolver endpoint.
--
-- -   @Status@: The status of the Resolver endpoint. If you specify
--     @Status@ for @Name@, specify one of the following status codes for
--     @Values@: @CREATING@, @OPERATIONAL@, @UPDATING@, @AUTO_RECOVERING@,
--     @ACTION_NEEDED@, or @DELETING@. For more information, see @Status@
--     in
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ResolverEndpoint.html ResolverEndpoint>.
--
-- __ListResolverRules__
--
-- Valid values for @Name@ include the following:
--
-- -   @CreatorRequestId@: The value that you specified when you created
--     the Resolver rule.
--
-- -   @DomainName@: The domain name for which Resolver is forwarding DNS
--     queries to your network. In the value that you specify for @Values@,
--     include a trailing dot (.) after the domain name. For example, if
--     the domain name is example.com, specify the following value. Note
--     the \".\" after @com@:
--
--     @example.com.@
--
-- -   @Name@: The name of the Resolver rule.
--
-- -   @ResolverEndpointId@: The ID of the Resolver endpoint that the
--     Resolver rule is associated with.
--
--     You can filter on the Resolver endpoint only for rules that have a
--     value of @FORWARD@ for @RuleType@.
--
-- -   @Status@: The status of the Resolver rule. If you specify @Status@
--     for @Name@, specify one of the following status codes for @Values@:
--     @COMPLETE@, @DELETING@, @UPDATING@, or @FAILED@.
--
-- -   @Type@: The type of the Resolver rule. If you specify @TYPE@ for
--     @Name@, specify @FORWARD@ or @SYSTEM@ for @Values@.
--
-- __ListResolverRuleAssociations__
--
-- Valid values for @Name@ include the following:
--
-- -   @Name@: The name of the Resolver rule association.
--
-- -   @ResolverRuleId@: The ID of the Resolver rule that is associated
--     with one or more VPCs.
--
-- -   @Status@: The status of the Resolver rule association. If you
--     specify @Status@ for @Name@, specify one of the following status
--     codes for @Values@: @CREATING@, @COMPLETE@, @DELETING@, or @FAILED@.
--
-- -   @VPCId@: The ID of the VPC that the Resolver rule is associated
--     with.
--
-- __ListResolverQueryLogConfigs__
--
-- Valid values for @Name@ include the following:
--
-- -   @Arn@: The ARN for the query logging configuration.
--
-- -   @AssociationCount@: The number of VPCs that are associated with the
--     query logging configuration.
--
-- -   @CreationTime@: The date and time that the query logging
--     configuration was created, in Unix time format and Coordinated
--     Universal Time (UTC).
--
-- -   @CreatorRequestId@: A unique string that identifies the request that
--     created the query logging configuration.
--
-- -   @Destination@: The Amazon Web Services service that you want to
--     forward query logs to. Valid values include the following:
--
--     -   @S3@
--
--     -   @CloudWatchLogs@
--
--     -   @KinesisFirehose@
--
-- -   @DestinationArn@: The ARN of the location that Resolver is sending
--     query logs to. This value can be the ARN for an S3 bucket, a
--     CloudWatch Logs log group, or a Kinesis Data Firehose delivery
--     stream.
--
-- -   @Id@: The ID of the query logging configuration
--
-- -   @Name@: The name of the query logging configuration
--
-- -   @OwnerId@: The Amazon Web Services account ID for the account that
--     created the query logging configuration.
--
-- -   @ShareStatus@: An indication of whether the query logging
--     configuration is shared with other Amazon Web Services accounts, or
--     was shared with the current account by another Amazon Web Services
--     account. Valid values include: @NOT_SHARED@, @SHARED_WITH_ME@, or
--     @SHARED_BY_ME@.
--
-- -   @Status@: The status of the query logging configuration. If you
--     specify @Status@ for @Name@, specify the applicable status code for
--     @Values@: @CREATING@, @CREATED@, @DELETING@, or @FAILED@. For more
--     information, see
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ResolverQueryLogConfig.html#Route53Resolver-Type-route53resolver_ResolverQueryLogConfig-Status Status>.
--
-- __ListResolverQueryLogConfigAssociations__
--
-- Valid values for @Name@ include the following:
--
-- -   @CreationTime@: The date and time that the VPC was associated with
--     the query logging configuration, in Unix time format and Coordinated
--     Universal Time (UTC).
--
-- -   @Error@: If the value of @Status@ is @FAILED@, specify the cause:
--     @DESTINATION_NOT_FOUND@ or @ACCESS_DENIED@.
--
-- -   @Id@: The ID of the query logging association.
--
-- -   @ResolverQueryLogConfigId@: The ID of the query logging
--     configuration that a VPC is associated with.
--
-- -   @ResourceId@: The ID of the Amazon VPC that is associated with the
--     query logging configuration.
--
-- -   @Status@: The status of the query logging association. If you
--     specify @Status@ for @Name@, specify the applicable status code for
--     @Values@: @CREATING@, @CREATED@, @DELETING@, or @FAILED@. For more
--     information, see
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ResolverQueryLogConfigAssociation.html#Route53Resolver-Type-route53resolver_ResolverQueryLogConfigAssociation-Status Status>.
filter_name :: Lens.Lens' Filter (Prelude.Maybe Prelude.Text)
filter_name :: (Maybe Text -> f (Maybe Text)) -> Filter -> f Filter
filter_name = (Filter -> Maybe Text)
-> (Filter -> Maybe Text -> Filter)
-> Lens Filter Filter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Filter' {Maybe Text
name :: Maybe Text
$sel:name:Filter' :: Filter -> Maybe Text
name} -> Maybe Text
name) (\s :: Filter
s@Filter' {} Maybe Text
a -> Filter
s {$sel:name:Filter' :: Maybe Text
name = Maybe Text
a} :: Filter)

instance Prelude.Hashable Filter

instance Prelude.NFData Filter

instance Core.ToJSON Filter where
  toJSON :: Filter -> Value
toJSON Filter' {Maybe [Text]
Maybe Text
name :: Maybe Text
values :: Maybe [Text]
$sel:name:Filter' :: Filter -> Maybe Text
$sel:values:Filter' :: Filter -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Values" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
values,
            (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name
          ]
      )