{- This file was auto-generated from opentelemetry/proto/collector/metrics/v1/metrics_service.proto by the proto-lens-protoc program. -}
{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}
{-# OPTIONS_GHC -Wno-unused-imports#-}
{-# OPTIONS_GHC -Wno-duplicate-exports#-}
{-# OPTIONS_GHC -Wno-dodgy-exports#-}
module Proto.Opentelemetry.Proto.Collector.Metrics.V1.MetricsService (
        MetricsService(..), ExportMetricsServiceRequest(),
        ExportMetricsServiceResponse()
    ) where
import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism
import qualified Data.ProtoLens.Runtime.Prelude as Prelude
import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int
import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid
import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word
import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types
import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2
import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked
import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text
import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map
import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString
import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8
import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding
import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector
import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic
import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed
import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read
import qualified Proto.Opentelemetry.Proto.Metrics.V1.Metrics
{- | Fields :
     
         * 'Proto.Opentelemetry.Proto.Collector.Metrics.V1.MetricsService_Fields.resourceMetrics' @:: Lens' ExportMetricsServiceRequest [Proto.Opentelemetry.Proto.Metrics.V1.Metrics.ResourceMetrics]@
         * 'Proto.Opentelemetry.Proto.Collector.Metrics.V1.MetricsService_Fields.vec'resourceMetrics' @:: Lens' ExportMetricsServiceRequest (Data.Vector.Vector Proto.Opentelemetry.Proto.Metrics.V1.Metrics.ResourceMetrics)@ -}
data ExportMetricsServiceRequest
  = ExportMetricsServiceRequest'_constructor {ExportMetricsServiceRequest -> Vector ResourceMetrics
_ExportMetricsServiceRequest'resourceMetrics :: !(Data.Vector.Vector Proto.Opentelemetry.Proto.Metrics.V1.Metrics.ResourceMetrics),
                                              ExportMetricsServiceRequest -> FieldSet
_ExportMetricsServiceRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
(ExportMetricsServiceRequest
 -> ExportMetricsServiceRequest -> Bool)
-> (ExportMetricsServiceRequest
    -> ExportMetricsServiceRequest -> Bool)
-> Eq ExportMetricsServiceRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
$c/= :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
== :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
$c== :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
Prelude.Eq, Eq ExportMetricsServiceRequest
Eq ExportMetricsServiceRequest
-> (ExportMetricsServiceRequest
    -> ExportMetricsServiceRequest -> Ordering)
-> (ExportMetricsServiceRequest
    -> ExportMetricsServiceRequest -> Bool)
-> (ExportMetricsServiceRequest
    -> ExportMetricsServiceRequest -> Bool)
-> (ExportMetricsServiceRequest
    -> ExportMetricsServiceRequest -> Bool)
-> (ExportMetricsServiceRequest
    -> ExportMetricsServiceRequest -> Bool)
-> (ExportMetricsServiceRequest
    -> ExportMetricsServiceRequest -> ExportMetricsServiceRequest)
-> (ExportMetricsServiceRequest
    -> ExportMetricsServiceRequest -> ExportMetricsServiceRequest)
-> Ord ExportMetricsServiceRequest
ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> Ordering
ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> ExportMetricsServiceRequest
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> ExportMetricsServiceRequest
$cmin :: ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> ExportMetricsServiceRequest
max :: ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> ExportMetricsServiceRequest
$cmax :: ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> ExportMetricsServiceRequest
>= :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
$c>= :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
> :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
$c> :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
<= :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
$c<= :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
< :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
$c< :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
compare :: ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> Ordering
$ccompare :: ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> Ordering
$cp1Ord :: Eq ExportMetricsServiceRequest
Prelude.Ord)
instance Prelude.Show ExportMetricsServiceRequest where
  showsPrec :: Int -> ExportMetricsServiceRequest -> ShowS
showsPrec Int
_ ExportMetricsServiceRequest
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (ExportMetricsServiceRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ExportMetricsServiceRequest
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField ExportMetricsServiceRequest "resourceMetrics" [Proto.Opentelemetry.Proto.Metrics.V1.Metrics.ResourceMetrics] where
  fieldOf :: Proxy# "resourceMetrics"
-> ([ResourceMetrics] -> f [ResourceMetrics])
-> ExportMetricsServiceRequest
-> f ExportMetricsServiceRequest
fieldOf Proxy# "resourceMetrics"
_
    = ((Vector ResourceMetrics -> f (Vector ResourceMetrics))
 -> ExportMetricsServiceRequest -> f ExportMetricsServiceRequest)
-> (([ResourceMetrics] -> f [ResourceMetrics])
    -> Vector ResourceMetrics -> f (Vector ResourceMetrics))
-> ([ResourceMetrics] -> f [ResourceMetrics])
-> ExportMetricsServiceRequest
-> f ExportMetricsServiceRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ExportMetricsServiceRequest -> Vector ResourceMetrics)
-> (ExportMetricsServiceRequest
    -> Vector ResourceMetrics -> ExportMetricsServiceRequest)
-> Lens
     ExportMetricsServiceRequest
     ExportMetricsServiceRequest
     (Vector ResourceMetrics)
     (Vector ResourceMetrics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ExportMetricsServiceRequest -> Vector ResourceMetrics
_ExportMetricsServiceRequest'resourceMetrics
           (\ ExportMetricsServiceRequest
x__ Vector ResourceMetrics
y__
              -> ExportMetricsServiceRequest
x__ {_ExportMetricsServiceRequest'resourceMetrics :: Vector ResourceMetrics
_ExportMetricsServiceRequest'resourceMetrics = Vector ResourceMetrics
y__}))
        ((Vector ResourceMetrics -> [ResourceMetrics])
-> (Vector ResourceMetrics
    -> [ResourceMetrics] -> Vector ResourceMetrics)
-> Lens
     (Vector ResourceMetrics)
     (Vector ResourceMetrics)
     [ResourceMetrics]
     [ResourceMetrics]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector ResourceMetrics -> [ResourceMetrics]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ Vector ResourceMetrics
_ [ResourceMetrics]
y__ -> [ResourceMetrics] -> Vector ResourceMetrics
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [ResourceMetrics]
y__))
instance Data.ProtoLens.Field.HasField ExportMetricsServiceRequest "vec'resourceMetrics" (Data.Vector.Vector Proto.Opentelemetry.Proto.Metrics.V1.Metrics.ResourceMetrics) where
  fieldOf :: Proxy# "vec'resourceMetrics"
-> (Vector ResourceMetrics -> f (Vector ResourceMetrics))
-> ExportMetricsServiceRequest
-> f ExportMetricsServiceRequest
fieldOf Proxy# "vec'resourceMetrics"
_
    = ((Vector ResourceMetrics -> f (Vector ResourceMetrics))
 -> ExportMetricsServiceRequest -> f ExportMetricsServiceRequest)
-> ((Vector ResourceMetrics -> f (Vector ResourceMetrics))
    -> Vector ResourceMetrics -> f (Vector ResourceMetrics))
-> (Vector ResourceMetrics -> f (Vector ResourceMetrics))
-> ExportMetricsServiceRequest
-> f ExportMetricsServiceRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ExportMetricsServiceRequest -> Vector ResourceMetrics)
-> (ExportMetricsServiceRequest
    -> Vector ResourceMetrics -> ExportMetricsServiceRequest)
-> Lens
     ExportMetricsServiceRequest
     ExportMetricsServiceRequest
     (Vector ResourceMetrics)
     (Vector ResourceMetrics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ExportMetricsServiceRequest -> Vector ResourceMetrics
_ExportMetricsServiceRequest'resourceMetrics
           (\ ExportMetricsServiceRequest
x__ Vector ResourceMetrics
y__
              -> ExportMetricsServiceRequest
x__ {_ExportMetricsServiceRequest'resourceMetrics :: Vector ResourceMetrics
_ExportMetricsServiceRequest'resourceMetrics = Vector ResourceMetrics
y__}))
        (Vector ResourceMetrics -> f (Vector ResourceMetrics))
-> Vector ResourceMetrics -> f (Vector ResourceMetrics)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ExportMetricsServiceRequest where
  messageName :: Proxy ExportMetricsServiceRequest -> Text
messageName Proxy ExportMetricsServiceRequest
_
    = String -> Text
Data.Text.pack
        String
"opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"
  packedMessageDescriptor :: Proxy ExportMetricsServiceRequest -> ByteString
packedMessageDescriptor Proxy ExportMetricsServiceRequest
_
    = ByteString
"\n\
      \\ESCExportMetricsServiceRequest\DC2Z\n\
      \\DLEresource_metrics\CAN\SOH \ETX(\v2/.opentelemetry.proto.metrics.v1.ResourceMetricsR\SIresourceMetrics"
  packedFileDescriptor :: Proxy ExportMetricsServiceRequest -> ByteString
packedFileDescriptor Proxy ExportMetricsServiceRequest
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor ExportMetricsServiceRequest)
fieldsByTag
    = let
        resourceMetrics__field_descriptor :: FieldDescriptor ExportMetricsServiceRequest
resourceMetrics__field_descriptor
          = String
-> FieldTypeDescriptor ResourceMetrics
-> FieldAccessor ExportMetricsServiceRequest ResourceMetrics
-> FieldDescriptor ExportMetricsServiceRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"resource_metrics"
              (MessageOrGroup -> FieldTypeDescriptor ResourceMetrics
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Opentelemetry.Proto.Metrics.V1.Metrics.ResourceMetrics)
              (Packing
-> Lens' ExportMetricsServiceRequest [ResourceMetrics]
-> FieldAccessor ExportMetricsServiceRequest ResourceMetrics
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Unpacked
                 (forall s a (f :: * -> *).
(HasField s "resourceMetrics" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"resourceMetrics")) ::
              Data.ProtoLens.FieldDescriptor ExportMetricsServiceRequest
      in
        [(Tag, FieldDescriptor ExportMetricsServiceRequest)]
-> Map Tag (FieldDescriptor ExportMetricsServiceRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor ExportMetricsServiceRequest
resourceMetrics__field_descriptor)]
  unknownFields :: LensLike' f ExportMetricsServiceRequest FieldSet
unknownFields
    = (ExportMetricsServiceRequest -> FieldSet)
-> (ExportMetricsServiceRequest
    -> FieldSet -> ExportMetricsServiceRequest)
-> Lens' ExportMetricsServiceRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        ExportMetricsServiceRequest -> FieldSet
_ExportMetricsServiceRequest'_unknownFields
        (\ ExportMetricsServiceRequest
x__ FieldSet
y__
           -> ExportMetricsServiceRequest
x__ {_ExportMetricsServiceRequest'_unknownFields :: FieldSet
_ExportMetricsServiceRequest'_unknownFields = FieldSet
y__})
  defMessage :: ExportMetricsServiceRequest
defMessage
    = ExportMetricsServiceRequest'_constructor :: Vector ResourceMetrics -> FieldSet -> ExportMetricsServiceRequest
ExportMetricsServiceRequest'_constructor
        {_ExportMetricsServiceRequest'resourceMetrics :: Vector ResourceMetrics
_ExportMetricsServiceRequest'resourceMetrics = Vector ResourceMetrics
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _ExportMetricsServiceRequest'_unknownFields :: FieldSet
_ExportMetricsServiceRequest'_unknownFields = []}
  parseMessage :: Parser ExportMetricsServiceRequest
parseMessage
    = let
        loop ::
          ExportMetricsServiceRequest
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Proto.Opentelemetry.Proto.Metrics.V1.Metrics.ResourceMetrics
             -> Data.ProtoLens.Encoding.Bytes.Parser ExportMetricsServiceRequest
        loop :: ExportMetricsServiceRequest
-> Growing Vector RealWorld ResourceMetrics
-> Parser ExportMetricsServiceRequest
loop ExportMetricsServiceRequest
x Growing Vector RealWorld ResourceMetrics
mutable'resourceMetrics
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector ResourceMetrics
frozen'resourceMetrics <- IO (Vector ResourceMetrics) -> Parser (Vector ResourceMetrics)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                                  (Growing Vector (PrimState IO) ResourceMetrics
-> IO (Vector ResourceMetrics)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> m (v a)
Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                     Growing Vector RealWorld ResourceMetrics
Growing Vector (PrimState IO) ResourceMetrics
mutable'resourceMetrics)
                      (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  String
"Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      ExportMetricsServiceRequest -> Parser ExportMetricsServiceRequest
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter
  ExportMetricsServiceRequest
  ExportMetricsServiceRequest
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> ExportMetricsServiceRequest
-> ExportMetricsServiceRequest
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter
  ExportMetricsServiceRequest
  ExportMetricsServiceRequest
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter
  ExportMetricsServiceRequest
  ExportMetricsServiceRequest
  (Vector ResourceMetrics)
  (Vector ResourceMetrics)
-> Vector ResourceMetrics
-> ExportMetricsServiceRequest
-> ExportMetricsServiceRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall s a (f :: * -> *).
(HasField s "vec'resourceMetrics" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'resourceMetrics")
                              Vector ResourceMetrics
frozen'resourceMetrics ExportMetricsServiceRequest
x))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do !ResourceMetrics
y <- Parser ResourceMetrics -> String -> Parser ResourceMetrics
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser ResourceMetrics -> Parser ResourceMetrics
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                              (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                              Parser ResourceMetrics
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        String
"resource_metrics"
                                Growing Vector RealWorld ResourceMetrics
v <- IO (Growing Vector RealWorld ResourceMetrics)
-> Parser (Growing Vector RealWorld ResourceMetrics)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) ResourceMetrics
-> ResourceMetrics
-> IO (Growing Vector (PrimState IO) ResourceMetrics)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append
                                          Growing Vector RealWorld ResourceMetrics
Growing Vector (PrimState IO) ResourceMetrics
mutable'resourceMetrics ResourceMetrics
y)
                                ExportMetricsServiceRequest
-> Growing Vector RealWorld ResourceMetrics
-> Parser ExportMetricsServiceRequest
loop ExportMetricsServiceRequest
x Growing Vector RealWorld ResourceMetrics
v
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                ExportMetricsServiceRequest
-> Growing Vector RealWorld ResourceMetrics
-> Parser ExportMetricsServiceRequest
loop
                                  (Setter
  ExportMetricsServiceRequest
  ExportMetricsServiceRequest
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> ExportMetricsServiceRequest
-> ExportMetricsServiceRequest
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter
  ExportMetricsServiceRequest
  ExportMetricsServiceRequest
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ExportMetricsServiceRequest
x)
                                  Growing Vector RealWorld ResourceMetrics
mutable'resourceMetrics
      in
        Parser ExportMetricsServiceRequest
-> String -> Parser ExportMetricsServiceRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld ResourceMetrics
mutable'resourceMetrics <- IO (Growing Vector RealWorld ResourceMetrics)
-> Parser (Growing Vector RealWorld ResourceMetrics)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                           IO (Growing Vector RealWorld ResourceMetrics)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              ExportMetricsServiceRequest
-> Growing Vector RealWorld ResourceMetrics
-> Parser ExportMetricsServiceRequest
loop ExportMetricsServiceRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld ResourceMetrics
mutable'resourceMetrics)
          String
"ExportMetricsServiceRequest"
  buildMessage :: ExportMetricsServiceRequest -> Builder
buildMessage
    = \ ExportMetricsServiceRequest
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             ((ResourceMetrics -> Builder) -> Vector ResourceMetrics -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ ResourceMetrics
_v
                   -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                        (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                        ((ByteString -> Builder)
-> (ResourceMetrics -> ByteString) -> ResourceMetrics -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                           (\ ByteString
bs
                              -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                   (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                      (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                   (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                           ResourceMetrics -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage ResourceMetrics
_v))
                (FoldLike
  (Vector ResourceMetrics)
  ExportMetricsServiceRequest
  ExportMetricsServiceRequest
  (Vector ResourceMetrics)
  (Vector ResourceMetrics)
-> ExportMetricsServiceRequest -> Vector ResourceMetrics
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                   (forall s a (f :: * -> *).
(HasField s "vec'resourceMetrics" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'resourceMetrics") ExportMetricsServiceRequest
_x))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike
  FieldSet
  ExportMetricsServiceRequest
  ExportMetricsServiceRequest
  FieldSet
  FieldSet
-> ExportMetricsServiceRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  ExportMetricsServiceRequest
  ExportMetricsServiceRequest
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ExportMetricsServiceRequest
_x))
instance Control.DeepSeq.NFData ExportMetricsServiceRequest where
  rnf :: ExportMetricsServiceRequest -> ()
rnf
    = \ ExportMetricsServiceRequest
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (ExportMetricsServiceRequest -> FieldSet
_ExportMetricsServiceRequest'_unknownFields ExportMetricsServiceRequest
x__)
             (Vector ResourceMetrics -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (ExportMetricsServiceRequest -> Vector ResourceMetrics
_ExportMetricsServiceRequest'resourceMetrics ExportMetricsServiceRequest
x__) ())
{- | Fields :
      -}
data ExportMetricsServiceResponse
  = ExportMetricsServiceResponse'_constructor {ExportMetricsServiceResponse -> FieldSet
_ExportMetricsServiceResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
(ExportMetricsServiceResponse
 -> ExportMetricsServiceResponse -> Bool)
-> (ExportMetricsServiceResponse
    -> ExportMetricsServiceResponse -> Bool)
-> Eq ExportMetricsServiceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
$c/= :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
== :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
$c== :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
Prelude.Eq, Eq ExportMetricsServiceResponse
Eq ExportMetricsServiceResponse
-> (ExportMetricsServiceResponse
    -> ExportMetricsServiceResponse -> Ordering)
-> (ExportMetricsServiceResponse
    -> ExportMetricsServiceResponse -> Bool)
-> (ExportMetricsServiceResponse
    -> ExportMetricsServiceResponse -> Bool)
-> (ExportMetricsServiceResponse
    -> ExportMetricsServiceResponse -> Bool)
-> (ExportMetricsServiceResponse
    -> ExportMetricsServiceResponse -> Bool)
-> (ExportMetricsServiceResponse
    -> ExportMetricsServiceResponse -> ExportMetricsServiceResponse)
-> (ExportMetricsServiceResponse
    -> ExportMetricsServiceResponse -> ExportMetricsServiceResponse)
-> Ord ExportMetricsServiceResponse
ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Ordering
ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> ExportMetricsServiceResponse
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> ExportMetricsServiceResponse
$cmin :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> ExportMetricsServiceResponse
max :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> ExportMetricsServiceResponse
$cmax :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> ExportMetricsServiceResponse
>= :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
$c>= :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
> :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
$c> :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
<= :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
$c<= :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
< :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
$c< :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
compare :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Ordering
$ccompare :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Ordering
$cp1Ord :: Eq ExportMetricsServiceResponse
Prelude.Ord)
instance Prelude.Show ExportMetricsServiceResponse where
  showsPrec :: Int -> ExportMetricsServiceResponse -> ShowS
showsPrec Int
_ ExportMetricsServiceResponse
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (ExportMetricsServiceResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ExportMetricsServiceResponse
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Message ExportMetricsServiceResponse where
  messageName :: Proxy ExportMetricsServiceResponse -> Text
messageName Proxy ExportMetricsServiceResponse
_
    = String -> Text
Data.Text.pack
        String
"opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"
  packedMessageDescriptor :: Proxy ExportMetricsServiceResponse -> ByteString
packedMessageDescriptor Proxy ExportMetricsServiceResponse
_
    = ByteString
"\n\
      \\FSExportMetricsServiceResponse"
  packedFileDescriptor :: Proxy ExportMetricsServiceResponse -> ByteString
packedFileDescriptor Proxy ExportMetricsServiceResponse
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor ExportMetricsServiceResponse)
fieldsByTag = let in [(Tag, FieldDescriptor ExportMetricsServiceResponse)]
-> Map Tag (FieldDescriptor ExportMetricsServiceResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList []
  unknownFields :: LensLike' f ExportMetricsServiceResponse FieldSet
unknownFields
    = (ExportMetricsServiceResponse -> FieldSet)
-> (ExportMetricsServiceResponse
    -> FieldSet -> ExportMetricsServiceResponse)
-> Lens' ExportMetricsServiceResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        ExportMetricsServiceResponse -> FieldSet
_ExportMetricsServiceResponse'_unknownFields
        (\ ExportMetricsServiceResponse
x__ FieldSet
y__
           -> ExportMetricsServiceResponse
x__ {_ExportMetricsServiceResponse'_unknownFields :: FieldSet
_ExportMetricsServiceResponse'_unknownFields = FieldSet
y__})
  defMessage :: ExportMetricsServiceResponse
defMessage
    = ExportMetricsServiceResponse'_constructor :: FieldSet -> ExportMetricsServiceResponse
ExportMetricsServiceResponse'_constructor
        {_ExportMetricsServiceResponse'_unknownFields :: FieldSet
_ExportMetricsServiceResponse'_unknownFields = []}
  parseMessage :: Parser ExportMetricsServiceResponse
parseMessage
    = let
        loop ::
          ExportMetricsServiceResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser ExportMetricsServiceResponse
        loop :: ExportMetricsServiceResponse -> Parser ExportMetricsServiceResponse
loop ExportMetricsServiceResponse
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  String
"Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      ExportMetricsServiceResponse -> Parser ExportMetricsServiceResponse
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter
  ExportMetricsServiceResponse
  ExportMetricsServiceResponse
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> ExportMetricsServiceResponse
-> ExportMetricsServiceResponse
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter
  ExportMetricsServiceResponse
  ExportMetricsServiceResponse
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ExportMetricsServiceResponse
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of {
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                ExportMetricsServiceResponse -> Parser ExportMetricsServiceResponse
loop
                                  (Setter
  ExportMetricsServiceResponse
  ExportMetricsServiceResponse
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> ExportMetricsServiceResponse
-> ExportMetricsServiceResponse
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter
  ExportMetricsServiceResponse
  ExportMetricsServiceResponse
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ExportMetricsServiceResponse
x) }
      in
        Parser ExportMetricsServiceResponse
-> String -> Parser ExportMetricsServiceResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do ExportMetricsServiceResponse -> Parser ExportMetricsServiceResponse
loop ExportMetricsServiceResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"ExportMetricsServiceResponse"
  buildMessage :: ExportMetricsServiceResponse -> Builder
buildMessage
    = \ ExportMetricsServiceResponse
_x
        -> FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
             (FoldLike
  FieldSet
  ExportMetricsServiceResponse
  ExportMetricsServiceResponse
  FieldSet
  FieldSet
-> ExportMetricsServiceResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  ExportMetricsServiceResponse
  ExportMetricsServiceResponse
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ExportMetricsServiceResponse
_x)
instance Control.DeepSeq.NFData ExportMetricsServiceResponse where
  rnf :: ExportMetricsServiceResponse -> ()
rnf
    = \ ExportMetricsServiceResponse
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (ExportMetricsServiceResponse -> FieldSet
_ExportMetricsServiceResponse'_unknownFields ExportMetricsServiceResponse
x__) ()
data MetricsService = MetricsService {}
instance Data.ProtoLens.Service.Types.Service MetricsService where
  type ServiceName MetricsService = "MetricsService"
  type ServicePackage MetricsService = "opentelemetry.proto.collector.metrics.v1"
  type ServiceMethods MetricsService = '["export"]
  packedServiceDescriptor :: Proxy MetricsService -> ByteString
packedServiceDescriptor Proxy MetricsService
_
    = ByteString
"\n\
      \\SOMetricsService\DC2\153\SOH\n\
      \\ACKExport\DC2E.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\SUBF.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\"\NUL"
instance Data.ProtoLens.Service.Types.HasMethodImpl MetricsService "export" where
  type MethodName MetricsService "export" = "Export"
  type MethodInput MetricsService "export" = ExportMetricsServiceRequest
  type MethodOutput MetricsService "export" = ExportMetricsServiceResponse
  type MethodStreamingType MetricsService "export" = 'Data.ProtoLens.Service.Types.NonStreaming
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
  = ByteString
"\n\
    \>opentelemetry/proto/collector/metrics/v1/metrics_service.proto\DC2(opentelemetry.proto.collector.metrics.v1\SUB,opentelemetry/proto/metrics/v1/metrics.proto\"y\n\
    \\ESCExportMetricsServiceRequest\DC2Z\n\
    \\DLEresource_metrics\CAN\SOH \ETX(\v2/.opentelemetry.proto.metrics.v1.ResourceMetricsR\SIresourceMetrics\"\RS\n\
    \\FSExportMetricsServiceResponse2\172\SOH\n\
    \\SOMetricsService\DC2\153\SOH\n\
    \\ACKExport\DC2E.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\SUBF.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\"\NULB\143\SOH\n\
    \+io.opentelemetry.proto.collector.metrics.v1B\DC3MetricsServiceProtoP\SOHZIgithub.com/open-telemetry/opentelemetry-proto/gen/go/collector/metrics/v1J\223\v\n\
    \\ACK\DC2\EOT\SO\NUL,\SOH\n\
    \\200\EOT\n\
    \\SOH\f\DC2\ETX\SO\NUL\DC22\189\EOT Copyright 2019, OpenTelemetry Authors\n\
    \\n\
    \ Licensed under the Apache License, Version 2.0 (the \"License\");\n\
    \ you may not use this file except in compliance with the License.\n\
    \ You may obtain a copy of the License at\n\
    \\n\
    \     http://www.apache.org/licenses/LICENSE-2.0\n\
    \\n\
    \ Unless required by applicable law or agreed to in writing, software\n\
    \ distributed under the License is distributed on an \"AS IS\" BASIS,\n\
    \ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
    \ See the License for the specific language governing permissions and\n\
    \ limitations under the License.\n\
    \\n\
    \\b\n\
    \\SOH\STX\DC2\ETX\DLE\NUL1\n\
    \\t\n\
    \\STX\ETX\NUL\DC2\ETX\DC2\NUL6\n\
    \\b\n\
    \\SOH\b\DC2\ETX\DC4\NUL\"\n\
    \\t\n\
    \\STX\b\n\
    \\DC2\ETX\DC4\NUL\"\n\
    \\b\n\
    \\SOH\b\DC2\ETX\NAK\NULD\n\
    \\t\n\
    \\STX\b\SOH\DC2\ETX\NAK\NULD\n\
    \\b\n\
    \\SOH\b\DC2\ETX\SYN\NUL4\n\
    \\t\n\
    \\STX\b\b\DC2\ETX\SYN\NUL4\n\
    \\b\n\
    \\SOH\b\DC2\ETX\ETB\NUL`\n\
    \\t\n\
    \\STX\b\v\DC2\ETX\ETB\NUL`\n\
    \\178\SOH\n\
    \\STX\ACK\NUL\DC2\EOT\FS\NUL \SOH\SUB\165\SOH Service that can be used to push metrics between one Application\n\
    \ instrumented with OpenTelemetry and a collector, or between a collector and a\n\
    \ central collector.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\ACK\NUL\SOH\DC2\ETX\FS\b\SYN\n\
    \y\n\
    \\EOT\ACK\NUL\STX\NUL\DC2\ETX\US\STXS\SUBl For performance reasons, it is recommended to keep this RPC\n\
    \ alive for the entire life of the application.\n\
    \\n\
    \\f\n\
    \\ENQ\ACK\NUL\STX\NUL\SOH\DC2\ETX\US\ACK\f\n\
    \\f\n\
    \\ENQ\ACK\NUL\STX\NUL\STX\DC2\ETX\US\r(\n\
    \\f\n\
    \\ENQ\ACK\NUL\STX\NUL\ETX\DC2\ETX\US3O\n\
    \\n\
    \\n\
    \\STX\EOT\NUL\DC2\EOT\"\NUL)\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\NUL\SOH\DC2\ETX\"\b#\n\
    \\210\STX\n\
    \\EOT\EOT\NUL\STX\NUL\DC2\ETX(\STXO\SUB\196\STX An array of ResourceMetrics.\n\
    \ For data coming from a single resource this array will typically contain one\n\
    \ element. Intermediary nodes (such as OpenTelemetry Collector) that receive\n\
    \ data from multiple origins typically batch the data before forwarding further and\n\
    \ in that case this array will contain multiple elements.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\EOT\DC2\ETX(\STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ACK\DC2\ETX(\v9\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX(:J\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX(MN\n\
    \\n\
    \\n\
    \\STX\EOT\SOH\DC2\EOT+\NUL,\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\SOH\SOH\DC2\ETX+\b$b\ACKproto3"