{-# 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.NetworkManager.Types.Attachment
-- 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.NetworkManager.Types.Attachment where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.NetworkManager.Types.AttachmentState
import Amazonka.NetworkManager.Types.AttachmentType
import Amazonka.NetworkManager.Types.ProposedSegmentChange
import Amazonka.NetworkManager.Types.Tag
import qualified Amazonka.Prelude as Prelude

-- | Describes a core network attachment.
--
-- /See:/ 'newAttachment' smart constructor.
data Attachment = Attachment'
  { -- | The ID of the attachment.
    Attachment -> Maybe Text
attachmentId :: Prelude.Maybe Prelude.Text,
    -- | The policy rule number associated with the attachment.
    Attachment -> Maybe Int
attachmentPolicyRuleNumber :: Prelude.Maybe Prelude.Int,
    -- | The type of attachment.
    Attachment -> Maybe AttachmentType
attachmentType :: Prelude.Maybe AttachmentType,
    -- | The ARN of a core network.
    Attachment -> Maybe Text
coreNetworkArn :: Prelude.Maybe Prelude.Text,
    -- | The ID of a core network.
    Attachment -> Maybe Text
coreNetworkId :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the attachment was created.
    Attachment -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
    -- | The Region where the edge is located.
    Attachment -> Maybe Text
edgeLocation :: Prelude.Maybe Prelude.Text,
    -- | The ID of the attachment account owner.
    Attachment -> Maybe Text
ownerAccountId :: Prelude.Maybe Prelude.Text,
    -- | The attachment to move from one segment to another.
    Attachment -> Maybe ProposedSegmentChange
proposedSegmentChange :: Prelude.Maybe ProposedSegmentChange,
    -- | The attachment resource ARN.
    Attachment -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the segment attachment.
    Attachment -> Maybe Text
segmentName :: Prelude.Maybe Prelude.Text,
    -- | The state of the attachment.
    Attachment -> Maybe AttachmentState
state :: Prelude.Maybe AttachmentState,
    -- | The tags associated with the attachment.
    Attachment -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The timestamp when the attachment was last updated.
    Attachment -> Maybe POSIX
updatedAt :: Prelude.Maybe Data.POSIX
  }
  deriving (Attachment -> Attachment -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Attachment -> Attachment -> Bool
$c/= :: Attachment -> Attachment -> Bool
== :: Attachment -> Attachment -> Bool
$c== :: Attachment -> Attachment -> Bool
Prelude.Eq, ReadPrec [Attachment]
ReadPrec Attachment
Int -> ReadS Attachment
ReadS [Attachment]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Attachment]
$creadListPrec :: ReadPrec [Attachment]
readPrec :: ReadPrec Attachment
$creadPrec :: ReadPrec Attachment
readList :: ReadS [Attachment]
$creadList :: ReadS [Attachment]
readsPrec :: Int -> ReadS Attachment
$creadsPrec :: Int -> ReadS Attachment
Prelude.Read, Int -> Attachment -> ShowS
[Attachment] -> ShowS
Attachment -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Attachment] -> ShowS
$cshowList :: [Attachment] -> ShowS
show :: Attachment -> String
$cshow :: Attachment -> String
showsPrec :: Int -> Attachment -> ShowS
$cshowsPrec :: Int -> Attachment -> ShowS
Prelude.Show, forall x. Rep Attachment x -> Attachment
forall x. Attachment -> Rep Attachment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Attachment x -> Attachment
$cfrom :: forall x. Attachment -> Rep Attachment x
Prelude.Generic)

-- |
-- Create a value of 'Attachment' 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:
--
-- 'attachmentId', 'attachment_attachmentId' - The ID of the attachment.
--
-- 'attachmentPolicyRuleNumber', 'attachment_attachmentPolicyRuleNumber' - The policy rule number associated with the attachment.
--
-- 'attachmentType', 'attachment_attachmentType' - The type of attachment.
--
-- 'coreNetworkArn', 'attachment_coreNetworkArn' - The ARN of a core network.
--
-- 'coreNetworkId', 'attachment_coreNetworkId' - The ID of a core network.
--
-- 'createdAt', 'attachment_createdAt' - The timestamp when the attachment was created.
--
-- 'edgeLocation', 'attachment_edgeLocation' - The Region where the edge is located.
--
-- 'ownerAccountId', 'attachment_ownerAccountId' - The ID of the attachment account owner.
--
-- 'proposedSegmentChange', 'attachment_proposedSegmentChange' - The attachment to move from one segment to another.
--
-- 'resourceArn', 'attachment_resourceArn' - The attachment resource ARN.
--
-- 'segmentName', 'attachment_segmentName' - The name of the segment attachment.
--
-- 'state', 'attachment_state' - The state of the attachment.
--
-- 'tags', 'attachment_tags' - The tags associated with the attachment.
--
-- 'updatedAt', 'attachment_updatedAt' - The timestamp when the attachment was last updated.
newAttachment ::
  Attachment
newAttachment :: Attachment
newAttachment =
  Attachment'
    { $sel:attachmentId:Attachment' :: Maybe Text
attachmentId = forall a. Maybe a
Prelude.Nothing,
      $sel:attachmentPolicyRuleNumber:Attachment' :: Maybe Int
attachmentPolicyRuleNumber = forall a. Maybe a
Prelude.Nothing,
      $sel:attachmentType:Attachment' :: Maybe AttachmentType
attachmentType = forall a. Maybe a
Prelude.Nothing,
      $sel:coreNetworkArn:Attachment' :: Maybe Text
coreNetworkArn = forall a. Maybe a
Prelude.Nothing,
      $sel:coreNetworkId:Attachment' :: Maybe Text
coreNetworkId = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Attachment' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:edgeLocation:Attachment' :: Maybe Text
edgeLocation = forall a. Maybe a
Prelude.Nothing,
      $sel:ownerAccountId:Attachment' :: Maybe Text
ownerAccountId = forall a. Maybe a
Prelude.Nothing,
      $sel:proposedSegmentChange:Attachment' :: Maybe ProposedSegmentChange
proposedSegmentChange = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:Attachment' :: Maybe Text
resourceArn = forall a. Maybe a
Prelude.Nothing,
      $sel:segmentName:Attachment' :: Maybe Text
segmentName = forall a. Maybe a
Prelude.Nothing,
      $sel:state:Attachment' :: Maybe AttachmentState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Attachment' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:Attachment' :: Maybe POSIX
updatedAt = forall a. Maybe a
Prelude.Nothing
    }

-- | The ID of the attachment.
attachment_attachmentId :: Lens.Lens' Attachment (Prelude.Maybe Prelude.Text)
attachment_attachmentId :: Lens' Attachment (Maybe Text)
attachment_attachmentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe Text
attachmentId :: Maybe Text
$sel:attachmentId:Attachment' :: Attachment -> Maybe Text
attachmentId} -> Maybe Text
attachmentId) (\s :: Attachment
s@Attachment' {} Maybe Text
a -> Attachment
s {$sel:attachmentId:Attachment' :: Maybe Text
attachmentId = Maybe Text
a} :: Attachment)

-- | The policy rule number associated with the attachment.
attachment_attachmentPolicyRuleNumber :: Lens.Lens' Attachment (Prelude.Maybe Prelude.Int)
attachment_attachmentPolicyRuleNumber :: Lens' Attachment (Maybe Int)
attachment_attachmentPolicyRuleNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe Int
attachmentPolicyRuleNumber :: Maybe Int
$sel:attachmentPolicyRuleNumber:Attachment' :: Attachment -> Maybe Int
attachmentPolicyRuleNumber} -> Maybe Int
attachmentPolicyRuleNumber) (\s :: Attachment
s@Attachment' {} Maybe Int
a -> Attachment
s {$sel:attachmentPolicyRuleNumber:Attachment' :: Maybe Int
attachmentPolicyRuleNumber = Maybe Int
a} :: Attachment)

-- | The type of attachment.
attachment_attachmentType :: Lens.Lens' Attachment (Prelude.Maybe AttachmentType)
attachment_attachmentType :: Lens' Attachment (Maybe AttachmentType)
attachment_attachmentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe AttachmentType
attachmentType :: Maybe AttachmentType
$sel:attachmentType:Attachment' :: Attachment -> Maybe AttachmentType
attachmentType} -> Maybe AttachmentType
attachmentType) (\s :: Attachment
s@Attachment' {} Maybe AttachmentType
a -> Attachment
s {$sel:attachmentType:Attachment' :: Maybe AttachmentType
attachmentType = Maybe AttachmentType
a} :: Attachment)

-- | The ARN of a core network.
attachment_coreNetworkArn :: Lens.Lens' Attachment (Prelude.Maybe Prelude.Text)
attachment_coreNetworkArn :: Lens' Attachment (Maybe Text)
attachment_coreNetworkArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe Text
coreNetworkArn :: Maybe Text
$sel:coreNetworkArn:Attachment' :: Attachment -> Maybe Text
coreNetworkArn} -> Maybe Text
coreNetworkArn) (\s :: Attachment
s@Attachment' {} Maybe Text
a -> Attachment
s {$sel:coreNetworkArn:Attachment' :: Maybe Text
coreNetworkArn = Maybe Text
a} :: Attachment)

-- | The ID of a core network.
attachment_coreNetworkId :: Lens.Lens' Attachment (Prelude.Maybe Prelude.Text)
attachment_coreNetworkId :: Lens' Attachment (Maybe Text)
attachment_coreNetworkId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe Text
coreNetworkId :: Maybe Text
$sel:coreNetworkId:Attachment' :: Attachment -> Maybe Text
coreNetworkId} -> Maybe Text
coreNetworkId) (\s :: Attachment
s@Attachment' {} Maybe Text
a -> Attachment
s {$sel:coreNetworkId:Attachment' :: Maybe Text
coreNetworkId = Maybe Text
a} :: Attachment)

-- | The timestamp when the attachment was created.
attachment_createdAt :: Lens.Lens' Attachment (Prelude.Maybe Prelude.UTCTime)
attachment_createdAt :: Lens' Attachment (Maybe UTCTime)
attachment_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Attachment' :: Attachment -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Attachment
s@Attachment' {} Maybe POSIX
a -> Attachment
s {$sel:createdAt:Attachment' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Attachment) 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 Region where the edge is located.
attachment_edgeLocation :: Lens.Lens' Attachment (Prelude.Maybe Prelude.Text)
attachment_edgeLocation :: Lens' Attachment (Maybe Text)
attachment_edgeLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe Text
edgeLocation :: Maybe Text
$sel:edgeLocation:Attachment' :: Attachment -> Maybe Text
edgeLocation} -> Maybe Text
edgeLocation) (\s :: Attachment
s@Attachment' {} Maybe Text
a -> Attachment
s {$sel:edgeLocation:Attachment' :: Maybe Text
edgeLocation = Maybe Text
a} :: Attachment)

-- | The ID of the attachment account owner.
attachment_ownerAccountId :: Lens.Lens' Attachment (Prelude.Maybe Prelude.Text)
attachment_ownerAccountId :: Lens' Attachment (Maybe Text)
attachment_ownerAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe Text
ownerAccountId :: Maybe Text
$sel:ownerAccountId:Attachment' :: Attachment -> Maybe Text
ownerAccountId} -> Maybe Text
ownerAccountId) (\s :: Attachment
s@Attachment' {} Maybe Text
a -> Attachment
s {$sel:ownerAccountId:Attachment' :: Maybe Text
ownerAccountId = Maybe Text
a} :: Attachment)

-- | The attachment to move from one segment to another.
attachment_proposedSegmentChange :: Lens.Lens' Attachment (Prelude.Maybe ProposedSegmentChange)
attachment_proposedSegmentChange :: Lens' Attachment (Maybe ProposedSegmentChange)
attachment_proposedSegmentChange = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe ProposedSegmentChange
proposedSegmentChange :: Maybe ProposedSegmentChange
$sel:proposedSegmentChange:Attachment' :: Attachment -> Maybe ProposedSegmentChange
proposedSegmentChange} -> Maybe ProposedSegmentChange
proposedSegmentChange) (\s :: Attachment
s@Attachment' {} Maybe ProposedSegmentChange
a -> Attachment
s {$sel:proposedSegmentChange:Attachment' :: Maybe ProposedSegmentChange
proposedSegmentChange = Maybe ProposedSegmentChange
a} :: Attachment)

-- | The attachment resource ARN.
attachment_resourceArn :: Lens.Lens' Attachment (Prelude.Maybe Prelude.Text)
attachment_resourceArn :: Lens' Attachment (Maybe Text)
attachment_resourceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:Attachment' :: Attachment -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: Attachment
s@Attachment' {} Maybe Text
a -> Attachment
s {$sel:resourceArn:Attachment' :: Maybe Text
resourceArn = Maybe Text
a} :: Attachment)

-- | The name of the segment attachment.
attachment_segmentName :: Lens.Lens' Attachment (Prelude.Maybe Prelude.Text)
attachment_segmentName :: Lens' Attachment (Maybe Text)
attachment_segmentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe Text
segmentName :: Maybe Text
$sel:segmentName:Attachment' :: Attachment -> Maybe Text
segmentName} -> Maybe Text
segmentName) (\s :: Attachment
s@Attachment' {} Maybe Text
a -> Attachment
s {$sel:segmentName:Attachment' :: Maybe Text
segmentName = Maybe Text
a} :: Attachment)

-- | The state of the attachment.
attachment_state :: Lens.Lens' Attachment (Prelude.Maybe AttachmentState)
attachment_state :: Lens' Attachment (Maybe AttachmentState)
attachment_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe AttachmentState
state :: Maybe AttachmentState
$sel:state:Attachment' :: Attachment -> Maybe AttachmentState
state} -> Maybe AttachmentState
state) (\s :: Attachment
s@Attachment' {} Maybe AttachmentState
a -> Attachment
s {$sel:state:Attachment' :: Maybe AttachmentState
state = Maybe AttachmentState
a} :: Attachment)

-- | The tags associated with the attachment.
attachment_tags :: Lens.Lens' Attachment (Prelude.Maybe [Tag])
attachment_tags :: Lens' Attachment (Maybe [Tag])
attachment_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Attachment' :: Attachment -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Attachment
s@Attachment' {} Maybe [Tag]
a -> Attachment
s {$sel:tags:Attachment' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Attachment) 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 timestamp when the attachment was last updated.
attachment_updatedAt :: Lens.Lens' Attachment (Prelude.Maybe Prelude.UTCTime)
attachment_updatedAt :: Lens' Attachment (Maybe UTCTime)
attachment_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Attachment' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:Attachment' :: Attachment -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: Attachment
s@Attachment' {} Maybe POSIX
a -> Attachment
s {$sel:updatedAt:Attachment' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: Attachment) 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

instance Data.FromJSON Attachment where
  parseJSON :: Value -> Parser Attachment
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Attachment"
      ( \Object
x ->
          Maybe Text
-> Maybe Int
-> Maybe AttachmentType
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ProposedSegmentChange
-> Maybe Text
-> Maybe Text
-> Maybe AttachmentState
-> Maybe [Tag]
-> Maybe POSIX
-> Attachment
Attachment'
            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
"AttachmentId")
            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
"AttachmentPolicyRuleNumber")
            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
"AttachmentType")
            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
"CoreNetworkArn")
            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
"CoreNetworkId")
            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
"EdgeLocation")
            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
"OwnerAccountId")
            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
"ProposedSegmentChange")
            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
"ResourceArn")
            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
"SegmentName")
            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
"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
"UpdatedAt")
      )

instance Prelude.Hashable Attachment where
  hashWithSalt :: Int -> Attachment -> Int
hashWithSalt Int
_salt Attachment' {Maybe Int
Maybe [Tag]
Maybe Text
Maybe POSIX
Maybe AttachmentState
Maybe AttachmentType
Maybe ProposedSegmentChange
updatedAt :: Maybe POSIX
tags :: Maybe [Tag]
state :: Maybe AttachmentState
segmentName :: Maybe Text
resourceArn :: Maybe Text
proposedSegmentChange :: Maybe ProposedSegmentChange
ownerAccountId :: Maybe Text
edgeLocation :: Maybe Text
createdAt :: Maybe POSIX
coreNetworkId :: Maybe Text
coreNetworkArn :: Maybe Text
attachmentType :: Maybe AttachmentType
attachmentPolicyRuleNumber :: Maybe Int
attachmentId :: Maybe Text
$sel:updatedAt:Attachment' :: Attachment -> Maybe POSIX
$sel:tags:Attachment' :: Attachment -> Maybe [Tag]
$sel:state:Attachment' :: Attachment -> Maybe AttachmentState
$sel:segmentName:Attachment' :: Attachment -> Maybe Text
$sel:resourceArn:Attachment' :: Attachment -> Maybe Text
$sel:proposedSegmentChange:Attachment' :: Attachment -> Maybe ProposedSegmentChange
$sel:ownerAccountId:Attachment' :: Attachment -> Maybe Text
$sel:edgeLocation:Attachment' :: Attachment -> Maybe Text
$sel:createdAt:Attachment' :: Attachment -> Maybe POSIX
$sel:coreNetworkId:Attachment' :: Attachment -> Maybe Text
$sel:coreNetworkArn:Attachment' :: Attachment -> Maybe Text
$sel:attachmentType:Attachment' :: Attachment -> Maybe AttachmentType
$sel:attachmentPolicyRuleNumber:Attachment' :: Attachment -> Maybe Int
$sel:attachmentId:Attachment' :: Attachment -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
attachmentId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
attachmentPolicyRuleNumber
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AttachmentType
attachmentType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
coreNetworkArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
coreNetworkId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
edgeLocation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ownerAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProposedSegmentChange
proposedSegmentChange
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
segmentName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AttachmentState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
updatedAt

instance Prelude.NFData Attachment where
  rnf :: Attachment -> ()
rnf Attachment' {Maybe Int
Maybe [Tag]
Maybe Text
Maybe POSIX
Maybe AttachmentState
Maybe AttachmentType
Maybe ProposedSegmentChange
updatedAt :: Maybe POSIX
tags :: Maybe [Tag]
state :: Maybe AttachmentState
segmentName :: Maybe Text
resourceArn :: Maybe Text
proposedSegmentChange :: Maybe ProposedSegmentChange
ownerAccountId :: Maybe Text
edgeLocation :: Maybe Text
createdAt :: Maybe POSIX
coreNetworkId :: Maybe Text
coreNetworkArn :: Maybe Text
attachmentType :: Maybe AttachmentType
attachmentPolicyRuleNumber :: Maybe Int
attachmentId :: Maybe Text
$sel:updatedAt:Attachment' :: Attachment -> Maybe POSIX
$sel:tags:Attachment' :: Attachment -> Maybe [Tag]
$sel:state:Attachment' :: Attachment -> Maybe AttachmentState
$sel:segmentName:Attachment' :: Attachment -> Maybe Text
$sel:resourceArn:Attachment' :: Attachment -> Maybe Text
$sel:proposedSegmentChange:Attachment' :: Attachment -> Maybe ProposedSegmentChange
$sel:ownerAccountId:Attachment' :: Attachment -> Maybe Text
$sel:edgeLocation:Attachment' :: Attachment -> Maybe Text
$sel:createdAt:Attachment' :: Attachment -> Maybe POSIX
$sel:coreNetworkId:Attachment' :: Attachment -> Maybe Text
$sel:coreNetworkArn:Attachment' :: Attachment -> Maybe Text
$sel:attachmentType:Attachment' :: Attachment -> Maybe AttachmentType
$sel:attachmentPolicyRuleNumber:Attachment' :: Attachment -> Maybe Int
$sel:attachmentId:Attachment' :: Attachment -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
attachmentId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
attachmentPolicyRuleNumber
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AttachmentType
attachmentType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
coreNetworkArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
coreNetworkId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
edgeLocation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownerAccountId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProposedSegmentChange
proposedSegmentChange
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
segmentName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AttachmentState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
updatedAt