{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric      #-}
{-# LANGUAGE NoImplicitPrelude  #-}
{-# LANGUAGE OverloadedStrings  #-}
{-# LANGUAGE RecordWildCards    #-}

{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- |
-- Module      : Network.Google.Docs.Types.Product
-- Copyright   : (c) 2015-2016 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
module Network.Google.Docs.Types.Product where

import           Network.Google.Docs.Types.Sum
import           Network.Google.Prelude

-- | A mask that indicates which of the fields on the base TableCellStyle
-- have been changed in this suggestion. For any field set to true, there
-- is a new suggested value.
--
-- /See:/ 'tableCellStyleSuggestionState' smart constructor.
data TableCellStyleSuggestionState =
  TableCellStyleSuggestionState'
    { _tcsssPaddingLeftSuggested      :: !(Maybe Bool)
    , _tcsssPaddingTopSuggested       :: !(Maybe Bool)
    , _tcsssBOrderTopSuggested        :: !(Maybe Bool)
    , _tcsssRowSpanSuggested          :: !(Maybe Bool)
    , _tcsssPaddingBottomSuggested    :: !(Maybe Bool)
    , _tcsssBOrderBottomSuggested     :: !(Maybe Bool)
    , _tcsssPaddingRightSuggested     :: !(Maybe Bool)
    , _tcsssColumnSpanSuggested       :: !(Maybe Bool)
    , _tcsssBOrderLeftSuggested       :: !(Maybe Bool)
    , _tcsssContentAlignmentSuggested :: !(Maybe Bool)
    , _tcsssBackgRoundColorSuggested  :: !(Maybe Bool)
    , _tcsssBOrderRightSuggested      :: !(Maybe Bool)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'TableCellStyleSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tcsssPaddingLeftSuggested'
--
-- * 'tcsssPaddingTopSuggested'
--
-- * 'tcsssBOrderTopSuggested'
--
-- * 'tcsssRowSpanSuggested'
--
-- * 'tcsssPaddingBottomSuggested'
--
-- * 'tcsssBOrderBottomSuggested'
--
-- * 'tcsssPaddingRightSuggested'
--
-- * 'tcsssColumnSpanSuggested'
--
-- * 'tcsssBOrderLeftSuggested'
--
-- * 'tcsssContentAlignmentSuggested'
--
-- * 'tcsssBackgRoundColorSuggested'
--
-- * 'tcsssBOrderRightSuggested'
tableCellStyleSuggestionState
    :: TableCellStyleSuggestionState
tableCellStyleSuggestionState =
  TableCellStyleSuggestionState'
    { _tcsssPaddingLeftSuggested = Nothing
    , _tcsssPaddingTopSuggested = Nothing
    , _tcsssBOrderTopSuggested = Nothing
    , _tcsssRowSpanSuggested = Nothing
    , _tcsssPaddingBottomSuggested = Nothing
    , _tcsssBOrderBottomSuggested = Nothing
    , _tcsssPaddingRightSuggested = Nothing
    , _tcsssColumnSpanSuggested = Nothing
    , _tcsssBOrderLeftSuggested = Nothing
    , _tcsssContentAlignmentSuggested = Nothing
    , _tcsssBackgRoundColorSuggested = Nothing
    , _tcsssBOrderRightSuggested = Nothing
    }


-- | Indicates if there was a suggested change to padding_left.
tcsssPaddingLeftSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool)
tcsssPaddingLeftSuggested
  = lens _tcsssPaddingLeftSuggested
      (\ s a -> s{_tcsssPaddingLeftSuggested = a})

-- | Indicates if there was a suggested change to padding_top.
tcsssPaddingTopSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool)
tcsssPaddingTopSuggested
  = lens _tcsssPaddingTopSuggested
      (\ s a -> s{_tcsssPaddingTopSuggested = a})

-- | Indicates if there was a suggested change to border_top.
tcsssBOrderTopSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool)
tcsssBOrderTopSuggested
  = lens _tcsssBOrderTopSuggested
      (\ s a -> s{_tcsssBOrderTopSuggested = a})

-- | Indicates if there was a suggested change to row_span.
tcsssRowSpanSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool)
tcsssRowSpanSuggested
  = lens _tcsssRowSpanSuggested
      (\ s a -> s{_tcsssRowSpanSuggested = a})

-- | Indicates if there was a suggested change to padding_bottom.
tcsssPaddingBottomSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool)
tcsssPaddingBottomSuggested
  = lens _tcsssPaddingBottomSuggested
      (\ s a -> s{_tcsssPaddingBottomSuggested = a})

-- | Indicates if there was a suggested change to border_bottom.
tcsssBOrderBottomSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool)
tcsssBOrderBottomSuggested
  = lens _tcsssBOrderBottomSuggested
      (\ s a -> s{_tcsssBOrderBottomSuggested = a})

-- | Indicates if there was a suggested change to padding_right.
tcsssPaddingRightSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool)
tcsssPaddingRightSuggested
  = lens _tcsssPaddingRightSuggested
      (\ s a -> s{_tcsssPaddingRightSuggested = a})

-- | Indicates if there was a suggested change to column_span.
tcsssColumnSpanSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool)
tcsssColumnSpanSuggested
  = lens _tcsssColumnSpanSuggested
      (\ s a -> s{_tcsssColumnSpanSuggested = a})

-- | Indicates if there was a suggested change to border_left.
tcsssBOrderLeftSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool)
tcsssBOrderLeftSuggested
  = lens _tcsssBOrderLeftSuggested
      (\ s a -> s{_tcsssBOrderLeftSuggested = a})

-- | Indicates if there was a suggested change to content_alignment.
tcsssContentAlignmentSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool)
tcsssContentAlignmentSuggested
  = lens _tcsssContentAlignmentSuggested
      (\ s a -> s{_tcsssContentAlignmentSuggested = a})

-- | Indicates if there was a suggested change to background_color.
tcsssBackgRoundColorSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool)
tcsssBackgRoundColorSuggested
  = lens _tcsssBackgRoundColorSuggested
      (\ s a -> s{_tcsssBackgRoundColorSuggested = a})

-- | Indicates if there was a suggested change to border_right.
tcsssBOrderRightSuggested :: Lens' TableCellStyleSuggestionState (Maybe Bool)
tcsssBOrderRightSuggested
  = lens _tcsssBOrderRightSuggested
      (\ s a -> s{_tcsssBOrderRightSuggested = a})

instance FromJSON TableCellStyleSuggestionState where
        parseJSON
          = withObject "TableCellStyleSuggestionState"
              (\ o ->
                 TableCellStyleSuggestionState' <$>
                   (o .:? "paddingLeftSuggested") <*>
                     (o .:? "paddingTopSuggested")
                     <*> (o .:? "borderTopSuggested")
                     <*> (o .:? "rowSpanSuggested")
                     <*> (o .:? "paddingBottomSuggested")
                     <*> (o .:? "borderBottomSuggested")
                     <*> (o .:? "paddingRightSuggested")
                     <*> (o .:? "columnSpanSuggested")
                     <*> (o .:? "borderLeftSuggested")
                     <*> (o .:? "contentAlignmentSuggested")
                     <*> (o .:? "backgroundColorSuggested")
                     <*> (o .:? "borderRightSuggested"))

instance ToJSON TableCellStyleSuggestionState where
        toJSON TableCellStyleSuggestionState'{..}
          = object
              (catMaybes
                 [("paddingLeftSuggested" .=) <$>
                    _tcsssPaddingLeftSuggested,
                  ("paddingTopSuggested" .=) <$>
                    _tcsssPaddingTopSuggested,
                  ("borderTopSuggested" .=) <$>
                    _tcsssBOrderTopSuggested,
                  ("rowSpanSuggested" .=) <$> _tcsssRowSpanSuggested,
                  ("paddingBottomSuggested" .=) <$>
                    _tcsssPaddingBottomSuggested,
                  ("borderBottomSuggested" .=) <$>
                    _tcsssBOrderBottomSuggested,
                  ("paddingRightSuggested" .=) <$>
                    _tcsssPaddingRightSuggested,
                  ("columnSpanSuggested" .=) <$>
                    _tcsssColumnSpanSuggested,
                  ("borderLeftSuggested" .=) <$>
                    _tcsssBOrderLeftSuggested,
                  ("contentAlignmentSuggested" .=) <$>
                    _tcsssContentAlignmentSuggested,
                  ("backgroundColorSuggested" .=) <$>
                    _tcsssBackgRoundColorSuggested,
                  ("borderRightSuggested" .=) <$>
                    _tcsssBOrderRightSuggested])

-- | A mask that indicates which of the fields on the base
-- EmbeddedObjectBorder have been changed in this suggestion. For any field
-- set to true, there is a new suggested value.
--
-- /See:/ 'embeddedObjectBOrderSuggestionState' smart constructor.
data EmbeddedObjectBOrderSuggestionState =
  EmbeddedObjectBOrderSuggestionState'
    { _eobossDashStyleSuggested     :: !(Maybe Bool)
    , _eobossPropertyStateSuggested :: !(Maybe Bool)
    , _eobossColorSuggested         :: !(Maybe Bool)
    , _eobossWidthSuggested         :: !(Maybe Bool)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'EmbeddedObjectBOrderSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'eobossDashStyleSuggested'
--
-- * 'eobossPropertyStateSuggested'
--
-- * 'eobossColorSuggested'
--
-- * 'eobossWidthSuggested'
embeddedObjectBOrderSuggestionState
    :: EmbeddedObjectBOrderSuggestionState
embeddedObjectBOrderSuggestionState =
  EmbeddedObjectBOrderSuggestionState'
    { _eobossDashStyleSuggested = Nothing
    , _eobossPropertyStateSuggested = Nothing
    , _eobossColorSuggested = Nothing
    , _eobossWidthSuggested = Nothing
    }


-- | Indicates if there was a suggested change to dash_style.
eobossDashStyleSuggested :: Lens' EmbeddedObjectBOrderSuggestionState (Maybe Bool)
eobossDashStyleSuggested
  = lens _eobossDashStyleSuggested
      (\ s a -> s{_eobossDashStyleSuggested = a})

-- | Indicates if there was a suggested change to property_state.
eobossPropertyStateSuggested :: Lens' EmbeddedObjectBOrderSuggestionState (Maybe Bool)
eobossPropertyStateSuggested
  = lens _eobossPropertyStateSuggested
      (\ s a -> s{_eobossPropertyStateSuggested = a})

-- | Indicates if there was a suggested change to color.
eobossColorSuggested :: Lens' EmbeddedObjectBOrderSuggestionState (Maybe Bool)
eobossColorSuggested
  = lens _eobossColorSuggested
      (\ s a -> s{_eobossColorSuggested = a})

-- | Indicates if there was a suggested change to width.
eobossWidthSuggested :: Lens' EmbeddedObjectBOrderSuggestionState (Maybe Bool)
eobossWidthSuggested
  = lens _eobossWidthSuggested
      (\ s a -> s{_eobossWidthSuggested = a})

instance FromJSON EmbeddedObjectBOrderSuggestionState
         where
        parseJSON
          = withObject "EmbeddedObjectBOrderSuggestionState"
              (\ o ->
                 EmbeddedObjectBOrderSuggestionState' <$>
                   (o .:? "dashStyleSuggested") <*>
                     (o .:? "propertyStateSuggested")
                     <*> (o .:? "colorSuggested")
                     <*> (o .:? "widthSuggested"))

instance ToJSON EmbeddedObjectBOrderSuggestionState
         where
        toJSON EmbeddedObjectBOrderSuggestionState'{..}
          = object
              (catMaybes
                 [("dashStyleSuggested" .=) <$>
                    _eobossDashStyleSuggested,
                  ("propertyStateSuggested" .=) <$>
                    _eobossPropertyStateSuggested,
                  ("colorSuggested" .=) <$> _eobossColorSuggested,
                  ("widthSuggested" .=) <$> _eobossWidthSuggested])

-- | A border around a table cell. Table cell borders cannot be transparent.
-- To hide a table cell border, make its width 0.
--
-- /See:/ 'tableCellBOrder' smart constructor.
data TableCellBOrder =
  TableCellBOrder'
    { _tcboColor     :: !(Maybe OptionalColor)
    , _tcboWidth     :: !(Maybe Dimension)
    , _tcboDashStyle :: !(Maybe TableCellBOrderDashStyle)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'TableCellBOrder' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tcboColor'
--
-- * 'tcboWidth'
--
-- * 'tcboDashStyle'
tableCellBOrder
    :: TableCellBOrder
tableCellBOrder =
  TableCellBOrder'
    {_tcboColor = Nothing, _tcboWidth = Nothing, _tcboDashStyle = Nothing}


-- | The color of the border. This color cannot be transparent.
tcboColor :: Lens' TableCellBOrder (Maybe OptionalColor)
tcboColor
  = lens _tcboColor (\ s a -> s{_tcboColor = a})

-- | The width of the border.
tcboWidth :: Lens' TableCellBOrder (Maybe Dimension)
tcboWidth
  = lens _tcboWidth (\ s a -> s{_tcboWidth = a})

-- | The dash style of the border.
tcboDashStyle :: Lens' TableCellBOrder (Maybe TableCellBOrderDashStyle)
tcboDashStyle
  = lens _tcboDashStyle
      (\ s a -> s{_tcboDashStyle = a})

instance FromJSON TableCellBOrder where
        parseJSON
          = withObject "TableCellBOrder"
              (\ o ->
                 TableCellBOrder' <$>
                   (o .:? "color") <*> (o .:? "width") <*>
                     (o .:? "dashStyle"))

instance ToJSON TableCellBOrder where
        toJSON TableCellBOrder'{..}
          = object
              (catMaybes
                 [("color" .=) <$> _tcboColor,
                  ("width" .=) <$> _tcboWidth,
                  ("dashStyle" .=) <$> _tcboDashStyle])

-- | Deletes a row from a table.
--
-- /See:/ 'deleteTableRowRequest' smart constructor.
newtype DeleteTableRowRequest =
  DeleteTableRowRequest'
    { _dtrrTableCellLocation :: Maybe TableCellLocation
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'DeleteTableRowRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtrrTableCellLocation'
deleteTableRowRequest
    :: DeleteTableRowRequest
deleteTableRowRequest =
  DeleteTableRowRequest' {_dtrrTableCellLocation = Nothing}


-- | The reference table cell location from which the row will be deleted.
-- The row this cell spans will be deleted. If this is a merged cell that
-- spans multiple rows, all rows that the cell spans will be deleted. If no
-- rows remain in the table after this deletion, the whole table is
-- deleted.
dtrrTableCellLocation :: Lens' DeleteTableRowRequest (Maybe TableCellLocation)
dtrrTableCellLocation
  = lens _dtrrTableCellLocation
      (\ s a -> s{_dtrrTableCellLocation = a})

instance FromJSON DeleteTableRowRequest where
        parseJSON
          = withObject "DeleteTableRowRequest"
              (\ o ->
                 DeleteTableRowRequest' <$>
                   (o .:? "tableCellLocation"))

instance ToJSON DeleteTableRowRequest where
        toJSON DeleteTableRowRequest'{..}
          = object
              (catMaybes
                 [("tableCellLocation" .=) <$>
                    _dtrrTableCellLocation])

-- | The suggestion state of a NamedStyles message.
--
-- /See:/ 'namedStylesSuggestionState' smart constructor.
newtype NamedStylesSuggestionState =
  NamedStylesSuggestionState'
    { _nsssStylesSuggestionStates :: Maybe [NamedStyleSuggestionState]
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'NamedStylesSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nsssStylesSuggestionStates'
namedStylesSuggestionState
    :: NamedStylesSuggestionState
namedStylesSuggestionState =
  NamedStylesSuggestionState' {_nsssStylesSuggestionStates = Nothing}


-- | A mask that indicates which of the fields on the corresponding
-- NamedStyle in styles have been changed in this suggestion. The order of
-- these named style suggestion states match the order of the corresponding
-- named style within the named styles suggestion.
nsssStylesSuggestionStates :: Lens' NamedStylesSuggestionState [NamedStyleSuggestionState]
nsssStylesSuggestionStates
  = lens _nsssStylesSuggestionStates
      (\ s a -> s{_nsssStylesSuggestionStates = a})
      . _Default
      . _Coerce

instance FromJSON NamedStylesSuggestionState where
        parseJSON
          = withObject "NamedStylesSuggestionState"
              (\ o ->
                 NamedStylesSuggestionState' <$>
                   (o .:? "stylesSuggestionStates" .!= mempty))

instance ToJSON NamedStylesSuggestionState where
        toJSON NamedStylesSuggestionState'{..}
          = object
              (catMaybes
                 [("stylesSuggestionStates" .=) <$>
                    _nsssStylesSuggestionStates])

-- | The positioning of a PositionedObject. The positioned object is
-- positioned relative to the beginning of the Paragraph it is tethered to.
--
-- /See:/ 'positionedObjectPositioning' smart constructor.
data PositionedObjectPositioning =
  PositionedObjectPositioning'
    { _popLayout     :: !(Maybe PositionedObjectPositioningLayout)
    , _popTopOffSet  :: !(Maybe Dimension)
    , _popLeftOffSet :: !(Maybe Dimension)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'PositionedObjectPositioning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'popLayout'
--
-- * 'popTopOffSet'
--
-- * 'popLeftOffSet'
positionedObjectPositioning
    :: PositionedObjectPositioning
positionedObjectPositioning =
  PositionedObjectPositioning'
    {_popLayout = Nothing, _popTopOffSet = Nothing, _popLeftOffSet = Nothing}


-- | The layout of this positioned object.
popLayout :: Lens' PositionedObjectPositioning (Maybe PositionedObjectPositioningLayout)
popLayout
  = lens _popLayout (\ s a -> s{_popLayout = a})

-- | The offset of the top edge of the positioned object relative to the
-- beginning of the Paragraph it is tethered to. The exact positioning of
-- the object can depend on other content in the document and the
-- document\'s styling.
popTopOffSet :: Lens' PositionedObjectPositioning (Maybe Dimension)
popTopOffSet
  = lens _popTopOffSet (\ s a -> s{_popTopOffSet = a})

-- | The offset of the left edge of the positioned object relative to the
-- beginning of the Paragraph it is tethered to. The exact positioning of
-- the object can depend on other content in the document and the
-- document\'s styling.
popLeftOffSet :: Lens' PositionedObjectPositioning (Maybe Dimension)
popLeftOffSet
  = lens _popLeftOffSet
      (\ s a -> s{_popLeftOffSet = a})

instance FromJSON PositionedObjectPositioning where
        parseJSON
          = withObject "PositionedObjectPositioning"
              (\ o ->
                 PositionedObjectPositioning' <$>
                   (o .:? "layout") <*> (o .:? "topOffset") <*>
                     (o .:? "leftOffset"))

instance ToJSON PositionedObjectPositioning where
        toJSON PositionedObjectPositioning'{..}
          = object
              (catMaybes
                 [("layout" .=) <$> _popLayout,
                  ("topOffset" .=) <$> _popTopOffSet,
                  ("leftOffset" .=) <$> _popLeftOffSet])

-- | A suggested change to a ParagraphStyle.
--
-- /See:/ 'suggestedParagraphStyle' smart constructor.
data SuggestedParagraphStyle =
  SuggestedParagraphStyle'
    { _spsParagraphStyleSuggestionState :: !(Maybe ParagraphStyleSuggestionState)
    , _spsParagraphStyle                :: !(Maybe ParagraphStyle)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'SuggestedParagraphStyle' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'spsParagraphStyleSuggestionState'
--
-- * 'spsParagraphStyle'
suggestedParagraphStyle
    :: SuggestedParagraphStyle
suggestedParagraphStyle =
  SuggestedParagraphStyle'
    {_spsParagraphStyleSuggestionState = Nothing, _spsParagraphStyle = Nothing}


-- | A mask that indicates which of the fields on the base ParagraphStyle
-- have been changed in this suggestion.
spsParagraphStyleSuggestionState :: Lens' SuggestedParagraphStyle (Maybe ParagraphStyleSuggestionState)
spsParagraphStyleSuggestionState
  = lens _spsParagraphStyleSuggestionState
      (\ s a -> s{_spsParagraphStyleSuggestionState = a})

-- | A ParagraphStyle that only includes the changes made in this suggestion.
-- This can be used along with the paragraph_suggestion_state to see which
-- fields have changed and their new values.
spsParagraphStyle :: Lens' SuggestedParagraphStyle (Maybe ParagraphStyle)
spsParagraphStyle
  = lens _spsParagraphStyle
      (\ s a -> s{_spsParagraphStyle = a})

instance FromJSON SuggestedParagraphStyle where
        parseJSON
          = withObject "SuggestedParagraphStyle"
              (\ o ->
                 SuggestedParagraphStyle' <$>
                   (o .:? "paragraphStyleSuggestionState") <*>
                     (o .:? "paragraphStyle"))

instance ToJSON SuggestedParagraphStyle where
        toJSON SuggestedParagraphStyle'{..}
          = object
              (catMaybes
                 [("paragraphStyleSuggestionState" .=) <$>
                    _spsParagraphStyleSuggestionState,
                  ("paragraphStyle" .=) <$> _spsParagraphStyle])

-- | Properties of a PositionedObject.
--
-- /See:/ 'positionedObjectProperties' smart constructor.
data PositionedObjectProperties =
  PositionedObjectProperties'
    { _popEmbeddedObject :: !(Maybe EmbeddedObject)
    , _popPositioning    :: !(Maybe PositionedObjectPositioning)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'PositionedObjectProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'popEmbeddedObject'
--
-- * 'popPositioning'
positionedObjectProperties
    :: PositionedObjectProperties
positionedObjectProperties =
  PositionedObjectProperties'
    {_popEmbeddedObject = Nothing, _popPositioning = Nothing}


-- | The embedded object of this positioned object.
popEmbeddedObject :: Lens' PositionedObjectProperties (Maybe EmbeddedObject)
popEmbeddedObject
  = lens _popEmbeddedObject
      (\ s a -> s{_popEmbeddedObject = a})

-- | The positioning of this positioned object relative to the newline of the
-- Paragraph that references this positioned object.
popPositioning :: Lens' PositionedObjectProperties (Maybe PositionedObjectPositioning)
popPositioning
  = lens _popPositioning
      (\ s a -> s{_popPositioning = a})

instance FromJSON PositionedObjectProperties where
        parseJSON
          = withObject "PositionedObjectProperties"
              (\ o ->
                 PositionedObjectProperties' <$>
                   (o .:? "embeddedObject") <*> (o .:? "positioning"))

instance ToJSON PositionedObjectProperties where
        toJSON PositionedObjectProperties'{..}
          = object
              (catMaybes
                 [("embeddedObject" .=) <$> _popEmbeddedObject,
                  ("positioning" .=) <$> _popPositioning])

-- | A named style. Paragraphs in the document can inherit their TextStyle
-- and ParagraphStyle from this named style when they have the same named
-- style type.
--
-- /See:/ 'namedStyle' smart constructor.
data NamedStyle =
  NamedStyle'
    { _nsNamedStyleType :: !(Maybe NamedStyleNamedStyleType)
    , _nsTextStyle      :: !(Maybe TextStyle)
    , _nsParagraphStyle :: !(Maybe ParagraphStyle)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'NamedStyle' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nsNamedStyleType'
--
-- * 'nsTextStyle'
--
-- * 'nsParagraphStyle'
namedStyle
    :: NamedStyle
namedStyle =
  NamedStyle'
    { _nsNamedStyleType = Nothing
    , _nsTextStyle = Nothing
    , _nsParagraphStyle = Nothing
    }


-- | The type of this named style.
nsNamedStyleType :: Lens' NamedStyle (Maybe NamedStyleNamedStyleType)
nsNamedStyleType
  = lens _nsNamedStyleType
      (\ s a -> s{_nsNamedStyleType = a})

-- | The text style of this named style.
nsTextStyle :: Lens' NamedStyle (Maybe TextStyle)
nsTextStyle
  = lens _nsTextStyle (\ s a -> s{_nsTextStyle = a})

-- | The paragraph style of this named style.
nsParagraphStyle :: Lens' NamedStyle (Maybe ParagraphStyle)
nsParagraphStyle
  = lens _nsParagraphStyle
      (\ s a -> s{_nsParagraphStyle = a})

instance FromJSON NamedStyle where
        parseJSON
          = withObject "NamedStyle"
              (\ o ->
                 NamedStyle' <$>
                   (o .:? "namedStyleType") <*> (o .:? "textStyle") <*>
                     (o .:? "paragraphStyle"))

instance ToJSON NamedStyle where
        toJSON NamedStyle'{..}
          = object
              (catMaybes
                 [("namedStyleType" .=) <$> _nsNamedStyleType,
                  ("textStyle" .=) <$> _nsTextStyle,
                  ("paragraphStyle" .=) <$> _nsParagraphStyle])

-- | Deletes a NamedRange.
--
-- /See:/ 'deleteNamedRangeRequest' smart constructor.
data DeleteNamedRangeRequest =
  DeleteNamedRangeRequest'
    { _dnrrNamedRangeId :: !(Maybe Text)
    , _dnrrName         :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'DeleteNamedRangeRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dnrrNamedRangeId'
--
-- * 'dnrrName'
deleteNamedRangeRequest
    :: DeleteNamedRangeRequest
deleteNamedRangeRequest =
  DeleteNamedRangeRequest' {_dnrrNamedRangeId = Nothing, _dnrrName = Nothing}


-- | The ID of the named range to delete.
dnrrNamedRangeId :: Lens' DeleteNamedRangeRequest (Maybe Text)
dnrrNamedRangeId
  = lens _dnrrNamedRangeId
      (\ s a -> s{_dnrrNamedRangeId = a})

-- | The name of the range(s) to delete. All named ranges with the given name
-- will be deleted.
dnrrName :: Lens' DeleteNamedRangeRequest (Maybe Text)
dnrrName = lens _dnrrName (\ s a -> s{_dnrrName = a})

instance FromJSON DeleteNamedRangeRequest where
        parseJSON
          = withObject "DeleteNamedRangeRequest"
              (\ o ->
                 DeleteNamedRangeRequest' <$>
                   (o .:? "namedRangeId") <*> (o .:? "name"))

instance ToJSON DeleteNamedRangeRequest where
        toJSON DeleteNamedRangeRequest'{..}
          = object
              (catMaybes
                 [("namedRangeId" .=) <$> _dnrrNamedRangeId,
                  ("name" .=) <$> _dnrrName])

-- | A mask that indicates which of the fields on the base
-- EmbeddedDrawingProperties have been changed in this suggestion. For any
-- field set to true, there is a new suggested value.
--
-- /See:/ 'embeddedDrawingPropertiesSuggestionState' smart constructor.
data EmbeddedDrawingPropertiesSuggestionState =
  EmbeddedDrawingPropertiesSuggestionState'
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'EmbeddedDrawingPropertiesSuggestionState' with the minimum fields required to make a request.
--
embeddedDrawingPropertiesSuggestionState
    :: EmbeddedDrawingPropertiesSuggestionState
embeddedDrawingPropertiesSuggestionState =
  EmbeddedDrawingPropertiesSuggestionState'


instance FromJSON
           EmbeddedDrawingPropertiesSuggestionState
         where
        parseJSON
          = withObject
              "EmbeddedDrawingPropertiesSuggestionState"
              (\ o ->
                 pure EmbeddedDrawingPropertiesSuggestionState')

instance ToJSON
           EmbeddedDrawingPropertiesSuggestionState
         where
        toJSON = const emptyObject

-- | A tab stop within a paragraph.
--
-- /See:/ 'tabStop' smart constructor.
data TabStop =
  TabStop'
    { _tsOffSet    :: !(Maybe Dimension)
    , _tsAlignment :: !(Maybe TabStopAlignment)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'TabStop' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tsOffSet'
--
-- * 'tsAlignment'
tabStop
    :: TabStop
tabStop = TabStop' {_tsOffSet = Nothing, _tsAlignment = Nothing}


-- | The offset between this tab stop and the start margin.
tsOffSet :: Lens' TabStop (Maybe Dimension)
tsOffSet = lens _tsOffSet (\ s a -> s{_tsOffSet = a})

-- | The alignment of this tab stop. If unset, the value defaults to START.
tsAlignment :: Lens' TabStop (Maybe TabStopAlignment)
tsAlignment
  = lens _tsAlignment (\ s a -> s{_tsAlignment = a})

instance FromJSON TabStop where
        parseJSON
          = withObject "TabStop"
              (\ o ->
                 TabStop' <$>
                   (o .:? "offset") <*> (o .:? "alignment"))

instance ToJSON TabStop where
        toJSON TabStop'{..}
          = object
              (catMaybes
                 [("offset" .=) <$> _tsOffSet,
                  ("alignment" .=) <$> _tsAlignment])

-- | A collection of all the NamedRanges in the document that share a given
-- name.
--
-- /See:/ 'namedRanges' smart constructor.
data NamedRanges =
  NamedRanges'
    { _nrNamedRanges :: !(Maybe [NamedRange])
    , _nrName        :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'NamedRanges' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nrNamedRanges'
--
-- * 'nrName'
namedRanges
    :: NamedRanges
namedRanges = NamedRanges' {_nrNamedRanges = Nothing, _nrName = Nothing}


-- | The NamedRanges that share the same name.
nrNamedRanges :: Lens' NamedRanges [NamedRange]
nrNamedRanges
  = lens _nrNamedRanges
      (\ s a -> s{_nrNamedRanges = a})
      . _Default
      . _Coerce

-- | The name that all the named ranges share.
nrName :: Lens' NamedRanges (Maybe Text)
nrName = lens _nrName (\ s a -> s{_nrName = a})

instance FromJSON NamedRanges where
        parseJSON
          = withObject "NamedRanges"
              (\ o ->
                 NamedRanges' <$>
                   (o .:? "namedRanges" .!= mempty) <*> (o .:? "name"))

instance ToJSON NamedRanges where
        toJSON NamedRanges'{..}
          = object
              (catMaybes
                 [("namedRanges" .=) <$> _nrNamedRanges,
                  ("name" .=) <$> _nrName])

-- | The suggested style changes to this row, keyed by suggestion ID.
--
-- /See:/ 'tableRowSuggestedTableRowStyleChanges' smart constructor.
newtype TableRowSuggestedTableRowStyleChanges =
  TableRowSuggestedTableRowStyleChanges'
    { _trstrscAddtional :: HashMap Text SuggestedTableRowStyle
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'TableRowSuggestedTableRowStyleChanges' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'trstrscAddtional'
tableRowSuggestedTableRowStyleChanges
    :: HashMap Text SuggestedTableRowStyle -- ^ 'trstrscAddtional'
    -> TableRowSuggestedTableRowStyleChanges
tableRowSuggestedTableRowStyleChanges pTrstrscAddtional_ =
  TableRowSuggestedTableRowStyleChanges'
    {_trstrscAddtional = _Coerce # pTrstrscAddtional_}


trstrscAddtional :: Lens' TableRowSuggestedTableRowStyleChanges (HashMap Text SuggestedTableRowStyle)
trstrscAddtional
  = lens _trstrscAddtional
      (\ s a -> s{_trstrscAddtional = a})
      . _Coerce

instance FromJSON
           TableRowSuggestedTableRowStyleChanges
         where
        parseJSON
          = withObject "TableRowSuggestedTableRowStyleChanges"
              (\ o ->
                 TableRowSuggestedTableRowStyleChanges' <$>
                   (parseJSONObject o))

instance ToJSON TableRowSuggestedTableRowStyleChanges
         where
        toJSON = toJSON . _trstrscAddtional

-- | A mask that indicates which of the fields on the base
-- PositionedObjectProperties have been changed in this suggestion. For any
-- field set to true, there is a new suggested value.
--
-- /See:/ 'positionedObjectPropertiesSuggestionState' smart constructor.
data PositionedObjectPropertiesSuggestionState =
  PositionedObjectPropertiesSuggestionState'
    { _popssPositioningSuggestionState    :: !(Maybe PositionedObjectPositioningSuggestionState)
    , _popssEmbeddedObjectSuggestionState :: !(Maybe EmbeddedObjectSuggestionState)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'PositionedObjectPropertiesSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'popssPositioningSuggestionState'
--
-- * 'popssEmbeddedObjectSuggestionState'
positionedObjectPropertiesSuggestionState
    :: PositionedObjectPropertiesSuggestionState
positionedObjectPropertiesSuggestionState =
  PositionedObjectPropertiesSuggestionState'
    { _popssPositioningSuggestionState = Nothing
    , _popssEmbeddedObjectSuggestionState = Nothing
    }


-- | A mask that indicates which of the fields in positioning have been
-- changed in this suggestion.
popssPositioningSuggestionState :: Lens' PositionedObjectPropertiesSuggestionState (Maybe PositionedObjectPositioningSuggestionState)
popssPositioningSuggestionState
  = lens _popssPositioningSuggestionState
      (\ s a -> s{_popssPositioningSuggestionState = a})

-- | A mask that indicates which of the fields in embedded_object have been
-- changed in this suggestion.
popssEmbeddedObjectSuggestionState :: Lens' PositionedObjectPropertiesSuggestionState (Maybe EmbeddedObjectSuggestionState)
popssEmbeddedObjectSuggestionState
  = lens _popssEmbeddedObjectSuggestionState
      (\ s a -> s{_popssEmbeddedObjectSuggestionState = a})

instance FromJSON
           PositionedObjectPropertiesSuggestionState
         where
        parseJSON
          = withObject
              "PositionedObjectPropertiesSuggestionState"
              (\ o ->
                 PositionedObjectPropertiesSuggestionState' <$>
                   (o .:? "positioningSuggestionState") <*>
                     (o .:? "embeddedObjectSuggestionState"))

instance ToJSON
           PositionedObjectPropertiesSuggestionState
         where
        toJSON PositionedObjectPropertiesSuggestionState'{..}
          = object
              (catMaybes
                 [("positioningSuggestionState" .=) <$>
                    _popssPositioningSuggestionState,
                  ("embeddedObjectSuggestionState" .=) <$>
                    _popssEmbeddedObjectSuggestionState])

-- | A mask that indicates which of the fields on the base
-- PositionedObjectPositioning have been changed in this suggestion. For
-- any field set to true, there is a new suggested value.
--
-- /See:/ 'positionedObjectPositioningSuggestionState' smart constructor.
data PositionedObjectPositioningSuggestionState =
  PositionedObjectPositioningSuggestionState'
    { _popssTopOffSetSuggested  :: !(Maybe Bool)
    , _popssLayoutSuggested     :: !(Maybe Bool)
    , _popssLeftOffSetSuggested :: !(Maybe Bool)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'PositionedObjectPositioningSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'popssTopOffSetSuggested'
--
-- * 'popssLayoutSuggested'
--
-- * 'popssLeftOffSetSuggested'
positionedObjectPositioningSuggestionState
    :: PositionedObjectPositioningSuggestionState
positionedObjectPositioningSuggestionState =
  PositionedObjectPositioningSuggestionState'
    { _popssTopOffSetSuggested = Nothing
    , _popssLayoutSuggested = Nothing
    , _popssLeftOffSetSuggested = Nothing
    }


-- | Indicates if there was a suggested change to top_offset.
popssTopOffSetSuggested :: Lens' PositionedObjectPositioningSuggestionState (Maybe Bool)
popssTopOffSetSuggested
  = lens _popssTopOffSetSuggested
      (\ s a -> s{_popssTopOffSetSuggested = a})

-- | Indicates if there was a suggested change to layout.
popssLayoutSuggested :: Lens' PositionedObjectPositioningSuggestionState (Maybe Bool)
popssLayoutSuggested
  = lens _popssLayoutSuggested
      (\ s a -> s{_popssLayoutSuggested = a})

-- | Indicates if there was a suggested change to left_offset.
popssLeftOffSetSuggested :: Lens' PositionedObjectPositioningSuggestionState (Maybe Bool)
popssLeftOffSetSuggested
  = lens _popssLeftOffSetSuggested
      (\ s a -> s{_popssLeftOffSetSuggested = a})

instance FromJSON
           PositionedObjectPositioningSuggestionState
         where
        parseJSON
          = withObject
              "PositionedObjectPositioningSuggestionState"
              (\ o ->
                 PositionedObjectPositioningSuggestionState' <$>
                   (o .:? "topOffsetSuggested") <*>
                     (o .:? "layoutSuggested")
                     <*> (o .:? "leftOffsetSuggested"))

instance ToJSON
           PositionedObjectPositioningSuggestionState
         where
        toJSON
          PositionedObjectPositioningSuggestionState'{..}
          = object
              (catMaybes
                 [("topOffsetSuggested" .=) <$>
                    _popssTopOffSetSuggested,
                  ("layoutSuggested" .=) <$> _popssLayoutSuggested,
                  ("leftOffsetSuggested" .=) <$>
                    _popssLeftOffSetSuggested])

-- | A suggestion state of a NamedStyle message.
--
-- /See:/ 'namedStyleSuggestionState' smart constructor.
data NamedStyleSuggestionState =
  NamedStyleSuggestionState'
    { _nsssParagraphStyleSuggestionState :: !(Maybe ParagraphStyleSuggestionState)
    , _nsssNamedStyleType                :: !(Maybe NamedStyleSuggestionStateNamedStyleType)
    , _nsssTextStyleSuggestionState      :: !(Maybe TextStyleSuggestionState)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'NamedStyleSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nsssParagraphStyleSuggestionState'
--
-- * 'nsssNamedStyleType'
--
-- * 'nsssTextStyleSuggestionState'
namedStyleSuggestionState
    :: NamedStyleSuggestionState
namedStyleSuggestionState =
  NamedStyleSuggestionState'
    { _nsssParagraphStyleSuggestionState = Nothing
    , _nsssNamedStyleType = Nothing
    , _nsssTextStyleSuggestionState = Nothing
    }


-- | A mask that indicates which of the fields in paragraph style have been
-- changed in this suggestion.
nsssParagraphStyleSuggestionState :: Lens' NamedStyleSuggestionState (Maybe ParagraphStyleSuggestionState)
nsssParagraphStyleSuggestionState
  = lens _nsssParagraphStyleSuggestionState
      (\ s a -> s{_nsssParagraphStyleSuggestionState = a})

-- | The named style type that this suggestion state corresponds to. This
-- field is provided as a convenience for matching the
-- NamedStyleSuggestionState with its corresponding NamedStyle.
nsssNamedStyleType :: Lens' NamedStyleSuggestionState (Maybe NamedStyleSuggestionStateNamedStyleType)
nsssNamedStyleType
  = lens _nsssNamedStyleType
      (\ s a -> s{_nsssNamedStyleType = a})

-- | A mask that indicates which of the fields in text style have been
-- changed in this suggestion.
nsssTextStyleSuggestionState :: Lens' NamedStyleSuggestionState (Maybe TextStyleSuggestionState)
nsssTextStyleSuggestionState
  = lens _nsssTextStyleSuggestionState
      (\ s a -> s{_nsssTextStyleSuggestionState = a})

instance FromJSON NamedStyleSuggestionState where
        parseJSON
          = withObject "NamedStyleSuggestionState"
              (\ o ->
                 NamedStyleSuggestionState' <$>
                   (o .:? "paragraphStyleSuggestionState") <*>
                     (o .:? "namedStyleType")
                     <*> (o .:? "textStyleSuggestionState"))

instance ToJSON NamedStyleSuggestionState where
        toJSON NamedStyleSuggestionState'{..}
          = object
              (catMaybes
                 [("paragraphStyleSuggestionState" .=) <$>
                    _nsssParagraphStyleSuggestionState,
                  ("namedStyleType" .=) <$> _nsssNamedStyleType,
                  ("textStyleSuggestionState" .=) <$>
                    _nsssTextStyleSuggestionState])

-- | The crop properties of an image. The crop rectangle is represented using
-- fractional offsets from the original content\'s four edges. - If the
-- offset is in the interval (0, 1), the corresponding edge of crop
-- rectangle is positioned inside of the image\'s original bounding
-- rectangle. - If the offset is negative or greater than 1, the
-- corresponding edge of crop rectangle is positioned outside of the
-- image\'s original bounding rectangle. - If all offsets and rotation
-- angle are 0, the image is not cropped.
--
-- /See:/ 'cropProperties' smart constructor.
data CropProperties =
  CropProperties'
    { _cpOffSetBottom :: !(Maybe (Textual Double))
    , _cpOffSetRight  :: !(Maybe (Textual Double))
    , _cpAngle        :: !(Maybe (Textual Double))
    , _cpOffSetTop    :: !(Maybe (Textual Double))
    , _cpOffSetLeft   :: !(Maybe (Textual Double))
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'CropProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cpOffSetBottom'
--
-- * 'cpOffSetRight'
--
-- * 'cpAngle'
--
-- * 'cpOffSetTop'
--
-- * 'cpOffSetLeft'
cropProperties
    :: CropProperties
cropProperties =
  CropProperties'
    { _cpOffSetBottom = Nothing
    , _cpOffSetRight = Nothing
    , _cpAngle = Nothing
    , _cpOffSetTop = Nothing
    , _cpOffSetLeft = Nothing
    }


-- | The offset specifies how far inwards the bottom edge of the crop
-- rectangle is from the bottom edge of the original content as a fraction
-- of the original content\'s height.
cpOffSetBottom :: Lens' CropProperties (Maybe Double)
cpOffSetBottom
  = lens _cpOffSetBottom
      (\ s a -> s{_cpOffSetBottom = a})
      . mapping _Coerce

-- | The offset specifies how far inwards the right edge of the crop
-- rectangle is from the right edge of the original content as a fraction
-- of the original content\'s width.
cpOffSetRight :: Lens' CropProperties (Maybe Double)
cpOffSetRight
  = lens _cpOffSetRight
      (\ s a -> s{_cpOffSetRight = a})
      . mapping _Coerce

-- | The clockwise rotation angle of the crop rectangle around its center, in
-- radians. Rotation is applied after the offsets.
cpAngle :: Lens' CropProperties (Maybe Double)
cpAngle
  = lens _cpAngle (\ s a -> s{_cpAngle = a}) .
      mapping _Coerce

-- | The offset specifies how far inwards the top edge of the crop rectangle
-- is from the top edge of the original content as a fraction of the
-- original content\'s height.
cpOffSetTop :: Lens' CropProperties (Maybe Double)
cpOffSetTop
  = lens _cpOffSetTop (\ s a -> s{_cpOffSetTop = a}) .
      mapping _Coerce

-- | The offset specifies how far inwards the left edge of the crop rectangle
-- is from the left edge of the original content as a fraction of the
-- original content\'s width.
cpOffSetLeft :: Lens' CropProperties (Maybe Double)
cpOffSetLeft
  = lens _cpOffSetLeft (\ s a -> s{_cpOffSetLeft = a})
      . mapping _Coerce

instance FromJSON CropProperties where
        parseJSON
          = withObject "CropProperties"
              (\ o ->
                 CropProperties' <$>
                   (o .:? "offsetBottom") <*> (o .:? "offsetRight") <*>
                     (o .:? "angle")
                     <*> (o .:? "offsetTop")
                     <*> (o .:? "offsetLeft"))

instance ToJSON CropProperties where
        toJSON CropProperties'{..}
          = object
              (catMaybes
                 [("offsetBottom" .=) <$> _cpOffSetBottom,
                  ("offsetRight" .=) <$> _cpOffSetRight,
                  ("angle" .=) <$> _cpAngle,
                  ("offsetTop" .=) <$> _cpOffSetTop,
                  ("offsetLeft" .=) <$> _cpOffSetLeft])

-- | A mask that indicates which of the fields on the base ParagraphStyle
-- have been changed in this suggestion. For any field set to true, there
-- is a new suggested value.
--
-- /See:/ 'paragraphStyleSuggestionState' smart constructor.
data ParagraphStyleSuggestionState =
  ParagraphStyleSuggestionState'
    { _psssSpacingModeSuggested         :: !(Maybe Bool)
    , _psssBOrderTopSuggested           :: !(Maybe Bool)
    , _psssLineSpacingSuggested         :: !(Maybe Bool)
    , _psssDirectionSuggested           :: !(Maybe Bool)
    , _psssAvoidWidowAndOrphanSuggested :: !(Maybe Bool)
    , _psssBOrderBottomSuggested        :: !(Maybe Bool)
    , _psssSpaceAboveSuggested          :: !(Maybe Bool)
    , _psssNamedStyleTypeSuggested      :: !(Maybe Bool)
    , _psssIndentStartSuggested         :: !(Maybe Bool)
    , _psssAlignmentSuggested           :: !(Maybe Bool)
    , _psssBOrderLeftSuggested          :: !(Maybe Bool)
    , _psssSpaceBelowSuggested          :: !(Maybe Bool)
    , _psssIndentFirstLineSuggested     :: !(Maybe Bool)
    , _psssShadingSuggestionState       :: !(Maybe ShadingSuggestionState)
    , _psssHeadingIdSuggested           :: !(Maybe Bool)
    , _psssBOrderBetweenSuggested       :: !(Maybe Bool)
    , _psssKeepWithNextSuggested        :: !(Maybe Bool)
    , _psssIndentEndSuggested           :: !(Maybe Bool)
    , _psssBOrderRightSuggested         :: !(Maybe Bool)
    , _psssKeepLinesTogetherSuggested   :: !(Maybe Bool)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ParagraphStyleSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'psssSpacingModeSuggested'
--
-- * 'psssBOrderTopSuggested'
--
-- * 'psssLineSpacingSuggested'
--
-- * 'psssDirectionSuggested'
--
-- * 'psssAvoidWidowAndOrphanSuggested'
--
-- * 'psssBOrderBottomSuggested'
--
-- * 'psssSpaceAboveSuggested'
--
-- * 'psssNamedStyleTypeSuggested'
--
-- * 'psssIndentStartSuggested'
--
-- * 'psssAlignmentSuggested'
--
-- * 'psssBOrderLeftSuggested'
--
-- * 'psssSpaceBelowSuggested'
--
-- * 'psssIndentFirstLineSuggested'
--
-- * 'psssShadingSuggestionState'
--
-- * 'psssHeadingIdSuggested'
--
-- * 'psssBOrderBetweenSuggested'
--
-- * 'psssKeepWithNextSuggested'
--
-- * 'psssIndentEndSuggested'
--
-- * 'psssBOrderRightSuggested'
--
-- * 'psssKeepLinesTogetherSuggested'
paragraphStyleSuggestionState
    :: ParagraphStyleSuggestionState
paragraphStyleSuggestionState =
  ParagraphStyleSuggestionState'
    { _psssSpacingModeSuggested = Nothing
    , _psssBOrderTopSuggested = Nothing
    , _psssLineSpacingSuggested = Nothing
    , _psssDirectionSuggested = Nothing
    , _psssAvoidWidowAndOrphanSuggested = Nothing
    , _psssBOrderBottomSuggested = Nothing
    , _psssSpaceAboveSuggested = Nothing
    , _psssNamedStyleTypeSuggested = Nothing
    , _psssIndentStartSuggested = Nothing
    , _psssAlignmentSuggested = Nothing
    , _psssBOrderLeftSuggested = Nothing
    , _psssSpaceBelowSuggested = Nothing
    , _psssIndentFirstLineSuggested = Nothing
    , _psssShadingSuggestionState = Nothing
    , _psssHeadingIdSuggested = Nothing
    , _psssBOrderBetweenSuggested = Nothing
    , _psssKeepWithNextSuggested = Nothing
    , _psssIndentEndSuggested = Nothing
    , _psssBOrderRightSuggested = Nothing
    , _psssKeepLinesTogetherSuggested = Nothing
    }


-- | Indicates if there was a suggested change to spacing_mode.
psssSpacingModeSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssSpacingModeSuggested
  = lens _psssSpacingModeSuggested
      (\ s a -> s{_psssSpacingModeSuggested = a})

-- | Indicates if there was a suggested change to border_top.
psssBOrderTopSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssBOrderTopSuggested
  = lens _psssBOrderTopSuggested
      (\ s a -> s{_psssBOrderTopSuggested = a})

-- | Indicates if there was a suggested change to line_spacing.
psssLineSpacingSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssLineSpacingSuggested
  = lens _psssLineSpacingSuggested
      (\ s a -> s{_psssLineSpacingSuggested = a})

-- | Indicates if there was a suggested change to direction.
psssDirectionSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssDirectionSuggested
  = lens _psssDirectionSuggested
      (\ s a -> s{_psssDirectionSuggested = a})

-- | Indicates if there was a suggested change to avoid_widow_and_orphan.
psssAvoidWidowAndOrphanSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssAvoidWidowAndOrphanSuggested
  = lens _psssAvoidWidowAndOrphanSuggested
      (\ s a -> s{_psssAvoidWidowAndOrphanSuggested = a})

-- | Indicates if there was a suggested change to border_bottom.
psssBOrderBottomSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssBOrderBottomSuggested
  = lens _psssBOrderBottomSuggested
      (\ s a -> s{_psssBOrderBottomSuggested = a})

-- | Indicates if there was a suggested change to space_above.
psssSpaceAboveSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssSpaceAboveSuggested
  = lens _psssSpaceAboveSuggested
      (\ s a -> s{_psssSpaceAboveSuggested = a})

-- | Indicates if there was a suggested change to named_style_type.
psssNamedStyleTypeSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssNamedStyleTypeSuggested
  = lens _psssNamedStyleTypeSuggested
      (\ s a -> s{_psssNamedStyleTypeSuggested = a})

-- | Indicates if there was a suggested change to indent_start.
psssIndentStartSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssIndentStartSuggested
  = lens _psssIndentStartSuggested
      (\ s a -> s{_psssIndentStartSuggested = a})

-- | Indicates if there was a suggested change to alignment.
psssAlignmentSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssAlignmentSuggested
  = lens _psssAlignmentSuggested
      (\ s a -> s{_psssAlignmentSuggested = a})

-- | Indicates if there was a suggested change to border_left.
psssBOrderLeftSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssBOrderLeftSuggested
  = lens _psssBOrderLeftSuggested
      (\ s a -> s{_psssBOrderLeftSuggested = a})

-- | Indicates if there was a suggested change to space_below.
psssSpaceBelowSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssSpaceBelowSuggested
  = lens _psssSpaceBelowSuggested
      (\ s a -> s{_psssSpaceBelowSuggested = a})

-- | Indicates if there was a suggested change to indent_first_line.
psssIndentFirstLineSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssIndentFirstLineSuggested
  = lens _psssIndentFirstLineSuggested
      (\ s a -> s{_psssIndentFirstLineSuggested = a})

-- | A mask that indicates which of the fields in shading have been changed
-- in this suggestion.
psssShadingSuggestionState :: Lens' ParagraphStyleSuggestionState (Maybe ShadingSuggestionState)
psssShadingSuggestionState
  = lens _psssShadingSuggestionState
      (\ s a -> s{_psssShadingSuggestionState = a})

-- | Indicates if there was a suggested change to heading_id.
psssHeadingIdSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssHeadingIdSuggested
  = lens _psssHeadingIdSuggested
      (\ s a -> s{_psssHeadingIdSuggested = a})

-- | Indicates if there was a suggested change to border_between.
psssBOrderBetweenSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssBOrderBetweenSuggested
  = lens _psssBOrderBetweenSuggested
      (\ s a -> s{_psssBOrderBetweenSuggested = a})

-- | Indicates if there was a suggested change to keep_with_next.
psssKeepWithNextSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssKeepWithNextSuggested
  = lens _psssKeepWithNextSuggested
      (\ s a -> s{_psssKeepWithNextSuggested = a})

-- | Indicates if there was a suggested change to indent_end.
psssIndentEndSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssIndentEndSuggested
  = lens _psssIndentEndSuggested
      (\ s a -> s{_psssIndentEndSuggested = a})

-- | Indicates if there was a suggested change to border_right.
psssBOrderRightSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssBOrderRightSuggested
  = lens _psssBOrderRightSuggested
      (\ s a -> s{_psssBOrderRightSuggested = a})

-- | Indicates if there was a suggested change to keep_lines_together.
psssKeepLinesTogetherSuggested :: Lens' ParagraphStyleSuggestionState (Maybe Bool)
psssKeepLinesTogetherSuggested
  = lens _psssKeepLinesTogetherSuggested
      (\ s a -> s{_psssKeepLinesTogetherSuggested = a})

instance FromJSON ParagraphStyleSuggestionState where
        parseJSON
          = withObject "ParagraphStyleSuggestionState"
              (\ o ->
                 ParagraphStyleSuggestionState' <$>
                   (o .:? "spacingModeSuggested") <*>
                     (o .:? "borderTopSuggested")
                     <*> (o .:? "lineSpacingSuggested")
                     <*> (o .:? "directionSuggested")
                     <*> (o .:? "avoidWidowAndOrphanSuggested")
                     <*> (o .:? "borderBottomSuggested")
                     <*> (o .:? "spaceAboveSuggested")
                     <*> (o .:? "namedStyleTypeSuggested")
                     <*> (o .:? "indentStartSuggested")
                     <*> (o .:? "alignmentSuggested")
                     <*> (o .:? "borderLeftSuggested")
                     <*> (o .:? "spaceBelowSuggested")
                     <*> (o .:? "indentFirstLineSuggested")
                     <*> (o .:? "shadingSuggestionState")
                     <*> (o .:? "headingIdSuggested")
                     <*> (o .:? "borderBetweenSuggested")
                     <*> (o .:? "keepWithNextSuggested")
                     <*> (o .:? "indentEndSuggested")
                     <*> (o .:? "borderRightSuggested")
                     <*> (o .:? "keepLinesTogetherSuggested"))

instance ToJSON ParagraphStyleSuggestionState where
        toJSON ParagraphStyleSuggestionState'{..}
          = object
              (catMaybes
                 [("spacingModeSuggested" .=) <$>
                    _psssSpacingModeSuggested,
                  ("borderTopSuggested" .=) <$>
                    _psssBOrderTopSuggested,
                  ("lineSpacingSuggested" .=) <$>
                    _psssLineSpacingSuggested,
                  ("directionSuggested" .=) <$>
                    _psssDirectionSuggested,
                  ("avoidWidowAndOrphanSuggested" .=) <$>
                    _psssAvoidWidowAndOrphanSuggested,
                  ("borderBottomSuggested" .=) <$>
                    _psssBOrderBottomSuggested,
                  ("spaceAboveSuggested" .=) <$>
                    _psssSpaceAboveSuggested,
                  ("namedStyleTypeSuggested" .=) <$>
                    _psssNamedStyleTypeSuggested,
                  ("indentStartSuggested" .=) <$>
                    _psssIndentStartSuggested,
                  ("alignmentSuggested" .=) <$>
                    _psssAlignmentSuggested,
                  ("borderLeftSuggested" .=) <$>
                    _psssBOrderLeftSuggested,
                  ("spaceBelowSuggested" .=) <$>
                    _psssSpaceBelowSuggested,
                  ("indentFirstLineSuggested" .=) <$>
                    _psssIndentFirstLineSuggested,
                  ("shadingSuggestionState" .=) <$>
                    _psssShadingSuggestionState,
                  ("headingIdSuggested" .=) <$>
                    _psssHeadingIdSuggested,
                  ("borderBetweenSuggested" .=) <$>
                    _psssBOrderBetweenSuggested,
                  ("keepWithNextSuggested" .=) <$>
                    _psssKeepWithNextSuggested,
                  ("indentEndSuggested" .=) <$>
                    _psssIndentEndSuggested,
                  ("borderRightSuggested" .=) <$>
                    _psssBOrderRightSuggested,
                  ("keepLinesTogetherSuggested" .=) <$>
                    _psssKeepLinesTogetherSuggested])

-- | A document footnote.
--
-- /See:/ 'footNote' smart constructor.
data FootNote =
  FootNote'
    { _fnContent    :: !(Maybe [StructuralElement])
    , _fnFootNoteId :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'FootNote' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'fnContent'
--
-- * 'fnFootNoteId'
footNote
    :: FootNote
footNote = FootNote' {_fnContent = Nothing, _fnFootNoteId = Nothing}


-- | The contents of the footnote. The indexes for a footnote\'s content
-- begin at zero.
fnContent :: Lens' FootNote [StructuralElement]
fnContent
  = lens _fnContent (\ s a -> s{_fnContent = a}) .
      _Default
      . _Coerce

-- | The ID of the footnote.
fnFootNoteId :: Lens' FootNote (Maybe Text)
fnFootNoteId
  = lens _fnFootNoteId (\ s a -> s{_fnFootNoteId = a})

instance FromJSON FootNote where
        parseJSON
          = withObject "FootNote"
              (\ o ->
                 FootNote' <$>
                   (o .:? "content" .!= mempty) <*>
                     (o .:? "footnoteId"))

instance ToJSON FootNote where
        toJSON FootNote'{..}
          = object
              (catMaybes
                 [("content" .=) <$> _fnContent,
                  ("footnoteId" .=) <$> _fnFootNoteId])

-- | A ParagraphElement representing a spot in the text that is dynamically
-- replaced with content that can change over time, like a page number.
--
-- /See:/ 'autoText' smart constructor.
data AutoText =
  AutoText'
    { _atSuggestedInsertionIds     :: !(Maybe [Text])
    , _atSuggestedTextStyleChanges :: !(Maybe AutoTextSuggestedTextStyleChanges)
    , _atSuggestedDeletionIds      :: !(Maybe [Text])
    , _atTextStyle                 :: !(Maybe TextStyle)
    , _atType                      :: !(Maybe AutoTextType)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'AutoText' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atSuggestedInsertionIds'
--
-- * 'atSuggestedTextStyleChanges'
--
-- * 'atSuggestedDeletionIds'
--
-- * 'atTextStyle'
--
-- * 'atType'
autoText
    :: AutoText
autoText =
  AutoText'
    { _atSuggestedInsertionIds = Nothing
    , _atSuggestedTextStyleChanges = Nothing
    , _atSuggestedDeletionIds = Nothing
    , _atTextStyle = Nothing
    , _atType = Nothing
    }


-- | The suggested insertion IDs. An AutoText may have multiple insertion IDs
-- if it is a nested suggested change. If empty, then this is not a
-- suggested insertion.
atSuggestedInsertionIds :: Lens' AutoText [Text]
atSuggestedInsertionIds
  = lens _atSuggestedInsertionIds
      (\ s a -> s{_atSuggestedInsertionIds = a})
      . _Default
      . _Coerce

-- | The suggested text style changes to this AutoText, keyed by suggestion
-- ID.
atSuggestedTextStyleChanges :: Lens' AutoText (Maybe AutoTextSuggestedTextStyleChanges)
atSuggestedTextStyleChanges
  = lens _atSuggestedTextStyleChanges
      (\ s a -> s{_atSuggestedTextStyleChanges = a})

-- | The suggested deletion IDs. If empty, then there are no suggested
-- deletions of this content.
atSuggestedDeletionIds :: Lens' AutoText [Text]
atSuggestedDeletionIds
  = lens _atSuggestedDeletionIds
      (\ s a -> s{_atSuggestedDeletionIds = a})
      . _Default
      . _Coerce

-- | The text style of this AutoText.
atTextStyle :: Lens' AutoText (Maybe TextStyle)
atTextStyle
  = lens _atTextStyle (\ s a -> s{_atTextStyle = a})

-- | The type of this auto text.
atType :: Lens' AutoText (Maybe AutoTextType)
atType = lens _atType (\ s a -> s{_atType = a})

instance FromJSON AutoText where
        parseJSON
          = withObject "AutoText"
              (\ o ->
                 AutoText' <$>
                   (o .:? "suggestedInsertionIds" .!= mempty) <*>
                     (o .:? "suggestedTextStyleChanges")
                     <*> (o .:? "suggestedDeletionIds" .!= mempty)
                     <*> (o .:? "textStyle")
                     <*> (o .:? "type"))

instance ToJSON AutoText where
        toJSON AutoText'{..}
          = object
              (catMaybes
                 [("suggestedInsertionIds" .=) <$>
                    _atSuggestedInsertionIds,
                  ("suggestedTextStyleChanges" .=) <$>
                    _atSuggestedTextStyleChanges,
                  ("suggestedDeletionIds" .=) <$>
                    _atSuggestedDeletionIds,
                  ("textStyle" .=) <$> _atTextStyle,
                  ("type" .=) <$> _atType])

-- | A List represents the list attributes for a group of paragraphs that all
-- belong to the same list. A paragraph that is part of a list has a
-- reference to the list\'s ID in its bullet.
--
-- /See:/ 'list' smart constructor.
data List =
  List'
    { _lSuggestedInsertionId           :: !(Maybe Text)
    , _lSuggestedListPropertiesChanges :: !(Maybe ListSuggestedListPropertiesChanges)
    , _lSuggestedDeletionIds           :: !(Maybe [Text])
    , _lListProperties                 :: !(Maybe ListProperties)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'List' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lSuggestedInsertionId'
--
-- * 'lSuggestedListPropertiesChanges'
--
-- * 'lSuggestedDeletionIds'
--
-- * 'lListProperties'
list
    :: List
list =
  List'
    { _lSuggestedInsertionId = Nothing
    , _lSuggestedListPropertiesChanges = Nothing
    , _lSuggestedDeletionIds = Nothing
    , _lListProperties = Nothing
    }


-- | The suggested insertion ID. If empty, then this is not a suggested
-- insertion.
lSuggestedInsertionId :: Lens' List (Maybe Text)
lSuggestedInsertionId
  = lens _lSuggestedInsertionId
      (\ s a -> s{_lSuggestedInsertionId = a})

-- | The suggested changes to the list properties, keyed by suggestion ID.
lSuggestedListPropertiesChanges :: Lens' List (Maybe ListSuggestedListPropertiesChanges)
lSuggestedListPropertiesChanges
  = lens _lSuggestedListPropertiesChanges
      (\ s a -> s{_lSuggestedListPropertiesChanges = a})

-- | The suggested deletion IDs. If empty, then there are no suggested
-- deletions of this list.
lSuggestedDeletionIds :: Lens' List [Text]
lSuggestedDeletionIds
  = lens _lSuggestedDeletionIds
      (\ s a -> s{_lSuggestedDeletionIds = a})
      . _Default
      . _Coerce

-- | The properties of the list.
lListProperties :: Lens' List (Maybe ListProperties)
lListProperties
  = lens _lListProperties
      (\ s a -> s{_lListProperties = a})

instance FromJSON List where
        parseJSON
          = withObject "List"
              (\ o ->
                 List' <$>
                   (o .:? "suggestedInsertionId") <*>
                     (o .:? "suggestedListPropertiesChanges")
                     <*> (o .:? "suggestedDeletionIds" .!= mempty)
                     <*> (o .:? "listProperties"))

instance ToJSON List where
        toJSON List'{..}
          = object
              (catMaybes
                 [("suggestedInsertionId" .=) <$>
                    _lSuggestedInsertionId,
                  ("suggestedListPropertiesChanges" .=) <$>
                    _lSuggestedListPropertiesChanges,
                  ("suggestedDeletionIds" .=) <$>
                    _lSuggestedDeletionIds,
                  ("listProperties" .=) <$> _lListProperties])

-- | A border around a paragraph.
--
-- /See:/ 'paragraphBOrder' smart constructor.
data ParagraphBOrder =
  ParagraphBOrder'
    { _pboColor     :: !(Maybe OptionalColor)
    , _pboWidth     :: !(Maybe Dimension)
    , _pboDashStyle :: !(Maybe ParagraphBOrderDashStyle)
    , _pboPadding   :: !(Maybe Dimension)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ParagraphBOrder' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pboColor'
--
-- * 'pboWidth'
--
-- * 'pboDashStyle'
--
-- * 'pboPadding'
paragraphBOrder
    :: ParagraphBOrder
paragraphBOrder =
  ParagraphBOrder'
    { _pboColor = Nothing
    , _pboWidth = Nothing
    , _pboDashStyle = Nothing
    , _pboPadding = Nothing
    }


-- | The color of the border.
pboColor :: Lens' ParagraphBOrder (Maybe OptionalColor)
pboColor = lens _pboColor (\ s a -> s{_pboColor = a})

-- | The width of the border.
pboWidth :: Lens' ParagraphBOrder (Maybe Dimension)
pboWidth = lens _pboWidth (\ s a -> s{_pboWidth = a})

-- | The dash style of the border.
pboDashStyle :: Lens' ParagraphBOrder (Maybe ParagraphBOrderDashStyle)
pboDashStyle
  = lens _pboDashStyle (\ s a -> s{_pboDashStyle = a})

-- | The padding of the border.
pboPadding :: Lens' ParagraphBOrder (Maybe Dimension)
pboPadding
  = lens _pboPadding (\ s a -> s{_pboPadding = a})

instance FromJSON ParagraphBOrder where
        parseJSON
          = withObject "ParagraphBOrder"
              (\ o ->
                 ParagraphBOrder' <$>
                   (o .:? "color") <*> (o .:? "width") <*>
                     (o .:? "dashStyle")
                     <*> (o .:? "padding"))

instance ToJSON ParagraphBOrder where
        toJSON ParagraphBOrder'{..}
          = object
              (catMaybes
                 [("color" .=) <$> _pboColor,
                  ("width" .=) <$> _pboWidth,
                  ("dashStyle" .=) <$> _pboDashStyle,
                  ("padding" .=) <$> _pboPadding])

-- | A suggested change to a TableCellStyle.
--
-- /See:/ 'suggestedTableCellStyle' smart constructor.
data SuggestedTableCellStyle =
  SuggestedTableCellStyle'
    { _stcsTableCellStyleSuggestionState :: !(Maybe TableCellStyleSuggestionState)
    , _stcsTableCellStyle                :: !(Maybe TableCellStyle)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'SuggestedTableCellStyle' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'stcsTableCellStyleSuggestionState'
--
-- * 'stcsTableCellStyle'
suggestedTableCellStyle
    :: SuggestedTableCellStyle
suggestedTableCellStyle =
  SuggestedTableCellStyle'
    { _stcsTableCellStyleSuggestionState = Nothing
    , _stcsTableCellStyle = Nothing
    }


-- | A mask that indicates which of the fields on the base TableCellStyle
-- have been changed in this suggestion.
stcsTableCellStyleSuggestionState :: Lens' SuggestedTableCellStyle (Maybe TableCellStyleSuggestionState)
stcsTableCellStyleSuggestionState
  = lens _stcsTableCellStyleSuggestionState
      (\ s a -> s{_stcsTableCellStyleSuggestionState = a})

-- | A TableCellStyle that only includes the changes made in this suggestion.
-- This can be used along with the table_cell_style_suggestion_state to see
-- which fields have changed and their new values.
stcsTableCellStyle :: Lens' SuggestedTableCellStyle (Maybe TableCellStyle)
stcsTableCellStyle
  = lens _stcsTableCellStyle
      (\ s a -> s{_stcsTableCellStyle = a})

instance FromJSON SuggestedTableCellStyle where
        parseJSON
          = withObject "SuggestedTableCellStyle"
              (\ o ->
                 SuggestedTableCellStyle' <$>
                   (o .:? "tableCellStyleSuggestionState") <*>
                     (o .:? "tableCellStyle"))

instance ToJSON SuggestedTableCellStyle where
        toJSON SuggestedTableCellStyle'{..}
          = object
              (catMaybes
                 [("tableCellStyleSuggestionState" .=) <$>
                    _stcsTableCellStyleSuggestionState,
                  ("tableCellStyle" .=) <$> _stcsTableCellStyle])

-- | The result of inserting an inline image.
--
-- /See:/ 'insertInlineImageResponse' smart constructor.
newtype InsertInlineImageResponse =
  InsertInlineImageResponse'
    { _iiirObjectId :: Maybe Text
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'InsertInlineImageResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iiirObjectId'
insertInlineImageResponse
    :: InsertInlineImageResponse
insertInlineImageResponse = InsertInlineImageResponse' {_iiirObjectId = Nothing}


-- | The ID of the created InlineObject.
iiirObjectId :: Lens' InsertInlineImageResponse (Maybe Text)
iiirObjectId
  = lens _iiirObjectId (\ s a -> s{_iiirObjectId = a})

instance FromJSON InsertInlineImageResponse where
        parseJSON
          = withObject "InsertInlineImageResponse"
              (\ o ->
                 InsertInlineImageResponse' <$> (o .:? "objectId"))

instance ToJSON InsertInlineImageResponse where
        toJSON InsertInlineImageResponse'{..}
          = object
              (catMaybes [("objectId" .=) <$> _iiirObjectId])

-- | An RGB color.
--
-- /See:/ 'rgbColor' smart constructor.
data RgbColor =
  RgbColor'
    { _rcRed   :: !(Maybe (Textual Double))
    , _rcGreen :: !(Maybe (Textual Double))
    , _rcBlue  :: !(Maybe (Textual Double))
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'RgbColor' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rcRed'
--
-- * 'rcGreen'
--
-- * 'rcBlue'
rgbColor
    :: RgbColor
rgbColor = RgbColor' {_rcRed = Nothing, _rcGreen = Nothing, _rcBlue = Nothing}


-- | The red component of the color, from 0.0 to 1.0.
rcRed :: Lens' RgbColor (Maybe Double)
rcRed
  = lens _rcRed (\ s a -> s{_rcRed = a}) .
      mapping _Coerce

-- | The green component of the color, from 0.0 to 1.0.
rcGreen :: Lens' RgbColor (Maybe Double)
rcGreen
  = lens _rcGreen (\ s a -> s{_rcGreen = a}) .
      mapping _Coerce

-- | The blue component of the color, from 0.0 to 1.0.
rcBlue :: Lens' RgbColor (Maybe Double)
rcBlue
  = lens _rcBlue (\ s a -> s{_rcBlue = a}) .
      mapping _Coerce

instance FromJSON RgbColor where
        parseJSON
          = withObject "RgbColor"
              (\ o ->
                 RgbColor' <$>
                   (o .:? "red") <*> (o .:? "green") <*> (o .:? "blue"))

instance ToJSON RgbColor where
        toJSON RgbColor'{..}
          = object
              (catMaybes
                 [("red" .=) <$> _rcRed, ("green" .=) <$> _rcGreen,
                  ("blue" .=) <$> _rcBlue])

-- | Inserts a page break followed by a newline at the specified location.
--
-- /See:/ 'insertPageBreakRequest' smart constructor.
data InsertPageBreakRequest =
  InsertPageBreakRequest'
    { _ipbrLocation             :: !(Maybe Location)
    , _ipbrEndOfSegmentLocation :: !(Maybe EndOfSegmentLocation)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'InsertPageBreakRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ipbrLocation'
--
-- * 'ipbrEndOfSegmentLocation'
insertPageBreakRequest
    :: InsertPageBreakRequest
insertPageBreakRequest =
  InsertPageBreakRequest'
    {_ipbrLocation = Nothing, _ipbrEndOfSegmentLocation = Nothing}


-- | Inserts the page break at a specific index in the document. The page
-- break must be inserted inside the bounds of an existing Paragraph. For
-- instance, it cannot be inserted at a table\'s start index (i.e. between
-- the table and its preceding paragraph). Page breaks cannot be inserted
-- inside a table, equation, footnote, header or footer. Since page breaks
-- can only be inserted inside the body, the segment ID field must be
-- empty.
ipbrLocation :: Lens' InsertPageBreakRequest (Maybe Location)
ipbrLocation
  = lens _ipbrLocation (\ s a -> s{_ipbrLocation = a})

-- | Inserts the page break at the end of the document body. Page breaks
-- cannot be inserted inside a footnote, header or footer. Since page
-- breaks can only be inserted inside the body, the segment ID field must
-- be empty.
ipbrEndOfSegmentLocation :: Lens' InsertPageBreakRequest (Maybe EndOfSegmentLocation)
ipbrEndOfSegmentLocation
  = lens _ipbrEndOfSegmentLocation
      (\ s a -> s{_ipbrEndOfSegmentLocation = a})

instance FromJSON InsertPageBreakRequest where
        parseJSON
          = withObject "InsertPageBreakRequest"
              (\ o ->
                 InsertPageBreakRequest' <$>
                   (o .:? "location") <*>
                     (o .:? "endOfSegmentLocation"))

instance ToJSON InsertPageBreakRequest where
        toJSON InsertPageBreakRequest'{..}
          = object
              (catMaybes
                 [("location" .=) <$> _ipbrLocation,
                  ("endOfSegmentLocation" .=) <$>
                    _ipbrEndOfSegmentLocation])

-- | A mask that indicates which of the fields on the base Background have
-- been changed in this suggestion. For any field set to true, the
-- Backgound has a new suggested value.
--
-- /See:/ 'backgRoundSuggestionState' smart constructor.
newtype BackgRoundSuggestionState =
  BackgRoundSuggestionState'
    { _brssBackgRoundColorSuggested :: Maybe Bool
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'BackgRoundSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'brssBackgRoundColorSuggested'
backgRoundSuggestionState
    :: BackgRoundSuggestionState
backgRoundSuggestionState =
  BackgRoundSuggestionState' {_brssBackgRoundColorSuggested = Nothing}


-- | Indicates whether the current background color has been modified in this
-- suggestion.
brssBackgRoundColorSuggested :: Lens' BackgRoundSuggestionState (Maybe Bool)
brssBackgRoundColorSuggested
  = lens _brssBackgRoundColorSuggested
      (\ s a -> s{_brssBackgRoundColorSuggested = a})

instance FromJSON BackgRoundSuggestionState where
        parseJSON
          = withObject "BackgRoundSuggestionState"
              (\ o ->
                 BackgRoundSuggestionState' <$>
                   (o .:? "backgroundColorSuggested"))

instance ToJSON BackgRoundSuggestionState where
        toJSON BackgRoundSuggestionState'{..}
          = object
              (catMaybes
                 [("backgroundColorSuggested" .=) <$>
                    _brssBackgRoundColorSuggested])

-- | Properties of an InlineObject.
--
-- /See:/ 'inlineObjectProperties' smart constructor.
newtype InlineObjectProperties =
  InlineObjectProperties'
    { _iopEmbeddedObject :: Maybe EmbeddedObject
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'InlineObjectProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iopEmbeddedObject'
inlineObjectProperties
    :: InlineObjectProperties
inlineObjectProperties = InlineObjectProperties' {_iopEmbeddedObject = Nothing}


-- | The embedded object of this inline object.
iopEmbeddedObject :: Lens' InlineObjectProperties (Maybe EmbeddedObject)
iopEmbeddedObject
  = lens _iopEmbeddedObject
      (\ s a -> s{_iopEmbeddedObject = a})

instance FromJSON InlineObjectProperties where
        parseJSON
          = withObject "InlineObjectProperties"
              (\ o ->
                 InlineObjectProperties' <$> (o .:? "embeddedObject"))

instance ToJSON InlineObjectProperties where
        toJSON InlineObjectProperties'{..}
          = object
              (catMaybes
                 [("embeddedObject" .=) <$> _iopEmbeddedObject])

-- | A suggested change to the DocumentStyle.
--
-- /See:/ 'suggestedDocumentStyle' smart constructor.
data SuggestedDocumentStyle =
  SuggestedDocumentStyle'
    { _sdsDocumentStyle                :: !(Maybe DocumentStyle)
    , _sdsDocumentStyleSuggestionState :: !(Maybe DocumentStyleSuggestionState)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'SuggestedDocumentStyle' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sdsDocumentStyle'
--
-- * 'sdsDocumentStyleSuggestionState'
suggestedDocumentStyle
    :: SuggestedDocumentStyle
suggestedDocumentStyle =
  SuggestedDocumentStyle'
    {_sdsDocumentStyle = Nothing, _sdsDocumentStyleSuggestionState = Nothing}


-- | A DocumentStyle that only includes the changes made in this suggestion.
-- This can be used along with the document_style_suggestion_state to see
-- which fields have changed and their new values.
sdsDocumentStyle :: Lens' SuggestedDocumentStyle (Maybe DocumentStyle)
sdsDocumentStyle
  = lens _sdsDocumentStyle
      (\ s a -> s{_sdsDocumentStyle = a})

-- | A mask that indicates which of the fields on the base DocumentStyle have
-- been changed in this suggestion.
sdsDocumentStyleSuggestionState :: Lens' SuggestedDocumentStyle (Maybe DocumentStyleSuggestionState)
sdsDocumentStyleSuggestionState
  = lens _sdsDocumentStyleSuggestionState
      (\ s a -> s{_sdsDocumentStyleSuggestionState = a})

instance FromJSON SuggestedDocumentStyle where
        parseJSON
          = withObject "SuggestedDocumentStyle"
              (\ o ->
                 SuggestedDocumentStyle' <$>
                   (o .:? "documentStyle") <*>
                     (o .:? "documentStyleSuggestionState"))

instance ToJSON SuggestedDocumentStyle where
        toJSON SuggestedDocumentStyle'{..}
          = object
              (catMaybes
                 [("documentStyle" .=) <$> _sdsDocumentStyle,
                  ("documentStyleSuggestionState" .=) <$>
                    _sdsDocumentStyleSuggestionState])

-- | A particular location in the document.
--
-- /See:/ 'location' smart constructor.
data Location =
  Location'
    { _lIndex     :: !(Maybe (Textual Int32))
    , _lSegmentId :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'Location' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lIndex'
--
-- * 'lSegmentId'
location
    :: Location
location = Location' {_lIndex = Nothing, _lSegmentId = Nothing}


-- | The zero-based index, in UTF-16 code units. The index is relative to the
-- beginning of the segment specified by segment_id.
lIndex :: Lens' Location (Maybe Int32)
lIndex
  = lens _lIndex (\ s a -> s{_lIndex = a}) .
      mapping _Coerce

-- | The ID of the header, footer or footnote the location is in. An empty
-- segment ID signifies the document\'s body.
lSegmentId :: Lens' Location (Maybe Text)
lSegmentId
  = lens _lSegmentId (\ s a -> s{_lSegmentId = a})

instance FromJSON Location where
        parseJSON
          = withObject "Location"
              (\ o ->
                 Location' <$>
                   (o .:? "index") <*> (o .:? "segmentId"))

instance ToJSON Location where
        toJSON Location'{..}
          = object
              (catMaybes
                 [("index" .=) <$> _lIndex,
                  ("segmentId" .=) <$> _lSegmentId])

-- | A StructuralElement representing a table of contents.
--
-- /See:/ 'tableOfContents' smart constructor.
data TableOfContents =
  TableOfContents'
    { _tocSuggestedInsertionIds :: !(Maybe [Text])
    , _tocContent               :: !(Maybe [StructuralElement])
    , _tocSuggestedDeletionIds  :: !(Maybe [Text])
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'TableOfContents' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tocSuggestedInsertionIds'
--
-- * 'tocContent'
--
-- * 'tocSuggestedDeletionIds'
tableOfContents
    :: TableOfContents
tableOfContents =
  TableOfContents'
    { _tocSuggestedInsertionIds = Nothing
    , _tocContent = Nothing
    , _tocSuggestedDeletionIds = Nothing
    }


-- | The suggested insertion IDs. A TableOfContents may have multiple
-- insertion IDs if it is a nested suggested change. If empty, then this is
-- not a suggested insertion.
tocSuggestedInsertionIds :: Lens' TableOfContents [Text]
tocSuggestedInsertionIds
  = lens _tocSuggestedInsertionIds
      (\ s a -> s{_tocSuggestedInsertionIds = a})
      . _Default
      . _Coerce

-- | The content of the table of contents.
tocContent :: Lens' TableOfContents [StructuralElement]
tocContent
  = lens _tocContent (\ s a -> s{_tocContent = a}) .
      _Default
      . _Coerce

-- | The suggested deletion IDs. If empty, then there are no suggested
-- deletions of this content.
tocSuggestedDeletionIds :: Lens' TableOfContents [Text]
tocSuggestedDeletionIds
  = lens _tocSuggestedDeletionIds
      (\ s a -> s{_tocSuggestedDeletionIds = a})
      . _Default
      . _Coerce

instance FromJSON TableOfContents where
        parseJSON
          = withObject "TableOfContents"
              (\ o ->
                 TableOfContents' <$>
                   (o .:? "suggestedInsertionIds" .!= mempty) <*>
                     (o .:? "content" .!= mempty)
                     <*> (o .:? "suggestedDeletionIds" .!= mempty))

instance ToJSON TableOfContents where
        toJSON TableOfContents'{..}
          = object
              (catMaybes
                 [("suggestedInsertionIds" .=) <$>
                    _tocSuggestedInsertionIds,
                  ("content" .=) <$> _tocContent,
                  ("suggestedDeletionIds" .=) <$>
                    _tocSuggestedDeletionIds])

-- | A solid color.
--
-- /See:/ 'color' smart constructor.
newtype Color =
  Color'
    { _cRgbColor :: Maybe RgbColor
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'Color' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cRgbColor'
color
    :: Color
color = Color' {_cRgbColor = Nothing}


-- | The RGB color value.
cRgbColor :: Lens' Color (Maybe RgbColor)
cRgbColor
  = lens _cRgbColor (\ s a -> s{_cRgbColor = a})

instance FromJSON Color where
        parseJSON
          = withObject "Color"
              (\ o -> Color' <$> (o .:? "rgbColor"))

instance ToJSON Color where
        toJSON Color'{..}
          = object (catMaybes [("rgbColor" .=) <$> _cRgbColor])

-- | A width and height.
--
-- /See:/ 'size' smart constructor.
data Size =
  Size'
    { _sHeight :: !(Maybe Dimension)
    , _sWidth  :: !(Maybe Dimension)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'Size' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sHeight'
--
-- * 'sWidth'
size
    :: Size
size = Size' {_sHeight = Nothing, _sWidth = Nothing}


-- | The height of the object.
sHeight :: Lens' Size (Maybe Dimension)
sHeight = lens _sHeight (\ s a -> s{_sHeight = a})

-- | The width of the object.
sWidth :: Lens' Size (Maybe Dimension)
sWidth = lens _sWidth (\ s a -> s{_sWidth = a})

instance FromJSON Size where
        parseJSON
          = withObject "Size"
              (\ o ->
                 Size' <$> (o .:? "height") <*> (o .:? "width"))

instance ToJSON Size where
        toJSON Size'{..}
          = object
              (catMaybes
                 [("height" .=) <$> _sHeight,
                  ("width" .=) <$> _sWidth])

-- | The result of inserting an embedded Google Sheets chart.
--
-- /See:/ 'insertInlineSheetsChartResponse' smart constructor.
newtype InsertInlineSheetsChartResponse =
  InsertInlineSheetsChartResponse'
    { _iiscrObjectId :: Maybe Text
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'InsertInlineSheetsChartResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iiscrObjectId'
insertInlineSheetsChartResponse
    :: InsertInlineSheetsChartResponse
insertInlineSheetsChartResponse =
  InsertInlineSheetsChartResponse' {_iiscrObjectId = Nothing}


-- | The object ID of the inserted chart.
iiscrObjectId :: Lens' InsertInlineSheetsChartResponse (Maybe Text)
iiscrObjectId
  = lens _iiscrObjectId
      (\ s a -> s{_iiscrObjectId = a})

instance FromJSON InsertInlineSheetsChartResponse
         where
        parseJSON
          = withObject "InsertInlineSheetsChartResponse"
              (\ o ->
                 InsertInlineSheetsChartResponse' <$>
                   (o .:? "objectId"))

instance ToJSON InsertInlineSheetsChartResponse where
        toJSON InsertInlineSheetsChartResponse'{..}
          = object
              (catMaybes [("objectId" .=) <$> _iiscrObjectId])

-- | A mask that indicates which of the fields on the base TableRowStyle have
-- been changed in this suggestion. For any field set to true, there is a
-- new suggested value.
--
-- /See:/ 'tableRowStyleSuggestionState' smart constructor.
newtype TableRowStyleSuggestionState =
  TableRowStyleSuggestionState'
    { _trsssMinRowHeightSuggested :: Maybe Bool
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'TableRowStyleSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'trsssMinRowHeightSuggested'
tableRowStyleSuggestionState
    :: TableRowStyleSuggestionState
tableRowStyleSuggestionState =
  TableRowStyleSuggestionState' {_trsssMinRowHeightSuggested = Nothing}


-- | Indicates if there was a suggested change to min_row_height.
trsssMinRowHeightSuggested :: Lens' TableRowStyleSuggestionState (Maybe Bool)
trsssMinRowHeightSuggested
  = lens _trsssMinRowHeightSuggested
      (\ s a -> s{_trsssMinRowHeightSuggested = a})

instance FromJSON TableRowStyleSuggestionState where
        parseJSON
          = withObject "TableRowStyleSuggestionState"
              (\ o ->
                 TableRowStyleSuggestionState' <$>
                   (o .:? "minRowHeightSuggested"))

instance ToJSON TableRowStyleSuggestionState where
        toJSON TableRowStyleSuggestionState'{..}
          = object
              (catMaybes
                 [("minRowHeightSuggested" .=) <$>
                    _trsssMinRowHeightSuggested])

-- | Deletes a column from a table.
--
-- /See:/ 'deleteTableColumnRequest' smart constructor.
newtype DeleteTableColumnRequest =
  DeleteTableColumnRequest'
    { _dtcrTableCellLocation :: Maybe TableCellLocation
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'DeleteTableColumnRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtcrTableCellLocation'
deleteTableColumnRequest
    :: DeleteTableColumnRequest
deleteTableColumnRequest =
  DeleteTableColumnRequest' {_dtcrTableCellLocation = Nothing}


-- | The reference table cell location from which the column will be deleted.
-- The column this cell spans will be deleted. If this is a merged cell
-- that spans multiple columns, all columns that the cell spans will be
-- deleted. If no columns remain in the table after this deletion, the
-- whole table is deleted.
dtcrTableCellLocation :: Lens' DeleteTableColumnRequest (Maybe TableCellLocation)
dtcrTableCellLocation
  = lens _dtcrTableCellLocation
      (\ s a -> s{_dtcrTableCellLocation = a})

instance FromJSON DeleteTableColumnRequest where
        parseJSON
          = withObject "DeleteTableColumnRequest"
              (\ o ->
                 DeleteTableColumnRequest' <$>
                   (o .:? "tableCellLocation"))

instance ToJSON DeleteTableColumnRequest where
        toJSON DeleteTableColumnRequest'{..}
          = object
              (catMaybes
                 [("tableCellLocation" .=) <$>
                    _dtcrTableCellLocation])

-- | The named ranges in the document, keyed by name.
--
-- /See:/ 'documentNamedRanges' smart constructor.
newtype DocumentNamedRanges =
  DocumentNamedRanges'
    { _dnrAddtional :: HashMap Text NamedRanges
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'DocumentNamedRanges' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dnrAddtional'
documentNamedRanges
    :: HashMap Text NamedRanges -- ^ 'dnrAddtional'
    -> DocumentNamedRanges
documentNamedRanges pDnrAddtional_ =
  DocumentNamedRanges' {_dnrAddtional = _Coerce # pDnrAddtional_}


dnrAddtional :: Lens' DocumentNamedRanges (HashMap Text NamedRanges)
dnrAddtional
  = lens _dnrAddtional (\ s a -> s{_dnrAddtional = a})
      . _Coerce

instance FromJSON DocumentNamedRanges where
        parseJSON
          = withObject "DocumentNamedRanges"
              (\ o -> DocumentNamedRanges' <$> (parseJSONObject o))

instance ToJSON DocumentNamedRanges where
        toJSON = toJSON . _dnrAddtional

-- | Location at the end of a body, header, footer or footnote. The location
-- is immediately before the last newline in the document segment.
--
-- /See:/ 'endOfSegmentLocation' smart constructor.
newtype EndOfSegmentLocation =
  EndOfSegmentLocation'
    { _eoslSegmentId :: Maybe Text
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'EndOfSegmentLocation' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'eoslSegmentId'
endOfSegmentLocation
    :: EndOfSegmentLocation
endOfSegmentLocation = EndOfSegmentLocation' {_eoslSegmentId = Nothing}


-- | The ID of the header, footer or footnote the location is in. An empty
-- segment ID signifies the document\'s body.
eoslSegmentId :: Lens' EndOfSegmentLocation (Maybe Text)
eoslSegmentId
  = lens _eoslSegmentId
      (\ s a -> s{_eoslSegmentId = a})

instance FromJSON EndOfSegmentLocation where
        parseJSON
          = withObject "EndOfSegmentLocation"
              (\ o ->
                 EndOfSegmentLocation' <$> (o .:? "segmentId"))

instance ToJSON EndOfSegmentLocation where
        toJSON EndOfSegmentLocation'{..}
          = object
              (catMaybes [("segmentId" .=) <$> _eoslSegmentId])

-- | The inline objects in the document, keyed by object ID.
--
-- /See:/ 'documentInlineObjects' smart constructor.
newtype DocumentInlineObjects =
  DocumentInlineObjects'
    { _dioAddtional :: HashMap Text InlineObject
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'DocumentInlineObjects' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dioAddtional'
documentInlineObjects
    :: HashMap Text InlineObject -- ^ 'dioAddtional'
    -> DocumentInlineObjects
documentInlineObjects pDioAddtional_ =
  DocumentInlineObjects' {_dioAddtional = _Coerce # pDioAddtional_}


dioAddtional :: Lens' DocumentInlineObjects (HashMap Text InlineObject)
dioAddtional
  = lens _dioAddtional (\ s a -> s{_dioAddtional = a})
      . _Coerce

instance FromJSON DocumentInlineObjects where
        parseJSON
          = withObject "DocumentInlineObjects"
              (\ o ->
                 DocumentInlineObjects' <$> (parseJSONObject o))

instance ToJSON DocumentInlineObjects where
        toJSON = toJSON . _dioAddtional

-- | The IDs of the positioned objects that are suggested to be attached to
-- this paragraph, keyed by suggestion ID.
--
-- /See:/ 'paragraphSuggestedPositionedObjectIds' smart constructor.
newtype ParagraphSuggestedPositionedObjectIds =
  ParagraphSuggestedPositionedObjectIds'
    { _pspoiAddtional :: HashMap Text ObjectReferences
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ParagraphSuggestedPositionedObjectIds' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pspoiAddtional'
paragraphSuggestedPositionedObjectIds
    :: HashMap Text ObjectReferences -- ^ 'pspoiAddtional'
    -> ParagraphSuggestedPositionedObjectIds
paragraphSuggestedPositionedObjectIds pPspoiAddtional_ =
  ParagraphSuggestedPositionedObjectIds'
    {_pspoiAddtional = _Coerce # pPspoiAddtional_}


pspoiAddtional :: Lens' ParagraphSuggestedPositionedObjectIds (HashMap Text ObjectReferences)
pspoiAddtional
  = lens _pspoiAddtional
      (\ s a -> s{_pspoiAddtional = a})
      . _Coerce

instance FromJSON
           ParagraphSuggestedPositionedObjectIds
         where
        parseJSON
          = withObject "ParagraphSuggestedPositionedObjectIds"
              (\ o ->
                 ParagraphSuggestedPositionedObjectIds' <$>
                   (parseJSONObject o))

instance ToJSON ParagraphSuggestedPositionedObjectIds
         where
        toJSON = toJSON . _pspoiAddtional

-- | A reference to another portion of a document or an external URL
-- resource.
--
-- /See:/ 'link' smart constructor.
data Link =
  Link'
    { _lURL        :: !(Maybe Text)
    , _lHeadingId  :: !(Maybe Text)
    , _lBookmarkId :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'Link' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lURL'
--
-- * 'lHeadingId'
--
-- * 'lBookmarkId'
link
    :: Link
link = Link' {_lURL = Nothing, _lHeadingId = Nothing, _lBookmarkId = Nothing}


-- | An external URL.
lURL :: Lens' Link (Maybe Text)
lURL = lens _lURL (\ s a -> s{_lURL = a})

-- | The ID of a heading in this document.
lHeadingId :: Lens' Link (Maybe Text)
lHeadingId
  = lens _lHeadingId (\ s a -> s{_lHeadingId = a})

-- | The ID of a bookmark in this document.
lBookmarkId :: Lens' Link (Maybe Text)
lBookmarkId
  = lens _lBookmarkId (\ s a -> s{_lBookmarkId = a})

instance FromJSON Link where
        parseJSON
          = withObject "Link"
              (\ o ->
                 Link' <$>
                   (o .:? "url") <*> (o .:? "headingId") <*>
                     (o .:? "bookmarkId"))

instance ToJSON Link where
        toJSON Link'{..}
          = object
              (catMaybes
                 [("url" .=) <$> _lURL,
                  ("headingId" .=) <$> _lHeadingId,
                  ("bookmarkId" .=) <$> _lBookmarkId])

-- | The suggested text style changes to this AutoText, keyed by suggestion
-- ID.
--
-- /See:/ 'autoTextSuggestedTextStyleChanges' smart constructor.
newtype AutoTextSuggestedTextStyleChanges =
  AutoTextSuggestedTextStyleChanges'
    { _atstscAddtional :: HashMap Text SuggestedTextStyle
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'AutoTextSuggestedTextStyleChanges' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atstscAddtional'
autoTextSuggestedTextStyleChanges
    :: HashMap Text SuggestedTextStyle -- ^ 'atstscAddtional'
    -> AutoTextSuggestedTextStyleChanges
autoTextSuggestedTextStyleChanges pAtstscAddtional_ =
  AutoTextSuggestedTextStyleChanges'
    {_atstscAddtional = _Coerce # pAtstscAddtional_}


atstscAddtional :: Lens' AutoTextSuggestedTextStyleChanges (HashMap Text SuggestedTextStyle)
atstscAddtional
  = lens _atstscAddtional
      (\ s a -> s{_atstscAddtional = a})
      . _Coerce

instance FromJSON AutoTextSuggestedTextStyleChanges
         where
        parseJSON
          = withObject "AutoTextSuggestedTextStyleChanges"
              (\ o ->
                 AutoTextSuggestedTextStyleChanges' <$>
                   (parseJSONObject o))

instance ToJSON AutoTextSuggestedTextStyleChanges
         where
        toJSON = toJSON . _atstscAddtional

-- | Inserts an InlineObject containing an image at the given location.
--
-- /See:/ 'insertInlineImageRequest' smart constructor.
data InsertInlineImageRequest =
  InsertInlineImageRequest'
    { _iiirLocation             :: !(Maybe Location)
    , _iiirEndOfSegmentLocation :: !(Maybe EndOfSegmentLocation)
    , _iiirURI                  :: !(Maybe Text)
    , _iiirObjectSize           :: !(Maybe Size)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'InsertInlineImageRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iiirLocation'
--
-- * 'iiirEndOfSegmentLocation'
--
-- * 'iiirURI'
--
-- * 'iiirObjectSize'
insertInlineImageRequest
    :: InsertInlineImageRequest
insertInlineImageRequest =
  InsertInlineImageRequest'
    { _iiirLocation = Nothing
    , _iiirEndOfSegmentLocation = Nothing
    , _iiirURI = Nothing
    , _iiirObjectSize = Nothing
    }


-- | Inserts the image at a specific index in the document. The image must be
-- inserted inside the bounds of an existing Paragraph. For instance, it
-- cannot be inserted at a table\'s start index (i.e. between the table and
-- its preceding paragraph). Inline images cannot be inserted inside a
-- footnote or equation.
iiirLocation :: Lens' InsertInlineImageRequest (Maybe Location)
iiirLocation
  = lens _iiirLocation (\ s a -> s{_iiirLocation = a})

-- | Inserts the text at the end of a header, footer or the document body.
-- Inline images cannot be inserted inside a footnote.
iiirEndOfSegmentLocation :: Lens' InsertInlineImageRequest (Maybe EndOfSegmentLocation)
iiirEndOfSegmentLocation
  = lens _iiirEndOfSegmentLocation
      (\ s a -> s{_iiirEndOfSegmentLocation = a})

-- | The image URI. The image is fetched once at insertion time and a copy is
-- stored for display inside the document. Images must be less than 50MB in
-- size, cannot exceed 25 megapixels, and must be in one of PNG, JPEG, or
-- GIF format. The provided URI can be at most 2 kB in length. The URI
-- itself is saved with the image, and exposed via the
-- ImageProperties.content_uri field.
iiirURI :: Lens' InsertInlineImageRequest (Maybe Text)
iiirURI = lens _iiirURI (\ s a -> s{_iiirURI = a})

-- | The size that the image should appear as in the document. This property
-- is optional and the final size of the image in the document is
-- determined by the following rules: * If neither width nor height is
-- specified, then a default size of the image is calculated based on its
-- resolution. * If one dimension is specified then the other dimension is
-- calculated to preserve the aspect ratio of the image. * If both width
-- and height are specified, the image is scaled to fit within the provided
-- dimensions while maintaining its aspect ratio.
iiirObjectSize :: Lens' InsertInlineImageRequest (Maybe Size)
iiirObjectSize
  = lens _iiirObjectSize
      (\ s a -> s{_iiirObjectSize = a})

instance FromJSON InsertInlineImageRequest where
        parseJSON
          = withObject "InsertInlineImageRequest"
              (\ o ->
                 InsertInlineImageRequest' <$>
                   (o .:? "location") <*> (o .:? "endOfSegmentLocation")
                     <*> (o .:? "uri")
                     <*> (o .:? "objectSize"))

instance ToJSON InsertInlineImageRequest where
        toJSON InsertInlineImageRequest'{..}
          = object
              (catMaybes
                 [("location" .=) <$> _iiirLocation,
                  ("endOfSegmentLocation" .=) <$>
                    _iiirEndOfSegmentLocation,
                  ("uri" .=) <$> _iiirURI,
                  ("objectSize" .=) <$> _iiirObjectSize])

-- | A magnitude in a single direction in the specified units.
--
-- /See:/ 'dimension' smart constructor.
data Dimension =
  Dimension'
    { _dMagnitude :: !(Maybe (Textual Double))
    , _dUnit      :: !(Maybe DimensionUnit)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'Dimension' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dMagnitude'
--
-- * 'dUnit'
dimension
    :: Dimension
dimension = Dimension' {_dMagnitude = Nothing, _dUnit = Nothing}


-- | The magnitude.
dMagnitude :: Lens' Dimension (Maybe Double)
dMagnitude
  = lens _dMagnitude (\ s a -> s{_dMagnitude = a}) .
      mapping _Coerce

-- | The units for magnitude.
dUnit :: Lens' Dimension (Maybe DimensionUnit)
dUnit = lens _dUnit (\ s a -> s{_dUnit = a})

instance FromJSON Dimension where
        parseJSON
          = withObject "Dimension"
              (\ o ->
                 Dimension' <$>
                   (o .:? "magnitude") <*> (o .:? "unit"))

instance ToJSON Dimension where
        toJSON Dimension'{..}
          = object
              (catMaybes
                 [("magnitude" .=) <$> _dMagnitude,
                  ("unit" .=) <$> _dUnit])

-- | The style of the document.
--
-- /See:/ 'documentStyle' smart constructor.
data DocumentStyle =
  DocumentStyle'
    { _dsMarginTop                :: !(Maybe Dimension)
    , _dsDefaultFooterId          :: !(Maybe Text)
    , _dsFirstPageHeaderId        :: !(Maybe Text)
    , _dsFirstPageFooterId        :: !(Maybe Text)
    , _dsDefaultHeaderId          :: !(Maybe Text)
    , _dsUseEvenPageHeaderFooter  :: !(Maybe Bool)
    , _dsMarginLeft               :: !(Maybe Dimension)
    , _dsPageNumberStart          :: !(Maybe (Textual Int32))
    , _dsUseFirstPageHeaderFooter :: !(Maybe Bool)
    , _dsEvenPageFooterId         :: !(Maybe Text)
    , _dsPageSize                 :: !(Maybe Size)
    , _dsBackgRound               :: !(Maybe BackgRound)
    , _dsMarginRight              :: !(Maybe Dimension)
    , _dsMarginBottom             :: !(Maybe Dimension)
    , _dsEvenPageHeaderId         :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'DocumentStyle' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dsMarginTop'
--
-- * 'dsDefaultFooterId'
--
-- * 'dsFirstPageHeaderId'
--
-- * 'dsFirstPageFooterId'
--
-- * 'dsDefaultHeaderId'
--
-- * 'dsUseEvenPageHeaderFooter'
--
-- * 'dsMarginLeft'
--
-- * 'dsPageNumberStart'
--
-- * 'dsUseFirstPageHeaderFooter'
--
-- * 'dsEvenPageFooterId'
--
-- * 'dsPageSize'
--
-- * 'dsBackgRound'
--
-- * 'dsMarginRight'
--
-- * 'dsMarginBottom'
--
-- * 'dsEvenPageHeaderId'
documentStyle
    :: DocumentStyle
documentStyle =
  DocumentStyle'
    { _dsMarginTop = Nothing
    , _dsDefaultFooterId = Nothing
    , _dsFirstPageHeaderId = Nothing
    , _dsFirstPageFooterId = Nothing
    , _dsDefaultHeaderId = Nothing
    , _dsUseEvenPageHeaderFooter = Nothing
    , _dsMarginLeft = Nothing
    , _dsPageNumberStart = Nothing
    , _dsUseFirstPageHeaderFooter = Nothing
    , _dsEvenPageFooterId = Nothing
    , _dsPageSize = Nothing
    , _dsBackgRound = Nothing
    , _dsMarginRight = Nothing
    , _dsMarginBottom = Nothing
    , _dsEvenPageHeaderId = Nothing
    }


-- | The top page margin.
dsMarginTop :: Lens' DocumentStyle (Maybe Dimension)
dsMarginTop
  = lens _dsMarginTop (\ s a -> s{_dsMarginTop = a})

-- | The ID of the default footer. If not set, there is no default footer.
dsDefaultFooterId :: Lens' DocumentStyle (Maybe Text)
dsDefaultFooterId
  = lens _dsDefaultFooterId
      (\ s a -> s{_dsDefaultFooterId = a})

-- | The ID of the header used only for the first page. If not set then a
-- unique header for the first page does not exist. The value of
-- use_first_page_header_footer determines whether to use the
-- default_header_id or this value for the header on the first page. If not
-- set, there is no first page header.
dsFirstPageHeaderId :: Lens' DocumentStyle (Maybe Text)
dsFirstPageHeaderId
  = lens _dsFirstPageHeaderId
      (\ s a -> s{_dsFirstPageHeaderId = a})

-- | The ID of the footer used only for the first page. If not set then a
-- unique footer for the first page does not exist. The value of
-- use_first_page_header_footer determines whether to use the
-- default_footer_id or this value for the footer on the first page. If not
-- set, there is no first page footer.
dsFirstPageFooterId :: Lens' DocumentStyle (Maybe Text)
dsFirstPageFooterId
  = lens _dsFirstPageFooterId
      (\ s a -> s{_dsFirstPageFooterId = a})

-- | The ID of the default header. If not set, there is no default header.
dsDefaultHeaderId :: Lens' DocumentStyle (Maybe Text)
dsDefaultHeaderId
  = lens _dsDefaultHeaderId
      (\ s a -> s{_dsDefaultHeaderId = a})

-- | Indicates whether to use the even page header \/ footer IDs for the even
-- pages.
dsUseEvenPageHeaderFooter :: Lens' DocumentStyle (Maybe Bool)
dsUseEvenPageHeaderFooter
  = lens _dsUseEvenPageHeaderFooter
      (\ s a -> s{_dsUseEvenPageHeaderFooter = a})

-- | The left page margin.
dsMarginLeft :: Lens' DocumentStyle (Maybe Dimension)
dsMarginLeft
  = lens _dsMarginLeft (\ s a -> s{_dsMarginLeft = a})

-- | The page number from which to start counting the number of pages.
dsPageNumberStart :: Lens' DocumentStyle (Maybe Int32)
dsPageNumberStart
  = lens _dsPageNumberStart
      (\ s a -> s{_dsPageNumberStart = a})
      . mapping _Coerce

-- | Indicates whether to use the first page header \/ footer IDs for the
-- first page.
dsUseFirstPageHeaderFooter :: Lens' DocumentStyle (Maybe Bool)
dsUseFirstPageHeaderFooter
  = lens _dsUseFirstPageHeaderFooter
      (\ s a -> s{_dsUseFirstPageHeaderFooter = a})

-- | The ID of the footer used only for even pages. The value of
-- use_even_page_header_footer determines whether to use the
-- default_footer_id or this value for the footer on even pages. If not
-- set, there is no even page footer.
dsEvenPageFooterId :: Lens' DocumentStyle (Maybe Text)
dsEvenPageFooterId
  = lens _dsEvenPageFooterId
      (\ s a -> s{_dsEvenPageFooterId = a})

-- | The size of a page in the document.
dsPageSize :: Lens' DocumentStyle (Maybe Size)
dsPageSize
  = lens _dsPageSize (\ s a -> s{_dsPageSize = a})

-- | The background of the document.
dsBackgRound :: Lens' DocumentStyle (Maybe BackgRound)
dsBackgRound
  = lens _dsBackgRound (\ s a -> s{_dsBackgRound = a})

-- | The right page margin.
dsMarginRight :: Lens' DocumentStyle (Maybe Dimension)
dsMarginRight
  = lens _dsMarginRight
      (\ s a -> s{_dsMarginRight = a})

-- | The bottom page margin.
dsMarginBottom :: Lens' DocumentStyle (Maybe Dimension)
dsMarginBottom
  = lens _dsMarginBottom
      (\ s a -> s{_dsMarginBottom = a})

-- | The ID of the header used only for even pages. The value of
-- use_even_page_header_footer determines whether to use the
-- default_header_id or this value for the header on even pages. If not
-- set, there is no even page header.
dsEvenPageHeaderId :: Lens' DocumentStyle (Maybe Text)
dsEvenPageHeaderId
  = lens _dsEvenPageHeaderId
      (\ s a -> s{_dsEvenPageHeaderId = a})

instance FromJSON DocumentStyle where
        parseJSON
          = withObject "DocumentStyle"
              (\ o ->
                 DocumentStyle' <$>
                   (o .:? "marginTop") <*> (o .:? "defaultFooterId") <*>
                     (o .:? "firstPageHeaderId")
                     <*> (o .:? "firstPageFooterId")
                     <*> (o .:? "defaultHeaderId")
                     <*> (o .:? "useEvenPageHeaderFooter")
                     <*> (o .:? "marginLeft")
                     <*> (o .:? "pageNumberStart")
                     <*> (o .:? "useFirstPageHeaderFooter")
                     <*> (o .:? "evenPageFooterId")
                     <*> (o .:? "pageSize")
                     <*> (o .:? "background")
                     <*> (o .:? "marginRight")
                     <*> (o .:? "marginBottom")
                     <*> (o .:? "evenPageHeaderId"))

instance ToJSON DocumentStyle where
        toJSON DocumentStyle'{..}
          = object
              (catMaybes
                 [("marginTop" .=) <$> _dsMarginTop,
                  ("defaultFooterId" .=) <$> _dsDefaultFooterId,
                  ("firstPageHeaderId" .=) <$> _dsFirstPageHeaderId,
                  ("firstPageFooterId" .=) <$> _dsFirstPageFooterId,
                  ("defaultHeaderId" .=) <$> _dsDefaultHeaderId,
                  ("useEvenPageHeaderFooter" .=) <$>
                    _dsUseEvenPageHeaderFooter,
                  ("marginLeft" .=) <$> _dsMarginLeft,
                  ("pageNumberStart" .=) <$> _dsPageNumberStart,
                  ("useFirstPageHeaderFooter" .=) <$>
                    _dsUseFirstPageHeaderFooter,
                  ("evenPageFooterId" .=) <$> _dsEvenPageFooterId,
                  ("pageSize" .=) <$> _dsPageSize,
                  ("background" .=) <$> _dsBackgRound,
                  ("marginRight" .=) <$> _dsMarginRight,
                  ("marginBottom" .=) <$> _dsMarginBottom,
                  ("evenPageHeaderId" .=) <$> _dsEvenPageHeaderId])

-- | The document body. The body typically contains the full document
-- contents except for headers, footers and footnotes.
--
-- /See:/ 'body' smart constructor.
newtype Body =
  Body'
    { _bContent :: Maybe [StructuralElement]
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'Body' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bContent'
body
    :: Body
body = Body' {_bContent = Nothing}


-- | The contents of the body. The indexes for the body\'s content begin at
-- zero.
bContent :: Lens' Body [StructuralElement]
bContent
  = lens _bContent (\ s a -> s{_bContent = a}) .
      _Default
      . _Coerce

instance FromJSON Body where
        parseJSON
          = withObject "Body"
              (\ o -> Body' <$> (o .:? "content" .!= mempty))

instance ToJSON Body where
        toJSON Body'{..}
          = object (catMaybes [("content" .=) <$> _bContent])

-- | A mask that indicates which of the fields on the base ListProperties
-- have been changed in this suggestion. For any field set to true, there
-- is a new suggested value.
--
-- /See:/ 'listPropertiesSuggestionState' smart constructor.
newtype ListPropertiesSuggestionState =
  ListPropertiesSuggestionState'
    { _lpssNestingLevelsSuggestionStates :: Maybe [NestingLevelSuggestionState]
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ListPropertiesSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lpssNestingLevelsSuggestionStates'
listPropertiesSuggestionState
    :: ListPropertiesSuggestionState
listPropertiesSuggestionState =
  ListPropertiesSuggestionState' {_lpssNestingLevelsSuggestionStates = Nothing}


-- | A mask that indicates which of the fields on the corresponding
-- NestingLevel in nesting_levels have been changed in this suggestion. The
-- nesting level suggestion states are returned in ascending order of the
-- nesting level with the least nested returned first.
lpssNestingLevelsSuggestionStates :: Lens' ListPropertiesSuggestionState [NestingLevelSuggestionState]
lpssNestingLevelsSuggestionStates
  = lens _lpssNestingLevelsSuggestionStates
      (\ s a -> s{_lpssNestingLevelsSuggestionStates = a})
      . _Default
      . _Coerce

instance FromJSON ListPropertiesSuggestionState where
        parseJSON
          = withObject "ListPropertiesSuggestionState"
              (\ o ->
                 ListPropertiesSuggestionState' <$>
                   (o .:? "nestingLevelsSuggestionStates" .!= mempty))

instance ToJSON ListPropertiesSuggestionState where
        toJSON ListPropertiesSuggestionState'{..}
          = object
              (catMaybes
                 [("nestingLevelsSuggestionStates" .=) <$>
                    _lpssNestingLevelsSuggestionStates])

-- | The suggested changes to this paragraph\'s bullet.
--
-- /See:/ 'paragraphSuggestedBulletChanges' smart constructor.
newtype ParagraphSuggestedBulletChanges =
  ParagraphSuggestedBulletChanges'
    { _psbcAddtional :: HashMap Text SuggestedBullet
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ParagraphSuggestedBulletChanges' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'psbcAddtional'
paragraphSuggestedBulletChanges
    :: HashMap Text SuggestedBullet -- ^ 'psbcAddtional'
    -> ParagraphSuggestedBulletChanges
paragraphSuggestedBulletChanges pPsbcAddtional_ =
  ParagraphSuggestedBulletChanges' {_psbcAddtional = _Coerce # pPsbcAddtional_}


psbcAddtional :: Lens' ParagraphSuggestedBulletChanges (HashMap Text SuggestedBullet)
psbcAddtional
  = lens _psbcAddtional
      (\ s a -> s{_psbcAddtional = a})
      . _Coerce

instance FromJSON ParagraphSuggestedBulletChanges
         where
        parseJSON
          = withObject "ParagraphSuggestedBulletChanges"
              (\ o ->
                 ParagraphSuggestedBulletChanges' <$>
                   (parseJSONObject o))

instance ToJSON ParagraphSuggestedBulletChanges where
        toJSON = toJSON . _psbcAddtional

-- | A single response from an update.
--
-- /See:/ 'response' smart constructor.
data Response =
  Response'
    { _rReplaceAllText          :: !(Maybe ReplaceAllTextResponse)
    , _rCreateNamedRange        :: !(Maybe CreateNamedRangeResponse)
    , _rInsertInlineImage       :: !(Maybe InsertInlineImageResponse)
    , _rInsertInlineSheetsChart :: !(Maybe InsertInlineSheetsChartResponse)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'Response' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rReplaceAllText'
--
-- * 'rCreateNamedRange'
--
-- * 'rInsertInlineImage'
--
-- * 'rInsertInlineSheetsChart'
response
    :: Response
response =
  Response'
    { _rReplaceAllText = Nothing
    , _rCreateNamedRange = Nothing
    , _rInsertInlineImage = Nothing
    , _rInsertInlineSheetsChart = Nothing
    }


-- | The result of replacing text.
rReplaceAllText :: Lens' Response (Maybe ReplaceAllTextResponse)
rReplaceAllText
  = lens _rReplaceAllText
      (\ s a -> s{_rReplaceAllText = a})

-- | The result of creating a named range.
rCreateNamedRange :: Lens' Response (Maybe CreateNamedRangeResponse)
rCreateNamedRange
  = lens _rCreateNamedRange
      (\ s a -> s{_rCreateNamedRange = a})

-- | The result of inserting an inline image.
rInsertInlineImage :: Lens' Response (Maybe InsertInlineImageResponse)
rInsertInlineImage
  = lens _rInsertInlineImage
      (\ s a -> s{_rInsertInlineImage = a})

-- | The result of inserting an inline Google Sheets chart.
rInsertInlineSheetsChart :: Lens' Response (Maybe InsertInlineSheetsChartResponse)
rInsertInlineSheetsChart
  = lens _rInsertInlineSheetsChart
      (\ s a -> s{_rInsertInlineSheetsChart = a})

instance FromJSON Response where
        parseJSON
          = withObject "Response"
              (\ o ->
                 Response' <$>
                   (o .:? "replaceAllText") <*>
                     (o .:? "createNamedRange")
                     <*> (o .:? "insertInlineImage")
                     <*> (o .:? "insertInlineSheetsChart"))

instance ToJSON Response where
        toJSON Response'{..}
          = object
              (catMaybes
                 [("replaceAllText" .=) <$> _rReplaceAllText,
                  ("createNamedRange" .=) <$> _rCreateNamedRange,
                  ("insertInlineImage" .=) <$> _rInsertInlineImage,
                  ("insertInlineSheetsChart" .=) <$>
                    _rInsertInlineSheetsChart])

-- | A reference to a linked chart embedded from Google Sheets.
--
-- /See:/ 'sheetsChartReference' smart constructor.
data SheetsChartReference =
  SheetsChartReference'
    { _scrSpreadsheetId :: !(Maybe Text)
    , _scrChartId       :: !(Maybe (Textual Int32))
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'SheetsChartReference' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'scrSpreadsheetId'
--
-- * 'scrChartId'
sheetsChartReference
    :: SheetsChartReference
sheetsChartReference =
  SheetsChartReference' {_scrSpreadsheetId = Nothing, _scrChartId = Nothing}


-- | The ID of the Google Sheets spreadsheet that contains the source chart.
scrSpreadsheetId :: Lens' SheetsChartReference (Maybe Text)
scrSpreadsheetId
  = lens _scrSpreadsheetId
      (\ s a -> s{_scrSpreadsheetId = a})

-- | The ID of the specific chart in the Google Sheets spreadsheet that is
-- embedded.
scrChartId :: Lens' SheetsChartReference (Maybe Int32)
scrChartId
  = lens _scrChartId (\ s a -> s{_scrChartId = a}) .
      mapping _Coerce

instance FromJSON SheetsChartReference where
        parseJSON
          = withObject "SheetsChartReference"
              (\ o ->
                 SheetsChartReference' <$>
                   (o .:? "spreadsheetId") <*> (o .:? "chartId"))

instance ToJSON SheetsChartReference where
        toJSON SheetsChartReference'{..}
          = object
              (catMaybes
                 [("spreadsheetId" .=) <$> _scrSpreadsheetId,
                  ("chartId" .=) <$> _scrChartId])

-- | A color that can either be fully opaque or fully transparent.
--
-- /See:/ 'optionalColor' smart constructor.
newtype OptionalColor =
  OptionalColor'
    { _ocColor :: Maybe Color
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'OptionalColor' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ocColor'
optionalColor
    :: OptionalColor
optionalColor = OptionalColor' {_ocColor = Nothing}


-- | If set, this will be used as an opaque color. If unset, this represents
-- a transparent color.
ocColor :: Lens' OptionalColor (Maybe Color)
ocColor = lens _ocColor (\ s a -> s{_ocColor = a})

instance FromJSON OptionalColor where
        parseJSON
          = withObject "OptionalColor"
              (\ o -> OptionalColor' <$> (o .:? "color"))

instance ToJSON OptionalColor where
        toJSON OptionalColor'{..}
          = object (catMaybes [("color" .=) <$> _ocColor])

-- | The result of creating a named range.
--
-- /See:/ 'createNamedRangeResponse' smart constructor.
newtype CreateNamedRangeResponse =
  CreateNamedRangeResponse'
    { _cnrrNamedRangeId :: Maybe Text
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'CreateNamedRangeResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cnrrNamedRangeId'
createNamedRangeResponse
    :: CreateNamedRangeResponse
createNamedRangeResponse =
  CreateNamedRangeResponse' {_cnrrNamedRangeId = Nothing}


-- | The ID of the created named range.
cnrrNamedRangeId :: Lens' CreateNamedRangeResponse (Maybe Text)
cnrrNamedRangeId
  = lens _cnrrNamedRangeId
      (\ s a -> s{_cnrrNamedRangeId = a})

instance FromJSON CreateNamedRangeResponse where
        parseJSON
          = withObject "CreateNamedRangeResponse"
              (\ o ->
                 CreateNamedRangeResponse' <$> (o .:? "namedRangeId"))

instance ToJSON CreateNamedRangeResponse where
        toJSON CreateNamedRangeResponse'{..}
          = object
              (catMaybes
                 [("namedRangeId" .=) <$> _cnrrNamedRangeId])

-- | A suggested change to a Bullet.
--
-- /See:/ 'suggestedBullet' smart constructor.
data SuggestedBullet =
  SuggestedBullet'
    { _sbBullet                :: !(Maybe Bullet)
    , _sbBulletSuggestionState :: !(Maybe BulletSuggestionState)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'SuggestedBullet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sbBullet'
--
-- * 'sbBulletSuggestionState'
suggestedBullet
    :: SuggestedBullet
suggestedBullet =
  SuggestedBullet' {_sbBullet = Nothing, _sbBulletSuggestionState = Nothing}


-- | A Bullet that only includes the changes made in this suggestion. This
-- can be used along with the bullet_suggestion_state to see which fields
-- have changed and their new values.
sbBullet :: Lens' SuggestedBullet (Maybe Bullet)
sbBullet = lens _sbBullet (\ s a -> s{_sbBullet = a})

-- | A mask that indicates which of the fields on the base Bullet have been
-- changed in this suggestion.
sbBulletSuggestionState :: Lens' SuggestedBullet (Maybe BulletSuggestionState)
sbBulletSuggestionState
  = lens _sbBulletSuggestionState
      (\ s a -> s{_sbBulletSuggestionState = a})

instance FromJSON SuggestedBullet where
        parseJSON
          = withObject "SuggestedBullet"
              (\ o ->
                 SuggestedBullet' <$>
                   (o .:? "bullet") <*> (o .:? "bulletSuggestionState"))

instance ToJSON SuggestedBullet where
        toJSON SuggestedBullet'{..}
          = object
              (catMaybes
                 [("bullet" .=) <$> _sbBullet,
                  ("bulletSuggestionState" .=) <$>
                    _sbBulletSuggestionState])

-- | An embedded object in the document.
--
-- /See:/ 'embeddedObject' smart constructor.
data EmbeddedObject =
  EmbeddedObject'
    { _eoMarginTop                 :: !(Maybe Dimension)
    , _eoSize                      :: !(Maybe Size)
    , _eoLinkedContentReference    :: !(Maybe LinkedContentReference)
    , _eoImageProperties           :: !(Maybe ImageProperties)
    , _eoEmbeddedObjectBOrder      :: !(Maybe EmbeddedObjectBOrder)
    , _eoEmbeddedDrawingProperties :: !(Maybe EmbeddedDrawingProperties)
    , _eoMarginLeft                :: !(Maybe Dimension)
    , _eoTitle                     :: !(Maybe Text)
    , _eoMarginRight               :: !(Maybe Dimension)
    , _eoDescription               :: !(Maybe Text)
    , _eoMarginBottom              :: !(Maybe Dimension)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'EmbeddedObject' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'eoMarginTop'
--
-- * 'eoSize'
--
-- * 'eoLinkedContentReference'
--
-- * 'eoImageProperties'
--
-- * 'eoEmbeddedObjectBOrder'
--
-- * 'eoEmbeddedDrawingProperties'
--
-- * 'eoMarginLeft'
--
-- * 'eoTitle'
--
-- * 'eoMarginRight'
--
-- * 'eoDescription'
--
-- * 'eoMarginBottom'
embeddedObject
    :: EmbeddedObject
embeddedObject =
  EmbeddedObject'
    { _eoMarginTop = Nothing
    , _eoSize = Nothing
    , _eoLinkedContentReference = Nothing
    , _eoImageProperties = Nothing
    , _eoEmbeddedObjectBOrder = Nothing
    , _eoEmbeddedDrawingProperties = Nothing
    , _eoMarginLeft = Nothing
    , _eoTitle = Nothing
    , _eoMarginRight = Nothing
    , _eoDescription = Nothing
    , _eoMarginBottom = Nothing
    }


-- | The top margin of the embedded object.
eoMarginTop :: Lens' EmbeddedObject (Maybe Dimension)
eoMarginTop
  = lens _eoMarginTop (\ s a -> s{_eoMarginTop = a})

-- | The size of the embedded object.
eoSize :: Lens' EmbeddedObject (Maybe Size)
eoSize = lens _eoSize (\ s a -> s{_eoSize = a})

-- | A reference to the external linked source content. For example, it
-- contains a reference to the source Sheets chart when the embedded object
-- is a linked chart. If unset, then the embedded object is not linked.
eoLinkedContentReference :: Lens' EmbeddedObject (Maybe LinkedContentReference)
eoLinkedContentReference
  = lens _eoLinkedContentReference
      (\ s a -> s{_eoLinkedContentReference = a})

-- | The properties of an image.
eoImageProperties :: Lens' EmbeddedObject (Maybe ImageProperties)
eoImageProperties
  = lens _eoImageProperties
      (\ s a -> s{_eoImageProperties = a})

-- | The border of the embedded object.
eoEmbeddedObjectBOrder :: Lens' EmbeddedObject (Maybe EmbeddedObjectBOrder)
eoEmbeddedObjectBOrder
  = lens _eoEmbeddedObjectBOrder
      (\ s a -> s{_eoEmbeddedObjectBOrder = a})

-- | The properties of an embedded drawing.
eoEmbeddedDrawingProperties :: Lens' EmbeddedObject (Maybe EmbeddedDrawingProperties)
eoEmbeddedDrawingProperties
  = lens _eoEmbeddedDrawingProperties
      (\ s a -> s{_eoEmbeddedDrawingProperties = a})

-- | The left margin of the embedded object.
eoMarginLeft :: Lens' EmbeddedObject (Maybe Dimension)
eoMarginLeft
  = lens _eoMarginLeft (\ s a -> s{_eoMarginLeft = a})

-- | The title of the embedded object. The \`title\` and \`description\` are
-- both combined to display alt text.
eoTitle :: Lens' EmbeddedObject (Maybe Text)
eoTitle = lens _eoTitle (\ s a -> s{_eoTitle = a})

-- | The right margin of the embedded object.
eoMarginRight :: Lens' EmbeddedObject (Maybe Dimension)
eoMarginRight
  = lens _eoMarginRight
      (\ s a -> s{_eoMarginRight = a})

-- | The description of the embedded object. The \`title\` and
-- \`description\` are both combined to display alt text.
eoDescription :: Lens' EmbeddedObject (Maybe Text)
eoDescription
  = lens _eoDescription
      (\ s a -> s{_eoDescription = a})

-- | The bottom margin of the embedded object.
eoMarginBottom :: Lens' EmbeddedObject (Maybe Dimension)
eoMarginBottom
  = lens _eoMarginBottom
      (\ s a -> s{_eoMarginBottom = a})

instance FromJSON EmbeddedObject where
        parseJSON
          = withObject "EmbeddedObject"
              (\ o ->
                 EmbeddedObject' <$>
                   (o .:? "marginTop") <*> (o .:? "size") <*>
                     (o .:? "linkedContentReference")
                     <*> (o .:? "imageProperties")
                     <*> (o .:? "embeddedObjectBorder")
                     <*> (o .:? "embeddedDrawingProperties")
                     <*> (o .:? "marginLeft")
                     <*> (o .:? "title")
                     <*> (o .:? "marginRight")
                     <*> (o .:? "description")
                     <*> (o .:? "marginBottom"))

instance ToJSON EmbeddedObject where
        toJSON EmbeddedObject'{..}
          = object
              (catMaybes
                 [("marginTop" .=) <$> _eoMarginTop,
                  ("size" .=) <$> _eoSize,
                  ("linkedContentReference" .=) <$>
                    _eoLinkedContentReference,
                  ("imageProperties" .=) <$> _eoImageProperties,
                  ("embeddedObjectBorder" .=) <$>
                    _eoEmbeddedObjectBOrder,
                  ("embeddedDrawingProperties" .=) <$>
                    _eoEmbeddedDrawingProperties,
                  ("marginLeft" .=) <$> _eoMarginLeft,
                  ("title" .=) <$> _eoTitle,
                  ("marginRight" .=) <$> _eoMarginRight,
                  ("description" .=) <$> _eoDescription,
                  ("marginBottom" .=) <$> _eoMarginBottom])

-- | The result of replacing text.
--
-- /See:/ 'replaceAllTextResponse' smart constructor.
newtype ReplaceAllTextResponse =
  ReplaceAllTextResponse'
    { _ratrOccurrencesChanged :: Maybe (Textual Int32)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ReplaceAllTextResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ratrOccurrencesChanged'
replaceAllTextResponse
    :: ReplaceAllTextResponse
replaceAllTextResponse =
  ReplaceAllTextResponse' {_ratrOccurrencesChanged = Nothing}


-- | The number of occurrences changed by replacing all text.
ratrOccurrencesChanged :: Lens' ReplaceAllTextResponse (Maybe Int32)
ratrOccurrencesChanged
  = lens _ratrOccurrencesChanged
      (\ s a -> s{_ratrOccurrencesChanged = a})
      . mapping _Coerce

instance FromJSON ReplaceAllTextResponse where
        parseJSON
          = withObject "ReplaceAllTextResponse"
              (\ o ->
                 ReplaceAllTextResponse' <$>
                   (o .:? "occurrencesChanged"))

instance ToJSON ReplaceAllTextResponse where
        toJSON ReplaceAllTextResponse'{..}
          = object
              (catMaybes
                 [("occurrencesChanged" .=) <$>
                    _ratrOccurrencesChanged])

-- | A mask that indicates which of the fields on the base DocumentStyle have
-- been changed in this suggestion. For any field set to true, there is a
-- new suggested value.
--
-- /See:/ 'documentStyleSuggestionState' smart constructor.
data DocumentStyleSuggestionState =
  DocumentStyleSuggestionState'
    { _dsssFirstPageFooterIdSuggested        :: !(Maybe Bool)
    , _dsssDefaultHeaderIdSuggested          :: !(Maybe Bool)
    , _dsssUseEvenPageHeaderFooterSuggested  :: !(Maybe Bool)
    , _dsssPageNumberStartSuggested          :: !(Maybe Bool)
    , _dsssBackgRoundSuggestionState         :: !(Maybe BackgRoundSuggestionState)
    , _dsssUseFirstPageHeaderFooterSuggested :: !(Maybe Bool)
    , _dsssPageSizeSuggestionState           :: !(Maybe SizeSuggestionState)
    , _dsssMarginTopSuggested                :: !(Maybe Bool)
    , _dsssEvenPageFooterIdSuggested         :: !(Maybe Bool)
    , _dsssMarginBottomSuggested             :: !(Maybe Bool)
    , _dsssEvenPageHeaderIdSuggested         :: !(Maybe Bool)
    , _dsssMarginLeftSuggested               :: !(Maybe Bool)
    , _dsssMarginRightSuggested              :: !(Maybe Bool)
    , _dsssFirstPageHeaderIdSuggested        :: !(Maybe Bool)
    , _dsssDefaultFooterIdSuggested          :: !(Maybe Bool)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'DocumentStyleSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dsssFirstPageFooterIdSuggested'
--
-- * 'dsssDefaultHeaderIdSuggested'
--
-- * 'dsssUseEvenPageHeaderFooterSuggested'
--
-- * 'dsssPageNumberStartSuggested'
--
-- * 'dsssBackgRoundSuggestionState'
--
-- * 'dsssUseFirstPageHeaderFooterSuggested'
--
-- * 'dsssPageSizeSuggestionState'
--
-- * 'dsssMarginTopSuggested'
--
-- * 'dsssEvenPageFooterIdSuggested'
--
-- * 'dsssMarginBottomSuggested'
--
-- * 'dsssEvenPageHeaderIdSuggested'
--
-- * 'dsssMarginLeftSuggested'
--
-- * 'dsssMarginRightSuggested'
--
-- * 'dsssFirstPageHeaderIdSuggested'
--
-- * 'dsssDefaultFooterIdSuggested'
documentStyleSuggestionState
    :: DocumentStyleSuggestionState
documentStyleSuggestionState =
  DocumentStyleSuggestionState'
    { _dsssFirstPageFooterIdSuggested = Nothing
    , _dsssDefaultHeaderIdSuggested = Nothing
    , _dsssUseEvenPageHeaderFooterSuggested = Nothing
    , _dsssPageNumberStartSuggested = Nothing
    , _dsssBackgRoundSuggestionState = Nothing
    , _dsssUseFirstPageHeaderFooterSuggested = Nothing
    , _dsssPageSizeSuggestionState = Nothing
    , _dsssMarginTopSuggested = Nothing
    , _dsssEvenPageFooterIdSuggested = Nothing
    , _dsssMarginBottomSuggested = Nothing
    , _dsssEvenPageHeaderIdSuggested = Nothing
    , _dsssMarginLeftSuggested = Nothing
    , _dsssMarginRightSuggested = Nothing
    , _dsssFirstPageHeaderIdSuggested = Nothing
    , _dsssDefaultFooterIdSuggested = Nothing
    }


-- | Indicates if there was a suggested change to first_page_footer_id.
dsssFirstPageFooterIdSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssFirstPageFooterIdSuggested
  = lens _dsssFirstPageFooterIdSuggested
      (\ s a -> s{_dsssFirstPageFooterIdSuggested = a})

-- | Indicates if there was a suggested change to default_header_id.
dsssDefaultHeaderIdSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssDefaultHeaderIdSuggested
  = lens _dsssDefaultHeaderIdSuggested
      (\ s a -> s{_dsssDefaultHeaderIdSuggested = a})

-- | Indicates if there was a suggested change to
-- use_even_page_header_footer.
dsssUseEvenPageHeaderFooterSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssUseEvenPageHeaderFooterSuggested
  = lens _dsssUseEvenPageHeaderFooterSuggested
      (\ s a ->
         s{_dsssUseEvenPageHeaderFooterSuggested = a})

-- | Indicates if there was a suggested change to page_number_start.
dsssPageNumberStartSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssPageNumberStartSuggested
  = lens _dsssPageNumberStartSuggested
      (\ s a -> s{_dsssPageNumberStartSuggested = a})

-- | A mask that indicates which of the fields in background have been
-- changed in this suggestion.
dsssBackgRoundSuggestionState :: Lens' DocumentStyleSuggestionState (Maybe BackgRoundSuggestionState)
dsssBackgRoundSuggestionState
  = lens _dsssBackgRoundSuggestionState
      (\ s a -> s{_dsssBackgRoundSuggestionState = a})

-- | Indicates if there was a suggested change to
-- use_first_page_header_footer.
dsssUseFirstPageHeaderFooterSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssUseFirstPageHeaderFooterSuggested
  = lens _dsssUseFirstPageHeaderFooterSuggested
      (\ s a ->
         s{_dsssUseFirstPageHeaderFooterSuggested = a})

-- | A mask that indicates which of the fields in size have been changed in
-- this suggestion.
dsssPageSizeSuggestionState :: Lens' DocumentStyleSuggestionState (Maybe SizeSuggestionState)
dsssPageSizeSuggestionState
  = lens _dsssPageSizeSuggestionState
      (\ s a -> s{_dsssPageSizeSuggestionState = a})

-- | Indicates if there was a suggested change to margin_top.
dsssMarginTopSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssMarginTopSuggested
  = lens _dsssMarginTopSuggested
      (\ s a -> s{_dsssMarginTopSuggested = a})

-- | Indicates if there was a suggested change to even_page_footer_id.
dsssEvenPageFooterIdSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssEvenPageFooterIdSuggested
  = lens _dsssEvenPageFooterIdSuggested
      (\ s a -> s{_dsssEvenPageFooterIdSuggested = a})

-- | Indicates if there was a suggested change to margin_bottom.
dsssMarginBottomSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssMarginBottomSuggested
  = lens _dsssMarginBottomSuggested
      (\ s a -> s{_dsssMarginBottomSuggested = a})

-- | Indicates if there was a suggested change to even_page_header_id.
dsssEvenPageHeaderIdSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssEvenPageHeaderIdSuggested
  = lens _dsssEvenPageHeaderIdSuggested
      (\ s a -> s{_dsssEvenPageHeaderIdSuggested = a})

-- | Indicates if there was a suggested change to margin_left.
dsssMarginLeftSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssMarginLeftSuggested
  = lens _dsssMarginLeftSuggested
      (\ s a -> s{_dsssMarginLeftSuggested = a})

-- | Indicates if there was a suggested change to margin_right.
dsssMarginRightSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssMarginRightSuggested
  = lens _dsssMarginRightSuggested
      (\ s a -> s{_dsssMarginRightSuggested = a})

-- | Indicates if there was a suggested change to first_page_header_id.
dsssFirstPageHeaderIdSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssFirstPageHeaderIdSuggested
  = lens _dsssFirstPageHeaderIdSuggested
      (\ s a -> s{_dsssFirstPageHeaderIdSuggested = a})

-- | Indicates if there was a suggested change to default_footer_id.
dsssDefaultFooterIdSuggested :: Lens' DocumentStyleSuggestionState (Maybe Bool)
dsssDefaultFooterIdSuggested
  = lens _dsssDefaultFooterIdSuggested
      (\ s a -> s{_dsssDefaultFooterIdSuggested = a})

instance FromJSON DocumentStyleSuggestionState where
        parseJSON
          = withObject "DocumentStyleSuggestionState"
              (\ o ->
                 DocumentStyleSuggestionState' <$>
                   (o .:? "firstPageFooterIdSuggested") <*>
                     (o .:? "defaultHeaderIdSuggested")
                     <*> (o .:? "useEvenPageHeaderFooterSuggested")
                     <*> (o .:? "pageNumberStartSuggested")
                     <*> (o .:? "backgroundSuggestionState")
                     <*> (o .:? "useFirstPageHeaderFooterSuggested")
                     <*> (o .:? "pageSizeSuggestionState")
                     <*> (o .:? "marginTopSuggested")
                     <*> (o .:? "evenPageFooterIdSuggested")
                     <*> (o .:? "marginBottomSuggested")
                     <*> (o .:? "evenPageHeaderIdSuggested")
                     <*> (o .:? "marginLeftSuggested")
                     <*> (o .:? "marginRightSuggested")
                     <*> (o .:? "firstPageHeaderIdSuggested")
                     <*> (o .:? "defaultFooterIdSuggested"))

instance ToJSON DocumentStyleSuggestionState where
        toJSON DocumentStyleSuggestionState'{..}
          = object
              (catMaybes
                 [("firstPageFooterIdSuggested" .=) <$>
                    _dsssFirstPageFooterIdSuggested,
                  ("defaultHeaderIdSuggested" .=) <$>
                    _dsssDefaultHeaderIdSuggested,
                  ("useEvenPageHeaderFooterSuggested" .=) <$>
                    _dsssUseEvenPageHeaderFooterSuggested,
                  ("pageNumberStartSuggested" .=) <$>
                    _dsssPageNumberStartSuggested,
                  ("backgroundSuggestionState" .=) <$>
                    _dsssBackgRoundSuggestionState,
                  ("useFirstPageHeaderFooterSuggested" .=) <$>
                    _dsssUseFirstPageHeaderFooterSuggested,
                  ("pageSizeSuggestionState" .=) <$>
                    _dsssPageSizeSuggestionState,
                  ("marginTopSuggested" .=) <$>
                    _dsssMarginTopSuggested,
                  ("evenPageFooterIdSuggested" .=) <$>
                    _dsssEvenPageFooterIdSuggested,
                  ("marginBottomSuggested" .=) <$>
                    _dsssMarginBottomSuggested,
                  ("evenPageHeaderIdSuggested" .=) <$>
                    _dsssEvenPageHeaderIdSuggested,
                  ("marginLeftSuggested" .=) <$>
                    _dsssMarginLeftSuggested,
                  ("marginRightSuggested" .=) <$>
                    _dsssMarginRightSuggested,
                  ("firstPageHeaderIdSuggested" .=) <$>
                    _dsssFirstPageHeaderIdSuggested,
                  ("defaultFooterIdSuggested" .=) <$>
                    _dsssDefaultFooterIdSuggested])

-- | A reference to the external linked source content.
--
-- /See:/ 'linkedContentReference' smart constructor.
newtype LinkedContentReference =
  LinkedContentReference'
    { _lcrSheetsChartReference :: Maybe SheetsChartReference
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'LinkedContentReference' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lcrSheetsChartReference'
linkedContentReference
    :: LinkedContentReference
linkedContentReference =
  LinkedContentReference' {_lcrSheetsChartReference = Nothing}


-- | A reference to the linked chart.
lcrSheetsChartReference :: Lens' LinkedContentReference (Maybe SheetsChartReference)
lcrSheetsChartReference
  = lens _lcrSheetsChartReference
      (\ s a -> s{_lcrSheetsChartReference = a})

instance FromJSON LinkedContentReference where
        parseJSON
          = withObject "LinkedContentReference"
              (\ o ->
                 LinkedContentReference' <$>
                   (o .:? "sheetsChartReference"))

instance ToJSON LinkedContentReference where
        toJSON LinkedContentReference'{..}
          = object
              (catMaybes
                 [("sheetsChartReference" .=) <$>
                    _lcrSheetsChartReference])

-- | The shading of a paragraph.
--
-- /See:/ 'shading' smart constructor.
newtype Shading =
  Shading'
    { _sBackgRoundColor :: Maybe OptionalColor
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'Shading' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sBackgRoundColor'
shading
    :: Shading
shading = Shading' {_sBackgRoundColor = Nothing}


-- | The background color of this paragraph shading.
sBackgRoundColor :: Lens' Shading (Maybe OptionalColor)
sBackgRoundColor
  = lens _sBackgRoundColor
      (\ s a -> s{_sBackgRoundColor = a})

instance FromJSON Shading where
        parseJSON
          = withObject "Shading"
              (\ o -> Shading' <$> (o .:? "backgroundColor"))

instance ToJSON Shading where
        toJSON Shading'{..}
          = object
              (catMaybes
                 [("backgroundColor" .=) <$> _sBackgRoundColor])

-- | A mask that indicates which of the fields on the base
-- InlineObjectProperties have been changed in this suggestion. For any
-- field set to true, there is a new suggested value.
--
-- /See:/ 'inlineObjectPropertiesSuggestionState' smart constructor.
newtype InlineObjectPropertiesSuggestionState =
  InlineObjectPropertiesSuggestionState'
    { _iopssEmbeddedObjectSuggestionState :: Maybe EmbeddedObjectSuggestionState
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'InlineObjectPropertiesSuggestionState' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iopssEmbeddedObjectSuggestionState'
inlineObjectPropertiesSuggestionState
    :: InlineObjectPropertiesSuggestionState
inlineObjectPropertiesSuggestionState =
  InlineObjectPropertiesSuggestionState'
    {_iopssEmbeddedObjectSuggestionState = Nothing}


-- | A mask that indicates which of the fields in embedded_object have been
-- changed in this suggestion.
iopssEmbeddedObjectSuggestionState :: Lens' InlineObjectPropertiesSuggestionState (Maybe EmbeddedObjectSuggestionState)
iopssEmbeddedObjectSuggestionState
  = lens _iopssEmbeddedObjectSuggestionState
      (\ s a -> s{_iopssEmbeddedObjectSuggestionState = a})

instance FromJSON
           InlineObjectPropertiesSuggestionState
         where
        parseJSON
          = withObject "InlineObjectPropertiesSuggestionState"
              (\ o ->
                 InlineObjectPropertiesSuggestionState' <$>
                   (o .:? "embeddedObjectSuggestionState"))

instance ToJSON InlineObjectPropertiesSuggestionState
         where
        toJSON InlineObjectPropertiesSuggestionState'{..}
          = object
              (catMaybes
                 [("embeddedObjectSuggestionState" .=) <$>
                    _iopssEmbeddedObjectSuggestionState])

-- | The suggested text style changes to this PageBreak, keyed by suggestion
-- ID.
--
-- /See:/ 'pageBreakSuggestedTextStyleChanges' smart constructor.
newtype PageBreakSuggestedTextStyleChanges =
  PageBreakSuggestedTextStyleChanges'
    { _pbstscAddtional :: HashMap Text SuggestedTextStyle
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'PageBreakSuggestedTextStyleChanges' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pbstscAddtional'
pageBreakSuggestedTextStyleChanges
    ::