{- This file was auto-generated from opentelemetry/proto/resource/v1/resource.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.Resource.V1.Resource (
        Resource()
    ) 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.Common.V1.Common
{- | Fields :
     
         * 'Proto.Opentelemetry.Proto.Resource.V1.Resource_Fields.attributes' @:: Lens' Resource [Proto.Opentelemetry.Proto.Common.V1.Common.KeyValue]@
         * 'Proto.Opentelemetry.Proto.Resource.V1.Resource_Fields.vec'attributes' @:: Lens' Resource (Data.Vector.Vector Proto.Opentelemetry.Proto.Common.V1.Common.KeyValue)@
         * 'Proto.Opentelemetry.Proto.Resource.V1.Resource_Fields.droppedAttributesCount' @:: Lens' Resource Data.Word.Word32@ -}
data Resource
  = Resource'_constructor {Resource -> Vector KeyValue
_Resource'attributes :: !(Data.Vector.Vector Proto.Opentelemetry.Proto.Common.V1.Common.KeyValue),
                           Resource -> Word32
_Resource'droppedAttributesCount :: !Data.Word.Word32,
                           Resource -> FieldSet
_Resource'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Resource -> Resource -> Bool
(Resource -> Resource -> Bool)
-> (Resource -> Resource -> Bool) -> Eq Resource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Resource -> Resource -> Bool
$c/= :: Resource -> Resource -> Bool
== :: Resource -> Resource -> Bool
$c== :: Resource -> Resource -> Bool
Prelude.Eq, Eq Resource
Eq Resource
-> (Resource -> Resource -> Ordering)
-> (Resource -> Resource -> Bool)
-> (Resource -> Resource -> Bool)
-> (Resource -> Resource -> Bool)
-> (Resource -> Resource -> Bool)
-> (Resource -> Resource -> Resource)
-> (Resource -> Resource -> Resource)
-> Ord Resource
Resource -> Resource -> Bool
Resource -> Resource -> Ordering
Resource -> Resource -> Resource
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 :: Resource -> Resource -> Resource
$cmin :: Resource -> Resource -> Resource
max :: Resource -> Resource -> Resource
$cmax :: Resource -> Resource -> Resource
>= :: Resource -> Resource -> Bool
$c>= :: Resource -> Resource -> Bool
> :: Resource -> Resource -> Bool
$c> :: Resource -> Resource -> Bool
<= :: Resource -> Resource -> Bool
$c<= :: Resource -> Resource -> Bool
< :: Resource -> Resource -> Bool
$c< :: Resource -> Resource -> Bool
compare :: Resource -> Resource -> Ordering
$ccompare :: Resource -> Resource -> Ordering
$cp1Ord :: Eq Resource
Prelude.Ord)
instance Prelude.Show Resource where
  showsPrec :: Int -> Resource -> ShowS
showsPrec Int
_ Resource
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (Resource -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Resource
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField Resource "attributes" [Proto.Opentelemetry.Proto.Common.V1.Common.KeyValue] where
  fieldOf :: Proxy# "attributes"
-> ([KeyValue] -> f [KeyValue]) -> Resource -> f Resource
fieldOf Proxy# "attributes"
_
    = ((Vector KeyValue -> f (Vector KeyValue))
 -> Resource -> f Resource)
-> (([KeyValue] -> f [KeyValue])
    -> Vector KeyValue -> f (Vector KeyValue))
-> ([KeyValue] -> f [KeyValue])
-> Resource
-> f Resource
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Resource -> Vector KeyValue)
-> (Resource -> Vector KeyValue -> Resource)
-> Lens Resource Resource (Vector KeyValue) (Vector KeyValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Resource -> Vector KeyValue
_Resource'attributes
           (\ Resource
x__ Vector KeyValue
y__ -> Resource
x__ {_Resource'attributes :: Vector KeyValue
_Resource'attributes = Vector KeyValue
y__}))
        ((Vector KeyValue -> [KeyValue])
-> (Vector KeyValue -> [KeyValue] -> Vector KeyValue)
-> Lens (Vector KeyValue) (Vector KeyValue) [KeyValue] [KeyValue]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector KeyValue -> [KeyValue]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ Vector KeyValue
_ [KeyValue]
y__ -> [KeyValue] -> Vector KeyValue
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [KeyValue]
y__))
instance Data.ProtoLens.Field.HasField Resource "vec'attributes" (Data.Vector.Vector Proto.Opentelemetry.Proto.Common.V1.Common.KeyValue) where
  fieldOf :: Proxy# "vec'attributes"
-> (Vector KeyValue -> f (Vector KeyValue))
-> Resource
-> f Resource
fieldOf Proxy# "vec'attributes"
_
    = ((Vector KeyValue -> f (Vector KeyValue))
 -> Resource -> f Resource)
-> ((Vector KeyValue -> f (Vector KeyValue))
    -> Vector KeyValue -> f (Vector KeyValue))
-> (Vector KeyValue -> f (Vector KeyValue))
-> Resource
-> f Resource
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Resource -> Vector KeyValue)
-> (Resource -> Vector KeyValue -> Resource)
-> Lens Resource Resource (Vector KeyValue) (Vector KeyValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Resource -> Vector KeyValue
_Resource'attributes
           (\ Resource
x__ Vector KeyValue
y__ -> Resource
x__ {_Resource'attributes :: Vector KeyValue
_Resource'attributes = Vector KeyValue
y__}))
        (Vector KeyValue -> f (Vector KeyValue))
-> Vector KeyValue -> f (Vector KeyValue)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Resource "droppedAttributesCount" Data.Word.Word32 where
  fieldOf :: Proxy# "droppedAttributesCount"
-> (Word32 -> f Word32) -> Resource -> f Resource
fieldOf Proxy# "droppedAttributesCount"
_
    = ((Word32 -> f Word32) -> Resource -> f Resource)
-> ((Word32 -> f Word32) -> Word32 -> f Word32)
-> (Word32 -> f Word32)
-> Resource
-> f Resource
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Resource -> Word32)
-> (Resource -> Word32 -> Resource)
-> Lens Resource Resource Word32 Word32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Resource -> Word32
_Resource'droppedAttributesCount
           (\ Resource
x__ Word32
y__ -> Resource
x__ {_Resource'droppedAttributesCount :: Word32
_Resource'droppedAttributesCount = Word32
y__}))
        (Word32 -> f Word32) -> Word32 -> f Word32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Resource where
  messageName :: Proxy Resource -> Text
messageName Proxy Resource
_
    = String -> Text
Data.Text.pack String
"opentelemetry.proto.resource.v1.Resource"
  packedMessageDescriptor :: Proxy Resource -> ByteString
packedMessageDescriptor Proxy Resource
_
    = ByteString
"\n\
      \\bResource\DC2G\n\
      \\n\
      \attributes\CAN\SOH \ETX(\v2'.opentelemetry.proto.common.v1.KeyValueR\n\
      \attributes\DC28\n\
      \\CANdropped_attributes_count\CAN\STX \SOH(\rR\SYNdroppedAttributesCount"
  packedFileDescriptor :: Proxy Resource -> ByteString
packedFileDescriptor Proxy Resource
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor Resource)
fieldsByTag
    = let
        attributes__field_descriptor :: FieldDescriptor Resource
attributes__field_descriptor
          = String
-> FieldTypeDescriptor KeyValue
-> FieldAccessor Resource KeyValue
-> FieldDescriptor Resource
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"attributes"
              (MessageOrGroup -> FieldTypeDescriptor KeyValue
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Opentelemetry.Proto.Common.V1.Common.KeyValue)
              (Packing
-> Lens' Resource [KeyValue] -> FieldAccessor Resource KeyValue
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Unpacked
                 (forall s a (f :: * -> *).
(HasField s "attributes" 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 @"attributes")) ::
              Data.ProtoLens.FieldDescriptor Resource
        droppedAttributesCount__field_descriptor :: FieldDescriptor Resource
droppedAttributesCount__field_descriptor
          = String
-> FieldTypeDescriptor Word32
-> FieldAccessor Resource Word32
-> FieldDescriptor Resource
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"dropped_attributes_count"
              (ScalarField Word32 -> FieldTypeDescriptor Word32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word32
Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (WireDefault Word32
-> Lens Resource Resource Word32 Word32
-> FieldAccessor Resource Word32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Word32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall s a (f :: * -> *).
(HasField s "droppedAttributesCount" 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 @"droppedAttributesCount")) ::
              Data.ProtoLens.FieldDescriptor Resource
      in
        [(Tag, FieldDescriptor Resource)]
-> Map Tag (FieldDescriptor Resource)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor Resource
attributes__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor Resource
droppedAttributesCount__field_descriptor)]
  unknownFields :: LensLike' f Resource FieldSet
unknownFields
    = (Resource -> FieldSet)
-> (Resource -> FieldSet -> Resource) -> Lens' Resource FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Resource -> FieldSet
_Resource'_unknownFields
        (\ Resource
x__ FieldSet
y__ -> Resource
x__ {_Resource'_unknownFields :: FieldSet
_Resource'_unknownFields = FieldSet
y__})
  defMessage :: Resource
defMessage
    = Resource'_constructor :: Vector KeyValue -> Word32 -> FieldSet -> Resource
Resource'_constructor
        {_Resource'attributes :: Vector KeyValue
_Resource'attributes = Vector KeyValue
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _Resource'droppedAttributesCount :: Word32
_Resource'droppedAttributesCount = Word32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _Resource'_unknownFields :: FieldSet
_Resource'_unknownFields = []}
  parseMessage :: Parser Resource
parseMessage
    = let
        loop ::
          Resource
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Proto.Opentelemetry.Proto.Common.V1.Common.KeyValue
             -> Data.ProtoLens.Encoding.Bytes.Parser Resource
        loop :: Resource -> Growing Vector RealWorld KeyValue -> Parser Resource
loop Resource
x Growing Vector RealWorld KeyValue
mutable'attributes
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector KeyValue
frozen'attributes <- IO (Vector KeyValue) -> Parser (Vector KeyValue)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                             (Growing Vector (PrimState IO) KeyValue -> IO (Vector KeyValue)
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 KeyValue
Growing Vector (PrimState IO) KeyValue
mutable'attributes)
                      (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]))))
                      Resource -> Parser Resource
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Resource Resource FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Resource -> Resource
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 Resource Resource FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter Resource Resource (Vector KeyValue) (Vector KeyValue)
-> Vector KeyValue -> Resource -> Resource
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall s a (f :: * -> *).
(HasField s "vec'attributes" 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'attributes") Vector KeyValue
frozen'attributes
                              Resource
x))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do !KeyValue
y <- Parser KeyValue -> String -> Parser KeyValue
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser KeyValue -> Parser KeyValue
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 KeyValue
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        String
"attributes"
                                Growing Vector RealWorld KeyValue
v <- IO (Growing Vector RealWorld KeyValue)
-> Parser (Growing Vector RealWorld KeyValue)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) KeyValue
-> KeyValue -> IO (Growing Vector (PrimState IO) KeyValue)
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 KeyValue
Growing Vector (PrimState IO) KeyValue
mutable'attributes KeyValue
y)
                                Resource -> Growing Vector RealWorld KeyValue -> Parser Resource
loop Resource
x Growing Vector RealWorld KeyValue
v
                        Word64
16
                          -> do Word32
y <- Parser Word32 -> String -> Parser Word32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       ((Word64 -> Word32) -> Parser Word64 -> Parser Word32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                          Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
                                          Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       String
"dropped_attributes_count"
                                Resource -> Growing Vector RealWorld KeyValue -> Parser Resource
loop
                                  (Setter Resource Resource Word32 Word32
-> Word32 -> Resource -> Resource
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                     (forall s a (f :: * -> *).
(HasField s "droppedAttributesCount" 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 @"droppedAttributesCount") Word32
y Resource
x)
                                  Growing Vector RealWorld KeyValue
mutable'attributes
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Resource -> Growing Vector RealWorld KeyValue -> Parser Resource
loop
                                  (Setter Resource Resource FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Resource -> Resource
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 Resource Resource FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Resource
x)
                                  Growing Vector RealWorld KeyValue
mutable'attributes
      in
        Parser Resource -> String -> Parser Resource
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld KeyValue
mutable'attributes <- IO (Growing Vector RealWorld KeyValue)
-> Parser (Growing Vector RealWorld KeyValue)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                      IO (Growing Vector RealWorld KeyValue)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              Resource -> Growing Vector RealWorld KeyValue -> Parser Resource
loop Resource
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld KeyValue
mutable'attributes)
          String
"Resource"
  buildMessage :: Resource -> Builder
buildMessage
    = \ Resource
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             ((KeyValue -> Builder) -> Vector KeyValue -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ KeyValue
_v
                   -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                        (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                        ((ByteString -> Builder)
-> (KeyValue -> ByteString) -> KeyValue -> 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))
                           KeyValue -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage KeyValue
_v))
                (FoldLike
  (Vector KeyValue)
  Resource
  Resource
  (Vector KeyValue)
  (Vector KeyValue)
-> Resource -> Vector KeyValue
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                   (forall s a (f :: * -> *).
(HasField s "vec'attributes" 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'attributes") Resource
_x))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let
                   _v :: Word32
_v
                     = FoldLike Word32 Resource Resource Word32 Word32
-> Resource -> Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                         (forall s a (f :: * -> *).
(HasField s "droppedAttributesCount" 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 @"droppedAttributesCount") Resource
_x
                 in
                   if Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word32
_v Word32
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
16)
                         ((Word64 -> Builder) -> (Word32 -> Word64) -> Word32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                            Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word32
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike FieldSet Resource Resource FieldSet FieldSet
-> Resource -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Resource Resource FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Resource
_x)))
instance Control.DeepSeq.NFData Resource where
  rnf :: Resource -> ()
rnf
    = \ Resource
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Resource -> FieldSet
_Resource'_unknownFields Resource
x__)
             (Vector KeyValue -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (Resource -> Vector KeyValue
_Resource'attributes Resource
x__)
                (Word32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (Resource -> Word32
_Resource'droppedAttributesCount Resource
x__) ()))
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
  = ByteString
"\n\
    \.opentelemetry/proto/resource/v1/resource.proto\DC2\USopentelemetry.proto.resource.v1\SUB*opentelemetry/proto/common/v1/common.proto\"\141\SOH\n\
    \\bResource\DC2G\n\
    \\n\
    \attributes\CAN\SOH \ETX(\v2'.opentelemetry.proto.common.v1.KeyValueR\n\
    \attributes\DC28\n\
    \\CANdropped_attributes_count\CAN\STX \SOH(\rR\SYNdroppedAttributesCountBw\n\
    \\"io.opentelemetry.proto.resource.v1B\rResourceProtoP\SOHZ@github.com/open-telemetry/opentelemetry-proto/gen/go/resource/v1J\141\b\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\NUL(\n\
    \\t\n\
    \\STX\ETX\NUL\DC2\ETX\DC2\NUL4\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\NUL;\n\
    \\t\n\
    \\STX\b\SOH\DC2\ETX\NAK\NUL;\n\
    \\b\n\
    \\SOH\b\DC2\ETX\SYN\NUL.\n\
    \\t\n\
    \\STX\b\b\DC2\ETX\SYN\NUL.\n\
    \\b\n\
    \\SOH\b\DC2\ETX\ETB\NULW\n\
    \\t\n\
    \\STX\b\v\DC2\ETX\ETB\NULW\n\
    \#\n\
    \\STX\EOT\NUL\DC2\EOT\SUB\NUL!\SOH\SUB\ETB Resource information.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\NUL\SOH\DC2\ETX\SUB\b\DLE\n\
    \8\n\
    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\FS\STXA\SUB+ Set of labels that describe the resource.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\EOT\DC2\ETX\FS\STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ACK\DC2\ETX\FS\v1\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\FS2<\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\FS?@\n\
    \\129\SOH\n\
    \\EOT\EOT\NUL\STX\SOH\DC2\ETX \STX&\SUBt dropped_attributes_count is the number of dropped attributes. If the value is 0, then\n\
    \ no attributes were dropped.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX \STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX \t!\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX $%b\ACKproto3"