content: {-# LANGUAGE DataKinds #-}
  {-# LANGUAGE DerivingStrategies #-}
  {-# LANGUAGE DuplicateRecordFields #-}
  {-# LANGUAGE ImportQualifiedPost #-}
  {-# LANGUAGE LambdaCase #-}
  {-# LANGUAGE OverloadedStrings #-}
  {-# LANGUAGE PatternSynonyms #-}
  {-# LANGUAGE RecordWildCards #-}
  {-# LANGUAGE StrictData #-}
  {-# LANGUAGE TypeFamilies #-}
  {-# LANGUAGE NoImplicitPrelude #-}
  {-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
  {-# OPTIONS_GHC -fno-warn-name-shadowing #-}
  {-# OPTIONS_GHC -fno-warn-unused-binds #-}
  {-# OPTIONS_GHC -fno-warn-unused-imports #-}
  {-# OPTIONS_GHC -fno-warn-unused-matches #-}
  
  -- |
  -- Module      : Gogol.StreetViewPublish.Photos.BatchUpdate
  -- Copyright   : (c) 2015-2025 Brendan Hay
  -- License     : Mozilla Public License, v. 2.0.
  -- Maintainer  : Brendan Hay <brendan.g.hay+gogol@gmail.com>
  --               Toni Cebrián <toni@tonicebrian.com>
  -- Stability   : auto-generated
  -- Portability : non-portable (GHC extensions)
  --
  -- Updates the metadata of Photos, such as pose, place association, connections, etc. Changing the pixels of photos is not supported. Note that if BatchUpdatePhotos fails, either critical fields are missing or there is an authentication error. Even if BatchUpdatePhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchUpdatePhotosResponse.results. See UpdatePhoto for specific failures that can occur per photo. Only the fields specified in updateMask field are used. If @updateMask@ is not present, the update applies to all fields. The number of UpdatePhotoRequest messages in a BatchUpdatePhotosRequest must not exceed 20. > Note: To update Pose.altitude, Pose.latLngPair has to be filled as well. Otherwise, the request will fail.
  --
  -- /See:/ <https://developers.google.com/streetview/publish/ Street View Publish API Reference> for @streetviewpublish.photos.batchUpdate@.
  module Gogol.StreetViewPublish.Photos.BatchUpdate
    ( -- * Resource
      StreetViewPublishPhotosBatchUpdateResource,
  
      -- ** Constructing a Request
      StreetViewPublishPhotosBatchUpdate (..),
      newStreetViewPublishPhotosBatchUpdate,
    )
  where
  
  import Gogol.Prelude qualified as Core
  import Gogol.StreetViewPublish.Types
  
  -- | A resource alias for @streetviewpublish.photos.batchUpdate@ method which the
  -- 'StreetViewPublishPhotosBatchUpdate' request conforms to.
  type StreetViewPublishPhotosBatchUpdateResource =
    "v1"
      Core.:> "photos:batchUpdate"
      Core.:> Core.QueryParam "$.xgafv" Xgafv
      Core.:> Core.QueryParam "access_token" Core.Text
      Core.:> Core.QueryParam "callback" Core.Text
      Core.:> Core.QueryParam "uploadType" Core.Text
      Core.:> Core.QueryParam "upload_protocol" Core.Text
      Core.:> Core.QueryParam "alt" Core.AltJSON
      Core.:> Core.ReqBody '[Core.JSON] BatchUpdatePhotosRequest
      Core.:> Core.Post '[Core.JSON] BatchUpdatePhotosResponse
  
  -- | Updates the metadata of Photos, such as pose, place association, connections, etc. Changing the pixels of photos is not supported. Note that if BatchUpdatePhotos fails, either critical fields are missing or there is an authentication error. Even if BatchUpdatePhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchUpdatePhotosResponse.results. See UpdatePhoto for specific failures that can occur per photo. Only the fields specified in updateMask field are used. If @updateMask@ is not present, the update applies to all fields. The number of UpdatePhotoRequest messages in a BatchUpdatePhotosRequest must not exceed 20. > Note: To update Pose.altitude, Pose.latLngPair has to be filled as well. Otherwise, the request will fail.
  --
  -- /See:/ 'newStreetViewPublishPhotosBatchUpdate' smart constructor.
  data StreetViewPublishPhotosBatchUpdate = StreetViewPublishPhotosBatchUpdate
    { -- | V1 error format.
      xgafv :: (Core.Maybe Xgafv),
      -- | OAuth access token.
      accessToken :: (Core.Maybe Core.Text),
      -- | JSONP
      callback :: (Core.Maybe Core.Text),
      -- | Multipart request metadata.
      payload :: BatchUpdatePhotosRequest,
      -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
      uploadType :: (Core.Maybe Core.Text),
      -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
      uploadProtocol :: (Core.Maybe Core.Text)
    }
    deriving (Core.Eq, Core.Show, Core.Generic)
  
  -- | Creates a value of 'StreetViewPublishPhotosBatchUpdate' with the minimum fields required to make a request.
  newStreetViewPublishPhotosBatchUpdate ::
    -- |  Multipart request metadata. See 'payload'.
    BatchUpdatePhotosRequest ->
    StreetViewPublishPhotosBatchUpdate
  newStreetViewPublishPhotosBatchUpdate payload =
    StreetViewPublishPhotosBatchUpdate
      { xgafv = Core.Nothing,
        accessToken = Core.Nothing,
        callback = Core.Nothing,
        payload = payload,
        uploadType = Core.Nothing,
        uploadProtocol = Core.Nothing
      }
  
  instance Core.GoogleRequest StreetViewPublishPhotosBatchUpdate where
    type
      Rs StreetViewPublishPhotosBatchUpdate =
        BatchUpdatePhotosResponse
    type
      Scopes StreetViewPublishPhotosBatchUpdate =
        '[Streetviewpublish'FullControl]
    requestClient StreetViewPublishPhotosBatchUpdate {..} =
      go
        xgafv
        accessToken
        callback
        uploadType
        uploadProtocol
        (Core.Just Core.AltJSON)
        payload
        streetViewPublishService
      where
        go =
          Core.buildClient
            ( Core.Proxy ::
                Core.Proxy StreetViewPublishPhotosBatchUpdateResource
            )
            Core.mempty
  