packages feed

gogol-commentanalyzer 0.5.0 → 1.0.0

raw patch · 15 files changed

+1415/−1833 lines, 15 filesdep −basedep ~gogol-coresetup-changed

Dependencies removed: base

Dependency ranges changed: gogol-core

Files

README.md view
@@ -8,7 +8,7 @@  ## Version -`0.5.0`+`1.0.0`   ## Description
Setup.hs view
@@ -1,2 +1,3 @@-import           Distribution.Simple+import Distribution.Simple+ main = defaultMain
+ gen/Gogol/CommentAnalyzer.hs view
@@ -0,0 +1,123 @@+{-# 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.CommentAnalyzer+-- 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)+--+-- The Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the \"toxicity\" of a comment). Users can leverage the \"SuggestCommentScore\" method to submit corrections to improve Perspective over time. Users can set the \"doNotStore\" flag to ensure that all submitted comments are automatically deleted after scores are returned.+--+-- /See:/ <https://github.com/conversationai/perspectiveapi/blob/master/README.md Perspective Comment Analyzer API Reference>+module Gogol.CommentAnalyzer+  ( -- * Configuration+    commentAnalyzerService,++    -- * OAuth Scopes+    Userinfo'Email,++    -- * Resources++    -- ** commentanalyzer.comments.analyze+    CommentAnalyzerCommentsAnalyzeResource,+    CommentAnalyzerCommentsAnalyze (..),+    newCommentAnalyzerCommentsAnalyze,++    -- ** commentanalyzer.comments.suggestscore+    CommentAnalyzerCommentsSuggestscoreResource,+    CommentAnalyzerCommentsSuggestscore (..),+    newCommentAnalyzerCommentsSuggestscore,++    -- * Types++    -- ** Xgafv+    Xgafv (..),++    -- ** AnalyzeCommentRequest+    AnalyzeCommentRequest (..),+    newAnalyzeCommentRequest,++    -- ** AnalyzeCommentRequest_RequestedAttributes+    AnalyzeCommentRequest_RequestedAttributes (..),+    newAnalyzeCommentRequest_RequestedAttributes,++    -- ** AnalyzeCommentResponse+    AnalyzeCommentResponse (..),+    newAnalyzeCommentResponse,++    -- ** AnalyzeCommentResponse_AttributeScores+    AnalyzeCommentResponse_AttributeScores (..),+    newAnalyzeCommentResponse_AttributeScores,++    -- ** ArticleAndParentComment+    ArticleAndParentComment (..),+    newArticleAndParentComment,++    -- ** AttributeParameters+    AttributeParameters (..),+    newAttributeParameters,++    -- ** AttributeParameters_ScoreType+    AttributeParameters_ScoreType (..),++    -- ** AttributeScores+    AttributeScores (..),+    newAttributeScores,++    -- ** Context+    Context (..),+    newContext,++    -- ** Score+    Score (..),+    newScore,++    -- ** Score_Type+    Score_Type (..),++    -- ** SpanScore+    SpanScore (..),+    newSpanScore,++    -- ** SuggestCommentScoreRequest+    SuggestCommentScoreRequest (..),+    newSuggestCommentScoreRequest,++    -- ** SuggestCommentScoreRequest_AttributeScores+    SuggestCommentScoreRequest_AttributeScores (..),+    newSuggestCommentScoreRequest_AttributeScores,++    -- ** SuggestCommentScoreResponse+    SuggestCommentScoreResponse (..),+    newSuggestCommentScoreResponse,++    -- ** TextEntry+    TextEntry (..),+    newTextEntry,++    -- ** TextEntry_Type+    TextEntry_Type (..),+  )+where++import Gogol.CommentAnalyzer.Comments.Analyze+import Gogol.CommentAnalyzer.Comments.Suggestscore+import Gogol.CommentAnalyzer.Types
+ gen/Gogol/CommentAnalyzer/Comments/Analyze.hs view
@@ -0,0 +1,108 @@+{-# 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.CommentAnalyzer.Comments.Analyze+-- 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)+--+-- Analyzes the provided text and returns scores for requested attributes.+--+-- /See:/ <https://github.com/conversationai/perspectiveapi/blob/master/README.md Perspective Comment Analyzer API Reference> for @commentanalyzer.comments.analyze@.+module Gogol.CommentAnalyzer.Comments.Analyze+  ( -- * Resource+    CommentAnalyzerCommentsAnalyzeResource,++    -- ** Constructing a Request+    CommentAnalyzerCommentsAnalyze (..),+    newCommentAnalyzerCommentsAnalyze,+  )+where++import Gogol.CommentAnalyzer.Types+import Gogol.Prelude qualified as Core++-- | A resource alias for @commentanalyzer.comments.analyze@ method which the+-- 'CommentAnalyzerCommentsAnalyze' request conforms to.+type CommentAnalyzerCommentsAnalyzeResource =+  "v1alpha1"+    Core.:> "comments:analyze"+    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] AnalyzeCommentRequest+    Core.:> Core.Post '[Core.JSON] AnalyzeCommentResponse++-- | Analyzes the provided text and returns scores for requested attributes.+--+-- /See:/ 'newCommentAnalyzerCommentsAnalyze' smart constructor.+data CommentAnalyzerCommentsAnalyze = CommentAnalyzerCommentsAnalyze+  { -- | 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 :: AnalyzeCommentRequest,+    -- | 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 'CommentAnalyzerCommentsAnalyze' with the minimum fields required to make a request.+newCommentAnalyzerCommentsAnalyze ::+  -- |  Multipart request metadata. See 'payload'.+  AnalyzeCommentRequest ->+  CommentAnalyzerCommentsAnalyze+newCommentAnalyzerCommentsAnalyze payload =+  CommentAnalyzerCommentsAnalyze+    { xgafv = Core.Nothing,+      accessToken = Core.Nothing,+      callback = Core.Nothing,+      payload = payload,+      uploadType = Core.Nothing,+      uploadProtocol = Core.Nothing+    }++instance Core.GoogleRequest CommentAnalyzerCommentsAnalyze where+  type Rs CommentAnalyzerCommentsAnalyze = AnalyzeCommentResponse+  type Scopes CommentAnalyzerCommentsAnalyze = '[Userinfo'Email]+  requestClient CommentAnalyzerCommentsAnalyze {..} =+    go+      xgafv+      accessToken+      callback+      uploadType+      uploadProtocol+      (Core.Just Core.AltJSON)+      payload+      commentAnalyzerService+    where+      go =+        Core.buildClient+          (Core.Proxy :: Core.Proxy CommentAnalyzerCommentsAnalyzeResource)+          Core.mempty
+ gen/Gogol/CommentAnalyzer/Comments/Suggestscore.hs view
@@ -0,0 +1,112 @@+{-# 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.CommentAnalyzer.Comments.Suggestscore+-- 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)+--+-- Suggest comment scores as training data.+--+-- /See:/ <https://github.com/conversationai/perspectiveapi/blob/master/README.md Perspective Comment Analyzer API Reference> for @commentanalyzer.comments.suggestscore@.+module Gogol.CommentAnalyzer.Comments.Suggestscore+  ( -- * Resource+    CommentAnalyzerCommentsSuggestscoreResource,++    -- ** Constructing a Request+    CommentAnalyzerCommentsSuggestscore (..),+    newCommentAnalyzerCommentsSuggestscore,+  )+where++import Gogol.CommentAnalyzer.Types+import Gogol.Prelude qualified as Core++-- | A resource alias for @commentanalyzer.comments.suggestscore@ method which the+-- 'CommentAnalyzerCommentsSuggestscore' request conforms to.+type CommentAnalyzerCommentsSuggestscoreResource =+  "v1alpha1"+    Core.:> "comments:suggestscore"+    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] SuggestCommentScoreRequest+    Core.:> Core.Post '[Core.JSON] SuggestCommentScoreResponse++-- | Suggest comment scores as training data.+--+-- /See:/ 'newCommentAnalyzerCommentsSuggestscore' smart constructor.+data CommentAnalyzerCommentsSuggestscore = CommentAnalyzerCommentsSuggestscore+  { -- | 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 :: SuggestCommentScoreRequest,+    -- | 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 'CommentAnalyzerCommentsSuggestscore' with the minimum fields required to make a request.+newCommentAnalyzerCommentsSuggestscore ::+  -- |  Multipart request metadata. See 'payload'.+  SuggestCommentScoreRequest ->+  CommentAnalyzerCommentsSuggestscore+newCommentAnalyzerCommentsSuggestscore payload =+  CommentAnalyzerCommentsSuggestscore+    { xgafv = Core.Nothing,+      accessToken = Core.Nothing,+      callback = Core.Nothing,+      payload = payload,+      uploadType = Core.Nothing,+      uploadProtocol = Core.Nothing+    }++instance Core.GoogleRequest CommentAnalyzerCommentsSuggestscore where+  type+    Rs CommentAnalyzerCommentsSuggestscore =+      SuggestCommentScoreResponse+  type Scopes CommentAnalyzerCommentsSuggestscore = '[Userinfo'Email]+  requestClient CommentAnalyzerCommentsSuggestscore {..} =+    go+      xgafv+      accessToken+      callback+      uploadType+      uploadProtocol+      (Core.Just Core.AltJSON)+      payload+      commentAnalyzerService+    where+      go =+        Core.buildClient+          ( Core.Proxy ::+              Core.Proxy CommentAnalyzerCommentsSuggestscoreResource+          )+          Core.mempty
+ gen/Gogol/CommentAnalyzer/Internal/Product.hs view
@@ -0,0 +1,692 @@+{-# 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.CommentAnalyzer.Internal.Product+-- 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)+module Gogol.CommentAnalyzer.Internal.Product+  ( -- * AnalyzeCommentRequest+    AnalyzeCommentRequest (..),+    newAnalyzeCommentRequest,++    -- * AnalyzeCommentRequest_RequestedAttributes+    AnalyzeCommentRequest_RequestedAttributes (..),+    newAnalyzeCommentRequest_RequestedAttributes,++    -- * AnalyzeCommentResponse+    AnalyzeCommentResponse (..),+    newAnalyzeCommentResponse,++    -- * AnalyzeCommentResponse_AttributeScores+    AnalyzeCommentResponse_AttributeScores (..),+    newAnalyzeCommentResponse_AttributeScores,++    -- * ArticleAndParentComment+    ArticleAndParentComment (..),+    newArticleAndParentComment,++    -- * AttributeParameters+    AttributeParameters (..),+    newAttributeParameters,++    -- * AttributeScores+    AttributeScores (..),+    newAttributeScores,++    -- * Context+    Context (..),+    newContext,++    -- * Score+    Score (..),+    newScore,++    -- * SpanScore+    SpanScore (..),+    newSpanScore,++    -- * SuggestCommentScoreRequest+    SuggestCommentScoreRequest (..),+    newSuggestCommentScoreRequest,++    -- * SuggestCommentScoreRequest_AttributeScores+    SuggestCommentScoreRequest_AttributeScores (..),+    newSuggestCommentScoreRequest_AttributeScores,++    -- * SuggestCommentScoreResponse+    SuggestCommentScoreResponse (..),+    newSuggestCommentScoreResponse,++    -- * TextEntry+    TextEntry (..),+    newTextEntry,+  )+where++import Gogol.CommentAnalyzer.Internal.Sum+import Gogol.Prelude qualified as Core++-- | The comment analysis request message. LINT.IfChange+--+-- /See:/ 'newAnalyzeCommentRequest' smart constructor.+data AnalyzeCommentRequest = AnalyzeCommentRequest+  { -- | Opaque token that is echoed from the request to the response.+    clientToken :: (Core.Maybe Core.Text),+    -- | The comment to analyze.+    comment :: (Core.Maybe TextEntry),+    -- | Optional identifier associating this AnalyzeCommentRequest with a particular client\'s community. Different communities may have different norms and rules. Specifying this value enables us to explore building community-specific models for clients.+    communityId :: (Core.Maybe Core.Text),+    -- | The context of the comment.+    context :: (Core.Maybe Context),+    -- | Do not store the comment or context sent in this request. By default, the service may store comments\/context for debugging purposes.+    doNotStore :: (Core.Maybe Core.Bool),+    -- | The language(s) of the comment and context. If none are specified, we attempt to automatically detect the language. Specifying multiple languages means the text contains multiple lanugages. Both ISO and BCP-47 language codes are accepted.+    --+    -- The server returns an error if no language was specified and language detection fails. The server also returns an error if the languages (either specified by the caller, or auto-detected) are not /all/ supported by the service.+    languages :: (Core.Maybe [Core.Text]),+    -- | Specification of requested attributes. The AttributeParameters serve as configuration for each associated attribute. The map keys are attribute names. The available attributes may be different on each RFE installation, and can be seen by calling ListAttributes (see above). For the prod installation, known as Perspective API, at blade:commentanalyzer-esf and commentanalyzer.googleapis.com, see go\/checker-models (internal) and https:\/\/github.com\/conversationai\/perspectiveapi\/blob\/master\/2-api\/models.md#all-attribute-types.+    requestedAttributes :: (Core.Maybe AnalyzeCommentRequest_RequestedAttributes),+    -- | Session ID. Used to join related RPCs into a single session. For example, an interactive tool that calls both the AnalyzeComment and SuggestCommentScore RPCs should set all invocations of both RPCs to the same Session ID, typically a random 64-bit integer.+    sessionId :: (Core.Maybe Core.Text),+    -- | An advisory parameter that will return span annotations if the model is capable of providing scores with sub-comment resolution. This will likely increase the size of the returned message.+    spanAnnotations :: (Core.Maybe Core.Bool)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'AnalyzeCommentRequest' with the minimum fields required to make a request.+newAnalyzeCommentRequest ::+  AnalyzeCommentRequest+newAnalyzeCommentRequest =+  AnalyzeCommentRequest+    { clientToken = Core.Nothing,+      comment = Core.Nothing,+      communityId = Core.Nothing,+      context = Core.Nothing,+      doNotStore = Core.Nothing,+      languages = Core.Nothing,+      requestedAttributes = Core.Nothing,+      sessionId = Core.Nothing,+      spanAnnotations = Core.Nothing+    }++instance Core.FromJSON AnalyzeCommentRequest where+  parseJSON =+    Core.withObject+      "AnalyzeCommentRequest"+      ( \o ->+          AnalyzeCommentRequest+            Core.<$> (o Core..:? "clientToken")+            Core.<*> (o Core..:? "comment")+            Core.<*> (o Core..:? "communityId")+            Core.<*> (o Core..:? "context")+            Core.<*> (o Core..:? "doNotStore")+            Core.<*> (o Core..:? "languages")+            Core.<*> (o Core..:? "requestedAttributes")+            Core.<*> (o Core..:? "sessionId")+            Core.<*> (o Core..:? "spanAnnotations")+      )++instance Core.ToJSON AnalyzeCommentRequest where+  toJSON AnalyzeCommentRequest {..} =+    Core.object+      ( Core.catMaybes+          [ ("clientToken" Core..=) Core.<$> clientToken,+            ("comment" Core..=) Core.<$> comment,+            ("communityId" Core..=) Core.<$> communityId,+            ("context" Core..=) Core.<$> context,+            ("doNotStore" Core..=) Core.<$> doNotStore,+            ("languages" Core..=) Core.<$> languages,+            ("requestedAttributes" Core..=) Core.<$> requestedAttributes,+            ("sessionId" Core..=) Core.<$> sessionId,+            ("spanAnnotations" Core..=) Core.<$> spanAnnotations+          ]+      )++-- | Specification of requested attributes. The AttributeParameters serve as configuration for each associated attribute. The map keys are attribute names. The available attributes may be different on each RFE installation, and can be seen by calling ListAttributes (see above). For the prod installation, known as Perspective API, at blade:commentanalyzer-esf and commentanalyzer.googleapis.com, see go\/checker-models (internal) and https:\/\/github.com\/conversationai\/perspectiveapi\/blob\/master\/2-api\/models.md#all-attribute-types.+--+-- /See:/ 'newAnalyzeCommentRequest_RequestedAttributes' smart constructor.+newtype AnalyzeCommentRequest_RequestedAttributes = AnalyzeCommentRequest_RequestedAttributes+  { additional :: (Core.HashMap Core.Text AttributeParameters)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'AnalyzeCommentRequest_RequestedAttributes' with the minimum fields required to make a request.+newAnalyzeCommentRequest_RequestedAttributes ::+  -- |  See 'additional'.+  Core.HashMap Core.Text AttributeParameters ->+  AnalyzeCommentRequest_RequestedAttributes+newAnalyzeCommentRequest_RequestedAttributes additional =+  AnalyzeCommentRequest_RequestedAttributes+    { additional =+        additional+    }++instance Core.FromJSON AnalyzeCommentRequest_RequestedAttributes where+  parseJSON =+    Core.withObject+      "AnalyzeCommentRequest_RequestedAttributes"+      ( \o ->+          AnalyzeCommentRequest_RequestedAttributes+            Core.<$> (Core.parseJSONObject o)+      )++instance Core.ToJSON AnalyzeCommentRequest_RequestedAttributes where+  toJSON AnalyzeCommentRequest_RequestedAttributes {..} =+    Core.toJSON additional++-- | The comment analysis response message.+--+-- /See:/ 'newAnalyzeCommentResponse' smart constructor.+data AnalyzeCommentResponse = AnalyzeCommentResponse+  { -- | Scores for the requested attributes. The map keys are attribute names (same as the requested/attribute field in AnalyzeCommentRequest, for example \"ATTACK/ON_AUTHOR\", \"INFLAMMATORY\", etc).+    attributeScores :: (Core.Maybe AnalyzeCommentResponse_AttributeScores),+    -- | Same token from the original AnalyzeCommentRequest.+    clientToken :: (Core.Maybe Core.Text),+    -- | Contains the languages detected from the text content, sorted in order of likelihood.+    detectedLanguages :: (Core.Maybe [Core.Text]),+    -- | The language(s) used by CommentAnalyzer service to choose which Model to use when analyzing the comment. Might better be called \"effective/languages\". The logic used to make the choice is as follows: if !Request.languages.empty() effective/languages = Request.languages else effective/languages = detected/languages[0]+    languages :: (Core.Maybe [Core.Text])+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'AnalyzeCommentResponse' with the minimum fields required to make a request.+newAnalyzeCommentResponse ::+  AnalyzeCommentResponse+newAnalyzeCommentResponse =+  AnalyzeCommentResponse+    { attributeScores = Core.Nothing,+      clientToken = Core.Nothing,+      detectedLanguages = Core.Nothing,+      languages = Core.Nothing+    }++instance Core.FromJSON AnalyzeCommentResponse where+  parseJSON =+    Core.withObject+      "AnalyzeCommentResponse"+      ( \o ->+          AnalyzeCommentResponse+            Core.<$> (o Core..:? "attributeScores")+            Core.<*> (o Core..:? "clientToken")+            Core.<*> (o Core..:? "detectedLanguages")+            Core.<*> (o Core..:? "languages")+      )++instance Core.ToJSON AnalyzeCommentResponse where+  toJSON AnalyzeCommentResponse {..} =+    Core.object+      ( Core.catMaybes+          [ ("attributeScores" Core..=) Core.<$> attributeScores,+            ("clientToken" Core..=) Core.<$> clientToken,+            ("detectedLanguages" Core..=) Core.<$> detectedLanguages,+            ("languages" Core..=) Core.<$> languages+          ]+      )++-- | Scores for the requested attributes. The map keys are attribute names (same as the requested/attribute field in AnalyzeCommentRequest, for example \"ATTACK/ON_AUTHOR\", \"INFLAMMATORY\", etc).+--+-- /See:/ 'newAnalyzeCommentResponse_AttributeScores' smart constructor.+newtype AnalyzeCommentResponse_AttributeScores = AnalyzeCommentResponse_AttributeScores+  { additional :: (Core.HashMap Core.Text AttributeScores)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'AnalyzeCommentResponse_AttributeScores' with the minimum fields required to make a request.+newAnalyzeCommentResponse_AttributeScores ::+  -- |  See 'additional'.+  Core.HashMap Core.Text AttributeScores ->+  AnalyzeCommentResponse_AttributeScores+newAnalyzeCommentResponse_AttributeScores additional =+  AnalyzeCommentResponse_AttributeScores {additional = additional}++instance Core.FromJSON AnalyzeCommentResponse_AttributeScores where+  parseJSON =+    Core.withObject+      "AnalyzeCommentResponse_AttributeScores"+      ( \o ->+          AnalyzeCommentResponse_AttributeScores+            Core.<$> (Core.parseJSONObject o)+      )++instance Core.ToJSON AnalyzeCommentResponse_AttributeScores where+  toJSON AnalyzeCommentResponse_AttributeScores {..} =+    Core.toJSON additional++-- | A type of context specific to a comment left on a single-threaded comment message board, where comments are either a top level comment or the child of a top level comment.+--+-- /See:/ 'newArticleAndParentComment' smart constructor.+data ArticleAndParentComment = ArticleAndParentComment+  { -- | The source content about which the comment was made (article text, article summary, video transcript, etc).+    article :: (Core.Maybe TextEntry),+    -- | Refers to text that is a direct parent of the source comment, such as in a one-deep threaded message board. This field will only be present for comments that are replies to other comments and will not be populated for direct comments on the article_text.+    parentComment :: (Core.Maybe TextEntry)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'ArticleAndParentComment' with the minimum fields required to make a request.+newArticleAndParentComment ::+  ArticleAndParentComment+newArticleAndParentComment =+  ArticleAndParentComment+    { article = Core.Nothing,+      parentComment = Core.Nothing+    }++instance Core.FromJSON ArticleAndParentComment where+  parseJSON =+    Core.withObject+      "ArticleAndParentComment"+      ( \o ->+          ArticleAndParentComment+            Core.<$> (o Core..:? "article")+            Core.<*> (o Core..:? "parentComment")+      )++instance Core.ToJSON ArticleAndParentComment where+  toJSON ArticleAndParentComment {..} =+    Core.object+      ( Core.catMaybes+          [ ("article" Core..=) Core.<$> article,+            ("parentComment" Core..=) Core.<$> parentComment+          ]+      )++-- | Configurable parameters for attribute scoring.+--+-- /See:/ 'newAttributeParameters' smart constructor.+data AttributeParameters = AttributeParameters+  { -- | Don\'t return scores for this attribute that are below this threshold. If unset, a default threshold will be applied. A FloatValue wrapper is used to distinguish between 0 vs. default\/unset.+    scoreThreshold :: (Core.Maybe Core.Double),+    -- | What type of scores to return. If unset, defaults to probability scores.+    scoreType :: (Core.Maybe AttributeParameters_ScoreType)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'AttributeParameters' with the minimum fields required to make a request.+newAttributeParameters ::+  AttributeParameters+newAttributeParameters =+  AttributeParameters+    { scoreThreshold = Core.Nothing,+      scoreType = Core.Nothing+    }++instance Core.FromJSON AttributeParameters where+  parseJSON =+    Core.withObject+      "AttributeParameters"+      ( \o ->+          AttributeParameters+            Core.<$> (o Core..:? "scoreThreshold")+            Core.<*> (o Core..:? "scoreType")+      )++instance Core.ToJSON AttributeParameters where+  toJSON AttributeParameters {..} =+    Core.object+      ( Core.catMaybes+          [ ("scoreThreshold" Core..=) Core.<$> scoreThreshold,+            ("scoreType" Core..=) Core.<$> scoreType+          ]+      )++-- | This holds score values for a single attribute. It contains both per-span scores as well as an overall summary score..+--+-- /See:/ 'newAttributeScores' smart constructor.+data AttributeScores = AttributeScores+  { -- | Per-span scores.+    spanScores :: (Core.Maybe [SpanScore]),+    -- | Overall score for comment as a whole.+    summaryScore :: (Core.Maybe Score)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'AttributeScores' with the minimum fields required to make a request.+newAttributeScores ::+  AttributeScores+newAttributeScores =+  AttributeScores+    { spanScores = Core.Nothing,+      summaryScore = Core.Nothing+    }++instance Core.FromJSON AttributeScores where+  parseJSON =+    Core.withObject+      "AttributeScores"+      ( \o ->+          AttributeScores+            Core.<$> (o Core..:? "spanScores")+            Core.<*> (o Core..:? "summaryScore")+      )++instance Core.ToJSON AttributeScores where+  toJSON AttributeScores {..} =+    Core.object+      ( Core.catMaybes+          [ ("spanScores" Core..=) Core.<$> spanScores,+            ("summaryScore" Core..=) Core.<$> summaryScore+          ]+      )++-- | Context is typically something that a Comment is referencing or replying to (such as an article, or previous comment). Note: Populate only ONE OF the following fields. The oneof syntax cannot be used because that would require nesting entries inside another message and breaking backwards compatibility. The server will return an error if more than one of the following fields is present.+--+-- /See:/ 'newContext' smart constructor.+data Context = Context+  { -- | Information about the source for which the original comment was made, and any parent comment info.+    articleAndParentComment :: (Core.Maybe ArticleAndParentComment),+    -- | A list of messages. For example, a linear comments section or forum thread.+    entries :: (Core.Maybe [TextEntry])+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Context' with the minimum fields required to make a request.+newContext ::+  Context+newContext =+  Context+    { articleAndParentComment = Core.Nothing,+      entries = Core.Nothing+    }++instance Core.FromJSON Context where+  parseJSON =+    Core.withObject+      "Context"+      ( \o ->+          Context+            Core.<$> (o Core..:? "articleAndParentComment")+            Core.<*> (o Core..:? "entries")+      )++instance Core.ToJSON Context where+  toJSON Context {..} =+    Core.object+      ( Core.catMaybes+          [ ("articleAndParentComment" Core..=)+              Core.<$> articleAndParentComment,+            ("entries" Core..=) Core.<$> entries+          ]+      )++-- | Analysis scores are described by a value and a ScoreType.+--+-- /See:/ 'newScore' smart constructor.+data Score = Score+  { -- | The type of the above value.+    type' :: (Core.Maybe Score_Type),+    -- | Score value. Semantics described by type below.+    value :: (Core.Maybe Core.Double)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Score' with the minimum fields required to make a request.+newScore ::+  Score+newScore = Score {type' = Core.Nothing, value = Core.Nothing}++instance Core.FromJSON Score where+  parseJSON =+    Core.withObject+      "Score"+      ( \o ->+          Score Core.<$> (o Core..:? "type") Core.<*> (o Core..:? "value")+      )++instance Core.ToJSON Score where+  toJSON Score {..} =+    Core.object+      ( Core.catMaybes+          [ ("type" Core..=) Core.<$> type',+            ("value" Core..=) Core.<$> value+          ]+      )++-- | This is a single score for a given span of text.+--+-- /See:/ 'newSpanScore' smart constructor.+data SpanScore = SpanScore+  { -- | \"begin\" and \"end\" describe the span of the original text that the attribute score applies to. The values are the UTF-16 codepoint range. \"end\" is exclusive. For example, with the text \"Hi there\", the begin\/end pair (0,2) describes the text \"Hi\".+    --+    -- If \"begin\" and \"end\" are unset, the score applies to the full text.+    begin :: (Core.Maybe Core.Int32),+    end :: (Core.Maybe Core.Int32),+    -- | The score value.+    score :: (Core.Maybe Score)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'SpanScore' with the minimum fields required to make a request.+newSpanScore ::+  SpanScore+newSpanScore =+  SpanScore+    { begin = Core.Nothing,+      end = Core.Nothing,+      score = Core.Nothing+    }++instance Core.FromJSON SpanScore where+  parseJSON =+    Core.withObject+      "SpanScore"+      ( \o ->+          SpanScore+            Core.<$> (o Core..:? "begin")+            Core.<*> (o Core..:? "end")+            Core.<*> (o Core..:? "score")+      )++instance Core.ToJSON SpanScore where+  toJSON SpanScore {..} =+    Core.object+      ( Core.catMaybes+          [ ("begin" Core..=) Core.<$> begin,+            ("end" Core..=) Core.<$> end,+            ("score" Core..=) Core.<$> score+          ]+      )++-- | The comment score suggestion request message.+--+-- /See:/ 'newSuggestCommentScoreRequest' smart constructor.+data SuggestCommentScoreRequest = SuggestCommentScoreRequest+  { -- | Attribute scores for the comment. The map keys are attribute names, same as the requested/attribute field in AnalyzeCommentRequest (for example \"ATTACK/ON_AUTHOR\", \"INFLAMMATORY\", etc.). This field has the same type as the @attribute_scores@ field in AnalyzeCommentResponse.+    --+    -- To specify an overall attribute score for the entire comment as a whole, use the @summary_score@ field of the mapped AttributeScores object. To specify scores on specific subparts of the comment, use the @span_scores@ field. All SpanScore objects must have begin and end fields set.+    --+    -- All Score objects must be explicitly set (for binary classification, use the score values 0 and 1). If Score objects don\'t include a ScoreType, @PROBABILITY@ is assumed.+    --+    -- @attribute_scores@ must not be empty. The mapped AttributeScores objects also must not be empty. An @INVALID_ARGUMENT@ error is returned for all malformed requests.+    attributeScores :: (Core.Maybe SuggestCommentScoreRequest_AttributeScores),+    -- | Opaque token that is echoed from the request to the response.+    clientToken :: (Core.Maybe Core.Text),+    -- | The comment being scored.+    comment :: (Core.Maybe TextEntry),+    -- | Optional identifier associating this comment score suggestion with a particular sub-community. Different communities may have different norms and rules. Specifying this value enables training community-specific models.+    communityId :: (Core.Maybe Core.Text),+    -- | The context of the comment.+    context :: (Core.Maybe Context),+    -- | The language(s) of the comment and context. If none are specified, we attempt to automatically detect the language. Both ISO and BCP-47 language codes are accepted.+    languages :: (Core.Maybe [Core.Text]),+    -- | Session ID. Used to join related RPCs into a single session. For example, an interactive tool that calls both the AnalyzeComment and SuggestCommentScore RPCs should set all invocations of both RPCs to the same Session ID, typically a random 64-bit integer.+    sessionId :: (Core.Maybe Core.Text)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'SuggestCommentScoreRequest' with the minimum fields required to make a request.+newSuggestCommentScoreRequest ::+  SuggestCommentScoreRequest+newSuggestCommentScoreRequest =+  SuggestCommentScoreRequest+    { attributeScores = Core.Nothing,+      clientToken = Core.Nothing,+      comment = Core.Nothing,+      communityId = Core.Nothing,+      context = Core.Nothing,+      languages = Core.Nothing,+      sessionId = Core.Nothing+    }++instance Core.FromJSON SuggestCommentScoreRequest where+  parseJSON =+    Core.withObject+      "SuggestCommentScoreRequest"+      ( \o ->+          SuggestCommentScoreRequest+            Core.<$> (o Core..:? "attributeScores")+            Core.<*> (o Core..:? "clientToken")+            Core.<*> (o Core..:? "comment")+            Core.<*> (o Core..:? "communityId")+            Core.<*> (o Core..:? "context")+            Core.<*> (o Core..:? "languages")+            Core.<*> (o Core..:? "sessionId")+      )++instance Core.ToJSON SuggestCommentScoreRequest where+  toJSON SuggestCommentScoreRequest {..} =+    Core.object+      ( Core.catMaybes+          [ ("attributeScores" Core..=) Core.<$> attributeScores,+            ("clientToken" Core..=) Core.<$> clientToken,+            ("comment" Core..=) Core.<$> comment,+            ("communityId" Core..=) Core.<$> communityId,+            ("context" Core..=) Core.<$> context,+            ("languages" Core..=) Core.<$> languages,+            ("sessionId" Core..=) Core.<$> sessionId+          ]+      )++-- | Attribute scores for the comment. The map keys are attribute names, same as the requested/attribute field in AnalyzeCommentRequest (for example \"ATTACK/ON_AUTHOR\", \"INFLAMMATORY\", etc.). This field has the same type as the @attribute_scores@ field in AnalyzeCommentResponse.+--+-- To specify an overall attribute score for the entire comment as a whole, use the @summary_score@ field of the mapped AttributeScores object. To specify scores on specific subparts of the comment, use the @span_scores@ field. All SpanScore objects must have begin and end fields set.+--+-- All Score objects must be explicitly set (for binary classification, use the score values 0 and 1). If Score objects don\'t include a ScoreType, @PROBABILITY@ is assumed.+--+-- @attribute_scores@ must not be empty. The mapped AttributeScores objects also must not be empty. An @INVALID_ARGUMENT@ error is returned for all malformed requests.+--+-- /See:/ 'newSuggestCommentScoreRequest_AttributeScores' smart constructor.+newtype SuggestCommentScoreRequest_AttributeScores = SuggestCommentScoreRequest_AttributeScores+  { additional :: (Core.HashMap Core.Text AttributeScores)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'SuggestCommentScoreRequest_AttributeScores' with the minimum fields required to make a request.+newSuggestCommentScoreRequest_AttributeScores ::+  -- |  See 'additional'.+  Core.HashMap Core.Text AttributeScores ->+  SuggestCommentScoreRequest_AttributeScores+newSuggestCommentScoreRequest_AttributeScores additional =+  SuggestCommentScoreRequest_AttributeScores+    { additional =+        additional+    }++instance Core.FromJSON SuggestCommentScoreRequest_AttributeScores where+  parseJSON =+    Core.withObject+      "SuggestCommentScoreRequest_AttributeScores"+      ( \o ->+          SuggestCommentScoreRequest_AttributeScores+            Core.<$> (Core.parseJSONObject o)+      )++instance Core.ToJSON SuggestCommentScoreRequest_AttributeScores where+  toJSON SuggestCommentScoreRequest_AttributeScores {..} =+    Core.toJSON additional++-- | The comment score suggestion response message.+--+-- /See:/ 'newSuggestCommentScoreResponse' smart constructor.+data SuggestCommentScoreResponse = SuggestCommentScoreResponse+  { -- | Same token from the original SuggestCommentScoreRequest.+    clientToken :: (Core.Maybe Core.Text),+    -- | The list of languages detected from the comment text.+    detectedLanguages :: (Core.Maybe [Core.Text]),+    -- | The list of languages provided in the request.+    requestedLanguages :: (Core.Maybe [Core.Text])+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'SuggestCommentScoreResponse' with the minimum fields required to make a request.+newSuggestCommentScoreResponse ::+  SuggestCommentScoreResponse+newSuggestCommentScoreResponse =+  SuggestCommentScoreResponse+    { clientToken = Core.Nothing,+      detectedLanguages = Core.Nothing,+      requestedLanguages = Core.Nothing+    }++instance Core.FromJSON SuggestCommentScoreResponse where+  parseJSON =+    Core.withObject+      "SuggestCommentScoreResponse"+      ( \o ->+          SuggestCommentScoreResponse+            Core.<$> (o Core..:? "clientToken")+            Core.<*> (o Core..:? "detectedLanguages")+            Core.<*> (o Core..:? "requestedLanguages")+      )++instance Core.ToJSON SuggestCommentScoreResponse where+  toJSON SuggestCommentScoreResponse {..} =+    Core.object+      ( Core.catMaybes+          [ ("clientToken" Core..=) Core.<$> clientToken,+            ("detectedLanguages" Core..=) Core.<$> detectedLanguages,+            ("requestedLanguages" Core..=) Core.<$> requestedLanguages+          ]+      )++-- | Represents a body of text.+--+-- /See:/ 'newTextEntry' smart constructor.+data TextEntry = TextEntry+  { -- | UTF-8 encoded text.+    text :: (Core.Maybe Core.Text),+    -- | Type of the text field.+    type' :: (Core.Maybe TextEntry_Type)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'TextEntry' with the minimum fields required to make a request.+newTextEntry ::+  TextEntry+newTextEntry = TextEntry {text = Core.Nothing, type' = Core.Nothing}++instance Core.FromJSON TextEntry where+  parseJSON =+    Core.withObject+      "TextEntry"+      ( \o ->+          TextEntry+            Core.<$> (o Core..:? "text")+            Core.<*> (o Core..:? "type")+      )++instance Core.ToJSON TextEntry where+  toJSON TextEntry {..} =+    Core.object+      ( Core.catMaybes+          [("text" Core..=) Core.<$> text, ("type" Core..=) Core.<$> type']+      )
+ gen/Gogol/CommentAnalyzer/Internal/Sum.hs view
@@ -0,0 +1,207 @@+{-# 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.CommentAnalyzer.Internal.Sum+-- 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)+module Gogol.CommentAnalyzer.Internal.Sum+  ( -- * Xgafv+    Xgafv+      ( Xgafv_1,+        Xgafv_2,+        ..+      ),++    -- * AttributeParameters_ScoreType+    AttributeParameters_ScoreType+      ( AttributeParameters_ScoreType_SCORETYPEUNSPECIFIED,+        AttributeParameters_ScoreType_Probability,+        AttributeParameters_ScoreType_STDDEVSCORE,+        AttributeParameters_ScoreType_Percentile,+        AttributeParameters_ScoreType_Raw,+        ..+      ),++    -- * Score_Type+    Score_Type+      ( Score_Type_SCORETYPEUNSPECIFIED,+        Score_Type_Probability,+        Score_Type_STDDEVSCORE,+        Score_Type_Percentile,+        Score_Type_Raw,+        ..+      ),++    -- * TextEntry_Type+    TextEntry_Type+      ( TextEntry_Type_TEXTTYPEUNSPECIFIED,+        TextEntry_Type_PLAINTEXT,+        TextEntry_Type_Html,+        ..+      ),+  )+where++import Gogol.Prelude qualified as Core++-- | V1 error format.+newtype Xgafv = Xgafv {fromXgafv :: Core.Text}+  deriving stock (Core.Show, Core.Read, Core.Eq, Core.Ord, Core.Generic)+  deriving newtype+    ( Core.Hashable,+      Core.ToHttpApiData,+      Core.FromHttpApiData,+      Core.ToJSON,+      Core.ToJSONKey,+      Core.FromJSON,+      Core.FromJSONKey+    )++-- | v1 error format+pattern Xgafv_1 :: Xgafv+pattern Xgafv_1 = Xgafv "1"++-- | v2 error format+pattern Xgafv_2 :: Xgafv+pattern Xgafv_2 = Xgafv "2"++{-# COMPLETE+  Xgafv_1,+  Xgafv_2,+  Xgafv+  #-}++-- | What type of scores to return. If unset, defaults to probability scores.+newtype AttributeParameters_ScoreType = AttributeParameters_ScoreType {fromAttributeParameters_ScoreType :: Core.Text}+  deriving stock (Core.Show, Core.Read, Core.Eq, Core.Ord, Core.Generic)+  deriving newtype+    ( Core.Hashable,+      Core.ToHttpApiData,+      Core.FromHttpApiData,+      Core.ToJSON,+      Core.ToJSONKey,+      Core.FromJSON,+      Core.FromJSONKey+    )++-- | Unspecified. Defaults to PROBABILITY scores if available, and otherwise RAW. Every model has a RAW score.+pattern AttributeParameters_ScoreType_SCORETYPEUNSPECIFIED :: AttributeParameters_ScoreType+pattern AttributeParameters_ScoreType_SCORETYPEUNSPECIFIED = AttributeParameters_ScoreType "SCORE_TYPE_UNSPECIFIED"++-- | Probability scores are in the range [0, 1] and indicate level of confidence in the attribute label.+pattern AttributeParameters_ScoreType_Probability :: AttributeParameters_ScoreType+pattern AttributeParameters_ScoreType_Probability = AttributeParameters_ScoreType "PROBABILITY"++-- | Standard deviation scores are in the range (-inf, +inf).+pattern AttributeParameters_ScoreType_STDDEVSCORE :: AttributeParameters_ScoreType+pattern AttributeParameters_ScoreType_STDDEVSCORE = AttributeParameters_ScoreType "STD_DEV_SCORE"++-- | Percentile scores are in the range [0, 1] and indicate the percentile of the raw score, normalized with a test dataset. This is not generally recommended, as the normalization is dependent on the dataset used, which may not match other usecases.+pattern AttributeParameters_ScoreType_Percentile :: AttributeParameters_ScoreType+pattern AttributeParameters_ScoreType_Percentile = AttributeParameters_ScoreType "PERCENTILE"++-- | Raw scores are the raw values from the model, and may take any value. This is primarily for debugging\/testing, and not generally recommended.+pattern AttributeParameters_ScoreType_Raw :: AttributeParameters_ScoreType+pattern AttributeParameters_ScoreType_Raw = AttributeParameters_ScoreType "RAW"++{-# COMPLETE+  AttributeParameters_ScoreType_SCORETYPEUNSPECIFIED,+  AttributeParameters_ScoreType_Probability,+  AttributeParameters_ScoreType_STDDEVSCORE,+  AttributeParameters_ScoreType_Percentile,+  AttributeParameters_ScoreType_Raw,+  AttributeParameters_ScoreType+  #-}++-- | The type of the above value.+newtype Score_Type = Score_Type {fromScore_Type :: Core.Text}+  deriving stock (Core.Show, Core.Read, Core.Eq, Core.Ord, Core.Generic)+  deriving newtype+    ( Core.Hashable,+      Core.ToHttpApiData,+      Core.FromHttpApiData,+      Core.ToJSON,+      Core.ToJSONKey,+      Core.FromJSON,+      Core.FromJSONKey+    )++-- | Unspecified. Defaults to PROBABILITY scores if available, and otherwise RAW. Every model has a RAW score.+pattern Score_Type_SCORETYPEUNSPECIFIED :: Score_Type+pattern Score_Type_SCORETYPEUNSPECIFIED = Score_Type "SCORE_TYPE_UNSPECIFIED"++-- | Probability scores are in the range [0, 1] and indicate level of confidence in the attribute label.+pattern Score_Type_Probability :: Score_Type+pattern Score_Type_Probability = Score_Type "PROBABILITY"++-- | Standard deviation scores are in the range (-inf, +inf).+pattern Score_Type_STDDEVSCORE :: Score_Type+pattern Score_Type_STDDEVSCORE = Score_Type "STD_DEV_SCORE"++-- | Percentile scores are in the range [0, 1] and indicate the percentile of the raw score, normalized with a test dataset. This is not generally recommended, as the normalization is dependent on the dataset used, which may not match other usecases.+pattern Score_Type_Percentile :: Score_Type+pattern Score_Type_Percentile = Score_Type "PERCENTILE"++-- | Raw scores are the raw values from the model, and may take any value. This is primarily for debugging\/testing, and not generally recommended.+pattern Score_Type_Raw :: Score_Type+pattern Score_Type_Raw = Score_Type "RAW"++{-# COMPLETE+  Score_Type_SCORETYPEUNSPECIFIED,+  Score_Type_Probability,+  Score_Type_STDDEVSCORE,+  Score_Type_Percentile,+  Score_Type_Raw,+  Score_Type+  #-}++-- | Type of the text field.+newtype TextEntry_Type = TextEntry_Type {fromTextEntry_Type :: Core.Text}+  deriving stock (Core.Show, Core.Read, Core.Eq, Core.Ord, Core.Generic)+  deriving newtype+    ( Core.Hashable,+      Core.ToHttpApiData,+      Core.FromHttpApiData,+      Core.ToJSON,+      Core.ToJSONKey,+      Core.FromJSON,+      Core.FromJSONKey+    )++-- | The content type is not specified. Text will be interpreted as plain text by default.+pattern TextEntry_Type_TEXTTYPEUNSPECIFIED :: TextEntry_Type+pattern TextEntry_Type_TEXTTYPEUNSPECIFIED = TextEntry_Type "TEXT_TYPE_UNSPECIFIED"++-- | Plain text.+pattern TextEntry_Type_PLAINTEXT :: TextEntry_Type+pattern TextEntry_Type_PLAINTEXT = TextEntry_Type "PLAIN_TEXT"++-- | HTML.+pattern TextEntry_Type_Html :: TextEntry_Type+pattern TextEntry_Type_Html = TextEntry_Type "HTML"++{-# COMPLETE+  TextEntry_Type_TEXTTYPEUNSPECIFIED,+  TextEntry_Type_PLAINTEXT,+  TextEntry_Type_Html,+  TextEntry_Type+  #-}
+ gen/Gogol/CommentAnalyzer/Types.hs view
@@ -0,0 +1,118 @@+{-# 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.CommentAnalyzer.Types+-- 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)+module Gogol.CommentAnalyzer.Types+  ( -- * Configuration+    commentAnalyzerService,++    -- * OAuth Scopes+    Userinfo'Email,++    -- * Types++    -- ** Xgafv+    Xgafv (..),++    -- ** AnalyzeCommentRequest+    AnalyzeCommentRequest (..),+    newAnalyzeCommentRequest,++    -- ** AnalyzeCommentRequest_RequestedAttributes+    AnalyzeCommentRequest_RequestedAttributes (..),+    newAnalyzeCommentRequest_RequestedAttributes,++    -- ** AnalyzeCommentResponse+    AnalyzeCommentResponse (..),+    newAnalyzeCommentResponse,++    -- ** AnalyzeCommentResponse_AttributeScores+    AnalyzeCommentResponse_AttributeScores (..),+    newAnalyzeCommentResponse_AttributeScores,++    -- ** ArticleAndParentComment+    ArticleAndParentComment (..),+    newArticleAndParentComment,++    -- ** AttributeParameters+    AttributeParameters (..),+    newAttributeParameters,++    -- ** AttributeParameters_ScoreType+    AttributeParameters_ScoreType (..),++    -- ** AttributeScores+    AttributeScores (..),+    newAttributeScores,++    -- ** Context+    Context (..),+    newContext,++    -- ** Score+    Score (..),+    newScore,++    -- ** Score_Type+    Score_Type (..),++    -- ** SpanScore+    SpanScore (..),+    newSpanScore,++    -- ** SuggestCommentScoreRequest+    SuggestCommentScoreRequest (..),+    newSuggestCommentScoreRequest,++    -- ** SuggestCommentScoreRequest_AttributeScores+    SuggestCommentScoreRequest_AttributeScores (..),+    newSuggestCommentScoreRequest_AttributeScores,++    -- ** SuggestCommentScoreResponse+    SuggestCommentScoreResponse (..),+    newSuggestCommentScoreResponse,++    -- ** TextEntry+    TextEntry (..),+    newTextEntry,++    -- ** TextEntry_Type+    TextEntry_Type (..),+  )+where++import Gogol.CommentAnalyzer.Internal.Product+import Gogol.CommentAnalyzer.Internal.Sum+import Gogol.Prelude qualified as Core++-- | Default request referring to version @v1alpha1@ of the Perspective Comment Analyzer API. This contains the host and root path used as a starting point for constructing service requests.+commentAnalyzerService :: Core.ServiceConfig+commentAnalyzerService =+  Core.defaultService+    (Core.ServiceId "commentanalyzer:v1alpha1")+    "commentanalyzer.googleapis.com"++-- | View your email address+type Userinfo'Email =+  "https://www.googleapis.com/auth/userinfo.email"
− gen/Network/Google/CommentAnalyzer.hs
@@ -1,168 +0,0 @@-{-# LANGUAGE DataKinds         #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE TypeOperators     #-}--{-# OPTIONS_GHC -fno-warn-unused-imports    #-}-{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}---- |--- Module      : Network.Google.CommentAnalyzer--- 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)------ The Perspective Comment Analyzer API provides information about the--- potential impact of a comment on a conversation (e.g. it can provide a--- score for the \"toxicity\" of a comment). Users can leverage the--- \"SuggestCommentScore\" method to submit corrections to improve--- Perspective over time. Users can set the \"doNotStore\" flag to ensure--- that all submitted comments are automatically deleted after scores are--- returned.------ /See:/ <https://conversationai.github.io/ Perspective Comment Analyzer API Reference>-module Network.Google.CommentAnalyzer-    (-    -- * Service Configuration-      commentAnalyzerService--    -- * OAuth Scopes-    , userInfoEmailScope--    -- * API Declaration-    , CommentAnalyzerAPI--    -- * Resources--    -- ** commentanalyzer.comments.analyze-    , module Network.Google.Resource.CommentAnalyzer.Comments.Analyze--    -- ** commentanalyzer.comments.suggestscore-    , module Network.Google.Resource.CommentAnalyzer.Comments.Suggestscore--    -- * Types--    -- ** SpanScore-    , SpanScore-    , spanScore-    , ssBegin-    , ssScore-    , ssEnd--    -- ** AnalyzeCommentResponse-    , AnalyzeCommentResponse-    , analyzeCommentResponse-    , acrDetectedLanguages-    , acrClientToken-    , acrLanguages-    , acrAttributeScores--    -- ** SuggestCommentScoreResponse-    , SuggestCommentScoreResponse-    , suggestCommentScoreResponse-    , scsrDetectedLanguages-    , scsrClientToken-    , scsrRequestedLanguages--    -- ** Context-    , Context-    , context-    , cEntries-    , cArticleAndParentComment--    -- ** Score-    , Score-    , score-    , sValue-    , sType--    -- ** ArticleAndParentComment-    , ArticleAndParentComment-    , articleAndParentComment-    , aapcArticle-    , aapcParentComment--    -- ** AttributeParameters-    , AttributeParameters-    , attributeParameters-    , apScoreThreshold-    , apScoreType--    -- ** TextEntry-    , TextEntry-    , textEntry-    , teText-    , teType--    -- ** AttributeScores-    , AttributeScores-    , attributeScores-    , asSummaryScore-    , asSpanScores--    -- ** Xgafv-    , Xgafv (..)--    -- ** ScoreType-    , ScoreType (..)--    -- ** AnalyzeCommentResponseAttributeScores-    , AnalyzeCommentResponseAttributeScores-    , analyzeCommentResponseAttributeScores-    , acrasAddtional--    -- ** SuggestCommentScoreRequest-    , SuggestCommentScoreRequest-    , suggestCommentScoreRequest-    , sContext-    , sClientToken-    , sLanguages-    , sAttributeScores-    , sSessionId-    , sComment-    , sCommUnityId--    -- ** AttributeParametersScoreType-    , AttributeParametersScoreType (..)--    -- ** AnalyzeCommentRequest-    , AnalyzeCommentRequest-    , analyzeCommentRequest-    , aContext-    , aClientToken-    , aSpanAnnotations-    , aDoNotStore-    , aLanguages-    , aRequestedAttributes-    , aSessionId-    , aComment-    , aCommUnityId--    -- ** SuggestCommentScoreRequestAttributeScores-    , SuggestCommentScoreRequestAttributeScores-    , suggestCommentScoreRequestAttributeScores-    , scsrasAddtional--    -- ** AnalyzeCommentRequestRequestedAttributes-    , AnalyzeCommentRequestRequestedAttributes-    , analyzeCommentRequestRequestedAttributes-    , acrraAddtional--    -- ** TextEntryType-    , TextEntryType (..)-    ) where--import           Network.Google.CommentAnalyzer.Types-import           Network.Google.Prelude-import           Network.Google.Resource.CommentAnalyzer.Comments.Analyze-import           Network.Google.Resource.CommentAnalyzer.Comments.Suggestscore--{- $resources-TODO--}---- | Represents the entirety of the methods and resources available for the Perspective Comment Analyzer API service.-type CommentAnalyzerAPI =-     CommentsSuggestscoreResource :<|>-       CommentsAnalyzeResource
− gen/Network/Google/CommentAnalyzer/Types.hs
@@ -1,148 +0,0 @@-{-# LANGUAGE DataKinds          #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE NoImplicitPrelude  #-}-{-# LANGUAGE OverloadedStrings  #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- |--- Module      : Network.Google.CommentAnalyzer.Types--- 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.CommentAnalyzer.Types-    (-    -- * Service Configuration-      commentAnalyzerService--    -- * OAuth Scopes-    , userInfoEmailScope--    -- * SpanScore-    , SpanScore-    , spanScore-    , ssBegin-    , ssScore-    , ssEnd--    -- * AnalyzeCommentResponse-    , AnalyzeCommentResponse-    , analyzeCommentResponse-    , acrDetectedLanguages-    , acrClientToken-    , acrLanguages-    , acrAttributeScores--    -- * SuggestCommentScoreResponse-    , SuggestCommentScoreResponse-    , suggestCommentScoreResponse-    , scsrDetectedLanguages-    , scsrClientToken-    , scsrRequestedLanguages--    -- * Context-    , Context-    , context-    , cEntries-    , cArticleAndParentComment--    -- * Score-    , Score-    , score-    , sValue-    , sType--    -- * ArticleAndParentComment-    , ArticleAndParentComment-    , articleAndParentComment-    , aapcArticle-    , aapcParentComment--    -- * AttributeParameters-    , AttributeParameters-    , attributeParameters-    , apScoreThreshold-    , apScoreType--    -- * TextEntry-    , TextEntry-    , textEntry-    , teText-    , teType--    -- * AttributeScores-    , AttributeScores-    , attributeScores-    , asSummaryScore-    , asSpanScores--    -- * Xgafv-    , Xgafv (..)--    -- * ScoreType-    , ScoreType (..)--    -- * AnalyzeCommentResponseAttributeScores-    , AnalyzeCommentResponseAttributeScores-    , analyzeCommentResponseAttributeScores-    , acrasAddtional--    -- * SuggestCommentScoreRequest-    , SuggestCommentScoreRequest-    , suggestCommentScoreRequest-    , sContext-    , sClientToken-    , sLanguages-    , sAttributeScores-    , sSessionId-    , sComment-    , sCommUnityId--    -- * AttributeParametersScoreType-    , AttributeParametersScoreType (..)--    -- * AnalyzeCommentRequest-    , AnalyzeCommentRequest-    , analyzeCommentRequest-    , aContext-    , aClientToken-    , aSpanAnnotations-    , aDoNotStore-    , aLanguages-    , aRequestedAttributes-    , aSessionId-    , aComment-    , aCommUnityId--    -- * SuggestCommentScoreRequestAttributeScores-    , SuggestCommentScoreRequestAttributeScores-    , suggestCommentScoreRequestAttributeScores-    , scsrasAddtional--    -- * AnalyzeCommentRequestRequestedAttributes-    , AnalyzeCommentRequestRequestedAttributes-    , analyzeCommentRequestRequestedAttributes-    , acrraAddtional--    -- * TextEntryType-    , TextEntryType (..)-    ) where--import           Network.Google.CommentAnalyzer.Types.Product-import           Network.Google.CommentAnalyzer.Types.Sum-import           Network.Google.Prelude---- | Default request referring to version 'v1alpha1' of the Perspective Comment Analyzer API. This contains the host and root path used as a starting point for constructing service requests.-commentAnalyzerService :: ServiceConfig-commentAnalyzerService-  = defaultService-      (ServiceId "commentanalyzer:v1alpha1")-      "commentanalyzer.googleapis.com"---- | View your email address-userInfoEmailScope :: Proxy '["https://www.googleapis.com/auth/userinfo.email"]-userInfoEmailScope = Proxy
− gen/Network/Google/CommentAnalyzer/Types/Product.hs
@@ -1,988 +0,0 @@-{-# 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.CommentAnalyzer.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.CommentAnalyzer.Types.Product where--import           Network.Google.CommentAnalyzer.Types.Sum-import           Network.Google.Prelude---- | This is a single score for a given span of text.------ /See:/ 'spanScore' smart constructor.-data SpanScore =-  SpanScore'-    { _ssBegin :: !(Maybe (Textual Int32))-    , _ssScore :: !(Maybe Score)-    , _ssEnd   :: !(Maybe (Textual Int32))-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'SpanScore' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'ssBegin'------ * 'ssScore'------ * 'ssEnd'-spanScore-    :: SpanScore-spanScore =-  SpanScore' {_ssBegin = Nothing, _ssScore = Nothing, _ssEnd = Nothing}----- | \"begin\" and \"end\" describe the span of the original text that the--- attribute score applies to. The values are the UTF-16 codepoint range.--- \"end\" is exclusive. For example, with the text \"Hi there\", the--- begin\/end pair (0,2) describes the text \"Hi\". If \"begin\" and--- \"end\" are unset, the score applies to the full text.-ssBegin :: Lens' SpanScore (Maybe Int32)-ssBegin-  = lens _ssBegin (\ s a -> s{_ssBegin = a}) .-      mapping _Coerce---- | The score value.-ssScore :: Lens' SpanScore (Maybe Score)-ssScore = lens _ssScore (\ s a -> s{_ssScore = a})--ssEnd :: Lens' SpanScore (Maybe Int32)-ssEnd-  = lens _ssEnd (\ s a -> s{_ssEnd = a}) .-      mapping _Coerce--instance FromJSON SpanScore where-        parseJSON-          = withObject "SpanScore"-              (\ o ->-                 SpanScore' <$>-                   (o .:? "begin") <*> (o .:? "score") <*>-                     (o .:? "end"))--instance ToJSON SpanScore where-        toJSON SpanScore'{..}-          = object-              (catMaybes-                 [("begin" .=) <$> _ssBegin,-                  ("score" .=) <$> _ssScore, ("end" .=) <$> _ssEnd])---- | The comment analysis response message.------ /See:/ 'analyzeCommentResponse' smart constructor.-data AnalyzeCommentResponse =-  AnalyzeCommentResponse'-    { _acrDetectedLanguages :: !(Maybe [Text])-    , _acrClientToken       :: !(Maybe Text)-    , _acrLanguages         :: !(Maybe [Text])-    , _acrAttributeScores   :: !(Maybe AnalyzeCommentResponseAttributeScores)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'AnalyzeCommentResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'acrDetectedLanguages'------ * 'acrClientToken'------ * 'acrLanguages'------ * 'acrAttributeScores'-analyzeCommentResponse-    :: AnalyzeCommentResponse-analyzeCommentResponse =-  AnalyzeCommentResponse'-    { _acrDetectedLanguages = Nothing-    , _acrClientToken = Nothing-    , _acrLanguages = Nothing-    , _acrAttributeScores = Nothing-    }----- | Contains the language as detected from the text content. If no language--- was specified in the request, the first (the most likely) language is--- used to select an appropriate model. Sorted in order of likelihood.-acrDetectedLanguages :: Lens' AnalyzeCommentResponse [Text]-acrDetectedLanguages-  = lens _acrDetectedLanguages-      (\ s a -> s{_acrDetectedLanguages = a})-      . _Default-      . _Coerce---- | Same token from the original AnalyzeCommentRequest.-acrClientToken :: Lens' AnalyzeCommentResponse (Maybe Text)-acrClientToken-  = lens _acrClientToken-      (\ s a -> s{_acrClientToken = a})---- | The language(s) requested by the client, as specified in the request. If--- the request did not specify any language, this will be empty and the--- detected_languages field will be populated.-acrLanguages :: Lens' AnalyzeCommentResponse [Text]-acrLanguages-  = lens _acrLanguages (\ s a -> s{_acrLanguages = a})-      . _Default-      . _Coerce---- | Scores for the requested attributes. The map keys are attribute names--- (same as the requested_attribute field in AnalyzeCommentRequest, for--- example \"ATTACK_ON_AUTHOR\", \"INFLAMMATORY\", etc).-acrAttributeScores :: Lens' AnalyzeCommentResponse (Maybe AnalyzeCommentResponseAttributeScores)-acrAttributeScores-  = lens _acrAttributeScores-      (\ s a -> s{_acrAttributeScores = a})--instance FromJSON AnalyzeCommentResponse where-        parseJSON-          = withObject "AnalyzeCommentResponse"-              (\ o ->-                 AnalyzeCommentResponse' <$>-                   (o .:? "detectedLanguages" .!= mempty) <*>-                     (o .:? "clientToken")-                     <*> (o .:? "languages" .!= mempty)-                     <*> (o .:? "attributeScores"))--instance ToJSON AnalyzeCommentResponse where-        toJSON AnalyzeCommentResponse'{..}-          = object-              (catMaybes-                 [("detectedLanguages" .=) <$> _acrDetectedLanguages,-                  ("clientToken" .=) <$> _acrClientToken,-                  ("languages" .=) <$> _acrLanguages,-                  ("attributeScores" .=) <$> _acrAttributeScores])---- | The comment score suggestion response message.------ /See:/ 'suggestCommentScoreResponse' smart constructor.-data SuggestCommentScoreResponse =-  SuggestCommentScoreResponse'-    { _scsrDetectedLanguages  :: !(Maybe [Text])-    , _scsrClientToken        :: !(Maybe Text)-    , _scsrRequestedLanguages :: !(Maybe [Text])-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'SuggestCommentScoreResponse' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'scsrDetectedLanguages'------ * 'scsrClientToken'------ * 'scsrRequestedLanguages'-suggestCommentScoreResponse-    :: SuggestCommentScoreResponse-suggestCommentScoreResponse =-  SuggestCommentScoreResponse'-    { _scsrDetectedLanguages = Nothing-    , _scsrClientToken = Nothing-    , _scsrRequestedLanguages = Nothing-    }----- | The list of languages detected from the comment text.-scsrDetectedLanguages :: Lens' SuggestCommentScoreResponse [Text]-scsrDetectedLanguages-  = lens _scsrDetectedLanguages-      (\ s a -> s{_scsrDetectedLanguages = a})-      . _Default-      . _Coerce---- | Same token from the original SuggestCommentScoreRequest.-scsrClientToken :: Lens' SuggestCommentScoreResponse (Maybe Text)-scsrClientToken-  = lens _scsrClientToken-      (\ s a -> s{_scsrClientToken = a})---- | The list of languages provided in the request.-scsrRequestedLanguages :: Lens' SuggestCommentScoreResponse [Text]-scsrRequestedLanguages-  = lens _scsrRequestedLanguages-      (\ s a -> s{_scsrRequestedLanguages = a})-      . _Default-      . _Coerce--instance FromJSON SuggestCommentScoreResponse where-        parseJSON-          = withObject "SuggestCommentScoreResponse"-              (\ o ->-                 SuggestCommentScoreResponse' <$>-                   (o .:? "detectedLanguages" .!= mempty) <*>-                     (o .:? "clientToken")-                     <*> (o .:? "requestedLanguages" .!= mempty))--instance ToJSON SuggestCommentScoreResponse where-        toJSON SuggestCommentScoreResponse'{..}-          = object-              (catMaybes-                 [("detectedLanguages" .=) <$> _scsrDetectedLanguages,-                  ("clientToken" .=) <$> _scsrClientToken,-                  ("requestedLanguages" .=) <$>-                    _scsrRequestedLanguages])---- | Context is typically something that a Comment is referencing or replying--- to (such as an article, or previous comment). Note: Populate only ONE OF--- the following fields. The oneof syntax cannot be used because that would--- require nesting entries inside another message and breaking backwards--- compatibility. The server will return an error if more than one of the--- following fields is present.------ /See:/ 'context' smart constructor.-data Context =-  Context'-    { _cEntries                 :: !(Maybe [TextEntry])-    , _cArticleAndParentComment :: !(Maybe ArticleAndParentComment)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Context' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'cEntries'------ * 'cArticleAndParentComment'-context-    :: Context-context = Context' {_cEntries = Nothing, _cArticleAndParentComment = Nothing}----- | A list of messages. For example, a linear comments section or forum--- thread.-cEntries :: Lens' Context [TextEntry]-cEntries-  = lens _cEntries (\ s a -> s{_cEntries = a}) .-      _Default-      . _Coerce---- | Information about the source for which the original comment was made,--- and any parent comment info.-cArticleAndParentComment :: Lens' Context (Maybe ArticleAndParentComment)-cArticleAndParentComment-  = lens _cArticleAndParentComment-      (\ s a -> s{_cArticleAndParentComment = a})--instance FromJSON Context where-        parseJSON-          = withObject "Context"-              (\ o ->-                 Context' <$>-                   (o .:? "entries" .!= mempty) <*>-                     (o .:? "articleAndParentComment"))--instance ToJSON Context where-        toJSON Context'{..}-          = object-              (catMaybes-                 [("entries" .=) <$> _cEntries,-                  ("articleAndParentComment" .=) <$>-                    _cArticleAndParentComment])---- | Analysis scores are described by a value and a ScoreType.------ /See:/ 'score' smart constructor.-data Score =-  Score'-    { _sValue :: !(Maybe (Textual Double))-    , _sType  :: !(Maybe ScoreType)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Score' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'sValue'------ * 'sType'-score-    :: Score-score = Score' {_sValue = Nothing, _sType = Nothing}----- | Score value. Semantics described by type below.-sValue :: Lens' Score (Maybe Double)-sValue-  = lens _sValue (\ s a -> s{_sValue = a}) .-      mapping _Coerce---- | The type of the above value.-sType :: Lens' Score (Maybe ScoreType)-sType = lens _sType (\ s a -> s{_sType = a})--instance FromJSON Score where-        parseJSON-          = withObject "Score"-              (\ o ->-                 Score' <$> (o .:? "value") <*> (o .:? "type"))--instance ToJSON Score where-        toJSON Score'{..}-          = object-              (catMaybes-                 [("value" .=) <$> _sValue, ("type" .=) <$> _sType])---- | A type of context specific to a comment left on a single-threaded--- comment message board, where comments are either a top level comment or--- the child of a top level comment.------ /See:/ 'articleAndParentComment' smart constructor.-data ArticleAndParentComment =-  ArticleAndParentComment'-    { _aapcArticle       :: !(Maybe TextEntry)-    , _aapcParentComment :: !(Maybe TextEntry)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'ArticleAndParentComment' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'aapcArticle'------ * 'aapcParentComment'-articleAndParentComment-    :: ArticleAndParentComment-articleAndParentComment =-  ArticleAndParentComment'-    {_aapcArticle = Nothing, _aapcParentComment = Nothing}----- | The source content about which the comment was made (article text,--- article summary, video transcript, etc).-aapcArticle :: Lens' ArticleAndParentComment (Maybe TextEntry)-aapcArticle-  = lens _aapcArticle (\ s a -> s{_aapcArticle = a})---- | Refers to text that is a direct parent of the source comment, such as in--- a one-deep threaded message board. This field will only be present for--- comments that are replies to other comments and will not be populated--- for direct comments on the article_text.-aapcParentComment :: Lens' ArticleAndParentComment (Maybe TextEntry)-aapcParentComment-  = lens _aapcParentComment-      (\ s a -> s{_aapcParentComment = a})--instance FromJSON ArticleAndParentComment where-        parseJSON-          = withObject "ArticleAndParentComment"-              (\ o ->-                 ArticleAndParentComment' <$>-                   (o .:? "article") <*> (o .:? "parentComment"))--instance ToJSON ArticleAndParentComment where-        toJSON ArticleAndParentComment'{..}-          = object-              (catMaybes-                 [("article" .=) <$> _aapcArticle,-                  ("parentComment" .=) <$> _aapcParentComment])---- | Configurable parameters for attribute scoring.------ /See:/ 'attributeParameters' smart constructor.-data AttributeParameters =-  AttributeParameters'-    { _apScoreThreshold :: !(Maybe (Textual Double))-    , _apScoreType      :: !(Maybe AttributeParametersScoreType)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'AttributeParameters' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'apScoreThreshold'------ * 'apScoreType'-attributeParameters-    :: AttributeParameters-attributeParameters =-  AttributeParameters' {_apScoreThreshold = Nothing, _apScoreType = Nothing}----- | Don\'t return scores for this attribute that are below this threshold.--- If unset, a default threshold will be applied. A FloatValue wrapper is--- used to distinguish between 0 vs. default\/unset.-apScoreThreshold :: Lens' AttributeParameters (Maybe Double)-apScoreThreshold-  = lens _apScoreThreshold-      (\ s a -> s{_apScoreThreshold = a})-      . mapping _Coerce---- | What type of scores to return. If unset, defaults to probability scores.-apScoreType :: Lens' AttributeParameters (Maybe AttributeParametersScoreType)-apScoreType-  = lens _apScoreType (\ s a -> s{_apScoreType = a})--instance FromJSON AttributeParameters where-        parseJSON-          = withObject "AttributeParameters"-              (\ o ->-                 AttributeParameters' <$>-                   (o .:? "scoreThreshold") <*> (o .:? "scoreType"))--instance ToJSON AttributeParameters where-        toJSON AttributeParameters'{..}-          = object-              (catMaybes-                 [("scoreThreshold" .=) <$> _apScoreThreshold,-                  ("scoreType" .=) <$> _apScoreType])---- | Represents a body of text.------ /See:/ 'textEntry' smart constructor.-data TextEntry =-  TextEntry'-    { _teText :: !(Maybe Text)-    , _teType :: !(Maybe TextEntryType)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'TextEntry' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'teText'------ * 'teType'-textEntry-    :: TextEntry-textEntry = TextEntry' {_teText = Nothing, _teType = Nothing}----- | UTF-8 encoded text.-teText :: Lens' TextEntry (Maybe Text)-teText = lens _teText (\ s a -> s{_teText = a})---- | Type of the text field.-teType :: Lens' TextEntry (Maybe TextEntryType)-teType = lens _teType (\ s a -> s{_teType = a})--instance FromJSON TextEntry where-        parseJSON-          = withObject "TextEntry"-              (\ o ->-                 TextEntry' <$> (o .:? "text") <*> (o .:? "type"))--instance ToJSON TextEntry where-        toJSON TextEntry'{..}-          = object-              (catMaybes-                 [("text" .=) <$> _teText, ("type" .=) <$> _teType])---- | This holds score values for a single attribute. It contains both--- per-span scores as well as an overall summary score..------ /See:/ 'attributeScores' smart constructor.-data AttributeScores =-  AttributeScores'-    { _asSummaryScore :: !(Maybe Score)-    , _asSpanScores   :: !(Maybe [SpanScore])-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'AttributeScores' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'asSummaryScore'------ * 'asSpanScores'-attributeScores-    :: AttributeScores-attributeScores =-  AttributeScores' {_asSummaryScore = Nothing, _asSpanScores = Nothing}----- | Overall score for comment as a whole.-asSummaryScore :: Lens' AttributeScores (Maybe Score)-asSummaryScore-  = lens _asSummaryScore-      (\ s a -> s{_asSummaryScore = a})---- | Per-span scores.-asSpanScores :: Lens' AttributeScores [SpanScore]-asSpanScores-  = lens _asSpanScores (\ s a -> s{_asSpanScores = a})-      . _Default-      . _Coerce--instance FromJSON AttributeScores where-        parseJSON-          = withObject "AttributeScores"-              (\ o ->-                 AttributeScores' <$>-                   (o .:? "summaryScore") <*>-                     (o .:? "spanScores" .!= mempty))--instance ToJSON AttributeScores where-        toJSON AttributeScores'{..}-          = object-              (catMaybes-                 [("summaryScore" .=) <$> _asSummaryScore,-                  ("spanScores" .=) <$> _asSpanScores])---- | Scores for the requested attributes. The map keys are attribute names--- (same as the requested_attribute field in AnalyzeCommentRequest, for--- example \"ATTACK_ON_AUTHOR\", \"INFLAMMATORY\", etc).------ /See:/ 'analyzeCommentResponseAttributeScores' smart constructor.-newtype AnalyzeCommentResponseAttributeScores =-  AnalyzeCommentResponseAttributeScores'-    { _acrasAddtional :: HashMap Text AttributeScores-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'AnalyzeCommentResponseAttributeScores' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'acrasAddtional'-analyzeCommentResponseAttributeScores-    :: HashMap Text AttributeScores -- ^ 'acrasAddtional'-    -> AnalyzeCommentResponseAttributeScores-analyzeCommentResponseAttributeScores pAcrasAddtional_ =-  AnalyzeCommentResponseAttributeScores'-    {_acrasAddtional = _Coerce # pAcrasAddtional_}---acrasAddtional :: Lens' AnalyzeCommentResponseAttributeScores (HashMap Text AttributeScores)-acrasAddtional-  = lens _acrasAddtional-      (\ s a -> s{_acrasAddtional = a})-      . _Coerce--instance FromJSON-           AnalyzeCommentResponseAttributeScores-         where-        parseJSON-          = withObject "AnalyzeCommentResponseAttributeScores"-              (\ o ->-                 AnalyzeCommentResponseAttributeScores' <$>-                   (parseJSONObject o))--instance ToJSON AnalyzeCommentResponseAttributeScores-         where-        toJSON = toJSON . _acrasAddtional---- | The comment score suggestion request message.------ /See:/ 'suggestCommentScoreRequest' smart constructor.-data SuggestCommentScoreRequest =-  SuggestCommentScoreRequest'-    { _sContext         :: !(Maybe Context)-    , _sClientToken     :: !(Maybe Text)-    , _sLanguages       :: !(Maybe [Text])-    , _sAttributeScores :: !(Maybe SuggestCommentScoreRequestAttributeScores)-    , _sSessionId       :: !(Maybe Text)-    , _sComment         :: !(Maybe TextEntry)-    , _sCommUnityId     :: !(Maybe Text)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'SuggestCommentScoreRequest' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'sContext'------ * 'sClientToken'------ * 'sLanguages'------ * 'sAttributeScores'------ * 'sSessionId'------ * 'sComment'------ * 'sCommUnityId'-suggestCommentScoreRequest-    :: SuggestCommentScoreRequest-suggestCommentScoreRequest =-  SuggestCommentScoreRequest'-    { _sContext = Nothing-    , _sClientToken = Nothing-    , _sLanguages = Nothing-    , _sAttributeScores = Nothing-    , _sSessionId = Nothing-    , _sComment = Nothing-    , _sCommUnityId = Nothing-    }----- | The context of the comment.-sContext :: Lens' SuggestCommentScoreRequest (Maybe Context)-sContext = lens _sContext (\ s a -> s{_sContext = a})---- | Opaque token that is echoed from the request to the response.-sClientToken :: Lens' SuggestCommentScoreRequest (Maybe Text)-sClientToken-  = lens _sClientToken (\ s a -> s{_sClientToken = a})---- | The language(s) of the comment and context (if none are specified, the--- language is automatically detected). If multiple languages are--- specified, the text is checked in all of them that are supported. Both--- ISO and BCP-47 language codes are accepted. Current Language--- Restrictions: * Only English text (\"en\") is supported. If none of the--- languages specified by the caller are supported, an \`UNIMPLEMENTED\`--- error is returned.-sLanguages :: Lens' SuggestCommentScoreRequest [Text]-sLanguages-  = lens _sLanguages (\ s a -> s{_sLanguages = a}) .-      _Default-      . _Coerce---- | Attribute scores for the comment. The map keys are attribute names, same--- as the requested_attribute field in AnalyzeCommentRequest (for example--- \"ATTACK_ON_AUTHOR\", \"INFLAMMATORY\", etc.). This field has the same--- type as the \`attribute_scores\` field in AnalyzeCommentResponse. To--- specify an overall attribute score for the entire comment as a whole,--- use the \`summary_score\` field of the mapped AttributeScores object. To--- specify scores on specific subparts of the comment, use the--- \`span_scores\` field. All SpanScore objects must have begin and end--- fields set. All Score objects must be explicitly set (for binary--- classification, use the score values 0 and 1). If Score objects don\'t--- include a ScoreType, \`PROBABILITY\` is assumed. \`attribute_scores\`--- must not be empty. The mapped AttributeScores objects also must not be--- empty. An \`INVALID_ARGUMENT\` error is returned for all malformed--- requests.-sAttributeScores :: Lens' SuggestCommentScoreRequest (Maybe SuggestCommentScoreRequestAttributeScores)-sAttributeScores-  = lens _sAttributeScores-      (\ s a -> s{_sAttributeScores = a})---- | Session ID. Used to join related RPCs into a single session. For--- example, an interactive tool that calls both the AnalyzeComment and--- SuggestCommentScore RPCs should set all invocations of both RPCs to the--- same Session ID, typically a random 64-bit integer.-sSessionId :: Lens' SuggestCommentScoreRequest (Maybe Text)-sSessionId-  = lens _sSessionId (\ s a -> s{_sSessionId = a})---- | The comment being scored.-sComment :: Lens' SuggestCommentScoreRequest (Maybe TextEntry)-sComment = lens _sComment (\ s a -> s{_sComment = a})---- | Optional identifier associating this comment score suggestion with a--- particular sub-community. Different communities may have different norms--- and rules. Specifying this value enables training community-specific--- models.-sCommUnityId :: Lens' SuggestCommentScoreRequest (Maybe Text)-sCommUnityId-  = lens _sCommUnityId (\ s a -> s{_sCommUnityId = a})--instance FromJSON SuggestCommentScoreRequest where-        parseJSON-          = withObject "SuggestCommentScoreRequest"-              (\ o ->-                 SuggestCommentScoreRequest' <$>-                   (o .:? "context") <*> (o .:? "clientToken") <*>-                     (o .:? "languages" .!= mempty)-                     <*> (o .:? "attributeScores")-                     <*> (o .:? "sessionId")-                     <*> (o .:? "comment")-                     <*> (o .:? "communityId"))--instance ToJSON SuggestCommentScoreRequest where-        toJSON SuggestCommentScoreRequest'{..}-          = object-              (catMaybes-                 [("context" .=) <$> _sContext,-                  ("clientToken" .=) <$> _sClientToken,-                  ("languages" .=) <$> _sLanguages,-                  ("attributeScores" .=) <$> _sAttributeScores,-                  ("sessionId" .=) <$> _sSessionId,-                  ("comment" .=) <$> _sComment,-                  ("communityId" .=) <$> _sCommUnityId])---- | The comment analysis request message.------ /See:/ 'analyzeCommentRequest' smart constructor.-data AnalyzeCommentRequest =-  AnalyzeCommentRequest'-    { _aContext             :: !(Maybe Context)-    , _aClientToken         :: !(Maybe Text)-    , _aSpanAnnotations     :: !(Maybe Bool)-    , _aDoNotStore          :: !(Maybe Bool)-    , _aLanguages           :: !(Maybe [Text])-    , _aRequestedAttributes :: !(Maybe AnalyzeCommentRequestRequestedAttributes)-    , _aSessionId           :: !(Maybe Text)-    , _aComment             :: !(Maybe TextEntry)-    , _aCommUnityId         :: !(Maybe Text)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'AnalyzeCommentRequest' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'aContext'------ * 'aClientToken'------ * 'aSpanAnnotations'------ * 'aDoNotStore'------ * 'aLanguages'------ * 'aRequestedAttributes'------ * 'aSessionId'------ * 'aComment'------ * 'aCommUnityId'-analyzeCommentRequest-    :: AnalyzeCommentRequest-analyzeCommentRequest =-  AnalyzeCommentRequest'-    { _aContext = Nothing-    , _aClientToken = Nothing-    , _aSpanAnnotations = Nothing-    , _aDoNotStore = Nothing-    , _aLanguages = Nothing-    , _aRequestedAttributes = Nothing-    , _aSessionId = Nothing-    , _aComment = Nothing-    , _aCommUnityId = Nothing-    }----- | The context of the comment.-aContext :: Lens' AnalyzeCommentRequest (Maybe Context)-aContext = lens _aContext (\ s a -> s{_aContext = a})---- | Opaque token that is echoed from the request to the response.-aClientToken :: Lens' AnalyzeCommentRequest (Maybe Text)-aClientToken-  = lens _aClientToken (\ s a -> s{_aClientToken = a})---- | An advisory parameter that will return span annotations if the model is--- capable of providing scores with sub-comment resolution. This will--- likely increase the size of the returned message.-aSpanAnnotations :: Lens' AnalyzeCommentRequest (Maybe Bool)-aSpanAnnotations-  = lens _aSpanAnnotations-      (\ s a -> s{_aSpanAnnotations = a})---- | Do not store the comment or context sent in this request. By default,--- the service may store comments\/context for debugging purposes.-aDoNotStore :: Lens' AnalyzeCommentRequest (Maybe Bool)-aDoNotStore-  = lens _aDoNotStore (\ s a -> s{_aDoNotStore = a})---- | The language(s) of the comment and context (if none are specified, the--- language is automatically detected). If multiple languages are--- specified, the text is checked in all of them that are supported. Both--- ISO and BCP-47 language codes are accepted. Current Language--- Restrictions: * Only English text (\"en\") is supported. If none of the--- languages specified by the caller are supported, an \`UNIMPLEMENTED\`--- error is returned.-aLanguages :: Lens' AnalyzeCommentRequest [Text]-aLanguages-  = lens _aLanguages (\ s a -> s{_aLanguages = a}) .-      _Default-      . _Coerce---- | Specification of requested attributes. The AttributeParameters serve as--- configuration for each associated attribute. The map keys are attribute--- names. The following attributes are available: \"ATTACK_ON_AUTHOR\" ---- Attack on author of original article or post. \"ATTACK_ON_COMMENTER\" ---- Attack on fellow commenter. \"ATTACK_ON_PUBLISHER\" - Attack on--- publisher of article\/post. \"INCOHERENT\" - Difficult to understand,--- nonsensical. \"INFLAMMATORY\" - Intending to provoke or inflame.--- \"OBSCENE\" - Obscene, such as cursing. \"OFF_TOPIC\" - Not related to--- the original topic. \"SPAM\" - Commercial\/advertising spam content.--- \"UNSUBSTANTIAL\" - Trivial.-aRequestedAttributes :: Lens' AnalyzeCommentRequest (Maybe AnalyzeCommentRequestRequestedAttributes)-aRequestedAttributes-  = lens _aRequestedAttributes-      (\ s a -> s{_aRequestedAttributes = a})---- | Session ID. Used to join related RPCs into a single session. For--- example, an interactive tool that calls both the AnalyzeComment and--- SuggestCommentScore RPCs should set all invocations of both RPCs to the--- same Session ID, typically a random 64-bit integer.-aSessionId :: Lens' AnalyzeCommentRequest (Maybe Text)-aSessionId-  = lens _aSessionId (\ s a -> s{_aSessionId = a})---- | The comment to analyze.-aComment :: Lens' AnalyzeCommentRequest (Maybe TextEntry)-aComment = lens _aComment (\ s a -> s{_aComment = a})---- | Optional identifier associating this AnalyzeCommentRequest with a--- particular client\'s community. Different communities may have different--- norms and rules. Specifying this value enables us to explore building--- community-specific models for clients.-aCommUnityId :: Lens' AnalyzeCommentRequest (Maybe Text)-aCommUnityId-  = lens _aCommUnityId (\ s a -> s{_aCommUnityId = a})--instance FromJSON AnalyzeCommentRequest where-        parseJSON-          = withObject "AnalyzeCommentRequest"-              (\ o ->-                 AnalyzeCommentRequest' <$>-                   (o .:? "context") <*> (o .:? "clientToken") <*>-                     (o .:? "spanAnnotations")-                     <*> (o .:? "doNotStore")-                     <*> (o .:? "languages" .!= mempty)-                     <*> (o .:? "requestedAttributes")-                     <*> (o .:? "sessionId")-                     <*> (o .:? "comment")-                     <*> (o .:? "communityId"))--instance ToJSON AnalyzeCommentRequest where-        toJSON AnalyzeCommentRequest'{..}-          = object-              (catMaybes-                 [("context" .=) <$> _aContext,-                  ("clientToken" .=) <$> _aClientToken,-                  ("spanAnnotations" .=) <$> _aSpanAnnotations,-                  ("doNotStore" .=) <$> _aDoNotStore,-                  ("languages" .=) <$> _aLanguages,-                  ("requestedAttributes" .=) <$> _aRequestedAttributes,-                  ("sessionId" .=) <$> _aSessionId,-                  ("comment" .=) <$> _aComment,-                  ("communityId" .=) <$> _aCommUnityId])---- | Attribute scores for the comment. The map keys are attribute names, same--- as the requested_attribute field in AnalyzeCommentRequest (for example--- \"ATTACK_ON_AUTHOR\", \"INFLAMMATORY\", etc.). This field has the same--- type as the \`attribute_scores\` field in AnalyzeCommentResponse. To--- specify an overall attribute score for the entire comment as a whole,--- use the \`summary_score\` field of the mapped AttributeScores object. To--- specify scores on specific subparts of the comment, use the--- \`span_scores\` field. All SpanScore objects must have begin and end--- fields set. All Score objects must be explicitly set (for binary--- classification, use the score values 0 and 1). If Score objects don\'t--- include a ScoreType, \`PROBABILITY\` is assumed. \`attribute_scores\`--- must not be empty. The mapped AttributeScores objects also must not be--- empty. An \`INVALID_ARGUMENT\` error is returned for all malformed--- requests.------ /See:/ 'suggestCommentScoreRequestAttributeScores' smart constructor.-newtype SuggestCommentScoreRequestAttributeScores =-  SuggestCommentScoreRequestAttributeScores'-    { _scsrasAddtional :: HashMap Text AttributeScores-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'SuggestCommentScoreRequestAttributeScores' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'scsrasAddtional'-suggestCommentScoreRequestAttributeScores-    :: HashMap Text AttributeScores -- ^ 'scsrasAddtional'-    -> SuggestCommentScoreRequestAttributeScores-suggestCommentScoreRequestAttributeScores pScsrasAddtional_ =-  SuggestCommentScoreRequestAttributeScores'-    {_scsrasAddtional = _Coerce # pScsrasAddtional_}---scsrasAddtional :: Lens' SuggestCommentScoreRequestAttributeScores (HashMap Text AttributeScores)-scsrasAddtional-  = lens _scsrasAddtional-      (\ s a -> s{_scsrasAddtional = a})-      . _Coerce--instance FromJSON-           SuggestCommentScoreRequestAttributeScores-         where-        parseJSON-          = withObject-              "SuggestCommentScoreRequestAttributeScores"-              (\ o ->-                 SuggestCommentScoreRequestAttributeScores' <$>-                   (parseJSONObject o))--instance ToJSON-           SuggestCommentScoreRequestAttributeScores-         where-        toJSON = toJSON . _scsrasAddtional---- | Specification of requested attributes. The AttributeParameters serve as--- configuration for each associated attribute. The map keys are attribute--- names. The following attributes are available: \"ATTACK_ON_AUTHOR\" ---- Attack on author of original article or post. \"ATTACK_ON_COMMENTER\" ---- Attack on fellow commenter. \"ATTACK_ON_PUBLISHER\" - Attack on--- publisher of article\/post. \"INCOHERENT\" - Difficult to understand,--- nonsensical. \"INFLAMMATORY\" - Intending to provoke or inflame.--- \"OBSCENE\" - Obscene, such as cursing. \"OFF_TOPIC\" - Not related to--- the original topic. \"SPAM\" - Commercial\/advertising spam content.--- \"UNSUBSTANTIAL\" - Trivial.------ /See:/ 'analyzeCommentRequestRequestedAttributes' smart constructor.-newtype AnalyzeCommentRequestRequestedAttributes =-  AnalyzeCommentRequestRequestedAttributes'-    { _acrraAddtional :: HashMap Text AttributeParameters-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'AnalyzeCommentRequestRequestedAttributes' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'acrraAddtional'-analyzeCommentRequestRequestedAttributes-    :: HashMap Text AttributeParameters -- ^ 'acrraAddtional'-    -> AnalyzeCommentRequestRequestedAttributes-analyzeCommentRequestRequestedAttributes pAcrraAddtional_ =-  AnalyzeCommentRequestRequestedAttributes'-    {_acrraAddtional = _Coerce # pAcrraAddtional_}---acrraAddtional :: Lens' AnalyzeCommentRequestRequestedAttributes (HashMap Text AttributeParameters)-acrraAddtional-  = lens _acrraAddtional-      (\ s a -> s{_acrraAddtional = a})-      . _Coerce--instance FromJSON-           AnalyzeCommentRequestRequestedAttributes-         where-        parseJSON-          = withObject-              "AnalyzeCommentRequestRequestedAttributes"-              (\ o ->-                 AnalyzeCommentRequestRequestedAttributes' <$>-                   (parseJSONObject o))--instance ToJSON-           AnalyzeCommentRequestRequestedAttributes-         where-        toJSON = toJSON . _acrraAddtional
− gen/Network/Google/CommentAnalyzer/Types/Sum.hs
@@ -1,183 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE LambdaCase         #-}-{-# LANGUAGE NoImplicitPrelude  #-}-{-# LANGUAGE OverloadedStrings  #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- |--- Module      : Network.Google.CommentAnalyzer.Types.Sum--- 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.CommentAnalyzer.Types.Sum where--import           Network.Google.Prelude hiding (Bytes)---- | V1 error format.-data Xgafv-    = X1-      -- ^ @1@-      -- v1 error format-    | X2-      -- ^ @2@-      -- v2 error format-      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable Xgafv--instance FromHttpApiData Xgafv where-    parseQueryParam = \case-        "1" -> Right X1-        "2" -> Right X2-        x -> Left ("Unable to parse Xgafv from: " <> x)--instance ToHttpApiData Xgafv where-    toQueryParam = \case-        X1 -> "1"-        X2 -> "2"--instance FromJSON Xgafv where-    parseJSON = parseJSONText "Xgafv"--instance ToJSON Xgafv where-    toJSON = toJSONText---- | The type of the above value.-data ScoreType-    = ScoreTypeUnspecified-      -- ^ @SCORE_TYPE_UNSPECIFIED@-      -- Unspecified. Defaults to PROBABILITY scores if available, and otherwise-      -- RAW. Every model has a RAW score.-    | Probability-      -- ^ @PROBABILITY@-      -- Probability scores are in the range [0, 1] and indicate level of-      -- confidence in the attribute label.-    | StdDevScore-      -- ^ @STD_DEV_SCORE@-      -- Standard deviation scores are in the range (-inf, +inf).-    | Percentile-      -- ^ @PERCENTILE@-      -- Percentile scores are in the range [0, 1] and indicate the percentile of-      -- the raw score, normalized with a test dataset. This is not generally-      -- recommended, as the normalization is dependent on the dataset used,-      -- which may not match other usecases.-    | Raw-      -- ^ @RAW@-      -- Raw scores are the raw values from the model, and may take any value.-      -- This is primarily for debugging\/testing, and not generally recommended.-      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable ScoreType--instance FromHttpApiData ScoreType where-    parseQueryParam = \case-        "SCORE_TYPE_UNSPECIFIED" -> Right ScoreTypeUnspecified-        "PROBABILITY" -> Right Probability-        "STD_DEV_SCORE" -> Right StdDevScore-        "PERCENTILE" -> Right Percentile-        "RAW" -> Right Raw-        x -> Left ("Unable to parse ScoreType from: " <> x)--instance ToHttpApiData ScoreType where-    toQueryParam = \case-        ScoreTypeUnspecified -> "SCORE_TYPE_UNSPECIFIED"-        Probability -> "PROBABILITY"-        StdDevScore -> "STD_DEV_SCORE"-        Percentile -> "PERCENTILE"-        Raw -> "RAW"--instance FromJSON ScoreType where-    parseJSON = parseJSONText "ScoreType"--instance ToJSON ScoreType where-    toJSON = toJSONText---- | What type of scores to return. If unset, defaults to probability scores.-data AttributeParametersScoreType-    = APSTScoreTypeUnspecified-      -- ^ @SCORE_TYPE_UNSPECIFIED@-      -- Unspecified. Defaults to PROBABILITY scores if available, and otherwise-      -- RAW. Every model has a RAW score.-    | APSTProbability-      -- ^ @PROBABILITY@-      -- Probability scores are in the range [0, 1] and indicate level of-      -- confidence in the attribute label.-    | APSTStdDevScore-      -- ^ @STD_DEV_SCORE@-      -- Standard deviation scores are in the range (-inf, +inf).-    | APSTPercentile-      -- ^ @PERCENTILE@-      -- Percentile scores are in the range [0, 1] and indicate the percentile of-      -- the raw score, normalized with a test dataset. This is not generally-      -- recommended, as the normalization is dependent on the dataset used,-      -- which may not match other usecases.-    | APSTRaw-      -- ^ @RAW@-      -- Raw scores are the raw values from the model, and may take any value.-      -- This is primarily for debugging\/testing, and not generally recommended.-      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable AttributeParametersScoreType--instance FromHttpApiData AttributeParametersScoreType where-    parseQueryParam = \case-        "SCORE_TYPE_UNSPECIFIED" -> Right APSTScoreTypeUnspecified-        "PROBABILITY" -> Right APSTProbability-        "STD_DEV_SCORE" -> Right APSTStdDevScore-        "PERCENTILE" -> Right APSTPercentile-        "RAW" -> Right APSTRaw-        x -> Left ("Unable to parse AttributeParametersScoreType from: " <> x)--instance ToHttpApiData AttributeParametersScoreType where-    toQueryParam = \case-        APSTScoreTypeUnspecified -> "SCORE_TYPE_UNSPECIFIED"-        APSTProbability -> "PROBABILITY"-        APSTStdDevScore -> "STD_DEV_SCORE"-        APSTPercentile -> "PERCENTILE"-        APSTRaw -> "RAW"--instance FromJSON AttributeParametersScoreType where-    parseJSON = parseJSONText "AttributeParametersScoreType"--instance ToJSON AttributeParametersScoreType where-    toJSON = toJSONText---- | Type of the text field.-data TextEntryType-    = TextTypeUnspecified-      -- ^ @TEXT_TYPE_UNSPECIFIED@-      -- The content type is not specified. Text will be interpreted as plain-      -- text by default.-    | PlainText-      -- ^ @PLAIN_TEXT@-      -- Plain text.-    | HTML-      -- ^ @HTML@-      -- HTML.-      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable TextEntryType--instance FromHttpApiData TextEntryType where-    parseQueryParam = \case-        "TEXT_TYPE_UNSPECIFIED" -> Right TextTypeUnspecified-        "PLAIN_TEXT" -> Right PlainText-        "HTML" -> Right HTML-        x -> Left ("Unable to parse TextEntryType from: " <> x)--instance ToHttpApiData TextEntryType where-    toQueryParam = \case-        TextTypeUnspecified -> "TEXT_TYPE_UNSPECIFIED"-        PlainText -> "PLAIN_TEXT"-        HTML -> "HTML"--instance FromJSON TextEntryType where-    parseJSON = parseJSONText "TextEntryType"--instance ToJSON TextEntryType where-    toJSON = toJSONText
− gen/Network/Google/Resource/CommentAnalyzer/Comments/Analyze.hs
@@ -1,150 +0,0 @@-{-# LANGUAGE DataKinds          #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE FlexibleInstances  #-}-{-# LANGUAGE NoImplicitPrelude  #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}-{-# LANGUAGE TypeOperators      #-}--{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds      #-}-{-# OPTIONS_GHC -fno-warn-unused-imports    #-}---- |--- Module      : Network.Google.Resource.CommentAnalyzer.Comments.Analyze--- 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)------ Analyzes the provided text and returns scores for requested attributes.------ /See:/ <https://conversationai.github.io/ Perspective Comment Analyzer API Reference> for @commentanalyzer.comments.analyze@.-module Network.Google.Resource.CommentAnalyzer.Comments.Analyze-    (-    -- * REST Resource-      CommentsAnalyzeResource--    -- * Creating a Request-    , commentsAnalyze-    , CommentsAnalyze--    -- * Request Lenses-    , caXgafv-    , caUploadProtocol-    , caAccessToken-    , caUploadType-    , caPayload-    , caCallback-    ) where--import           Network.Google.CommentAnalyzer.Types-import           Network.Google.Prelude---- | A resource alias for @commentanalyzer.comments.analyze@ method which the--- 'CommentsAnalyze' request conforms to.-type CommentsAnalyzeResource =-     "v1alpha1" :>-       "comments:analyze" :>-         QueryParam "$.xgafv" Xgafv :>-           QueryParam "upload_protocol" Text :>-             QueryParam "access_token" Text :>-               QueryParam "uploadType" Text :>-                 QueryParam "callback" Text :>-                   QueryParam "alt" AltJSON :>-                     ReqBody '[JSON] AnalyzeCommentRequest :>-                       Post '[JSON] AnalyzeCommentResponse---- | Analyzes the provided text and returns scores for requested attributes.------ /See:/ 'commentsAnalyze' smart constructor.-data CommentsAnalyze =-  CommentsAnalyze'-    { _caXgafv          :: !(Maybe Xgafv)-    , _caUploadProtocol :: !(Maybe Text)-    , _caAccessToken    :: !(Maybe Text)-    , _caUploadType     :: !(Maybe Text)-    , _caPayload        :: !AnalyzeCommentRequest-    , _caCallback       :: !(Maybe Text)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'CommentsAnalyze' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'caXgafv'------ * 'caUploadProtocol'------ * 'caAccessToken'------ * 'caUploadType'------ * 'caPayload'------ * 'caCallback'-commentsAnalyze-    :: AnalyzeCommentRequest -- ^ 'caPayload'-    -> CommentsAnalyze-commentsAnalyze pCaPayload_ =-  CommentsAnalyze'-    { _caXgafv = Nothing-    , _caUploadProtocol = Nothing-    , _caAccessToken = Nothing-    , _caUploadType = Nothing-    , _caPayload = pCaPayload_-    , _caCallback = Nothing-    }----- | V1 error format.-caXgafv :: Lens' CommentsAnalyze (Maybe Xgafv)-caXgafv = lens _caXgafv (\ s a -> s{_caXgafv = a})---- | Upload protocol for media (e.g. \"raw\", \"multipart\").-caUploadProtocol :: Lens' CommentsAnalyze (Maybe Text)-caUploadProtocol-  = lens _caUploadProtocol-      (\ s a -> s{_caUploadProtocol = a})---- | OAuth access token.-caAccessToken :: Lens' CommentsAnalyze (Maybe Text)-caAccessToken-  = lens _caAccessToken-      (\ s a -> s{_caAccessToken = a})---- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").-caUploadType :: Lens' CommentsAnalyze (Maybe Text)-caUploadType-  = lens _caUploadType (\ s a -> s{_caUploadType = a})---- | Multipart request metadata.-caPayload :: Lens' CommentsAnalyze AnalyzeCommentRequest-caPayload-  = lens _caPayload (\ s a -> s{_caPayload = a})---- | JSONP-caCallback :: Lens' CommentsAnalyze (Maybe Text)-caCallback-  = lens _caCallback (\ s a -> s{_caCallback = a})--instance GoogleRequest CommentsAnalyze where-        type Rs CommentsAnalyze = AnalyzeCommentResponse-        type Scopes CommentsAnalyze =-             '["https://www.googleapis.com/auth/userinfo.email"]-        requestClient CommentsAnalyze'{..}-          = go _caXgafv _caUploadProtocol _caAccessToken-              _caUploadType-              _caCallback-              (Just AltJSON)-              _caPayload-              commentAnalyzerService-          where go-                  = buildClient-                      (Proxy :: Proxy CommentsAnalyzeResource)-                      mempty
− gen/Network/Google/Resource/CommentAnalyzer/Comments/Suggestscore.hs
@@ -1,151 +0,0 @@-{-# LANGUAGE DataKinds          #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE FlexibleInstances  #-}-{-# LANGUAGE NoImplicitPrelude  #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}-{-# LANGUAGE TypeOperators      #-}--{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds      #-}-{-# OPTIONS_GHC -fno-warn-unused-imports    #-}---- |--- Module      : Network.Google.Resource.CommentAnalyzer.Comments.Suggestscore--- 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)------ Suggest comment scores as training data.------ /See:/ <https://conversationai.github.io/ Perspective Comment Analyzer API Reference> for @commentanalyzer.comments.suggestscore@.-module Network.Google.Resource.CommentAnalyzer.Comments.Suggestscore-    (-    -- * REST Resource-      CommentsSuggestscoreResource--    -- * Creating a Request-    , commentsSuggestscore-    , CommentsSuggestscore--    -- * Request Lenses-    , csXgafv-    , csUploadProtocol-    , csAccessToken-    , csUploadType-    , csPayload-    , csCallback-    ) where--import           Network.Google.CommentAnalyzer.Types-import           Network.Google.Prelude---- | A resource alias for @commentanalyzer.comments.suggestscore@ method which the--- 'CommentsSuggestscore' request conforms to.-type CommentsSuggestscoreResource =-     "v1alpha1" :>-       "comments:suggestscore" :>-         QueryParam "$.xgafv" Xgafv :>-           QueryParam "upload_protocol" Text :>-             QueryParam "access_token" Text :>-               QueryParam "uploadType" Text :>-                 QueryParam "callback" Text :>-                   QueryParam "alt" AltJSON :>-                     ReqBody '[JSON] SuggestCommentScoreRequest :>-                       Post '[JSON] SuggestCommentScoreResponse---- | Suggest comment scores as training data.------ /See:/ 'commentsSuggestscore' smart constructor.-data CommentsSuggestscore =-  CommentsSuggestscore'-    { _csXgafv          :: !(Maybe Xgafv)-    , _csUploadProtocol :: !(Maybe Text)-    , _csAccessToken    :: !(Maybe Text)-    , _csUploadType     :: !(Maybe Text)-    , _csPayload        :: !SuggestCommentScoreRequest-    , _csCallback       :: !(Maybe Text)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'CommentsSuggestscore' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'csXgafv'------ * 'csUploadProtocol'------ * 'csAccessToken'------ * 'csUploadType'------ * 'csPayload'------ * 'csCallback'-commentsSuggestscore-    :: SuggestCommentScoreRequest -- ^ 'csPayload'-    -> CommentsSuggestscore-commentsSuggestscore pCsPayload_ =-  CommentsSuggestscore'-    { _csXgafv = Nothing-    , _csUploadProtocol = Nothing-    , _csAccessToken = Nothing-    , _csUploadType = Nothing-    , _csPayload = pCsPayload_-    , _csCallback = Nothing-    }----- | V1 error format.-csXgafv :: Lens' CommentsSuggestscore (Maybe Xgafv)-csXgafv = lens _csXgafv (\ s a -> s{_csXgafv = a})---- | Upload protocol for media (e.g. \"raw\", \"multipart\").-csUploadProtocol :: Lens' CommentsSuggestscore (Maybe Text)-csUploadProtocol-  = lens _csUploadProtocol-      (\ s a -> s{_csUploadProtocol = a})---- | OAuth access token.-csAccessToken :: Lens' CommentsSuggestscore (Maybe Text)-csAccessToken-  = lens _csAccessToken-      (\ s a -> s{_csAccessToken = a})---- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").-csUploadType :: Lens' CommentsSuggestscore (Maybe Text)-csUploadType-  = lens _csUploadType (\ s a -> s{_csUploadType = a})---- | Multipart request metadata.-csPayload :: Lens' CommentsSuggestscore SuggestCommentScoreRequest-csPayload-  = lens _csPayload (\ s a -> s{_csPayload = a})---- | JSONP-csCallback :: Lens' CommentsSuggestscore (Maybe Text)-csCallback-  = lens _csCallback (\ s a -> s{_csCallback = a})--instance GoogleRequest CommentsSuggestscore where-        type Rs CommentsSuggestscore =-             SuggestCommentScoreResponse-        type Scopes CommentsSuggestscore =-             '["https://www.googleapis.com/auth/userinfo.email"]-        requestClient CommentsSuggestscore'{..}-          = go _csXgafv _csUploadProtocol _csAccessToken-              _csUploadType-              _csCallback-              (Just AltJSON)-              _csPayload-              commentAnalyzerService-          where go-                  = buildClient-                      (Proxy :: Proxy CommentsSuggestscoreResource)-                      mempty
gogol-commentanalyzer.cabal view
@@ -1,53 +1,62 @@-name:                  gogol-commentanalyzer-version:               0.5.0-synopsis:              Google Perspective Comment Analyzer SDK.-homepage:              https://github.com/brendanhay/gogol-bug-reports:           https://github.com/brendanhay/gogol/issues-license:               OtherLicense-license-file:          LICENSE-author:                Brendan Hay-maintainer:            Brendan Hay <brendan.g.hay@gmail.com>-copyright:             Copyright (c) 2015-2016 Brendan Hay-category:              Network, Google, Cloud-build-type:            Simple-cabal-version:         >= 1.10-extra-source-files:    README.md src/.gitkeep+cabal-version:      2.2+name:               gogol-commentanalyzer+version:            1.0.0+synopsis:           Google Perspective Comment Analyzer SDK.+homepage:           https://github.com/brendanhay/gogol+bug-reports:        https://github.com/brendanhay/gogol/issues+license:            MPL-2.0+license-file:       LICENSE+author:             Brendan Hay+maintainer:+  Brendan Hay <brendan.g.hay+gogol@gmail.com>, Toni Cebrián <toni@tonicebrian.com> +copyright:          Copyright (c) 2015-2025 Brendan Hay+category:           Google+build-type:         Simple+extra-source-files:+  README.md+  src/.gitkeep+ description:-    The Perspective Comment Analyzer API provides information about the-    potential impact of a comment on a conversation (e.g. it can provide a-    score for the \"toxicity\" of a comment). Users can leverage the-    \"SuggestCommentScore\" method to submit corrections to improve-    Perspective over time. Users can set the \"doNotStore\" flag to ensure-    that all submitted comments are automatically deleted after scores are-    returned.-    .-    /Warning:/ This is an experimental prototype/preview release which is still-    under exploratory development and not intended for public use, caveat emptor!-    .-    This library is compatible with version @v1alpha1@-    of the API.+  The Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the \"toxicity\" of a comment). Users can leverage the \"SuggestCommentScore\" method to submit corrections to improve Perspective over time. Users can set the \"doNotStore\" flag to ensure that all submitted comments are automatically deleted after scores are returned.+  .+  /Warning:/ This is an experimental prototype/preview release which is still+  under exploratory development and not intended for public use, caveat emptor!+  .+  This library is compatible with version @v1alpha1@+  of the API.  source-repository head-    type:     git-    location: git://github.com/brendanhay/gogol.git+  type:     git+  location: git://github.com/brendanhay/gogol.git+  subdir:   gogol-commentanalyzer +flag field-selectors+  description:+    If record field selectors should be enabled. Disabling this requires GHC >=9.2 and the NoFieldSelectors extension.++  default:     False+  manual:      True+ library-    default-language:  Haskell2010-    hs-source-dirs:    src gen+  default-language: GHC2021+  hs-source-dirs:   src gen+  ghc-options:+    -Wall -fwarn-incomplete-uni-patterns+    -fwarn-incomplete-record-updates -funbox-strict-fields+    -fwarn-unused-packages -    ghc-options:       -Wall+  if (!flag(field-selectors) && impl(ghc >=9.2))+    default-extensions: NoFieldSelectors -    exposed-modules:-          Network.Google.CommentAnalyzer-        , Network.Google.CommentAnalyzer.Types-        , Network.Google.Resource.CommentAnalyzer.Comments.Analyze-        , Network.Google.Resource.CommentAnalyzer.Comments.Suggestscore+  exposed-modules:+    Gogol.CommentAnalyzer+    Gogol.CommentAnalyzer.Comments.Analyze+    Gogol.CommentAnalyzer.Comments.Suggestscore+    Gogol.CommentAnalyzer.Types -    other-modules:-          Network.Google.CommentAnalyzer.Types.Product-        , Network.Google.CommentAnalyzer.Types.Sum+  other-modules:+    Gogol.CommentAnalyzer.Internal.Product+    Gogol.CommentAnalyzer.Internal.Sum -    build-depends:-          gogol-core == 0.5.0.*-        , base       >= 4.7 && < 5+  build-depends:    gogol-core ^>=1.0.0