packages feed

gogol-cloudtrace 0.5.0 → 1.0.0

raw patch · 15 files changed

+1694/−2187 lines, 15 filesdep −basedep ~gogol-coresetup-changed

Dependencies removed: base

Dependency ranges changed: gogol-core

Files

README.md view
@@ -8,12 +8,12 @@  ## Version -`0.5.0`+`1.0.0`   ## Description -A client library for the Google Stackdriver Trace.+A client library for the Google Cloud Trace.   ## Contribute
Setup.hs view
@@ -1,2 +1,3 @@-import           Distribution.Simple+import Distribution.Simple+ main = defaultMain
+ gen/Gogol/CloudTrace.hs view
@@ -0,0 +1,144 @@+{-# 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.CloudTrace+-- 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)+--+-- Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Cloud Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenTelemetry.+--+-- /See:/ <https://cloud.google.com/trace Cloud Trace API Reference>+module Gogol.CloudTrace+  ( -- * Configuration+    cloudTraceService,++    -- * OAuth Scopes+    CloudPlatform'FullControl,+    Trace'Append,++    -- * Resources++    -- ** cloudtrace.projects.traces.batchWrite+    CloudTraceProjectsTracesBatchWriteResource,+    CloudTraceProjectsTracesBatchWrite (..),+    newCloudTraceProjectsTracesBatchWrite,++    -- ** cloudtrace.projects.traces.spans.createSpan+    CloudTraceProjectsTracesSpansCreateSpanResource,+    CloudTraceProjectsTracesSpansCreateSpan (..),+    newCloudTraceProjectsTracesSpansCreateSpan,++    -- * Types++    -- ** Xgafv+    Xgafv (..),++    -- ** Annotation+    Annotation (..),+    newAnnotation,++    -- ** AttributeValue+    AttributeValue (..),+    newAttributeValue,++    -- ** Attributes+    Attributes (..),+    newAttributes,++    -- ** Attributes_AttributeMap+    Attributes_AttributeMap (..),+    newAttributes_AttributeMap,++    -- ** BatchWriteSpansRequest+    BatchWriteSpansRequest (..),+    newBatchWriteSpansRequest,++    -- ** Empty+    Empty (..),+    newEmpty,++    -- ** Link+    Link (..),+    newLink,++    -- ** Link_Type+    Link_Type (..),++    -- ** Links+    Links (..),+    newLinks,++    -- ** MessageEvent+    MessageEvent (..),+    newMessageEvent,++    -- ** MessageEvent_Type+    MessageEvent_Type (..),++    -- ** Module+    Module (..),+    newModule,++    -- ** Span+    Span (..),+    newSpan,++    -- ** Span_SpanKind+    Span_SpanKind (..),++    -- ** StackFrame+    StackFrame (..),+    newStackFrame,++    -- ** StackFrames+    StackFrames (..),+    newStackFrames,++    -- ** StackTrace+    StackTrace (..),+    newStackTrace,++    -- ** Status+    Status (..),+    newStatus,++    -- ** Status_DetailsItem+    Status_DetailsItem (..),+    newStatus_DetailsItem,++    -- ** TimeEvent+    TimeEvent (..),+    newTimeEvent,++    -- ** TimeEvents+    TimeEvents (..),+    newTimeEvents,++    -- ** TruncatableString+    TruncatableString (..),+    newTruncatableString,+  )+where++import Gogol.CloudTrace.Projects.Traces.BatchWrite+import Gogol.CloudTrace.Projects.Traces.Spans.CreateSpan+import Gogol.CloudTrace.Types
+ gen/Gogol/CloudTrace/Internal/Product.hs view
@@ -0,0 +1,914 @@+{-# 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.CloudTrace.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.CloudTrace.Internal.Product+  ( -- * Annotation+    Annotation (..),+    newAnnotation,++    -- * AttributeValue+    AttributeValue (..),+    newAttributeValue,++    -- * Attributes+    Attributes (..),+    newAttributes,++    -- * Attributes_AttributeMap+    Attributes_AttributeMap (..),+    newAttributes_AttributeMap,++    -- * BatchWriteSpansRequest+    BatchWriteSpansRequest (..),+    newBatchWriteSpansRequest,++    -- * Empty+    Empty (..),+    newEmpty,++    -- * Link+    Link (..),+    newLink,++    -- * Links+    Links (..),+    newLinks,++    -- * MessageEvent+    MessageEvent (..),+    newMessageEvent,++    -- * Module+    Module (..),+    newModule,++    -- * Span+    Span (..),+    newSpan,++    -- * StackFrame+    StackFrame (..),+    newStackFrame,++    -- * StackFrames+    StackFrames (..),+    newStackFrames,++    -- * StackTrace+    StackTrace (..),+    newStackTrace,++    -- * Status+    Status (..),+    newStatus,++    -- * Status_DetailsItem+    Status_DetailsItem (..),+    newStatus_DetailsItem,++    -- * TimeEvent+    TimeEvent (..),+    newTimeEvent,++    -- * TimeEvents+    TimeEvents (..),+    newTimeEvents,++    -- * TruncatableString+    TruncatableString (..),+    newTruncatableString,+  )+where++import Gogol.CloudTrace.Internal.Sum+import Gogol.Prelude qualified as Core++-- | Text annotation with a set of attributes.+--+-- /See:/ 'newAnnotation' smart constructor.+data Annotation = Annotation+  { -- | A set of attributes on the annotation. You can have up to 4 attributes per Annotation.+    attributes :: (Core.Maybe Attributes),+    -- | A user-supplied message describing the event. The maximum length for the description is 256 bytes.+    description :: (Core.Maybe TruncatableString)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Annotation' with the minimum fields required to make a request.+newAnnotation ::+  Annotation+newAnnotation =+  Annotation {attributes = Core.Nothing, description = Core.Nothing}++instance Core.FromJSON Annotation where+  parseJSON =+    Core.withObject+      "Annotation"+      ( \o ->+          Annotation+            Core.<$> (o Core..:? "attributes")+            Core.<*> (o Core..:? "description")+      )++instance Core.ToJSON Annotation where+  toJSON Annotation {..} =+    Core.object+      ( Core.catMaybes+          [ ("attributes" Core..=) Core.<$> attributes,+            ("description" Core..=) Core.<$> description+          ]+      )++-- | The allowed types for @[VALUE]@ in a @[KEY]:[VALUE]@ attribute.+--+-- /See:/ 'newAttributeValue' smart constructor.+data AttributeValue = AttributeValue+  { -- | A Boolean value represented by @true@ or @false@.+    boolValue :: (Core.Maybe Core.Bool),+    -- | A 64-bit signed integer.+    intValue :: (Core.Maybe Core.Int64),+    -- | A string up to 256 bytes long.+    stringValue :: (Core.Maybe TruncatableString)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'AttributeValue' with the minimum fields required to make a request.+newAttributeValue ::+  AttributeValue+newAttributeValue =+  AttributeValue+    { boolValue = Core.Nothing,+      intValue = Core.Nothing,+      stringValue = Core.Nothing+    }++instance Core.FromJSON AttributeValue where+  parseJSON =+    Core.withObject+      "AttributeValue"+      ( \o ->+          AttributeValue+            Core.<$> (o Core..:? "boolValue")+            Core.<*> (o Core..:? "intValue" Core.<&> Core.fmap Core.fromAsText)+            Core.<*> (o Core..:? "stringValue")+      )++instance Core.ToJSON AttributeValue where+  toJSON AttributeValue {..} =+    Core.object+      ( Core.catMaybes+          [ ("boolValue" Core..=) Core.<$> boolValue,+            ("intValue" Core..=) Core.. Core.AsText Core.<$> intValue,+            ("stringValue" Core..=) Core.<$> stringValue+          ]+      )++-- | A set of attributes as key-value pairs.+--+-- /See:/ 'newAttributes' smart constructor.+data Attributes = Attributes+  { -- | A set of attributes. Each attribute\'s key can be up to 128 bytes long. The value can be a string up to 256 bytes, a signed 64-bit integer, or the boolean values @true@ or @false@. For example: \"\/instance/id\": { \"string/value\": { \"value\": \"my-instance\" } } \"\/http\/request/bytes\": { \"int/value\": 300 } \"example.com\/myattribute\": { \"bool_value\": false }+    attributeMap :: (Core.Maybe Attributes_AttributeMap),+    -- | The number of attributes that were discarded. Attributes can be discarded because their keys are too long or because there are too many attributes. If this value is 0 then all attributes are valid.+    droppedAttributesCount :: (Core.Maybe Core.Int32)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Attributes' with the minimum fields required to make a request.+newAttributes ::+  Attributes+newAttributes =+  Attributes+    { attributeMap = Core.Nothing,+      droppedAttributesCount = Core.Nothing+    }++instance Core.FromJSON Attributes where+  parseJSON =+    Core.withObject+      "Attributes"+      ( \o ->+          Attributes+            Core.<$> (o Core..:? "attributeMap")+            Core.<*> (o Core..:? "droppedAttributesCount")+      )++instance Core.ToJSON Attributes where+  toJSON Attributes {..} =+    Core.object+      ( Core.catMaybes+          [ ("attributeMap" Core..=) Core.<$> attributeMap,+            ("droppedAttributesCount" Core..=)+              Core.<$> droppedAttributesCount+          ]+      )++-- | A set of attributes. Each attribute\'s key can be up to 128 bytes long. The value can be a string up to 256 bytes, a signed 64-bit integer, or the boolean values @true@ or @false@. For example: \"\/instance/id\": { \"string/value\": { \"value\": \"my-instance\" } } \"\/http\/request/bytes\": { \"int/value\": 300 } \"example.com\/myattribute\": { \"bool_value\": false }+--+-- /See:/ 'newAttributes_AttributeMap' smart constructor.+newtype Attributes_AttributeMap = Attributes_AttributeMap+  { additional :: (Core.HashMap Core.Text AttributeValue)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Attributes_AttributeMap' with the minimum fields required to make a request.+newAttributes_AttributeMap ::+  -- |  See 'additional'.+  Core.HashMap Core.Text AttributeValue ->+  Attributes_AttributeMap+newAttributes_AttributeMap additional =+  Attributes_AttributeMap {additional = additional}++instance Core.FromJSON Attributes_AttributeMap where+  parseJSON =+    Core.withObject+      "Attributes_AttributeMap"+      (\o -> Attributes_AttributeMap Core.<$> (Core.parseJSONObject o))++instance Core.ToJSON Attributes_AttributeMap where+  toJSON Attributes_AttributeMap {..} = Core.toJSON additional++-- | The request message for the @BatchWriteSpans@ method.+--+-- /See:/ 'newBatchWriteSpansRequest' smart constructor.+newtype BatchWriteSpansRequest = BatchWriteSpansRequest+  { -- | Required. A list of new spans. The span names must not match existing spans, otherwise the results are undefined.+    spans :: (Core.Maybe [Span])+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'BatchWriteSpansRequest' with the minimum fields required to make a request.+newBatchWriteSpansRequest ::+  BatchWriteSpansRequest+newBatchWriteSpansRequest =+  BatchWriteSpansRequest {spans = Core.Nothing}++instance Core.FromJSON BatchWriteSpansRequest where+  parseJSON =+    Core.withObject+      "BatchWriteSpansRequest"+      (\o -> BatchWriteSpansRequest Core.<$> (o Core..:? "spans"))++instance Core.ToJSON BatchWriteSpansRequest where+  toJSON BatchWriteSpansRequest {..} =+    Core.object (Core.catMaybes [("spans" Core..=) Core.<$> spans])++-- | A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }+--+-- /See:/ 'newEmpty' smart constructor.+data Empty = Empty+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Empty' with the minimum fields required to make a request.+newEmpty ::+  Empty+newEmpty = Empty++instance Core.FromJSON Empty where+  parseJSON = Core.withObject "Empty" (\o -> Core.pure Empty)++instance Core.ToJSON Empty where+  toJSON = Core.const Core.emptyObject++-- | A pointer from the current span to another span in the same trace or in a different trace. For example, this can be used in batching operations, where a single batch handler processes multiple requests from different traces or when the handler receives a request from a different project.+--+-- /See:/ 'newLink' smart constructor.+data Link = Link+  { -- | A set of attributes on the link. Up to 32 attributes can be specified per link.+    attributes :: (Core.Maybe Attributes),+    -- | The @[SPAN_ID]@ for a span within a trace.+    spanId :: (Core.Maybe Core.Text),+    -- | The @[TRACE_ID]@ for a trace within a project.+    traceId :: (Core.Maybe Core.Text),+    -- | The relationship of the current span relative to the linked span.+    type' :: (Core.Maybe Link_Type)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Link' with the minimum fields required to make a request.+newLink ::+  Link+newLink =+  Link+    { attributes = Core.Nothing,+      spanId = Core.Nothing,+      traceId = Core.Nothing,+      type' = Core.Nothing+    }++instance Core.FromJSON Link where+  parseJSON =+    Core.withObject+      "Link"+      ( \o ->+          Link+            Core.<$> (o Core..:? "attributes")+            Core.<*> (o Core..:? "spanId")+            Core.<*> (o Core..:? "traceId")+            Core.<*> (o Core..:? "type")+      )++instance Core.ToJSON Link where+  toJSON Link {..} =+    Core.object+      ( Core.catMaybes+          [ ("attributes" Core..=) Core.<$> attributes,+            ("spanId" Core..=) Core.<$> spanId,+            ("traceId" Core..=) Core.<$> traceId,+            ("type" Core..=) Core.<$> type'+          ]+      )++-- | A collection of links, which are references from this span to a span in the same or different trace.+--+-- /See:/ 'newLinks' smart constructor.+data Links = Links+  { -- | The number of dropped links after the maximum size was enforced. If this value is 0, then no links were dropped.+    droppedLinksCount :: (Core.Maybe Core.Int32),+    -- | A collection of links.+    link :: (Core.Maybe [Link])+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Links' with the minimum fields required to make a request.+newLinks ::+  Links+newLinks =+  Links {droppedLinksCount = Core.Nothing, link = Core.Nothing}++instance Core.FromJSON Links where+  parseJSON =+    Core.withObject+      "Links"+      ( \o ->+          Links+            Core.<$> (o Core..:? "droppedLinksCount")+            Core.<*> (o Core..:? "link")+      )++instance Core.ToJSON Links where+  toJSON Links {..} =+    Core.object+      ( Core.catMaybes+          [ ("droppedLinksCount" Core..=) Core.<$> droppedLinksCount,+            ("link" Core..=) Core.<$> link+          ]+      )++-- | An event describing a message sent\/received between Spans.+--+-- /See:/ 'newMessageEvent' smart constructor.+data MessageEvent = MessageEvent+  { -- | The number of compressed bytes sent or received. If missing, the compressed size is assumed to be the same size as the uncompressed size.+    compressedSizeBytes :: (Core.Maybe Core.Int64),+    -- | An identifier for the MessageEvent\'s message that can be used to match @SENT@ and @RECEIVED@ MessageEvents.+    id :: (Core.Maybe Core.Int64),+    -- | Type of MessageEvent. Indicates whether the message was sent or received.+    type' :: (Core.Maybe MessageEvent_Type),+    -- | The number of uncompressed bytes sent or received.+    uncompressedSizeBytes :: (Core.Maybe Core.Int64)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'MessageEvent' with the minimum fields required to make a request.+newMessageEvent ::+  MessageEvent+newMessageEvent =+  MessageEvent+    { compressedSizeBytes = Core.Nothing,+      id = Core.Nothing,+      type' = Core.Nothing,+      uncompressedSizeBytes = Core.Nothing+    }++instance Core.FromJSON MessageEvent where+  parseJSON =+    Core.withObject+      "MessageEvent"+      ( \o ->+          MessageEvent+            Core.<$> ( o+                         Core..:? "compressedSizeBytes"+                         Core.<&> Core.fmap Core.fromAsText+                     )+            Core.<*> (o Core..:? "id" Core.<&> Core.fmap Core.fromAsText)+            Core.<*> (o Core..:? "type")+            Core.<*> ( o+                         Core..:? "uncompressedSizeBytes"+                         Core.<&> Core.fmap Core.fromAsText+                     )+      )++instance Core.ToJSON MessageEvent where+  toJSON MessageEvent {..} =+    Core.object+      ( Core.catMaybes+          [ ("compressedSizeBytes" Core..=)+              Core.. Core.AsText+              Core.<$> compressedSizeBytes,+            ("id" Core..=) Core.. Core.AsText Core.<$> id,+            ("type" Core..=) Core.<$> type',+            ("uncompressedSizeBytes" Core..=)+              Core.. Core.AsText+              Core.<$> uncompressedSizeBytes+          ]+      )++-- | Binary module.+--+-- /See:/ 'newModule' smart constructor.+data Module = Module+  { -- | A unique identifier for the module, usually a hash of its contents (up to 128 bytes).+    buildId :: (Core.Maybe TruncatableString),+    -- | For example: main binary, kernel modules, and dynamic libraries such as libc.so, sharedlib.so (up to 256 bytes).+    module' :: (Core.Maybe TruncatableString)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Module' with the minimum fields required to make a request.+newModule ::+  Module+newModule = Module {buildId = Core.Nothing, module' = Core.Nothing}++instance Core.FromJSON Module where+  parseJSON =+    Core.withObject+      "Module"+      ( \o ->+          Module+            Core.<$> (o Core..:? "buildId")+            Core.<*> (o Core..:? "module")+      )++instance Core.ToJSON Module where+  toJSON Module {..} =+    Core.object+      ( Core.catMaybes+          [ ("buildId" Core..=) Core.<$> buildId,+            ("module" Core..=) Core.<$> module'+          ]+      )++-- | A span represents a single operation within a trace. Spans can be nested to form a trace tree. Often, a trace contains a root span that describes the end-to-end latency, and one or more subspans for its sub-operations. A trace can also contain multiple root spans, or none at all. Spans do not need to be contiguous. There might be gaps or overlaps between spans in a trace.+--+-- /See:/ 'newSpan' smart constructor.+data Span = Span+  { -- | A set of attributes on the span. You can have up to 32 attributes per span.+    attributes :: (Core.Maybe Attributes),+    -- | Optional. The number of child spans that were generated while this span was active. If set, allows implementation to detect missing child spans.+    childSpanCount :: (Core.Maybe Core.Int32),+    -- | Required. A description of the span\'s operation (up to 128 bytes). Cloud Trace displays the description in the Cloud console. For example, the display name can be a qualified method name or a file name and a line number where the operation is called. A best practice is to use the same display name within an application and at the same call point. This makes it easier to correlate spans in different traces.+    displayName :: (Core.Maybe TruncatableString),+    -- | Required. The end time of the span. On the client side, this is the time kept by the local machine where the span execution ends. On the server side, this is the time when the server application handler stops running.+    endTime :: (Core.Maybe Core.DateTime),+    -- | Links associated with the span. You can have up to 128 links per Span.+    links :: (Core.Maybe Links),+    -- | Required. The resource name of the span in the following format: * @projects\/[PROJECT_ID]\/traces\/[TRACE_ID]\/spans\/[SPAN_ID]@ @[TRACE_ID]@ is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. It should not be zero. @[SPAN_ID]@ is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array. It should not be zero. .+    name :: (Core.Maybe Core.Text),+    -- | The @[SPAN_ID]@ of this span\'s parent span. If this is a root span, then this field must be empty.+    parentSpanId :: (Core.Maybe Core.Text),+    -- | Optional. Set this parameter to indicate whether this span is in the same process as its parent. If you do not set this parameter, Trace is unable to take advantage of this helpful information.+    sameProcessAsParentSpan :: (Core.Maybe Core.Bool),+    -- | Required. The @[SPAN_ID]@ portion of the span\'s resource name.+    spanId :: (Core.Maybe Core.Text),+    -- | Optional. Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using @CLIENT@ (caller) and @SERVER@ (callee) to identify an RPC call.+    spanKind :: (Core.Maybe Span_SpanKind),+    -- | Stack trace captured at the start of the span.+    stackTrace :: (Core.Maybe StackTrace),+    -- | Required. The start time of the span. On the client side, this is the time kept by the local machine where the span execution starts. On the server side, this is the time when the server\'s application handler starts running.+    startTime :: (Core.Maybe Core.DateTime),+    -- | Optional. The final status for this span.+    status :: (Core.Maybe Status),+    -- | A set of time events. You can have up to 32 annotations and 128 message events per span.+    timeEvents :: (Core.Maybe TimeEvents)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Span' with the minimum fields required to make a request.+newSpan ::+  Span+newSpan =+  Span+    { attributes = Core.Nothing,+      childSpanCount = Core.Nothing,+      displayName = Core.Nothing,+      endTime = Core.Nothing,+      links = Core.Nothing,+      name = Core.Nothing,+      parentSpanId = Core.Nothing,+      sameProcessAsParentSpan = Core.Nothing,+      spanId = Core.Nothing,+      spanKind = Core.Nothing,+      stackTrace = Core.Nothing,+      startTime = Core.Nothing,+      status = Core.Nothing,+      timeEvents = Core.Nothing+    }++instance Core.FromJSON Span where+  parseJSON =+    Core.withObject+      "Span"+      ( \o ->+          Span+            Core.<$> (o Core..:? "attributes")+            Core.<*> (o Core..:? "childSpanCount")+            Core.<*> (o Core..:? "displayName")+            Core.<*> (o Core..:? "endTime")+            Core.<*> (o Core..:? "links")+            Core.<*> (o Core..:? "name")+            Core.<*> (o Core..:? "parentSpanId")+            Core.<*> (o Core..:? "sameProcessAsParentSpan")+            Core.<*> (o Core..:? "spanId")+            Core.<*> (o Core..:? "spanKind")+            Core.<*> (o Core..:? "stackTrace")+            Core.<*> (o Core..:? "startTime")+            Core.<*> (o Core..:? "status")+            Core.<*> (o Core..:? "timeEvents")+      )++instance Core.ToJSON Span where+  toJSON Span {..} =+    Core.object+      ( Core.catMaybes+          [ ("attributes" Core..=) Core.<$> attributes,+            ("childSpanCount" Core..=) Core.<$> childSpanCount,+            ("displayName" Core..=) Core.<$> displayName,+            ("endTime" Core..=) Core.<$> endTime,+            ("links" Core..=) Core.<$> links,+            ("name" Core..=) Core.<$> name,+            ("parentSpanId" Core..=) Core.<$> parentSpanId,+            ("sameProcessAsParentSpan" Core..=)+              Core.<$> sameProcessAsParentSpan,+            ("spanId" Core..=) Core.<$> spanId,+            ("spanKind" Core..=) Core.<$> spanKind,+            ("stackTrace" Core..=) Core.<$> stackTrace,+            ("startTime" Core..=) Core.<$> startTime,+            ("status" Core..=) Core.<$> status,+            ("timeEvents" Core..=) Core.<$> timeEvents+          ]+      )++-- | Represents a single stack frame in a stack trace.+--+-- /See:/ 'newStackFrame' smart constructor.+data StackFrame = StackFrame+  { -- | The column number where the function call appears, if available. This is important in JavaScript because of its anonymous functions.+    columnNumber :: (Core.Maybe Core.Int64),+    -- | The name of the source file where the function call appears (up to 256 bytes).+    fileName :: (Core.Maybe TruncatableString),+    -- | The fully-qualified name that uniquely identifies the function or method that is active in this frame (up to 1024 bytes).+    functionName :: (Core.Maybe TruncatableString),+    -- | The line number in @file_name@ where the function call appears.+    lineNumber :: (Core.Maybe Core.Int64),+    -- | The binary module from where the code was loaded.+    loadModule :: (Core.Maybe Module),+    -- | An un-mangled function name, if @function_name@ is mangled. To get information about name mangling, run <https://www.google.com/search?q=cxx+name+mangling this search>. The name can be fully-qualified (up to 1024 bytes).+    originalFunctionName :: (Core.Maybe TruncatableString),+    -- | The version of the deployed source code (up to 128 bytes).+    sourceVersion :: (Core.Maybe TruncatableString)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'StackFrame' with the minimum fields required to make a request.+newStackFrame ::+  StackFrame+newStackFrame =+  StackFrame+    { columnNumber = Core.Nothing,+      fileName = Core.Nothing,+      functionName = Core.Nothing,+      lineNumber = Core.Nothing,+      loadModule = Core.Nothing,+      originalFunctionName = Core.Nothing,+      sourceVersion = Core.Nothing+    }++instance Core.FromJSON StackFrame where+  parseJSON =+    Core.withObject+      "StackFrame"+      ( \o ->+          StackFrame+            Core.<$> (o Core..:? "columnNumber" Core.<&> Core.fmap Core.fromAsText)+            Core.<*> (o Core..:? "fileName")+            Core.<*> (o Core..:? "functionName")+            Core.<*> (o Core..:? "lineNumber" Core.<&> Core.fmap Core.fromAsText)+            Core.<*> (o Core..:? "loadModule")+            Core.<*> (o Core..:? "originalFunctionName")+            Core.<*> (o Core..:? "sourceVersion")+      )++instance Core.ToJSON StackFrame where+  toJSON StackFrame {..} =+    Core.object+      ( Core.catMaybes+          [ ("columnNumber" Core..=) Core.. Core.AsText Core.<$> columnNumber,+            ("fileName" Core..=) Core.<$> fileName,+            ("functionName" Core..=) Core.<$> functionName,+            ("lineNumber" Core..=) Core.. Core.AsText Core.<$> lineNumber,+            ("loadModule" Core..=) Core.<$> loadModule,+            ("originalFunctionName" Core..=) Core.<$> originalFunctionName,+            ("sourceVersion" Core..=) Core.<$> sourceVersion+          ]+      )++-- | A collection of stack frames, which can be truncated.+--+-- /See:/ 'newStackFrames' smart constructor.+data StackFrames = StackFrames+  { -- | The number of stack frames that were dropped because there were too many stack frames. If this value is 0, then no stack frames were dropped.+    droppedFramesCount :: (Core.Maybe Core.Int32),+    -- | Stack frames in this call stack.+    frame :: (Core.Maybe [StackFrame])+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'StackFrames' with the minimum fields required to make a request.+newStackFrames ::+  StackFrames+newStackFrames =+  StackFrames+    { droppedFramesCount = Core.Nothing,+      frame = Core.Nothing+    }++instance Core.FromJSON StackFrames where+  parseJSON =+    Core.withObject+      "StackFrames"+      ( \o ->+          StackFrames+            Core.<$> (o Core..:? "droppedFramesCount")+            Core.<*> (o Core..:? "frame")+      )++instance Core.ToJSON StackFrames where+  toJSON StackFrames {..} =+    Core.object+      ( Core.catMaybes+          [ ("droppedFramesCount" Core..=) Core.<$> droppedFramesCount,+            ("frame" Core..=) Core.<$> frame+          ]+      )++-- | A call stack appearing in a trace.+--+-- /See:/ 'newStackTrace' smart constructor.+data StackTrace = StackTrace+  { -- | Stack frames in this stack trace. A maximum of 128 frames are allowed.+    stackFrames :: (Core.Maybe StackFrames),+    -- | The hash ID is used to conserve network bandwidth for duplicate stack traces within a single trace. Often multiple spans will have identical stack traces. The first occurrence of a stack trace should contain both the @stackFrame@ content and a value in @stackTraceHashId@. Subsequent spans within the same request can refer to that stack trace by only setting @stackTraceHashId@.+    stackTraceHashId :: (Core.Maybe Core.Int64)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'StackTrace' with the minimum fields required to make a request.+newStackTrace ::+  StackTrace+newStackTrace =+  StackTrace+    { stackFrames = Core.Nothing,+      stackTraceHashId = Core.Nothing+    }++instance Core.FromJSON StackTrace where+  parseJSON =+    Core.withObject+      "StackTrace"+      ( \o ->+          StackTrace+            Core.<$> (o Core..:? "stackFrames")+            Core.<*> (o Core..:? "stackTraceHashId" Core.<&> Core.fmap Core.fromAsText)+      )++instance Core.ToJSON StackTrace where+  toJSON StackTrace {..} =+    Core.object+      ( Core.catMaybes+          [ ("stackFrames" Core..=) Core.<$> stackFrames,+            ("stackTraceHashId" Core..=)+              Core.. Core.AsText+              Core.<$> stackTraceHashId+          ]+      )++-- | The @Status@ type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by <https://github.com/grpc gRPC>. Each @Status@ message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the <https://cloud.google.com/apis/design/errors API Design Guide>.+--+-- /See:/ 'newStatus' smart constructor.+data Status = Status+  { -- | The status code, which should be an enum value of google.rpc.Code.+    code :: (Core.Maybe Core.Int32),+    -- | A list of messages that carry the error details. There is a common set of message types for APIs to use.+    details :: (Core.Maybe [Status_DetailsItem]),+    -- | A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.+    message :: (Core.Maybe Core.Text)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Status' with the minimum fields required to make a request.+newStatus ::+  Status+newStatus =+  Status+    { code = Core.Nothing,+      details = Core.Nothing,+      message = Core.Nothing+    }++instance Core.FromJSON Status where+  parseJSON =+    Core.withObject+      "Status"+      ( \o ->+          Status+            Core.<$> (o Core..:? "code")+            Core.<*> (o Core..:? "details")+            Core.<*> (o Core..:? "message")+      )++instance Core.ToJSON Status where+  toJSON Status {..} =+    Core.object+      ( Core.catMaybes+          [ ("code" Core..=) Core.<$> code,+            ("details" Core..=) Core.<$> details,+            ("message" Core..=) Core.<$> message+          ]+      )++--+-- /See:/ 'newStatus_DetailsItem' smart constructor.+newtype Status_DetailsItem = Status_DetailsItem+  { -- | Properties of the object. Contains field \@type with type URL.+    additional :: (Core.HashMap Core.Text Core.Value)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Status_DetailsItem' with the minimum fields required to make a request.+newStatus_DetailsItem ::+  -- |  Properties of the object. Contains field \@type with type URL. See 'additional'.+  Core.HashMap Core.Text Core.Value ->+  Status_DetailsItem+newStatus_DetailsItem additional =+  Status_DetailsItem {additional = additional}++instance Core.FromJSON Status_DetailsItem where+  parseJSON =+    Core.withObject+      "Status_DetailsItem"+      (\o -> Status_DetailsItem Core.<$> (Core.parseJSONObject o))++instance Core.ToJSON Status_DetailsItem where+  toJSON Status_DetailsItem {..} = Core.toJSON additional++-- | A time-stamped annotation or message event in the Span.+--+-- /See:/ 'newTimeEvent' smart constructor.+data TimeEvent = TimeEvent+  { -- | Text annotation with a set of attributes.+    annotation :: (Core.Maybe Annotation),+    -- | An event describing a message sent\/received between Spans.+    messageEvent :: (Core.Maybe MessageEvent),+    -- | The timestamp indicating the time the event occurred.+    time :: (Core.Maybe Core.DateTime)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'TimeEvent' with the minimum fields required to make a request.+newTimeEvent ::+  TimeEvent+newTimeEvent =+  TimeEvent+    { annotation = Core.Nothing,+      messageEvent = Core.Nothing,+      time = Core.Nothing+    }++instance Core.FromJSON TimeEvent where+  parseJSON =+    Core.withObject+      "TimeEvent"+      ( \o ->+          TimeEvent+            Core.<$> (o Core..:? "annotation")+            Core.<*> (o Core..:? "messageEvent")+            Core.<*> (o Core..:? "time")+      )++instance Core.ToJSON TimeEvent where+  toJSON TimeEvent {..} =+    Core.object+      ( Core.catMaybes+          [ ("annotation" Core..=) Core.<$> annotation,+            ("messageEvent" Core..=) Core.<$> messageEvent,+            ("time" Core..=) Core.<$> time+          ]+      )++-- | A collection of @TimeEvent@s. A @TimeEvent@ is a time-stamped annotation on the span, consisting of either user-supplied key:value pairs, or details of a message sent\/received between Spans.+--+-- /See:/ 'newTimeEvents' smart constructor.+data TimeEvents = TimeEvents+  { -- | The number of dropped annotations in all the included time events. If the value is 0, then no annotations were dropped.+    droppedAnnotationsCount :: (Core.Maybe Core.Int32),+    -- | The number of dropped message events in all the included time events. If the value is 0, then no message events were dropped.+    droppedMessageEventsCount :: (Core.Maybe Core.Int32),+    -- | A collection of @TimeEvent@s.+    timeEvent :: (Core.Maybe [TimeEvent])+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'TimeEvents' with the minimum fields required to make a request.+newTimeEvents ::+  TimeEvents+newTimeEvents =+  TimeEvents+    { droppedAnnotationsCount = Core.Nothing,+      droppedMessageEventsCount = Core.Nothing,+      timeEvent = Core.Nothing+    }++instance Core.FromJSON TimeEvents where+  parseJSON =+    Core.withObject+      "TimeEvents"+      ( \o ->+          TimeEvents+            Core.<$> (o Core..:? "droppedAnnotationsCount")+            Core.<*> (o Core..:? "droppedMessageEventsCount")+            Core.<*> (o Core..:? "timeEvent")+      )++instance Core.ToJSON TimeEvents where+  toJSON TimeEvents {..} =+    Core.object+      ( Core.catMaybes+          [ ("droppedAnnotationsCount" Core..=)+              Core.<$> droppedAnnotationsCount,+            ("droppedMessageEventsCount" Core..=)+              Core.<$> droppedMessageEventsCount,+            ("timeEvent" Core..=) Core.<$> timeEvent+          ]+      )++-- | Represents a string that might be shortened to a specified length.+--+-- /See:/ 'newTruncatableString' smart constructor.+data TruncatableString = TruncatableString+  { -- | The number of bytes removed from the original string. If this value is 0, then the string was not shortened.+    truncatedByteCount :: (Core.Maybe Core.Int32),+    -- | The shortened string. For example, if the original string is 500 bytes long and the limit of the string is 128 bytes, then @value@ contains the first 128 bytes of the 500-byte string. Truncation always happens on a UTF8 character boundary. If there are multi-byte characters in the string, then the length of the shortened string might be less than the size limit.+    value :: (Core.Maybe Core.Text)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'TruncatableString' with the minimum fields required to make a request.+newTruncatableString ::+  TruncatableString+newTruncatableString =+  TruncatableString+    { truncatedByteCount = Core.Nothing,+      value = Core.Nothing+    }++instance Core.FromJSON TruncatableString where+  parseJSON =+    Core.withObject+      "TruncatableString"+      ( \o ->+          TruncatableString+            Core.<$> (o Core..:? "truncatedByteCount")+            Core.<*> (o Core..:? "value")+      )++instance Core.ToJSON TruncatableString where+  toJSON TruncatableString {..} =+    Core.object+      ( Core.catMaybes+          [ ("truncatedByteCount" Core..=) Core.<$> truncatedByteCount,+            ("value" Core..=) Core.<$> value+          ]+      )
+ gen/Gogol/CloudTrace/Internal/Sum.hs view
@@ -0,0 +1,201 @@+{-# 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.CloudTrace.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.CloudTrace.Internal.Sum+  ( -- * Xgafv+    Xgafv+      ( Xgafv_1,+        Xgafv_2,+        ..+      ),++    -- * Link_Type+    Link_Type+      ( Link_Type_TYPEUNSPECIFIED,+        Link_Type_CHILDLINKEDSPAN,+        Link_Type_PARENTLINKEDSPAN,+        ..+      ),++    -- * MessageEvent_Type+    MessageEvent_Type+      ( MessageEvent_Type_TYPEUNSPECIFIED,+        MessageEvent_Type_Sent,+        MessageEvent_Type_Received,+        ..+      ),++    -- * Span_SpanKind+    Span_SpanKind+      ( Span_SpanKind_SPANKINDUNSPECIFIED,+        Span_SpanKind_Internal,+        Span_SpanKind_Server,+        Span_SpanKind_Client,+        Span_SpanKind_Producer,+        Span_SpanKind_Consumer,+        ..+      ),+  )+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+  #-}++-- | The relationship of the current span relative to the linked span.+newtype Link_Type = Link_Type {fromLink_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 relationship of the two spans is unknown.+pattern Link_Type_TYPEUNSPECIFIED :: Link_Type+pattern Link_Type_TYPEUNSPECIFIED = Link_Type "TYPE_UNSPECIFIED"++-- | The linked span is a child of the current span.+pattern Link_Type_CHILDLINKEDSPAN :: Link_Type+pattern Link_Type_CHILDLINKEDSPAN = Link_Type "CHILD_LINKED_SPAN"++-- | The linked span is a parent of the current span.+pattern Link_Type_PARENTLINKEDSPAN :: Link_Type+pattern Link_Type_PARENTLINKEDSPAN = Link_Type "PARENT_LINKED_SPAN"++{-# COMPLETE+  Link_Type_TYPEUNSPECIFIED,+  Link_Type_CHILDLINKEDSPAN,+  Link_Type_PARENTLINKEDSPAN,+  Link_Type+  #-}++-- | Type of MessageEvent. Indicates whether the message was sent or received.+newtype MessageEvent_Type = MessageEvent_Type {fromMessageEvent_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+    )++-- | Unknown event type.+pattern MessageEvent_Type_TYPEUNSPECIFIED :: MessageEvent_Type+pattern MessageEvent_Type_TYPEUNSPECIFIED = MessageEvent_Type "TYPE_UNSPECIFIED"++-- | Indicates a sent message.+pattern MessageEvent_Type_Sent :: MessageEvent_Type+pattern MessageEvent_Type_Sent = MessageEvent_Type "SENT"++-- | Indicates a received message.+pattern MessageEvent_Type_Received :: MessageEvent_Type+pattern MessageEvent_Type_Received = MessageEvent_Type "RECEIVED"++{-# COMPLETE+  MessageEvent_Type_TYPEUNSPECIFIED,+  MessageEvent_Type_Sent,+  MessageEvent_Type_Received,+  MessageEvent_Type+  #-}++-- | Optional. Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using @CLIENT@ (caller) and @SERVER@ (callee) to identify an RPC call.+newtype Span_SpanKind = Span_SpanKind {fromSpan_SpanKind :: 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. Do NOT use as default. Implementations MAY assume SpanKind.INTERNAL to be default.+pattern Span_SpanKind_SPANKINDUNSPECIFIED :: Span_SpanKind+pattern Span_SpanKind_SPANKINDUNSPECIFIED = Span_SpanKind "SPAN_KIND_UNSPECIFIED"++-- | Indicates that the span is used internally. Default value.+pattern Span_SpanKind_Internal :: Span_SpanKind+pattern Span_SpanKind_Internal = Span_SpanKind "INTERNAL"++-- | Indicates that the span covers server-side handling of an RPC or other remote network request.+pattern Span_SpanKind_Server :: Span_SpanKind+pattern Span_SpanKind_Server = Span_SpanKind "SERVER"++-- | Indicates that the span covers the client-side wrapper around an RPC or other remote request.+pattern Span_SpanKind_Client :: Span_SpanKind+pattern Span_SpanKind_Client = Span_SpanKind "CLIENT"++-- | Indicates that the span describes producer sending a message to a broker. Unlike client and server, there is no direct critical path latency relationship between producer and consumer spans (e.g. publishing a message to a pubsub service).+pattern Span_SpanKind_Producer :: Span_SpanKind+pattern Span_SpanKind_Producer = Span_SpanKind "PRODUCER"++-- | Indicates that the span describes consumer receiving a message from a broker. Unlike client and server, there is no direct critical path latency relationship between producer and consumer spans (e.g. receiving a message from a pubsub service subscription).+pattern Span_SpanKind_Consumer :: Span_SpanKind+pattern Span_SpanKind_Consumer = Span_SpanKind "CONSUMER"++{-# COMPLETE+  Span_SpanKind_SPANKINDUNSPECIFIED,+  Span_SpanKind_Internal,+  Span_SpanKind_Server,+  Span_SpanKind_Client,+  Span_SpanKind_Producer,+  Span_SpanKind_Consumer,+  Span_SpanKind+  #-}
+ gen/Gogol/CloudTrace/Projects/Traces/BatchWrite.hs view
@@ -0,0 +1,119 @@+{-# 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.CloudTrace.Projects.Traces.BatchWrite+-- 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)+--+-- Batch writes new spans to new or existing traces. You cannot update existing spans.+--+-- /See:/ <https://cloud.google.com/trace Cloud Trace API Reference> for @cloudtrace.projects.traces.batchWrite@.+module Gogol.CloudTrace.Projects.Traces.BatchWrite+  ( -- * Resource+    CloudTraceProjectsTracesBatchWriteResource,++    -- ** Constructing a Request+    CloudTraceProjectsTracesBatchWrite (..),+    newCloudTraceProjectsTracesBatchWrite,+  )+where++import Gogol.CloudTrace.Types+import Gogol.Prelude qualified as Core++-- | A resource alias for @cloudtrace.projects.traces.batchWrite@ method which the+-- 'CloudTraceProjectsTracesBatchWrite' request conforms to.+type CloudTraceProjectsTracesBatchWriteResource =+  "v2"+    Core.:> Core.Capture "name" Core.Text+    Core.:> "traces:batchWrite"+    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] BatchWriteSpansRequest+    Core.:> Core.Post '[Core.JSON] Empty++-- | Batch writes new spans to new or existing traces. You cannot update existing spans.+--+-- /See:/ 'newCloudTraceProjectsTracesBatchWrite' smart constructor.+data CloudTraceProjectsTracesBatchWrite = CloudTraceProjectsTracesBatchWrite+  { -- | V1 error format.+    xgafv :: (Core.Maybe Xgafv),+    -- | OAuth access token.+    accessToken :: (Core.Maybe Core.Text),+    -- | JSONP+    callback :: (Core.Maybe Core.Text),+    -- | Required. The name of the project where the spans belong. The format is @projects\/[PROJECT_ID]@.+    name :: Core.Text,+    -- | Multipart request metadata.+    payload :: BatchWriteSpansRequest,+    -- | 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 'CloudTraceProjectsTracesBatchWrite' with the minimum fields required to make a request.+newCloudTraceProjectsTracesBatchWrite ::+  -- |  Required. The name of the project where the spans belong. The format is @projects\/[PROJECT_ID]@. See 'name'.+  Core.Text ->+  -- |  Multipart request metadata. See 'payload'.+  BatchWriteSpansRequest ->+  CloudTraceProjectsTracesBatchWrite+newCloudTraceProjectsTracesBatchWrite name payload =+  CloudTraceProjectsTracesBatchWrite+    { xgafv = Core.Nothing,+      accessToken = Core.Nothing,+      callback = Core.Nothing,+      name = name,+      payload = payload,+      uploadType = Core.Nothing,+      uploadProtocol = Core.Nothing+    }++instance Core.GoogleRequest CloudTraceProjectsTracesBatchWrite where+  type Rs CloudTraceProjectsTracesBatchWrite = Empty+  type+    Scopes CloudTraceProjectsTracesBatchWrite =+      '[CloudPlatform'FullControl, Trace'Append]+  requestClient CloudTraceProjectsTracesBatchWrite {..} =+    go+      name+      xgafv+      accessToken+      callback+      uploadType+      uploadProtocol+      (Core.Just Core.AltJSON)+      payload+      cloudTraceService+    where+      go =+        Core.buildClient+          ( Core.Proxy ::+              Core.Proxy CloudTraceProjectsTracesBatchWriteResource+          )+          Core.mempty
+ gen/Gogol/CloudTrace/Projects/Traces/Spans/CreateSpan.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.CloudTrace.Projects.Traces.Spans.CreateSpan+-- 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)+--+-- Creates a new span.+--+-- /See:/ <https://cloud.google.com/trace Cloud Trace API Reference> for @cloudtrace.projects.traces.spans.createSpan@.+module Gogol.CloudTrace.Projects.Traces.Spans.CreateSpan+  ( -- * Resource+    CloudTraceProjectsTracesSpansCreateSpanResource,++    -- ** Constructing a Request+    CloudTraceProjectsTracesSpansCreateSpan (..),+    newCloudTraceProjectsTracesSpansCreateSpan,+  )+where++import Gogol.CloudTrace.Types+import Gogol.Prelude qualified as Core++-- | A resource alias for @cloudtrace.projects.traces.spans.createSpan@ method which the+-- 'CloudTraceProjectsTracesSpansCreateSpan' request conforms to.+type CloudTraceProjectsTracesSpansCreateSpanResource =+  "v2"+    Core.:> Core.Capture "name" Core.Text+    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] Span+    Core.:> Core.Post '[Core.JSON] Span++-- | Creates a new span.+--+-- /See:/ 'newCloudTraceProjectsTracesSpansCreateSpan' smart constructor.+data CloudTraceProjectsTracesSpansCreateSpan = CloudTraceProjectsTracesSpansCreateSpan+  { -- | V1 error format.+    xgafv :: (Core.Maybe Xgafv),+    -- | OAuth access token.+    accessToken :: (Core.Maybe Core.Text),+    -- | JSONP+    callback :: (Core.Maybe Core.Text),+    -- | Required. The resource name of the span in the following format: * @projects\/[PROJECT_ID]\/traces\/[TRACE_ID]\/spans\/[SPAN_ID]@ @[TRACE_ID]@ is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. It should not be zero. @[SPAN_ID]@ is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array. It should not be zero. .+    name :: Core.Text,+    -- | Multipart request metadata.+    payload :: Span,+    -- | 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 'CloudTraceProjectsTracesSpansCreateSpan' with the minimum fields required to make a request.+newCloudTraceProjectsTracesSpansCreateSpan ::+  -- |  Required. The resource name of the span in the following format: * @projects\/[PROJECT_ID]\/traces\/[TRACE_ID]\/spans\/[SPAN_ID]@ @[TRACE_ID]@ is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. It should not be zero. @[SPAN_ID]@ is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array. It should not be zero. . See 'name'.+  Core.Text ->+  -- |  Multipart request metadata. See 'payload'.+  Span ->+  CloudTraceProjectsTracesSpansCreateSpan+newCloudTraceProjectsTracesSpansCreateSpan name payload =+  CloudTraceProjectsTracesSpansCreateSpan+    { xgafv = Core.Nothing,+      accessToken = Core.Nothing,+      callback = Core.Nothing,+      name = name,+      payload = payload,+      uploadType = Core.Nothing,+      uploadProtocol = Core.Nothing+    }++instance Core.GoogleRequest CloudTraceProjectsTracesSpansCreateSpan where+  type Rs CloudTraceProjectsTracesSpansCreateSpan = Span+  type+    Scopes CloudTraceProjectsTracesSpansCreateSpan =+      '[CloudPlatform'FullControl, Trace'Append]+  requestClient CloudTraceProjectsTracesSpansCreateSpan {..} =+    go+      name+      xgafv+      accessToken+      callback+      uploadType+      uploadProtocol+      (Core.Just Core.AltJSON)+      payload+      cloudTraceService+    where+      go =+        Core.buildClient+          ( Core.Proxy ::+              Core.Proxy CloudTraceProjectsTracesSpansCreateSpanResource+          )+          Core.mempty
+ gen/Gogol/CloudTrace/Types.hs view
@@ -0,0 +1,142 @@+{-# 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.CloudTrace.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.CloudTrace.Types+  ( -- * Configuration+    cloudTraceService,++    -- * OAuth Scopes+    CloudPlatform'FullControl,+    Trace'Append,++    -- * Types++    -- ** Xgafv+    Xgafv (..),++    -- ** Annotation+    Annotation (..),+    newAnnotation,++    -- ** AttributeValue+    AttributeValue (..),+    newAttributeValue,++    -- ** Attributes+    Attributes (..),+    newAttributes,++    -- ** Attributes_AttributeMap+    Attributes_AttributeMap (..),+    newAttributes_AttributeMap,++    -- ** BatchWriteSpansRequest+    BatchWriteSpansRequest (..),+    newBatchWriteSpansRequest,++    -- ** Empty+    Empty (..),+    newEmpty,++    -- ** Link+    Link (..),+    newLink,++    -- ** Link_Type+    Link_Type (..),++    -- ** Links+    Links (..),+    newLinks,++    -- ** MessageEvent+    MessageEvent (..),+    newMessageEvent,++    -- ** MessageEvent_Type+    MessageEvent_Type (..),++    -- ** Module+    Module (..),+    newModule,++    -- ** Span+    Span (..),+    newSpan,++    -- ** Span_SpanKind+    Span_SpanKind (..),++    -- ** StackFrame+    StackFrame (..),+    newStackFrame,++    -- ** StackFrames+    StackFrames (..),+    newStackFrames,++    -- ** StackTrace+    StackTrace (..),+    newStackTrace,++    -- ** Status+    Status (..),+    newStatus,++    -- ** Status_DetailsItem+    Status_DetailsItem (..),+    newStatus_DetailsItem,++    -- ** TimeEvent+    TimeEvent (..),+    newTimeEvent,++    -- ** TimeEvents+    TimeEvents (..),+    newTimeEvents,++    -- ** TruncatableString+    TruncatableString (..),+    newTruncatableString,+  )+where++import Gogol.CloudTrace.Internal.Product+import Gogol.CloudTrace.Internal.Sum+import Gogol.Prelude qualified as Core++-- | Default request referring to version @v2@ of the Cloud Trace API. This contains the host and root path used as a starting point for constructing service requests.+cloudTraceService :: Core.ServiceConfig+cloudTraceService =+  Core.defaultService+    (Core.ServiceId "cloudtrace:v2")+    "cloudtrace.googleapis.com"++-- | See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.+type CloudPlatform'FullControl =+  "https://www.googleapis.com/auth/cloud-platform"++-- | Write Trace data for a project or application+type Trace'Append = "https://www.googleapis.com/auth/trace.append"
− gen/Network/Google/CloudTrace.hs
@@ -1,201 +0,0 @@-{-# LANGUAGE DataKinds         #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE TypeOperators     #-}--{-# OPTIONS_GHC -fno-warn-unused-imports    #-}-{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}---- |--- Module      : Network.Google.CloudTrace--- 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)------ Sends application trace data to Stackdriver Trace for viewing. Trace--- data is collected for all App Engine applications by default. Trace data--- from other applications can be provided using this API. This library is--- used to interact with the Trace API directly. If you are looking to--- instrument your application for Stackdriver Trace, we recommend using--- OpenCensus.------ /See:/ <https://cloud.google.com/trace Stackdriver Trace API Reference>-module Network.Google.CloudTrace-    (-    -- * Service Configuration-      cloudTraceService--    -- * OAuth Scopes-    , traceAppendScope-    , cloudPlatformScope--    -- * API Declaration-    , CloudTraceAPI--    -- * Resources--    -- ** cloudtrace.projects.traces.batchWrite-    , module Network.Google.Resource.CloudTrace.Projects.Traces.BatchWrite--    -- ** cloudtrace.projects.traces.spans.createSpan-    , module Network.Google.Resource.CloudTrace.Projects.Traces.Spans.CreateSpan--    -- * Types--    -- ** Span-    , Span-    , span-    , sStatus-    , sStartTime-    , sChildSpanCount-    , sSameProcessAsParentSpan-    , sName-    , sStackTrace-    , sAttributes-    , sEndTime-    , sTimeEvents-    , sDisplayName-    , sParentSpanId-    , sLinks-    , sSpanId--    -- ** TruncatableString-    , TruncatableString-    , truncatableString-    , tsValue-    , tsTruncatedByteCount--    -- ** Status-    , Status-    , status-    , sDetails-    , sCode-    , sMessage--    -- ** AttributesAttributeMap-    , AttributesAttributeMap-    , attributesAttributeMap-    , aamAddtional--    -- ** Annotation-    , Annotation-    , annotation-    , aAttributes-    , aDescription--    -- ** AttributeValue-    , AttributeValue-    , attributeValue-    , avBoolValue-    , avIntValue-    , avStringValue--    -- ** MessageEvent-    , MessageEvent-    , messageEvent-    , meId-    , meUncompressedSizeBytes-    , meType-    , meCompressedSizeBytes--    -- ** Empty-    , Empty-    , empty--    -- ** Link-    , Link-    , link-    , lTraceId-    , lAttributes-    , lType-    , lSpanId--    -- ** StatusDetailsItem-    , StatusDetailsItem-    , statusDetailsItem-    , sdiAddtional--    -- ** StackTrace-    , StackTrace-    , stackTrace-    , stStackTraceHashId-    , stStackFrames--    -- ** BatchWriteSpansRequest-    , BatchWriteSpansRequest-    , batchWriteSpansRequest-    , bwsrSpans--    -- ** MessageEventType-    , MessageEventType (..)--    -- ** Attributes-    , Attributes-    , attributes-    , aDroppedAttributesCount-    , aAttributeMap--    -- ** Module-    , Module-    , module'-    , mBuildId-    , mModule--    -- ** TimeEvents-    , TimeEvents-    , timeEvents-    , teDroppedMessageEventsCount-    , teDroppedAnnotationsCount-    , teTimeEvent--    -- ** Xgafv-    , Xgafv (..)--    -- ** StackFrames-    , StackFrames-    , stackFrames-    , sfDroppedFramesCount-    , sfFrame--    -- ** LinkType-    , LinkType (..)--    -- ** StackFrame-    , StackFrame-    , stackFrame-    , sfLoadModule-    , sfOriginalFunctionName-    , sfLineNumber-    , sfSourceVersion-    , sfFunctionName-    , sfColumnNumber-    , sfFileName--    -- ** Links-    , Links-    , links-    , lDroppedLinksCount-    , lLink--    -- ** TimeEvent-    , TimeEvent-    , timeEvent-    , teMessageEvent-    , teAnnotation-    , teTime-    ) where--import           Network.Google.CloudTrace.Types-import           Network.Google.Prelude-import           Network.Google.Resource.CloudTrace.Projects.Traces.BatchWrite-import           Network.Google.Resource.CloudTrace.Projects.Traces.Spans.CreateSpan--{- $resources-TODO--}---- | Represents the entirety of the methods and resources available for the Stackdriver Trace API service.-type CloudTraceAPI =-     ProjectsTracesSpansCreateSpanResource :<|>-       ProjectsTracesBatchWriteResource
− gen/Network/Google/CloudTrace/Types.hs
@@ -1,185 +0,0 @@-{-# LANGUAGE DataKinds          #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE NoImplicitPrelude  #-}-{-# LANGUAGE OverloadedStrings  #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- |--- Module      : Network.Google.CloudTrace.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.CloudTrace.Types-    (-    -- * Service Configuration-      cloudTraceService--    -- * OAuth Scopes-    , traceAppendScope-    , cloudPlatformScope--    -- * Span-    , Span-    , span-    , sStatus-    , sStartTime-    , sChildSpanCount-    , sSameProcessAsParentSpan-    , sName-    , sStackTrace-    , sAttributes-    , sEndTime-    , sTimeEvents-    , sDisplayName-    , sParentSpanId-    , sLinks-    , sSpanId--    -- * TruncatableString-    , TruncatableString-    , truncatableString-    , tsValue-    , tsTruncatedByteCount--    -- * Status-    , Status-    , status-    , sDetails-    , sCode-    , sMessage--    -- * AttributesAttributeMap-    , AttributesAttributeMap-    , attributesAttributeMap-    , aamAddtional--    -- * Annotation-    , Annotation-    , annotation-    , aAttributes-    , aDescription--    -- * AttributeValue-    , AttributeValue-    , attributeValue-    , avBoolValue-    , avIntValue-    , avStringValue--    -- * MessageEvent-    , MessageEvent-    , messageEvent-    , meId-    , meUncompressedSizeBytes-    , meType-    , meCompressedSizeBytes--    -- * Empty-    , Empty-    , empty--    -- * Link-    , Link-    , link-    , lTraceId-    , lAttributes-    , lType-    , lSpanId--    -- * StatusDetailsItem-    , StatusDetailsItem-    , statusDetailsItem-    , sdiAddtional--    -- * StackTrace-    , StackTrace-    , stackTrace-    , stStackTraceHashId-    , stStackFrames--    -- * BatchWriteSpansRequest-    , BatchWriteSpansRequest-    , batchWriteSpansRequest-    , bwsrSpans--    -- * MessageEventType-    , MessageEventType (..)--    -- * Attributes-    , Attributes-    , attributes-    , aDroppedAttributesCount-    , aAttributeMap--    -- * Module-    , Module-    , module'-    , mBuildId-    , mModule--    -- * TimeEvents-    , TimeEvents-    , timeEvents-    , teDroppedMessageEventsCount-    , teDroppedAnnotationsCount-    , teTimeEvent--    -- * Xgafv-    , Xgafv (..)--    -- * StackFrames-    , StackFrames-    , stackFrames-    , sfDroppedFramesCount-    , sfFrame--    -- * LinkType-    , LinkType (..)--    -- * StackFrame-    , StackFrame-    , stackFrame-    , sfLoadModule-    , sfOriginalFunctionName-    , sfLineNumber-    , sfSourceVersion-    , sfFunctionName-    , sfColumnNumber-    , sfFileName--    -- * Links-    , Links-    , links-    , lDroppedLinksCount-    , lLink--    -- * TimeEvent-    , TimeEvent-    , timeEvent-    , teMessageEvent-    , teAnnotation-    , teTime-    ) where--import           Network.Google.CloudTrace.Types.Product-import           Network.Google.CloudTrace.Types.Sum-import           Network.Google.Prelude---- | Default request referring to version 'v2' of the Stackdriver Trace API. This contains the host and root path used as a starting point for constructing service requests.-cloudTraceService :: ServiceConfig-cloudTraceService-  = defaultService (ServiceId "cloudtrace:v2")-      "cloudtrace.googleapis.com"---- | Write Trace data for a project or application-traceAppendScope :: Proxy '["https://www.googleapis.com/auth/trace.append"]-traceAppendScope = Proxy---- | View and manage your data across Google Cloud Platform services-cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]-cloudPlatformScope = Proxy
− gen/Network/Google/CloudTrace/Types/Product.hs
@@ -1,1299 +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.CloudTrace.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.CloudTrace.Types.Product where--import           Network.Google.CloudTrace.Types.Sum-import           Network.Google.Prelude---- | A span represents a single operation within a trace. Spans can be nested--- to form a trace tree. Often, a trace contains a root span that describes--- the end-to-end latency, and one or more subspans for its sub-operations.--- A trace can also contain multiple root spans, or none at all. Spans do--- not need to be contiguous—there may be gaps or overlaps between spans in--- a trace.------ /See:/ 'span' smart constructor.-data Span =-  Span'-    { _sStatus                  :: !(Maybe Status)-    , _sStartTime               :: !(Maybe DateTime')-    , _sChildSpanCount          :: !(Maybe (Textual Int32))-    , _sSameProcessAsParentSpan :: !(Maybe Bool)-    , _sName                    :: !(Maybe Text)-    , _sStackTrace              :: !(Maybe StackTrace)-    , _sAttributes              :: !(Maybe Attributes)-    , _sEndTime                 :: !(Maybe DateTime')-    , _sTimeEvents              :: !(Maybe TimeEvents)-    , _sDisplayName             :: !(Maybe TruncatableString)-    , _sParentSpanId            :: !(Maybe Text)-    , _sLinks                   :: !(Maybe Links)-    , _sSpanId                  :: !(Maybe Text)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Span' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'sStatus'------ * 'sStartTime'------ * 'sChildSpanCount'------ * 'sSameProcessAsParentSpan'------ * 'sName'------ * 'sStackTrace'------ * 'sAttributes'------ * 'sEndTime'------ * 'sTimeEvents'------ * 'sDisplayName'------ * 'sParentSpanId'------ * 'sLinks'------ * 'sSpanId'-span-    :: Span-span =-  Span'-    { _sStatus = Nothing-    , _sStartTime = Nothing-    , _sChildSpanCount = Nothing-    , _sSameProcessAsParentSpan = Nothing-    , _sName = Nothing-    , _sStackTrace = Nothing-    , _sAttributes = Nothing-    , _sEndTime = Nothing-    , _sTimeEvents = Nothing-    , _sDisplayName = Nothing-    , _sParentSpanId = Nothing-    , _sLinks = Nothing-    , _sSpanId = Nothing-    }----- | An optional final status for this span.-sStatus :: Lens' Span (Maybe Status)-sStatus = lens _sStatus (\ s a -> s{_sStatus = a})---- | The start time of the span. On the client side, this is the time kept by--- the local machine where the span execution starts. On the server side,--- this is the time when the server\'s application handler starts running.-sStartTime :: Lens' Span (Maybe UTCTime)-sStartTime-  = lens _sStartTime (\ s a -> s{_sStartTime = a}) .-      mapping _DateTime---- | An optional number of child spans that were generated while this span--- was active. If set, allows implementation to detect missing child spans.-sChildSpanCount :: Lens' Span (Maybe Int32)-sChildSpanCount-  = lens _sChildSpanCount-      (\ s a -> s{_sChildSpanCount = a})-      . mapping _Coerce---- | (Optional) Set this parameter to indicate whether this span is in the--- same process as its parent. If you do not set this parameter,--- Stackdriver Trace is unable to take advantage of this helpful--- information.-sSameProcessAsParentSpan :: Lens' Span (Maybe Bool)-sSameProcessAsParentSpan-  = lens _sSameProcessAsParentSpan-      (\ s a -> s{_sSameProcessAsParentSpan = a})---- | The resource name of the span in the following format:--- projects\/[PROJECT_ID]\/traces\/[TRACE_ID]\/spans\/SPAN_ID is a unique--- identifier for a trace within a project; it is a 32-character--- hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique--- identifier for a span within a trace; it is a 16-character hexadecimal--- encoding of an 8-byte array.-sName :: Lens' Span (Maybe Text)-sName = lens _sName (\ s a -> s{_sName = a})---- | Stack trace captured at the start of the span.-sStackTrace :: Lens' Span (Maybe StackTrace)-sStackTrace-  = lens _sStackTrace (\ s a -> s{_sStackTrace = a})---- | A set of attributes on the span. You can have up to 32 attributes per--- span.-sAttributes :: Lens' Span (Maybe Attributes)-sAttributes-  = lens _sAttributes (\ s a -> s{_sAttributes = a})---- | The end time of the span. On the client side, this is the time kept by--- the local machine where the span execution ends. On the server side,--- this is the time when the server application handler stops running.-sEndTime :: Lens' Span (Maybe UTCTime)-sEndTime-  = lens _sEndTime (\ s a -> s{_sEndTime = a}) .-      mapping _DateTime---- | A set of time events. You can have up to 32 annotations and 128 message--- events per span.-sTimeEvents :: Lens' Span (Maybe TimeEvents)-sTimeEvents-  = lens _sTimeEvents (\ s a -> s{_sTimeEvents = a})---- | A description of the span\'s operation (up to 128 bytes). Stackdriver--- Trace displays the description in the Google Cloud Platform Console. For--- example, the display name can be a qualified method name or a file name--- and a line number where the operation is called. A best practice is to--- use the same display name within an application and at the same call--- point. This makes it easier to correlate spans in different traces.-sDisplayName :: Lens' Span (Maybe TruncatableString)-sDisplayName-  = lens _sDisplayName (\ s a -> s{_sDisplayName = a})---- | The [SPAN_ID] of this span\'s parent span. If this is a root span, then--- this field must be empty.-sParentSpanId :: Lens' Span (Maybe Text)-sParentSpanId-  = lens _sParentSpanId-      (\ s a -> s{_sParentSpanId = a})---- | Links associated with the span. You can have up to 128 links per Span.-sLinks :: Lens' Span (Maybe Links)-sLinks = lens _sLinks (\ s a -> s{_sLinks = a})---- | The [SPAN_ID] portion of the span\'s resource name.-sSpanId :: Lens' Span (Maybe Text)-sSpanId = lens _sSpanId (\ s a -> s{_sSpanId = a})--instance FromJSON Span where-        parseJSON-          = withObject "Span"-              (\ o ->-                 Span' <$>-                   (o .:? "status") <*> (o .:? "startTime") <*>-                     (o .:? "childSpanCount")-                     <*> (o .:? "sameProcessAsParentSpan")-                     <*> (o .:? "name")-                     <*> (o .:? "stackTrace")-                     <*> (o .:? "attributes")-                     <*> (o .:? "endTime")-                     <*> (o .:? "timeEvents")-                     <*> (o .:? "displayName")-                     <*> (o .:? "parentSpanId")-                     <*> (o .:? "links")-                     <*> (o .:? "spanId"))--instance ToJSON Span where-        toJSON Span'{..}-          = object-              (catMaybes-                 [("status" .=) <$> _sStatus,-                  ("startTime" .=) <$> _sStartTime,-                  ("childSpanCount" .=) <$> _sChildSpanCount,-                  ("sameProcessAsParentSpan" .=) <$>-                    _sSameProcessAsParentSpan,-                  ("name" .=) <$> _sName,-                  ("stackTrace" .=) <$> _sStackTrace,-                  ("attributes" .=) <$> _sAttributes,-                  ("endTime" .=) <$> _sEndTime,-                  ("timeEvents" .=) <$> _sTimeEvents,-                  ("displayName" .=) <$> _sDisplayName,-                  ("parentSpanId" .=) <$> _sParentSpanId,-                  ("links" .=) <$> _sLinks,-                  ("spanId" .=) <$> _sSpanId])---- | Represents a string that might be shortened to a specified length.------ /See:/ 'truncatableString' smart constructor.-data TruncatableString =-  TruncatableString'-    { _tsValue              :: !(Maybe Text)-    , _tsTruncatedByteCount :: !(Maybe (Textual Int32))-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'TruncatableString' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'tsValue'------ * 'tsTruncatedByteCount'-truncatableString-    :: TruncatableString-truncatableString =-  TruncatableString' {_tsValue = Nothing, _tsTruncatedByteCount = Nothing}----- | The shortened string. For example, if the original string is 500 bytes--- long and the limit of the string is 128 bytes, then \`value\` contains--- the first 128 bytes of the 500-byte string. Truncation always happens on--- a UTF8 character boundary. If there are multi-byte characters in the--- string, then the length of the shortened string might be less than the--- size limit.-tsValue :: Lens' TruncatableString (Maybe Text)-tsValue = lens _tsValue (\ s a -> s{_tsValue = a})---- | The number of bytes removed from the original string. If this value is--- 0, then the string was not shortened.-tsTruncatedByteCount :: Lens' TruncatableString (Maybe Int32)-tsTruncatedByteCount-  = lens _tsTruncatedByteCount-      (\ s a -> s{_tsTruncatedByteCount = a})-      . mapping _Coerce--instance FromJSON TruncatableString where-        parseJSON-          = withObject "TruncatableString"-              (\ o ->-                 TruncatableString' <$>-                   (o .:? "value") <*> (o .:? "truncatedByteCount"))--instance ToJSON TruncatableString where-        toJSON TruncatableString'{..}-          = object-              (catMaybes-                 [("value" .=) <$> _tsValue,-                  ("truncatedByteCount" .=) <$> _tsTruncatedByteCount])---- | The \`Status\` type defines a logical error model that is suitable for--- different programming environments, including REST APIs and RPC APIs. It--- is used by [gRPC](https:\/\/github.com\/grpc). The error model is--- designed to be: - Simple to use and understand for most users - Flexible--- enough to meet unexpected needs # Overview The \`Status\` message--- contains three pieces of data: error code, error message, and error--- details. The error code should be an enum value of google.rpc.Code, but--- it may accept additional error codes if needed. The error message should--- be a developer-facing English message that helps developers *understand*--- and *resolve* the error. If a localized user-facing error message is--- needed, put the localized message in the error details or localize it in--- the client. The optional error details may contain arbitrary information--- about the error. There is a predefined set of error detail types in the--- package \`google.rpc\` that can be used for common error conditions. #--- Language mapping The \`Status\` message is the logical representation of--- the error model, but it is not necessarily the actual wire format. When--- the \`Status\` message is exposed in different client libraries and--- different wire protocols, it can be mapped differently. For example, it--- will likely be mapped to some exceptions in Java, but more likely mapped--- to some error codes in C. # Other uses The error model and the--- \`Status\` message can be used in a variety of environments, either with--- or without APIs, to provide a consistent developer experience across--- different environments. Example uses of this error model include: ---- Partial errors. If a service needs to return partial errors to the--- client, it may embed the \`Status\` in the normal response to indicate--- the partial errors. - Workflow errors. A typical workflow has multiple--- steps. Each step may have a \`Status\` message for error reporting. ---- Batch operations. If a client uses batch request and batch response, the--- \`Status\` message should be used directly inside batch response, one--- for each error sub-response. - Asynchronous operations. If an API call--- embeds asynchronous operation results in its response, the status of--- those operations should be represented directly using the \`Status\`--- message. - Logging. If some API errors are stored in logs, the message--- \`Status\` could be used directly after any stripping needed for--- security\/privacy reasons.------ /See:/ 'status' smart constructor.-data Status =-  Status'-    { _sDetails :: !(Maybe [StatusDetailsItem])-    , _sCode    :: !(Maybe (Textual Int32))-    , _sMessage :: !(Maybe Text)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Status' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'sDetails'------ * 'sCode'------ * 'sMessage'-status-    :: Status-status = Status' {_sDetails = Nothing, _sCode = Nothing, _sMessage = Nothing}----- | A list of messages that carry the error details. There is a common set--- of message types for APIs to use.-sDetails :: Lens' Status [StatusDetailsItem]-sDetails-  = lens _sDetails (\ s a -> s{_sDetails = a}) .-      _Default-      . _Coerce---- | The status code, which should be an enum value of google.rpc.Code.-sCode :: Lens' Status (Maybe Int32)-sCode-  = lens _sCode (\ s a -> s{_sCode = a}) .-      mapping _Coerce---- | A developer-facing error message, which should be in English. Any--- user-facing error message should be localized and sent in the--- google.rpc.Status.details field, or localized by the client.-sMessage :: Lens' Status (Maybe Text)-sMessage = lens _sMessage (\ s a -> s{_sMessage = a})--instance FromJSON Status where-        parseJSON-          = withObject "Status"-              (\ o ->-                 Status' <$>-                   (o .:? "details" .!= mempty) <*> (o .:? "code") <*>-                     (o .:? "message"))--instance ToJSON Status where-        toJSON Status'{..}-          = object-              (catMaybes-                 [("details" .=) <$> _sDetails,-                  ("code" .=) <$> _sCode,-                  ("message" .=) <$> _sMessage])---- | The set of attributes. Each attribute\'s key can be up to 128 bytes--- long. The value can be a string up to 256 bytes, a signed 64-bit--- integer, or the Boolean values \`true\` and \`false\`. For example:--- \"\/instance_id\": \"my-instance\" \"\/http\/user_agent\": \"\"--- \"\/http\/request_bytes\": 300 \"abc.com\/myattribute\": true------ /See:/ 'attributesAttributeMap' smart constructor.-newtype AttributesAttributeMap =-  AttributesAttributeMap'-    { _aamAddtional :: HashMap Text AttributeValue-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'AttributesAttributeMap' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'aamAddtional'-attributesAttributeMap-    :: HashMap Text AttributeValue -- ^ 'aamAddtional'-    -> AttributesAttributeMap-attributesAttributeMap pAamAddtional_ =-  AttributesAttributeMap' {_aamAddtional = _Coerce # pAamAddtional_}---aamAddtional :: Lens' AttributesAttributeMap (HashMap Text AttributeValue)-aamAddtional-  = lens _aamAddtional (\ s a -> s{_aamAddtional = a})-      . _Coerce--instance FromJSON AttributesAttributeMap where-        parseJSON-          = withObject "AttributesAttributeMap"-              (\ o ->-                 AttributesAttributeMap' <$> (parseJSONObject o))--instance ToJSON AttributesAttributeMap where-        toJSON = toJSON . _aamAddtional---- | Text annotation with a set of attributes.------ /See:/ 'annotation' smart constructor.-data Annotation =-  Annotation'-    { _aAttributes  :: !(Maybe Attributes)-    , _aDescription :: !(Maybe TruncatableString)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Annotation' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'aAttributes'------ * 'aDescription'-annotation-    :: Annotation-annotation = Annotation' {_aAttributes = Nothing, _aDescription = Nothing}----- | A set of attributes on the annotation. You can have up to 4 attributes--- per Annotation.-aAttributes :: Lens' Annotation (Maybe Attributes)-aAttributes-  = lens _aAttributes (\ s a -> s{_aAttributes = a})---- | A user-supplied message describing the event. The maximum length for the--- description is 256 bytes.-aDescription :: Lens' Annotation (Maybe TruncatableString)-aDescription-  = lens _aDescription (\ s a -> s{_aDescription = a})--instance FromJSON Annotation where-        parseJSON-          = withObject "Annotation"-              (\ o ->-                 Annotation' <$>-                   (o .:? "attributes") <*> (o .:? "description"))--instance ToJSON Annotation where-        toJSON Annotation'{..}-          = object-              (catMaybes-                 [("attributes" .=) <$> _aAttributes,-                  ("description" .=) <$> _aDescription])---- | The allowed types for [VALUE] in a \`[KEY]:[VALUE]\` attribute.------ /See:/ 'attributeValue' smart constructor.-data AttributeValue =-  AttributeValue'-    { _avBoolValue   :: !(Maybe Bool)-    , _avIntValue    :: !(Maybe (Textual Int64))-    , _avStringValue :: !(Maybe TruncatableString)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'AttributeValue' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'avBoolValue'------ * 'avIntValue'------ * 'avStringValue'-attributeValue-    :: AttributeValue-attributeValue =-  AttributeValue'-    {_avBoolValue = Nothing, _avIntValue = Nothing, _avStringValue = Nothing}----- | A Boolean value represented by \`true\` or \`false\`.-avBoolValue :: Lens' AttributeValue (Maybe Bool)-avBoolValue-  = lens _avBoolValue (\ s a -> s{_avBoolValue = a})---- | A 64-bit signed integer.-avIntValue :: Lens' AttributeValue (Maybe Int64)-avIntValue-  = lens _avIntValue (\ s a -> s{_avIntValue = a}) .-      mapping _Coerce---- | A string up to 256 bytes long.-avStringValue :: Lens' AttributeValue (Maybe TruncatableString)-avStringValue-  = lens _avStringValue-      (\ s a -> s{_avStringValue = a})--instance FromJSON AttributeValue where-        parseJSON-          = withObject "AttributeValue"-              (\ o ->-                 AttributeValue' <$>-                   (o .:? "boolValue") <*> (o .:? "intValue") <*>-                     (o .:? "stringValue"))--instance ToJSON AttributeValue where-        toJSON AttributeValue'{..}-          = object-              (catMaybes-                 [("boolValue" .=) <$> _avBoolValue,-                  ("intValue" .=) <$> _avIntValue,-                  ("stringValue" .=) <$> _avStringValue])---- | An event describing a message sent\/received between Spans.------ /See:/ 'messageEvent' smart constructor.-data MessageEvent =-  MessageEvent'-    { _meId                    :: !(Maybe (Textual Int64))-    , _meUncompressedSizeBytes :: !(Maybe (Textual Int64))-    , _meType                  :: !(Maybe MessageEventType)-    , _meCompressedSizeBytes   :: !(Maybe (Textual Int64))-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'MessageEvent' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'meId'------ * 'meUncompressedSizeBytes'------ * 'meType'------ * 'meCompressedSizeBytes'-messageEvent-    :: MessageEvent-messageEvent =-  MessageEvent'-    { _meId = Nothing-    , _meUncompressedSizeBytes = Nothing-    , _meType = Nothing-    , _meCompressedSizeBytes = Nothing-    }----- | An identifier for the MessageEvent\'s message that can be used to match--- SENT and RECEIVED MessageEvents. It is recommended to be unique within a--- Span.-meId :: Lens' MessageEvent (Maybe Int64)-meId-  = lens _meId (\ s a -> s{_meId = a}) .-      mapping _Coerce---- | The number of uncompressed bytes sent or received.-meUncompressedSizeBytes :: Lens' MessageEvent (Maybe Int64)-meUncompressedSizeBytes-  = lens _meUncompressedSizeBytes-      (\ s a -> s{_meUncompressedSizeBytes = a})-      . mapping _Coerce---- | Type of MessageEvent. Indicates whether the message was sent or--- received.-meType :: Lens' MessageEvent (Maybe MessageEventType)-meType = lens _meType (\ s a -> s{_meType = a})---- | The number of compressed bytes sent or received. If missing assumed to--- be the same size as uncompressed.-meCompressedSizeBytes :: Lens' MessageEvent (Maybe Int64)-meCompressedSizeBytes-  = lens _meCompressedSizeBytes-      (\ s a -> s{_meCompressedSizeBytes = a})-      . mapping _Coerce--instance FromJSON MessageEvent where-        parseJSON-          = withObject "MessageEvent"-              (\ o ->-                 MessageEvent' <$>-                   (o .:? "id") <*> (o .:? "uncompressedSizeBytes") <*>-                     (o .:? "type")-                     <*> (o .:? "compressedSizeBytes"))--instance ToJSON MessageEvent where-        toJSON MessageEvent'{..}-          = object-              (catMaybes-                 [("id" .=) <$> _meId,-                  ("uncompressedSizeBytes" .=) <$>-                    _meUncompressedSizeBytes,-                  ("type" .=) <$> _meType,-                  ("compressedSizeBytes" .=) <$>-                    _meCompressedSizeBytes])---- | A generic empty message that you can re-use to avoid defining duplicated--- empty messages in your APIs. A typical example is to use it as the--- request or the response type of an API method. For instance: service Foo--- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The--- JSON representation for \`Empty\` is empty JSON object \`{}\`.------ /See:/ 'empty' smart constructor.-data Empty =-  Empty'-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Empty' with the minimum fields required to make a request.----empty-    :: Empty-empty = Empty'---instance FromJSON Empty where-        parseJSON = withObject "Empty" (\ o -> pure Empty')--instance ToJSON Empty where-        toJSON = const emptyObject---- | A pointer from the current span to another span in the same trace or in--- a different trace. For example, this can be used in batching operations,--- where a single batch handler processes multiple requests from different--- traces or when the handler receives a request from a different project.------ /See:/ 'link' smart constructor.-data Link =-  Link'-    { _lTraceId    :: !(Maybe Text)-    , _lAttributes :: !(Maybe Attributes)-    , _lType       :: !(Maybe LinkType)-    , _lSpanId     :: !(Maybe Text)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Link' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'lTraceId'------ * 'lAttributes'------ * 'lType'------ * 'lSpanId'-link-    :: Link-link =-  Link'-    { _lTraceId = Nothing-    , _lAttributes = Nothing-    , _lType = Nothing-    , _lSpanId = Nothing-    }----- | The [TRACE_ID] for a trace within a project.-lTraceId :: Lens' Link (Maybe Text)-lTraceId = lens _lTraceId (\ s a -> s{_lTraceId = a})---- | A set of attributes on the link. You have have up to 32 attributes per--- link.-lAttributes :: Lens' Link (Maybe Attributes)-lAttributes-  = lens _lAttributes (\ s a -> s{_lAttributes = a})---- | The relationship of the current span relative to the linked span.-lType :: Lens' Link (Maybe LinkType)-lType = lens _lType (\ s a -> s{_lType = a})---- | The [SPAN_ID] for a span within a trace.-lSpanId :: Lens' Link (Maybe Text)-lSpanId = lens _lSpanId (\ s a -> s{_lSpanId = a})--instance FromJSON Link where-        parseJSON-          = withObject "Link"-              (\ o ->-                 Link' <$>-                   (o .:? "traceId") <*> (o .:? "attributes") <*>-                     (o .:? "type")-                     <*> (o .:? "spanId"))--instance ToJSON Link where-        toJSON Link'{..}-          = object-              (catMaybes-                 [("traceId" .=) <$> _lTraceId,-                  ("attributes" .=) <$> _lAttributes,-                  ("type" .=) <$> _lType, ("spanId" .=) <$> _lSpanId])------- /See:/ 'statusDetailsItem' smart constructor.-newtype StatusDetailsItem =-  StatusDetailsItem'-    { _sdiAddtional :: HashMap Text JSONValue-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'StatusDetailsItem' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'sdiAddtional'-statusDetailsItem-    :: HashMap Text JSONValue -- ^ 'sdiAddtional'-    -> StatusDetailsItem-statusDetailsItem pSdiAddtional_ =-  StatusDetailsItem' {_sdiAddtional = _Coerce # pSdiAddtional_}----- | Properties of the object. Contains field \'type with type URL.-sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)-sdiAddtional-  = lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})-      . _Coerce--instance FromJSON StatusDetailsItem where-        parseJSON-          = withObject "StatusDetailsItem"-              (\ o -> StatusDetailsItem' <$> (parseJSONObject o))--instance ToJSON StatusDetailsItem where-        toJSON = toJSON . _sdiAddtional---- | A call stack appearing in a trace.------ /See:/ 'stackTrace' smart constructor.-data StackTrace =-  StackTrace'-    { _stStackTraceHashId :: !(Maybe (Textual Int64))-    , _stStackFrames      :: !(Maybe StackFrames)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'StackTrace' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'stStackTraceHashId'------ * 'stStackFrames'-stackTrace-    :: StackTrace-stackTrace =-  StackTrace' {_stStackTraceHashId = Nothing, _stStackFrames = Nothing}----- | The hash ID is used to conserve network bandwidth for duplicate stack--- traces within a single trace. Often multiple spans will have identical--- stack traces. The first occurrence of a stack trace should contain both--- the \`stackFrame\` content and a value in \`stackTraceHashId\`.--- Subsequent spans within the same request can refer to that stack trace--- by only setting \`stackTraceHashId\`.-stStackTraceHashId :: Lens' StackTrace (Maybe Int64)-stStackTraceHashId-  = lens _stStackTraceHashId-      (\ s a -> s{_stStackTraceHashId = a})-      . mapping _Coerce---- | Stack frames in this stack trace. A maximum of 128 frames are allowed.-stStackFrames :: Lens' StackTrace (Maybe StackFrames)-stStackFrames-  = lens _stStackFrames-      (\ s a -> s{_stStackFrames = a})--instance FromJSON StackTrace where-        parseJSON-          = withObject "StackTrace"-              (\ o ->-                 StackTrace' <$>-                   (o .:? "stackTraceHashId") <*> (o .:? "stackFrames"))--instance ToJSON StackTrace where-        toJSON StackTrace'{..}-          = object-              (catMaybes-                 [("stackTraceHashId" .=) <$> _stStackTraceHashId,-                  ("stackFrames" .=) <$> _stStackFrames])---- | The request message for the \`BatchWriteSpans\` method.------ /See:/ 'batchWriteSpansRequest' smart constructor.-newtype BatchWriteSpansRequest =-  BatchWriteSpansRequest'-    { _bwsrSpans :: Maybe [Span]-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'BatchWriteSpansRequest' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'bwsrSpans'-batchWriteSpansRequest-    :: BatchWriteSpansRequest-batchWriteSpansRequest = BatchWriteSpansRequest' {_bwsrSpans = Nothing}----- | A list of new spans. The span names must not match existing spans, or--- the results are undefined.-bwsrSpans :: Lens' BatchWriteSpansRequest [Span]-bwsrSpans-  = lens _bwsrSpans (\ s a -> s{_bwsrSpans = a}) .-      _Default-      . _Coerce--instance FromJSON BatchWriteSpansRequest where-        parseJSON-          = withObject "BatchWriteSpansRequest"-              (\ o ->-                 BatchWriteSpansRequest' <$>-                   (o .:? "spans" .!= mempty))--instance ToJSON BatchWriteSpansRequest where-        toJSON BatchWriteSpansRequest'{..}-          = object (catMaybes [("spans" .=) <$> _bwsrSpans])---- | A set of attributes, each in the format \`[KEY]:[VALUE]\`.------ /See:/ 'attributes' smart constructor.-data Attributes =-  Attributes'-    { _aDroppedAttributesCount :: !(Maybe (Textual Int32))-    , _aAttributeMap           :: !(Maybe AttributesAttributeMap)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Attributes' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'aDroppedAttributesCount'------ * 'aAttributeMap'-attributes-    :: Attributes-attributes =-  Attributes' {_aDroppedAttributesCount = Nothing, _aAttributeMap = Nothing}----- | The number of attributes that were discarded. Attributes can be--- discarded because their keys are too long or because there are too many--- attributes. If this value is 0 then all attributes are valid.-aDroppedAttributesCount :: Lens' Attributes (Maybe Int32)-aDroppedAttributesCount-  = lens _aDroppedAttributesCount-      (\ s a -> s{_aDroppedAttributesCount = a})-      . mapping _Coerce---- | The set of attributes. Each attribute\'s key can be up to 128 bytes--- long. The value can be a string up to 256 bytes, a signed 64-bit--- integer, or the Boolean values \`true\` and \`false\`. For example:--- \"\/instance_id\": \"my-instance\" \"\/http\/user_agent\": \"\"--- \"\/http\/request_bytes\": 300 \"abc.com\/myattribute\": true-aAttributeMap :: Lens' Attributes (Maybe AttributesAttributeMap)-aAttributeMap-  = lens _aAttributeMap-      (\ s a -> s{_aAttributeMap = a})--instance FromJSON Attributes where-        parseJSON-          = withObject "Attributes"-              (\ o ->-                 Attributes' <$>-                   (o .:? "droppedAttributesCount") <*>-                     (o .:? "attributeMap"))--instance ToJSON Attributes where-        toJSON Attributes'{..}-          = object-              (catMaybes-                 [("droppedAttributesCount" .=) <$>-                    _aDroppedAttributesCount,-                  ("attributeMap" .=) <$> _aAttributeMap])---- | Binary module.------ /See:/ 'module'' smart constructor.-data Module =-  Module'-    { _mBuildId :: !(Maybe TruncatableString)-    , _mModule  :: !(Maybe TruncatableString)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Module' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'mBuildId'------ * 'mModule'-module'-    :: Module-module' = Module' {_mBuildId = Nothing, _mModule = Nothing}----- | A unique identifier for the module, usually a hash of its contents (up--- to 128 bytes).-mBuildId :: Lens' Module (Maybe TruncatableString)-mBuildId = lens _mBuildId (\ s a -> s{_mBuildId = a})---- | For example: main binary, kernel modules, and dynamic libraries such as--- libc.so, sharedlib.so (up to 256 bytes).-mModule :: Lens' Module (Maybe TruncatableString)-mModule = lens _mModule (\ s a -> s{_mModule = a})--instance FromJSON Module where-        parseJSON-          = withObject "Module"-              (\ o ->-                 Module' <$> (o .:? "buildId") <*> (o .:? "module"))--instance ToJSON Module where-        toJSON Module'{..}-          = object-              (catMaybes-                 [("buildId" .=) <$> _mBuildId,-                  ("module" .=) <$> _mModule])---- | A collection of \`TimeEvent\`s. A \`TimeEvent\` is a time-stamped--- annotation on the span, consisting of either user-supplied key:value--- pairs, or details of a message sent\/received between Spans.------ /See:/ 'timeEvents' smart constructor.-data TimeEvents =-  TimeEvents'-    { _teDroppedMessageEventsCount :: !(Maybe (Textual Int32))-    , _teDroppedAnnotationsCount   :: !(Maybe (Textual Int32))-    , _teTimeEvent                 :: !(Maybe [TimeEvent])-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'TimeEvents' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'teDroppedMessageEventsCount'------ * 'teDroppedAnnotationsCount'------ * 'teTimeEvent'-timeEvents-    :: TimeEvents-timeEvents =-  TimeEvents'-    { _teDroppedMessageEventsCount = Nothing-    , _teDroppedAnnotationsCount = Nothing-    , _teTimeEvent = Nothing-    }----- | The number of dropped message events in all the included time events. If--- the value is 0, then no message events were dropped.-teDroppedMessageEventsCount :: Lens' TimeEvents (Maybe Int32)-teDroppedMessageEventsCount-  = lens _teDroppedMessageEventsCount-      (\ s a -> s{_teDroppedMessageEventsCount = a})-      . mapping _Coerce---- | The number of dropped annotations in all the included time events. If--- the value is 0, then no annotations were dropped.-teDroppedAnnotationsCount :: Lens' TimeEvents (Maybe Int32)-teDroppedAnnotationsCount-  = lens _teDroppedAnnotationsCount-      (\ s a -> s{_teDroppedAnnotationsCount = a})-      . mapping _Coerce---- | A collection of \`TimeEvent\`s.-teTimeEvent :: Lens' TimeEvents [TimeEvent]-teTimeEvent-  = lens _teTimeEvent (\ s a -> s{_teTimeEvent = a}) .-      _Default-      . _Coerce--instance FromJSON TimeEvents where-        parseJSON-          = withObject "TimeEvents"-              (\ o ->-                 TimeEvents' <$>-                   (o .:? "droppedMessageEventsCount") <*>-                     (o .:? "droppedAnnotationsCount")-                     <*> (o .:? "timeEvent" .!= mempty))--instance ToJSON TimeEvents where-        toJSON TimeEvents'{..}-          = object-              (catMaybes-                 [("droppedMessageEventsCount" .=) <$>-                    _teDroppedMessageEventsCount,-                  ("droppedAnnotationsCount" .=) <$>-                    _teDroppedAnnotationsCount,-                  ("timeEvent" .=) <$> _teTimeEvent])---- | A collection of stack frames, which can be truncated.------ /See:/ 'stackFrames' smart constructor.-data StackFrames =-  StackFrames'-    { _sfDroppedFramesCount :: !(Maybe (Textual Int32))-    , _sfFrame              :: !(Maybe [StackFrame])-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'StackFrames' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'sfDroppedFramesCount'------ * 'sfFrame'-stackFrames-    :: StackFrames-stackFrames = StackFrames' {_sfDroppedFramesCount = Nothing, _sfFrame = Nothing}----- | The number of stack frames that were dropped because there were too many--- stack frames. If this value is 0, then no stack frames were dropped.-sfDroppedFramesCount :: Lens' StackFrames (Maybe Int32)-sfDroppedFramesCount-  = lens _sfDroppedFramesCount-      (\ s a -> s{_sfDroppedFramesCount = a})-      . mapping _Coerce---- | Stack frames in this call stack.-sfFrame :: Lens' StackFrames [StackFrame]-sfFrame-  = lens _sfFrame (\ s a -> s{_sfFrame = a}) . _Default-      . _Coerce--instance FromJSON StackFrames where-        parseJSON-          = withObject "StackFrames"-              (\ o ->-                 StackFrames' <$>-                   (o .:? "droppedFramesCount") <*>-                     (o .:? "frame" .!= mempty))--instance ToJSON StackFrames where-        toJSON StackFrames'{..}-          = object-              (catMaybes-                 [("droppedFramesCount" .=) <$> _sfDroppedFramesCount,-                  ("frame" .=) <$> _sfFrame])---- | Represents a single stack frame in a stack trace.------ /See:/ 'stackFrame' smart constructor.-data StackFrame =-  StackFrame'-    { _sfLoadModule           :: !(Maybe Module)-    , _sfOriginalFunctionName :: !(Maybe TruncatableString)-    , _sfLineNumber           :: !(Maybe (Textual Int64))-    , _sfSourceVersion        :: !(Maybe TruncatableString)-    , _sfFunctionName         :: !(Maybe TruncatableString)-    , _sfColumnNumber         :: !(Maybe (Textual Int64))-    , _sfFileName             :: !(Maybe TruncatableString)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'StackFrame' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'sfLoadModule'------ * 'sfOriginalFunctionName'------ * 'sfLineNumber'------ * 'sfSourceVersion'------ * 'sfFunctionName'------ * 'sfColumnNumber'------ * 'sfFileName'-stackFrame-    :: StackFrame-stackFrame =-  StackFrame'-    { _sfLoadModule = Nothing-    , _sfOriginalFunctionName = Nothing-    , _sfLineNumber = Nothing-    , _sfSourceVersion = Nothing-    , _sfFunctionName = Nothing-    , _sfColumnNumber = Nothing-    , _sfFileName = Nothing-    }----- | The binary module from where the code was loaded.-sfLoadModule :: Lens' StackFrame (Maybe Module)-sfLoadModule-  = lens _sfLoadModule (\ s a -> s{_sfLoadModule = a})---- | An un-mangled function name, if \`function_name\` is--- [mangled](http:\/\/www.avabodh.com\/cxxin\/namemangling.html). The name--- can be fully-qualified (up to 1024 bytes).-sfOriginalFunctionName :: Lens' StackFrame (Maybe TruncatableString)-sfOriginalFunctionName-  = lens _sfOriginalFunctionName-      (\ s a -> s{_sfOriginalFunctionName = a})---- | The line number in \`file_name\` where the function call appears.-sfLineNumber :: Lens' StackFrame (Maybe Int64)-sfLineNumber-  = lens _sfLineNumber (\ s a -> s{_sfLineNumber = a})-      . mapping _Coerce---- | The version of the deployed source code (up to 128 bytes).-sfSourceVersion :: Lens' StackFrame (Maybe TruncatableString)-sfSourceVersion-  = lens _sfSourceVersion-      (\ s a -> s{_sfSourceVersion = a})---- | The fully-qualified name that uniquely identifies the function or method--- that is active in this frame (up to 1024 bytes).-sfFunctionName :: Lens' StackFrame (Maybe TruncatableString)-sfFunctionName-  = lens _sfFunctionName-      (\ s a -> s{_sfFunctionName = a})---- | The column number where the function call appears, if available. This is--- important in JavaScript because of its anonymous functions.-sfColumnNumber :: Lens' StackFrame (Maybe Int64)-sfColumnNumber-  = lens _sfColumnNumber-      (\ s a -> s{_sfColumnNumber = a})-      . mapping _Coerce---- | The name of the source file where the function call appears (up to 256--- bytes).-sfFileName :: Lens' StackFrame (Maybe TruncatableString)-sfFileName-  = lens _sfFileName (\ s a -> s{_sfFileName = a})--instance FromJSON StackFrame where-        parseJSON-          = withObject "StackFrame"-              (\ o ->-                 StackFrame' <$>-                   (o .:? "loadModule") <*>-                     (o .:? "originalFunctionName")-                     <*> (o .:? "lineNumber")-                     <*> (o .:? "sourceVersion")-                     <*> (o .:? "functionName")-                     <*> (o .:? "columnNumber")-                     <*> (o .:? "fileName"))--instance ToJSON StackFrame where-        toJSON StackFrame'{..}-          = object-              (catMaybes-                 [("loadModule" .=) <$> _sfLoadModule,-                  ("originalFunctionName" .=) <$>-                    _sfOriginalFunctionName,-                  ("lineNumber" .=) <$> _sfLineNumber,-                  ("sourceVersion" .=) <$> _sfSourceVersion,-                  ("functionName" .=) <$> _sfFunctionName,-                  ("columnNumber" .=) <$> _sfColumnNumber,-                  ("fileName" .=) <$> _sfFileName])---- | A collection of links, which are references from this span to a span in--- the same or different trace.------ /See:/ 'links' smart constructor.-data Links =-  Links'-    { _lDroppedLinksCount :: !(Maybe (Textual Int32))-    , _lLink              :: !(Maybe [Link])-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Links' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'lDroppedLinksCount'------ * 'lLink'-links-    :: Links-links = Links' {_lDroppedLinksCount = Nothing, _lLink = Nothing}----- | The number of dropped links after the maximum size was enforced. If this--- value is 0, then no links were dropped.-lDroppedLinksCount :: Lens' Links (Maybe Int32)-lDroppedLinksCount-  = lens _lDroppedLinksCount-      (\ s a -> s{_lDroppedLinksCount = a})-      . mapping _Coerce---- | A collection of links.-lLink :: Lens' Links [Link]-lLink-  = lens _lLink (\ s a -> s{_lLink = a}) . _Default .-      _Coerce--instance FromJSON Links where-        parseJSON-          = withObject "Links"-              (\ o ->-                 Links' <$>-                   (o .:? "droppedLinksCount") <*>-                     (o .:? "link" .!= mempty))--instance ToJSON Links where-        toJSON Links'{..}-          = object-              (catMaybes-                 [("droppedLinksCount" .=) <$> _lDroppedLinksCount,-                  ("link" .=) <$> _lLink])---- | A time-stamped annotation or message event in the Span.------ /See:/ 'timeEvent' smart constructor.-data TimeEvent =-  TimeEvent'-    { _teMessageEvent :: !(Maybe MessageEvent)-    , _teAnnotation   :: !(Maybe Annotation)-    , _teTime         :: !(Maybe DateTime')-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'TimeEvent' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'teMessageEvent'------ * 'teAnnotation'------ * 'teTime'-timeEvent-    :: TimeEvent-timeEvent =-  TimeEvent'-    {_teMessageEvent = Nothing, _teAnnotation = Nothing, _teTime = Nothing}----- | An event describing a message sent\/received between Spans.-teMessageEvent :: Lens' TimeEvent (Maybe MessageEvent)-teMessageEvent-  = lens _teMessageEvent-      (\ s a -> s{_teMessageEvent = a})---- | Text annotation with a set of attributes.-teAnnotation :: Lens' TimeEvent (Maybe Annotation)-teAnnotation-  = lens _teAnnotation (\ s a -> s{_teAnnotation = a})---- | The timestamp indicating the time the event occurred.-teTime :: Lens' TimeEvent (Maybe UTCTime)-teTime-  = lens _teTime (\ s a -> s{_teTime = a}) .-      mapping _DateTime--instance FromJSON TimeEvent where-        parseJSON-          = withObject "TimeEvent"-              (\ o ->-                 TimeEvent' <$>-                   (o .:? "messageEvent") <*> (o .:? "annotation") <*>-                     (o .:? "time"))--instance ToJSON TimeEvent where-        toJSON TimeEvent'{..}-          = object-              (catMaybes-                 [("messageEvent" .=) <$> _teMessageEvent,-                  ("annotation" .=) <$> _teAnnotation,-                  ("time" .=) <$> _teTime])
− gen/Network/Google/CloudTrace/Types/Sum.hs
@@ -1,117 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE LambdaCase         #-}-{-# LANGUAGE NoImplicitPrelude  #-}-{-# LANGUAGE OverloadedStrings  #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- |--- Module      : Network.Google.CloudTrace.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.CloudTrace.Types.Sum where--import           Network.Google.Prelude hiding (Bytes)---- | Type of MessageEvent. Indicates whether the message was sent or--- received.-data MessageEventType-    = TypeUnspecified-      -- ^ @TYPE_UNSPECIFIED@-      -- Unknown event type.-    | Sent-      -- ^ @SENT@-      -- Indicates a sent message.-    | Received-      -- ^ @RECEIVED@-      -- Indicates a received message.-      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable MessageEventType--instance FromHttpApiData MessageEventType where-    parseQueryParam = \case-        "TYPE_UNSPECIFIED" -> Right TypeUnspecified-        "SENT" -> Right Sent-        "RECEIVED" -> Right Received-        x -> Left ("Unable to parse MessageEventType from: " <> x)--instance ToHttpApiData MessageEventType where-    toQueryParam = \case-        TypeUnspecified -> "TYPE_UNSPECIFIED"-        Sent -> "SENT"-        Received -> "RECEIVED"--instance FromJSON MessageEventType where-    parseJSON = parseJSONText "MessageEventType"--instance ToJSON MessageEventType where-    toJSON = toJSONText---- | 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 relationship of the current span relative to the linked span.-data LinkType-    = LTTypeUnspecified-      -- ^ @TYPE_UNSPECIFIED@-      -- The relationship of the two spans is unknown.-    | LTChildLinkedSpan-      -- ^ @CHILD_LINKED_SPAN@-      -- The linked span is a child of the current span.-    | LTParentLinkedSpan-      -- ^ @PARENT_LINKED_SPAN@-      -- The linked span is a parent of the current span.-      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable LinkType--instance FromHttpApiData LinkType where-    parseQueryParam = \case-        "TYPE_UNSPECIFIED" -> Right LTTypeUnspecified-        "CHILD_LINKED_SPAN" -> Right LTChildLinkedSpan-        "PARENT_LINKED_SPAN" -> Right LTParentLinkedSpan-        x -> Left ("Unable to parse LinkType from: " <> x)--instance ToHttpApiData LinkType where-    toQueryParam = \case-        LTTypeUnspecified -> "TYPE_UNSPECIFIED"-        LTChildLinkedSpan -> "CHILD_LINKED_SPAN"-        LTParentLinkedSpan -> "PARENT_LINKED_SPAN"--instance FromJSON LinkType where-    parseJSON = parseJSONText "LinkType"--instance ToJSON LinkType where-    toJSON = toJSONText
− gen/Network/Google/Resource/CloudTrace/Projects/Traces/BatchWrite.hs
@@ -1,168 +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.CloudTrace.Projects.Traces.BatchWrite--- 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)------ Sends new spans to new or existing traces. You cannot update existing--- spans.------ /See:/ <https://cloud.google.com/trace Stackdriver Trace API Reference> for @cloudtrace.projects.traces.batchWrite@.-module Network.Google.Resource.CloudTrace.Projects.Traces.BatchWrite-    (-    -- * REST Resource-      ProjectsTracesBatchWriteResource--    -- * Creating a Request-    , projectsTracesBatchWrite-    , ProjectsTracesBatchWrite--    -- * Request Lenses-    , ptbwXgafv-    , ptbwUploadProtocol-    , ptbwAccessToken-    , ptbwUploadType-    , ptbwPayload-    , ptbwName-    , ptbwCallback-    ) where--import           Network.Google.CloudTrace.Types-import           Network.Google.Prelude---- | A resource alias for @cloudtrace.projects.traces.batchWrite@ method which the--- 'ProjectsTracesBatchWrite' request conforms to.-type ProjectsTracesBatchWriteResource =-     "v2" :>-       Capture "name" Text :>-         "traces:batchWrite" :>-           QueryParam "$.xgafv" Xgafv :>-             QueryParam "upload_protocol" Text :>-               QueryParam "access_token" Text :>-                 QueryParam "uploadType" Text :>-                   QueryParam "callback" Text :>-                     QueryParam "alt" AltJSON :>-                       ReqBody '[JSON] BatchWriteSpansRequest :>-                         Post '[JSON] Empty---- | Sends new spans to new or existing traces. You cannot update existing--- spans.------ /See:/ 'projectsTracesBatchWrite' smart constructor.-data ProjectsTracesBatchWrite =-  ProjectsTracesBatchWrite'-    { _ptbwXgafv          :: !(Maybe Xgafv)-    , _ptbwUploadProtocol :: !(Maybe Text)-    , _ptbwAccessToken    :: !(Maybe Text)-    , _ptbwUploadType     :: !(Maybe Text)-    , _ptbwPayload        :: !BatchWriteSpansRequest-    , _ptbwName           :: !Text-    , _ptbwCallback       :: !(Maybe Text)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'ProjectsTracesBatchWrite' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'ptbwXgafv'------ * 'ptbwUploadProtocol'------ * 'ptbwAccessToken'------ * 'ptbwUploadType'------ * 'ptbwPayload'------ * 'ptbwName'------ * 'ptbwCallback'-projectsTracesBatchWrite-    :: BatchWriteSpansRequest -- ^ 'ptbwPayload'-    -> Text -- ^ 'ptbwName'-    -> ProjectsTracesBatchWrite-projectsTracesBatchWrite pPtbwPayload_ pPtbwName_ =-  ProjectsTracesBatchWrite'-    { _ptbwXgafv = Nothing-    , _ptbwUploadProtocol = Nothing-    , _ptbwAccessToken = Nothing-    , _ptbwUploadType = Nothing-    , _ptbwPayload = pPtbwPayload_-    , _ptbwName = pPtbwName_-    , _ptbwCallback = Nothing-    }----- | V1 error format.-ptbwXgafv :: Lens' ProjectsTracesBatchWrite (Maybe Xgafv)-ptbwXgafv-  = lens _ptbwXgafv (\ s a -> s{_ptbwXgafv = a})---- | Upload protocol for media (e.g. \"raw\", \"multipart\").-ptbwUploadProtocol :: Lens' ProjectsTracesBatchWrite (Maybe Text)-ptbwUploadProtocol-  = lens _ptbwUploadProtocol-      (\ s a -> s{_ptbwUploadProtocol = a})---- | OAuth access token.-ptbwAccessToken :: Lens' ProjectsTracesBatchWrite (Maybe Text)-ptbwAccessToken-  = lens _ptbwAccessToken-      (\ s a -> s{_ptbwAccessToken = a})---- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").-ptbwUploadType :: Lens' ProjectsTracesBatchWrite (Maybe Text)-ptbwUploadType-  = lens _ptbwUploadType-      (\ s a -> s{_ptbwUploadType = a})---- | Multipart request metadata.-ptbwPayload :: Lens' ProjectsTracesBatchWrite BatchWriteSpansRequest-ptbwPayload-  = lens _ptbwPayload (\ s a -> s{_ptbwPayload = a})---- | Required. The name of the project where the spans belong. The format is--- \`projects\/[PROJECT_ID]\`.-ptbwName :: Lens' ProjectsTracesBatchWrite Text-ptbwName = lens _ptbwName (\ s a -> s{_ptbwName = a})---- | JSONP-ptbwCallback :: Lens' ProjectsTracesBatchWrite (Maybe Text)-ptbwCallback-  = lens _ptbwCallback (\ s a -> s{_ptbwCallback = a})--instance GoogleRequest ProjectsTracesBatchWrite where-        type Rs ProjectsTracesBatchWrite = Empty-        type Scopes ProjectsTracesBatchWrite =-             '["https://www.googleapis.com/auth/cloud-platform",-               "https://www.googleapis.com/auth/trace.append"]-        requestClient ProjectsTracesBatchWrite'{..}-          = go _ptbwName _ptbwXgafv _ptbwUploadProtocol-              _ptbwAccessToken-              _ptbwUploadType-              _ptbwCallback-              (Just AltJSON)-              _ptbwPayload-              cloudTraceService-          where go-                  = buildClient-                      (Proxy :: Proxy ProjectsTracesBatchWriteResource)-                      mempty
− gen/Network/Google/Resource/CloudTrace/Projects/Traces/Spans/CreateSpan.hs
@@ -1,172 +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.CloudTrace.Projects.Traces.Spans.CreateSpan--- 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)------ Creates a new span.------ /See:/ <https://cloud.google.com/trace Stackdriver Trace API Reference> for @cloudtrace.projects.traces.spans.createSpan@.-module Network.Google.Resource.CloudTrace.Projects.Traces.Spans.CreateSpan-    (-    -- * REST Resource-      ProjectsTracesSpansCreateSpanResource--    -- * Creating a Request-    , projectsTracesSpansCreateSpan-    , ProjectsTracesSpansCreateSpan--    -- * Request Lenses-    , ptscsXgafv-    , ptscsUploadProtocol-    , ptscsAccessToken-    , ptscsUploadType-    , ptscsPayload-    , ptscsName-    , ptscsCallback-    ) where--import           Network.Google.CloudTrace.Types-import           Network.Google.Prelude---- | A resource alias for @cloudtrace.projects.traces.spans.createSpan@ method which the--- 'ProjectsTracesSpansCreateSpan' request conforms to.-type ProjectsTracesSpansCreateSpanResource =-     "v2" :>-       Capture "name" Text :>-         QueryParam "$.xgafv" Xgafv :>-           QueryParam "upload_protocol" Text :>-             QueryParam "access_token" Text :>-               QueryParam "uploadType" Text :>-                 QueryParam "callback" Text :>-                   QueryParam "alt" AltJSON :>-                     ReqBody '[JSON] Span :> Post '[JSON] Span---- | Creates a new span.------ /See:/ 'projectsTracesSpansCreateSpan' smart constructor.-data ProjectsTracesSpansCreateSpan =-  ProjectsTracesSpansCreateSpan'-    { _ptscsXgafv          :: !(Maybe Xgafv)-    , _ptscsUploadProtocol :: !(Maybe Text)-    , _ptscsAccessToken    :: !(Maybe Text)-    , _ptscsUploadType     :: !(Maybe Text)-    , _ptscsPayload        :: !Span-    , _ptscsName           :: !Text-    , _ptscsCallback       :: !(Maybe Text)-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'ProjectsTracesSpansCreateSpan' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'ptscsXgafv'------ * 'ptscsUploadProtocol'------ * 'ptscsAccessToken'------ * 'ptscsUploadType'------ * 'ptscsPayload'------ * 'ptscsName'------ * 'ptscsCallback'-projectsTracesSpansCreateSpan-    :: Span -- ^ 'ptscsPayload'-    -> Text -- ^ 'ptscsName'-    -> ProjectsTracesSpansCreateSpan-projectsTracesSpansCreateSpan pPtscsPayload_ pPtscsName_ =-  ProjectsTracesSpansCreateSpan'-    { _ptscsXgafv = Nothing-    , _ptscsUploadProtocol = Nothing-    , _ptscsAccessToken = Nothing-    , _ptscsUploadType = Nothing-    , _ptscsPayload = pPtscsPayload_-    , _ptscsName = pPtscsName_-    , _ptscsCallback = Nothing-    }----- | V1 error format.-ptscsXgafv :: Lens' ProjectsTracesSpansCreateSpan (Maybe Xgafv)-ptscsXgafv-  = lens _ptscsXgafv (\ s a -> s{_ptscsXgafv = a})---- | Upload protocol for media (e.g. \"raw\", \"multipart\").-ptscsUploadProtocol :: Lens' ProjectsTracesSpansCreateSpan (Maybe Text)-ptscsUploadProtocol-  = lens _ptscsUploadProtocol-      (\ s a -> s{_ptscsUploadProtocol = a})---- | OAuth access token.-ptscsAccessToken :: Lens' ProjectsTracesSpansCreateSpan (Maybe Text)-ptscsAccessToken-  = lens _ptscsAccessToken-      (\ s a -> s{_ptscsAccessToken = a})---- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").-ptscsUploadType :: Lens' ProjectsTracesSpansCreateSpan (Maybe Text)-ptscsUploadType-  = lens _ptscsUploadType-      (\ s a -> s{_ptscsUploadType = a})---- | Multipart request metadata.-ptscsPayload :: Lens' ProjectsTracesSpansCreateSpan Span-ptscsPayload-  = lens _ptscsPayload (\ s a -> s{_ptscsPayload = a})---- | The resource name of the span in the following format:--- projects\/[PROJECT_ID]\/traces\/[TRACE_ID]\/spans\/SPAN_ID is a unique--- identifier for a trace within a project; it is a 32-character--- hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique--- identifier for a span within a trace; it is a 16-character hexadecimal--- encoding of an 8-byte array.-ptscsName :: Lens' ProjectsTracesSpansCreateSpan Text-ptscsName-  = lens _ptscsName (\ s a -> s{_ptscsName = a})---- | JSONP-ptscsCallback :: Lens' ProjectsTracesSpansCreateSpan (Maybe Text)-ptscsCallback-  = lens _ptscsCallback-      (\ s a -> s{_ptscsCallback = a})--instance GoogleRequest ProjectsTracesSpansCreateSpan-         where-        type Rs ProjectsTracesSpansCreateSpan = Span-        type Scopes ProjectsTracesSpansCreateSpan =-             '["https://www.googleapis.com/auth/cloud-platform",-               "https://www.googleapis.com/auth/trace.append"]-        requestClient ProjectsTracesSpansCreateSpan'{..}-          = go _ptscsName _ptscsXgafv _ptscsUploadProtocol-              _ptscsAccessToken-              _ptscsUploadType-              _ptscsCallback-              (Just AltJSON)-              _ptscsPayload-              cloudTraceService-          where go-                  = buildClient-                      (Proxy ::-                         Proxy ProjectsTracesSpansCreateSpanResource)-                      mempty
gogol-cloudtrace.cabal view
@@ -1,52 +1,62 @@-name:                  gogol-cloudtrace-version:               0.5.0-synopsis:              Google Stackdriver Trace 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-cloudtrace+version:            1.0.0+synopsis:           Google Cloud Trace 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:-    Sends application trace data to Stackdriver Trace for viewing. Trace-    data is collected for all App Engine applications by default. Trace data-    from other applications can be provided using this API. This library is-    used to interact with the Trace API directly. If you are looking to-    instrument your application for Stackdriver Trace, we recommend using-    OpenCensus.-    .-    /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 @v2@-    of the API.+  Sends application trace data to Cloud Trace for viewing. Trace data is collected for all App Engine applications by default. Trace data from other applications can be provided using this API. This library is used to interact with the Cloud Trace API directly. If you are looking to instrument your application for Cloud Trace, we recommend using OpenTelemetry.+  .+  /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 @v2@+  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-cloudtrace +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.CloudTrace-        , Network.Google.CloudTrace.Types-        , Network.Google.Resource.CloudTrace.Projects.Traces.BatchWrite-        , Network.Google.Resource.CloudTrace.Projects.Traces.Spans.CreateSpan+  exposed-modules:+    Gogol.CloudTrace+    Gogol.CloudTrace.Projects.Traces.BatchWrite+    Gogol.CloudTrace.Projects.Traces.Spans.CreateSpan+    Gogol.CloudTrace.Types -    other-modules:-          Network.Google.CloudTrace.Types.Product-        , Network.Google.CloudTrace.Types.Sum+  other-modules:+    Gogol.CloudTrace.Internal.Product+    Gogol.CloudTrace.Internal.Sum -    build-depends:-          gogol-core == 0.5.0.*-        , base       >= 4.7 && < 5+  build-depends:    gogol-core ^>=1.0.0