{-# 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.Organizations.Types.Handshake
-- 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.Organizations.Types.Handshake where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Organizations.Types.ActionType
import Amazonka.Organizations.Types.HandshakeParty
import Amazonka.Organizations.Types.HandshakeResource
import Amazonka.Organizations.Types.HandshakeState
import qualified Amazonka.Prelude as Prelude

-- | Contains information that must be exchanged to securely establish a
-- relationship between two accounts (an /originator/ and a /recipient/).
-- For example, when a management account (the originator) invites another
-- account (the recipient) to join its organization, the two accounts
-- exchange information as a series of handshake requests and responses.
--
-- __Note:__ Handshakes that are @CANCELED@, @ACCEPTED@, @DECLINED@, or
-- @EXPIRED@ show up in lists for only 30 days after entering that state
-- After that they are deleted.
--
-- /See:/ 'newHandshake' smart constructor.
data Handshake = Handshake'
  { -- | The type of handshake, indicating what action occurs when the recipient
    -- accepts the handshake. The following handshake types are supported:
    --
    -- -   __INVITE__: This type of handshake represents a request to join an
    --     organization. It is always sent from the management account to only
    --     non-member accounts.
    --
    -- -   __ENABLE_ALL_FEATURES__: This type of handshake represents a request
    --     to enable all features in an organization. It is always sent from
    --     the management account to only /invited/ member accounts. Created
    --     accounts do not receive this because those accounts were created by
    --     the organization\'s management account and approval is inferred.
    --
    -- -   __APPROVE_ALL_FEATURES__: This type of handshake is sent from the
    --     Organizations service when all member accounts have approved the
    --     @ENABLE_ALL_FEATURES@ invitation. It is sent only to the management
    --     account and signals the master that it can finalize the process to
    --     enable all features.
    Handshake -> Maybe ActionType
action :: Prelude.Maybe ActionType,
    -- | The Amazon Resource Name (ARN) of a handshake.
    --
    -- For more information about ARNs in Organizations, see
    -- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies ARN Formats Supported by Organizations>
    -- in the /Amazon Web Services Service Authorization Reference/.
    Handshake -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the handshake expires. If the recipient of the
    -- handshake request fails to respond before the specified date and time,
    -- the handshake becomes inactive and is no longer valid.
    Handshake -> Maybe POSIX
expirationTimestamp :: Prelude.Maybe Data.POSIX,
    -- | The unique identifier (ID) of a handshake. The originating account
    -- creates the ID when it initiates the handshake.
    --
    -- The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID
    -- string requires \"h-\" followed by from 8 to 32 lowercase letters or
    -- digits.
    Handshake -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | Information about the two accounts that are participating in the
    -- handshake.
    Handshake -> Maybe [HandshakeParty]
parties :: Prelude.Maybe [HandshakeParty],
    -- | The date and time that the handshake request was made.
    Handshake -> Maybe POSIX
requestedTimestamp :: Prelude.Maybe Data.POSIX,
    -- | Additional information that is needed to process the handshake.
    Handshake -> Maybe [HandshakeResource]
resources :: Prelude.Maybe [HandshakeResource],
    -- | The current state of the handshake. Use the state to trace the flow of
    -- the handshake through the process from its creation to its acceptance.
    -- The meaning of each of the valid values is as follows:
    --
    -- -   __REQUESTED__: This handshake was sent to multiple recipients
    --     (applicable to only some handshake types) and not all recipients
    --     have responded yet. The request stays in this state until all
    --     recipients respond.
    --
    -- -   __OPEN__: This handshake was sent to multiple recipients (applicable
    --     to only some policy types) and all recipients have responded,
    --     allowing the originator to complete the handshake action.
    --
    -- -   __CANCELED__: This handshake is no longer active because it was
    --     canceled by the originating account.
    --
    -- -   __ACCEPTED__: This handshake is complete because it has been
    --     accepted by the recipient.
    --
    -- -   __DECLINED__: This handshake is no longer active because it was
    --     declined by the recipient account.
    --
    -- -   __EXPIRED__: This handshake is no longer active because the
    --     originator did not receive a response of any kind from the recipient
    --     before the expiration time (15 days).
    Handshake -> Maybe HandshakeState
state :: Prelude.Maybe HandshakeState
  }
  deriving (Handshake -> Handshake -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Handshake -> Handshake -> Bool
$c/= :: Handshake -> Handshake -> Bool
== :: Handshake -> Handshake -> Bool
$c== :: Handshake -> Handshake -> Bool
Prelude.Eq, Int -> Handshake -> ShowS
[Handshake] -> ShowS
Handshake -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Handshake] -> ShowS
$cshowList :: [Handshake] -> ShowS
show :: Handshake -> String
$cshow :: Handshake -> String
showsPrec :: Int -> Handshake -> ShowS
$cshowsPrec :: Int -> Handshake -> ShowS
Prelude.Show, forall x. Rep Handshake x -> Handshake
forall x. Handshake -> Rep Handshake x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Handshake x -> Handshake
$cfrom :: forall x. Handshake -> Rep Handshake x
Prelude.Generic)

-- |
-- Create a value of 'Handshake' 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:
--
-- 'action', 'handshake_action' - The type of handshake, indicating what action occurs when the recipient
-- accepts the handshake. The following handshake types are supported:
--
-- -   __INVITE__: This type of handshake represents a request to join an
--     organization. It is always sent from the management account to only
--     non-member accounts.
--
-- -   __ENABLE_ALL_FEATURES__: This type of handshake represents a request
--     to enable all features in an organization. It is always sent from
--     the management account to only /invited/ member accounts. Created
--     accounts do not receive this because those accounts were created by
--     the organization\'s management account and approval is inferred.
--
-- -   __APPROVE_ALL_FEATURES__: This type of handshake is sent from the
--     Organizations service when all member accounts have approved the
--     @ENABLE_ALL_FEATURES@ invitation. It is sent only to the management
--     account and signals the master that it can finalize the process to
--     enable all features.
--
-- 'arn', 'handshake_arn' - The Amazon Resource Name (ARN) of a handshake.
--
-- For more information about ARNs in Organizations, see
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies ARN Formats Supported by Organizations>
-- in the /Amazon Web Services Service Authorization Reference/.
--
-- 'expirationTimestamp', 'handshake_expirationTimestamp' - The date and time that the handshake expires. If the recipient of the
-- handshake request fails to respond before the specified date and time,
-- the handshake becomes inactive and is no longer valid.
--
-- 'id', 'handshake_id' - The unique identifier (ID) of a handshake. The originating account
-- creates the ID when it initiates the handshake.
--
-- The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID
-- string requires \"h-\" followed by from 8 to 32 lowercase letters or
-- digits.
--
-- 'parties', 'handshake_parties' - Information about the two accounts that are participating in the
-- handshake.
--
-- 'requestedTimestamp', 'handshake_requestedTimestamp' - The date and time that the handshake request was made.
--
-- 'resources', 'handshake_resources' - Additional information that is needed to process the handshake.
--
-- 'state', 'handshake_state' - The current state of the handshake. Use the state to trace the flow of
-- the handshake through the process from its creation to its acceptance.
-- The meaning of each of the valid values is as follows:
--
-- -   __REQUESTED__: This handshake was sent to multiple recipients
--     (applicable to only some handshake types) and not all recipients
--     have responded yet. The request stays in this state until all
--     recipients respond.
--
-- -   __OPEN__: This handshake was sent to multiple recipients (applicable
--     to only some policy types) and all recipients have responded,
--     allowing the originator to complete the handshake action.
--
-- -   __CANCELED__: This handshake is no longer active because it was
--     canceled by the originating account.
--
-- -   __ACCEPTED__: This handshake is complete because it has been
--     accepted by the recipient.
--
-- -   __DECLINED__: This handshake is no longer active because it was
--     declined by the recipient account.
--
-- -   __EXPIRED__: This handshake is no longer active because the
--     originator did not receive a response of any kind from the recipient
--     before the expiration time (15 days).
newHandshake ::
  Handshake
newHandshake :: Handshake
newHandshake =
  Handshake'
    { $sel:action:Handshake' :: Maybe ActionType
action = forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Handshake' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:expirationTimestamp:Handshake' :: Maybe POSIX
expirationTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:id:Handshake' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:parties:Handshake' :: Maybe [HandshakeParty]
parties = forall a. Maybe a
Prelude.Nothing,
      $sel:requestedTimestamp:Handshake' :: Maybe POSIX
requestedTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:resources:Handshake' :: Maybe [HandshakeResource]
resources = forall a. Maybe a
Prelude.Nothing,
      $sel:state:Handshake' :: Maybe HandshakeState
state = forall a. Maybe a
Prelude.Nothing
    }

-- | The type of handshake, indicating what action occurs when the recipient
-- accepts the handshake. The following handshake types are supported:
--
-- -   __INVITE__: This type of handshake represents a request to join an
--     organization. It is always sent from the management account to only
--     non-member accounts.
--
-- -   __ENABLE_ALL_FEATURES__: This type of handshake represents a request
--     to enable all features in an organization. It is always sent from
--     the management account to only /invited/ member accounts. Created
--     accounts do not receive this because those accounts were created by
--     the organization\'s management account and approval is inferred.
--
-- -   __APPROVE_ALL_FEATURES__: This type of handshake is sent from the
--     Organizations service when all member accounts have approved the
--     @ENABLE_ALL_FEATURES@ invitation. It is sent only to the management
--     account and signals the master that it can finalize the process to
--     enable all features.
handshake_action :: Lens.Lens' Handshake (Prelude.Maybe ActionType)
handshake_action :: Lens' Handshake (Maybe ActionType)
handshake_action = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Handshake' {Maybe ActionType
action :: Maybe ActionType
$sel:action:Handshake' :: Handshake -> Maybe ActionType
action} -> Maybe ActionType
action) (\s :: Handshake
s@Handshake' {} Maybe ActionType
a -> Handshake
s {$sel:action:Handshake' :: Maybe ActionType
action = Maybe ActionType
a} :: Handshake)

-- | The Amazon Resource Name (ARN) of a handshake.
--
-- For more information about ARNs in Organizations, see
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies ARN Formats Supported by Organizations>
-- in the /Amazon Web Services Service Authorization Reference/.
handshake_arn :: Lens.Lens' Handshake (Prelude.Maybe Prelude.Text)
handshake_arn :: Lens' Handshake (Maybe Text)
handshake_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Handshake' {Maybe Text
arn :: Maybe Text
$sel:arn:Handshake' :: Handshake -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Handshake
s@Handshake' {} Maybe Text
a -> Handshake
s {$sel:arn:Handshake' :: Maybe Text
arn = Maybe Text
a} :: Handshake)

-- | The date and time that the handshake expires. If the recipient of the
-- handshake request fails to respond before the specified date and time,
-- the handshake becomes inactive and is no longer valid.
handshake_expirationTimestamp :: Lens.Lens' Handshake (Prelude.Maybe Prelude.UTCTime)
handshake_expirationTimestamp :: Lens' Handshake (Maybe UTCTime)
handshake_expirationTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Handshake' {Maybe POSIX
expirationTimestamp :: Maybe POSIX
$sel:expirationTimestamp:Handshake' :: Handshake -> Maybe POSIX
expirationTimestamp} -> Maybe POSIX
expirationTimestamp) (\s :: Handshake
s@Handshake' {} Maybe POSIX
a -> Handshake
s {$sel:expirationTimestamp:Handshake' :: Maybe POSIX
expirationTimestamp = Maybe POSIX
a} :: Handshake) 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 unique identifier (ID) of a handshake. The originating account
-- creates the ID when it initiates the handshake.
--
-- The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID
-- string requires \"h-\" followed by from 8 to 32 lowercase letters or
-- digits.
handshake_id :: Lens.Lens' Handshake (Prelude.Maybe Prelude.Text)
handshake_id :: Lens' Handshake (Maybe Text)
handshake_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Handshake' {Maybe Text
id :: Maybe Text
$sel:id:Handshake' :: Handshake -> Maybe Text
id} -> Maybe Text
id) (\s :: Handshake
s@Handshake' {} Maybe Text
a -> Handshake
s {$sel:id:Handshake' :: Maybe Text
id = Maybe Text
a} :: Handshake)

-- | Information about the two accounts that are participating in the
-- handshake.
handshake_parties :: Lens.Lens' Handshake (Prelude.Maybe [HandshakeParty])
handshake_parties :: Lens' Handshake (Maybe [HandshakeParty])
handshake_parties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Handshake' {Maybe [HandshakeParty]
parties :: Maybe [HandshakeParty]
$sel:parties:Handshake' :: Handshake -> Maybe [HandshakeParty]
parties} -> Maybe [HandshakeParty]
parties) (\s :: Handshake
s@Handshake' {} Maybe [HandshakeParty]
a -> Handshake
s {$sel:parties:Handshake' :: Maybe [HandshakeParty]
parties = Maybe [HandshakeParty]
a} :: Handshake) 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 date and time that the handshake request was made.
handshake_requestedTimestamp :: Lens.Lens' Handshake (Prelude.Maybe Prelude.UTCTime)
handshake_requestedTimestamp :: Lens' Handshake (Maybe UTCTime)
handshake_requestedTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Handshake' {Maybe POSIX
requestedTimestamp :: Maybe POSIX
$sel:requestedTimestamp:Handshake' :: Handshake -> Maybe POSIX
requestedTimestamp} -> Maybe POSIX
requestedTimestamp) (\s :: Handshake
s@Handshake' {} Maybe POSIX
a -> Handshake
s {$sel:requestedTimestamp:Handshake' :: Maybe POSIX
requestedTimestamp = Maybe POSIX
a} :: Handshake) 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

-- | Additional information that is needed to process the handshake.
handshake_resources :: Lens.Lens' Handshake (Prelude.Maybe [HandshakeResource])
handshake_resources :: Lens' Handshake (Maybe [HandshakeResource])
handshake_resources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Handshake' {Maybe [HandshakeResource]
resources :: Maybe [HandshakeResource]
$sel:resources:Handshake' :: Handshake -> Maybe [HandshakeResource]
resources} -> Maybe [HandshakeResource]
resources) (\s :: Handshake
s@Handshake' {} Maybe [HandshakeResource]
a -> Handshake
s {$sel:resources:Handshake' :: Maybe [HandshakeResource]
resources = Maybe [HandshakeResource]
a} :: Handshake) 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 current state of the handshake. Use the state to trace the flow of
-- the handshake through the process from its creation to its acceptance.
-- The meaning of each of the valid values is as follows:
--
-- -   __REQUESTED__: This handshake was sent to multiple recipients
--     (applicable to only some handshake types) and not all recipients
--     have responded yet. The request stays in this state until all
--     recipients respond.
--
-- -   __OPEN__: This handshake was sent to multiple recipients (applicable
--     to only some policy types) and all recipients have responded,
--     allowing the originator to complete the handshake action.
--
-- -   __CANCELED__: This handshake is no longer active because it was
--     canceled by the originating account.
--
-- -   __ACCEPTED__: This handshake is complete because it has been
--     accepted by the recipient.
--
-- -   __DECLINED__: This handshake is no longer active because it was
--     declined by the recipient account.
--
-- -   __EXPIRED__: This handshake is no longer active because the
--     originator did not receive a response of any kind from the recipient
--     before the expiration time (15 days).
handshake_state :: Lens.Lens' Handshake (Prelude.Maybe HandshakeState)
handshake_state :: Lens' Handshake (Maybe HandshakeState)
handshake_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Handshake' {Maybe HandshakeState
state :: Maybe HandshakeState
$sel:state:Handshake' :: Handshake -> Maybe HandshakeState
state} -> Maybe HandshakeState
state) (\s :: Handshake
s@Handshake' {} Maybe HandshakeState
a -> Handshake
s {$sel:state:Handshake' :: Maybe HandshakeState
state = Maybe HandshakeState
a} :: Handshake)

instance Data.FromJSON Handshake where
  parseJSON :: Value -> Parser Handshake
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Handshake"
      ( \Object
x ->
          Maybe ActionType
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe [HandshakeParty]
-> Maybe POSIX
-> Maybe [HandshakeResource]
-> Maybe HandshakeState
-> Handshake
Handshake'
            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
"Action")
            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
"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
"ExpirationTimestamp")
            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
"Parties" 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
"RequestedTimestamp")
            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
"Resources" 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
"State")
      )

instance Prelude.Hashable Handshake where
  hashWithSalt :: Int -> Handshake -> Int
hashWithSalt Int
_salt Handshake' {Maybe [HandshakeParty]
Maybe [HandshakeResource]
Maybe Text
Maybe POSIX
Maybe ActionType
Maybe HandshakeState
state :: Maybe HandshakeState
resources :: Maybe [HandshakeResource]
requestedTimestamp :: Maybe POSIX
parties :: Maybe [HandshakeParty]
id :: Maybe Text
expirationTimestamp :: Maybe POSIX
arn :: Maybe Text
action :: Maybe ActionType
$sel:state:Handshake' :: Handshake -> Maybe HandshakeState
$sel:resources:Handshake' :: Handshake -> Maybe [HandshakeResource]
$sel:requestedTimestamp:Handshake' :: Handshake -> Maybe POSIX
$sel:parties:Handshake' :: Handshake -> Maybe [HandshakeParty]
$sel:id:Handshake' :: Handshake -> Maybe Text
$sel:expirationTimestamp:Handshake' :: Handshake -> Maybe POSIX
$sel:arn:Handshake' :: Handshake -> Maybe Text
$sel:action:Handshake' :: Handshake -> Maybe ActionType
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ActionType
action
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
expirationTimestamp
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [HandshakeParty]
parties
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
requestedTimestamp
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [HandshakeResource]
resources
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HandshakeState
state

instance Prelude.NFData Handshake where
  rnf :: Handshake -> ()
rnf Handshake' {Maybe [HandshakeParty]
Maybe [HandshakeResource]
Maybe Text
Maybe POSIX
Maybe ActionType
Maybe HandshakeState
state :: Maybe HandshakeState
resources :: Maybe [HandshakeResource]
requestedTimestamp :: Maybe POSIX
parties :: Maybe [HandshakeParty]
id :: Maybe Text
expirationTimestamp :: Maybe POSIX
arn :: Maybe Text
action :: Maybe ActionType
$sel:state:Handshake' :: Handshake -> Maybe HandshakeState
$sel:resources:Handshake' :: Handshake -> Maybe [HandshakeResource]
$sel:requestedTimestamp:Handshake' :: Handshake -> Maybe POSIX
$sel:parties:Handshake' :: Handshake -> Maybe [HandshakeParty]
$sel:id:Handshake' :: Handshake -> Maybe Text
$sel:expirationTimestamp:Handshake' :: Handshake -> Maybe POSIX
$sel:arn:Handshake' :: Handshake -> Maybe Text
$sel:action:Handshake' :: Handshake -> Maybe ActionType
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ActionType
action
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 POSIX
expirationTimestamp
      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 [HandshakeParty]
parties
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
requestedTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [HandshakeResource]
resources
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HandshakeState
state