{- This file was auto-generated from tensorflow/core/framework/device_attributes.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.DeviceAttributes 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 DeviceAttributes = DeviceAttributes{_DeviceAttributes'name ::
                                         !Data.Text.Text,
                                         _DeviceAttributes'deviceType :: !Data.Text.Text,
                                         _DeviceAttributes'memoryLimit :: !Data.Int.Int64,
                                         _DeviceAttributes'locality ::
                                         !(Prelude.Maybe DeviceLocality),
                                         _DeviceAttributes'incarnation :: !Data.Word.Word64,
                                         _DeviceAttributes'physicalDeviceDesc :: !Data.Text.Text}
                      deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)

instance (a ~ Data.Text.Text, b ~ Data.Text.Text,
          Prelude.Functor f) =>
         Lens.Labels.HasLens "name" f DeviceAttributes DeviceAttributes a b
         where
        lensOf _
          = (Prelude..)
              (Lens.Family2.Unchecked.lens _DeviceAttributes'name
                 (\ x__ y__ -> x__{_DeviceAttributes'name = y__}))
              Prelude.id

instance (a ~ Data.Text.Text, b ~ Data.Text.Text,
          Prelude.Functor f) =>
         Lens.Labels.HasLens "deviceType" f DeviceAttributes
           DeviceAttributes
           a
           b
         where
        lensOf _
          = (Prelude..)
              (Lens.Family2.Unchecked.lens _DeviceAttributes'deviceType
                 (\ x__ y__ -> x__{_DeviceAttributes'deviceType = y__}))
              Prelude.id

instance (a ~ Data.Int.Int64, b ~ Data.Int.Int64,
          Prelude.Functor f) =>
         Lens.Labels.HasLens "memoryLimit" f DeviceAttributes
           DeviceAttributes
           a
           b
         where
        lensOf _
          = (Prelude..)
              (Lens.Family2.Unchecked.lens _DeviceAttributes'memoryLimit
                 (\ x__ y__ -> x__{_DeviceAttributes'memoryLimit = y__}))
              Prelude.id

instance (a ~ DeviceLocality, b ~ DeviceLocality,
          Prelude.Functor f) =>
         Lens.Labels.HasLens "locality" f DeviceAttributes DeviceAttributes
           a
           b
         where
        lensOf _
          = (Prelude..)
              (Lens.Family2.Unchecked.lens _DeviceAttributes'locality
                 (\ x__ y__ -> x__{_DeviceAttributes'locality = y__}))
              (Data.ProtoLens.maybeLens Data.Default.Class.def)

instance (a ~ Prelude.Maybe DeviceLocality,
          b ~ Prelude.Maybe DeviceLocality, Prelude.Functor f) =>
         Lens.Labels.HasLens "maybe'locality" f DeviceAttributes
           DeviceAttributes
           a
           b
         where
        lensOf _
          = (Prelude..)
              (Lens.Family2.Unchecked.lens _DeviceAttributes'locality
                 (\ x__ y__ -> x__{_DeviceAttributes'locality = y__}))
              Prelude.id

instance (a ~ Data.Word.Word64, b ~ Data.Word.Word64,
          Prelude.Functor f) =>
         Lens.Labels.HasLens "incarnation" f DeviceAttributes
           DeviceAttributes
           a
           b
         where
        lensOf _
          = (Prelude..)
              (Lens.Family2.Unchecked.lens _DeviceAttributes'incarnation
                 (\ x__ y__ -> x__{_DeviceAttributes'incarnation = y__}))
              Prelude.id

instance (a ~ Data.Text.Text, b ~ Data.Text.Text,
          Prelude.Functor f) =>
         Lens.Labels.HasLens "physicalDeviceDesc" f DeviceAttributes
           DeviceAttributes
           a
           b
         where
        lensOf _
          = (Prelude..)
              (Lens.Family2.Unchecked.lens _DeviceAttributes'physicalDeviceDesc
                 (\ x__ y__ -> x__{_DeviceAttributes'physicalDeviceDesc = y__}))
              Prelude.id

instance Data.Default.Class.Default DeviceAttributes where
        def
          = DeviceAttributes{_DeviceAttributes'name =
                               Data.ProtoLens.fieldDefault,
                             _DeviceAttributes'deviceType = Data.ProtoLens.fieldDefault,
                             _DeviceAttributes'memoryLimit = Data.ProtoLens.fieldDefault,
                             _DeviceAttributes'locality = Prelude.Nothing,
                             _DeviceAttributes'incarnation = Data.ProtoLens.fieldDefault,
                             _DeviceAttributes'physicalDeviceDesc = Data.ProtoLens.fieldDefault}

instance Data.ProtoLens.Message DeviceAttributes where
        descriptor
          = let name__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "name"
                      (Data.ProtoLens.StringField ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
                      (Data.ProtoLens.PlainField Data.ProtoLens.Optional name)
                      :: Data.ProtoLens.FieldDescriptor DeviceAttributes
                deviceType__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "device_type"
                      (Data.ProtoLens.StringField ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
                      (Data.ProtoLens.PlainField Data.ProtoLens.Optional deviceType)
                      :: Data.ProtoLens.FieldDescriptor DeviceAttributes
                memoryLimit__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "memory_limit"
                      (Data.ProtoLens.Int64Field ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
                      (Data.ProtoLens.PlainField Data.ProtoLens.Optional memoryLimit)
                      :: Data.ProtoLens.FieldDescriptor DeviceAttributes
                locality__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "locality"
                      (Data.ProtoLens.MessageField ::
                         Data.ProtoLens.FieldTypeDescriptor DeviceLocality)
                      (Data.ProtoLens.OptionalField maybe'locality)
                      :: Data.ProtoLens.FieldDescriptor DeviceAttributes
                incarnation__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "incarnation"
                      (Data.ProtoLens.Fixed64Field ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
                      (Data.ProtoLens.PlainField Data.ProtoLens.Optional incarnation)
                      :: Data.ProtoLens.FieldDescriptor DeviceAttributes
                physicalDeviceDesc__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "physical_device_desc"
                      (Data.ProtoLens.StringField ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
                      (Data.ProtoLens.PlainField Data.ProtoLens.Optional
                         physicalDeviceDesc)
                      :: Data.ProtoLens.FieldDescriptor DeviceAttributes
              in
              Data.ProtoLens.MessageDescriptor
                (Data.Text.pack "tensorflow.DeviceAttributes")
                (Data.Map.fromList
                   [(Data.ProtoLens.Tag 1, name__field_descriptor),
                    (Data.ProtoLens.Tag 2, deviceType__field_descriptor),
                    (Data.ProtoLens.Tag 4, memoryLimit__field_descriptor),
                    (Data.ProtoLens.Tag 5, locality__field_descriptor),
                    (Data.ProtoLens.Tag 6, incarnation__field_descriptor),
                    (Data.ProtoLens.Tag 7, physicalDeviceDesc__field_descriptor)])
                (Data.Map.fromList
                   [("name", name__field_descriptor),
                    ("device_type", deviceType__field_descriptor),
                    ("memory_limit", memoryLimit__field_descriptor),
                    ("locality", locality__field_descriptor),
                    ("incarnation", incarnation__field_descriptor),
                    ("physical_device_desc", physicalDeviceDesc__field_descriptor)])

data DeviceLocality = DeviceLocality{_DeviceLocality'busId ::
                                     !Data.Int.Int32}
                    deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)

instance (a ~ Data.Int.Int32, b ~ Data.Int.Int32,
          Prelude.Functor f) =>
         Lens.Labels.HasLens "busId" f DeviceLocality DeviceLocality a b
         where
        lensOf _
          = (Prelude..)
              (Lens.Family2.Unchecked.lens _DeviceLocality'busId
                 (\ x__ y__ -> x__{_DeviceLocality'busId = y__}))
              Prelude.id

instance Data.Default.Class.Default DeviceLocality where
        def
          = DeviceLocality{_DeviceLocality'busId =
                             Data.ProtoLens.fieldDefault}

instance Data.ProtoLens.Message DeviceLocality where
        descriptor
          = let busId__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "bus_id"
                      (Data.ProtoLens.Int32Field ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
                      (Data.ProtoLens.PlainField Data.ProtoLens.Optional busId)
                      :: Data.ProtoLens.FieldDescriptor DeviceLocality
              in
              Data.ProtoLens.MessageDescriptor
                (Data.Text.pack "tensorflow.DeviceLocality")
                (Data.Map.fromList
                   [(Data.ProtoLens.Tag 1, busId__field_descriptor)])
                (Data.Map.fromList [("bus_id", busId__field_descriptor)])

busId ::
      forall f s t a b . (Lens.Labels.HasLens "busId" f s t a b) =>
        Lens.Family2.LensLike f s t a b
busId
  = Lens.Labels.lensOf
      ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "busId")

deviceType ::
           forall f s t a b . (Lens.Labels.HasLens "deviceType" f s t a b) =>
             Lens.Family2.LensLike f s t a b
deviceType
  = Lens.Labels.lensOf
      ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "deviceType")

incarnation ::
            forall f s t a b . (Lens.Labels.HasLens "incarnation" f s t a b) =>
              Lens.Family2.LensLike f s t a b
incarnation
  = Lens.Labels.lensOf
      ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "incarnation")

locality ::
         forall f s t a b . (Lens.Labels.HasLens "locality" f s t a b) =>
           Lens.Family2.LensLike f s t a b
locality
  = Lens.Labels.lensOf
      ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "locality")

maybe'locality ::
               forall f s t a b .
                 (Lens.Labels.HasLens "maybe'locality" f s t a b) =>
                 Lens.Family2.LensLike f s t a b
maybe'locality
  = Lens.Labels.lensOf
      ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'locality")

memoryLimit ::
            forall f s t a b . (Lens.Labels.HasLens "memoryLimit" f s t a b) =>
              Lens.Family2.LensLike f s t a b
memoryLimit
  = Lens.Labels.lensOf
      ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "memoryLimit")

name ::
     forall f s t a b . (Lens.Labels.HasLens "name" f s t a b) =>
       Lens.Family2.LensLike f s t a b
name
  = Lens.Labels.lensOf
      ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "name")

physicalDeviceDesc ::
                   forall f s t a b .
                     (Lens.Labels.HasLens "physicalDeviceDesc" f s t a b) =>
                     Lens.Family2.LensLike f s t a b
physicalDeviceDesc
  = Lens.Labels.lensOf
      ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "physicalDeviceDesc")