{- This file was auto-generated from tensorflow/core/framework/allocation_description.proto by the proto-lens-protoc program. -} {-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports#-} module Proto.Tensorflow.Core.Framework.AllocationDescription where import qualified Data.ProtoLens.Reexport.Prelude as Prelude import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word import qualified Data.ProtoLens.Reexport.Data.ProtoLens as Data.ProtoLens import qualified Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum import qualified Data.ProtoLens.Reexport.Lens.Family2 as Lens.Family2 import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked as Lens.Family2.Unchecked import qualified Data.ProtoLens.Reexport.Data.Default.Class as Data.Default.Class import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map import qualified Data.ProtoLens.Reexport.Data.ByteString as Data.ByteString import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels data AllocationDescription = AllocationDescription{_AllocationDescription'requestedBytes :: !Data.Int.Int64, _AllocationDescription'allocatedBytes :: !Data.Int.Int64, _AllocationDescription'allocatorName :: !Data.Text.Text, _AllocationDescription'allocationId :: !Data.Int.Int64, _AllocationDescription'hasSingleReference :: !Prelude.Bool, _AllocationDescription'ptr :: !Data.Word.Word64} deriving (Prelude.Show, Prelude.Eq, Prelude.Ord) instance (a ~ Data.Int.Int64, b ~ Data.Int.Int64, Prelude.Functor f) => Lens.Labels.HasLens "requestedBytes" f AllocationDescription AllocationDescription a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _AllocationDescription'requestedBytes (\ x__ y__ -> x__{_AllocationDescription'requestedBytes = y__})) Prelude.id instance (a ~ Data.Int.Int64, b ~ Data.Int.Int64, Prelude.Functor f) => Lens.Labels.HasLens "allocatedBytes" f AllocationDescription AllocationDescription a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _AllocationDescription'allocatedBytes (\ x__ y__ -> x__{_AllocationDescription'allocatedBytes = y__})) Prelude.id instance (a ~ Data.Text.Text, b ~ Data.Text.Text, Prelude.Functor f) => Lens.Labels.HasLens "allocatorName" f AllocationDescription AllocationDescription a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _AllocationDescription'allocatorName (\ x__ y__ -> x__{_AllocationDescription'allocatorName = y__})) Prelude.id instance (a ~ Data.Int.Int64, b ~ Data.Int.Int64, Prelude.Functor f) => Lens.Labels.HasLens "allocationId" f AllocationDescription AllocationDescription a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _AllocationDescription'allocationId (\ x__ y__ -> x__{_AllocationDescription'allocationId = y__})) Prelude.id instance (a ~ Prelude.Bool, b ~ Prelude.Bool, Prelude.Functor f) => Lens.Labels.HasLens "hasSingleReference" f AllocationDescription AllocationDescription a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _AllocationDescription'hasSingleReference (\ x__ y__ -> x__{_AllocationDescription'hasSingleReference = y__})) Prelude.id instance (a ~ Data.Word.Word64, b ~ Data.Word.Word64, Prelude.Functor f) => Lens.Labels.HasLens "ptr" f AllocationDescription AllocationDescription a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _AllocationDescription'ptr (\ x__ y__ -> x__{_AllocationDescription'ptr = y__})) Prelude.id instance Data.Default.Class.Default AllocationDescription where def = AllocationDescription{_AllocationDescription'requestedBytes = Data.ProtoLens.fieldDefault, _AllocationDescription'allocatedBytes = Data.ProtoLens.fieldDefault, _AllocationDescription'allocatorName = Data.ProtoLens.fieldDefault, _AllocationDescription'allocationId = Data.ProtoLens.fieldDefault, _AllocationDescription'hasSingleReference = Data.ProtoLens.fieldDefault, _AllocationDescription'ptr = Data.ProtoLens.fieldDefault} instance Data.ProtoLens.Message AllocationDescription where descriptor = let requestedBytes__field_descriptor = Data.ProtoLens.FieldDescriptor "requested_bytes" (Data.ProtoLens.Int64Field :: Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64) (Data.ProtoLens.PlainField Data.ProtoLens.Optional requestedBytes) :: Data.ProtoLens.FieldDescriptor AllocationDescription allocatedBytes__field_descriptor = Data.ProtoLens.FieldDescriptor "allocated_bytes" (Data.ProtoLens.Int64Field :: Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64) (Data.ProtoLens.PlainField Data.ProtoLens.Optional allocatedBytes) :: Data.ProtoLens.FieldDescriptor AllocationDescription allocatorName__field_descriptor = Data.ProtoLens.FieldDescriptor "allocator_name" (Data.ProtoLens.StringField :: Data.ProtoLens.FieldTypeDescriptor Data.Text.Text) (Data.ProtoLens.PlainField Data.ProtoLens.Optional allocatorName) :: Data.ProtoLens.FieldDescriptor AllocationDescription allocationId__field_descriptor = Data.ProtoLens.FieldDescriptor "allocation_id" (Data.ProtoLens.Int64Field :: Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64) (Data.ProtoLens.PlainField Data.ProtoLens.Optional allocationId) :: Data.ProtoLens.FieldDescriptor AllocationDescription hasSingleReference__field_descriptor = Data.ProtoLens.FieldDescriptor "has_single_reference" (Data.ProtoLens.BoolField :: Data.ProtoLens.FieldTypeDescriptor Prelude.Bool) (Data.ProtoLens.PlainField Data.ProtoLens.Optional hasSingleReference) :: Data.ProtoLens.FieldDescriptor AllocationDescription ptr__field_descriptor = Data.ProtoLens.FieldDescriptor "ptr" (Data.ProtoLens.UInt64Field :: Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64) (Data.ProtoLens.PlainField Data.ProtoLens.Optional ptr) :: Data.ProtoLens.FieldDescriptor AllocationDescription in Data.ProtoLens.MessageDescriptor (Data.Text.pack "tensorflow.AllocationDescription") (Data.Map.fromList [(Data.ProtoLens.Tag 1, requestedBytes__field_descriptor), (Data.ProtoLens.Tag 2, allocatedBytes__field_descriptor), (Data.ProtoLens.Tag 3, allocatorName__field_descriptor), (Data.ProtoLens.Tag 4, allocationId__field_descriptor), (Data.ProtoLens.Tag 5, hasSingleReference__field_descriptor), (Data.ProtoLens.Tag 6, ptr__field_descriptor)]) (Data.Map.fromList [("requested_bytes", requestedBytes__field_descriptor), ("allocated_bytes", allocatedBytes__field_descriptor), ("allocator_name", allocatorName__field_descriptor), ("allocation_id", allocationId__field_descriptor), ("has_single_reference", hasSingleReference__field_descriptor), ("ptr", ptr__field_descriptor)]) allocatedBytes :: forall f s t a b . (Lens.Labels.HasLens "allocatedBytes" f s t a b) => Lens.Family2.LensLike f s t a b allocatedBytes = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "allocatedBytes") allocationId :: forall f s t a b . (Lens.Labels.HasLens "allocationId" f s t a b) => Lens.Family2.LensLike f s t a b allocationId = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "allocationId") allocatorName :: forall f s t a b . (Lens.Labels.HasLens "allocatorName" f s t a b) => Lens.Family2.LensLike f s t a b allocatorName = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "allocatorName") hasSingleReference :: forall f s t a b . (Lens.Labels.HasLens "hasSingleReference" f s t a b) => Lens.Family2.LensLike f s t a b hasSingleReference = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "hasSingleReference") ptr :: forall f s t a b . (Lens.Labels.HasLens "ptr" f s t a b) => Lens.Family2.LensLike f s t a b ptr = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "ptr") requestedBytes :: forall f s t a b . (Lens.Labels.HasLens "requestedBytes" f s t a b) => Lens.Family2.LensLike f s t a b requestedBytes = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "requestedBytes")