{-# 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.Slides.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.Slides.Types.Product where

import           Network.Google.Prelude
import           Network.Google.Slides.Types.Sum

-- | A TextElement kind that represents the beginning of a new paragraph.
--
-- /See:/ 'paragraphMarker' smart constructor.
data ParagraphMarker = ParagraphMarker'
    { _pmStyle  :: !(Maybe ParagraphStyle)
    , _pmBullet :: !(Maybe Bullet)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ParagraphMarker' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pmStyle'
--
-- * 'pmBullet'
paragraphMarker
    :: ParagraphMarker
paragraphMarker =
    ParagraphMarker'
    { _pmStyle = Nothing
    , _pmBullet = Nothing
    }

-- | The paragraph\'s style
pmStyle :: Lens' ParagraphMarker (Maybe ParagraphStyle)
pmStyle = lens _pmStyle (\ s a -> s{_pmStyle = a})

-- | The bullet for this paragraph. If not present, the paragraph does not
-- belong to a list.
pmBullet :: Lens' ParagraphMarker (Maybe Bullet)
pmBullet = lens _pmBullet (\ s a -> s{_pmBullet = a})

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

instance ToJSON ParagraphMarker where
        toJSON ParagraphMarker'{..}
          = object
              (catMaybes
                 [("style" .=) <$> _pmStyle,
                  ("bullet" .=) <$> _pmBullet])

-- | Deletes a row from a table.
--
-- /See:/ 'deleteTableRowRequest' smart constructor.
data DeleteTableRowRequest = DeleteTableRowRequest'
    { _dtrrCellLocation  :: !(Maybe TableCellLocation)
    , _dtrrTableObjectId :: !(Maybe Text)
    } 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:
--
-- * 'dtrrCellLocation'
--
-- * 'dtrrTableObjectId'
deleteTableRowRequest
    :: DeleteTableRowRequest
deleteTableRowRequest =
    DeleteTableRowRequest'
    { _dtrrCellLocation = Nothing
    , _dtrrTableObjectId = Nothing
    }

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

-- | The table to delete rows from.
dtrrTableObjectId :: Lens' DeleteTableRowRequest (Maybe Text)
dtrrTableObjectId
  = lens _dtrrTableObjectId
      (\ s a -> s{_dtrrTableObjectId = a})

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

instance ToJSON DeleteTableRowRequest where
        toJSON DeleteTableRowRequest'{..}
          = object
              (catMaybes
                 [("cellLocation" .=) <$> _dtrrCellLocation,
                  ("tableObjectId" .=) <$> _dtrrTableObjectId])

-- | Common properties for a page element. Note: When you initially create a
-- PageElement, the API may modify the values of both \`size\` and
-- \`transform\`, but the visual size will be unchanged.
--
-- /See:/ 'pageElementProperties' smart constructor.
data PageElementProperties = PageElementProperties'
    { _pepTransform    :: !(Maybe AffineTransform)
    , _pepSize         :: !(Maybe Size)
    , _pepPageObjectId :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'PageElementProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pepTransform'
--
-- * 'pepSize'
--
-- * 'pepPageObjectId'
pageElementProperties
    :: PageElementProperties
pageElementProperties =
    PageElementProperties'
    { _pepTransform = Nothing
    , _pepSize = Nothing
    , _pepPageObjectId = Nothing
    }

-- | The transform for the element.
pepTransform :: Lens' PageElementProperties (Maybe AffineTransform)
pepTransform
  = lens _pepTransform (\ s a -> s{_pepTransform = a})

-- | The size of the element.
pepSize :: Lens' PageElementProperties (Maybe Size)
pepSize = lens _pepSize (\ s a -> s{_pepSize = a})

-- | The object ID of the page where the element is located.
pepPageObjectId :: Lens' PageElementProperties (Maybe Text)
pepPageObjectId
  = lens _pepPageObjectId
      (\ s a -> s{_pepPageObjectId = a})

instance FromJSON PageElementProperties where
        parseJSON
          = withObject "PageElementProperties"
              (\ o ->
                 PageElementProperties' <$>
                   (o .:? "transform") <*> (o .:? "size") <*>
                     (o .:? "pageObjectId"))

instance ToJSON PageElementProperties where
        toJSON PageElementProperties'{..}
          = object
              (catMaybes
                 [("transform" .=) <$> _pepTransform,
                  ("size" .=) <$> _pepSize,
                  ("pageObjectId" .=) <$> _pepPageObjectId])

-- | The result of replacing shapes with an image.
--
-- /See:/ 'replaceAllShapesWithImageResponse' smart constructor.
newtype ReplaceAllShapesWithImageResponse = ReplaceAllShapesWithImageResponse'
    { _raswirOccurrencesChanged :: Maybe (Textual Int32)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ReplaceAllShapesWithImageResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'raswirOccurrencesChanged'
replaceAllShapesWithImageResponse
    :: ReplaceAllShapesWithImageResponse
replaceAllShapesWithImageResponse =
    ReplaceAllShapesWithImageResponse'
    { _raswirOccurrencesChanged = Nothing
    }

-- | The number of shapes replaced with images.
raswirOccurrencesChanged :: Lens' ReplaceAllShapesWithImageResponse (Maybe Int32)
raswirOccurrencesChanged
  = lens _raswirOccurrencesChanged
      (\ s a -> s{_raswirOccurrencesChanged = a})
      . mapping _Coerce

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

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

-- | The fill of the outline.
--
-- /See:/ 'outlineFill' smart constructor.
newtype OutlineFill = OutlineFill'
    { _ofSolidFill :: Maybe SolidFill
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OutlineFill' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ofSolidFill'
outlineFill
    :: OutlineFill
outlineFill =
    OutlineFill'
    { _ofSolidFill = Nothing
    }

-- | Solid color fill.
ofSolidFill :: Lens' OutlineFill (Maybe SolidFill)
ofSolidFill
  = lens _ofSolidFill (\ s a -> s{_ofSolidFill = a})

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

instance ToJSON OutlineFill where
        toJSON OutlineFill'{..}
          = object
              (catMaybes [("solidFill" .=) <$> _ofSolidFill])

-- | A PageElement kind representing an image.
--
-- /See:/ 'image' smart constructor.
data Image = Image'
    { _iImageProperties :: !(Maybe ImageProperties)
    , _iContentURL      :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Image' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iImageProperties'
--
-- * 'iContentURL'
image
    :: Image
image =
    Image'
    { _iImageProperties = Nothing
    , _iContentURL = Nothing
    }

-- | The properties of the image.
iImageProperties :: Lens' Image (Maybe ImageProperties)
iImageProperties
  = lens _iImageProperties
      (\ s a -> s{_iImageProperties = a})

-- | An URL to an image with a default lifetime of 30 minutes. This URL is
-- tagged with the account of the requester. Anyone with the URL
-- effectively accesses the image as the original requester. Access to the
-- image may be lost if the presentation\'s sharing settings change.
iContentURL :: Lens' Image (Maybe Text)
iContentURL
  = lens _iContentURL (\ s a -> s{_iContentURL = a})

instance FromJSON Image where
        parseJSON
          = withObject "Image"
              (\ o ->
                 Image' <$>
                   (o .:? "imageProperties") <*> (o .:? "contentUrl"))

instance ToJSON Image where
        toJSON Image'{..}
          = object
              (catMaybes
                 [("imageProperties" .=) <$> _iImageProperties,
                  ("contentUrl" .=) <$> _iContentURL])

-- | Updates the properties of a Line.
--
-- /See:/ 'updateLinePropertiesRequest' smart constructor.
data UpdateLinePropertiesRequest = UpdateLinePropertiesRequest'
    { _ulprLineProperties :: !(Maybe LineProperties)
    , _ulprObjectId       :: !(Maybe Text)
    , _ulprFields         :: !(Maybe FieldMask)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UpdateLinePropertiesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ulprLineProperties'
--
-- * 'ulprObjectId'
--
-- * 'ulprFields'
updateLinePropertiesRequest
    :: UpdateLinePropertiesRequest
updateLinePropertiesRequest =
    UpdateLinePropertiesRequest'
    { _ulprLineProperties = Nothing
    , _ulprObjectId = Nothing
    , _ulprFields = Nothing
    }

-- | The line properties to update.
ulprLineProperties :: Lens' UpdateLinePropertiesRequest (Maybe LineProperties)
ulprLineProperties
  = lens _ulprLineProperties
      (\ s a -> s{_ulprLineProperties = a})

-- | The object ID of the line the update is applied to.
ulprObjectId :: Lens' UpdateLinePropertiesRequest (Maybe Text)
ulprObjectId
  = lens _ulprObjectId (\ s a -> s{_ulprObjectId = a})

-- | The fields that should be updated. At least one field must be specified.
-- The root \`lineProperties\` is implied and should not be specified. A
-- single \`\"*\"\` can be used as short-hand for listing every field. For
-- example to update the line solid fill color, set \`fields\` to
-- \`\"lineFill.solidFill.color\"\`. To reset a property to its default
-- value, include its field name in the field mask but leave the field
-- itself unset.
ulprFields :: Lens' UpdateLinePropertiesRequest (Maybe FieldMask)
ulprFields
  = lens _ulprFields (\ s a -> s{_ulprFields = a})

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

instance ToJSON UpdateLinePropertiesRequest where
        toJSON UpdateLinePropertiesRequest'{..}
          = object
              (catMaybes
                 [("lineProperties" .=) <$> _ulprLineProperties,
                  ("objectId" .=) <$> _ulprObjectId,
                  ("fields" .=) <$> _ulprFields])

-- | The crop properties of an object enclosed in a container. For example,
-- an Image. The crop properties is represented by the offsets of four
-- edges which define a crop rectangle. The offsets are measured in
-- percentage from the corresponding edges of the object\'s original
-- bounding rectangle towards inside, relative to the object\'s original
-- dimensions. - If the offset is in the interval (0, 1), the corresponding
-- edge of crop rectangle is positioned inside of the object\'s original
-- bounding rectangle. - If the offset is negative or greater than 1, the
-- corresponding edge of crop rectangle is positioned outside of the
-- object\'s original bounding rectangle. - If the left edge of the crop
-- rectangle is on the right side of its right edge, the object will be
-- flipped horizontally. - If the top edge of the crop rectangle is below
-- its bottom edge, the object will be flipped vertically. - If all offsets
-- and rotation angle is 0, the object is not cropped. After cropping, the
-- content in the crop rectangle will be stretched to fit its container.
--
-- /See:/ 'cropProperties' smart constructor.
data CropProperties = CropProperties'
    { _cpBottomOffSet :: !(Maybe (Textual Double))
    , _cpTopOffSet    :: !(Maybe (Textual Double))
    , _cpAngle        :: !(Maybe (Textual Double))
    , _cpRightOffSet  :: !(Maybe (Textual Double))
    , _cpLeftOffSet   :: !(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:
--
-- * 'cpBottomOffSet'
--
-- * 'cpTopOffSet'
--
-- * 'cpAngle'
--
-- * 'cpRightOffSet'
--
-- * 'cpLeftOffSet'
cropProperties
    :: CropProperties
cropProperties =
    CropProperties'
    { _cpBottomOffSet = Nothing
    , _cpTopOffSet = Nothing
    , _cpAngle = Nothing
    , _cpRightOffSet = Nothing
    , _cpLeftOffSet = Nothing
    }

-- | The offset specifies the bottom edge of the crop rectangle that is
-- located above the original bounding rectangle bottom edge, relative to
-- the object\'s original height.
cpBottomOffSet :: Lens' CropProperties (Maybe Double)
cpBottomOffSet
  = lens _cpBottomOffSet
      (\ s a -> s{_cpBottomOffSet = a})
      . mapping _Coerce

-- | The offset specifies the top edge of the crop rectangle that is located
-- below the original bounding rectangle top edge, relative to the
-- object\'s original height.
cpTopOffSet :: Lens' CropProperties (Maybe Double)
cpTopOffSet
  = lens _cpTopOffSet (\ s a -> s{_cpTopOffSet = a}) .
      mapping _Coerce

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

-- | The offset specifies the right edge of the crop rectangle that is
-- located to the left of the original bounding rectangle right edge,
-- relative to the object\'s original width.
cpRightOffSet :: Lens' CropProperties (Maybe Double)
cpRightOffSet
  = lens _cpRightOffSet
      (\ s a -> s{_cpRightOffSet = a})
      . mapping _Coerce

-- | The offset specifies the left edge of the crop rectangle that is located
-- to the right of the original bounding rectangle left edge, relative to
-- the object\'s original width.
cpLeftOffSet :: Lens' CropProperties (Maybe Double)
cpLeftOffSet
  = lens _cpLeftOffSet (\ s a -> s{_cpLeftOffSet = a})
      . mapping _Coerce

instance FromJSON CropProperties where
        parseJSON
          = withObject "CropProperties"
              (\ o ->
                 CropProperties' <$>
                   (o .:? "bottomOffset") <*> (o .:? "topOffset") <*>
                     (o .:? "angle")
                     <*> (o .:? "rightOffset")
                     <*> (o .:? "leftOffset"))

instance ToJSON CropProperties where
        toJSON CropProperties'{..}
          = object
              (catMaybes
                 [("bottomOffset" .=) <$> _cpBottomOffSet,
                  ("topOffset" .=) <$> _cpTopOffSet,
                  ("angle" .=) <$> _cpAngle,
                  ("rightOffset" .=) <$> _cpRightOffSet,
                  ("leftOffset" .=) <$> _cpLeftOffSet])

-- | The properties of the Line. When unset, these fields default to values
-- that match the appearance of new lines created in the Slides editor.
--
-- /See:/ 'lineProperties' smart constructor.
data LineProperties = LineProperties'
    { _lpWeight     :: !(Maybe Dimension)
    , _lpLink       :: !(Maybe Link)
    , _lpDashStyle  :: !(Maybe LinePropertiesDashStyle)
    , _lpStartArrow :: !(Maybe LinePropertiesStartArrow)
    , _lpLineFill   :: !(Maybe LineFill)
    , _lpEndArrow   :: !(Maybe LinePropertiesEndArrow)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LineProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lpWeight'
--
-- * 'lpLink'
--
-- * 'lpDashStyle'
--
-- * 'lpStartArrow'
--
-- * 'lpLineFill'
--
-- * 'lpEndArrow'
lineProperties
    :: LineProperties
lineProperties =
    LineProperties'
    { _lpWeight = Nothing
    , _lpLink = Nothing
    , _lpDashStyle = Nothing
    , _lpStartArrow = Nothing
    , _lpLineFill = Nothing
    , _lpEndArrow = Nothing
    }

-- | The thickness of the line.
lpWeight :: Lens' LineProperties (Maybe Dimension)
lpWeight = lens _lpWeight (\ s a -> s{_lpWeight = a})

-- | The hyperlink destination of the line. If unset, there is no link.
lpLink :: Lens' LineProperties (Maybe Link)
lpLink = lens _lpLink (\ s a -> s{_lpLink = a})

-- | The dash style of the line.
lpDashStyle :: Lens' LineProperties (Maybe LinePropertiesDashStyle)
lpDashStyle
  = lens _lpDashStyle (\ s a -> s{_lpDashStyle = a})

-- | The style of the arrow at the beginning of the line.
lpStartArrow :: Lens' LineProperties (Maybe LinePropertiesStartArrow)
lpStartArrow
  = lens _lpStartArrow (\ s a -> s{_lpStartArrow = a})

-- | The fill of the line. The default line fill matches the defaults for new
-- lines created in the Slides editor.
lpLineFill :: Lens' LineProperties (Maybe LineFill)
lpLineFill
  = lens _lpLineFill (\ s a -> s{_lpLineFill = a})

-- | The style of the arrow at the end of the line.
lpEndArrow :: Lens' LineProperties (Maybe LinePropertiesEndArrow)
lpEndArrow
  = lens _lpEndArrow (\ s a -> s{_lpEndArrow = a})

instance FromJSON LineProperties where
        parseJSON
          = withObject "LineProperties"
              (\ o ->
                 LineProperties' <$>
                   (o .:? "weight") <*> (o .:? "link") <*>
                     (o .:? "dashStyle")
                     <*> (o .:? "startArrow")
                     <*> (o .:? "lineFill")
                     <*> (o .:? "endArrow"))

instance ToJSON LineProperties where
        toJSON LineProperties'{..}
          = object
              (catMaybes
                 [("weight" .=) <$> _lpWeight,
                  ("link" .=) <$> _lpLink,
                  ("dashStyle" .=) <$> _lpDashStyle,
                  ("startArrow" .=) <$> _lpStartArrow,
                  ("lineFill" .=) <$> _lpLineFill,
                  ("endArrow" .=) <$> _lpEndArrow])

-- | A PageElement kind representing a joined collection of PageElements.
--
-- /See:/ 'group'' smart constructor.
newtype Group = Group'
    { _gChildren :: Maybe [PageElement]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Group' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gChildren'
group'
    :: Group
group' =
    Group'
    { _gChildren = Nothing
    }

-- | The collection of elements in the group. The minimum size of a group is
-- 2.
gChildren :: Lens' Group [PageElement]
gChildren
  = lens _gChildren (\ s a -> s{_gChildren = a}) .
      _Default
      . _Coerce

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

instance ToJSON Group where
        toJSON Group'{..}
          = object (catMaybes [("children" .=) <$> _gChildren])

-- | Request message for PresentationsService.BatchUpdatePresentation.
--
-- /See:/ 'batchUpdatePresentationRequest' smart constructor.
newtype BatchUpdatePresentationRequest = BatchUpdatePresentationRequest'
    { _buprRequests :: Maybe [Request']
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BatchUpdatePresentationRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'buprRequests'
batchUpdatePresentationRequest
    :: BatchUpdatePresentationRequest
batchUpdatePresentationRequest =
    BatchUpdatePresentationRequest'
    { _buprRequests = Nothing
    }

-- | A list of updates to apply to the presentation.
buprRequests :: Lens' BatchUpdatePresentationRequest [Request']
buprRequests
  = lens _buprRequests (\ s a -> s{_buprRequests = a})
      . _Default
      . _Coerce

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

instance ToJSON BatchUpdatePresentationRequest where
        toJSON BatchUpdatePresentationRequest'{..}
          = object
              (catMaybes [("requests" .=) <$> _buprRequests])

-- | Creates a new shape.
--
-- /See:/ 'createShapeRequest' smart constructor.
data CreateShapeRequest = CreateShapeRequest'
    { _csrShapeType         :: !(Maybe CreateShapeRequestShapeType)
    , _csrObjectId          :: !(Maybe Text)
    , _csrElementProperties :: !(Maybe PageElementProperties)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateShapeRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'csrShapeType'
--
-- * 'csrObjectId'
--
-- * 'csrElementProperties'
createShapeRequest
    :: CreateShapeRequest
createShapeRequest =
    CreateShapeRequest'
    { _csrShapeType = Nothing
    , _csrObjectId = Nothing
    , _csrElementProperties = Nothing
    }

-- | The shape type.
csrShapeType :: Lens' CreateShapeRequest (Maybe CreateShapeRequestShapeType)
csrShapeType
  = lens _csrShapeType (\ s a -> s{_csrShapeType = a})

-- | A user-supplied object ID. If you specify an ID, it must be unique among
-- all pages and page elements in the presentation. The ID must start with
-- an alphanumeric character or an underscore (matches regex
-- \`[a-zA-Z0-9_]\`); remaining characters may include those as well as a
-- hyphen or colon (matches regex \`[a-zA-Z0-9_-:]\`). The length of the ID
-- must not be less than 5 or greater than 50. If empty, a unique
-- identifier will be generated.
csrObjectId :: Lens' CreateShapeRequest (Maybe Text)
csrObjectId
  = lens _csrObjectId (\ s a -> s{_csrObjectId = a})

-- | The element properties for the shape.
csrElementProperties :: Lens' CreateShapeRequest (Maybe PageElementProperties)
csrElementProperties
  = lens _csrElementProperties
      (\ s a -> s{_csrElementProperties = a})

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

instance ToJSON CreateShapeRequest where
        toJSON CreateShapeRequest'{..}
          = object
              (catMaybes
                 [("shapeType" .=) <$> _csrShapeType,
                  ("objectId" .=) <$> _csrObjectId,
                  ("elementProperties" .=) <$> _csrElementProperties])

-- | A TextElement kind that represents auto text.
--
-- /See:/ 'autoText' smart constructor.
data AutoText = AutoText'
    { _atStyle   :: !(Maybe TextStyle)
    , _atContent :: !(Maybe Text)
    , _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:
--
-- * 'atStyle'
--
-- * 'atContent'
--
-- * 'atType'
autoText
    :: AutoText
autoText =
    AutoText'
    { _atStyle = Nothing
    , _atContent = Nothing
    , _atType = Nothing
    }

-- | The styling applied to this auto text.
atStyle :: Lens' AutoText (Maybe TextStyle)
atStyle = lens _atStyle (\ s a -> s{_atStyle = a})

-- | The rendered content of this auto text, if available.
atContent :: Lens' AutoText (Maybe Text)
atContent
  = lens _atContent (\ s a -> s{_atContent = 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 .:? "style") <*> (o .:? "content") <*>
                     (o .:? "type"))

instance ToJSON AutoText where
        toJSON AutoText'{..}
          = object
              (catMaybes
                 [("style" .=) <$> _atStyle,
                  ("content" .=) <$> _atContent,
                  ("type" .=) <$> _atType])

-- | A List describes the look and feel of bullets belonging to paragraphs
-- associated with a list. A paragraph that is part of a list has an
-- implicit reference to that list\'s ID.
--
-- /See:/ 'list' smart constructor.
data List = List'
    { _lListId       :: !(Maybe Text)
    , _lNestingLevel :: !(Maybe ListNestingLevel)
    } 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:
--
-- * 'lListId'
--
-- * 'lNestingLevel'
list
    :: List
list =
    List'
    { _lListId = Nothing
    , _lNestingLevel = Nothing
    }

-- | The ID of the list.
lListId :: Lens' List (Maybe Text)
lListId = lens _lListId (\ s a -> s{_lListId = a})

-- | A map of nesting levels to the properties of bullets at the associated
-- level. A list has at most nine levels of nesting, so the possible values
-- for the keys of this map are 0 through 8, inclusive.
lNestingLevel :: Lens' List (Maybe ListNestingLevel)
lNestingLevel
  = lens _lNestingLevel
      (\ s a -> s{_lNestingLevel = a})

instance FromJSON List where
        parseJSON
          = withObject "List"
              (\ o ->
                 List' <$>
                   (o .:? "listId") <*> (o .:? "nestingLevel"))

instance ToJSON List where
        toJSON List'{..}
          = object
              (catMaybes
                 [("listId" .=) <$> _lListId,
                  ("nestingLevel" .=) <$> _lNestingLevel])

-- | 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])

-- | Updates the properties of a Page.
--
-- /See:/ 'updatePagePropertiesRequest' smart constructor.
data UpdatePagePropertiesRequest = UpdatePagePropertiesRequest'
    { _upprObjectId       :: !(Maybe Text)
    , _upprPageProperties :: !(Maybe PageProperties)
    , _upprFields         :: !(Maybe FieldMask)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UpdatePagePropertiesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'upprObjectId'
--
-- * 'upprPageProperties'
--
-- * 'upprFields'
updatePagePropertiesRequest
    :: UpdatePagePropertiesRequest
updatePagePropertiesRequest =
    UpdatePagePropertiesRequest'
    { _upprObjectId = Nothing
    , _upprPageProperties = Nothing
    , _upprFields = Nothing
    }

-- | The object ID of the page the update is applied to.
upprObjectId :: Lens' UpdatePagePropertiesRequest (Maybe Text)
upprObjectId
  = lens _upprObjectId (\ s a -> s{_upprObjectId = a})

-- | The page properties to update.
upprPageProperties :: Lens' UpdatePagePropertiesRequest (Maybe PageProperties)
upprPageProperties
  = lens _upprPageProperties
      (\ s a -> s{_upprPageProperties = a})

-- | The fields that should be updated. At least one field must be specified.
-- The root \`pageProperties\` is implied and should not be specified. A
-- single \`\"*\"\` can be used as short-hand for listing every field. For
-- example to update the page background solid fill color, set \`fields\`
-- to \`\"pageBackgroundFill.solidFill.color\"\`. To reset a property to
-- its default value, include its field name in the field mask but leave
-- the field itself unset.
upprFields :: Lens' UpdatePagePropertiesRequest (Maybe FieldMask)
upprFields
  = lens _upprFields (\ s a -> s{_upprFields = a})

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

instance ToJSON UpdatePagePropertiesRequest where
        toJSON UpdatePagePropertiesRequest'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _upprObjectId,
                  ("pageProperties" .=) <$> _upprPageProperties,
                  ("fields" .=) <$> _upprFields])

-- | Creates an embedded Google Sheets chart. NOTE: Chart creation requires
-- at least one of the spreadsheets.readonly, spreadsheets, drive.readonly,
-- or drive OAuth scopes.
--
-- /See:/ 'createSheetsChartRequest' smart constructor.
data CreateSheetsChartRequest = CreateSheetsChartRequest'
    { _cscrObjectId          :: !(Maybe Text)
    , _cscrSpreadsheetId     :: !(Maybe Text)
    , _cscrLinkingMode       :: !(Maybe CreateSheetsChartRequestLinkingMode)
    , _cscrElementProperties :: !(Maybe PageElementProperties)
    , _cscrChartId           :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateSheetsChartRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cscrObjectId'
--
-- * 'cscrSpreadsheetId'
--
-- * 'cscrLinkingMode'
--
-- * 'cscrElementProperties'
--
-- * 'cscrChartId'
createSheetsChartRequest
    :: CreateSheetsChartRequest
createSheetsChartRequest =
    CreateSheetsChartRequest'
    { _cscrObjectId = Nothing
    , _cscrSpreadsheetId = Nothing
    , _cscrLinkingMode = Nothing
    , _cscrElementProperties = Nothing
    , _cscrChartId = Nothing
    }

-- | A user-supplied object ID. If specified, the ID must be unique among all
-- pages and page elements in the presentation. The ID should start with a
-- word character [a-zA-Z0-9_] and then followed by any number of the
-- following characters [a-zA-Z0-9_-:]. The length of the ID should not be
-- less than 5 or greater than 50. If empty, a unique identifier will be
-- generated.
cscrObjectId :: Lens' CreateSheetsChartRequest (Maybe Text)
cscrObjectId
  = lens _cscrObjectId (\ s a -> s{_cscrObjectId = a})

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

-- | The mode with which the chart is linked to the source spreadsheet. When
-- not specified, the chart will be an image that is not linked.
cscrLinkingMode :: Lens' CreateSheetsChartRequest (Maybe CreateSheetsChartRequestLinkingMode)
cscrLinkingMode
  = lens _cscrLinkingMode
      (\ s a -> s{_cscrLinkingMode = a})

-- | The element properties for the chart. When the aspect ratio of the
-- provided size does not match the chart aspect ratio, the chart is scaled
-- and centered with respect to the size in order to maintain aspect ratio.
-- The provided transform is applied after this operation.
cscrElementProperties :: Lens' CreateSheetsChartRequest (Maybe PageElementProperties)
cscrElementProperties
  = lens _cscrElementProperties
      (\ s a -> s{_cscrElementProperties = a})

-- | The ID of the specific chart in the Google Sheets spreadsheet.
cscrChartId :: Lens' CreateSheetsChartRequest (Maybe Int32)
cscrChartId
  = lens _cscrChartId (\ s a -> s{_cscrChartId = a}) .
      mapping _Coerce

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

instance ToJSON CreateSheetsChartRequest where
        toJSON CreateSheetsChartRequest'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _cscrObjectId,
                  ("spreadsheetId" .=) <$> _cscrSpreadsheetId,
                  ("linkingMode" .=) <$> _cscrLinkingMode,
                  ("elementProperties" .=) <$> _cscrElementProperties,
                  ("chartId" .=) <$> _cscrChartId])

-- | Deletes text from a shape or a table cell.
--
-- /See:/ 'deleteTextRequest' smart constructor.
data DeleteTextRequest = DeleteTextRequest'
    { _dtrTextRange    :: !(Maybe Range)
    , _dtrObjectId     :: !(Maybe Text)
    , _dtrCellLocation :: !(Maybe TableCellLocation)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DeleteTextRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtrTextRange'
--
-- * 'dtrObjectId'
--
-- * 'dtrCellLocation'
deleteTextRequest
    :: DeleteTextRequest
deleteTextRequest =
    DeleteTextRequest'
    { _dtrTextRange = Nothing
    , _dtrObjectId = Nothing
    , _dtrCellLocation = Nothing
    }

-- | The range of text to delete, based on TextElement indexes. There is
-- always an implicit newline character at the end of a shape\'s or table
-- cell\'s text that cannot be deleted. \`Range.Type.ALL\` will use the
-- correct bounds, but care must be taken when specifying explicit bounds
-- for range types \`FROM_START_INDEX\` and \`FIXED_RANGE\`. For example,
-- if the text is \"ABC\", followed by an implicit newline, then the
-- maximum value is 2 for \`text_range.start_index\` and 3 for
-- \`text_range.end_index\`. Deleting text that crosses a paragraph
-- boundary may result in changes to paragraph styles and lists as the two
-- paragraphs are merged. Ranges that include only one code unit of a
-- surrogate pair are expanded to include both code units.
dtrTextRange :: Lens' DeleteTextRequest (Maybe Range)
dtrTextRange
  = lens _dtrTextRange (\ s a -> s{_dtrTextRange = a})

-- | The object ID of the shape or table from which the text will be deleted.
dtrObjectId :: Lens' DeleteTextRequest (Maybe Text)
dtrObjectId
  = lens _dtrObjectId (\ s a -> s{_dtrObjectId = a})

-- | The optional table cell location if the text is to be deleted from a
-- table cell. If present, the object_id must refer to a table.
dtrCellLocation :: Lens' DeleteTextRequest (Maybe TableCellLocation)
dtrCellLocation
  = lens _dtrCellLocation
      (\ s a -> s{_dtrCellLocation = a})

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

instance ToJSON DeleteTextRequest where
        toJSON DeleteTextRequest'{..}
          = object
              (catMaybes
                 [("textRange" .=) <$> _dtrTextRange,
                  ("objectId" .=) <$> _dtrObjectId,
                  ("cellLocation" .=) <$> _dtrCellLocation])

-- | Inserts columns into a table. Other columns in the table will be resized
-- to fit the new column.
--
-- /See:/ 'insertTableColumnsRequest' smart constructor.
data InsertTableColumnsRequest = InsertTableColumnsRequest'
    { _itcrInsertRight   :: !(Maybe Bool)
    , _itcrNumber        :: !(Maybe (Textual Int32))
    , _itcrCellLocation  :: !(Maybe TableCellLocation)
    , _itcrTableObjectId :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InsertTableColumnsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'itcrInsertRight'
--
-- * 'itcrNumber'
--
-- * 'itcrCellLocation'
--
-- * 'itcrTableObjectId'
insertTableColumnsRequest
    :: InsertTableColumnsRequest
insertTableColumnsRequest =
    InsertTableColumnsRequest'
    { _itcrInsertRight = Nothing
    , _itcrNumber = Nothing
    , _itcrCellLocation = Nothing
    , _itcrTableObjectId = Nothing
    }

-- | Whether to insert new columns to the right of the reference cell
-- location. - \`True\`: insert to the right. - \`False\`: insert to the
-- left.
itcrInsertRight :: Lens' InsertTableColumnsRequest (Maybe Bool)
itcrInsertRight
  = lens _itcrInsertRight
      (\ s a -> s{_itcrInsertRight = a})

-- | The number of columns to be inserted. Maximum 20 per request.
itcrNumber :: Lens' InsertTableColumnsRequest (Maybe Int32)
itcrNumber
  = lens _itcrNumber (\ s a -> s{_itcrNumber = a}) .
      mapping _Coerce

-- | The reference table cell location from which columns will be inserted. A
-- new column will be inserted to the left (or right) of the column where
-- the reference cell is. If the reference cell is a merged cell, a new
-- column will be inserted to the left (or right) of the merged cell.
itcrCellLocation :: Lens' InsertTableColumnsRequest (Maybe TableCellLocation)
itcrCellLocation
  = lens _itcrCellLocation
      (\ s a -> s{_itcrCellLocation = a})

-- | The table to insert columns into.
itcrTableObjectId :: Lens' InsertTableColumnsRequest (Maybe Text)
itcrTableObjectId
  = lens _itcrTableObjectId
      (\ s a -> s{_itcrTableObjectId = a})

instance FromJSON InsertTableColumnsRequest where
        parseJSON
          = withObject "InsertTableColumnsRequest"
              (\ o ->
                 InsertTableColumnsRequest' <$>
                   (o .:? "insertRight") <*> (o .:? "number") <*>
                     (o .:? "cellLocation")
                     <*> (o .:? "tableObjectId"))

instance ToJSON InsertTableColumnsRequest where
        toJSON InsertTableColumnsRequest'{..}
          = object
              (catMaybes
                 [("insertRight" .=) <$> _itcrInsertRight,
                  ("number" .=) <$> _itcrNumber,
                  ("cellLocation" .=) <$> _itcrCellLocation,
                  ("tableObjectId" .=) <$> _itcrTableObjectId])

-- | The bulleted lists contained in this text, keyed by list ID.
--
-- /See:/ 'textContentLists' smart constructor.
newtype TextContentLists = TextContentLists'
    { _tclAddtional :: HashMap Text List
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TextContentLists' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tclAddtional'
textContentLists
    :: HashMap Text List -- ^ 'tclAddtional'
    -> TextContentLists
textContentLists pTclAddtional_ =
    TextContentLists'
    { _tclAddtional = _Coerce # pTclAddtional_
    }

tclAddtional :: Lens' TextContentLists (HashMap Text List)
tclAddtional
  = lens _tclAddtional (\ s a -> s{_tclAddtional = a})
      . _Coerce

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

instance ToJSON TextContentLists where
        toJSON = toJSON . _tclAddtional

-- | 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 stretched picture fill. The page or page element is filled entirely
-- with the specified picture. The picture is stretched to fit its
-- container.
--
-- /See:/ 'stretchedPictureFill' smart constructor.
data StretchedPictureFill = StretchedPictureFill'
    { _spfSize       :: !(Maybe Size)
    , _spfContentURL :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'StretchedPictureFill' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'spfSize'
--
-- * 'spfContentURL'
stretchedPictureFill
    :: StretchedPictureFill
stretchedPictureFill =
    StretchedPictureFill'
    { _spfSize = Nothing
    , _spfContentURL = Nothing
    }

-- | The original size of the picture fill. This field is read-only.
spfSize :: Lens' StretchedPictureFill (Maybe Size)
spfSize = lens _spfSize (\ s a -> s{_spfSize = a})

-- | Reading the content_url: An URL to a picture with a default lifetime of
-- 30 minutes. This URL is tagged with the account of the requester. Anyone
-- with the URL effectively accesses the picture as the original requester.
-- Access to the picture may be lost if the presentation\'s sharing
-- settings change. Writing the content_url: The picture is fetched once at
-- insertion time and a copy is stored for display inside the presentation.
-- Pictures must be less than 50MB in size, cannot exceed 25 megapixels,
-- and must be in either in PNG, JPEG, or GIF format.
spfContentURL :: Lens' StretchedPictureFill (Maybe Text)
spfContentURL
  = lens _spfContentURL
      (\ s a -> s{_spfContentURL = a})

instance FromJSON StretchedPictureFill where
        parseJSON
          = withObject "StretchedPictureFill"
              (\ o ->
                 StretchedPictureFill' <$>
                   (o .:? "size") <*> (o .:? "contentUrl"))

instance ToJSON StretchedPictureFill where
        toJSON StretchedPictureFill'{..}
          = object
              (catMaybes
                 [("size" .=) <$> _spfSize,
                  ("contentUrl" .=) <$> _spfContentURL])

-- | A PageElement kind representing a linked chart embedded from Google
-- Sheets.
--
-- /See:/ 'sheetsChart' smart constructor.
data SheetsChart = SheetsChart'
    { _scSpreadsheetId         :: !(Maybe Text)
    , _scContentURL            :: !(Maybe Text)
    , _scSheetsChartProperties :: !(Maybe SheetsChartProperties)
    , _scChartId               :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SheetsChart' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'scSpreadsheetId'
--
-- * 'scContentURL'
--
-- * 'scSheetsChartProperties'
--
-- * 'scChartId'
sheetsChart
    :: SheetsChart
sheetsChart =
    SheetsChart'
    { _scSpreadsheetId = Nothing
    , _scContentURL = Nothing
    , _scSheetsChartProperties = Nothing
    , _scChartId = Nothing
    }

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

-- | The URL of an image of the embedded chart, with a default lifetime of 30
-- minutes. This URL is tagged with the account of the requester. Anyone
-- with the URL effectively accesses the image as the original requester.
-- Access to the image may be lost if the presentation\'s sharing settings
-- change.
scContentURL :: Lens' SheetsChart (Maybe Text)
scContentURL
  = lens _scContentURL (\ s a -> s{_scContentURL = a})

-- | The properties of the Sheets chart.
scSheetsChartProperties :: Lens' SheetsChart (Maybe SheetsChartProperties)
scSheetsChartProperties
  = lens _scSheetsChartProperties
      (\ s a -> s{_scSheetsChartProperties = a})

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

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

instance ToJSON SheetsChart where
        toJSON SheetsChart'{..}
          = object
              (catMaybes
                 [("spreadsheetId" .=) <$> _scSpreadsheetId,
                  ("contentUrl" .=) <$> _scContentURL,
                  ("sheetsChartProperties" .=) <$>
                    _scSheetsChartProperties,
                  ("chartId" .=) <$> _scChartId])

-- | The result of creating a shape.
--
-- /See:/ 'createShapeResponse' smart constructor.
newtype CreateShapeResponse = CreateShapeResponse'
    { _cObjectId :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateShapeResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cObjectId'
createShapeResponse
    :: CreateShapeResponse
createShapeResponse =
    CreateShapeResponse'
    { _cObjectId = Nothing
    }

-- | The object ID of the created shape.
cObjectId :: Lens' CreateShapeResponse (Maybe Text)
cObjectId
  = lens _cObjectId (\ s a -> s{_cObjectId = a})

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

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

-- | Deletes a column from a table.
--
-- /See:/ 'deleteTableColumnRequest' smart constructor.
data DeleteTableColumnRequest = DeleteTableColumnRequest'
    { _dtcrCellLocation  :: !(Maybe TableCellLocation)
    , _dtcrTableObjectId :: !(Maybe Text)
    } 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:
--
-- * 'dtcrCellLocation'
--
-- * 'dtcrTableObjectId'
deleteTableColumnRequest
    :: DeleteTableColumnRequest
deleteTableColumnRequest =
    DeleteTableColumnRequest'
    { _dtcrCellLocation = Nothing
    , _dtcrTableObjectId = Nothing
    }

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

-- | The table to delete columns from.
dtcrTableObjectId :: Lens' DeleteTableColumnRequest (Maybe Text)
dtcrTableObjectId
  = lens _dtcrTableObjectId
      (\ s a -> s{_dtcrTableObjectId = a})

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

instance ToJSON DeleteTableColumnRequest where
        toJSON DeleteTableColumnRequest'{..}
          = object
              (catMaybes
                 [("cellLocation" .=) <$> _dtcrCellLocation,
                  ("tableObjectId" .=) <$> _dtcrTableObjectId])

-- | A hypertext link.
--
-- /See:/ 'link' smart constructor.
data Link = Link'
    { _lURL          :: !(Maybe Text)
    , _lPageObjectId :: !(Maybe Text)
    , _lRelativeLink :: !(Maybe LinkRelativeLink)
    , _lSlideIndex   :: !(Maybe (Textual Int32))
    } 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'
--
-- * 'lPageObjectId'
--
-- * 'lRelativeLink'
--
-- * 'lSlideIndex'
link
    :: Link
link =
    Link'
    { _lURL = Nothing
    , _lPageObjectId = Nothing
    , _lRelativeLink = Nothing
    , _lSlideIndex = Nothing
    }

-- | If set, indicates this is a link to the external web page at this URL.
lURL :: Lens' Link (Maybe Text)
lURL = lens _lURL (\ s a -> s{_lURL = a})

-- | If set, indicates this is a link to the specific page in this
-- presentation with this ID. A page with this ID may not exist.
lPageObjectId :: Lens' Link (Maybe Text)
lPageObjectId
  = lens _lPageObjectId
      (\ s a -> s{_lPageObjectId = a})

-- | If set, indicates this is a link to a slide in this presentation,
-- addressed by its position.
lRelativeLink :: Lens' Link (Maybe LinkRelativeLink)
lRelativeLink
  = lens _lRelativeLink
      (\ s a -> s{_lRelativeLink = a})

-- | If set, indicates this is a link to the slide at this zero-based index
-- in the presentation. There may not be a slide at this index.
lSlideIndex :: Lens' Link (Maybe Int32)
lSlideIndex
  = lens _lSlideIndex (\ s a -> s{_lSlideIndex = a}) .
      mapping _Coerce

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

instance ToJSON Link where
        toJSON Link'{..}
          = object
              (catMaybes
                 [("url" .=) <$> _lURL,
                  ("pageObjectId" .=) <$> _lPageObjectId,
                  ("relativeLink" .=) <$> _lRelativeLink,
                  ("slideIndex" .=) <$> _lSlideIndex])

-- | 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])

-- | Response message from a batch update.
--
-- /See:/ 'batchUpdatePresentationResponse' smart constructor.
data BatchUpdatePresentationResponse = BatchUpdatePresentationResponse'
    { _buprPresentationId :: !(Maybe Text)
    , _buprReplies        :: !(Maybe [Response])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BatchUpdatePresentationResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'buprPresentationId'
--
-- * 'buprReplies'
batchUpdatePresentationResponse
    :: BatchUpdatePresentationResponse
batchUpdatePresentationResponse =
    BatchUpdatePresentationResponse'
    { _buprPresentationId = Nothing
    , _buprReplies = Nothing
    }

-- | The presentation the updates were applied to.
buprPresentationId :: Lens' BatchUpdatePresentationResponse (Maybe Text)
buprPresentationId
  = lens _buprPresentationId
      (\ s a -> s{_buprPresentationId = a})

-- | The reply of the updates. This maps 1:1 with the updates, although
-- replies to some requests may be empty.
buprReplies :: Lens' BatchUpdatePresentationResponse [Response]
buprReplies
  = lens _buprReplies (\ s a -> s{_buprReplies = a}) .
      _Default
      . _Coerce

instance FromJSON BatchUpdatePresentationResponse
         where
        parseJSON
          = withObject "BatchUpdatePresentationResponse"
              (\ o ->
                 BatchUpdatePresentationResponse' <$>
                   (o .:? "presentationId") <*>
                     (o .:? "replies" .!= mempty))

instance ToJSON BatchUpdatePresentationResponse where
        toJSON BatchUpdatePresentationResponse'{..}
          = object
              (catMaybes
                 [("presentationId" .=) <$> _buprPresentationId,
                  ("replies" .=) <$> _buprReplies])

-- | The object being duplicated may contain other objects, for example when
-- duplicating a slide or a group page element. This map defines how the
-- IDs of duplicated objects are generated: the keys are the IDs of the
-- original objects and its values are the IDs that will be assigned to the
-- corresponding duplicate object. The ID of the source object\'s duplicate
-- may be specified in this map as well, using the same value of the
-- \`object_id\` field as a key and the newly desired ID as the value. All
-- keys must correspond to existing IDs in the presentation. All values
-- must be unique in the presentation and must start with an alphanumeric
-- character or an underscore (matches regex \`[a-zA-Z0-9_]\`); remaining
-- characters may include those as well as a hyphen or colon (matches regex
-- \`[a-zA-Z0-9_-:]\`). The length of the new ID must not be less than 5 or
-- greater than 50. If any IDs of source objects are omitted from the map,
-- a new random ID will be assigned. If the map is empty or unset, all
-- duplicate objects will receive a new random ID.
--
-- /See:/ 'duplicateObjectRequestObjectIds' smart constructor.
newtype DuplicateObjectRequestObjectIds = DuplicateObjectRequestObjectIds'
    { _doroiAddtional :: HashMap Text Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DuplicateObjectRequestObjectIds' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'doroiAddtional'
duplicateObjectRequestObjectIds
    :: HashMap Text Text -- ^ 'doroiAddtional'
    -> DuplicateObjectRequestObjectIds
duplicateObjectRequestObjectIds pDoroiAddtional_ =
    DuplicateObjectRequestObjectIds'
    { _doroiAddtional = _Coerce # pDoroiAddtional_
    }

doroiAddtional :: Lens' DuplicateObjectRequestObjectIds (HashMap Text Text)
doroiAddtional
  = lens _doroiAddtional
      (\ s a -> s{_doroiAddtional = a})
      . _Coerce

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

instance ToJSON DuplicateObjectRequestObjectIds where
        toJSON = toJSON . _doroiAddtional

-- | Creates a new table.
--
-- /See:/ 'createTableRequest' smart constructor.
data CreateTableRequest = CreateTableRequest'
    { _ctrObjectId          :: !(Maybe Text)
    , _ctrRows              :: !(Maybe (Textual Int32))
    , _ctrElementProperties :: !(Maybe PageElementProperties)
    , _ctrColumns           :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateTableRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ctrObjectId'
--
-- * 'ctrRows'
--
-- * 'ctrElementProperties'
--
-- * 'ctrColumns'
createTableRequest
    :: CreateTableRequest
createTableRequest =
    CreateTableRequest'
    { _ctrObjectId = Nothing
    , _ctrRows = Nothing
    , _ctrElementProperties = Nothing
    , _ctrColumns = Nothing
    }

-- | A user-supplied object ID. If you specify an ID, it must be unique among
-- all pages and page elements in the presentation. The ID must start with
-- an alphanumeric character or an underscore (matches regex
-- \`[a-zA-Z0-9_]\`); remaining characters may include those as well as a
-- hyphen or colon (matches regex \`[a-zA-Z0-9_-:]\`). The length of the ID
-- must not be less than 5 or greater than 50. If you don\'t specify an ID,
-- a unique one is generated.
ctrObjectId :: Lens' CreateTableRequest (Maybe Text)
ctrObjectId
  = lens _ctrObjectId (\ s a -> s{_ctrObjectId = a})

-- | Number of rows in the table.
ctrRows :: Lens' CreateTableRequest (Maybe Int32)
ctrRows
  = lens _ctrRows (\ s a -> s{_ctrRows = a}) .
      mapping _Coerce

-- | The element properties for the table. The table will be created at the
-- provided size, subject to a minimum size. If no size is provided, the
-- table will be automatically sized. Table transforms must have a scale of
-- 1 and no shear components. If no transform is provided, the table will
-- be centered on the page.
ctrElementProperties :: Lens' CreateTableRequest (Maybe PageElementProperties)
ctrElementProperties
  = lens _ctrElementProperties
      (\ s a -> s{_ctrElementProperties = a})

-- | Number of columns in the table.
ctrColumns :: Lens' CreateTableRequest (Maybe Int32)
ctrColumns
  = lens _ctrColumns (\ s a -> s{_ctrColumns = a}) .
      mapping _Coerce

instance FromJSON CreateTableRequest where
        parseJSON
          = withObject "CreateTableRequest"
              (\ o ->
                 CreateTableRequest' <$>
                   (o .:? "objectId") <*> (o .:? "rows") <*>
                     (o .:? "elementProperties")
                     <*> (o .:? "columns"))

instance ToJSON CreateTableRequest where
        toJSON CreateTableRequest'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _ctrObjectId,
                  ("rows" .=) <$> _ctrRows,
                  ("elementProperties" .=) <$> _ctrElementProperties,
                  ("columns" .=) <$> _ctrColumns])

-- | A single response from an update.
--
-- /See:/ 'response' smart constructor.
data Response = Response'
    { _rReplaceAllShapesWithImage :: !(Maybe ReplaceAllShapesWithImageResponse)
    , _rCreateLine                :: !(Maybe CreateLineResponse)
    , _rReplaceAllText            :: !(Maybe ReplaceAllTextResponse)
    , _rCreateShape               :: !(Maybe CreateShapeResponse)
    , _rCreateSheetsChart         :: !(Maybe CreateSheetsChartResponse)
    , _rDuplicateObject           :: !(Maybe DuplicateObjectResponse)
    , _rCreateTable               :: !(Maybe CreateTableResponse)
    , _rCreateVideo               :: !(Maybe CreateVideoResponse)
    , _rCreateImage               :: !(Maybe CreateImageResponse)
    , _rCreateSlide               :: !(Maybe CreateSlideResponse)
    } 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:
--
-- * 'rReplaceAllShapesWithImage'
--
-- * 'rCreateLine'
--
-- * 'rReplaceAllText'
--
-- * 'rCreateShape'
--
-- * 'rCreateSheetsChart'
--
-- * 'rDuplicateObject'
--
-- * 'rCreateTable'
--
-- * 'rCreateVideo'
--
-- * 'rCreateImage'
--
-- * 'rCreateSlide'
response
    :: Response
response =
    Response'
    { _rReplaceAllShapesWithImage = Nothing
    , _rCreateLine = Nothing
    , _rReplaceAllText = Nothing
    , _rCreateShape = Nothing
    , _rCreateSheetsChart = Nothing
    , _rDuplicateObject = Nothing
    , _rCreateTable = Nothing
    , _rCreateVideo = Nothing
    , _rCreateImage = Nothing
    , _rCreateSlide = Nothing
    }

-- | The result of replacing all shapes matching some criteria with an image.
rReplaceAllShapesWithImage :: Lens' Response (Maybe ReplaceAllShapesWithImageResponse)
rReplaceAllShapesWithImage
  = lens _rReplaceAllShapesWithImage
      (\ s a -> s{_rReplaceAllShapesWithImage = a})

-- | The result of creating a line.
rCreateLine :: Lens' Response (Maybe CreateLineResponse)
rCreateLine
  = lens _rCreateLine (\ s a -> s{_rCreateLine = a})

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

-- | The result of creating a shape.
rCreateShape :: Lens' Response (Maybe CreateShapeResponse)
rCreateShape
  = lens _rCreateShape (\ s a -> s{_rCreateShape = a})

-- | The result of creating a Google Sheets chart.
rCreateSheetsChart :: Lens' Response (Maybe CreateSheetsChartResponse)
rCreateSheetsChart
  = lens _rCreateSheetsChart
      (\ s a -> s{_rCreateSheetsChart = a})

-- | The result of duplicating an object.
rDuplicateObject :: Lens' Response (Maybe DuplicateObjectResponse)
rDuplicateObject
  = lens _rDuplicateObject
      (\ s a -> s{_rDuplicateObject = a})

-- | The result of creating a table.
rCreateTable :: Lens' Response (Maybe CreateTableResponse)
rCreateTable
  = lens _rCreateTable (\ s a -> s{_rCreateTable = a})

-- | The result of creating a video.
rCreateVideo :: Lens' Response (Maybe CreateVideoResponse)
rCreateVideo
  = lens _rCreateVideo (\ s a -> s{_rCreateVideo = a})

-- | The result of creating an image.
rCreateImage :: Lens' Response (Maybe CreateImageResponse)
rCreateImage
  = lens _rCreateImage (\ s a -> s{_rCreateImage = a})

-- | The result of creating a slide.
rCreateSlide :: Lens' Response (Maybe CreateSlideResponse)
rCreateSlide
  = lens _rCreateSlide (\ s a -> s{_rCreateSlide = a})

instance FromJSON Response where
        parseJSON
          = withObject "Response"
              (\ o ->
                 Response' <$>
                   (o .:? "replaceAllShapesWithImage") <*>
                     (o .:? "createLine")
                     <*> (o .:? "replaceAllText")
                     <*> (o .:? "createShape")
                     <*> (o .:? "createSheetsChart")
                     <*> (o .:? "duplicateObject")
                     <*> (o .:? "createTable")
                     <*> (o .:? "createVideo")
                     <*> (o .:? "createImage")
                     <*> (o .:? "createSlide"))

instance ToJSON Response where
        toJSON Response'{..}
          = object
              (catMaybes
                 [("replaceAllShapesWithImage" .=) <$>
                    _rReplaceAllShapesWithImage,
                  ("createLine" .=) <$> _rCreateLine,
                  ("replaceAllText" .=) <$> _rReplaceAllText,
                  ("createShape" .=) <$> _rCreateShape,
                  ("createSheetsChart" .=) <$> _rCreateSheetsChart,
                  ("duplicateObject" .=) <$> _rDuplicateObject,
                  ("createTable" .=) <$> _rCreateTable,
                  ("createVideo" .=) <$> _rCreateVideo,
                  ("createImage" .=) <$> _rCreateImage,
                  ("createSlide" .=) <$> _rCreateSlide])

-- | A color that can either be fully opaque or fully transparent.
--
-- /See:/ 'optionalColor' smart constructor.
newtype OptionalColor = OptionalColor'
    { _ocOpaqueColor :: Maybe OpaqueColor
    } 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:
--
-- * 'ocOpaqueColor'
optionalColor
    :: OptionalColor
optionalColor =
    OptionalColor'
    { _ocOpaqueColor = Nothing
    }

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

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

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

-- | Duplicates a slide or page element. When duplicating a slide, the
-- duplicate slide will be created immediately following the specified
-- slide. When duplicating a page element, the duplicate will be placed on
-- the same page at the same position as the original.
--
-- /See:/ 'duplicateObjectRequest' smart constructor.
data DuplicateObjectRequest = DuplicateObjectRequest'
    { _dorObjectId  :: !(Maybe Text)
    , _dorObjectIds :: !(Maybe DuplicateObjectRequestObjectIds)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DuplicateObjectRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dorObjectId'
--
-- * 'dorObjectIds'
duplicateObjectRequest
    :: DuplicateObjectRequest
duplicateObjectRequest =
    DuplicateObjectRequest'
    { _dorObjectId = Nothing
    , _dorObjectIds = Nothing
    }

-- | The ID of the object to duplicate.
dorObjectId :: Lens' DuplicateObjectRequest (Maybe Text)
dorObjectId
  = lens _dorObjectId (\ s a -> s{_dorObjectId = a})

-- | The object being duplicated may contain other objects, for example when
-- duplicating a slide or a group page element. This map defines how the
-- IDs of duplicated objects are generated: the keys are the IDs of the
-- original objects and its values are the IDs that will be assigned to the
-- corresponding duplicate object. The ID of the source object\'s duplicate
-- may be specified in this map as well, using the same value of the
-- \`object_id\` field as a key and the newly desired ID as the value. All
-- keys must correspond to existing IDs in the presentation. All values
-- must be unique in the presentation and must start with an alphanumeric
-- character or an underscore (matches regex \`[a-zA-Z0-9_]\`); remaining
-- characters may include those as well as a hyphen or colon (matches regex
-- \`[a-zA-Z0-9_-:]\`). The length of the new ID must not be less than 5 or
-- greater than 50. If any IDs of source objects are omitted from the map,
-- a new random ID will be assigned. If the map is empty or unset, all
-- duplicate objects will receive a new random ID.
dorObjectIds :: Lens' DuplicateObjectRequest (Maybe DuplicateObjectRequestObjectIds)
dorObjectIds
  = lens _dorObjectIds (\ s a -> s{_dorObjectIds = a})

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

instance ToJSON DuplicateObjectRequest where
        toJSON DuplicateObjectRequest'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _dorObjectId,
                  ("objectIds" .=) <$> _dorObjectIds])

-- | A page in a presentation.
--
-- /See:/ 'page' smart constructor.
data Page = Page'
    { _pObjectId         :: !(Maybe Text)
    , _pPageElements     :: !(Maybe [PageElement])
    , _pSlideProperties  :: !(Maybe SlideProperties)
    , _pPageProperties   :: !(Maybe PageProperties)
    , _pLayoutProperties :: !(Maybe LayoutProperties)
    , _pPageType         :: !(Maybe PagePageType)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Page' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pObjectId'
--
-- * 'pPageElements'
--
-- * 'pSlideProperties'
--
-- * 'pPageProperties'
--
-- * 'pLayoutProperties'
--
-- * 'pPageType'
page
    :: Page
page =
    Page'
    { _pObjectId = Nothing
    , _pPageElements = Nothing
    , _pSlideProperties = Nothing
    , _pPageProperties = Nothing
    , _pLayoutProperties = Nothing
    , _pPageType = Nothing
    }

-- | The object ID for this page. Object IDs used by Page and PageElement
-- share the same namespace.
pObjectId :: Lens' Page (Maybe Text)
pObjectId
  = lens _pObjectId (\ s a -> s{_pObjectId = a})

-- | The page elements rendered on the page.
pPageElements :: Lens' Page [PageElement]
pPageElements
  = lens _pPageElements
      (\ s a -> s{_pPageElements = a})
      . _Default
      . _Coerce

-- | Slide specific properties. Only set if page_type = SLIDE.
pSlideProperties :: Lens' Page (Maybe SlideProperties)
pSlideProperties
  = lens _pSlideProperties
      (\ s a -> s{_pSlideProperties = a})

-- | The properties of the page.
pPageProperties :: Lens' Page (Maybe PageProperties)
pPageProperties
  = lens _pPageProperties
      (\ s a -> s{_pPageProperties = a})

-- | Layout specific properties. Only set if page_type = LAYOUT.
pLayoutProperties :: Lens' Page (Maybe LayoutProperties)
pLayoutProperties
  = lens _pLayoutProperties
      (\ s a -> s{_pLayoutProperties = a})

-- | The type of the page.
pPageType :: Lens' Page (Maybe PagePageType)
pPageType
  = lens _pPageType (\ s a -> s{_pPageType = a})

instance FromJSON Page where
        parseJSON
          = withObject "Page"
              (\ o ->
                 Page' <$>
                   (o .:? "objectId") <*>
                     (o .:? "pageElements" .!= mempty)
                     <*> (o .:? "slideProperties")
                     <*> (o .:? "pageProperties")
                     <*> (o .:? "layoutProperties")
                     <*> (o .:? "pageType"))

instance ToJSON Page where
        toJSON Page'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _pObjectId,
                  ("pageElements" .=) <$> _pPageElements,
                  ("slideProperties" .=) <$> _pSlideProperties,
                  ("pageProperties" .=) <$> _pPageProperties,
                  ("layoutProperties" .=) <$> _pLayoutProperties,
                  ("pageType" .=) <$> _pPageType])

-- | 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])

-- | Describes the bullet of a paragraph.
--
-- /See:/ 'bullet' smart constructor.
data Bullet = Bullet'
    { _bGlyph        :: !(Maybe Text)
    , _bListId       :: !(Maybe Text)
    , _bNestingLevel :: !(Maybe (Textual Int32))
    , _bBulletStyle  :: !(Maybe TextStyle)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Bullet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bGlyph'
--
-- * 'bListId'
--
-- * 'bNestingLevel'
--
-- * 'bBulletStyle'
bullet
    :: Bullet
bullet =
    Bullet'
    { _bGlyph = Nothing
    , _bListId = Nothing
    , _bNestingLevel = Nothing
    , _bBulletStyle = Nothing
    }

-- | The rendered bullet glyph for this paragraph.
bGlyph :: Lens' Bullet (Maybe Text)
bGlyph = lens _bGlyph (\ s a -> s{_bGlyph = a})

-- | The ID of the list this paragraph belongs to.
bListId :: Lens' Bullet (Maybe Text)
bListId = lens _bListId (\ s a -> s{_bListId = a})

-- | The nesting level of this paragraph in the list.
bNestingLevel :: Lens' Bullet (Maybe Int32)
bNestingLevel
  = lens _bNestingLevel
      (\ s a -> s{_bNestingLevel = a})
      . mapping _Coerce

-- | The paragraph specific text style applied to this bullet.
bBulletStyle :: Lens' Bullet (Maybe TextStyle)
bBulletStyle
  = lens _bBulletStyle (\ s a -> s{_bBulletStyle = a})

instance FromJSON Bullet where
        parseJSON
          = withObject "Bullet"
              (\ o ->
                 Bullet' <$>
                   (o .:? "glyph") <*> (o .:? "listId") <*>
                     (o .:? "nestingLevel")
                     <*> (o .:? "bulletStyle"))

instance ToJSON Bullet where
        toJSON Bullet'{..}
          = object
              (catMaybes
                 [("glyph" .=) <$> _bGlyph,
                  ("listId" .=) <$> _bListId,
                  ("nestingLevel" .=) <$> _bNestingLevel,
                  ("bulletStyle" .=) <$> _bBulletStyle])

-- | Update the properties of an Image.
--
-- /See:/ 'updateImagePropertiesRequest' smart constructor.
data UpdateImagePropertiesRequest = UpdateImagePropertiesRequest'
    { _uiprObjectId        :: !(Maybe Text)
    , _uiprImageProperties :: !(Maybe ImageProperties)
    , _uiprFields          :: !(Maybe FieldMask)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UpdateImagePropertiesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'uiprObjectId'
--
-- * 'uiprImageProperties'
--
-- * 'uiprFields'
updateImagePropertiesRequest
    :: UpdateImagePropertiesRequest
updateImagePropertiesRequest =
    UpdateImagePropertiesRequest'
    { _uiprObjectId = Nothing
    , _uiprImageProperties = Nothing
    , _uiprFields = Nothing
    }

-- | The object ID of the image the updates are applied to.
uiprObjectId :: Lens' UpdateImagePropertiesRequest (Maybe Text)
uiprObjectId
  = lens _uiprObjectId (\ s a -> s{_uiprObjectId = a})

-- | The image properties to update.
uiprImageProperties :: Lens' UpdateImagePropertiesRequest (Maybe ImageProperties)
uiprImageProperties
  = lens _uiprImageProperties
      (\ s a -> s{_uiprImageProperties = a})

-- | The fields that should be updated. At least one field must be specified.
-- The root \`imageProperties\` is implied and should not be specified. A
-- single \`\"*\"\` can be used as short-hand for listing every field. For
-- example to update the image outline color, set \`fields\` to
-- \`\"outline.outlineFill.solidFill.color\"\`. To reset a property to its
-- default value, include its field name in the field mask but leave the
-- field itself unset.
uiprFields :: Lens' UpdateImagePropertiesRequest (Maybe FieldMask)
uiprFields
  = lens _uiprFields (\ s a -> s{_uiprFields = a})

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

instance ToJSON UpdateImagePropertiesRequest where
        toJSON UpdateImagePropertiesRequest'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _uiprObjectId,
                  ("imageProperties" .=) <$> _uiprImageProperties,
                  ("fields" .=) <$> _uiprFields])

-- | The properties of Page that are only relevant for pages with page_type
-- SLIDE.
--
-- /See:/ 'slideProperties' smart constructor.
data SlideProperties = SlideProperties'
    { _spLayoutObjectId :: !(Maybe Text)
    , _spMasterObjectId :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SlideProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'spLayoutObjectId'
--
-- * 'spMasterObjectId'
slideProperties
    :: SlideProperties
slideProperties =
    SlideProperties'
    { _spLayoutObjectId = Nothing
    , _spMasterObjectId = Nothing
    }

-- | The object ID of the layout that this slide is based on.
spLayoutObjectId :: Lens' SlideProperties (Maybe Text)
spLayoutObjectId
  = lens _spLayoutObjectId
      (\ s a -> s{_spLayoutObjectId = a})

-- | The object ID of the master that this slide is based on.
spMasterObjectId :: Lens' SlideProperties (Maybe Text)
spMasterObjectId
  = lens _spMasterObjectId
      (\ s a -> s{_spMasterObjectId = a})

instance FromJSON SlideProperties where
        parseJSON
          = withObject "SlideProperties"
              (\ o ->
                 SlideProperties' <$>
                   (o .:? "layoutObjectId") <*>
                     (o .:? "masterObjectId"))

instance ToJSON SlideProperties where
        toJSON SlideProperties'{..}
          = object
              (catMaybes
                 [("layoutObjectId" .=) <$> _spLayoutObjectId,
                  ("masterObjectId" .=) <$> _spMasterObjectId])

-- | A Google Slides presentation.
--
-- /See:/ 'presentation' smart constructor.
data Presentation = Presentation'
    { _pSlides         :: !(Maybe [Page])
    , _pMasters        :: !(Maybe [Page])
    , _pLocale         :: !(Maybe Text)
    , _pPresentationId :: !(Maybe Text)
    , _pTitle          :: !(Maybe Text)
    , _pPageSize       :: !(Maybe Size)
    , _pLayouts        :: !(Maybe [Page])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Presentation' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pSlides'
--
-- * 'pMasters'
--
-- * 'pLocale'
--
-- * 'pPresentationId'
--
-- * 'pTitle'
--
-- * 'pPageSize'
--
-- * 'pLayouts'
presentation
    :: Presentation
presentation =
    Presentation'
    { _pSlides = Nothing
    , _pMasters = Nothing
    , _pLocale = Nothing
    , _pPresentationId = Nothing
    , _pTitle = Nothing
    , _pPageSize = Nothing
    , _pLayouts = Nothing
    }

-- | The slides in the presentation. A slide inherits properties from a slide
-- layout.
pSlides :: Lens' Presentation [Page]
pSlides
  = lens _pSlides (\ s a -> s{_pSlides = a}) . _Default
      . _Coerce

-- | The slide masters in the presentation. A slide master contains all
-- common page elements and the common properties for a set of layouts.
-- They serve three purposes: - Placeholder shapes on a master contain the
-- default text styles and shape properties of all placeholder shapes on
-- pages that use that master. - The master page properties define the
-- common page properties inherited by its layouts. - Any other shapes on
-- the master slide will appear on all slides using that master, regardless
-- of their layout.
pMasters :: Lens' Presentation [Page]
pMasters
  = lens _pMasters (\ s a -> s{_pMasters = a}) .
      _Default
      . _Coerce

-- | The locale of the presentation, as an IETF BCP 47 language tag.
pLocale :: Lens' Presentation (Maybe Text)
pLocale = lens _pLocale (\ s a -> s{_pLocale = a})

-- | The ID of the presentation.
pPresentationId :: Lens' Presentation (Maybe Text)
pPresentationId
  = lens _pPresentationId
      (\ s a -> s{_pPresentationId = a})

-- | The title of the presentation.
pTitle :: Lens' Presentation (Maybe Text)
pTitle = lens _pTitle (\ s a -> s{_pTitle = a})

-- | The size of pages in the presentation.
pPageSize :: Lens' Presentation (Maybe Size)
pPageSize
  = lens _pPageSize (\ s a -> s{_pPageSize = a})

-- | The layouts in the presentation. A layout is a template that determines
-- how content is arranged and styled on the slides that inherit from that
-- layout.
pLayouts :: Lens' Presentation [Page]
pLayouts
  = lens _pLayouts (\ s a -> s{_pLayouts = a}) .
      _Default
      . _Coerce

instance FromJSON Presentation where
        parseJSON
          = withObject "Presentation"
              (\ o ->
                 Presentation' <$>
                   (o .:? "slides" .!= mempty) <*>
                     (o .:? "masters" .!= mempty)
                     <*> (o .:? "locale")
                     <*> (o .:? "presentationId")
                     <*> (o .:? "title")
                     <*> (o .:? "pageSize")
                     <*> (o .:? "layouts" .!= mempty))

instance ToJSON Presentation where
        toJSON Presentation'{..}
          = object
              (catMaybes
                 [("slides" .=) <$> _pSlides,
                  ("masters" .=) <$> _pMasters,
                  ("locale" .=) <$> _pLocale,
                  ("presentationId" .=) <$> _pPresentationId,
                  ("title" .=) <$> _pTitle,
                  ("pageSize" .=) <$> _pPageSize,
                  ("layouts" .=) <$> _pLayouts])

-- | A pair mapping a theme color type to the concrete color it represents.
--
-- /See:/ 'themeColorPair' smart constructor.
data ThemeColorPair = ThemeColorPair'
    { _tcpColor :: !(Maybe RgbColor)
    , _tcpType  :: !(Maybe ThemeColorPairType)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ThemeColorPair' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tcpColor'
--
-- * 'tcpType'
themeColorPair
    :: ThemeColorPair
themeColorPair =
    ThemeColorPair'
    { _tcpColor = Nothing
    , _tcpType = Nothing
    }

-- | The concrete color corresponding to the theme color type above.
tcpColor :: Lens' ThemeColorPair (Maybe RgbColor)
tcpColor = lens _tcpColor (\ s a -> s{_tcpColor = a})

-- | The type of the theme color.
tcpType :: Lens' ThemeColorPair (Maybe ThemeColorPairType)
tcpType = lens _tcpType (\ s a -> s{_tcpType = a})

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

instance ToJSON ThemeColorPair where
        toJSON ThemeColorPair'{..}
          = object
              (catMaybes
                 [("color" .=) <$> _tcpColor,
                  ("type" .=) <$> _tcpType])

-- | The shadow properties of a page element. If these fields are unset, they
-- may be inherited from a parent placeholder if it exists. If there is no
-- parent, the fields will default to the value used for new page elements
-- created in the Slides editor, which may depend on the page element kind.
--
-- /See:/ 'shadow' smart constructor.
data Shadow = Shadow'
    { _sTransform       :: !(Maybe AffineTransform)
    , _sColor           :: !(Maybe OpaqueColor)
    , _sBlurRadius      :: !(Maybe Dimension)
    , _sRotateWithShape :: !(Maybe Bool)
    , _sAlpha           :: !(Maybe (Textual Double))
    , _sAlignment       :: !(Maybe ShadowAlignment)
    , _sPropertyState   :: !(Maybe ShadowPropertyState)
    , _sType            :: !(Maybe ShadowType)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Shadow' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sTransform'
--
-- * 'sColor'
--
-- * 'sBlurRadius'
--
-- * 'sRotateWithShape'
--
-- * 'sAlpha'
--
-- * 'sAlignment'
--
-- * 'sPropertyState'
--
-- * 'sType'
shadow
    :: Shadow
shadow =
    Shadow'
    { _sTransform = Nothing
    , _sColor = Nothing
    , _sBlurRadius = Nothing
    , _sRotateWithShape = Nothing
    , _sAlpha = Nothing
    , _sAlignment = Nothing
    , _sPropertyState = Nothing
    , _sType = Nothing
    }

-- | Transform that encodes the translate, scale, and skew of the shadow,
-- relative to the alignment position.
sTransform :: Lens' Shadow (Maybe AffineTransform)
sTransform
  = lens _sTransform (\ s a -> s{_sTransform = a})

-- | The shadow color value.
sColor :: Lens' Shadow (Maybe OpaqueColor)
sColor = lens _sColor (\ s a -> s{_sColor = a})

-- | The radius of the shadow blur. The larger the radius, the more diffuse
-- the shadow becomes.
sBlurRadius :: Lens' Shadow (Maybe Dimension)
sBlurRadius
  = lens _sBlurRadius (\ s a -> s{_sBlurRadius = a})

-- | Whether the shadow should rotate with the shape.
sRotateWithShape :: Lens' Shadow (Maybe Bool)
sRotateWithShape
  = lens _sRotateWithShape
      (\ s a -> s{_sRotateWithShape = a})

-- | The alpha of the shadow\'s color, from 0.0 to 1.0.
sAlpha :: Lens' Shadow (Maybe Double)
sAlpha
  = lens _sAlpha (\ s a -> s{_sAlpha = a}) .
      mapping _Coerce

-- | The alignment point of the shadow, that sets the origin for translate,
-- scale and skew of the shadow.
sAlignment :: Lens' Shadow (Maybe ShadowAlignment)
sAlignment
  = lens _sAlignment (\ s a -> s{_sAlignment = a})

-- | The shadow property state. Updating the the shadow on a page element
-- will implicitly update this field to \`RENDERED\`, unless another value
-- is specified in the same request. To have no shadow on a page element,
-- set this field to \`NOT_RENDERED\`. In this case, any other shadow
-- fields set in the same request will be ignored.
sPropertyState :: Lens' Shadow (Maybe ShadowPropertyState)
sPropertyState
  = lens _sPropertyState
      (\ s a -> s{_sPropertyState = a})

-- | The type of the shadow.
sType :: Lens' Shadow (Maybe ShadowType)
sType = lens _sType (\ s a -> s{_sType = a})

instance FromJSON Shadow where
        parseJSON
          = withObject "Shadow"
              (\ o ->
                 Shadow' <$>
                   (o .:? "transform") <*> (o .:? "color") <*>
                     (o .:? "blurRadius")
                     <*> (o .:? "rotateWithShape")
                     <*> (o .:? "alpha")
                     <*> (o .:? "alignment")
                     <*> (o .:? "propertyState")
                     <*> (o .:? "type"))

instance ToJSON Shadow where
        toJSON Shadow'{..}
          = object
              (catMaybes
                 [("transform" .=) <$> _sTransform,
                  ("color" .=) <$> _sColor,
                  ("blurRadius" .=) <$> _sBlurRadius,
                  ("rotateWithShape" .=) <$> _sRotateWithShape,
                  ("alpha" .=) <$> _sAlpha,
                  ("alignment" .=) <$> _sAlignment,
                  ("propertyState" .=) <$> _sPropertyState,
                  ("type" .=) <$> _sType])

-- | The properties of the Image.
--
-- /See:/ 'imageProperties' smart constructor.
data ImageProperties = ImageProperties'
    { _ipCropProperties :: !(Maybe CropProperties)
    , _ipLink           :: !(Maybe Link)
    , _ipTransparency   :: !(Maybe (Textual Double))
    , _ipShadow         :: !(Maybe Shadow)
    , _ipContrast       :: !(Maybe (Textual Double))
    , _ipRecolor        :: !(Maybe Recolor)
    , _ipOutline        :: !(Maybe Outline)
    , _ipBrightness     :: !(Maybe (Textual Double))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ImageProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ipCropProperties'
--
-- * 'ipLink'
--
-- * 'ipTransparency'
--
-- * 'ipShadow'
--
-- * 'ipContrast'
--
-- * 'ipRecolor'
--
-- * 'ipOutline'
--
-- * 'ipBrightness'
imageProperties
    :: ImageProperties
imageProperties =
    ImageProperties'
    { _ipCropProperties = Nothing
    , _ipLink = Nothing
    , _ipTransparency = Nothing
    , _ipShadow = Nothing
    , _ipContrast = Nothing
    , _ipRecolor = Nothing
    , _ipOutline = Nothing
    , _ipBrightness = Nothing
    }

-- | The crop properties of the image. If not set, the image is not cropped.
-- This property is read-only.
ipCropProperties :: Lens' ImageProperties (Maybe CropProperties)
ipCropProperties
  = lens _ipCropProperties
      (\ s a -> s{_ipCropProperties = a})

-- | The hyperlink destination of the image. If unset, there is no link.
ipLink :: Lens' ImageProperties (Maybe Link)
ipLink = lens _ipLink (\ s a -> s{_ipLink = a})

-- | The transparency effect of the image. The value should be in the
-- interval [0.0, 1.0], where 0 means no effect and 1 means completely
-- transparent. This property is read-only.
ipTransparency :: Lens' ImageProperties (Maybe Double)
ipTransparency
  = lens _ipTransparency
      (\ s a -> s{_ipTransparency = a})
      . mapping _Coerce

-- | The shadow of the image. If not set, the image has no shadow. This
-- property is read-only.
ipShadow :: Lens' ImageProperties (Maybe Shadow)
ipShadow = lens _ipShadow (\ s a -> s{_ipShadow = a})

-- | The contrast effect of the image. The value should be in the interval
-- [-1.0, 1.0], where 0 means no effect. This property is read-only.
ipContrast :: Lens' ImageProperties (Maybe Double)
ipContrast
  = lens _ipContrast (\ s a -> s{_ipContrast = a}) .
      mapping _Coerce

-- | The recolor effect of the image. If not set, the image is not recolored.
-- This property is read-only.
ipRecolor :: Lens' ImageProperties (Maybe Recolor)
ipRecolor
  = lens _ipRecolor (\ s a -> s{_ipRecolor = a})

-- | The outline of the image. If not set, the the image has no outline.
ipOutline :: Lens' ImageProperties (Maybe Outline)
ipOutline
  = lens _ipOutline (\ s a -> s{_ipOutline = a})

-- | The brightness effect of the image. The value should be in the interval
-- [-1.0, 1.0], where 0 means no effect. This property is read-only.
ipBrightness :: Lens' ImageProperties (Maybe Double)
ipBrightness
  = lens _ipBrightness (\ s a -> s{_ipBrightness = a})
      . mapping _Coerce

instance FromJSON ImageProperties where
        parseJSON
          = withObject "ImageProperties"
              (\ o ->
                 ImageProperties' <$>
                   (o .:? "cropProperties") <*> (o .:? "link") <*>
                     (o .:? "transparency")
                     <*> (o .:? "shadow")
                     <*> (o .:? "contrast")
                     <*> (o .:? "recolor")
                     <*> (o .:? "outline")
                     <*> (o .:? "brightness"))

instance ToJSON ImageProperties where
        toJSON ImageProperties'{..}
          = object
              (catMaybes
                 [("cropProperties" .=) <$> _ipCropProperties,
                  ("link" .=) <$> _ipLink,
                  ("transparency" .=) <$> _ipTransparency,
                  ("shadow" .=) <$> _ipShadow,
                  ("contrast" .=) <$> _ipContrast,
                  ("recolor" .=) <$> _ipRecolor,
                  ("outline" .=) <$> _ipOutline,
                  ("brightness" .=) <$> _ipBrightness])

-- | A PageElement kind representing a line, curved connector, or bent
-- connector.
--
-- /See:/ 'line' smart constructor.
data Line = Line'
    { _lLineProperties :: !(Maybe LineProperties)
    , _lLineType       :: !(Maybe LineLineType)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Line' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lLineProperties'
--
-- * 'lLineType'
line
    :: Line
line =
    Line'
    { _lLineProperties = Nothing
    , _lLineType = Nothing
    }

-- | The properties of the line.
lLineProperties :: Lens' Line (Maybe LineProperties)
lLineProperties
  = lens _lLineProperties
      (\ s a -> s{_lLineProperties = a})

-- | The type of the line.
lLineType :: Lens' Line (Maybe LineLineType)
lLineType
  = lens _lLineType (\ s a -> s{_lLineType = a})

instance FromJSON Line where
        parseJSON
          = withObject "Line"
              (\ o ->
                 Line' <$>
                   (o .:? "lineProperties") <*> (o .:? "lineType"))

instance ToJSON Line where
        toJSON Line'{..}
          = object
              (catMaybes
                 [("lineProperties" .=) <$> _lLineProperties,
                  ("lineType" .=) <$> _lLineType])

-- | The result of creating a video.
--
-- /See:/ 'createVideoResponse' smart constructor.
newtype CreateVideoResponse = CreateVideoResponse'
    { _cvrObjectId :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateVideoResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cvrObjectId'
createVideoResponse
    :: CreateVideoResponse
createVideoResponse =
    CreateVideoResponse'
    { _cvrObjectId = Nothing
    }

-- | The object ID of the created video.
cvrObjectId :: Lens' CreateVideoResponse (Maybe Text)
cvrObjectId
  = lens _cvrObjectId (\ s a -> s{_cvrObjectId = a})

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

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

-- | Slide layout reference. This may reference either: - A predefined layout
-- - One of the layouts in the presentation.
--
-- /See:/ 'layoutReference' smart constructor.
data LayoutReference = LayoutReference'
    { _lrPredefinedLayout :: !(Maybe LayoutReferencePredefinedLayout)
    , _lrLayoutId         :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LayoutReference' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lrPredefinedLayout'
--
-- * 'lrLayoutId'
layoutReference
    :: LayoutReference
layoutReference =
    LayoutReference'
    { _lrPredefinedLayout = Nothing
    , _lrLayoutId = Nothing
    }

-- | Predefined layout.
lrPredefinedLayout :: Lens' LayoutReference (Maybe LayoutReferencePredefinedLayout)
lrPredefinedLayout
  = lens _lrPredefinedLayout
      (\ s a -> s{_lrPredefinedLayout = a})

-- | Layout ID: the object ID of one of the layouts in the presentation.
lrLayoutId :: Lens' LayoutReference (Maybe Text)
lrLayoutId
  = lens _lrLayoutId (\ s a -> s{_lrLayoutId = a})

instance FromJSON LayoutReference where
        parseJSON
          = withObject "LayoutReference"
              (\ o ->
                 LayoutReference' <$>
                   (o .:? "predefinedLayout") <*> (o .:? "layoutId"))

instance ToJSON LayoutReference where
        toJSON LayoutReference'{..}
          = object
              (catMaybes
                 [("predefinedLayout" .=) <$> _lrPredefinedLayout,
                  ("layoutId" .=) <$> _lrLayoutId])

-- | The fill of the line.
--
-- /See:/ 'lineFill' smart constructor.
newtype LineFill = LineFill'
    { _lfSolidFill :: Maybe SolidFill
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LineFill' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lfSolidFill'
lineFill
    :: LineFill
lineFill =
    LineFill'
    { _lfSolidFill = Nothing
    }

-- | Solid color fill.
lfSolidFill :: Lens' LineFill (Maybe SolidFill)
lfSolidFill
  = lens _lfSolidFill (\ s a -> s{_lfSolidFill = a})

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

instance ToJSON LineFill where
        toJSON LineFill'{..}
          = object
              (catMaybes [("solidFill" .=) <$> _lfSolidFill])

-- | Updates the transform of a page element.
--
-- /See:/ 'updatePageElementTransformRequest' smart constructor.
data UpdatePageElementTransformRequest = UpdatePageElementTransformRequest'
    { _upetrTransform :: !(Maybe AffineTransform)
    , _upetrObjectId  :: !(Maybe Text)
    , _upetrApplyMode :: !(Maybe UpdatePageElementTransformRequestApplyMode)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UpdatePageElementTransformRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'upetrTransform'
--
-- * 'upetrObjectId'
--
-- * 'upetrApplyMode'
updatePageElementTransformRequest
    :: UpdatePageElementTransformRequest
updatePageElementTransformRequest =
    UpdatePageElementTransformRequest'
    { _upetrTransform = Nothing
    , _upetrObjectId = Nothing
    , _upetrApplyMode = Nothing
    }

-- | The input transform matrix used to update the page element.
upetrTransform :: Lens' UpdatePageElementTransformRequest (Maybe AffineTransform)
upetrTransform
  = lens _upetrTransform
      (\ s a -> s{_upetrTransform = a})

-- | The object ID of the page element to update.
upetrObjectId :: Lens' UpdatePageElementTransformRequest (Maybe Text)
upetrObjectId
  = lens _upetrObjectId
      (\ s a -> s{_upetrObjectId = a})

-- | The apply mode of the transform update.
upetrApplyMode :: Lens' UpdatePageElementTransformRequest (Maybe UpdatePageElementTransformRequestApplyMode)
upetrApplyMode
  = lens _upetrApplyMode
      (\ s a -> s{_upetrApplyMode = a})

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

instance ToJSON UpdatePageElementTransformRequest
         where
        toJSON UpdatePageElementTransformRequest'{..}
          = object
              (catMaybes
                 [("transform" .=) <$> _upetrTransform,
                  ("objectId" .=) <$> _upetrObjectId,
                  ("applyMode" .=) <$> _upetrApplyMode])

-- | Inserts rows into a table.
--
-- /See:/ 'insertTableRowsRequest' smart constructor.
data InsertTableRowsRequest = InsertTableRowsRequest'
    { _itrrInsertBelow   :: !(Maybe Bool)
    , _itrrNumber        :: !(Maybe (Textual Int32))
    , _itrrCellLocation  :: !(Maybe TableCellLocation)
    , _itrrTableObjectId :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InsertTableRowsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'itrrInsertBelow'
--
-- * 'itrrNumber'
--
-- * 'itrrCellLocation'
--
-- * 'itrrTableObjectId'
insertTableRowsRequest
    :: InsertTableRowsRequest
insertTableRowsRequest =
    InsertTableRowsRequest'
    { _itrrInsertBelow = Nothing
    , _itrrNumber = Nothing
    , _itrrCellLocation = Nothing
    , _itrrTableObjectId = Nothing
    }

-- | Whether to insert new rows below the reference cell location. -
-- \`True\`: insert below the cell. - \`False\`: insert above the cell.
itrrInsertBelow :: Lens' InsertTableRowsRequest (Maybe Bool)
itrrInsertBelow
  = lens _itrrInsertBelow
      (\ s a -> s{_itrrInsertBelow = a})

-- | The number of rows to be inserted. Maximum 20 per request.
itrrNumber :: Lens' InsertTableRowsRequest (Maybe Int32)
itrrNumber
  = lens _itrrNumber (\ s a -> s{_itrrNumber = a}) .
      mapping _Coerce

-- | The reference table cell location from which rows will be inserted. A
-- new row will be inserted above (or below) the row where the reference
-- cell is. If the reference cell is a merged cell, a new row will be
-- inserted above (or below) the merged cell.
itrrCellLocation :: Lens' InsertTableRowsRequest (Maybe TableCellLocation)
itrrCellLocation
  = lens _itrrCellLocation
      (\ s a -> s{_itrrCellLocation = a})

-- | The table to insert rows into.
itrrTableObjectId :: Lens' InsertTableRowsRequest (Maybe Text)
itrrTableObjectId
  = lens _itrrTableObjectId
      (\ s a -> s{_itrrTableObjectId = a})

instance FromJSON InsertTableRowsRequest where
        parseJSON
          = withObject "InsertTableRowsRequest"
              (\ o ->
                 InsertTableRowsRequest' <$>
                   (o .:? "insertBelow") <*> (o .:? "number") <*>
                     (o .:? "cellLocation")
                     <*> (o .:? "tableObjectId"))

instance ToJSON InsertTableRowsRequest where
        toJSON InsertTableRowsRequest'{..}
          = object
              (catMaybes
                 [("insertBelow" .=) <$> _itrrInsertBelow,
                  ("number" .=) <$> _itrrNumber,
                  ("cellLocation" .=) <$> _itrrCellLocation,
                  ("tableObjectId" .=) <$> _itrrTableObjectId])

-- | A PageElement kind representing a video.
--
-- /See:/ 'video' smart constructor.
data Video = Video'
    { _vURL             :: !(Maybe Text)
    , _vSource          :: !(Maybe VideoSource)
    , _vId              :: !(Maybe Text)
    , _vVideoProperties :: !(Maybe VideoProperties)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Video' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vURL'
--
-- * 'vSource'
--
-- * 'vId'
--
-- * 'vVideoProperties'
video
    :: Video
video =
    Video'
    { _vURL = Nothing
    , _vSource = Nothing
    , _vId = Nothing
    , _vVideoProperties = Nothing
    }

-- | An URL to a video. The URL is valid as long as the source video exists
-- and sharing settings do not change.
vURL :: Lens' Video (Maybe Text)
vURL = lens _vURL (\ s a -> s{_vURL = a})

-- | The video source.
vSource :: Lens' Video (Maybe VideoSource)
vSource = lens _vSource (\ s a -> s{_vSource = a})

-- | The video source\'s unique identifier for this video.
vId :: Lens' Video (Maybe Text)
vId = lens _vId (\ s a -> s{_vId = a})

-- | The properties of the video.
vVideoProperties :: Lens' Video (Maybe VideoProperties)
vVideoProperties
  = lens _vVideoProperties
      (\ s a -> s{_vVideoProperties = a})

instance FromJSON Video where
        parseJSON
          = withObject "Video"
              (\ o ->
                 Video' <$>
                   (o .:? "url") <*> (o .:? "source") <*> (o .:? "id")
                     <*> (o .:? "videoProperties"))

instance ToJSON Video where
        toJSON Video'{..}
          = object
              (catMaybes
                 [("url" .=) <$> _vURL, ("source" .=) <$> _vSource,
                  ("id" .=) <$> _vId,
                  ("videoProperties" .=) <$> _vVideoProperties])

-- | The properties of the TableCell.
--
-- /See:/ 'tableCellProperties' smart constructor.
newtype TableCellProperties = TableCellProperties'
    { _tcpTableCellBackgRoundFill :: Maybe TableCellBackgRoundFill
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TableCellProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tcpTableCellBackgRoundFill'
tableCellProperties
    :: TableCellProperties
tableCellProperties =
    TableCellProperties'
    { _tcpTableCellBackgRoundFill = Nothing
    }

-- | The background fill of the table cell. The default fill matches the fill
-- for newly created table cells in the Slides editor.
tcpTableCellBackgRoundFill :: Lens' TableCellProperties (Maybe TableCellBackgRoundFill)
tcpTableCellBackgRoundFill
  = lens _tcpTableCellBackgRoundFill
      (\ s a -> s{_tcpTableCellBackgRoundFill = a})

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

instance ToJSON TableCellProperties where
        toJSON TableCellProperties'{..}
          = object
              (catMaybes
                 [("tableCellBackgroundFill" .=) <$>
                    _tcpTableCellBackgRoundFill])

-- | The result of creating a line.
--
-- /See:/ 'createLineResponse' smart constructor.
newtype CreateLineResponse = CreateLineResponse'
    { _clrObjectId :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateLineResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'clrObjectId'
createLineResponse
    :: CreateLineResponse
createLineResponse =
    CreateLineResponse'
    { _clrObjectId = Nothing
    }

-- | The object ID of the created line.
clrObjectId :: Lens' CreateLineResponse (Maybe Text)
clrObjectId
  = lens _clrObjectId (\ s a -> s{_clrObjectId = a})

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

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

-- | A PageElement kind representing word art.
--
-- /See:/ 'wordArt' smart constructor.
newtype WordArt = WordArt'
    { _waRenderedText :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'WordArt' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'waRenderedText'
wordArt
    :: WordArt
wordArt =
    WordArt'
    { _waRenderedText = Nothing
    }

-- | The text rendered as word art.
waRenderedText :: Lens' WordArt (Maybe Text)
waRenderedText
  = lens _waRenderedText
      (\ s a -> s{_waRenderedText = a})

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

instance ToJSON WordArt where
        toJSON WordArt'{..}
          = object
              (catMaybes [("renderedText" .=) <$> _waRenderedText])

-- | The table cell background fill.
--
-- /See:/ 'tableCellBackgRoundFill' smart constructor.
data TableCellBackgRoundFill = TableCellBackgRoundFill'
    { _tcbrfSolidFill     :: !(Maybe SolidFill)
    , _tcbrfPropertyState :: !(Maybe TableCellBackgRoundFillPropertyState)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TableCellBackgRoundFill' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tcbrfSolidFill'
--
-- * 'tcbrfPropertyState'
tableCellBackgRoundFill
    :: TableCellBackgRoundFill
tableCellBackgRoundFill =
    TableCellBackgRoundFill'
    { _tcbrfSolidFill = Nothing
    , _tcbrfPropertyState = Nothing
    }

-- | Solid color fill.
tcbrfSolidFill :: Lens' TableCellBackgRoundFill (Maybe SolidFill)
tcbrfSolidFill
  = lens _tcbrfSolidFill
      (\ s a -> s{_tcbrfSolidFill = a})

-- | The background fill property state. Updating the the fill on a table
-- cell will implicitly update this field to \`RENDERED\`, unless another
-- value is specified in the same request. To have no fill on a table cell,
-- set this field to \`NOT_RENDERED\`. In this case, any other fill fields
-- set in the same request will be ignored.
tcbrfPropertyState :: Lens' TableCellBackgRoundFill (Maybe TableCellBackgRoundFillPropertyState)
tcbrfPropertyState
  = lens _tcbrfPropertyState
      (\ s a -> s{_tcbrfPropertyState = a})

instance FromJSON TableCellBackgRoundFill where
        parseJSON
          = withObject "TableCellBackgRoundFill"
              (\ o ->
                 TableCellBackgRoundFill' <$>
                   (o .:? "solidFill") <*> (o .:? "propertyState"))

instance ToJSON TableCellBackgRoundFill where
        toJSON TableCellBackgRoundFill'{..}
          = object
              (catMaybes
                 [("solidFill" .=) <$> _tcbrfSolidFill,
                  ("propertyState" .=) <$> _tcbrfPropertyState])

-- | A TextElement kind that represents a run of text that all has the same
-- styling.
--
-- /See:/ 'textRun' smart constructor.
data TextRun = TextRun'
    { _trStyle   :: !(Maybe TextStyle)
    , _trContent :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TextRun' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'trStyle'
--
-- * 'trContent'
textRun
    :: TextRun
textRun =
    TextRun'
    { _trStyle = Nothing
    , _trContent = Nothing
    }

-- | The styling applied to this run.
trStyle :: Lens' TextRun (Maybe TextStyle)
trStyle = lens _trStyle (\ s a -> s{_trStyle = a})

-- | The text of this run.
trContent :: Lens' TextRun (Maybe Text)
trContent
  = lens _trContent (\ s a -> s{_trContent = a})

instance FromJSON TextRun where
        parseJSON
          = withObject "TextRun"
              (\ o ->
                 TextRun' <$> (o .:? "style") <*> (o .:? "content"))

instance ToJSON TextRun where
        toJSON TextRun'{..}
          = object
              (catMaybes
                 [("style" .=) <$> _trStyle,
                  ("content" .=) <$> _trContent])

-- | Refreshes an embedded Google Sheets chart by replacing it with the
-- latest version of the chart from Google Sheets. NOTE: Refreshing charts
-- requires at least one of the spreadsheets.readonly, spreadsheets,
-- drive.readonly, or drive OAuth scopes.
--
-- /See:/ 'refreshSheetsChartRequest' smart constructor.
newtype RefreshSheetsChartRequest = RefreshSheetsChartRequest'
    { _rscrObjectId :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RefreshSheetsChartRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rscrObjectId'
refreshSheetsChartRequest
    :: RefreshSheetsChartRequest
refreshSheetsChartRequest =
    RefreshSheetsChartRequest'
    { _rscrObjectId = Nothing
    }

-- | The object ID of the chart to refresh.
rscrObjectId :: Lens' RefreshSheetsChartRequest (Maybe Text)
rscrObjectId
  = lens _rscrObjectId (\ s a -> s{_rscrObjectId = a})

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

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

-- | Properties and contents of each row in a table.
--
-- /See:/ 'tableRow' smart constructor.
data TableRow = TableRow'
    { _trTableCells :: !(Maybe [TableCell])
    , _trRowHeight  :: !(Maybe Dimension)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TableRow' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'trTableCells'
--
-- * 'trRowHeight'
tableRow
    :: TableRow
tableRow =
    TableRow'
    { _trTableCells = Nothing
    , _trRowHeight = Nothing
    }

-- | Properties and contents of each cell. Cells that span multiple columns
-- are represented only once with a column_span greater than 1. As a
-- result, the length of this collection does not always match the number
-- of columns of the entire table.
trTableCells :: Lens' TableRow [TableCell]
trTableCells
  = lens _trTableCells (\ s a -> s{_trTableCells = a})
      . _Default
      . _Coerce

-- | Height of a row.
trRowHeight :: Lens' TableRow (Maybe Dimension)
trRowHeight
  = lens _trRowHeight (\ s a -> s{_trRowHeight = a})

instance FromJSON TableRow where
        parseJSON
          = withObject "TableRow"
              (\ o ->
                 TableRow' <$>
                   (o .:? "tableCells" .!= mempty) <*>
                     (o .:? "rowHeight"))

instance ToJSON TableRow where
        toJSON TableRow'{..}
          = object
              (catMaybes
                 [("tableCells" .=) <$> _trTableCells,
                  ("rowHeight" .=) <$> _trRowHeight])

-- | Creates a video.
--
-- /See:/ 'createVideoRequest' smart constructor.
data CreateVideoRequest = CreateVideoRequest'
    { _creObjectId          :: !(Maybe Text)
    , _creElementProperties :: !(Maybe PageElementProperties)
    , _creSource            :: !(Maybe CreateVideoRequestSource)
    , _creId                :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateVideoRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'creObjectId'
--
-- * 'creElementProperties'
--
-- * 'creSource'
--
-- * 'creId'
createVideoRequest
    :: CreateVideoRequest
createVideoRequest =
    CreateVideoRequest'
    { _creObjectId = Nothing
    , _creElementProperties = Nothing
    , _creSource = Nothing
    , _creId = Nothing
    }

-- | A user-supplied object ID. If you specify an ID, it must be unique among
-- all pages and page elements in the presentation. The ID must start with
-- an alphanumeric character or an underscore (matches regex
-- \`[a-zA-Z0-9_]\`); remaining characters may include those as well as a
-- hyphen or colon (matches regex \`[a-zA-Z0-9_-:]\`). The length of the ID
-- must not be less than 5 or greater than 50. If you don\'t specify an ID,
-- a unique one is generated.
creObjectId :: Lens' CreateVideoRequest (Maybe Text)
creObjectId
  = lens _creObjectId (\ s a -> s{_creObjectId = a})

-- | The element properties for the video.
creElementProperties :: Lens' CreateVideoRequest (Maybe PageElementProperties)
creElementProperties
  = lens _creElementProperties
      (\ s a -> s{_creElementProperties = a})

-- | The video source.
creSource :: Lens' CreateVideoRequest (Maybe CreateVideoRequestSource)
creSource
  = lens _creSource (\ s a -> s{_creSource = a})

-- | The video source\'s unique identifier for this video. e.g. For YouTube
-- video https:\/\/www.youtube.com\/watch?v=7U3axjORYZ0, the ID is
-- 7U3axjORYZ0.
creId :: Lens' CreateVideoRequest (Maybe Text)
creId = lens _creId (\ s a -> s{_creId = a})

instance FromJSON CreateVideoRequest where
        parseJSON
          = withObject "CreateVideoRequest"
              (\ o ->
                 CreateVideoRequest' <$>
                   (o .:? "objectId") <*> (o .:? "elementProperties")
                     <*> (o .:? "source")
                     <*> (o .:? "id"))

instance ToJSON CreateVideoRequest where
        toJSON CreateVideoRequest'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _creObjectId,
                  ("elementProperties" .=) <$> _creElementProperties,
                  ("source" .=) <$> _creSource, ("id" .=) <$> _creId])

-- | The general text content. The text must reside in a compatible shape
-- (e.g. text box or rectangle) or a table cell in a page.
--
-- /See:/ 'textContent' smart constructor.
data TextContent = TextContent'
    { _tcTextElements :: !(Maybe [TextElement])
    , _tcLists        :: !(Maybe TextContentLists)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TextContent' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tcTextElements'
--
-- * 'tcLists'
textContent
    :: TextContent
textContent =
    TextContent'
    { _tcTextElements = Nothing
    , _tcLists = Nothing
    }

-- | The text contents broken down into its component parts, including
-- styling information. This property is read-only.
tcTextElements :: Lens' TextContent [TextElement]
tcTextElements
  = lens _tcTextElements
      (\ s a -> s{_tcTextElements = a})
      . _Default
      . _Coerce

-- | The bulleted lists contained in this text, keyed by list ID.
tcLists :: Lens' TextContent (Maybe TextContentLists)
tcLists = lens _tcLists (\ s a -> s{_tcLists = a})

instance FromJSON TextContent where
        parseJSON
          = withObject "TextContent"
              (\ o ->
                 TextContent' <$>
                   (o .:? "textElements" .!= mempty) <*>
                     (o .:? "lists"))

instance ToJSON TextContent where
        toJSON TextContent'{..}
          = object
              (catMaybes
                 [("textElements" .=) <$> _tcTextElements,
                  ("lists" .=) <$> _tcLists])

-- | A PageElement kind representing a generic shape that does not have a
-- more specific classification.
--
-- /See:/ 'shape' smart constructor.
data Shape = Shape'
    { _sShapeType       :: !(Maybe ShapeShapeType)
    , _sText            :: !(Maybe TextContent)
    , _sPlaceholder     :: !(Maybe Placeholder)
    , _sShapeProperties :: !(Maybe ShapeProperties)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Shape' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sShapeType'
--
-- * 'sText'
--
-- * 'sPlaceholder'
--
-- * 'sShapeProperties'
shape
    :: Shape
shape =
    Shape'
    { _sShapeType = Nothing
    , _sText = Nothing
    , _sPlaceholder = Nothing
    , _sShapeProperties = Nothing
    }

-- | The type of the shape.
sShapeType :: Lens' Shape (Maybe ShapeShapeType)
sShapeType
  = lens _sShapeType (\ s a -> s{_sShapeType = a})

-- | The text content of the shape.
sText :: Lens' Shape (Maybe TextContent)
sText = lens _sText (\ s a -> s{_sText = a})

-- | Placeholders are shapes that are inherit from corresponding placeholders
-- on layouts and masters. If set, the shape is a placeholder shape and any
-- inherited properties can be resolved by looking at the parent
-- placeholder identified by the Placeholder.parent_object_id field.
sPlaceholder :: Lens' Shape (Maybe Placeholder)
sPlaceholder
  = lens _sPlaceholder (\ s a -> s{_sPlaceholder = a})

-- | The properties of the shape.
sShapeProperties :: Lens' Shape (Maybe ShapeProperties)
sShapeProperties
  = lens _sShapeProperties
      (\ s a -> s{_sShapeProperties = a})

instance FromJSON Shape where
        parseJSON
          = withObject "Shape"
              (\ o ->
                 Shape' <$>
                   (o .:? "shapeType") <*> (o .:? "text") <*>
                     (o .:? "placeholder")
                     <*> (o .:? "shapeProperties"))

instance ToJSON Shape where
        toJSON Shape'{..}
          = object
              (catMaybes
                 [("shapeType" .=) <$> _sShapeType,
                  ("text" .=) <$> _sText,
                  ("placeholder" .=) <$> _sPlaceholder,
                  ("shapeProperties" .=) <$> _sShapeProperties])

-- | AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ]
-- to transform source coordinates (x,y) into destination coordinates (x\',
-- y\') according to: x\' x = shear_y scale_y translate_y 1 [ 1 ] After
-- transformation, x\' = scale_x * x + shear_x * y + translate_x; y\' =
-- scale_y * y + shear_y * x + translate_y; This message is therefore
-- composed of these six matrix elements.
--
-- /See:/ 'affineTransform' smart constructor.
data AffineTransform = AffineTransform'
    { _atTranslateX :: !(Maybe (Textual Double))
    , _atShearY     :: !(Maybe (Textual Double))
    , _atTranslateY :: !(Maybe (Textual Double))
    , _atShearX     :: !(Maybe (Textual Double))
    , _atScaleX     :: !(Maybe (Textual Double))
    , _atUnit       :: !(Maybe AffineTransformUnit)
    , _atScaleY     :: !(Maybe (Textual Double))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AffineTransform' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atTranslateX'
--
-- * 'atShearY'
--
-- * 'atTranslateY'
--
-- * 'atShearX'
--
-- * 'atScaleX'
--
-- * 'atUnit'
--
-- * 'atScaleY'
affineTransform
    :: AffineTransform
affineTransform =
    AffineTransform'
    { _atTranslateX = Nothing
    , _atShearY = Nothing
    , _atTranslateY = Nothing
    , _atShearX = Nothing
    , _atScaleX = Nothing
    , _atUnit = Nothing
    , _atScaleY = Nothing
    }

-- | The X coordinate translation element.
atTranslateX :: Lens' AffineTransform (Maybe Double)
atTranslateX
  = lens _atTranslateX (\ s a -> s{_atTranslateX = a})
      . mapping _Coerce

-- | The Y coordinate shearing element.
atShearY :: Lens' AffineTransform (Maybe Double)
atShearY
  = lens _atShearY (\ s a -> s{_atShearY = a}) .
      mapping _Coerce

-- | The Y coordinate translation element.
atTranslateY :: Lens' AffineTransform (Maybe Double)
atTranslateY
  = lens _atTranslateY (\ s a -> s{_atTranslateY = a})
      . mapping _Coerce

-- | The X coordinate shearing element.
atShearX :: Lens' AffineTransform (Maybe Double)
atShearX
  = lens _atShearX (\ s a -> s{_atShearX = a}) .
      mapping _Coerce

-- | The X coordinate scaling element.
atScaleX :: Lens' AffineTransform (Maybe Double)
atScaleX
  = lens _atScaleX (\ s a -> s{_atScaleX = a}) .
      mapping _Coerce

-- | The units for translate elements.
atUnit :: Lens' AffineTransform (Maybe AffineTransformUnit)
atUnit = lens _atUnit (\ s a -> s{_atUnit = a})

-- | The Y coordinate scaling element.
atScaleY :: Lens' AffineTransform (Maybe Double)
atScaleY
  = lens _atScaleY (\ s a -> s{_atScaleY = a}) .
      mapping _Coerce

instance FromJSON AffineTransform where
        parseJSON
          = withObject "AffineTransform"
              (\ o ->
                 AffineTransform' <$>
                   (o .:? "translateX") <*> (o .:? "shearY") <*>
                     (o .:? "translateY")
                     <*> (o .:? "shearX")
                     <*> (o .:? "scaleX")
                     <*> (o .:? "unit")
                     <*> (o .:? "scaleY"))

instance ToJSON AffineTransform where
        toJSON AffineTransform'{..}
          = object
              (catMaybes
                 [("translateX" .=) <$> _atTranslateX,
                  ("shearY" .=) <$> _atShearY,
                  ("translateY" .=) <$> _atTranslateY,
                  ("shearX" .=) <$> _atShearX,
                  ("scaleX" .=) <$> _atScaleX, ("unit" .=) <$> _atUnit,
                  ("scaleY" .=) <$> _atScaleY])

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

-- | Creates a value of 'CreateSheetsChartResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cscrsObjectId'
createSheetsChartResponse
    :: CreateSheetsChartResponse
createSheetsChartResponse =
    CreateSheetsChartResponse'
    { _cscrsObjectId = Nothing
    }

-- | The object ID of the created chart.
cscrsObjectId :: Lens' CreateSheetsChartResponse (Maybe Text)
cscrsObjectId
  = lens _cscrsObjectId
      (\ s a -> s{_cscrsObjectId = a})

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

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

-- | Specifies a contiguous range of an indexed collection, such as
-- characters in text.
--
-- /See:/ 'range' smart constructor.
data Range = Range'
    { _rEndIndex   :: !(Maybe (Textual Int32))
    , _rType       :: !(Maybe RangeType)
    , _rStartIndex :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Range' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rEndIndex'
--
-- * 'rType'
--
-- * 'rStartIndex'
range
    :: Range
range =
    Range'
    { _rEndIndex = Nothing
    , _rType = Nothing
    , _rStartIndex = Nothing
    }

-- | The optional zero-based index of the end of the collection. Required for
-- \`SPECIFIC_RANGE\` delete mode.
rEndIndex :: Lens' Range (Maybe Int32)
rEndIndex
  = lens _rEndIndex (\ s a -> s{_rEndIndex = a}) .
      mapping _Coerce

-- | The type of range.
rType :: Lens' Range (Maybe RangeType)
rType = lens _rType (\ s a -> s{_rType = a})

-- | The optional zero-based index of the beginning of the collection.
-- Required for \`SPECIFIC_RANGE\` and \`FROM_START_INDEX\` ranges.
rStartIndex :: Lens' Range (Maybe Int32)
rStartIndex
  = lens _rStartIndex (\ s a -> s{_rStartIndex = a}) .
      mapping _Coerce

instance FromJSON Range where
        parseJSON
          = withObject "Range"
              (\ o ->
                 Range' <$>
                   (o .:? "endIndex") <*> (o .:? "type") <*>
                     (o .:? "startIndex"))

instance ToJSON Range where
        toJSON Range'{..}
          = object
              (catMaybes
                 [("endIndex" .=) <$> _rEndIndex,
                  ("type" .=) <$> _rType,
                  ("startIndex" .=) <$> _rStartIndex])

-- | Creates an image.
--
-- /See:/ 'createImageRequest' smart constructor.
data CreateImageRequest = CreateImageRequest'
    { _cirObjectId          :: !(Maybe Text)
    , _cirURL               :: !(Maybe Text)
    , _cirElementProperties :: !(Maybe PageElementProperties)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateImageRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cirObjectId'
--
-- * 'cirURL'
--
-- * 'cirElementProperties'
createImageRequest
    :: CreateImageRequest
createImageRequest =
    CreateImageRequest'
    { _cirObjectId = Nothing
    , _cirURL = Nothing
    , _cirElementProperties = Nothing
    }

-- | A user-supplied object ID. If you specify an ID, it must be unique among
-- all pages and page elements in the presentation. The ID must start with
-- an alphanumeric character or an underscore (matches regex
-- \`[a-zA-Z0-9_]\`); remaining characters may include those as well as a
-- hyphen or colon (matches regex \`[a-zA-Z0-9_-:]\`). The length of the ID
-- must not be less than 5 or greater than 50. If you don\'t specify an ID,
-- a unique one is generated.
cirObjectId :: Lens' CreateImageRequest (Maybe Text)
cirObjectId
  = lens _cirObjectId (\ s a -> s{_cirObjectId = a})

-- | The image URL. The image is fetched once at insertion time and a copy is
-- stored for display inside the presentation. Images must be less than
-- 50MB in size, cannot exceed 25 megapixels, and must be in either in PNG,
-- JPEG, or GIF format.
cirURL :: Lens' CreateImageRequest (Maybe Text)
cirURL = lens _cirURL (\ s a -> s{_cirURL = a})

-- | The element properties for the image. When the aspect ratio of the
-- provided size does not match the image aspect ratio, the image is scaled
-- and centered with respect to the size in order to maintain aspect ratio.
-- The provided transform is applied after this operation.
cirElementProperties :: Lens' CreateImageRequest (Maybe PageElementProperties)
cirElementProperties
  = lens _cirElementProperties
      (\ s a -> s{_cirElementProperties = a})

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

instance ToJSON CreateImageRequest where
        toJSON CreateImageRequest'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _cirObjectId,
                  ("url" .=) <$> _cirURL,
                  ("elementProperties" .=) <$> _cirElementProperties])

-- | Represents the styling that can be applied to a TextRun. If this text is
-- contained in a shape with a parent placeholder, then these text styles
-- may be inherited from the parent. Which text styles are inherited depend
-- on the nesting level of lists: * A text run in a paragraph that is not
-- in a list will inherit its text style from the the newline character in
-- the paragraph at the 0 nesting level of the list inside the parent
-- placeholder. * A text run in a paragraph that is in a list will inherit
-- its text style from the newline character in the paragraph at its
-- corresponding nesting level of the list inside the parent placeholder.
-- Inherited text styles are represented as unset fields in this message.
-- If text is contained in a shape without a parent placeholder, unsetting
-- these fields will revert the style to a value matching the defaults in
-- the Slides editor.
--
-- /See:/ 'textStyle' smart constructor.
data TextStyle = TextStyle'
    { _tsFontFamily      :: !(Maybe Text)
    , _tsLink            :: !(Maybe Link)
    , _tsBackgRoundColor :: !(Maybe OptionalColor)
    , _tsBaselineOffSet  :: !(Maybe TextStyleBaselineOffSet)
    , _tsForegRoundColor :: !(Maybe OptionalColor)
    , _tsFontSize        :: !(Maybe Dimension)
    , _tsSmallCaps       :: !(Maybe Bool)
    , _tsUnderline       :: !(Maybe Bool)
    , _tsItalic          :: !(Maybe Bool)
    , _tsBold            :: !(Maybe Bool)
    , _tsStrikethrough   :: !(Maybe Bool)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TextStyle' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tsFontFamily'
--
-- * 'tsLink'
--
-- * 'tsBackgRoundColor'
--
-- * 'tsBaselineOffSet'
--
-- * 'tsForegRoundColor'
--
-- * 'tsFontSize'
--
-- * 'tsSmallCaps'
--
-- * 'tsUnderline'
--
-- * 'tsItalic'
--
-- * 'tsBold'
--
-- * 'tsStrikethrough'
textStyle
    :: TextStyle
textStyle =
    TextStyle'
    { _tsFontFamily = Nothing
    , _tsLink = Nothing
    , _tsBackgRoundColor = Nothing
    , _tsBaselineOffSet = Nothing
    , _tsForegRoundColor = Nothing
    , _tsFontSize = Nothing
    , _tsSmallCaps = Nothing
    , _tsUnderline = Nothing
    , _tsItalic = Nothing
    , _tsBold = Nothing
    , _tsStrikethrough = Nothing
    }

-- | The font family of the text. The font family can be any font from the
-- Font menu in Slides or from [Google Fonts]
-- (https:\/\/fonts.google.com\/). If the font name is unrecognized, the
-- text is rendered in \`Arial\`. Some fonts can affect the weight of the
-- text. If an update request specifies values for both \`font_family\` and
-- \`bold\`, the explicitly-set \`bold\` value is used.
tsFontFamily :: Lens' TextStyle (Maybe Text)
tsFontFamily
  = lens _tsFontFamily (\ s a -> s{_tsFontFamily = a})

-- | The hyperlink destination of the text. If unset, there is no link. Links
-- are not inherited from parent text. Changing the link in an update
-- request causes some other changes to the text style of the range: * When
-- setting a link, the text foreground color will be set to
-- ThemeColorType.HYPERLINK and the text will be underlined. If these
-- fields are modified in the same request, those values will be used
-- instead of the link defaults. * Setting a link on a text range that
-- overlaps with an existing link will also update the existing link to
-- point to the new URL. * Links are not settable on newline characters. As
-- a result, setting a link on a text range that crosses a paragraph
-- boundary, such as \`\"ABC\\n123\"\`, will separate the newline
-- character(s) into their own text runs. The link will be applied
-- separately to the runs before and after the newline. * Removing a link
-- will update the text style of the range to match the style of the
-- preceding text (or the default text styles if the preceding text is
-- another link) unless different styles are being set in the same request.
tsLink :: Lens' TextStyle (Maybe Link)
tsLink = lens _tsLink (\ s a -> s{_tsLink = a})

-- | The background color of the text. If set, the color is either opaque or
-- transparent, depending on if the \`opaque_color\` field in it is set.
tsBackgRoundColor :: Lens' TextStyle (Maybe OptionalColor)
tsBackgRoundColor
  = lens _tsBackgRoundColor
      (\ s a -> s{_tsBackgRoundColor = a})

-- | The text\'s vertical offset from its normal position. Text with
-- \`SUPERSCRIPT\` or \`SUBSCRIPT\` baseline offsets is automatically
-- rendered in a smaller font size, computed based on the \`font_size\`
-- field. The \`font_size\` itself is not affected by changes in this
-- field.
tsBaselineOffSet :: Lens' TextStyle (Maybe TextStyleBaselineOffSet)
tsBaselineOffSet
  = lens _tsBaselineOffSet
      (\ s a -> s{_tsBaselineOffSet = a})

-- | The color of the text itself. If set, the color is either opaque or
-- transparent, depending on if the \`opaque_color\` field in it is set.
tsForegRoundColor :: Lens' TextStyle (Maybe OptionalColor)
tsForegRoundColor
  = lens _tsForegRoundColor
      (\ s a -> s{_tsForegRoundColor = a})

-- | The size of the text\'s font. When read, the \`font_size\` will
-- specified in points.
tsFontSize :: Lens' TextStyle (Maybe Dimension)
tsFontSize
  = lens _tsFontSize (\ s a -> s{_tsFontSize = a})

-- | Whether or not the text is in small capital letters.
tsSmallCaps :: Lens' TextStyle (Maybe Bool)
tsSmallCaps
  = lens _tsSmallCaps (\ s a -> s{_tsSmallCaps = a})

-- | Whether or not the text is underlined.
tsUnderline :: Lens' TextStyle (Maybe Bool)
tsUnderline
  = lens _tsUnderline (\ s a -> s{_tsUnderline = a})

-- | Whether or not the text is italicized.
tsItalic :: Lens' TextStyle (Maybe Bool)
tsItalic = lens _tsItalic (\ s a -> s{_tsItalic = a})

-- | Whether or not the text is bold.
tsBold :: Lens' TextStyle (Maybe Bool)
tsBold = lens _tsBold (\ s a -> s{_tsBold = a})

-- | Whether or not the text is struck through.
tsStrikethrough :: Lens' TextStyle (Maybe Bool)
tsStrikethrough
  = lens _tsStrikethrough
      (\ s a -> s{_tsStrikethrough = a})

instance FromJSON TextStyle where
        parseJSON
          = withObject "TextStyle"
              (\ o ->
                 TextStyle' <$>
                   (o .:? "fontFamily") <*> (o .:? "link") <*>
                     (o .:? "backgroundColor")
                     <*> (o .:? "baselineOffset")
                     <*> (o .:? "foregroundColor")
                     <*> (o .:? "fontSize")
                     <*> (o .:? "smallCaps")
                     <*> (o .:? "underline")
                     <*> (o .:? "italic")
                     <*> (o .:? "bold")
                     <*> (o .:? "strikethrough"))

instance ToJSON TextStyle where
        toJSON TextStyle'{..}
          = object
              (catMaybes
                 [("fontFamily" .=) <$> _tsFontFamily,
                  ("link" .=) <$> _tsLink,
                  ("backgroundColor" .=) <$> _tsBackgRoundColor,
                  ("baselineOffset" .=) <$> _tsBaselineOffSet,
                  ("foregroundColor" .=) <$> _tsForegRoundColor,
                  ("fontSize" .=) <$> _tsFontSize,
                  ("smallCaps" .=) <$> _tsSmallCaps,
                  ("underline" .=) <$> _tsUnderline,
                  ("italic" .=) <$> _tsItalic, ("bold" .=) <$> _tsBold,
                  ("strikethrough" .=) <$> _tsStrikethrough])

-- | A solid color fill. The page or page element is filled entirely with the
-- specified color value. If any field is unset, its value may be inherited
-- from a parent placeholder if it exists.
--
-- /See:/ 'solidFill' smart constructor.
data SolidFill = SolidFill'
    { _sfColor :: !(Maybe OpaqueColor)
    , _sfAlpha :: !(Maybe (Textual Double))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SolidFill' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sfColor'
--
-- * 'sfAlpha'
solidFill
    :: SolidFill
solidFill =
    SolidFill'
    { _sfColor = Nothing
    , _sfAlpha = Nothing
    }

-- | The color value of the solid fill.
sfColor :: Lens' SolidFill (Maybe OpaqueColor)
sfColor = lens _sfColor (\ s a -> s{_sfColor = a})

-- | The fraction of this \`color\` that should be applied to the pixel. That
-- is, the final pixel color is defined by the equation: pixel color =
-- alpha * (color) + (1.0 - alpha) * (background color) This means that a
-- value of 1.0 corresponds to a solid color, whereas a value of 0.0
-- corresponds to a completely transparent color.
sfAlpha :: Lens' SolidFill (Maybe Double)
sfAlpha
  = lens _sfAlpha (\ s a -> s{_sfAlpha = a}) .
      mapping _Coerce

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

instance ToJSON SolidFill where
        toJSON SolidFill'{..}
          = object
              (catMaybes
                 [("color" .=) <$> _sfColor,
                  ("alpha" .=) <$> _sfAlpha])

-- | Update the styling of text in a Shape or Table.
--
-- /See:/ 'updateTextStyleRequest' smart constructor.
data UpdateTextStyleRequest = UpdateTextStyleRequest'
    { _utsrStyle        :: !(Maybe TextStyle)
    , _utsrTextRange    :: !(Maybe Range)
    , _utsrObjectId     :: !(Maybe Text)
    , _utsrCellLocation :: !(Maybe TableCellLocation)
    , _utsrFields       :: !(Maybe FieldMask)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UpdateTextStyleRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'utsrStyle'
--
-- * 'utsrTextRange'
--
-- * 'utsrObjectId'
--
-- * 'utsrCellLocation'
--
-- * 'utsrFields'
updateTextStyleRequest
    :: UpdateTextStyleRequest
updateTextStyleRequest =
    UpdateTextStyleRequest'
    { _utsrStyle = Nothing
    , _utsrTextRange = Nothing
    , _utsrObjectId = Nothing
    , _utsrCellLocation = Nothing
    , _utsrFields = Nothing
    }

-- | The style(s) to set on the text. If the value for a particular style
-- matches that of the parent, that style will be set to inherit. Certain
-- text style changes may cause other changes meant to mirror the behavior
-- of the Slides editor. See the documentation of TextStyle for more
-- information.
utsrStyle :: Lens' UpdateTextStyleRequest (Maybe TextStyle)
utsrStyle
  = lens _utsrStyle (\ s a -> s{_utsrStyle = a})

-- | The range of text to style. The range may be extended to include
-- adjacent newlines. If the range fully contains a paragraph belonging to
-- a list, the paragraph\'s bullet is also updated with the matching text
-- style.
utsrTextRange :: Lens' UpdateTextStyleRequest (Maybe Range)
utsrTextRange
  = lens _utsrTextRange
      (\ s a -> s{_utsrTextRange = a})

-- | The object ID of the shape or table with the text to be styled.
utsrObjectId :: Lens' UpdateTextStyleRequest (Maybe Text)
utsrObjectId
  = lens _utsrObjectId (\ s a -> s{_utsrObjectId = a})

-- | The optional table cell location if the text to be styled is in a table
-- cell. If present, the object_id must refer to a table.
utsrCellLocation :: Lens' UpdateTextStyleRequest (Maybe TableCellLocation)
utsrCellLocation
  = lens _utsrCellLocation
      (\ s a -> s{_utsrCellLocation = a})

-- | The fields that should be updated. At least one field must be specified.
-- The root \`style\` is implied and should not be specified. A single
-- \`\"*\"\` can be used as short-hand for listing every field. For example
-- to update the text style to bold, set \`fields\` to \`\"bold\"\`. To
-- reset a property to its default value, include its field name in the
-- field mask but leave the field itself unset.
utsrFields :: Lens' UpdateTextStyleRequest (Maybe FieldMask)
utsrFields
  = lens _utsrFields (\ s a -> s{_utsrFields = a})

instance FromJSON UpdateTextStyleRequest where
        parseJSON
          = withObject "UpdateTextStyleRequest"
              (\ o ->
                 UpdateTextStyleRequest' <$>
                   (o .:? "style") <*> (o .:? "textRange") <*>
                     (o .:? "objectId")
                     <*> (o .:? "cellLocation")
                     <*> (o .:? "fields"))

instance ToJSON UpdateTextStyleRequest where
        toJSON UpdateTextStyleRequest'{..}
          = object
              (catMaybes
                 [("style" .=) <$> _utsrStyle,
                  ("textRange" .=) <$> _utsrTextRange,
                  ("objectId" .=) <$> _utsrObjectId,
                  ("cellLocation" .=) <$> _utsrCellLocation,
                  ("fields" .=) <$> _utsrFields])

-- | A recolor effect applied on an image.
--
-- /See:/ 'recolor' smart constructor.
newtype Recolor = Recolor'
    { _rRecolorStops :: Maybe [ColorStop]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Recolor' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rRecolorStops'
recolor
    :: Recolor
recolor =
    Recolor'
    { _rRecolorStops = Nothing
    }

-- | The recolor effect is represented by a gradient, which is a list of
-- color stops. This property is read-only.
rRecolorStops :: Lens' Recolor [ColorStop]
rRecolorStops
  = lens _rRecolorStops
      (\ s a -> s{_rRecolorStops = a})
      . _Default
      . _Coerce

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

instance ToJSON Recolor where
        toJSON Recolor'{..}
          = object
              (catMaybes [("recolorStops" .=) <$> _rRecolorStops])

-- | The properties of the Page. The page will inherit properties from the
-- parent page. Depending on the page type the hierarchy is defined in
-- either SlideProperties or LayoutProperties.
--
-- /See:/ 'pageProperties' smart constructor.
data PageProperties = PageProperties'
    { _ppPageBackgRoundFill :: !(Maybe PageBackgRoundFill)
    , _ppColorScheme        :: !(Maybe ColorScheme)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'PageProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ppPageBackgRoundFill'
--
-- * 'ppColorScheme'
pageProperties
    :: PageProperties
pageProperties =
    PageProperties'
    { _ppPageBackgRoundFill = Nothing
    , _ppColorScheme = Nothing
    }

-- | The background fill of the page. If unset, the background fill is
-- inherited from a parent page if it exists. If the page has no parent,
-- then the background fill defaults to the corresponding fill in the
-- Slides editor.
ppPageBackgRoundFill :: Lens' PageProperties (Maybe PageBackgRoundFill)
ppPageBackgRoundFill
  = lens _ppPageBackgRoundFill
      (\ s a -> s{_ppPageBackgRoundFill = a})

-- | The color scheme of the page. If unset, the color scheme is inherited
-- from a parent page. If the page has no parent, the color scheme uses a
-- default Slides color scheme. This field is read-only.
ppColorScheme :: Lens' PageProperties (Maybe ColorScheme)
ppColorScheme
  = lens _ppColorScheme
      (\ s a -> s{_ppColorScheme = a})

instance FromJSON PageProperties where
        parseJSON
          = withObject "PageProperties"
              (\ o ->
                 PageProperties' <$>
                   (o .:? "pageBackgroundFill") <*>
                     (o .:? "colorScheme"))

instance ToJSON PageProperties where
        toJSON PageProperties'{..}
          = object
              (catMaybes
                 [("pageBackgroundFill" .=) <$> _ppPageBackgRoundFill,
                  ("colorScheme" .=) <$> _ppColorScheme])

-- | The page background fill.
--
-- /See:/ 'pageBackgRoundFill' smart constructor.
data PageBackgRoundFill = PageBackgRoundFill'
    { _pbrfStretchedPictureFill :: !(Maybe StretchedPictureFill)
    , _pbrfSolidFill            :: !(Maybe SolidFill)
    , _pbrfPropertyState        :: !(Maybe PageBackgRoundFillPropertyState)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'PageBackgRoundFill' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pbrfStretchedPictureFill'
--
-- * 'pbrfSolidFill'
--
-- * 'pbrfPropertyState'
pageBackgRoundFill
    :: PageBackgRoundFill
pageBackgRoundFill =
    PageBackgRoundFill'
    { _pbrfStretchedPictureFill = Nothing
    , _pbrfSolidFill = Nothing
    , _pbrfPropertyState = Nothing
    }

-- | Stretched picture fill.
pbrfStretchedPictureFill :: Lens' PageBackgRoundFill (Maybe StretchedPictureFill)
pbrfStretchedPictureFill
  = lens _pbrfStretchedPictureFill
      (\ s a -> s{_pbrfStretchedPictureFill = a})

-- | Solid color fill.
pbrfSolidFill :: Lens' PageBackgRoundFill (Maybe SolidFill)
pbrfSolidFill
  = lens _pbrfSolidFill
      (\ s a -> s{_pbrfSolidFill = a})

-- | The background fill property state. Updating the the fill on a page will
-- implicitly update this field to \`RENDERED\`, unless another value is
-- specified in the same request. To have no fill on a page, set this field
-- to \`NOT_RENDERED\`. In this case, any other fill fields set in the same
-- request will be ignored.
pbrfPropertyState :: Lens' PageBackgRoundFill (Maybe PageBackgRoundFillPropertyState)
pbrfPropertyState
  = lens _pbrfPropertyState
      (\ s a -> s{_pbrfPropertyState = a})

instance FromJSON PageBackgRoundFill where
        parseJSON
          = withObject "PageBackgRoundFill"
              (\ o ->
                 PageBackgRoundFill' <$>
                   (o .:? "stretchedPictureFill") <*>
                     (o .:? "solidFill")
                     <*> (o .:? "propertyState"))

instance ToJSON PageBackgRoundFill where
        toJSON PageBackgRoundFill'{..}
          = object
              (catMaybes
                 [("stretchedPictureFill" .=) <$>
                    _pbrfStretchedPictureFill,
                  ("solidFill" .=) <$> _pbrfSolidFill,
                  ("propertyState" .=) <$> _pbrfPropertyState])

-- | Contains properties describing the look and feel of a list bullet at a
-- given level of nesting.
--
-- /See:/ 'nestingLevel' smart constructor.
newtype NestingLevel = NestingLevel'
    { _nlBulletStyle :: Maybe TextStyle
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NestingLevel' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nlBulletStyle'
nestingLevel
    :: NestingLevel
nestingLevel =
    NestingLevel'
    { _nlBulletStyle = Nothing
    }

-- | The style of a bullet at this level of nesting.
nlBulletStyle :: Lens' NestingLevel (Maybe TextStyle)
nlBulletStyle
  = lens _nlBulletStyle
      (\ s a -> s{_nlBulletStyle = a})

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

instance ToJSON NestingLevel where
        toJSON NestingLevel'{..}
          = object
              (catMaybes [("bulletStyle" .=) <$> _nlBulletStyle])

-- | A themeable solid color value.
--
-- /See:/ 'opaqueColor' smart constructor.
data OpaqueColor = OpaqueColor'
    { _ocThemeColor :: !(Maybe OpaqueColorThemeColor)
    , _ocRgbColor   :: !(Maybe RgbColor)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OpaqueColor' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ocThemeColor'
--
-- * 'ocRgbColor'
opaqueColor
    :: OpaqueColor
opaqueColor =
    OpaqueColor'
    { _ocThemeColor = Nothing
    , _ocRgbColor = Nothing
    }

-- | An opaque theme color.
ocThemeColor :: Lens' OpaqueColor (Maybe OpaqueColorThemeColor)
ocThemeColor
  = lens _ocThemeColor (\ s a -> s{_ocThemeColor = a})

-- | An opaque RGB color.
ocRgbColor :: Lens' OpaqueColor (Maybe RgbColor)
ocRgbColor
  = lens _ocRgbColor (\ s a -> s{_ocRgbColor = a})

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

instance ToJSON OpaqueColor where
        toJSON OpaqueColor'{..}
          = object
              (catMaybes
                 [("themeColor" .=) <$> _ocThemeColor,
                  ("rgbColor" .=) <$> _ocRgbColor])

-- | Creates a new slide.
--
-- /See:/ 'createSlideRequest' smart constructor.
data CreateSlideRequest = CreateSlideRequest'
    { _csrsObjectId             :: !(Maybe Text)
    , _csrsSlideLayoutReference :: !(Maybe LayoutReference)
    , _csrsInsertionIndex       :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateSlideRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'csrsObjectId'
--
-- * 'csrsSlideLayoutReference'
--
-- * 'csrsInsertionIndex'
createSlideRequest
    :: CreateSlideRequest
createSlideRequest =
    CreateSlideRequest'
    { _csrsObjectId = Nothing
    , _csrsSlideLayoutReference = Nothing
    , _csrsInsertionIndex = Nothing
    }

-- | A user-supplied object ID. If you specify an ID, it must be unique among
-- all pages and page elements in the presentation. The ID must start with
-- an alphanumeric character or an underscore (matches regex
-- \`[a-zA-Z0-9_]\`); remaining characters may include those as well as a
-- hyphen or colon (matches regex \`[a-zA-Z0-9_-:]\`). The length of the ID
-- must not be less than 5 or greater than 50. If you don\'t specify an ID,
-- a unique one is generated.
csrsObjectId :: Lens' CreateSlideRequest (Maybe Text)
csrsObjectId
  = lens _csrsObjectId (\ s a -> s{_csrsObjectId = a})

-- | Layout reference of the slide to be inserted, based on the *current
-- master*, which is one of the following: - The master of the previous
-- slide index. - The master of the first slide, if the insertion_index is
-- zero. - The first master in the presentation, if there are no slides. If
-- the LayoutReference is not found in the current master, a 400 bad
-- request error is returned. If you don\'t specify a layout reference,
-- then the new slide will use the predefined layout \`BLANK\`.
csrsSlideLayoutReference :: Lens' CreateSlideRequest (Maybe LayoutReference)
csrsSlideLayoutReference
  = lens _csrsSlideLayoutReference
      (\ s a -> s{_csrsSlideLayoutReference = a})

-- | The optional zero-based index indicating where to insert the slides. If
-- you don\'t specify an index, the new slide is created at the end.
csrsInsertionIndex :: Lens' CreateSlideRequest (Maybe Int32)
csrsInsertionIndex
  = lens _csrsInsertionIndex
      (\ s a -> s{_csrsInsertionIndex = a})
      . mapping _Coerce

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

instance ToJSON CreateSlideRequest where
        toJSON CreateSlideRequest'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _csrsObjectId,
                  ("slideLayoutReference" .=) <$>
                    _csrsSlideLayoutReference,
                  ("insertionIndex" .=) <$> _csrsInsertionIndex])

-- | A location of a single table cell within a table.
--
-- /See:/ 'tableCellLocation' smart constructor.
data TableCellLocation = TableCellLocation'
    { _tclColumnIndex :: !(Maybe (Textual Int32))
    , _tclRowIndex    :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TableCellLocation' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tclColumnIndex'
--
-- * 'tclRowIndex'
tableCellLocation
    :: TableCellLocation
tableCellLocation =
    TableCellLocation'
    { _tclColumnIndex = Nothing
    , _tclRowIndex = Nothing
    }

-- | The 0-based column index.
tclColumnIndex :: Lens' TableCellLocation (Maybe Int32)
tclColumnIndex
  = lens _tclColumnIndex
      (\ s a -> s{_tclColumnIndex = a})
      . mapping _Coerce

-- | The 0-based row index.
tclRowIndex :: Lens' TableCellLocation (Maybe Int32)
tclRowIndex
  = lens _tclRowIndex (\ s a -> s{_tclRowIndex = a}) .
      mapping _Coerce

instance FromJSON TableCellLocation where
        parseJSON
          = withObject "TableCellLocation"
              (\ o ->
                 TableCellLocation' <$>
                   (o .:? "columnIndex") <*> (o .:? "rowIndex"))

instance ToJSON TableCellLocation where
        toJSON TableCellLocation'{..}
          = object
              (catMaybes
                 [("columnIndex" .=) <$> _tclColumnIndex,
                  ("rowIndex" .=) <$> _tclRowIndex])

-- | Updates the position of slides in the presentation.
--
-- /See:/ 'updateSlidesPositionRequest' smart constructor.
data UpdateSlidesPositionRequest = UpdateSlidesPositionRequest'
    { _usprSlideObjectIds :: !(Maybe [Text])
    , _usprInsertionIndex :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UpdateSlidesPositionRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'usprSlideObjectIds'
--
-- * 'usprInsertionIndex'
updateSlidesPositionRequest
    :: UpdateSlidesPositionRequest
updateSlidesPositionRequest =
    UpdateSlidesPositionRequest'
    { _usprSlideObjectIds = Nothing
    , _usprInsertionIndex = Nothing
    }

-- | The IDs of the slides in the presentation that should be moved. The
-- slides in this list must be in existing presentation order, without
-- duplicates.
usprSlideObjectIds :: Lens' UpdateSlidesPositionRequest [Text]
usprSlideObjectIds
  = lens _usprSlideObjectIds
      (\ s a -> s{_usprSlideObjectIds = a})
      . _Default
      . _Coerce

-- | The index where the slides should be inserted, based on the slide
-- arrangement before the move takes place. Must be between zero and the
-- number of slides in the presentation, inclusive.
usprInsertionIndex :: Lens' UpdateSlidesPositionRequest (Maybe Int32)
usprInsertionIndex
  = lens _usprInsertionIndex
      (\ s a -> s{_usprInsertionIndex = a})
      . mapping _Coerce

instance FromJSON UpdateSlidesPositionRequest where
        parseJSON
          = withObject "UpdateSlidesPositionRequest"
              (\ o ->
                 UpdateSlidesPositionRequest' <$>
                   (o .:? "slideObjectIds" .!= mempty) <*>
                     (o .:? "insertionIndex"))

instance ToJSON UpdateSlidesPositionRequest where
        toJSON UpdateSlidesPositionRequest'{..}
          = object
              (catMaybes
                 [("slideObjectIds" .=) <$> _usprSlideObjectIds,
                  ("insertionIndex" .=) <$> _usprInsertionIndex])

-- | Replaces all shapes that match the given criteria with the provided
-- image.
--
-- /See:/ 'replaceAllShapesWithImageRequest' smart constructor.
data ReplaceAllShapesWithImageRequest = ReplaceAllShapesWithImageRequest'
    { _raswirContainsText  :: !(Maybe SubstringMatchCriteria)
    , _raswirImageURL      :: !(Maybe Text)
    , _raswirReplaceMethod :: !(Maybe ReplaceAllShapesWithImageRequestReplaceMethod)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ReplaceAllShapesWithImageRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'raswirContainsText'
--
-- * 'raswirImageURL'
--
-- * 'raswirReplaceMethod'
replaceAllShapesWithImageRequest
    :: ReplaceAllShapesWithImageRequest
replaceAllShapesWithImageRequest =
    ReplaceAllShapesWithImageRequest'
    { _raswirContainsText = Nothing
    , _raswirImageURL = Nothing
    , _raswirReplaceMethod = Nothing
    }

-- | If set, this request will replace all of the shapes that contain the
-- given text.
raswirContainsText :: Lens' ReplaceAllShapesWithImageRequest (Maybe SubstringMatchCriteria)
raswirContainsText
  = lens _raswirContainsText
      (\ s a -> s{_raswirContainsText = a})

-- | The image URL. The image is fetched once at insertion time and a copy is
-- stored for display inside the presentation. Images must be less than
-- 50MB in size, cannot exceed 25 megapixels, and must be in either in PNG,
-- JPEG, or GIF format.
raswirImageURL :: Lens' ReplaceAllShapesWithImageRequest (Maybe Text)
raswirImageURL
  = lens _raswirImageURL
      (\ s a -> s{_raswirImageURL = a})

-- | The replace method.
raswirReplaceMethod :: Lens' ReplaceAllShapesWithImageRequest (Maybe ReplaceAllShapesWithImageRequestReplaceMethod)
raswirReplaceMethod
  = lens _raswirReplaceMethod
      (\ s a -> s{_raswirReplaceMethod = a})

instance FromJSON ReplaceAllShapesWithImageRequest
         where
        parseJSON
          = withObject "ReplaceAllShapesWithImageRequest"
              (\ o ->
                 ReplaceAllShapesWithImageRequest' <$>
                   (o .:? "containsText") <*> (o .:? "imageUrl") <*>
                     (o .:? "replaceMethod"))

instance ToJSON ReplaceAllShapesWithImageRequest
         where
        toJSON ReplaceAllShapesWithImageRequest'{..}
          = object
              (catMaybes
                 [("containsText" .=) <$> _raswirContainsText,
                  ("imageUrl" .=) <$> _raswirImageURL,
                  ("replaceMethod" .=) <$> _raswirReplaceMethod])

-- | A visual element rendered on a page.
--
-- /See:/ 'pageElement' smart constructor.
data PageElement = PageElement'
    { _peTransform    :: !(Maybe AffineTransform)
    , _peImage        :: !(Maybe Image)
    , _peSize         :: !(Maybe Size)
    , _peSheetsChart  :: !(Maybe SheetsChart)
    , _peObjectId     :: !(Maybe Text)
    , _peLine         :: !(Maybe Line)
    , _peElementGroup :: !(Maybe Group)
    , _peVideo        :: !(Maybe Video)
    , _peWordArt      :: !(Maybe WordArt)
    , _peShape        :: !(Maybe Shape)
    , _peTitle        :: !(Maybe Text)
    , _peTable        :: !(Maybe Table)
    , _peDescription  :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'PageElement' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'peTransform'
--
-- * 'peImage'
--
-- * 'peSize'
--
-- * 'peSheetsChart'
--
-- * 'peObjectId'
--
-- * 'peLine'
--
-- * 'peElementGroup'
--
-- * 'peVideo'
--
-- * 'peWordArt'
--
-- * 'peShape'
--
-- * 'peTitle'
--
-- * 'peTable'
--
-- * 'peDescription'
pageElement
    :: PageElement
pageElement =
    PageElement'
    { _peTransform = Nothing
    , _peImage = Nothing
    , _peSize = Nothing
    , _peSheetsChart = Nothing
    , _peObjectId = Nothing
    , _peLine = Nothing
    , _peElementGroup = Nothing
    , _peVideo = Nothing
    , _peWordArt = Nothing
    , _peShape = Nothing
    , _peTitle = Nothing
    , _peTable = Nothing
    , _peDescription = Nothing
    }

-- | The transform of the page element.
peTransform :: Lens' PageElement (Maybe AffineTransform)
peTransform
  = lens _peTransform (\ s a -> s{_peTransform = a})

-- | An image page element.
peImage :: Lens' PageElement (Maybe Image)
peImage = lens _peImage (\ s a -> s{_peImage = a})

-- | The size of the page element.
peSize :: Lens' PageElement (Maybe Size)
peSize = lens _peSize (\ s a -> s{_peSize = a})

-- | A linked chart embedded from Google Sheets. Unlinked charts are
-- represented as images.
peSheetsChart :: Lens' PageElement (Maybe SheetsChart)
peSheetsChart
  = lens _peSheetsChart
      (\ s a -> s{_peSheetsChart = a})

-- | The object ID for this page element. Object IDs used by
-- google.apps.slides.v1.Page and google.apps.slides.v1.PageElement share
-- the same namespace.
peObjectId :: Lens' PageElement (Maybe Text)
peObjectId
  = lens _peObjectId (\ s a -> s{_peObjectId = a})

-- | A line page element.
peLine :: Lens' PageElement (Maybe Line)
peLine = lens _peLine (\ s a -> s{_peLine = a})

-- | A collection of page elements joined as a single unit.
peElementGroup :: Lens' PageElement (Maybe Group)
peElementGroup
  = lens _peElementGroup
      (\ s a -> s{_peElementGroup = a})

-- | A video page element.
peVideo :: Lens' PageElement (Maybe Video)
peVideo = lens _peVideo (\ s a -> s{_peVideo = a})

-- | A word art page element.
peWordArt :: Lens' PageElement (Maybe WordArt)
peWordArt
  = lens _peWordArt (\ s a -> s{_peWordArt = a})

-- | A generic shape.
peShape :: Lens' PageElement (Maybe Shape)
peShape = lens _peShape (\ s a -> s{_peShape = a})

-- | The title of the page element. Combined with description to display alt
-- text.
peTitle :: Lens' PageElement (Maybe Text)
peTitle = lens _peTitle (\ s a -> s{_peTitle = a})

-- | A table page element.
peTable :: Lens' PageElement (Maybe Table)
peTable = lens _peTable (\ s a -> s{_peTable = a})

-- | The description of the page element. Combined with title to display alt
-- text.
peDescription :: Lens' PageElement (Maybe Text)
peDescription
  = lens _peDescription
      (\ s a -> s{_peDescription = a})

instance FromJSON PageElement where
        parseJSON
          = withObject "PageElement"
              (\ o ->
                 PageElement' <$>
                   (o .:? "transform") <*> (o .:? "image") <*>
                     (o .:? "size")
                     <*> (o .:? "sheetsChart")
                     <*> (o .:? "objectId")
                     <*> (o .:? "line")
                     <*> (o .:? "elementGroup")
                     <*> (o .:? "video")
                     <*> (o .:? "wordArt")
                     <*> (o .:? "shape")
                     <*> (o .:? "title")
                     <*> (o .:? "table")
                     <*> (o .:? "description"))

instance ToJSON PageElement where
        toJSON PageElement'{..}
          = object
              (catMaybes
                 [("transform" .=) <$> _peTransform,
                  ("image" .=) <$> _peImage, ("size" .=) <$> _peSize,
                  ("sheetsChart" .=) <$> _peSheetsChart,
                  ("objectId" .=) <$> _peObjectId,
                  ("line" .=) <$> _peLine,
                  ("elementGroup" .=) <$> _peElementGroup,
                  ("video" .=) <$> _peVideo,
                  ("wordArt" .=) <$> _peWordArt,
                  ("shape" .=) <$> _peShape, ("title" .=) <$> _peTitle,
                  ("table" .=) <$> _peTable,
                  ("description" .=) <$> _peDescription])

-- | A color and position in a gradient band.
--
-- /See:/ 'colorStop' smart constructor.
data ColorStop = ColorStop'
    { _csColor    :: !(Maybe OpaqueColor)
    , _csAlpha    :: !(Maybe (Textual Double))
    , _csPosition :: !(Maybe (Textual Double))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ColorStop' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'csColor'
--
-- * 'csAlpha'
--
-- * 'csPosition'
colorStop
    :: ColorStop
colorStop =
    ColorStop'
    { _csColor = Nothing
    , _csAlpha = Nothing
    , _csPosition = Nothing
    }

-- | The color of the gradient stop.
csColor :: Lens' ColorStop (Maybe OpaqueColor)
csColor = lens _csColor (\ s a -> s{_csColor = a})

-- | The alpha value of this color in the gradient band. Defaults to 1.0,
-- fully opaque.
csAlpha :: Lens' ColorStop (Maybe Double)
csAlpha
  = lens _csAlpha (\ s a -> s{_csAlpha = a}) .
      mapping _Coerce

-- | The relative position of the color stop in the gradient band measured in
-- percentage. The value should be in the interval [0.0, 1.0].
csPosition :: Lens' ColorStop (Maybe Double)
csPosition
  = lens _csPosition (\ s a -> s{_csPosition = a}) .
      mapping _Coerce

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

instance ToJSON ColorStop where
        toJSON ColorStop'{..}
          = object
              (catMaybes
                 [("color" .=) <$> _csColor,
                  ("alpha" .=) <$> _csAlpha,
                  ("position" .=) <$> _csPosition])

-- | Deletes an object, either pages or page elements, from the presentation.
--
-- /See:/ 'deleteObjectRequest' smart constructor.
newtype DeleteObjectRequest = DeleteObjectRequest'
    { _dObjectId :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DeleteObjectRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dObjectId'
deleteObjectRequest
    :: DeleteObjectRequest
deleteObjectRequest =
    DeleteObjectRequest'
    { _dObjectId = Nothing
    }

-- | The object ID of the page or page element to delete. If after a delete
-- operation a group contains only 1 or no page elements, the group is also
-- deleted. If a placeholder is deleted on a layout, any empty inheriting
-- shapes are also deleted.
dObjectId :: Lens' DeleteObjectRequest (Maybe Text)
dObjectId
  = lens _dObjectId (\ s a -> s{_dObjectId = a})

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

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

-- | The result of creating a slide.
--
-- /See:/ 'createSlideResponse' smart constructor.
newtype CreateSlideResponse = CreateSlideResponse'
    { _ccObjectId :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateSlideResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ccObjectId'
createSlideResponse
    :: CreateSlideResponse
createSlideResponse =
    CreateSlideResponse'
    { _ccObjectId = Nothing
    }

-- | The object ID of the created slide.
ccObjectId :: Lens' CreateSlideResponse (Maybe Text)
ccObjectId
  = lens _ccObjectId (\ s a -> s{_ccObjectId = a})

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

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

-- | The palette of predefined colors for a page.
--
-- /See:/ 'colorScheme' smart constructor.
newtype ColorScheme = ColorScheme'
    { _csColors :: Maybe [ThemeColorPair]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ColorScheme' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'csColors'
colorScheme
    :: ColorScheme
colorScheme =
    ColorScheme'
    { _csColors = Nothing
    }

-- | The ThemeColorType and corresponding concrete color pairs.
csColors :: Lens' ColorScheme [ThemeColorPair]
csColors
  = lens _csColors (\ s a -> s{_csColors = a}) .
      _Default
      . _Coerce

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

instance ToJSON ColorScheme where
        toJSON ColorScheme'{..}
          = object (catMaybes [("colors" .=) <$> _csColors])

-- | Properties and contents of each table cell.
--
-- /See:/ 'tableCell' smart constructor.
data TableCell = TableCell'
    { _tcColumnSpan          :: !(Maybe (Textual Int32))
    , _tcLocation            :: !(Maybe TableCellLocation)
    , _tcText                :: !(Maybe TextContent)
    , _tcRowSpan             :: !(Maybe (Textual Int32))
    , _tcTableCellProperties :: !(Maybe TableCellProperties)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TableCell' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tcColumnSpan'
--
-- * 'tcLocation'
--
-- * 'tcText'
--
-- * 'tcRowSpan'
--
-- * 'tcTableCellProperties'
tableCell
    :: TableCell
tableCell =
    TableCell'
    { _tcColumnSpan = Nothing
    , _tcLocation = Nothing
    , _tcText = Nothing
    , _tcRowSpan = Nothing
    , _tcTableCellProperties = Nothing
    }

-- | Column span of the cell.
tcColumnSpan :: Lens' TableCell (Maybe Int32)
tcColumnSpan
  = lens _tcColumnSpan (\ s a -> s{_tcColumnSpan = a})
      . mapping _Coerce

-- | The location of the cell within the table.
tcLocation :: Lens' TableCell (Maybe TableCellLocation)
tcLocation
  = lens _tcLocation (\ s a -> s{_tcLocation = a})

-- | The text content of the cell.
tcText :: Lens' TableCell (Maybe TextContent)
tcText = lens _tcText (\ s a -> s{_tcText = a})

-- | Row span of the cell.
tcRowSpan :: Lens' TableCell (Maybe Int32)
tcRowSpan
  = lens _tcRowSpan (\ s a -> s{_tcRowSpan = a}) .
      mapping _Coerce

-- | The properties of the table cell.
tcTableCellProperties :: Lens' TableCell (Maybe TableCellProperties)
tcTableCellProperties
  = lens _tcTableCellProperties
      (\ s a -> s{_tcTableCellProperties = a})

instance FromJSON TableCell where
        parseJSON
          = withObject "TableCell"
              (\ o ->
                 TableCell' <$>
                   (o .:? "columnSpan") <*> (o .:? "location") <*>
                     (o .:? "text")
                     <*> (o .:? "rowSpan")
                     <*> (o .:? "tableCellProperties"))

instance ToJSON TableCell where
        toJSON TableCell'{..}
          = object
              (catMaybes
                 [("columnSpan" .=) <$> _tcColumnSpan,
                  ("location" .=) <$> _tcLocation,
                  ("text" .=) <$> _tcText,
                  ("rowSpan" .=) <$> _tcRowSpan,
                  ("tableCellProperties" .=) <$>
                    _tcTableCellProperties])

-- | A map of nesting levels to the properties of bullets at the associated
-- level. A list has at most nine levels of nesting, so the possible values
-- for the keys of this map are 0 through 8, inclusive.
--
-- /See:/ 'listNestingLevel' smart constructor.
newtype ListNestingLevel = ListNestingLevel'
    { _lnlAddtional :: HashMap Text NestingLevel
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ListNestingLevel' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lnlAddtional'
listNestingLevel
    :: HashMap Text NestingLevel -- ^ 'lnlAddtional'
    -> ListNestingLevel
listNestingLevel pLnlAddtional_ =
    ListNestingLevel'
    { _lnlAddtional = _Coerce # pLnlAddtional_
    }

lnlAddtional :: Lens' ListNestingLevel (HashMap Text NestingLevel)
lnlAddtional
  = lens _lnlAddtional (\ s a -> s{_lnlAddtional = a})
      . _Coerce

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

instance ToJSON ListNestingLevel where
        toJSON = toJSON . _lnlAddtional

-- | The outline of a PageElement. If these fields are unset, they may be
-- inherited from a parent placeholder if it exists. If there is no parent,
-- the fields will default to the value used for new page elements created
-- in the Slides editor, which may depend on the page element kind.
--
-- /See:/ 'outline' smart constructor.
data Outline = Outline'
    { _oOutlineFill   :: !(Maybe OutlineFill)
    , _oWeight        :: !(Maybe Dimension)
    , _oDashStyle     :: !(Maybe OutlineDashStyle)
    , _oPropertyState :: !(Maybe OutlinePropertyState)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Outline' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oOutlineFill'
--
-- * 'oWeight'
--
-- * 'oDashStyle'
--
-- * 'oPropertyState'
outline
    :: Outline
outline =
    Outline'
    { _oOutlineFill = Nothing
    , _oWeight = Nothing
    , _oDashStyle = Nothing
    , _oPropertyState = Nothing
    }

-- | The fill of the outline.
oOutlineFill :: Lens' Outline (Maybe OutlineFill)
oOutlineFill
  = lens _oOutlineFill (\ s a -> s{_oOutlineFill = a})

-- | The thickness of the outline.
oWeight :: Lens' Outline (Maybe Dimension)
oWeight = lens _oWeight (\ s a -> s{_oWeight = a})

-- | The dash style of the outline.
oDashStyle :: Lens' Outline (Maybe OutlineDashStyle)
oDashStyle
  = lens _oDashStyle (\ s a -> s{_oDashStyle = a})

-- | The outline property state. Updating the the outline on a page element
-- will implicitly update this field to\`RENDERED\`, unless another value
-- is specified in the same request. To have no outline on a page element,
-- set this field to \`NOT_RENDERED\`. In this case, any other outline
-- fields set in the same request will be ignored.
oPropertyState :: Lens' Outline (Maybe OutlinePropertyState)
oPropertyState
  = lens _oPropertyState
      (\ s a -> s{_oPropertyState = a})

instance FromJSON Outline where
        parseJSON
          = withObject "Outline"
              (\ o ->
                 Outline' <$>
                   (o .:? "outlineFill") <*> (o .:? "weight") <*>
                     (o .:? "dashStyle")
                     <*> (o .:? "propertyState"))

instance ToJSON Outline where
        toJSON Outline'{..}
          = object
              (catMaybes
                 [("outlineFill" .=) <$> _oOutlineFill,
                  ("weight" .=) <$> _oWeight,
                  ("dashStyle" .=) <$> _oDashStyle,
                  ("propertyState" .=) <$> _oPropertyState])

-- | Update the properties of a Video.
--
-- /See:/ 'updateVideoPropertiesRequest' smart constructor.
data UpdateVideoPropertiesRequest = UpdateVideoPropertiesRequest'
    { _uvprObjectId        :: !(Maybe Text)
    , _uvprVideoProperties :: !(Maybe VideoProperties)
    , _uvprFields          :: !(Maybe FieldMask)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UpdateVideoPropertiesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'uvprObjectId'
--
-- * 'uvprVideoProperties'
--
-- * 'uvprFields'
updateVideoPropertiesRequest
    :: UpdateVideoPropertiesRequest
updateVideoPropertiesRequest =
    UpdateVideoPropertiesRequest'
    { _uvprObjectId = Nothing
    , _uvprVideoProperties = Nothing
    , _uvprFields = Nothing
    }

-- | The object ID of the video the updates are applied to.
uvprObjectId :: Lens' UpdateVideoPropertiesRequest (Maybe Text)
uvprObjectId
  = lens _uvprObjectId (\ s a -> s{_uvprObjectId = a})

-- | The video properties to update.
uvprVideoProperties :: Lens' UpdateVideoPropertiesRequest (Maybe VideoProperties)
uvprVideoProperties
  = lens _uvprVideoProperties
      (\ s a -> s{_uvprVideoProperties = a})

-- | The fields that should be updated. At least one field must be specified.
-- The root \`videoProperties\` is implied and should not be specified. A
-- single \`\"*\"\` can be used as short-hand for listing every field. For
-- example to update the video outline color, set \`fields\` to
-- \`\"outline.outlineFill.solidFill.color\"\`. To reset a property to its
-- default value, include its field name in the field mask but leave the
-- field itself unset.
uvprFields :: Lens' UpdateVideoPropertiesRequest (Maybe FieldMask)
uvprFields
  = lens _uvprFields (\ s a -> s{_uvprFields = a})

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

instance ToJSON UpdateVideoPropertiesRequest where
        toJSON UpdateVideoPropertiesRequest'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _uvprObjectId,
                  ("videoProperties" .=) <$> _uvprVideoProperties,
                  ("fields" .=) <$> _uvprFields])

-- | The properties of the Video.
--
-- /See:/ 'videoProperties' smart constructor.
newtype VideoProperties = VideoProperties'
    { _vpOutline :: Maybe Outline
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VideoProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vpOutline'
videoProperties
    :: VideoProperties
videoProperties =
    VideoProperties'
    { _vpOutline = Nothing
    }

-- | The outline of the video. The default outline matches the defaults for
-- new videos created in the Slides editor.
vpOutline :: Lens' VideoProperties (Maybe Outline)
vpOutline
  = lens _vpOutline (\ s a -> s{_vpOutline = a})

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

instance ToJSON VideoProperties where
        toJSON VideoProperties'{..}
          = object (catMaybes [("outline" .=) <$> _vpOutline])

-- | The result of creating an image.
--
-- /See:/ 'createImageResponse' smart constructor.
newtype CreateImageResponse = CreateImageResponse'
    { _ciriObjectId :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateImageResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ciriObjectId'
createImageResponse
    :: CreateImageResponse
createImageResponse =
    CreateImageResponse'
    { _ciriObjectId = Nothing
    }

-- | The object ID of the created image.
ciriObjectId :: Lens' CreateImageResponse (Maybe Text)
ciriObjectId
  = lens _ciriObjectId (\ s a -> s{_ciriObjectId = a})

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

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

-- | A TextElement describes the content of a range of indices in the text
-- content of a Shape or TableCell.
--
-- /See:/ 'textElement' smart constructor.
data TextElement = TextElement'
    { _teParagraphMarker :: !(Maybe ParagraphMarker)
    , _teAutoText        :: !(Maybe AutoText)
    , _teEndIndex        :: !(Maybe (Textual Int32))
    , _teTextRun         :: !(Maybe TextRun)
    , _teStartIndex      :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TextElement' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'teParagraphMarker'
--
-- * 'teAutoText'
--
-- * 'teEndIndex'
--
-- * 'teTextRun'
--
-- * 'teStartIndex'
textElement
    :: TextElement
textElement =
    TextElement'
    { _teParagraphMarker = Nothing
    , _teAutoText = Nothing
    , _teEndIndex = Nothing
    , _teTextRun = Nothing
    , _teStartIndex = Nothing
    }

-- | A marker representing the beginning of a new paragraph. The
-- \`start_index\` and \`end_index\` of this TextElement represent the
-- range of the paragraph. Other TextElements with an index range contained
-- inside this paragraph\'s range are considered to be part of this
-- paragraph. The range of indices of two separate paragraphs will never
-- overlap.
teParagraphMarker :: Lens' TextElement (Maybe ParagraphMarker)
teParagraphMarker
  = lens _teParagraphMarker
      (\ s a -> s{_teParagraphMarker = a})

-- | A TextElement representing a spot in the text that is dynamically
-- replaced with content that can change over time.
teAutoText :: Lens' TextElement (Maybe AutoText)
teAutoText
  = lens _teAutoText (\ s a -> s{_teAutoText = a})

-- | The zero-based end index of this text element, exclusive, in Unicode
-- code units.
teEndIndex :: Lens' TextElement (Maybe Int32)
teEndIndex
  = lens _teEndIndex (\ s a -> s{_teEndIndex = a}) .
      mapping _Coerce

-- | A TextElement representing a run of text where all of the characters in
-- the run have the same TextStyle. The \`start_index\` and \`end_index\`
-- of TextRuns will always be fully contained in the index range of a
-- single \`paragraph_marker\` TextElement. In other words, a TextRun will
-- never span multiple paragraphs.
teTextRun :: Lens' TextElement (Maybe TextRun)
teTextRun
  = lens _teTextRun (\ s a -> s{_teTextRun = a})

-- | The zero-based start index of this text element, in Unicode code units.
teStartIndex :: Lens' TextElement (Maybe Int32)
teStartIndex
  = lens _teStartIndex (\ s a -> s{_teStartIndex = a})
      . mapping _Coerce

instance FromJSON TextElement where
        parseJSON
          = withObject "TextElement"
              (\ o ->
                 TextElement' <$>
                   (o .:? "paragraphMarker") <*> (o .:? "autoText") <*>
                     (o .:? "endIndex")
                     <*> (o .:? "textRun")
                     <*> (o .:? "startIndex"))

instance ToJSON TextElement where
        toJSON TextElement'{..}
          = object
              (catMaybes
                 [("paragraphMarker" .=) <$> _teParagraphMarker,
                  ("autoText" .=) <$> _teAutoText,
                  ("endIndex" .=) <$> _teEndIndex,
                  ("textRun" .=) <$> _teTextRun,
                  ("startIndex" .=) <$> _teStartIndex])

-- | Inserts text into a shape or a table cell.
--
-- /See:/ 'insertTextRequest' smart constructor.
data InsertTextRequest = InsertTextRequest'
    { _itrText           :: !(Maybe Text)
    , _itrObjectId       :: !(Maybe Text)
    , _itrInsertionIndex :: !(Maybe (Textual Int32))
    , _itrCellLocation   :: !(Maybe TableCellLocation)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InsertTextRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'itrText'
--
-- * 'itrObjectId'
--
-- * 'itrInsertionIndex'
--
-- * 'itrCellLocation'
insertTextRequest
    :: InsertTextRequest
insertTextRequest =
    InsertTextRequest'
    { _itrText = Nothing
    , _itrObjectId = Nothing
    , _itrInsertionIndex = Nothing
    , _itrCellLocation = Nothing
    }

-- | The text to be inserted. Inserting a newline character will implicitly
-- create a new ParagraphMarker at that index. The paragraph style of the
-- new paragraph will be copied from the paragraph at the current insertion
-- index, including lists and bullets. Text styles for inserted text will
-- be determined automatically, generally preserving the styling of
-- neighboring text. In most cases, the text will be added to the TextRun
-- that exists at the insertion index. Some control characters
-- (U+0000-U+0008, U+000C-U+001F) and characters from the Unicode Basic
-- Multilingual Plane Private Use Area (U+E000-U+F8FF) will be stripped out
-- of the inserted text.
itrText :: Lens' InsertTextRequest (Maybe Text)
itrText = lens _itrText (\ s a -> s{_itrText = a})

-- | The object ID of the shape or table where the text will be inserted.
itrObjectId :: Lens' InsertTextRequest (Maybe Text)
itrObjectId
  = lens _itrObjectId (\ s a -> s{_itrObjectId = a})

-- | The index where the text will be inserted, in Unicode code units, based
-- on TextElement indexes. The index is zero-based and is computed from the
-- start of the string. The index may be adjusted to prevent insertions
-- inside Unicode grapheme clusters. In these cases, the text will be
-- inserted immediately after the grapheme cluster.
itrInsertionIndex :: Lens' InsertTextRequest (Maybe Int32)
itrInsertionIndex
  = lens _itrInsertionIndex
      (\ s a -> s{_itrInsertionIndex = a})
      . mapping _Coerce

-- | The optional table cell location if the text is to be inserted into a
-- table cell. If present, the object_id must refer to a table.
itrCellLocation :: Lens' InsertTextRequest (Maybe TableCellLocation)
itrCellLocation
  = lens _itrCellLocation
      (\ s a -> s{_itrCellLocation = a})

instance FromJSON InsertTextRequest where
        parseJSON
          = withObject "InsertTextRequest"
              (\ o ->
                 InsertTextRequest' <$>
                   (o .:? "text") <*> (o .:? "objectId") <*>
                     (o .:? "insertionIndex")
                     <*> (o .:? "cellLocation"))

instance ToJSON InsertTextRequest where
        toJSON InsertTextRequest'{..}
          = object
              (catMaybes
                 [("text" .=) <$> _itrText,
                  ("objectId" .=) <$> _itrObjectId,
                  ("insertionIndex" .=) <$> _itrInsertionIndex,
                  ("cellLocation" .=) <$> _itrCellLocation])

-- | Creates a line.
--
-- /See:/ 'createLineRequest' smart constructor.
data CreateLineRequest = CreateLineRequest'
    { _clrlObjectId          :: !(Maybe Text)
    , _clrlLineCategory      :: !(Maybe CreateLineRequestLineCategory)
    , _clrlElementProperties :: !(Maybe PageElementProperties)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateLineRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'clrlObjectId'
--
-- * 'clrlLineCategory'
--
-- * 'clrlElementProperties'
createLineRequest
    :: CreateLineRequest
createLineRequest =
    CreateLineRequest'
    { _clrlObjectId = Nothing
    , _clrlLineCategory = Nothing
    , _clrlElementProperties = Nothing
    }

-- | A user-supplied object ID. If you specify an ID, it must be unique among
-- all pages and page elements in the presentation. The ID must start with
-- an alphanumeric character or an underscore (matches regex
-- \`[a-zA-Z0-9_]\`); remaining characters may include those as well as a
-- hyphen or colon (matches regex \`[a-zA-Z0-9_-:]\`). The length of the ID
-- must not be less than 5 or greater than 50. If you don\'t specify an ID,
-- a unique one is generated.
clrlObjectId :: Lens' CreateLineRequest (Maybe Text)
clrlObjectId
  = lens _clrlObjectId (\ s a -> s{_clrlObjectId = a})

-- | The category of line to be created.
clrlLineCategory :: Lens' CreateLineRequest (Maybe CreateLineRequestLineCategory)
clrlLineCategory
  = lens _clrlLineCategory
      (\ s a -> s{_clrlLineCategory = a})

-- | The element properties for the line.
clrlElementProperties :: Lens' CreateLineRequest (Maybe PageElementProperties)
clrlElementProperties
  = lens _clrlElementProperties
      (\ s a -> s{_clrlElementProperties = a})

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

instance ToJSON CreateLineRequest where
        toJSON CreateLineRequest'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _clrlObjectId,
                  ("lineCategory" .=) <$> _clrlLineCategory,
                  ("elementProperties" .=) <$> _clrlElementProperties])

-- | The placeholder information that uniquely identifies a placeholder
-- shape.
--
-- /See:/ 'placeholder' smart constructor.
data Placeholder = Placeholder'
    { _pParentObjectId :: !(Maybe Text)
    , _pType           :: !(Maybe PlaceholderType)
    , _pIndex          :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Placeholder' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pParentObjectId'
--
-- * 'pType'
--
-- * 'pIndex'
placeholder
    :: Placeholder
placeholder =
    Placeholder'
    { _pParentObjectId = Nothing
    , _pType = Nothing
    , _pIndex = Nothing
    }

-- | The object ID of this shape\'s parent placeholder. If unset, the parent
-- placeholder shape does not exist, so the shape does not inherit
-- properties from any other shape.
pParentObjectId :: Lens' Placeholder (Maybe Text)
pParentObjectId
  = lens _pParentObjectId
      (\ s a -> s{_pParentObjectId = a})

-- | The type of the placeholder.
pType :: Lens' Placeholder (Maybe PlaceholderType)
pType = lens _pType (\ s a -> s{_pType = a})

-- | The index of the placeholder. If the same placeholder types are the
-- present in the same page, they would have different index values.
pIndex :: Lens' Placeholder (Maybe Int32)
pIndex
  = lens _pIndex (\ s a -> s{_pIndex = a}) .
      mapping _Coerce

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

instance ToJSON Placeholder where
        toJSON Placeholder'{..}
          = object
              (catMaybes
                 [("parentObjectId" .=) <$> _pParentObjectId,
                  ("type" .=) <$> _pType, ("index" .=) <$> _pIndex])

-- | The properties of Page are only relevant for pages with page_type
-- LAYOUT.
--
-- /See:/ 'layoutProperties' smart constructor.
data LayoutProperties = LayoutProperties'
    { _lpMasterObjectId :: !(Maybe Text)
    , _lpName           :: !(Maybe Text)
    , _lpDisplayName    :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LayoutProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lpMasterObjectId'
--
-- * 'lpName'
--
-- * 'lpDisplayName'
layoutProperties
    :: LayoutProperties
layoutProperties =
    LayoutProperties'
    { _lpMasterObjectId = Nothing
    , _lpName = Nothing
    , _lpDisplayName = Nothing
    }

-- | The object ID of the master that this layout is based on.
lpMasterObjectId :: Lens' LayoutProperties (Maybe Text)
lpMasterObjectId
  = lens _lpMasterObjectId
      (\ s a -> s{_lpMasterObjectId = a})

-- | The name of the layout.
lpName :: Lens' LayoutProperties (Maybe Text)
lpName = lens _lpName (\ s a -> s{_lpName = a})

-- | The human readable name of the layout in the presentation\'s locale.
lpDisplayName :: Lens' LayoutProperties (Maybe Text)
lpDisplayName
  = lens _lpDisplayName
      (\ s a -> s{_lpDisplayName = a})

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

instance ToJSON LayoutProperties where
        toJSON LayoutProperties'{..}
          = object
              (catMaybes
                 [("masterObjectId" .=) <$> _lpMasterObjectId,
                  ("name" .=) <$> _lpName,
                  ("displayName" .=) <$> _lpDisplayName])

-- | Update the properties of a Shape.
--
-- /See:/ 'updateShapePropertiesRequest' smart constructor.
data UpdateShapePropertiesRequest = UpdateShapePropertiesRequest'
    { _usprObjectId        :: !(Maybe Text)
    , _usprShapeProperties :: !(Maybe ShapeProperties)
    , _usprFields          :: !(Maybe FieldMask)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UpdateShapePropertiesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'usprObjectId'
--
-- * 'usprShapeProperties'
--
-- * 'usprFields'
updateShapePropertiesRequest
    :: UpdateShapePropertiesRequest
updateShapePropertiesRequest =
    UpdateShapePropertiesRequest'
    { _usprObjectId = Nothing
    , _usprShapeProperties = Nothing
    , _usprFields = Nothing
    }

-- | The object ID of the shape the updates are applied to.
usprObjectId :: Lens' UpdateShapePropertiesRequest (Maybe Text)
usprObjectId
  = lens _usprObjectId (\ s a -> s{_usprObjectId = a})

-- | The shape properties to update.
usprShapeProperties :: Lens' UpdateShapePropertiesRequest (Maybe ShapeProperties)
usprShapeProperties
  = lens _usprShapeProperties
      (\ s a -> s{_usprShapeProperties = a})

-- | The fields that should be updated. At least one field must be specified.
-- The root \`shapeProperties\` is implied and should not be specified. A
-- single \`\"*\"\` can be used as short-hand for listing every field. For
-- example to update the shape background solid fill color, set \`fields\`
-- to \`\"shapeBackgroundFill.solidFill.color\"\`. To reset a property to
-- its default value, include its field name in the field mask but leave
-- the field itself unset.
usprFields :: Lens' UpdateShapePropertiesRequest (Maybe FieldMask)
usprFields
  = lens _usprFields (\ s a -> s{_usprFields = a})

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

instance ToJSON UpdateShapePropertiesRequest where
        toJSON UpdateShapePropertiesRequest'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _usprObjectId,
                  ("shapeProperties" .=) <$> _usprShapeProperties,
                  ("fields" .=) <$> _usprFields])

-- | A PageElement kind representing a table.
--
-- /See:/ 'table' smart constructor.
data Table = Table'
    { _tTableRows    :: !(Maybe [TableRow])
    , _tRows         :: !(Maybe (Textual Int32))
    , _tColumns      :: !(Maybe (Textual Int32))
    , _tTableColumns :: !(Maybe [TableColumnProperties])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Table' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tTableRows'
--
-- * 'tRows'
--
-- * 'tColumns'
--
-- * 'tTableColumns'
table
    :: Table
table =
    Table'
    { _tTableRows = Nothing
    , _tRows = Nothing
    , _tColumns = Nothing
    , _tTableColumns = Nothing
    }

-- | Properties and contents of each row. Cells that span multiple rows are
-- contained in only one of these rows and have a row_span greater than 1.
tTableRows :: Lens' Table [TableRow]
tTableRows
  = lens _tTableRows (\ s a -> s{_tTableRows = a}) .
      _Default
      . _Coerce

-- | Number of rows in the table.
tRows :: Lens' Table (Maybe Int32)
tRows
  = lens _tRows (\ s a -> s{_tRows = a}) .
      mapping _Coerce

-- | Number of columns in the table.
tColumns :: Lens' Table (Maybe Int32)
tColumns
  = lens _tColumns (\ s a -> s{_tColumns = a}) .
      mapping _Coerce

-- | Properties of each column.
tTableColumns :: Lens' Table [TableColumnProperties]
tTableColumns
  = lens _tTableColumns
      (\ s a -> s{_tTableColumns = a})
      . _Default
      . _Coerce

instance FromJSON Table where
        parseJSON
          = withObject "Table"
              (\ o ->
                 Table' <$>
                   (o .:? "tableRows" .!= mempty) <*> (o .:? "rows") <*>
                     (o .:? "columns")
                     <*> (o .:? "tableColumns" .!= mempty))

instance ToJSON Table where
        toJSON Table'{..}
          = object
              (catMaybes
                 [("tableRows" .=) <$> _tTableRows,
                  ("rows" .=) <$> _tRows, ("columns" .=) <$> _tColumns,
                  ("tableColumns" .=) <$> _tTableColumns])

-- | The properties of a Shape. If the shape is a placeholder shape as
-- determined by the placeholder field, then these properties may be
-- inherited from a parent placeholder shape. Determining the rendered
-- value of the property depends on the corresponding property_state field
-- value.
--
-- /See:/ 'shapeProperties' smart constructor.
data ShapeProperties = ShapeProperties'
    { _spLink                :: !(Maybe Link)
    , _spShadow              :: !(Maybe Shadow)
    , _spOutline             :: !(Maybe Outline)
    , _spShapeBackgRoundFill :: !(Maybe ShapeBackgRoundFill)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ShapeProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'spLink'
--
-- * 'spShadow'
--
-- * 'spOutline'
--
-- * 'spShapeBackgRoundFill'
shapeProperties
    :: ShapeProperties
shapeProperties =
    ShapeProperties'
    { _spLink = Nothing
    , _spShadow = Nothing
    , _spOutline = Nothing
    , _spShapeBackgRoundFill = Nothing
    }

-- | The hyperlink destination of the shape. If unset, there is no link.
-- Links are not inherited from parent placeholders.
spLink :: Lens' ShapeProperties (Maybe Link)
spLink = lens _spLink (\ s a -> s{_spLink = a})

-- | The shadow properties of the shape. If unset, the shadow is inherited
-- from a parent placeholder if it exists. If the shape has no parent, then
-- the default shadow matches the defaults for new shapes created in the
-- Slides editor. This property is read-only.
spShadow :: Lens' ShapeProperties (Maybe Shadow)
spShadow = lens _spShadow (\ s a -> s{_spShadow = a})

-- | The outline of the shape. If unset, the outline is inherited from a
-- parent placeholder if it exists. If the shape has no parent, then the
-- default outline depends on the shape type, matching the defaults for new
-- shapes created in the Slides editor.
spOutline :: Lens' ShapeProperties (Maybe Outline)
spOutline
  = lens _spOutline (\ s a -> s{_spOutline = a})

-- | The background fill of the shape. If unset, the background fill is
-- inherited from a parent placeholder if it exists. If the shape has no
-- parent, then the default background fill depends on the shape type,
-- matching the defaults for new shapes created in the Slides editor.
spShapeBackgRoundFill :: Lens' ShapeProperties (Maybe ShapeBackgRoundFill)
spShapeBackgRoundFill
  = lens _spShapeBackgRoundFill
      (\ s a -> s{_spShapeBackgRoundFill = a})

instance FromJSON ShapeProperties where
        parseJSON
          = withObject "ShapeProperties"
              (\ o ->
                 ShapeProperties' <$>
                   (o .:? "link") <*> (o .:? "shadow") <*>
                     (o .:? "outline")
                     <*> (o .:? "shapeBackgroundFill"))

instance ToJSON ShapeProperties where
        toJSON ShapeProperties'{..}
          = object
              (catMaybes
                 [("link" .=) <$> _spLink,
                  ("shadow" .=) <$> _spShadow,
                  ("outline" .=) <$> _spOutline,
                  ("shapeBackgroundFill" .=) <$>
                    _spShapeBackgRoundFill])

-- | The shape background fill.
--
-- /See:/ 'shapeBackgRoundFill' smart constructor.
data ShapeBackgRoundFill = ShapeBackgRoundFill'
    { _sbrfSolidFill     :: !(Maybe SolidFill)
    , _sbrfPropertyState :: !(Maybe ShapeBackgRoundFillPropertyState)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ShapeBackgRoundFill' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sbrfSolidFill'
--
-- * 'sbrfPropertyState'
shapeBackgRoundFill
    :: ShapeBackgRoundFill
shapeBackgRoundFill =
    ShapeBackgRoundFill'
    { _sbrfSolidFill = Nothing
    , _sbrfPropertyState = Nothing
    }

-- | Solid color fill.
sbrfSolidFill :: Lens' ShapeBackgRoundFill (Maybe SolidFill)
sbrfSolidFill
  = lens _sbrfSolidFill
      (\ s a -> s{_sbrfSolidFill = a})

-- | The background fill property state. Updating the the fill on a shape
-- will implicitly update this field to \`RENDERED\`, unless another value
-- is specified in the same request. To have no fill on a shape, set this
-- field to \`NOT_RENDERED\`. In this case, any other fill fields set in
-- the same request will be ignored.
sbrfPropertyState :: Lens' ShapeBackgRoundFill (Maybe ShapeBackgRoundFillPropertyState)
sbrfPropertyState
  = lens _sbrfPropertyState
      (\ s a -> s{_sbrfPropertyState = a})

instance FromJSON ShapeBackgRoundFill where
        parseJSON
          = withObject "ShapeBackgRoundFill"
              (\ o ->
                 ShapeBackgRoundFill' <$>
                   (o .:? "solidFill") <*> (o .:? "propertyState"))

instance ToJSON ShapeBackgRoundFill where
        toJSON ShapeBackgRoundFill'{..}
          = object
              (catMaybes
                 [("solidFill" .=) <$> _sbrfSolidFill,
                  ("propertyState" .=) <$> _sbrfPropertyState])

-- | Creates bullets for all of the paragraphs that overlap with the given
-- text index range. The nesting level of each paragraph will be determined
-- by counting leading tabs in front of each paragraph. To avoid excess
-- space between the bullet and the corresponding paragraph, these leading
-- tabs are removed by this request. This may change the indices of parts
-- of the text. If the paragraph immediately before paragraphs being
-- updated is in a list with a matching preset, the paragraphs being
-- updated are added to that preceding list.
--
-- /See:/ 'createParagraphBulletsRequest' smart constructor.
data CreateParagraphBulletsRequest = CreateParagraphBulletsRequest'
    { _cpbrTextRange    :: !(Maybe Range)
    , _cpbrObjectId     :: !(Maybe Text)
    , _cpbrBulletPreset :: !(Maybe CreateParagraphBulletsRequestBulletPreset)
    , _cpbrCellLocation :: !(Maybe TableCellLocation)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateParagraphBulletsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cpbrTextRange'
--
-- * 'cpbrObjectId'
--
-- * 'cpbrBulletPreset'
--
-- * 'cpbrCellLocation'
createParagraphBulletsRequest
    :: CreateParagraphBulletsRequest
createParagraphBulletsRequest =
    CreateParagraphBulletsRequest'
    { _cpbrTextRange = Nothing
    , _cpbrObjectId = Nothing
    , _cpbrBulletPreset = Nothing
    , _cpbrCellLocation = Nothing
    }

-- | The range of text to apply the bullet presets to, based on TextElement
-- indexes.
cpbrTextRange :: Lens' CreateParagraphBulletsRequest (Maybe Range)
cpbrTextRange
  = lens _cpbrTextRange
      (\ s a -> s{_cpbrTextRange = a})

-- | The object ID of the shape or table containing the text to add bullets
-- to.
cpbrObjectId :: Lens' CreateParagraphBulletsRequest (Maybe Text)
cpbrObjectId
  = lens _cpbrObjectId (\ s a -> s{_cpbrObjectId = a})

-- | The kinds of bullet glyphs to be used. Defaults to the
-- \`BULLET_DISC_CIRCLE_SQUARE\` preset.
cpbrBulletPreset :: Lens' CreateParagraphBulletsRequest (Maybe CreateParagraphBulletsRequestBulletPreset)
cpbrBulletPreset
  = lens _cpbrBulletPreset
      (\ s a -> s{_cpbrBulletPreset = a})

-- | The optional table cell location if the text to be modified is in a
-- table cell. If present, the object_id must refer to a table.
cpbrCellLocation :: Lens' CreateParagraphBulletsRequest (Maybe TableCellLocation)
cpbrCellLocation
  = lens _cpbrCellLocation
      (\ s a -> s{_cpbrCellLocation = a})

instance FromJSON CreateParagraphBulletsRequest where
        parseJSON
          = withObject "CreateParagraphBulletsRequest"
              (\ o ->
                 CreateParagraphBulletsRequest' <$>
                   (o .:? "textRange") <*> (o .:? "objectId") <*>
                     (o .:? "bulletPreset")
                     <*> (o .:? "cellLocation"))

instance ToJSON CreateParagraphBulletsRequest where
        toJSON CreateParagraphBulletsRequest'{..}
          = object
              (catMaybes
                 [("textRange" .=) <$> _cpbrTextRange,
                  ("objectId" .=) <$> _cpbrObjectId,
                  ("bulletPreset" .=) <$> _cpbrBulletPreset,
                  ("cellLocation" .=) <$> _cpbrCellLocation])

-- | Update the properties of a TableCell.
--
-- /See:/ 'updateTableCellPropertiesRequest' smart constructor.
data UpdateTableCellPropertiesRequest = UpdateTableCellPropertiesRequest'
    { _utcprObjectId            :: !(Maybe Text)
    , _utcprTableCellProperties :: !(Maybe TableCellProperties)
    , _utcprTableRange          :: !(Maybe TableRange)
    , _utcprFields              :: !(Maybe FieldMask)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UpdateTableCellPropertiesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'utcprObjectId'
--
-- * 'utcprTableCellProperties'
--
-- * 'utcprTableRange'
--
-- * 'utcprFields'
updateTableCellPropertiesRequest
    :: UpdateTableCellPropertiesRequest
updateTableCellPropertiesRequest =
    UpdateTableCellPropertiesRequest'
    { _utcprObjectId = Nothing
    , _utcprTableCellProperties = Nothing
    , _utcprTableRange = Nothing
    , _utcprFields = Nothing
    }

-- | The object ID of the table.
utcprObjectId :: Lens' UpdateTableCellPropertiesRequest (Maybe Text)
utcprObjectId
  = lens _utcprObjectId
      (\ s a -> s{_utcprObjectId = a})

-- | The table cell properties to update.
utcprTableCellProperties :: Lens' UpdateTableCellPropertiesRequest (Maybe TableCellProperties)
utcprTableCellProperties
  = lens _utcprTableCellProperties
      (\ s a -> s{_utcprTableCellProperties = a})

-- | The table range representing the subset of the table to which the
-- updates are applied. If a table range is not specified, the updates will
-- apply to the entire table.
utcprTableRange :: Lens' UpdateTableCellPropertiesRequest (Maybe TableRange)
utcprTableRange
  = lens _utcprTableRange
      (\ s a -> s{_utcprTableRange = a})

-- | The fields that should be updated. At least one field must be specified.
-- The root \`tableCellProperties\` is implied and should not be specified.
-- A single \`\"*\"\` can be used as short-hand for listing every field.
-- For example to update the table cell background solid fill color, set
-- \`fields\` to \`\"tableCellBackgroundFill.solidFill.color\"\`. To reset
-- a property to its default value, include its field name in the field
-- mask but leave the field itself unset.
utcprFields :: Lens' UpdateTableCellPropertiesRequest (Maybe FieldMask)
utcprFields
  = lens _utcprFields (\ s a -> s{_utcprFields = a})

instance FromJSON UpdateTableCellPropertiesRequest
         where
        parseJSON
          = withObject "UpdateTableCellPropertiesRequest"
              (\ o ->
                 UpdateTableCellPropertiesRequest' <$>
                   (o .:? "objectId") <*> (o .:? "tableCellProperties")
                     <*> (o .:? "tableRange")
                     <*> (o .:? "fields"))

instance ToJSON UpdateTableCellPropertiesRequest
         where
        toJSON UpdateTableCellPropertiesRequest'{..}
          = object
              (catMaybes
                 [("objectId" .=) <$> _utcprObjectId,
                  ("tableCellProperties" .=) <$>
                    _utcprTableCellProperties,
                  ("tableRange" .=) <$> _utcprTableRange,
                  ("fields" .=) <$> _utcprFields])

-- | The properties of the SheetsChart.
--
-- /See:/ 'sheetsChartProperties' smart constructor.
newtype SheetsChartProperties = SheetsChartProperties'
    { _scpChartImageProperties :: Maybe ImageProperties
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SheetsChartProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'scpChartImageProperties'
sheetsChartProperties
    :: SheetsChartProperties
sheetsChartProperties =
    SheetsChartProperties'
    { _scpChartImageProperties = Nothing
    }

-- | The properties of the embedded chart image.
scpChartImageProperties :: Lens' SheetsChartProperties (Maybe ImageProperties)
scpChartImageProperties
  = lens _scpChartImageProperties
      (\ s a -> s{_scpChartImageProperties = a})

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

instance ToJSON SheetsChartProperties where
        toJSON SheetsChartProperties'{..}
          = object
              (catMaybes
                 [("chartImageProperties" .=) <$>
                    _scpChartImageProperties])

-- | Styles that apply to a whole paragraph. If this text is contained in a
-- shape with a parent placeholder, then these paragraph styles may be
-- inherited from the parent. Which paragraph styles are inherited depend
-- on the nesting level of lists: * A paragraph not in a list will inherit
-- its paragraph style from the paragraph at the 0 nesting level of the
-- list inside the parent placeholder. * A paragraph in a list will inherit
-- its paragraph style from the paragraph at its corresponding nesting
-- level of the list inside the parent placeholder. Inherited paragraph
-- styles are represented as unset fields in this message.
--
-- /See:/ 'paragraphStyle' smart constructor.
data ParagraphStyle = ParagraphStyle'
    { _psLineSpacing     :: !(Maybe (Textual Double))
    , _psDirection       :: !(Maybe ParagraphStyleDirection)
    , _psIndentFirstLine :: !(Maybe Dimension)
    , _psIndentEnd       :: !(Maybe Dimension)
    , _psIndentStart     :: !(Maybe Dimension)
    , _psAlignment       :: !(Maybe ParagraphStyleAlignment)
    , _psSpaceBelow      :: !(Maybe Dimension)
    , _psSpacingMode     :: !(Maybe ParagraphStyleSpacingMode)
    , _psSpaceAbove      :: !(Maybe Dimension)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ParagraphStyle' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'psLineSpacing'
--
-- * 'psDirection'
--
-- * 'psIndentFirstLine'
--
-- * 'psIndentEnd'
--
-- * 'psIndentStart'
--
-- * 'psAlignment'
--
-- * 'psSpaceBelow'
--
-- * 'psSpacingMode'
--
-- * 'psSpaceAbove'
paragraphStyle
    :: ParagraphStyle
paragraphStyle =
    ParagraphStyle'
    { _psLineSpacing = Nothing
    , _psDirection = Nothing
    , _psIndentFirstLine = Nothing
    , _psIndentEnd = Nothing
    , _psIndentStart = Nothing
    , _psAlignment = Nothing
    , _psSpaceBelow = Nothing
    , _psSpacingMode = Nothing
    , _psSpaceAbove = Nothing
    }

-- | The amount of space between lines, as a percentage of normal, where
-- normal is represented as 100.0. If unset, the value is inherited from
-- the parent. This property is read-only.
psLineSpacing :: Lens' ParagraphStyle (Maybe Double)
psLineSpacing
  = lens _psLineSpacing
      (\ s a -> s{_psLineSpacing = a})
      . mapping _Coerce

-- | The text direction of this paragraph. This property is read-only.
psDirection :: Lens' ParagraphStyle (Maybe ParagraphStyleDirection)
psDirection
  = lens _psDirection (\ s a -> s{_psDirection = a})

-- | The amount of indentation for the start of the first line of the
-- paragraph. If unset, the value is inherited from the parent. This
-- property is read-only.
psIndentFirstLine :: Lens' ParagraphStyle (Maybe Dimension)
psIndentFirstLine
  = lens _psIndentFirstLine
      (\ s a -> s{_psIndentFirstLine = a})

-- | The amount indentation for the paragraph on the side that corresponds to
-- the end of the text, based on the current text direction. If unset, the
-- value is inherited from the parent. This property is read-only.
psIndentEnd :: Lens' ParagraphStyle (Maybe Dimension)
psIndentEnd
  = lens _psIndentEnd (\ s a -> s{_psIndentEnd = a})

-- | The amount indentation for the paragraph on the side that corresponds to
-- the start of the text, based on the current text direction. If unset,
-- the value is inherited from the parent. This property is read-only.
psIndentStart :: Lens' ParagraphStyle (Maybe Dimension)
psIndentStart
  = lens _psIndentStart
      (\ s a -> s{_psIndentStart = a})

-- | The text alignment for this paragraph. This property is read-only.
psAlignment :: Lens' ParagraphStyle (Maybe ParagraphStyleAlignment)
psAlignment
  = lens _psAlignment (\ s a -> s{_psAlignment = a})

-- | The amount of extra space above the paragraph. If unset, the value is
-- inherited from the parent. This property is read-only.
psSpaceBelow :: Lens' ParagraphStyle (Maybe Dimension)
psSpaceBelow
  = lens _psSpaceBelow (\ s a -> s{_psSpaceBelow = a})

-- | The spacing mode for the paragraph. This property is read-only.
psSpacingMode :: Lens' ParagraphStyle (Maybe ParagraphStyleSpacingMode)
psSpacingMode
  = lens _psSpacingMode
      (\ s a -> s{_psSpacingMode = a})

-- | The amount of extra space above the paragraph. If unset, the value is
-- inherited from the parent. This property is read-only.
psSpaceAbove :: Lens' ParagraphStyle (Maybe Dimension)
psSpaceAbove
  = lens _psSpaceAbove (\ s a -> s{_psSpaceAbove = a})

instance FromJSON ParagraphStyle where
        parseJSON
          = withObject "ParagraphStyle"
              (\ o ->
                 ParagraphStyle' <$>
                   (o .:? "lineSpacing") <*> (o .:? "direction") <*>
                     (o .:? "indentFirstLine")
                     <*> (o .:? "indentEnd")
                     <*> (o .:? "indentStart")
                     <*> (o .:? "alignment")
                     <*> (o .:? "spaceBelow")
                     <*> (o .:? "spacingMode")
                     <*> (o .:? "spaceAbove"))

instance ToJSON ParagraphStyle where
        toJSON ParagraphStyle'{..}
          = object
              (catMaybes
                 [("lineSpacing" .=) <$> _psLineSpacing,
                  ("direction" .=) <$> _psDirection,
                  ("indentFirstLine" .=) <$> _psIndentFirstLine,
                  ("indentEnd" .=) <$> _psIndentEnd,
                  ("indentStart" .=) <$> _psIndentStart,
                  ("alignment" .=) <$> _psAlignment,
                  ("spaceBelow" .=) <$> _psSpaceBelow,
                  ("spacingMode" .=) <$> _psSpacingMode,
                  ("spaceAbove" .=) <$> _psSpaceAbove])

-- | The result of creating a table.
--
-- /See:/ 'createTableResponse' smart constructor.
newtype CreateTableResponse = CreateTableResponse'
    { _ctrtObjectId :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateTableResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ctrtObjectId'
createTableResponse
    :: CreateTableResponse
createTableResponse =
    CreateTableResponse'
    { _ctrtObjectId = Nothing
    }

-- | The object ID of the created table.
ctrtObjectId :: Lens' CreateTableResponse (Maybe Text)
ctrtObjectId
  = lens _ctrtObjectId (\ s a -> s{_ctrtObjectId = a})

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

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

-- | Properties of each column in a table.
--
-- /See:/ 'tableColumnProperties' smart constructor.
newtype TableColumnProperties = TableColumnProperties'
    { _tcpColumnWidth :: Maybe Dimension
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TableColumnProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tcpColumnWidth'
tableColumnProperties
    :: TableColumnProperties
tableColumnProperties =
    TableColumnProperties'
    { _tcpColumnWidth = Nothing
    }

-- | Width of a column.
tcpColumnWidth :: Lens' TableColumnProperties (Maybe Dimension)
tcpColumnWidth
  = lens _tcpColumnWidth
      (\ s a -> s{_tcpColumnWidth = a})

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

instance ToJSON TableColumnProperties where
        toJSON TableColumnProperties'{..}
          = object
              (catMaybes [("columnWidth" .=) <$> _tcpColumnWidth])

-- | The response of duplicating an object.
--
-- /See:/ 'duplicateObjectResponse' smart constructor.
newtype DuplicateObjectResponse = DuplicateObjectResponse'
    { _dupObjectId :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DuplicateObjectResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dupObjectId'
duplicateObjectResponse
    :: DuplicateObjectResponse
duplicateObjectResponse =
    DuplicateObjectResponse'
    { _dupObjectId = Nothing
    }

-- | The ID of the new duplicate object.
dupObjectId :: Lens' DuplicateObjectResponse (Maybe Text)
dupObjectId
  = lens _dupObjectId (\ s a -> s{_dupObjectId = a})

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

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

-- | Replaces all instances of text matching a criteria with replace text.
--
-- /See:/ 'replaceAllTextRequest' smart constructor.
data ReplaceAllTextRequest = ReplaceAllTextRequest'
    { _ratrContainsText :: !(Maybe SubstringMatchCriteria)
    , _ratrReplaceText  :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ReplaceAllTextRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ratrContainsText'
--
-- * 'ratrReplaceText'
replaceAllTextRequest
    :: ReplaceAllTextRequest
replaceAllTextRequest =
    ReplaceAllTextRequest'
    { _ratrContainsText = Nothing
    , _ratrReplaceText = Nothing
    }

-- | Finds text in a shape matching this substring.
ratrContainsText :: Lens' ReplaceAllTextRequest (Maybe SubstringMatchCriteria)
ratrContainsText
  = lens _ratrContainsText
      (\ s a -> s{_ratrContainsText = a})

-- | The text that will replace the matched text.
ratrReplaceText :: Lens' ReplaceAllTextRequest (Maybe Text)
ratrReplaceText
  = lens _ratrReplaceText
      (\ s a -> s{_ratrReplaceText = a})

instance FromJSON ReplaceAllTextRequest where
        parseJSON
          = withObject "ReplaceAllTextRequest"
              (\ o ->
                 ReplaceAllTextRequest' <$>
                   (o .:? "containsText") <*> (o .:? "replaceText"))

instance ToJSON ReplaceAllTextRequest where
        toJSON ReplaceAllTextRequest'{..}
          = object
              (catMaybes
                 [("containsText" .=) <$> _ratrContainsText,
                  ("replaceText" .=) <$> _ratrReplaceText])

-- | A table range represents a reference to a subset of a table. It\'s
-- important to note that the cells specified by a table range do not
-- necessarily form a rectangle. For example, let\'s say we have a 3 x 3
-- table where all the cells of the last row are merged together. The table
-- looks like this: [ ] A table range with location = (0, 0), row span = 3
-- and column span = 2 specifies the following cells: x x [ x ]
--
-- /See:/ 'tableRange' smart constructor.
data TableRange = TableRange'
    { _trColumnSpan :: !(Maybe (Textual Int32))
    , _trLocation   :: !(Maybe TableCellLocation)
    , _trRowSpan    :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TableRange' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'trColumnSpan'
--
-- * 'trLocation'
--
-- * 'trRowSpan'
tableRange
    :: TableRange
tableRange =
    TableRange'
    { _trColumnSpan = Nothing
    , _trLocation = Nothing
    , _trRowSpan = Nothing
    }

-- | The column span of the table range.
trColumnSpan :: Lens' TableRange (Maybe Int32)
trColumnSpan
  = lens _trColumnSpan (\ s a -> s{_trColumnSpan = a})
      . mapping _Coerce

-- | The starting location of the table range.
trLocation :: Lens' TableRange (Maybe TableCellLocation)
trLocation
  = lens _trLocation (\ s a -> s{_trLocation = a})

-- | The row span of the table range.
trRowSpan :: Lens' TableRange (Maybe Int32)
trRowSpan
  = lens _trRowSpan (\ s a -> s{_trRowSpan = a}) .
      mapping _Coerce

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

instance ToJSON TableRange where
        toJSON TableRange'{..}
          = object
              (catMaybes
                 [("columnSpan" .=) <$> _trColumnSpan,
                  ("location" .=) <$> _trLocation,
                  ("rowSpan" .=) <$> _trRowSpan])

-- | A single kind of update to apply to a presentation.
--
-- /See:/ 'request'' smart constructor.
data Request' = Request''
    { _reqReplaceAllShapesWithImage  :: !(Maybe ReplaceAllShapesWithImageRequest)
    , _reqDeleteObject               :: !(Maybe DeleteObjectRequest)
    , _reqUpdateSlidesPosition       :: !(Maybe UpdateSlidesPositionRequest)
    , _reqUpdateShapeProperties      :: !(Maybe UpdateShapePropertiesRequest)
    , _reqCreateParagraphBullets     :: !(Maybe CreateParagraphBulletsRequest)
    , _reqCreateLine                 :: !(Maybe CreateLineRequest)
    , _reqInsertText                 :: !(Maybe InsertTextRequest)
    , _reqDeleteTableRow             :: !(Maybe DeleteTableRowRequest)
    , _reqUpdateTableCellProperties  :: !(Maybe UpdateTableCellPropertiesRequest)
    , _reqReplaceAllText             :: !(Maybe ReplaceAllTextRequest)
    , _reqCreateShape                :: !(Maybe CreateShapeRequest)
    , _reqUpdatePageProperties       :: !(Maybe UpdatePagePropertiesRequest)
    , _reqUpdateLineProperties       :: !(Maybe UpdateLinePropertiesRequest)
    , _reqDeleteTableColumn          :: !(Maybe DeleteTableColumnRequest)
    , _reqDeleteText                 :: !(Maybe DeleteTextRequest)
    , _reqCreateSheetsChart          :: !(Maybe CreateSheetsChartRequest)
    , _reqInsertTableColumns         :: !(Maybe InsertTableColumnsRequest)
    , _reqUpdateImageProperties      :: !(Maybe UpdateImagePropertiesRequest)
    , _reqDuplicateObject            :: !(Maybe DuplicateObjectRequest)
    , _reqCreateTable                :: !(Maybe CreateTableRequest)
    , _reqCreateVideo                :: !(Maybe CreateVideoRequest)
    , _reqRefreshSheetsChart         :: !(Maybe RefreshSheetsChartRequest)
    , _reqUpdatePageElementTransform :: !(Maybe UpdatePageElementTransformRequest)
    , _reqInsertTableRows            :: !(Maybe InsertTableRowsRequest)
    , _reqCreateImage                :: !(Maybe CreateImageRequest)
    , _reqCreateSlide                :: !(Maybe CreateSlideRequest)
    , _reqUpdateTextStyle            :: !(Maybe UpdateTextStyleRequest)
    , _reqUpdateVideoProperties      :: !(Maybe UpdateVideoPropertiesRequest)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Request' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'reqReplaceAllShapesWithImage'
--
-- * 'reqDeleteObject'
--
-- * 'reqUpdateSlidesPosition'
--
-- * 'reqUpdateShapeProperties'
--
-- * 'reqCreateParagraphBullets'
--
-- * 'reqCreateLine'
--
-- * 'reqInsertText'
--
-- * 'reqDeleteTableRow'
--
-- * 'reqUpdateTableCellProperties'
--
-- * 'reqReplaceAllText'
--
-- * 'reqCreateShape'
--
-- * 'reqUpdatePageProperties'
--
-- * 'reqUpdateLineProperties'
--
-- * 'reqDeleteTableColumn'
--
-- * 'reqDeleteText'
--
-- * 'reqCreateSheetsChart'
--
-- * 'reqInsertTableColumns'
--
-- * 'reqUpdateImageProperties'
--
-- * 'reqDuplicateObject'
--
-- * 'reqCreateTable'
--
-- * 'reqCreateVideo'
--
-- * 'reqRefreshSheetsChart'
--
-- * 'reqUpdatePageElementTransform'
--
-- * 'reqInsertTableRows'
--
-- * 'reqCreateImage'
--
-- * 'reqCreateSlide'
--
-- * 'reqUpdateTextStyle'
--
-- * 'reqUpdateVideoProperties'
request'
    :: Request'
request' =
    Request''
    { _reqReplaceAllShapesWithImage = Nothing
    , _reqDeleteObject = Nothing
    , _reqUpdateSlidesPosition = Nothing
    , _reqUpdateShapeProperties = Nothing
    , _reqCreateParagraphBullets = Nothing
    , _reqCreateLine = Nothing
    , _reqInsertText = Nothing
    , _reqDeleteTableRow = Nothing
    , _reqUpdateTableCellProperties = Nothing
    , _reqReplaceAllText = Nothing
    , _reqCreateShape = Nothing
    , _reqUpdatePageProperties = Nothing
    , _reqUpdateLineProperties = Nothing
    , _reqDeleteTableColumn = Nothing
    , _reqDeleteText = Nothing
    , _reqCreateSheetsChart = Nothing
    , _reqInsertTableColumns = Nothing
    , _reqUpdateImageProperties = Nothing
    , _reqDuplicateObject = Nothing
    , _reqCreateTable = Nothing
    , _reqCreateVideo = Nothing
    , _reqRefreshSheetsChart = Nothing
    , _reqUpdatePageElementTransform = Nothing
    , _reqInsertTableRows = Nothing
    , _reqCreateImage = Nothing
    , _reqCreateSlide = Nothing
    , _reqUpdateTextStyle = Nothing
    , _reqUpdateVideoProperties = Nothing
    }

-- | Replaces all shapes matching some criteria with an image.
reqReplaceAllShapesWithImage :: Lens' Request' (Maybe ReplaceAllShapesWithImageRequest)
reqReplaceAllShapesWithImage
  = lens _reqReplaceAllShapesWithImage
      (\ s a -> s{_reqReplaceAllShapesWithImage = a})

-- | Deletes a page or page element from the presentation.
reqDeleteObject :: Lens' Request' (Maybe DeleteObjectRequest)
reqDeleteObject
  = lens _reqDeleteObject
      (\ s a -> s{_reqDeleteObject = a})

-- | Updates the position of a set of slides in the presentation.
reqUpdateSlidesPosition :: Lens' Request' (Maybe UpdateSlidesPositionRequest)
reqUpdateSlidesPosition
  = lens _reqUpdateSlidesPosition
      (\ s a -> s{_reqUpdateSlidesPosition = a})

-- | Updates the properties of a Shape.
reqUpdateShapeProperties :: Lens' Request' (Maybe UpdateShapePropertiesRequest)
reqUpdateShapeProperties
  = lens _reqUpdateShapeProperties
      (\ s a -> s{_reqUpdateShapeProperties = a})

-- | Creates bullets for paragraphs.
reqCreateParagraphBullets :: Lens' Request' (Maybe CreateParagraphBulletsRequest)
reqCreateParagraphBullets
  = lens _reqCreateParagraphBullets
      (\ s a -> s{_reqCreateParagraphBullets = a})

-- | Creates a line.
reqCreateLine :: Lens' Request' (Maybe CreateLineRequest)
reqCreateLine
  = lens _reqCreateLine
      (\ s a -> s{_reqCreateLine = a})

-- | Inserts text into a shape or table cell.
reqInsertText :: Lens' Request' (Maybe InsertTextRequest)
reqInsertText
  = lens _reqInsertText
      (\ s a -> s{_reqInsertText = a})

-- | Deletes a row from a table.
reqDeleteTableRow :: Lens' Request' (Maybe DeleteTableRowRequest)
reqDeleteTableRow
  = lens _reqDeleteTableRow
      (\ s a -> s{_reqDeleteTableRow = a})

-- | Updates the properties of a TableCell.
reqUpdateTableCellProperties :: Lens' Request' (Maybe UpdateTableCellPropertiesRequest)
reqUpdateTableCellProperties
  = lens _reqUpdateTableCellProperties
      (\ s a -> s{_reqUpdateTableCellProperties = a})

-- | Replaces all instances of specified text.
reqReplaceAllText :: Lens' Request' (Maybe ReplaceAllTextRequest)
reqReplaceAllText
  = lens _reqReplaceAllText
      (\ s a -> s{_reqReplaceAllText = a})

-- | Creates a new shape.
reqCreateShape :: Lens' Request' (Maybe CreateShapeRequest)
reqCreateShape
  = lens _reqCreateShape
      (\ s a -> s{_reqCreateShape = a})

-- | Updates the properties of a Page.
reqUpdatePageProperties :: Lens' Request' (Maybe UpdatePagePropertiesRequest)
reqUpdatePageProperties
  = lens _reqUpdatePageProperties
      (\ s a -> s{_reqUpdatePageProperties = a})

-- | Updates the properties of a Line.
reqUpdateLineProperties :: Lens' Request' (Maybe UpdateLinePropertiesRequest)
reqUpdateLineProperties
  = lens _reqUpdateLineProperties
      (\ s a -> s{_reqUpdateLineProperties = a})

-- | Deletes a column from a table.
reqDeleteTableColumn :: Lens' Request' (Maybe DeleteTableColumnRequest)
reqDeleteTableColumn
  = lens _reqDeleteTableColumn
      (\ s a -> s{_reqDeleteTableColumn = a})

-- | Deletes text from a shape or a table cell.
reqDeleteText :: Lens' Request' (Maybe DeleteTextRequest)
reqDeleteText
  = lens _reqDeleteText
      (\ s a -> s{_reqDeleteText = a})

-- | Creates an embedded Google Sheets chart.
reqCreateSheetsChart :: Lens' Request' (Maybe CreateSheetsChartRequest)
reqCreateSheetsChart
  = lens _reqCreateSheetsChart
      (\ s a -> s{_reqCreateSheetsChart = a})

-- | Inserts columns into a table.
reqInsertTableColumns :: Lens' Request' (Maybe InsertTableColumnsRequest)
reqInsertTableColumns
  = lens _reqInsertTableColumns
      (\ s a -> s{_reqInsertTableColumns = a})

-- | Updates the properties of an Image.
reqUpdateImageProperties :: Lens' Request' (Maybe UpdateImagePropertiesRequest)
reqUpdateImageProperties
  = lens _reqUpdateImageProperties
      (\ s a -> s{_reqUpdateImageProperties = a})

-- | Duplicates a slide or page element.
reqDuplicateObject :: Lens' Request' (Maybe DuplicateObjectRequest)
reqDuplicateObject
  = lens _reqDuplicateObject
      (\ s a -> s{_reqDuplicateObject = a})

-- | Creates a new table.
reqCreateTable :: Lens' Request' (Maybe CreateTableRequest)
reqCreateTable
  = lens _reqCreateTable
      (\ s a -> s{_reqCreateTable = a})

-- | Creates a video.
reqCreateVideo :: Lens' Request' (Maybe CreateVideoRequest)
reqCreateVideo
  = lens _reqCreateVideo
      (\ s a -> s{_reqCreateVideo = a})

-- | Refreshes a Google Sheets chart.
reqRefreshSheetsChart :: Lens' Request' (Maybe RefreshSheetsChartRequest)
reqRefreshSheetsChart
  = lens _reqRefreshSheetsChart
      (\ s a -> s{_reqRefreshSheetsChart = a})

-- | Updates the transform of a page element.
reqUpdatePageElementTransform :: Lens' Request' (Maybe UpdatePageElementTransformRequest)
reqUpdatePageElementTransform
  = lens _reqUpdatePageElementTransform
      (\ s a -> s{_reqUpdatePageElementTransform = a})

-- | Inserts rows into a table.
reqInsertTableRows :: Lens' Request' (Maybe InsertTableRowsRequest)
reqInsertTableRows
  = lens _reqInsertTableRows
      (\ s a -> s{_reqInsertTableRows = a})

-- | Creates an image.
reqCreateImage :: Lens' Request' (Maybe CreateImageRequest)
reqCreateImage
  = lens _reqCreateImage
      (\ s a -> s{_reqCreateImage = a})

-- | Creates a new slide.
reqCreateSlide :: Lens' Request' (Maybe CreateSlideRequest)
reqCreateSlide
  = lens _reqCreateSlide
      (\ s a -> s{_reqCreateSlide = a})

-- | Updates the styling of text within a Shape or Table.
reqUpdateTextStyle :: Lens' Request' (Maybe UpdateTextStyleRequest)
reqUpdateTextStyle
  = lens _reqUpdateTextStyle
      (\ s a -> s{_reqUpdateTextStyle = a})

-- | Updates the properties of a Video.
reqUpdateVideoProperties :: Lens' Request' (Maybe UpdateVideoPropertiesRequest)
reqUpdateVideoProperties
  = lens _reqUpdateVideoProperties
      (\ s a -> s{_reqUpdateVideoProperties = a})

instance FromJSON Request' where
        parseJSON
          = withObject "Request"
              (\ o ->
                 Request'' <$>
                   (o .:? "replaceAllShapesWithImage") <*>
                     (o .:? "deleteObject")
                     <*> (o .:? "updateSlidesPosition")
                     <*> (o .:? "updateShapeProperties")
                     <*> (o .:? "createParagraphBullets")
                     <*> (o .:? "createLine")
                     <*> (o .:? "insertText")
                     <*> (o .:? "deleteTableRow")
                     <*> (o .:? "updateTableCellProperties")
                     <*> (o .:? "replaceAllText")
                     <*> (o .:? "createShape")
                     <*> (o .:? "updatePageProperties")
                     <*> (o .:? "updateLineProperties")
                     <*> (o .:? "deleteTableColumn")
                     <*> (o .:? "deleteText")
                     <*> (o .:? "createSheetsChart")
                     <*> (o .:? "insertTableColumns")
                     <*> (o .:? "updateImageProperties")
                     <*> (o .:? "duplicateObject")
                     <*> (o .:? "createTable")
                     <*> (o .:? "createVideo")
                     <*> (o .:? "refreshSheetsChart")
                     <*> (o .:? "updatePageElementTransform")
                     <*> (o .:? "insertTableRows")
                     <*> (o .:? "createImage")
                     <*> (o .:? "createSlide")
                     <*> (o .:? "updateTextStyle")
                     <*> (o .:? "updateVideoProperties"))

instance ToJSON Request' where
        toJSON Request''{..}
          = object
              (catMaybes
                 [("replaceAllShapesWithImage" .=) <$>
                    _reqReplaceAllShapesWithImage,
                  ("deleteObject" .=) <$> _reqDeleteObject,
                  ("updateSlidesPosition" .=) <$>
                    _reqUpdateSlidesPosition,
                  ("updateShapeProperties" .=) <$>
                    _reqUpdateShapeProperties,
                  ("createParagraphBullets" .=) <$>
                    _reqCreateParagraphBullets,
                  ("createLine" .=) <$> _reqCreateLine,
                  ("insertText" .=) <$> _reqInsertText,
                  ("deleteTableRow" .=) <$> _reqDeleteTableRow,
                  ("updateTableCellProperties" .=) <$>
                    _reqUpdateTableCellProperties,
                  ("replaceAllText" .=) <$> _reqReplaceAllText,
                  ("createShape" .=) <$> _reqCreateShape,
                  ("updatePageProperties" .=) <$>
                    _reqUpdatePageProperties,
                  ("updateLineProperties" .=) <$>
                    _reqUpdateLineProperties,
                  ("deleteTableColumn" .=) <$> _reqDeleteTableColumn,
                  ("deleteText" .=) <$> _reqDeleteText,
                  ("createSheetsChart" .=) <$> _reqCreateSheetsChart,
                  ("insertTableColumns" .=) <$> _reqInsertTableColumns,
                  ("updateImageProperties" .=) <$>
                    _reqUpdateImageProperties,
                  ("duplicateObject" .=) <$> _reqDuplicateObject,
                  ("createTable" .=) <$> _reqCreateTable,
                  ("createVideo" .=) <$> _reqCreateVideo,
                  ("refreshSheetsChart" .=) <$> _reqRefreshSheetsChart,
                  ("updatePageElementTransform" .=) <$>
                    _reqUpdatePageElementTransform,
                  ("insertTableRows" .=) <$> _reqInsertTableRows,
                  ("createImage" .=) <$> _reqCreateImage,
                  ("createSlide" .=) <$> _reqCreateSlide,
                  ("updateTextStyle" .=) <$> _reqUpdateTextStyle,
                  ("updateVideoProperties" .=) <$>
                    _reqUpdateVideoProperties])

-- | A criteria that matches a specific string of text in a shape or table.
--
-- /See:/ 'substringMatchCriteria' smart constructor.
data SubstringMatchCriteria = SubstringMatchCriteria'
    { _smcMatchCase :: !(Maybe Bool)
    , _smcText      :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubstringMatchCriteria' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'smcMatchCase'
--
-- * 'smcText'
substringMatchCriteria
    :: SubstringMatchCriteria
substringMatchCriteria =
    SubstringMatchCriteria'
    { _smcMatchCase = Nothing
    , _smcText = Nothing
    }

-- | Indicates whether the search should respect case: - \`True\`: the search
-- is case sensitive. - \`False\`: the search is case insensitive.
smcMatchCase :: Lens' SubstringMatchCriteria (Maybe Bool)
smcMatchCase
  = lens _smcMatchCase (\ s a -> s{_smcMatchCase = a})

-- | The text to search for in the shape or table.
smcText :: Lens' SubstringMatchCriteria (Maybe Text)
smcText = lens _smcText (\ s a -> s{_smcText = a})

instance FromJSON SubstringMatchCriteria where
        parseJSON
          = withObject "SubstringMatchCriteria"
              (\ o ->
                 SubstringMatchCriteria' <$>
                   (o .:? "matchCase") <*> (o .:? "text"))

instance ToJSON SubstringMatchCriteria where
        toJSON SubstringMatchCriteria'{..}
          = object
              (catMaybes
                 [("matchCase" .=) <$> _smcMatchCase,
                  ("text" .=) <$> _smcText])