{-# 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.MediaTailor.Types.SegmentationDescriptor
-- 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.MediaTailor.Types.SegmentationDescriptor where

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

-- | The @segmentation_descriptor@ message can contain advanced metadata
-- fields, like content identifiers, to convey a wide range of information
-- about the ad break. MediaTailor writes the ad metadata in the egress
-- manifest as part of the @EXT-X-DATERANGE@ or @EventStream@ ad marker\'s
-- SCTE-35 data.
--
-- @segmentation_descriptor@ messages must be sent with the @time_signal@
-- message type.
--
-- See the @segmentation_descriptor()@ table of the 2022 SCTE-35
-- specification for more information.
--
-- /See:/ 'newSegmentationDescriptor' smart constructor.
data SegmentationDescriptor = SegmentationDescriptor'
  { -- | The segment number to assign to the
    -- @segmentation_descriptor.segment_num@ message, as defined in section
    -- 10.3.3.1 of the 2022 SCTE-35 specification Values must be between 0 and
    -- 256, inclusive. The default value is 0.
    SegmentationDescriptor -> Maybe Int
segmentNum :: Prelude.Maybe Prelude.Int,
    -- | The Event Identifier to assign to the
    -- @segmentation_descriptor.segmentation_event_id@ message, as defined in
    -- section 10.3.3.1 of the 2022 SCTE-35 specification. The default value is
    -- 1.
    SegmentationDescriptor -> Maybe Int
segmentationEventId :: Prelude.Maybe Prelude.Int,
    -- | The Type Identifier to assign to the
    -- @segmentation_descriptor.segmentation_type_id@ message, as defined in
    -- section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be
    -- between 0 and 256, inclusive. The default value is 48.
    SegmentationDescriptor -> Maybe Int
segmentationTypeId :: Prelude.Maybe Prelude.Int,
    -- | The Upid to assign to the @segmentation_descriptor.segmentation_upid@
    -- message, as defined in section 10.3.3.1 of the 2022 SCTE-35
    -- specification. The value must be a hexadecimal string containing only
    -- the characters 0 though 9 and A through F. The default value is \"\" (an
    -- empty string).
    SegmentationDescriptor -> Maybe Text
segmentationUpid :: Prelude.Maybe Prelude.Text,
    -- | The Upid Type to assign to the
    -- @segmentation_descriptor.segmentation_upid_type@ message, as defined in
    -- section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be
    -- between 0 and 256, inclusive. The default value is 14.
    SegmentationDescriptor -> Maybe Int
segmentationUpidType :: Prelude.Maybe Prelude.Int,
    -- | The number of segments expected, which is assigned to the
    -- @segmentation_descriptor.segments_expectedS@ message, as defined in
    -- section 10.3.3.1 of the 2022 SCTE-35 specification Values must be
    -- between 0 and 256, inclusive. The default value is 0.
    SegmentationDescriptor -> Maybe Int
segmentsExpected :: Prelude.Maybe Prelude.Int,
    -- | The sub-segment number to assign to the
    -- @segmentation_descriptor.sub_segment_num@ message, as defined in section
    -- 10.3.3.1 of the 2022 SCTE-35 specification. Values must be between 0 and
    -- 256, inclusive. The defualt value is null.
    SegmentationDescriptor -> Maybe Int
subSegmentNum :: Prelude.Maybe Prelude.Int,
    -- | The number of sub-segments expected, which is assigned to the
    -- @segmentation_descriptor.sub_segments_expected@ message, as defined in
    -- section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be
    -- between 0 and 256, inclusive. The default value is null.
    SegmentationDescriptor -> Maybe Int
subSegmentsExpected :: Prelude.Maybe Prelude.Int
  }
  deriving (SegmentationDescriptor -> SegmentationDescriptor -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SegmentationDescriptor -> SegmentationDescriptor -> Bool
$c/= :: SegmentationDescriptor -> SegmentationDescriptor -> Bool
== :: SegmentationDescriptor -> SegmentationDescriptor -> Bool
$c== :: SegmentationDescriptor -> SegmentationDescriptor -> Bool
Prelude.Eq, ReadPrec [SegmentationDescriptor]
ReadPrec SegmentationDescriptor
Int -> ReadS SegmentationDescriptor
ReadS [SegmentationDescriptor]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SegmentationDescriptor]
$creadListPrec :: ReadPrec [SegmentationDescriptor]
readPrec :: ReadPrec SegmentationDescriptor
$creadPrec :: ReadPrec SegmentationDescriptor
readList :: ReadS [SegmentationDescriptor]
$creadList :: ReadS [SegmentationDescriptor]
readsPrec :: Int -> ReadS SegmentationDescriptor
$creadsPrec :: Int -> ReadS SegmentationDescriptor
Prelude.Read, Int -> SegmentationDescriptor -> ShowS
[SegmentationDescriptor] -> ShowS
SegmentationDescriptor -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SegmentationDescriptor] -> ShowS
$cshowList :: [SegmentationDescriptor] -> ShowS
show :: SegmentationDescriptor -> String
$cshow :: SegmentationDescriptor -> String
showsPrec :: Int -> SegmentationDescriptor -> ShowS
$cshowsPrec :: Int -> SegmentationDescriptor -> ShowS
Prelude.Show, forall x. Rep SegmentationDescriptor x -> SegmentationDescriptor
forall x. SegmentationDescriptor -> Rep SegmentationDescriptor x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SegmentationDescriptor x -> SegmentationDescriptor
$cfrom :: forall x. SegmentationDescriptor -> Rep SegmentationDescriptor x
Prelude.Generic)

-- |
-- Create a value of 'SegmentationDescriptor' 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:
--
-- 'segmentNum', 'segmentationDescriptor_segmentNum' - The segment number to assign to the
-- @segmentation_descriptor.segment_num@ message, as defined in section
-- 10.3.3.1 of the 2022 SCTE-35 specification Values must be between 0 and
-- 256, inclusive. The default value is 0.
--
-- 'segmentationEventId', 'segmentationDescriptor_segmentationEventId' - The Event Identifier to assign to the
-- @segmentation_descriptor.segmentation_event_id@ message, as defined in
-- section 10.3.3.1 of the 2022 SCTE-35 specification. The default value is
-- 1.
--
-- 'segmentationTypeId', 'segmentationDescriptor_segmentationTypeId' - The Type Identifier to assign to the
-- @segmentation_descriptor.segmentation_type_id@ message, as defined in
-- section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be
-- between 0 and 256, inclusive. The default value is 48.
--
-- 'segmentationUpid', 'segmentationDescriptor_segmentationUpid' - The Upid to assign to the @segmentation_descriptor.segmentation_upid@
-- message, as defined in section 10.3.3.1 of the 2022 SCTE-35
-- specification. The value must be a hexadecimal string containing only
-- the characters 0 though 9 and A through F. The default value is \"\" (an
-- empty string).
--
-- 'segmentationUpidType', 'segmentationDescriptor_segmentationUpidType' - The Upid Type to assign to the
-- @segmentation_descriptor.segmentation_upid_type@ message, as defined in
-- section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be
-- between 0 and 256, inclusive. The default value is 14.
--
-- 'segmentsExpected', 'segmentationDescriptor_segmentsExpected' - The number of segments expected, which is assigned to the
-- @segmentation_descriptor.segments_expectedS@ message, as defined in
-- section 10.3.3.1 of the 2022 SCTE-35 specification Values must be
-- between 0 and 256, inclusive. The default value is 0.
--
-- 'subSegmentNum', 'segmentationDescriptor_subSegmentNum' - The sub-segment number to assign to the
-- @segmentation_descriptor.sub_segment_num@ message, as defined in section
-- 10.3.3.1 of the 2022 SCTE-35 specification. Values must be between 0 and
-- 256, inclusive. The defualt value is null.
--
-- 'subSegmentsExpected', 'segmentationDescriptor_subSegmentsExpected' - The number of sub-segments expected, which is assigned to the
-- @segmentation_descriptor.sub_segments_expected@ message, as defined in
-- section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be
-- between 0 and 256, inclusive. The default value is null.
newSegmentationDescriptor ::
  SegmentationDescriptor
newSegmentationDescriptor :: SegmentationDescriptor
newSegmentationDescriptor =
  SegmentationDescriptor'
    { $sel:segmentNum:SegmentationDescriptor' :: Maybe Int
segmentNum =
        forall a. Maybe a
Prelude.Nothing,
      $sel:segmentationEventId:SegmentationDescriptor' :: Maybe Int
segmentationEventId = forall a. Maybe a
Prelude.Nothing,
      $sel:segmentationTypeId:SegmentationDescriptor' :: Maybe Int
segmentationTypeId = forall a. Maybe a
Prelude.Nothing,
      $sel:segmentationUpid:SegmentationDescriptor' :: Maybe Text
segmentationUpid = forall a. Maybe a
Prelude.Nothing,
      $sel:segmentationUpidType:SegmentationDescriptor' :: Maybe Int
segmentationUpidType = forall a. Maybe a
Prelude.Nothing,
      $sel:segmentsExpected:SegmentationDescriptor' :: Maybe Int
segmentsExpected = forall a. Maybe a
Prelude.Nothing,
      $sel:subSegmentNum:SegmentationDescriptor' :: Maybe Int
subSegmentNum = forall a. Maybe a
Prelude.Nothing,
      $sel:subSegmentsExpected:SegmentationDescriptor' :: Maybe Int
subSegmentsExpected = forall a. Maybe a
Prelude.Nothing
    }

-- | The segment number to assign to the
-- @segmentation_descriptor.segment_num@ message, as defined in section
-- 10.3.3.1 of the 2022 SCTE-35 specification Values must be between 0 and
-- 256, inclusive. The default value is 0.
segmentationDescriptor_segmentNum :: Lens.Lens' SegmentationDescriptor (Prelude.Maybe Prelude.Int)
segmentationDescriptor_segmentNum :: Lens' SegmentationDescriptor (Maybe Int)
segmentationDescriptor_segmentNum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentationDescriptor' {Maybe Int
segmentNum :: Maybe Int
$sel:segmentNum:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
segmentNum} -> Maybe Int
segmentNum) (\s :: SegmentationDescriptor
s@SegmentationDescriptor' {} Maybe Int
a -> SegmentationDescriptor
s {$sel:segmentNum:SegmentationDescriptor' :: Maybe Int
segmentNum = Maybe Int
a} :: SegmentationDescriptor)

-- | The Event Identifier to assign to the
-- @segmentation_descriptor.segmentation_event_id@ message, as defined in
-- section 10.3.3.1 of the 2022 SCTE-35 specification. The default value is
-- 1.
segmentationDescriptor_segmentationEventId :: Lens.Lens' SegmentationDescriptor (Prelude.Maybe Prelude.Int)
segmentationDescriptor_segmentationEventId :: Lens' SegmentationDescriptor (Maybe Int)
segmentationDescriptor_segmentationEventId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentationDescriptor' {Maybe Int
segmentationEventId :: Maybe Int
$sel:segmentationEventId:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
segmentationEventId} -> Maybe Int
segmentationEventId) (\s :: SegmentationDescriptor
s@SegmentationDescriptor' {} Maybe Int
a -> SegmentationDescriptor
s {$sel:segmentationEventId:SegmentationDescriptor' :: Maybe Int
segmentationEventId = Maybe Int
a} :: SegmentationDescriptor)

-- | The Type Identifier to assign to the
-- @segmentation_descriptor.segmentation_type_id@ message, as defined in
-- section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be
-- between 0 and 256, inclusive. The default value is 48.
segmentationDescriptor_segmentationTypeId :: Lens.Lens' SegmentationDescriptor (Prelude.Maybe Prelude.Int)
segmentationDescriptor_segmentationTypeId :: Lens' SegmentationDescriptor (Maybe Int)
segmentationDescriptor_segmentationTypeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentationDescriptor' {Maybe Int
segmentationTypeId :: Maybe Int
$sel:segmentationTypeId:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
segmentationTypeId} -> Maybe Int
segmentationTypeId) (\s :: SegmentationDescriptor
s@SegmentationDescriptor' {} Maybe Int
a -> SegmentationDescriptor
s {$sel:segmentationTypeId:SegmentationDescriptor' :: Maybe Int
segmentationTypeId = Maybe Int
a} :: SegmentationDescriptor)

-- | The Upid to assign to the @segmentation_descriptor.segmentation_upid@
-- message, as defined in section 10.3.3.1 of the 2022 SCTE-35
-- specification. The value must be a hexadecimal string containing only
-- the characters 0 though 9 and A through F. The default value is \"\" (an
-- empty string).
segmentationDescriptor_segmentationUpid :: Lens.Lens' SegmentationDescriptor (Prelude.Maybe Prelude.Text)
segmentationDescriptor_segmentationUpid :: Lens' SegmentationDescriptor (Maybe Text)
segmentationDescriptor_segmentationUpid = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentationDescriptor' {Maybe Text
segmentationUpid :: Maybe Text
$sel:segmentationUpid:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Text
segmentationUpid} -> Maybe Text
segmentationUpid) (\s :: SegmentationDescriptor
s@SegmentationDescriptor' {} Maybe Text
a -> SegmentationDescriptor
s {$sel:segmentationUpid:SegmentationDescriptor' :: Maybe Text
segmentationUpid = Maybe Text
a} :: SegmentationDescriptor)

-- | The Upid Type to assign to the
-- @segmentation_descriptor.segmentation_upid_type@ message, as defined in
-- section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be
-- between 0 and 256, inclusive. The default value is 14.
segmentationDescriptor_segmentationUpidType :: Lens.Lens' SegmentationDescriptor (Prelude.Maybe Prelude.Int)
segmentationDescriptor_segmentationUpidType :: Lens' SegmentationDescriptor (Maybe Int)
segmentationDescriptor_segmentationUpidType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentationDescriptor' {Maybe Int
segmentationUpidType :: Maybe Int
$sel:segmentationUpidType:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
segmentationUpidType} -> Maybe Int
segmentationUpidType) (\s :: SegmentationDescriptor
s@SegmentationDescriptor' {} Maybe Int
a -> SegmentationDescriptor
s {$sel:segmentationUpidType:SegmentationDescriptor' :: Maybe Int
segmentationUpidType = Maybe Int
a} :: SegmentationDescriptor)

-- | The number of segments expected, which is assigned to the
-- @segmentation_descriptor.segments_expectedS@ message, as defined in
-- section 10.3.3.1 of the 2022 SCTE-35 specification Values must be
-- between 0 and 256, inclusive. The default value is 0.
segmentationDescriptor_segmentsExpected :: Lens.Lens' SegmentationDescriptor (Prelude.Maybe Prelude.Int)
segmentationDescriptor_segmentsExpected :: Lens' SegmentationDescriptor (Maybe Int)
segmentationDescriptor_segmentsExpected = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentationDescriptor' {Maybe Int
segmentsExpected :: Maybe Int
$sel:segmentsExpected:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
segmentsExpected} -> Maybe Int
segmentsExpected) (\s :: SegmentationDescriptor
s@SegmentationDescriptor' {} Maybe Int
a -> SegmentationDescriptor
s {$sel:segmentsExpected:SegmentationDescriptor' :: Maybe Int
segmentsExpected = Maybe Int
a} :: SegmentationDescriptor)

-- | The sub-segment number to assign to the
-- @segmentation_descriptor.sub_segment_num@ message, as defined in section
-- 10.3.3.1 of the 2022 SCTE-35 specification. Values must be between 0 and
-- 256, inclusive. The defualt value is null.
segmentationDescriptor_subSegmentNum :: Lens.Lens' SegmentationDescriptor (Prelude.Maybe Prelude.Int)
segmentationDescriptor_subSegmentNum :: Lens' SegmentationDescriptor (Maybe Int)
segmentationDescriptor_subSegmentNum = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentationDescriptor' {Maybe Int
subSegmentNum :: Maybe Int
$sel:subSegmentNum:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
subSegmentNum} -> Maybe Int
subSegmentNum) (\s :: SegmentationDescriptor
s@SegmentationDescriptor' {} Maybe Int
a -> SegmentationDescriptor
s {$sel:subSegmentNum:SegmentationDescriptor' :: Maybe Int
subSegmentNum = Maybe Int
a} :: SegmentationDescriptor)

-- | The number of sub-segments expected, which is assigned to the
-- @segmentation_descriptor.sub_segments_expected@ message, as defined in
-- section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be
-- between 0 and 256, inclusive. The default value is null.
segmentationDescriptor_subSegmentsExpected :: Lens.Lens' SegmentationDescriptor (Prelude.Maybe Prelude.Int)
segmentationDescriptor_subSegmentsExpected :: Lens' SegmentationDescriptor (Maybe Int)
segmentationDescriptor_subSegmentsExpected = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SegmentationDescriptor' {Maybe Int
subSegmentsExpected :: Maybe Int
$sel:subSegmentsExpected:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
subSegmentsExpected} -> Maybe Int
subSegmentsExpected) (\s :: SegmentationDescriptor
s@SegmentationDescriptor' {} Maybe Int
a -> SegmentationDescriptor
s {$sel:subSegmentsExpected:SegmentationDescriptor' :: Maybe Int
subSegmentsExpected = Maybe Int
a} :: SegmentationDescriptor)

instance Data.FromJSON SegmentationDescriptor where
  parseJSON :: Value -> Parser SegmentationDescriptor
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"SegmentationDescriptor"
      ( \Object
x ->
          Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> SegmentationDescriptor
SegmentationDescriptor'
            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
"SegmentNum")
            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
"SegmentationEventId")
            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
"SegmentationTypeId")
            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
"SegmentationUpid")
            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
"SegmentationUpidType")
            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
"SegmentsExpected")
            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
"SubSegmentNum")
            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
"SubSegmentsExpected")
      )

instance Prelude.Hashable SegmentationDescriptor where
  hashWithSalt :: Int -> SegmentationDescriptor -> Int
hashWithSalt Int
_salt SegmentationDescriptor' {Maybe Int
Maybe Text
subSegmentsExpected :: Maybe Int
subSegmentNum :: Maybe Int
segmentsExpected :: Maybe Int
segmentationUpidType :: Maybe Int
segmentationUpid :: Maybe Text
segmentationTypeId :: Maybe Int
segmentationEventId :: Maybe Int
segmentNum :: Maybe Int
$sel:subSegmentsExpected:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:subSegmentNum:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentsExpected:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentationUpidType:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentationUpid:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Text
$sel:segmentationTypeId:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentationEventId:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentNum:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
segmentNum
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
segmentationEventId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
segmentationTypeId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
segmentationUpid
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
segmentationUpidType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
segmentsExpected
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
subSegmentNum
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
subSegmentsExpected

instance Prelude.NFData SegmentationDescriptor where
  rnf :: SegmentationDescriptor -> ()
rnf SegmentationDescriptor' {Maybe Int
Maybe Text
subSegmentsExpected :: Maybe Int
subSegmentNum :: Maybe Int
segmentsExpected :: Maybe Int
segmentationUpidType :: Maybe Int
segmentationUpid :: Maybe Text
segmentationTypeId :: Maybe Int
segmentationEventId :: Maybe Int
segmentNum :: Maybe Int
$sel:subSegmentsExpected:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:subSegmentNum:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentsExpected:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentationUpidType:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentationUpid:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Text
$sel:segmentationTypeId:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentationEventId:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentNum:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
segmentNum
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
segmentationEventId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
segmentationTypeId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
segmentationUpid
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
segmentationUpidType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
segmentsExpected
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
subSegmentNum
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
subSegmentsExpected

instance Data.ToJSON SegmentationDescriptor where
  toJSON :: SegmentationDescriptor -> Value
toJSON SegmentationDescriptor' {Maybe Int
Maybe Text
subSegmentsExpected :: Maybe Int
subSegmentNum :: Maybe Int
segmentsExpected :: Maybe Int
segmentationUpidType :: Maybe Int
segmentationUpid :: Maybe Text
segmentationTypeId :: Maybe Int
segmentationEventId :: Maybe Int
segmentNum :: Maybe Int
$sel:subSegmentsExpected:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:subSegmentNum:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentsExpected:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentationUpidType:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentationUpid:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Text
$sel:segmentationTypeId:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentationEventId:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
$sel:segmentNum:SegmentationDescriptor' :: SegmentationDescriptor -> Maybe Int
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"SegmentNum" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
segmentNum,
            (Key
"SegmentationEventId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
segmentationEventId,
            (Key
"SegmentationTypeId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
segmentationTypeId,
            (Key
"SegmentationUpid" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
segmentationUpid,
            (Key
"SegmentationUpidType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
segmentationUpidType,
            (Key
"SegmentsExpected" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
segmentsExpected,
            (Key
"SubSegmentNum" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
subSegmentNum,
            (Key
"SubSegmentsExpected" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
subSegmentsExpected
          ]
      )