{- 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 OTel.SDK.OTLP.Bindings.Collector.Metrics.V1.MetricsService (
        MetricsService(..), ExportMetricsPartialSuccess(),
        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 OTel.SDK.OTLP.Bindings.Metrics.V1.Metrics
{- | Fields :
     
         * 'OTel.SDK.OTLP.Bindings.Collector.Metrics.V1.MetricsService_Fields.rejectedDataPoints' @:: Lens' ExportMetricsPartialSuccess Data.Int.Int64@
         * 'OTel.SDK.OTLP.Bindings.Collector.Metrics.V1.MetricsService_Fields.errorMessage' @:: Lens' ExportMetricsPartialSuccess Data.Text.Text@ -}
data ExportMetricsPartialSuccess
  = ExportMetricsPartialSuccess'_constructor {ExportMetricsPartialSuccess -> Int64
_ExportMetricsPartialSuccess'rejectedDataPoints :: !Data.Int.Int64,
                                              ExportMetricsPartialSuccess -> Text
_ExportMetricsPartialSuccess'errorMessage :: !Data.Text.Text,
                                              ExportMetricsPartialSuccess -> FieldSet
_ExportMetricsPartialSuccess'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
(ExportMetricsPartialSuccess
 -> ExportMetricsPartialSuccess -> Bool)
-> (ExportMetricsPartialSuccess
    -> ExportMetricsPartialSuccess -> Bool)
-> Eq ExportMetricsPartialSuccess
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
== :: ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
$c/= :: ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
/= :: ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
Prelude.Eq, Eq ExportMetricsPartialSuccess
Eq ExportMetricsPartialSuccess =>
(ExportMetricsPartialSuccess
 -> ExportMetricsPartialSuccess -> Ordering)
-> (ExportMetricsPartialSuccess
    -> ExportMetricsPartialSuccess -> Bool)
-> (ExportMetricsPartialSuccess
    -> ExportMetricsPartialSuccess -> Bool)
-> (ExportMetricsPartialSuccess
    -> ExportMetricsPartialSuccess -> Bool)
-> (ExportMetricsPartialSuccess
    -> ExportMetricsPartialSuccess -> Bool)
-> (ExportMetricsPartialSuccess
    -> ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess)
-> (ExportMetricsPartialSuccess
    -> ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess)
-> Ord ExportMetricsPartialSuccess
ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess -> Ordering
ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess
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
$ccompare :: ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess -> Ordering
compare :: ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess -> Ordering
$c< :: ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
< :: ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
$c<= :: ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
<= :: ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
$c> :: ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
> :: ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
$c>= :: ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
>= :: ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess -> Bool
$cmax :: ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess
max :: ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess
$cmin :: ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess
min :: ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess -> ExportMetricsPartialSuccess
Prelude.Ord)
instance Prelude.Show ExportMetricsPartialSuccess where
  showsPrec :: Int -> ExportMetricsPartialSuccess -> ShowS
showsPrec Int
_ ExportMetricsPartialSuccess
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (ExportMetricsPartialSuccess -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ExportMetricsPartialSuccess
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField ExportMetricsPartialSuccess "rejectedDataPoints" Data.Int.Int64 where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "rejectedDataPoints"
-> (Int64 -> f Int64)
-> ExportMetricsPartialSuccess
-> f ExportMetricsPartialSuccess
fieldOf Proxy# "rejectedDataPoints"
_
    = ((Int64 -> f Int64)
 -> ExportMetricsPartialSuccess -> f ExportMetricsPartialSuccess)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> ExportMetricsPartialSuccess
-> f ExportMetricsPartialSuccess
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ExportMetricsPartialSuccess -> Int64)
-> (ExportMetricsPartialSuccess
    -> Int64 -> ExportMetricsPartialSuccess)
-> Lens
     ExportMetricsPartialSuccess ExportMetricsPartialSuccess Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ExportMetricsPartialSuccess -> Int64
_ExportMetricsPartialSuccess'rejectedDataPoints
           (\ ExportMetricsPartialSuccess
x__ Int64
y__
              -> ExportMetricsPartialSuccess
x__ {_ExportMetricsPartialSuccess'rejectedDataPoints = y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ExportMetricsPartialSuccess "errorMessage" Data.Text.Text where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "errorMessage"
-> (Text -> f Text)
-> ExportMetricsPartialSuccess
-> f ExportMetricsPartialSuccess
fieldOf Proxy# "errorMessage"
_
    = ((Text -> f Text)
 -> ExportMetricsPartialSuccess -> f ExportMetricsPartialSuccess)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ExportMetricsPartialSuccess
-> f ExportMetricsPartialSuccess
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ExportMetricsPartialSuccess -> Text)
-> (ExportMetricsPartialSuccess
    -> Text -> ExportMetricsPartialSuccess)
-> Lens
     ExportMetricsPartialSuccess ExportMetricsPartialSuccess Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ExportMetricsPartialSuccess -> Text
_ExportMetricsPartialSuccess'errorMessage
           (\ ExportMetricsPartialSuccess
x__ Text
y__
              -> ExportMetricsPartialSuccess
x__ {_ExportMetricsPartialSuccess'errorMessage = y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ExportMetricsPartialSuccess where
  messageName :: Proxy ExportMetricsPartialSuccess -> Text
messageName Proxy ExportMetricsPartialSuccess
_
    = String -> Text
Data.Text.pack
        String
"opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"
  packedMessageDescriptor :: Proxy ExportMetricsPartialSuccess -> ByteString
packedMessageDescriptor Proxy ExportMetricsPartialSuccess
_
    = ByteString
"\n\
      \\ESCExportMetricsPartialSuccess\DC20\n\
      \\DC4rejected_data_points\CAN\SOH \SOH(\ETXR\DC2rejectedDataPoints\DC2#\n\
      \\rerror_message\CAN\STX \SOH(\tR\ferrorMessage"
  packedFileDescriptor :: Proxy ExportMetricsPartialSuccess -> ByteString
packedFileDescriptor Proxy ExportMetricsPartialSuccess
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor ExportMetricsPartialSuccess)
fieldsByTag
    = let
        rejectedDataPoints__field_descriptor :: FieldDescriptor ExportMetricsPartialSuccess
rejectedDataPoints__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor ExportMetricsPartialSuccess Int64
-> FieldDescriptor ExportMetricsPartialSuccess
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"rejected_data_points"
              (ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (WireDefault Int64
-> Lens
     ExportMetricsPartialSuccess ExportMetricsPartialSuccess Int64 Int64
-> FieldAccessor ExportMetricsPartialSuccess Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rejectedDataPoints")) ::
              Data.ProtoLens.FieldDescriptor ExportMetricsPartialSuccess
        errorMessage__field_descriptor :: FieldDescriptor ExportMetricsPartialSuccess
errorMessage__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor ExportMetricsPartialSuccess Text
-> FieldDescriptor ExportMetricsPartialSuccess
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"error_message"
              (ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (WireDefault Text
-> Lens
     ExportMetricsPartialSuccess ExportMetricsPartialSuccess Text Text
-> FieldAccessor ExportMetricsPartialSuccess Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"errorMessage")) ::
              Data.ProtoLens.FieldDescriptor ExportMetricsPartialSuccess
      in
        [(Tag, FieldDescriptor ExportMetricsPartialSuccess)]
-> Map Tag (FieldDescriptor ExportMetricsPartialSuccess)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor ExportMetricsPartialSuccess
rejectedDataPoints__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor ExportMetricsPartialSuccess
errorMessage__field_descriptor)]
  unknownFields :: Lens' ExportMetricsPartialSuccess FieldSet
unknownFields
    = (ExportMetricsPartialSuccess -> FieldSet)
-> (ExportMetricsPartialSuccess
    -> FieldSet -> ExportMetricsPartialSuccess)
-> Lens' ExportMetricsPartialSuccess FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        ExportMetricsPartialSuccess -> FieldSet
_ExportMetricsPartialSuccess'_unknownFields
        (\ ExportMetricsPartialSuccess
x__ FieldSet
y__
           -> ExportMetricsPartialSuccess
x__ {_ExportMetricsPartialSuccess'_unknownFields = y__})
  defMessage :: ExportMetricsPartialSuccess
defMessage
    = ExportMetricsPartialSuccess'_constructor
        {_ExportMetricsPartialSuccess'rejectedDataPoints :: Int64
_ExportMetricsPartialSuccess'rejectedDataPoints = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ExportMetricsPartialSuccess'errorMessage :: Text
_ExportMetricsPartialSuccess'errorMessage = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ExportMetricsPartialSuccess'_unknownFields :: FieldSet
_ExportMetricsPartialSuccess'_unknownFields = []}
  parseMessage :: Parser ExportMetricsPartialSuccess
parseMessage
    = let
        loop ::
          ExportMetricsPartialSuccess
          -> Data.ProtoLens.Encoding.Bytes.Parser ExportMetricsPartialSuccess
        loop :: ExportMetricsPartialSuccess -> Parser ExportMetricsPartialSuccess
loop ExportMetricsPartialSuccess
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 a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall a. String -> Parser a
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]))))
                      ExportMetricsPartialSuccess -> Parser ExportMetricsPartialSuccess
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter
  ExportMetricsPartialSuccess
  ExportMetricsPartialSuccess
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           LensLike' f ExportMetricsPartialSuccess FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' ExportMetricsPartialSuccess FieldSet
Setter
  ExportMetricsPartialSuccess
  ExportMetricsPartialSuccess
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ExportMetricsPartialSuccess
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
8 -> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       ((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                          Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
                                          Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       String
"rejected_data_points"
                                ExportMetricsPartialSuccess -> Parser ExportMetricsPartialSuccess
loop
                                  (Setter
  ExportMetricsPartialSuccess ExportMetricsPartialSuccess Int64 Int64
-> Int64
-> ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                     (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rejectedDataPoints") Int64
y ExportMetricsPartialSuccess
x)
                        Word64
18
                          -> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                           Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
                                             (case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
                                                (Prelude.Left UnicodeException
err)
                                                  -> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
                                                (Prelude.Right Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
                                       String
"error_message"
                                ExportMetricsPartialSuccess -> Parser ExportMetricsPartialSuccess
loop
                                  (Setter
  ExportMetricsPartialSuccess ExportMetricsPartialSuccess Text Text
-> Text
-> ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                     (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"errorMessage") Text
y ExportMetricsPartialSuccess
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                ExportMetricsPartialSuccess -> Parser ExportMetricsPartialSuccess
loop
                                  (Setter
  ExportMetricsPartialSuccess
  ExportMetricsPartialSuccess
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     LensLike' f ExportMetricsPartialSuccess FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' ExportMetricsPartialSuccess FieldSet
Setter
  ExportMetricsPartialSuccess
  ExportMetricsPartialSuccess
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ExportMetricsPartialSuccess
x)
      in
        Parser ExportMetricsPartialSuccess
-> String -> Parser ExportMetricsPartialSuccess
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do ExportMetricsPartialSuccess -> Parser ExportMetricsPartialSuccess
loop ExportMetricsPartialSuccess
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"ExportMetricsPartialSuccess"
  buildMessage :: ExportMetricsPartialSuccess -> Builder
buildMessage
    = \ ExportMetricsPartialSuccess
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Int64
_v
                  = FoldLike
  Int64
  ExportMetricsPartialSuccess
  ExportMetricsPartialSuccess
  Int64
  Int64
-> ExportMetricsPartialSuccess -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                      (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rejectedDataPoints") ExportMetricsPartialSuccess
_x
              in
                if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
8)
                      ((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                         Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let
                   _v :: Text
_v
                     = FoldLike
  Text
  ExportMetricsPartialSuccess
  ExportMetricsPartialSuccess
  Text
  Text
-> ExportMetricsPartialSuccess -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"errorMessage") ExportMetricsPartialSuccess
_x
                 in
                   if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                       Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   else
                       Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
18)
                         ((ByteString -> Builder) -> (Text -> ByteString) -> Text -> 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))
                            Text -> ByteString
Data.Text.Encoding.encodeUtf8 Text
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike
  FieldSet
  ExportMetricsPartialSuccess
  ExportMetricsPartialSuccess
  FieldSet
  FieldSet
-> ExportMetricsPartialSuccess -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  ExportMetricsPartialSuccess
  ExportMetricsPartialSuccess
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' ExportMetricsPartialSuccess FieldSet
Data.ProtoLens.unknownFields ExportMetricsPartialSuccess
_x)))
instance Control.DeepSeq.NFData ExportMetricsPartialSuccess where
  rnf :: ExportMetricsPartialSuccess -> ()
rnf
    = \ ExportMetricsPartialSuccess
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (ExportMetricsPartialSuccess -> FieldSet
_ExportMetricsPartialSuccess'_unknownFields ExportMetricsPartialSuccess
x__)
             (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (ExportMetricsPartialSuccess -> Int64
_ExportMetricsPartialSuccess'rejectedDataPoints ExportMetricsPartialSuccess
x__)
                (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (ExportMetricsPartialSuccess -> Text
_ExportMetricsPartialSuccess'errorMessage ExportMetricsPartialSuccess
x__) ()))
{- | Fields :
     
         * 'OTel.SDK.OTLP.Bindings.Collector.Metrics.V1.MetricsService_Fields.resourceMetrics' @:: Lens' ExportMetricsServiceRequest [OTel.SDK.OTLP.Bindings.Metrics.V1.Metrics.ResourceMetrics]@
         * 'OTel.SDK.OTLP.Bindings.Collector.Metrics.V1.MetricsService_Fields.vec'resourceMetrics' @:: Lens' ExportMetricsServiceRequest (Data.Vector.Vector OTel.SDK.OTLP.Bindings.Metrics.V1.Metrics.ResourceMetrics)@ -}
data ExportMetricsServiceRequest
  = ExportMetricsServiceRequest'_constructor {ExportMetricsServiceRequest -> Vector ResourceMetrics
_ExportMetricsServiceRequest'resourceMetrics :: !(Data.Vector.Vector OTel.SDK.OTLP.Bindings.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
$c== :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
== :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
$c/= :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
/= :: 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
$ccompare :: ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> Ordering
compare :: ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> Ordering
$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
>= :: ExportMetricsServiceRequest -> ExportMetricsServiceRequest -> Bool
$cmax :: ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> ExportMetricsServiceRequest
max :: ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> ExportMetricsServiceRequest
$cmin :: ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> ExportMetricsServiceRequest
min :: ExportMetricsServiceRequest
-> ExportMetricsServiceRequest -> 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" [OTel.SDK.OTLP.Bindings.Metrics.V1.Metrics.ResourceMetrics] where
  fieldOf :: forall (f :: * -> *).
Functor f =>
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 = 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 OTel.SDK.OTLP.Bindings.Metrics.V1.Metrics.ResourceMetrics) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
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 = 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 OTel.SDK.OTLP.Bindings.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 (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 :: Lens' 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 = y__})
  defMessage :: ExportMetricsServiceRequest
defMessage
    = 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 OTel.SDK.OTLP.Bindings.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 a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall a. String -> Parser a
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 a. a -> Parser a
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
                           LensLike' f ExportMetricsServiceRequest FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' ExportMetricsServiceRequest 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 (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
                                     LensLike' f ExportMetricsServiceRequest FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' ExportMetricsServiceRequest 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)
IO (Growing Vector (PrimState IO) 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 (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
Lens' ExportMetricsServiceRequest 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 :
     
         * 'OTel.SDK.OTLP.Bindings.Collector.Metrics.V1.MetricsService_Fields.partialSuccess' @:: Lens' ExportMetricsServiceResponse ExportMetricsPartialSuccess@
         * 'OTel.SDK.OTLP.Bindings.Collector.Metrics.V1.MetricsService_Fields.maybe'partialSuccess' @:: Lens' ExportMetricsServiceResponse (Prelude.Maybe ExportMetricsPartialSuccess)@ -}
data ExportMetricsServiceResponse
  = ExportMetricsServiceResponse'_constructor {ExportMetricsServiceResponse -> Maybe ExportMetricsPartialSuccess
_ExportMetricsServiceResponse'partialSuccess :: !(Prelude.Maybe ExportMetricsPartialSuccess),
                                               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
$c== :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
== :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
$c/= :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
/= :: 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
$ccompare :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Ordering
compare :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Ordering
$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
>= :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> Bool
$cmax :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> ExportMetricsServiceResponse
max :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> ExportMetricsServiceResponse
$cmin :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> ExportMetricsServiceResponse
min :: ExportMetricsServiceResponse
-> ExportMetricsServiceResponse -> 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.Field.HasField ExportMetricsServiceResponse "partialSuccess" ExportMetricsPartialSuccess where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "partialSuccess"
-> (ExportMetricsPartialSuccess -> f ExportMetricsPartialSuccess)
-> ExportMetricsServiceResponse
-> f ExportMetricsServiceResponse
fieldOf Proxy# "partialSuccess"
_
    = ((Maybe ExportMetricsPartialSuccess
  -> f (Maybe ExportMetricsPartialSuccess))
 -> ExportMetricsServiceResponse -> f ExportMetricsServiceResponse)
-> ((ExportMetricsPartialSuccess -> f ExportMetricsPartialSuccess)
    -> Maybe ExportMetricsPartialSuccess
    -> f (Maybe ExportMetricsPartialSuccess))
-> (ExportMetricsPartialSuccess -> f ExportMetricsPartialSuccess)
-> ExportMetricsServiceResponse
-> f ExportMetricsServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ExportMetricsServiceResponse -> Maybe ExportMetricsPartialSuccess)
-> (ExportMetricsServiceResponse
    -> Maybe ExportMetricsPartialSuccess
    -> ExportMetricsServiceResponse)
-> Lens
     ExportMetricsServiceResponse
     ExportMetricsServiceResponse
     (Maybe ExportMetricsPartialSuccess)
     (Maybe ExportMetricsPartialSuccess)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ExportMetricsServiceResponse -> Maybe ExportMetricsPartialSuccess
_ExportMetricsServiceResponse'partialSuccess
           (\ ExportMetricsServiceResponse
x__ Maybe ExportMetricsPartialSuccess
y__
              -> ExportMetricsServiceResponse
x__ {_ExportMetricsServiceResponse'partialSuccess = y__}))
        (ExportMetricsPartialSuccess
-> Lens'
     (Maybe ExportMetricsPartialSuccess) ExportMetricsPartialSuccess
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ExportMetricsPartialSuccess
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ExportMetricsServiceResponse "maybe'partialSuccess" (Prelude.Maybe ExportMetricsPartialSuccess) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'partialSuccess"
-> (Maybe ExportMetricsPartialSuccess
    -> f (Maybe ExportMetricsPartialSuccess))
-> ExportMetricsServiceResponse
-> f ExportMetricsServiceResponse
fieldOf Proxy# "maybe'partialSuccess"
_
    = ((Maybe ExportMetricsPartialSuccess
  -> f (Maybe ExportMetricsPartialSuccess))
 -> ExportMetricsServiceResponse -> f ExportMetricsServiceResponse)
-> ((Maybe ExportMetricsPartialSuccess
     -> f (Maybe ExportMetricsPartialSuccess))
    -> Maybe ExportMetricsPartialSuccess
    -> f (Maybe ExportMetricsPartialSuccess))
-> (Maybe ExportMetricsPartialSuccess
    -> f (Maybe ExportMetricsPartialSuccess))
-> ExportMetricsServiceResponse
-> f ExportMetricsServiceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ExportMetricsServiceResponse -> Maybe ExportMetricsPartialSuccess)
-> (ExportMetricsServiceResponse
    -> Maybe ExportMetricsPartialSuccess
    -> ExportMetricsServiceResponse)
-> Lens
     ExportMetricsServiceResponse
     ExportMetricsServiceResponse
     (Maybe ExportMetricsPartialSuccess)
     (Maybe ExportMetricsPartialSuccess)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ExportMetricsServiceResponse -> Maybe ExportMetricsPartialSuccess
_ExportMetricsServiceResponse'partialSuccess
           (\ ExportMetricsServiceResponse
x__ Maybe ExportMetricsPartialSuccess
y__
              -> ExportMetricsServiceResponse
x__ {_ExportMetricsServiceResponse'partialSuccess = y__}))
        (Maybe ExportMetricsPartialSuccess
 -> f (Maybe ExportMetricsPartialSuccess))
-> Maybe ExportMetricsPartialSuccess
-> f (Maybe ExportMetricsPartialSuccess)
forall a. a -> a
Prelude.id
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\DC2n\n\
      \\SIpartial_success\CAN\SOH \SOH(\v2E.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccessR\SOpartialSuccess"
  packedFileDescriptor :: Proxy ExportMetricsServiceResponse -> ByteString
packedFileDescriptor Proxy ExportMetricsServiceResponse
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor ExportMetricsServiceResponse)
fieldsByTag
    = let
        partialSuccess__field_descriptor :: FieldDescriptor ExportMetricsServiceResponse
partialSuccess__field_descriptor
          = String
-> FieldTypeDescriptor ExportMetricsPartialSuccess
-> FieldAccessor
     ExportMetricsServiceResponse ExportMetricsPartialSuccess
-> FieldDescriptor ExportMetricsServiceResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"partial_success"
              (MessageOrGroup -> FieldTypeDescriptor ExportMetricsPartialSuccess
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor ExportMetricsPartialSuccess)
              (Lens
  ExportMetricsServiceResponse
  ExportMetricsServiceResponse
  (Maybe ExportMetricsPartialSuccess)
  (Maybe ExportMetricsPartialSuccess)
-> FieldAccessor
     ExportMetricsServiceResponse ExportMetricsPartialSuccess
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
                 (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'partialSuccess")) ::
              Data.ProtoLens.FieldDescriptor ExportMetricsServiceResponse
      in
        [(Tag, FieldDescriptor ExportMetricsServiceResponse)]
-> Map Tag (FieldDescriptor ExportMetricsServiceResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor ExportMetricsServiceResponse
partialSuccess__field_descriptor)]
  unknownFields :: Lens' 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 = y__})
  defMessage :: ExportMetricsServiceResponse
defMessage
    = ExportMetricsServiceResponse'_constructor
        {_ExportMetricsServiceResponse'partialSuccess :: Maybe ExportMetricsPartialSuccess
_ExportMetricsServiceResponse'partialSuccess = Maybe ExportMetricsPartialSuccess
forall a. Maybe a
Prelude.Nothing,
         _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 a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall a. String -> Parser a
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 a. a -> Parser a
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
                           LensLike' f ExportMetricsServiceResponse FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' ExportMetricsServiceResponse 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
10
                          -> do ExportMetricsPartialSuccess
y <- Parser ExportMetricsPartialSuccess
-> String -> Parser ExportMetricsPartialSuccess
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int
-> Parser ExportMetricsPartialSuccess
-> Parser ExportMetricsPartialSuccess
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 ExportMetricsPartialSuccess
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"partial_success"
                                ExportMetricsServiceResponse -> Parser ExportMetricsServiceResponse
loop
                                  (Setter
  ExportMetricsServiceResponse
  ExportMetricsServiceResponse
  ExportMetricsPartialSuccess
  ExportMetricsPartialSuccess
-> ExportMetricsPartialSuccess
-> ExportMetricsServiceResponse
-> ExportMetricsServiceResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                     (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"partialSuccess") ExportMetricsPartialSuccess
y ExportMetricsServiceResponse
x)
                        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
                                     LensLike' f ExportMetricsServiceResponse FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' ExportMetricsServiceResponse 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
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (case
                  FoldLike
  (Maybe ExportMetricsPartialSuccess)
  ExportMetricsServiceResponse
  ExportMetricsServiceResponse
  (Maybe ExportMetricsPartialSuccess)
  (Maybe ExportMetricsPartialSuccess)
-> ExportMetricsServiceResponse
-> Maybe ExportMetricsPartialSuccess
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                    (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'partialSuccess") ExportMetricsServiceResponse
_x
              of
                Maybe ExportMetricsPartialSuccess
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                (Prelude.Just ExportMetricsPartialSuccess
_v)
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                       ((ByteString -> Builder)
-> (ExportMetricsPartialSuccess -> ByteString)
-> ExportMetricsPartialSuccess
-> 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))
                          ExportMetricsPartialSuccess -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage ExportMetricsPartialSuccess
_v))
             (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
Lens' ExportMetricsServiceResponse 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__)
             (Maybe ExportMetricsPartialSuccess -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (ExportMetricsServiceResponse -> Maybe ExportMetricsPartialSuccess
_ExportMetricsServiceResponse'partialSuccess 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\"\142\SOH\n\
    \\FSExportMetricsServiceResponse\DC2n\n\
    \\SIpartial_success\CAN\SOH \SOH(\v2E.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccessR\SOpartialSuccess\"t\n\
    \\ESCExportMetricsPartialSuccess\DC20\n\
    \\DC4rejected_data_points\CAN\SOH \SOH(\ETXR\DC2rejectedDataPoints\DC2#\n\
    \\rerror_message\CAN\STX \SOH(\tR\ferrorMessage2\172\SOH\n\
    \\SOMetricsService\DC2\153\SOH\n\
    \\ACKExport\DC2E.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\SUBF.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\"\NULB\164\SOH\n\
    \+io.opentelemetry.proto.collector.metrics.v1B\DC3MetricsServiceProtoP\SOHZ3go.opentelemetry.io/proto/otlp/collector/metrics/v1\170\STX(OpenTelemetry.Proto.Collector.Metrics.V1J\219\ETB\n\
    \\ACK\DC2\EOT\SO\NULN\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\NULE\n\
    \\t\n\
    \\STX\b%\DC2\ETX\DC4\NULE\n\
    \\b\n\
    \\SOH\b\DC2\ETX\NAK\NUL\"\n\
    \\t\n\
    \\STX\b\n\
    \\DC2\ETX\NAK\NUL\"\n\
    \\b\n\
    \\SOH\b\DC2\ETX\SYN\NULD\n\
    \\t\n\
    \\STX\b\SOH\DC2\ETX\SYN\NULD\n\
    \\b\n\
    \\SOH\b\DC2\ETX\ETB\NUL4\n\
    \\t\n\
    \\STX\b\b\DC2\ETX\ETB\NUL4\n\
    \\b\n\
    \\SOH\b\DC2\ETX\CAN\NULJ\n\
    \\t\n\
    \\STX\b\v\DC2\ETX\CAN\NULJ\n\
    \\178\SOH\n\
    \\STX\ACK\NUL\DC2\EOT\GS\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\GS\b\SYN\n\
    \y\n\
    \\EOT\ACK\NUL\STX\NUL\DC2\ETX \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 \ACK\f\n\
    \\f\n\
    \\ENQ\ACK\NUL\STX\NUL\STX\DC2\ETX \r(\n\
    \\f\n\
    \\ENQ\ACK\NUL\STX\NUL\ETX\DC2\ETX 3O\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$\n\
    \\148\ACK\n\
    \\EOT\EOT\SOH\STX\NUL\DC2\ETX<\STX2\SUB\134\ACK The details of a partially successful export request.\n\
    \\n\
    \ If the request is only partially accepted\n\
    \ (i.e. when the server accepts only parts of the data and rejects the rest)\n\
    \ the server MUST initialize the `partial_success` field and MUST\n\
    \ set the `rejected_<signal>` with the number of items it rejected.\n\
    \\n\
    \ Servers MAY also make use of the `partial_success` field to convey\n\
    \ warnings/suggestions to senders even when the request was fully accepted.\n\
    \ In such cases, the `rejected_<signal>` MUST have a value of `0` and\n\
    \ the `error_message` MUST be non-empty.\n\
    \\n\
    \ A `partial_success` message with an empty value (rejected_<signal> = 0 and\n\
    \ `error_message` = \"\") is equivalent to it not being set/present. Senders\n\
    \ SHOULD interpret it the same way as in the full success case.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ACK\DC2\ETX<\STX\GS\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX<\RS-\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX<01\n\
    \\n\
    \\n\
    \\STX\EOT\STX\DC2\EOT?\NULN\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\STX\SOH\DC2\ETX?\b#\n\
    \\149\SOH\n\
    \\EOT\EOT\STX\STX\NUL\DC2\ETXD\STX!\SUB\135\SOH The number of rejected data points.\n\
    \\n\
    \ A `rejected_<signal>` field holding a `0` value indicates that the\n\
    \ request was fully accepted.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETXD\STX\a\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETXD\b\FS\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETXD\US \n\
    \\159\ETX\n\
    \\EOT\EOT\STX\STX\SOH\DC2\ETXM\STX\ESC\SUB\145\ETX A developer-facing human-readable message in English. It should be used\n\
    \ either to explain why the server rejected parts of the data during a partial\n\
    \ success or to convey warnings/suggestions during a full success. The message\n\
    \ should offer guidance on how users can address such issues.\n\
    \\n\
    \ error_message is an optional field. An error_message with an empty value\n\
    \ is equivalent to it not being set.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SOH\ENQ\DC2\ETXM\STX\b\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SOH\SOH\DC2\ETXM\t\SYN\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SOH\ETX\DC2\ETXM\EM\SUBb\ACKproto3"