{-# 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.EMRContainers.Types.Endpoint
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EMRContainers.Types.Endpoint where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EMRContainers.Types.Certificate
import Amazonka.EMRContainers.Types.ConfigurationOverrides
import Amazonka.EMRContainers.Types.EndpointState
import Amazonka.EMRContainers.Types.FailureReason
import qualified Amazonka.Prelude as Prelude

-- | This entity represents the endpoint that is managed by Amazon EMR on
-- EKS.
--
-- /See:/ 'newEndpoint' smart constructor.
data Endpoint = Endpoint'
  { -- | The ARN of the endpoint.
    Endpoint -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The certificate ARN of the endpoint. This field is under deprecation and
    -- will be removed in future.
    Endpoint -> Maybe Text
certificateArn :: Prelude.Maybe Prelude.Text,
    -- | The certificate generated by emr control plane on customer behalf to
    -- secure the managed endpoint.
    Endpoint -> Maybe Certificate
certificateAuthority :: Prelude.Maybe Certificate,
    -- | The configuration settings that are used to override existing
    -- configurations for endpoints.
    Endpoint -> Maybe ConfigurationOverrides
configurationOverrides :: Prelude.Maybe ConfigurationOverrides,
    -- | The date and time when the endpoint was created.
    Endpoint -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
    -- | The execution role ARN of the endpoint.
    Endpoint -> Maybe Text
executionRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The reasons why the endpoint has failed.
    Endpoint -> Maybe FailureReason
failureReason :: Prelude.Maybe FailureReason,
    -- | The ID of the endpoint.
    Endpoint -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The name of the endpoint.
    Endpoint -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The EMR release version to be used for the endpoint.
    Endpoint -> Maybe Text
releaseLabel :: Prelude.Maybe Prelude.Text,
    -- | The security group configuration of the endpoint.
    Endpoint -> Maybe Text
securityGroup :: Prelude.Maybe Prelude.Text,
    -- | The server URL of the endpoint.
    Endpoint -> Maybe Text
serverUrl :: Prelude.Maybe Prelude.Text,
    -- | The state of the endpoint.
    Endpoint -> Maybe EndpointState
state :: Prelude.Maybe EndpointState,
    -- | Additional details of the endpoint state.
    Endpoint -> Maybe Text
stateDetails :: Prelude.Maybe Prelude.Text,
    -- | The subnet IDs of the endpoint.
    Endpoint -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
    -- | The tags of the endpoint.
    Endpoint -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The type of the endpoint.
    Endpoint -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
    -- | The ID of the endpoint\'s virtual cluster.
    Endpoint -> Maybe Text
virtualClusterId :: Prelude.Maybe Prelude.Text
  }
  deriving (Endpoint -> Endpoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Endpoint -> Endpoint -> Bool
$c/= :: Endpoint -> Endpoint -> Bool
== :: Endpoint -> Endpoint -> Bool
$c== :: Endpoint -> Endpoint -> Bool
Prelude.Eq, Int -> Endpoint -> ShowS
[Endpoint] -> ShowS
Endpoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Endpoint] -> ShowS
$cshowList :: [Endpoint] -> ShowS
show :: Endpoint -> String
$cshow :: Endpoint -> String
showsPrec :: Int -> Endpoint -> ShowS
$cshowsPrec :: Int -> Endpoint -> ShowS
Prelude.Show, forall x. Rep Endpoint x -> Endpoint
forall x. Endpoint -> Rep Endpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Endpoint x -> Endpoint
$cfrom :: forall x. Endpoint -> Rep Endpoint x
Prelude.Generic)

-- |
-- Create a value of 'Endpoint' 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:
--
-- 'arn', 'endpoint_arn' - The ARN of the endpoint.
--
-- 'certificateArn', 'endpoint_certificateArn' - The certificate ARN of the endpoint. This field is under deprecation and
-- will be removed in future.
--
-- 'certificateAuthority', 'endpoint_certificateAuthority' - The certificate generated by emr control plane on customer behalf to
-- secure the managed endpoint.
--
-- 'configurationOverrides', 'endpoint_configurationOverrides' - The configuration settings that are used to override existing
-- configurations for endpoints.
--
-- 'createdAt', 'endpoint_createdAt' - The date and time when the endpoint was created.
--
-- 'executionRoleArn', 'endpoint_executionRoleArn' - The execution role ARN of the endpoint.
--
-- 'failureReason', 'endpoint_failureReason' - The reasons why the endpoint has failed.
--
-- 'id', 'endpoint_id' - The ID of the endpoint.
--
-- 'name', 'endpoint_name' - The name of the endpoint.
--
-- 'releaseLabel', 'endpoint_releaseLabel' - The EMR release version to be used for the endpoint.
--
-- 'securityGroup', 'endpoint_securityGroup' - The security group configuration of the endpoint.
--
-- 'serverUrl', 'endpoint_serverUrl' - The server URL of the endpoint.
--
-- 'state', 'endpoint_state' - The state of the endpoint.
--
-- 'stateDetails', 'endpoint_stateDetails' - Additional details of the endpoint state.
--
-- 'subnetIds', 'endpoint_subnetIds' - The subnet IDs of the endpoint.
--
-- 'tags', 'endpoint_tags' - The tags of the endpoint.
--
-- 'type'', 'endpoint_type' - The type of the endpoint.
--
-- 'virtualClusterId', 'endpoint_virtualClusterId' - The ID of the endpoint\'s virtual cluster.
newEndpoint ::
  Endpoint
newEndpoint :: Endpoint
newEndpoint =
  Endpoint'
    { $sel:arn:Endpoint' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:certificateArn:Endpoint' :: Maybe Text
certificateArn = forall a. Maybe a
Prelude.Nothing,
      $sel:certificateAuthority:Endpoint' :: Maybe Certificate
certificateAuthority = forall a. Maybe a
Prelude.Nothing,
      $sel:configurationOverrides:Endpoint' :: Maybe ConfigurationOverrides
configurationOverrides = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Endpoint' :: Maybe ISO8601
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:executionRoleArn:Endpoint' :: Maybe Text
executionRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:failureReason:Endpoint' :: Maybe FailureReason
failureReason = forall a. Maybe a
Prelude.Nothing,
      $sel:id:Endpoint' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:name:Endpoint' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:releaseLabel:Endpoint' :: Maybe Text
releaseLabel = forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroup:Endpoint' :: Maybe Text
securityGroup = forall a. Maybe a
Prelude.Nothing,
      $sel:serverUrl:Endpoint' :: Maybe Text
serverUrl = forall a. Maybe a
Prelude.Nothing,
      $sel:state:Endpoint' :: Maybe EndpointState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:stateDetails:Endpoint' :: Maybe Text
stateDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:subnetIds:Endpoint' :: Maybe [Text]
subnetIds = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Endpoint' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:type':Endpoint' :: Maybe Text
type' = forall a. Maybe a
Prelude.Nothing,
      $sel:virtualClusterId:Endpoint' :: Maybe Text
virtualClusterId = forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the endpoint.
endpoint_arn :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)
endpoint_arn :: Lens' Endpoint (Maybe Text)
endpoint_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe Text
arn :: Maybe Text
$sel:arn:Endpoint' :: Endpoint -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Endpoint
s@Endpoint' {} Maybe Text
a -> Endpoint
s {$sel:arn:Endpoint' :: Maybe Text
arn = Maybe Text
a} :: Endpoint)

-- | The certificate ARN of the endpoint. This field is under deprecation and
-- will be removed in future.
endpoint_certificateArn :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)
endpoint_certificateArn :: Lens' Endpoint (Maybe Text)
endpoint_certificateArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe Text
certificateArn :: Maybe Text
$sel:certificateArn:Endpoint' :: Endpoint -> Maybe Text
certificateArn} -> Maybe Text
certificateArn) (\s :: Endpoint
s@Endpoint' {} Maybe Text
a -> Endpoint
s {$sel:certificateArn:Endpoint' :: Maybe Text
certificateArn = Maybe Text
a} :: Endpoint)

-- | The certificate generated by emr control plane on customer behalf to
-- secure the managed endpoint.
endpoint_certificateAuthority :: Lens.Lens' Endpoint (Prelude.Maybe Certificate)
endpoint_certificateAuthority :: Lens' Endpoint (Maybe Certificate)
endpoint_certificateAuthority = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe Certificate
certificateAuthority :: Maybe Certificate
$sel:certificateAuthority:Endpoint' :: Endpoint -> Maybe Certificate
certificateAuthority} -> Maybe Certificate
certificateAuthority) (\s :: Endpoint
s@Endpoint' {} Maybe Certificate
a -> Endpoint
s {$sel:certificateAuthority:Endpoint' :: Maybe Certificate
certificateAuthority = Maybe Certificate
a} :: Endpoint)

-- | The configuration settings that are used to override existing
-- configurations for endpoints.
endpoint_configurationOverrides :: Lens.Lens' Endpoint (Prelude.Maybe ConfigurationOverrides)
endpoint_configurationOverrides :: Lens' Endpoint (Maybe ConfigurationOverrides)
endpoint_configurationOverrides = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe ConfigurationOverrides
configurationOverrides :: Maybe ConfigurationOverrides
$sel:configurationOverrides:Endpoint' :: Endpoint -> Maybe ConfigurationOverrides
configurationOverrides} -> Maybe ConfigurationOverrides
configurationOverrides) (\s :: Endpoint
s@Endpoint' {} Maybe ConfigurationOverrides
a -> Endpoint
s {$sel:configurationOverrides:Endpoint' :: Maybe ConfigurationOverrides
configurationOverrides = Maybe ConfigurationOverrides
a} :: Endpoint)

-- | The date and time when the endpoint was created.
endpoint_createdAt :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.UTCTime)
endpoint_createdAt :: Lens' Endpoint (Maybe UTCTime)
endpoint_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:Endpoint' :: Endpoint -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: Endpoint
s@Endpoint' {} Maybe ISO8601
a -> Endpoint
s {$sel:createdAt:Endpoint' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: Endpoint) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The execution role ARN of the endpoint.
endpoint_executionRoleArn :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)
endpoint_executionRoleArn :: Lens' Endpoint (Maybe Text)
endpoint_executionRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe Text
executionRoleArn :: Maybe Text
$sel:executionRoleArn:Endpoint' :: Endpoint -> Maybe Text
executionRoleArn} -> Maybe Text
executionRoleArn) (\s :: Endpoint
s@Endpoint' {} Maybe Text
a -> Endpoint
s {$sel:executionRoleArn:Endpoint' :: Maybe Text
executionRoleArn = Maybe Text
a} :: Endpoint)

-- | The reasons why the endpoint has failed.
endpoint_failureReason :: Lens.Lens' Endpoint (Prelude.Maybe FailureReason)
endpoint_failureReason :: Lens' Endpoint (Maybe FailureReason)
endpoint_failureReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe FailureReason
failureReason :: Maybe FailureReason
$sel:failureReason:Endpoint' :: Endpoint -> Maybe FailureReason
failureReason} -> Maybe FailureReason
failureReason) (\s :: Endpoint
s@Endpoint' {} Maybe FailureReason
a -> Endpoint
s {$sel:failureReason:Endpoint' :: Maybe FailureReason
failureReason = Maybe FailureReason
a} :: Endpoint)

-- | The ID of the endpoint.
endpoint_id :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)
endpoint_id :: Lens' Endpoint (Maybe Text)
endpoint_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe Text
id :: Maybe Text
$sel:id:Endpoint' :: Endpoint -> Maybe Text
id} -> Maybe Text
id) (\s :: Endpoint
s@Endpoint' {} Maybe Text
a -> Endpoint
s {$sel:id:Endpoint' :: Maybe Text
id = Maybe Text
a} :: Endpoint)

-- | The name of the endpoint.
endpoint_name :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)
endpoint_name :: Lens' Endpoint (Maybe Text)
endpoint_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe Text
name :: Maybe Text
$sel:name:Endpoint' :: Endpoint -> Maybe Text
name} -> Maybe Text
name) (\s :: Endpoint
s@Endpoint' {} Maybe Text
a -> Endpoint
s {$sel:name:Endpoint' :: Maybe Text
name = Maybe Text
a} :: Endpoint)

-- | The EMR release version to be used for the endpoint.
endpoint_releaseLabel :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)
endpoint_releaseLabel :: Lens' Endpoint (Maybe Text)
endpoint_releaseLabel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe Text
releaseLabel :: Maybe Text
$sel:releaseLabel:Endpoint' :: Endpoint -> Maybe Text
releaseLabel} -> Maybe Text
releaseLabel) (\s :: Endpoint
s@Endpoint' {} Maybe Text
a -> Endpoint
s {$sel:releaseLabel:Endpoint' :: Maybe Text
releaseLabel = Maybe Text
a} :: Endpoint)

-- | The security group configuration of the endpoint.
endpoint_securityGroup :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)
endpoint_securityGroup :: Lens' Endpoint (Maybe Text)
endpoint_securityGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe Text
securityGroup :: Maybe Text
$sel:securityGroup:Endpoint' :: Endpoint -> Maybe Text
securityGroup} -> Maybe Text
securityGroup) (\s :: Endpoint
s@Endpoint' {} Maybe Text
a -> Endpoint
s {$sel:securityGroup:Endpoint' :: Maybe Text
securityGroup = Maybe Text
a} :: Endpoint)

-- | The server URL of the endpoint.
endpoint_serverUrl :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)
endpoint_serverUrl :: Lens' Endpoint (Maybe Text)
endpoint_serverUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe Text
serverUrl :: Maybe Text
$sel:serverUrl:Endpoint' :: Endpoint -> Maybe Text
serverUrl} -> Maybe Text
serverUrl) (\s :: Endpoint
s@Endpoint' {} Maybe Text
a -> Endpoint
s {$sel:serverUrl:Endpoint' :: Maybe Text
serverUrl = Maybe Text
a} :: Endpoint)

-- | The state of the endpoint.
endpoint_state :: Lens.Lens' Endpoint (Prelude.Maybe EndpointState)
endpoint_state :: Lens' Endpoint (Maybe EndpointState)
endpoint_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe EndpointState
state :: Maybe EndpointState
$sel:state:Endpoint' :: Endpoint -> Maybe EndpointState
state} -> Maybe EndpointState
state) (\s :: Endpoint
s@Endpoint' {} Maybe EndpointState
a -> Endpoint
s {$sel:state:Endpoint' :: Maybe EndpointState
state = Maybe EndpointState
a} :: Endpoint)

-- | Additional details of the endpoint state.
endpoint_stateDetails :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)
endpoint_stateDetails :: Lens' Endpoint (Maybe Text)
endpoint_stateDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe Text
stateDetails :: Maybe Text
$sel:stateDetails:Endpoint' :: Endpoint -> Maybe Text
stateDetails} -> Maybe Text
stateDetails) (\s :: Endpoint
s@Endpoint' {} Maybe Text
a -> Endpoint
s {$sel:stateDetails:Endpoint' :: Maybe Text
stateDetails = Maybe Text
a} :: Endpoint)

-- | The subnet IDs of the endpoint.
endpoint_subnetIds :: Lens.Lens' Endpoint (Prelude.Maybe [Prelude.Text])
endpoint_subnetIds :: Lens' Endpoint (Maybe [Text])
endpoint_subnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:Endpoint' :: Endpoint -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: Endpoint
s@Endpoint' {} Maybe [Text]
a -> Endpoint
s {$sel:subnetIds:Endpoint' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: Endpoint) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The tags of the endpoint.
endpoint_tags :: Lens.Lens' Endpoint (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
endpoint_tags :: Lens' Endpoint (Maybe (HashMap Text Text))
endpoint_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Endpoint' :: Endpoint -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Endpoint
s@Endpoint' {} Maybe (HashMap Text Text)
a -> Endpoint
s {$sel:tags:Endpoint' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Endpoint) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The type of the endpoint.
endpoint_type :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)
endpoint_type :: Lens' Endpoint (Maybe Text)
endpoint_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe Text
type' :: Maybe Text
$sel:type':Endpoint' :: Endpoint -> Maybe Text
type'} -> Maybe Text
type') (\s :: Endpoint
s@Endpoint' {} Maybe Text
a -> Endpoint
s {$sel:type':Endpoint' :: Maybe Text
type' = Maybe Text
a} :: Endpoint)

-- | The ID of the endpoint\'s virtual cluster.
endpoint_virtualClusterId :: Lens.Lens' Endpoint (Prelude.Maybe Prelude.Text)
endpoint_virtualClusterId :: Lens' Endpoint (Maybe Text)
endpoint_virtualClusterId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Endpoint' {Maybe Text
virtualClusterId :: Maybe Text
$sel:virtualClusterId:Endpoint' :: Endpoint -> Maybe Text
virtualClusterId} -> Maybe Text
virtualClusterId) (\s :: Endpoint
s@Endpoint' {} Maybe Text
a -> Endpoint
s {$sel:virtualClusterId:Endpoint' :: Maybe Text
virtualClusterId = Maybe Text
a} :: Endpoint)

instance Data.FromJSON Endpoint where
  parseJSON :: Value -> Parser Endpoint
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Endpoint"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Certificate
-> Maybe ConfigurationOverrides
-> Maybe ISO8601
-> Maybe Text
-> Maybe FailureReason
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointState
-> Maybe Text
-> Maybe [Text]
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Endpoint
Endpoint'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"certificateArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"certificateAuthority")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"configurationOverrides")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createdAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"executionRoleArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"failureReason")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"id")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"releaseLabel")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"securityGroup")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"serverUrl")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"state")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"stateDetails")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"subnetIds" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"type")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"virtualClusterId")
      )

instance Prelude.Hashable Endpoint where
  hashWithSalt :: Int -> Endpoint -> Int
hashWithSalt Int
_salt Endpoint' {Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
Maybe Certificate
Maybe EndpointState
Maybe FailureReason
Maybe ConfigurationOverrides
virtualClusterId :: Maybe Text
type' :: Maybe Text
tags :: Maybe (HashMap Text Text)
subnetIds :: Maybe [Text]
stateDetails :: Maybe Text
state :: Maybe EndpointState
serverUrl :: Maybe Text
securityGroup :: Maybe Text
releaseLabel :: Maybe Text
name :: Maybe Text
id :: Maybe Text
failureReason :: Maybe FailureReason
executionRoleArn :: Maybe Text
createdAt :: Maybe ISO8601
configurationOverrides :: Maybe ConfigurationOverrides
certificateAuthority :: Maybe Certificate
certificateArn :: Maybe Text
arn :: Maybe Text
$sel:virtualClusterId:Endpoint' :: Endpoint -> Maybe Text
$sel:type':Endpoint' :: Endpoint -> Maybe Text
$sel:tags:Endpoint' :: Endpoint -> Maybe (HashMap Text Text)
$sel:subnetIds:Endpoint' :: Endpoint -> Maybe [Text]
$sel:stateDetails:Endpoint' :: Endpoint -> Maybe Text
$sel:state:Endpoint' :: Endpoint -> Maybe EndpointState
$sel:serverUrl:Endpoint' :: Endpoint -> Maybe Text
$sel:securityGroup:Endpoint' :: Endpoint -> Maybe Text
$sel:releaseLabel:Endpoint' :: Endpoint -> Maybe Text
$sel:name:Endpoint' :: Endpoint -> Maybe Text
$sel:id:Endpoint' :: Endpoint -> Maybe Text
$sel:failureReason:Endpoint' :: Endpoint -> Maybe FailureReason
$sel:executionRoleArn:Endpoint' :: Endpoint -> Maybe Text
$sel:createdAt:Endpoint' :: Endpoint -> Maybe ISO8601
$sel:configurationOverrides:Endpoint' :: Endpoint -> Maybe ConfigurationOverrides
$sel:certificateAuthority:Endpoint' :: Endpoint -> Maybe Certificate
$sel:certificateArn:Endpoint' :: Endpoint -> Maybe Text
$sel:arn:Endpoint' :: Endpoint -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificateArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Certificate
certificateAuthority
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConfigurationOverrides
configurationOverrides
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
executionRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FailureReason
failureReason
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
releaseLabel
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
securityGroup
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serverUrl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EndpointState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stateDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
subnetIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
type'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
virtualClusterId

instance Prelude.NFData Endpoint where
  rnf :: Endpoint -> ()
rnf Endpoint' {Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
Maybe Certificate
Maybe EndpointState
Maybe FailureReason
Maybe ConfigurationOverrides
virtualClusterId :: Maybe Text
type' :: Maybe Text
tags :: Maybe (HashMap Text Text)
subnetIds :: Maybe [Text]
stateDetails :: Maybe Text
state :: Maybe EndpointState
serverUrl :: Maybe Text
securityGroup :: Maybe Text
releaseLabel :: Maybe Text
name :: Maybe Text
id :: Maybe Text
failureReason :: Maybe FailureReason
executionRoleArn :: Maybe Text
createdAt :: Maybe ISO8601
configurationOverrides :: Maybe ConfigurationOverrides
certificateAuthority :: Maybe Certificate
certificateArn :: Maybe Text
arn :: Maybe Text
$sel:virtualClusterId:Endpoint' :: Endpoint -> Maybe Text
$sel:type':Endpoint' :: Endpoint -> Maybe Text
$sel:tags:Endpoint' :: Endpoint -> Maybe (HashMap Text Text)
$sel:subnetIds:Endpoint' :: Endpoint -> Maybe [Text]
$sel:stateDetails:Endpoint' :: Endpoint -> Maybe Text
$sel:state:Endpoint' :: Endpoint -> Maybe EndpointState
$sel:serverUrl:Endpoint' :: Endpoint -> Maybe Text
$sel:securityGroup:Endpoint' :: Endpoint -> Maybe Text
$sel:releaseLabel:Endpoint' :: Endpoint -> Maybe Text
$sel:name:Endpoint' :: Endpoint -> Maybe Text
$sel:id:Endpoint' :: Endpoint -> Maybe Text
$sel:failureReason:Endpoint' :: Endpoint -> Maybe FailureReason
$sel:executionRoleArn:Endpoint' :: Endpoint -> Maybe Text
$sel:createdAt:Endpoint' :: Endpoint -> Maybe ISO8601
$sel:configurationOverrides:Endpoint' :: Endpoint -> Maybe ConfigurationOverrides
$sel:certificateAuthority:Endpoint' :: Endpoint -> Maybe Certificate
$sel:certificateArn:Endpoint' :: Endpoint -> Maybe Text
$sel:arn:Endpoint' :: Endpoint -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificateArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Certificate
certificateAuthority
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConfigurationOverrides
configurationOverrides
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
executionRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FailureReason
failureReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
releaseLabel
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
securityGroup
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serverUrl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EndpointState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stateDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
subnetIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
type'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
virtualClusterId