{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Datastore.Types.Product where
import Network.Google.Datastore.Types.Sum
import Network.Google.Prelude
data LatLng = LatLng'
{ _llLatitude :: !(Maybe (Textual Double))
, _llLongitude :: !(Maybe (Textual Double))
} deriving (Eq,Show,Data,Typeable,Generic)
latLng
:: LatLng
latLng =
LatLng'
{ _llLatitude = Nothing
, _llLongitude = Nothing
}
llLatitude :: Lens' LatLng (Maybe Double)
llLatitude
= lens _llLatitude (\ s a -> s{_llLatitude = a}) .
mapping _Coerce
llLongitude :: Lens' LatLng (Maybe Double)
llLongitude
= lens _llLongitude (\ s a -> s{_llLongitude = a}) .
mapping _Coerce
instance FromJSON LatLng where
parseJSON
= withObject "LatLng"
(\ o ->
LatLng' <$>
(o .:? "latitude") <*> (o .:? "longitude"))
instance ToJSON LatLng where
toJSON LatLng'{..}
= object
(catMaybes
[("latitude" .=) <$> _llLatitude,
("longitude" .=) <$> _llLongitude])
data TransactionOptions = TransactionOptions'
{ _toReadWrite :: !(Maybe ReadWrite)
, _toReadOnly :: !(Maybe ReadOnly)
} deriving (Eq,Show,Data,Typeable,Generic)
transactionOptions
:: TransactionOptions
transactionOptions =
TransactionOptions'
{ _toReadWrite = Nothing
, _toReadOnly = Nothing
}
toReadWrite :: Lens' TransactionOptions (Maybe ReadWrite)
toReadWrite
= lens _toReadWrite (\ s a -> s{_toReadWrite = a})
toReadOnly :: Lens' TransactionOptions (Maybe ReadOnly)
toReadOnly
= lens _toReadOnly (\ s a -> s{_toReadOnly = a})
instance FromJSON TransactionOptions where
parseJSON
= withObject "TransactionOptions"
(\ o ->
TransactionOptions' <$>
(o .:? "readWrite") <*> (o .:? "readOnly"))
instance ToJSON TransactionOptions where
toJSON TransactionOptions'{..}
= object
(catMaybes
[("readWrite" .=) <$> _toReadWrite,
("readOnly" .=) <$> _toReadOnly])
data Status = Status'
{ _sDetails :: !(Maybe [StatusDetailsItem])
, _sCode :: !(Maybe (Textual Int32))
, _sMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
status
:: Status
status =
Status'
{ _sDetails = Nothing
, _sCode = Nothing
, _sMessage = Nothing
}
sDetails :: Lens' Status [StatusDetailsItem]
sDetails
= lens _sDetails (\ s a -> s{_sDetails = a}) .
_Default
. _Coerce
sCode :: Lens' Status (Maybe Int32)
sCode
= lens _sCode (\ s a -> s{_sCode = a}) .
mapping _Coerce
sMessage :: Lens' Status (Maybe Text)
sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
instance FromJSON Status where
parseJSON
= withObject "Status"
(\ o ->
Status' <$>
(o .:? "details" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON Status where
toJSON Status'{..}
= object
(catMaybes
[("details" .=) <$> _sDetails,
("code" .=) <$> _sCode,
("message" .=) <$> _sMessage])
newtype GoogleLongrunningOperationMetadata = GoogleLongrunningOperationMetadata'
{ _glomAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
googleLongrunningOperationMetadata
:: HashMap Text JSONValue
-> GoogleLongrunningOperationMetadata
googleLongrunningOperationMetadata pGlomAddtional_ =
GoogleLongrunningOperationMetadata'
{ _glomAddtional = _Coerce # pGlomAddtional_
}
glomAddtional :: Lens' GoogleLongrunningOperationMetadata (HashMap Text JSONValue)
glomAddtional
= lens _glomAddtional
(\ s a -> s{_glomAddtional = a})
. _Coerce
instance FromJSON GoogleLongrunningOperationMetadata
where
parseJSON
= withObject "GoogleLongrunningOperationMetadata"
(\ o ->
GoogleLongrunningOperationMetadata' <$>
(parseJSONObject o))
instance ToJSON GoogleLongrunningOperationMetadata
where
toJSON = toJSON . _glomAddtional
newtype ReadWrite = ReadWrite'
{ _rwPreviousTransaction :: Maybe Bytes
} deriving (Eq,Show,Data,Typeable,Generic)
readWrite
:: ReadWrite
readWrite =
ReadWrite'
{ _rwPreviousTransaction = Nothing
}
rwPreviousTransaction :: Lens' ReadWrite (Maybe ByteString)
rwPreviousTransaction
= lens _rwPreviousTransaction
(\ s a -> s{_rwPreviousTransaction = a})
. mapping _Bytes
instance FromJSON ReadWrite where
parseJSON
= withObject "ReadWrite"
(\ o -> ReadWrite' <$> (o .:? "previousTransaction"))
instance ToJSON ReadWrite where
toJSON ReadWrite'{..}
= object
(catMaybes
[("previousTransaction" .=) <$>
_rwPreviousTransaction])
newtype GoogleDatastoreAdminV1beta1ExportEntitiesResponse = GoogleDatastoreAdminV1beta1ExportEntitiesResponse'
{ _gdaveerOutputURL :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1beta1ExportEntitiesResponse
:: GoogleDatastoreAdminV1beta1ExportEntitiesResponse
googleDatastoreAdminV1beta1ExportEntitiesResponse =
GoogleDatastoreAdminV1beta1ExportEntitiesResponse'
{ _gdaveerOutputURL = Nothing
}
gdaveerOutputURL :: Lens' GoogleDatastoreAdminV1beta1ExportEntitiesResponse (Maybe Text)
gdaveerOutputURL
= lens _gdaveerOutputURL
(\ s a -> s{_gdaveerOutputURL = a})
instance FromJSON
GoogleDatastoreAdminV1beta1ExportEntitiesResponse
where
parseJSON
= withObject
"GoogleDatastoreAdminV1beta1ExportEntitiesResponse"
(\ o ->
GoogleDatastoreAdminV1beta1ExportEntitiesResponse'
<$> (o .:? "outputUrl"))
instance ToJSON
GoogleDatastoreAdminV1beta1ExportEntitiesResponse
where
toJSON
GoogleDatastoreAdminV1beta1ExportEntitiesResponse'{..}
= object
(catMaybes [("outputUrl" .=) <$> _gdaveerOutputURL])
newtype RollbackRequest = RollbackRequest'
{ _rrTransaction :: Maybe Bytes
} deriving (Eq,Show,Data,Typeable,Generic)
rollbackRequest
:: RollbackRequest
rollbackRequest =
RollbackRequest'
{ _rrTransaction = Nothing
}
rrTransaction :: Lens' RollbackRequest (Maybe ByteString)
rrTransaction
= lens _rrTransaction
(\ s a -> s{_rrTransaction = a})
. mapping _Bytes
instance FromJSON RollbackRequest where
parseJSON
= withObject "RollbackRequest"
(\ o -> RollbackRequest' <$> (o .:? "transaction"))
instance ToJSON RollbackRequest where
toJSON RollbackRequest'{..}
= object
(catMaybes [("transaction" .=) <$> _rrTransaction])
data ReserveIdsRequest = ReserveIdsRequest'
{ _rirKeys :: !(Maybe [Key])
, _rirDatabaseId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
reserveIdsRequest
:: ReserveIdsRequest
reserveIdsRequest =
ReserveIdsRequest'
{ _rirKeys = Nothing
, _rirDatabaseId = Nothing
}
rirKeys :: Lens' ReserveIdsRequest [Key]
rirKeys
= lens _rirKeys (\ s a -> s{_rirKeys = a}) . _Default
. _Coerce
rirDatabaseId :: Lens' ReserveIdsRequest (Maybe Text)
rirDatabaseId
= lens _rirDatabaseId
(\ s a -> s{_rirDatabaseId = a})
instance FromJSON ReserveIdsRequest where
parseJSON
= withObject "ReserveIdsRequest"
(\ o ->
ReserveIdsRequest' <$>
(o .:? "keys" .!= mempty) <*> (o .:? "databaseId"))
instance ToJSON ReserveIdsRequest where
toJSON ReserveIdsRequest'{..}
= object
(catMaybes
[("keys" .=) <$> _rirKeys,
("databaseId" .=) <$> _rirDatabaseId])
data PartitionId = PartitionId'
{ _piNamespaceId :: !(Maybe Text)
, _piProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
partitionId
:: PartitionId
partitionId =
PartitionId'
{ _piNamespaceId = Nothing
, _piProjectId = Nothing
}
piNamespaceId :: Lens' PartitionId (Maybe Text)
piNamespaceId
= lens _piNamespaceId
(\ s a -> s{_piNamespaceId = a})
piProjectId :: Lens' PartitionId (Maybe Text)
piProjectId
= lens _piProjectId (\ s a -> s{_piProjectId = a})
instance FromJSON PartitionId where
parseJSON
= withObject "PartitionId"
(\ o ->
PartitionId' <$>
(o .:? "namespaceId") <*> (o .:? "projectId"))
instance ToJSON PartitionId where
toJSON PartitionId'{..}
= object
(catMaybes
[("namespaceId" .=) <$> _piNamespaceId,
("projectId" .=) <$> _piProjectId])
data GoogleDatastoreAdminV1ListIndexesResponse = GoogleDatastoreAdminV1ListIndexesResponse'
{ _gdavlirNextPageToken :: !(Maybe Text)
, _gdavlirIndexes :: !(Maybe [GoogleDatastoreAdminV1Index])
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1ListIndexesResponse
:: GoogleDatastoreAdminV1ListIndexesResponse
googleDatastoreAdminV1ListIndexesResponse =
GoogleDatastoreAdminV1ListIndexesResponse'
{ _gdavlirNextPageToken = Nothing
, _gdavlirIndexes = Nothing
}
gdavlirNextPageToken :: Lens' GoogleDatastoreAdminV1ListIndexesResponse (Maybe Text)
gdavlirNextPageToken
= lens _gdavlirNextPageToken
(\ s a -> s{_gdavlirNextPageToken = a})
gdavlirIndexes :: Lens' GoogleDatastoreAdminV1ListIndexesResponse [GoogleDatastoreAdminV1Index]
gdavlirIndexes
= lens _gdavlirIndexes
(\ s a -> s{_gdavlirIndexes = a})
. _Default
. _Coerce
instance FromJSON
GoogleDatastoreAdminV1ListIndexesResponse where
parseJSON
= withObject
"GoogleDatastoreAdminV1ListIndexesResponse"
(\ o ->
GoogleDatastoreAdminV1ListIndexesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "indexes" .!= mempty))
instance ToJSON
GoogleDatastoreAdminV1ListIndexesResponse where
toJSON GoogleDatastoreAdminV1ListIndexesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _gdavlirNextPageToken,
("indexes" .=) <$> _gdavlirIndexes])
data QueryResultBatch = QueryResultBatch'
{ _qrbSkippedResults :: !(Maybe (Textual Int32))
, _qrbSkippedCursor :: !(Maybe Bytes)
, _qrbEntityResultType :: !(Maybe QueryResultBatchEntityResultType)
, _qrbSnapshotVersion :: !(Maybe (Textual Int64))
, _qrbEntityResults :: !(Maybe [EntityResult])
, _qrbMoreResults :: !(Maybe QueryResultBatchMoreResults)
, _qrbEndCursor :: !(Maybe Bytes)
} deriving (Eq,Show,Data,Typeable,Generic)
queryResultBatch
:: QueryResultBatch
queryResultBatch =
QueryResultBatch'
{ _qrbSkippedResults = Nothing
, _qrbSkippedCursor = Nothing
, _qrbEntityResultType = Nothing
, _qrbSnapshotVersion = Nothing
, _qrbEntityResults = Nothing
, _qrbMoreResults = Nothing
, _qrbEndCursor = Nothing
}
qrbSkippedResults :: Lens' QueryResultBatch (Maybe Int32)
qrbSkippedResults
= lens _qrbSkippedResults
(\ s a -> s{_qrbSkippedResults = a})
. mapping _Coerce
qrbSkippedCursor :: Lens' QueryResultBatch (Maybe ByteString)
qrbSkippedCursor
= lens _qrbSkippedCursor
(\ s a -> s{_qrbSkippedCursor = a})
. mapping _Bytes
qrbEntityResultType :: Lens' QueryResultBatch (Maybe QueryResultBatchEntityResultType)
qrbEntityResultType
= lens _qrbEntityResultType
(\ s a -> s{_qrbEntityResultType = a})
qrbSnapshotVersion :: Lens' QueryResultBatch (Maybe Int64)
qrbSnapshotVersion
= lens _qrbSnapshotVersion
(\ s a -> s{_qrbSnapshotVersion = a})
. mapping _Coerce
qrbEntityResults :: Lens' QueryResultBatch [EntityResult]
qrbEntityResults
= lens _qrbEntityResults
(\ s a -> s{_qrbEntityResults = a})
. _Default
. _Coerce
qrbMoreResults :: Lens' QueryResultBatch (Maybe QueryResultBatchMoreResults)
qrbMoreResults
= lens _qrbMoreResults
(\ s a -> s{_qrbMoreResults = a})
qrbEndCursor :: Lens' QueryResultBatch (Maybe ByteString)
qrbEndCursor
= lens _qrbEndCursor (\ s a -> s{_qrbEndCursor = a})
. mapping _Bytes
instance FromJSON QueryResultBatch where
parseJSON
= withObject "QueryResultBatch"
(\ o ->
QueryResultBatch' <$>
(o .:? "skippedResults") <*> (o .:? "skippedCursor")
<*> (o .:? "entityResultType")
<*> (o .:? "snapshotVersion")
<*> (o .:? "entityResults" .!= mempty)
<*> (o .:? "moreResults")
<*> (o .:? "endCursor"))
instance ToJSON QueryResultBatch where
toJSON QueryResultBatch'{..}
= object
(catMaybes
[("skippedResults" .=) <$> _qrbSkippedResults,
("skippedCursor" .=) <$> _qrbSkippedCursor,
("entityResultType" .=) <$> _qrbEntityResultType,
("snapshotVersion" .=) <$> _qrbSnapshotVersion,
("entityResults" .=) <$> _qrbEntityResults,
("moreResults" .=) <$> _qrbMoreResults,
("endCursor" .=) <$> _qrbEndCursor])
newtype EntityProperties = EntityProperties'
{ _epAddtional :: HashMap Text Value
} deriving (Eq,Show,Data,Typeable,Generic)
entityProperties
:: HashMap Text Value
-> EntityProperties
entityProperties pEpAddtional_ =
EntityProperties'
{ _epAddtional = _Coerce # pEpAddtional_
}
epAddtional :: Lens' EntityProperties (HashMap Text Value)
epAddtional
= lens _epAddtional (\ s a -> s{_epAddtional = a}) .
_Coerce
instance FromJSON EntityProperties where
parseJSON
= withObject "EntityProperties"
(\ o -> EntityProperties' <$> (parseJSONObject o))
instance ToJSON EntityProperties where
toJSON = toJSON . _epAddtional
newtype GoogleDatastoreAdminV1ImportEntitiesRequestLabels = GoogleDatastoreAdminV1ImportEntitiesRequestLabels'
{ _gdavierlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1ImportEntitiesRequestLabels
:: HashMap Text Text
-> GoogleDatastoreAdminV1ImportEntitiesRequestLabels
googleDatastoreAdminV1ImportEntitiesRequestLabels pGdavierlAddtional_ =
GoogleDatastoreAdminV1ImportEntitiesRequestLabels'
{ _gdavierlAddtional = _Coerce # pGdavierlAddtional_
}
gdavierlAddtional :: Lens' GoogleDatastoreAdminV1ImportEntitiesRequestLabels (HashMap Text Text)
gdavierlAddtional
= lens _gdavierlAddtional
(\ s a -> s{_gdavierlAddtional = a})
. _Coerce
instance FromJSON
GoogleDatastoreAdminV1ImportEntitiesRequestLabels
where
parseJSON
= withObject
"GoogleDatastoreAdminV1ImportEntitiesRequestLabels"
(\ o ->
GoogleDatastoreAdminV1ImportEntitiesRequestLabels'
<$> (parseJSONObject o))
instance ToJSON
GoogleDatastoreAdminV1ImportEntitiesRequestLabels
where
toJSON = toJSON . _gdavierlAddtional
newtype BeginTransactionRequest = BeginTransactionRequest'
{ _btrTransactionOptions :: Maybe TransactionOptions
} deriving (Eq,Show,Data,Typeable,Generic)
beginTransactionRequest
:: BeginTransactionRequest
beginTransactionRequest =
BeginTransactionRequest'
{ _btrTransactionOptions = Nothing
}
btrTransactionOptions :: Lens' BeginTransactionRequest (Maybe TransactionOptions)
btrTransactionOptions
= lens _btrTransactionOptions
(\ s a -> s{_btrTransactionOptions = a})
instance FromJSON BeginTransactionRequest where
parseJSON
= withObject "BeginTransactionRequest"
(\ o ->
BeginTransactionRequest' <$>
(o .:? "transactionOptions"))
instance ToJSON BeginTransactionRequest where
toJSON BeginTransactionRequest'{..}
= object
(catMaybes
[("transactionOptions" .=) <$>
_btrTransactionOptions])
data RunQueryRequest = RunQueryRequest'
{ _rqrPartitionId :: !(Maybe PartitionId)
, _rqrGqlQuery :: !(Maybe GqlQuery)
, _rqrQuery :: !(Maybe Query)
, _rqrReadOptions :: !(Maybe ReadOptions)
} deriving (Eq,Show,Data,Typeable,Generic)
runQueryRequest
:: RunQueryRequest
runQueryRequest =
RunQueryRequest'
{ _rqrPartitionId = Nothing
, _rqrGqlQuery = Nothing
, _rqrQuery = Nothing
, _rqrReadOptions = Nothing
}
rqrPartitionId :: Lens' RunQueryRequest (Maybe PartitionId)
rqrPartitionId
= lens _rqrPartitionId
(\ s a -> s{_rqrPartitionId = a})
rqrGqlQuery :: Lens' RunQueryRequest (Maybe GqlQuery)
rqrGqlQuery
= lens _rqrGqlQuery (\ s a -> s{_rqrGqlQuery = a})
rqrQuery :: Lens' RunQueryRequest (Maybe Query)
rqrQuery = lens _rqrQuery (\ s a -> s{_rqrQuery = a})
rqrReadOptions :: Lens' RunQueryRequest (Maybe ReadOptions)
rqrReadOptions
= lens _rqrReadOptions
(\ s a -> s{_rqrReadOptions = a})
instance FromJSON RunQueryRequest where
parseJSON
= withObject "RunQueryRequest"
(\ o ->
RunQueryRequest' <$>
(o .:? "partitionId") <*> (o .:? "gqlQuery") <*>
(o .:? "query")
<*> (o .:? "readOptions"))
instance ToJSON RunQueryRequest where
toJSON RunQueryRequest'{..}
= object
(catMaybes
[("partitionId" .=) <$> _rqrPartitionId,
("gqlQuery" .=) <$> _rqrGqlQuery,
("query" .=) <$> _rqrQuery,
("readOptions" .=) <$> _rqrReadOptions])
newtype AllocateIdsRequest = AllocateIdsRequest'
{ _airKeys :: Maybe [Key]
} deriving (Eq,Show,Data,Typeable,Generic)
allocateIdsRequest
:: AllocateIdsRequest
allocateIdsRequest =
AllocateIdsRequest'
{ _airKeys = Nothing
}
airKeys :: Lens' AllocateIdsRequest [Key]
airKeys
= lens _airKeys (\ s a -> s{_airKeys = a}) . _Default
. _Coerce
instance FromJSON AllocateIdsRequest where
parseJSON
= withObject "AllocateIdsRequest"
(\ o ->
AllocateIdsRequest' <$> (o .:? "keys" .!= mempty))
instance ToJSON AllocateIdsRequest where
toJSON AllocateIdsRequest'{..}
= object (catMaybes [("keys" .=) <$> _airKeys])
data GoogleDatastoreAdminV1ExportEntitiesMetadata = GoogleDatastoreAdminV1ExportEntitiesMetadata'
{ _gdaveemProgressBytes :: !(Maybe GoogleDatastoreAdminV1Progress)
, _gdaveemOutputURLPrefix :: !(Maybe Text)
, _gdaveemProgressEntities :: !(Maybe GoogleDatastoreAdminV1Progress)
, _gdaveemEntityFilter :: !(Maybe GoogleDatastoreAdminV1EntityFilter)
, _gdaveemCommon :: !(Maybe GoogleDatastoreAdminV1CommonMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1ExportEntitiesMetadata
:: GoogleDatastoreAdminV1ExportEntitiesMetadata
googleDatastoreAdminV1ExportEntitiesMetadata =
GoogleDatastoreAdminV1ExportEntitiesMetadata'
{ _gdaveemProgressBytes = Nothing
, _gdaveemOutputURLPrefix = Nothing
, _gdaveemProgressEntities = Nothing
, _gdaveemEntityFilter = Nothing
, _gdaveemCommon = Nothing
}
gdaveemProgressBytes :: Lens' GoogleDatastoreAdminV1ExportEntitiesMetadata (Maybe GoogleDatastoreAdminV1Progress)
gdaveemProgressBytes
= lens _gdaveemProgressBytes
(\ s a -> s{_gdaveemProgressBytes = a})
gdaveemOutputURLPrefix :: Lens' GoogleDatastoreAdminV1ExportEntitiesMetadata (Maybe Text)
gdaveemOutputURLPrefix
= lens _gdaveemOutputURLPrefix
(\ s a -> s{_gdaveemOutputURLPrefix = a})
gdaveemProgressEntities :: Lens' GoogleDatastoreAdminV1ExportEntitiesMetadata (Maybe GoogleDatastoreAdminV1Progress)
gdaveemProgressEntities
= lens _gdaveemProgressEntities
(\ s a -> s{_gdaveemProgressEntities = a})
gdaveemEntityFilter :: Lens' GoogleDatastoreAdminV1ExportEntitiesMetadata (Maybe GoogleDatastoreAdminV1EntityFilter)
gdaveemEntityFilter
= lens _gdaveemEntityFilter
(\ s a -> s{_gdaveemEntityFilter = a})
gdaveemCommon :: Lens' GoogleDatastoreAdminV1ExportEntitiesMetadata (Maybe GoogleDatastoreAdminV1CommonMetadata)
gdaveemCommon
= lens _gdaveemCommon
(\ s a -> s{_gdaveemCommon = a})
instance FromJSON
GoogleDatastoreAdminV1ExportEntitiesMetadata where
parseJSON
= withObject
"GoogleDatastoreAdminV1ExportEntitiesMetadata"
(\ o ->
GoogleDatastoreAdminV1ExportEntitiesMetadata' <$>
(o .:? "progressBytes") <*> (o .:? "outputUrlPrefix")
<*> (o .:? "progressEntities")
<*> (o .:? "entityFilter")
<*> (o .:? "common"))
instance ToJSON
GoogleDatastoreAdminV1ExportEntitiesMetadata where
toJSON
GoogleDatastoreAdminV1ExportEntitiesMetadata'{..}
= object
(catMaybes
[("progressBytes" .=) <$> _gdaveemProgressBytes,
("outputUrlPrefix" .=) <$> _gdaveemOutputURLPrefix,
("progressEntities" .=) <$> _gdaveemProgressEntities,
("entityFilter" .=) <$> _gdaveemEntityFilter,
("common" .=) <$> _gdaveemCommon])
data GoogleDatastoreAdminV1beta1CommonMetadata = GoogleDatastoreAdminV1beta1CommonMetadata'
{ _gdavcmState :: !(Maybe GoogleDatastoreAdminV1beta1CommonMetadataState)
, _gdavcmStartTime :: !(Maybe DateTime')
, _gdavcmEndTime :: !(Maybe DateTime')
, _gdavcmLabels :: !(Maybe GoogleDatastoreAdminV1beta1CommonMetadataLabels)
, _gdavcmOperationType :: !(Maybe GoogleDatastoreAdminV1beta1CommonMetadataOperationType)
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1beta1CommonMetadata
:: GoogleDatastoreAdminV1beta1CommonMetadata
googleDatastoreAdminV1beta1CommonMetadata =
GoogleDatastoreAdminV1beta1CommonMetadata'
{ _gdavcmState = Nothing
, _gdavcmStartTime = Nothing
, _gdavcmEndTime = Nothing
, _gdavcmLabels = Nothing
, _gdavcmOperationType = Nothing
}
gdavcmState :: Lens' GoogleDatastoreAdminV1beta1CommonMetadata (Maybe GoogleDatastoreAdminV1beta1CommonMetadataState)
gdavcmState
= lens _gdavcmState (\ s a -> s{_gdavcmState = a})
gdavcmStartTime :: Lens' GoogleDatastoreAdminV1beta1CommonMetadata (Maybe UTCTime)
gdavcmStartTime
= lens _gdavcmStartTime
(\ s a -> s{_gdavcmStartTime = a})
. mapping _DateTime
gdavcmEndTime :: Lens' GoogleDatastoreAdminV1beta1CommonMetadata (Maybe UTCTime)
gdavcmEndTime
= lens _gdavcmEndTime
(\ s a -> s{_gdavcmEndTime = a})
. mapping _DateTime
gdavcmLabels :: Lens' GoogleDatastoreAdminV1beta1CommonMetadata (Maybe GoogleDatastoreAdminV1beta1CommonMetadataLabels)
gdavcmLabels
= lens _gdavcmLabels (\ s a -> s{_gdavcmLabels = a})
gdavcmOperationType :: Lens' GoogleDatastoreAdminV1beta1CommonMetadata (Maybe GoogleDatastoreAdminV1beta1CommonMetadataOperationType)
gdavcmOperationType
= lens _gdavcmOperationType
(\ s a -> s{_gdavcmOperationType = a})
instance FromJSON
GoogleDatastoreAdminV1beta1CommonMetadata where
parseJSON
= withObject
"GoogleDatastoreAdminV1beta1CommonMetadata"
(\ o ->
GoogleDatastoreAdminV1beta1CommonMetadata' <$>
(o .:? "state") <*> (o .:? "startTime") <*>
(o .:? "endTime")
<*> (o .:? "labels")
<*> (o .:? "operationType"))
instance ToJSON
GoogleDatastoreAdminV1beta1CommonMetadata where
toJSON GoogleDatastoreAdminV1beta1CommonMetadata'{..}
= object
(catMaybes
[("state" .=) <$> _gdavcmState,
("startTime" .=) <$> _gdavcmStartTime,
("endTime" .=) <$> _gdavcmEndTime,
("labels" .=) <$> _gdavcmLabels,
("operationType" .=) <$> _gdavcmOperationType])
data Empty =
Empty'
deriving (Eq,Show,Data,Typeable,Generic)
empty
:: Empty
empty = Empty'
instance FromJSON Empty where
parseJSON = withObject "Empty" (\ o -> pure Empty')
instance ToJSON Empty where
toJSON = const emptyObject
data CompositeFilter = CompositeFilter'
{ _cfOp :: !(Maybe CompositeFilterOp)
, _cfFilters :: !(Maybe [Filter])
} deriving (Eq,Show,Data,Typeable,Generic)
compositeFilter
:: CompositeFilter
compositeFilter =
CompositeFilter'
{ _cfOp = Nothing
, _cfFilters = Nothing
}
cfOp :: Lens' CompositeFilter (Maybe CompositeFilterOp)
cfOp = lens _cfOp (\ s a -> s{_cfOp = a})
cfFilters :: Lens' CompositeFilter [Filter]
cfFilters
= lens _cfFilters (\ s a -> s{_cfFilters = a}) .
_Default
. _Coerce
instance FromJSON CompositeFilter where
parseJSON
= withObject "CompositeFilter"
(\ o ->
CompositeFilter' <$>
(o .:? "op") <*> (o .:? "filters" .!= mempty))
instance ToJSON CompositeFilter where
toJSON CompositeFilter'{..}
= object
(catMaybes
[("op" .=) <$> _cfOp, ("filters" .=) <$> _cfFilters])
data GoogleDatastoreAdminV1IndexOperationMetadata = GoogleDatastoreAdminV1IndexOperationMetadata'
{ _gdaviomProgressEntities :: !(Maybe GoogleDatastoreAdminV1Progress)
, _gdaviomCommon :: !(Maybe GoogleDatastoreAdminV1CommonMetadata)
, _gdaviomIndexId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1IndexOperationMetadata
:: GoogleDatastoreAdminV1IndexOperationMetadata
googleDatastoreAdminV1IndexOperationMetadata =
GoogleDatastoreAdminV1IndexOperationMetadata'
{ _gdaviomProgressEntities = Nothing
, _gdaviomCommon = Nothing
, _gdaviomIndexId = Nothing
}
gdaviomProgressEntities :: Lens' GoogleDatastoreAdminV1IndexOperationMetadata (Maybe GoogleDatastoreAdminV1Progress)
gdaviomProgressEntities
= lens _gdaviomProgressEntities
(\ s a -> s{_gdaviomProgressEntities = a})
gdaviomCommon :: Lens' GoogleDatastoreAdminV1IndexOperationMetadata (Maybe GoogleDatastoreAdminV1CommonMetadata)
gdaviomCommon
= lens _gdaviomCommon
(\ s a -> s{_gdaviomCommon = a})
gdaviomIndexId :: Lens' GoogleDatastoreAdminV1IndexOperationMetadata (Maybe Text)
gdaviomIndexId
= lens _gdaviomIndexId
(\ s a -> s{_gdaviomIndexId = a})
instance FromJSON
GoogleDatastoreAdminV1IndexOperationMetadata where
parseJSON
= withObject
"GoogleDatastoreAdminV1IndexOperationMetadata"
(\ o ->
GoogleDatastoreAdminV1IndexOperationMetadata' <$>
(o .:? "progressEntities") <*> (o .:? "common") <*>
(o .:? "indexId"))
instance ToJSON
GoogleDatastoreAdminV1IndexOperationMetadata where
toJSON
GoogleDatastoreAdminV1IndexOperationMetadata'{..}
= object
(catMaybes
[("progressEntities" .=) <$>
_gdaviomProgressEntities,
("common" .=) <$> _gdaviomCommon,
("indexId" .=) <$> _gdaviomIndexId])
data GoogleDatastoreAdminV1beta1ImportEntitiesMetadata = GoogleDatastoreAdminV1beta1ImportEntitiesMetadata'
{ _gdaviemProgressBytes :: !(Maybe GoogleDatastoreAdminV1beta1Progress)
, _gdaviemProgressEntities :: !(Maybe GoogleDatastoreAdminV1beta1Progress)
, _gdaviemEntityFilter :: !(Maybe GoogleDatastoreAdminV1beta1EntityFilter)
, _gdaviemInputURL :: !(Maybe Text)
, _gdaviemCommon :: !(Maybe GoogleDatastoreAdminV1beta1CommonMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1beta1ImportEntitiesMetadata
:: GoogleDatastoreAdminV1beta1ImportEntitiesMetadata
googleDatastoreAdminV1beta1ImportEntitiesMetadata =
GoogleDatastoreAdminV1beta1ImportEntitiesMetadata'
{ _gdaviemProgressBytes = Nothing
, _gdaviemProgressEntities = Nothing
, _gdaviemEntityFilter = Nothing
, _gdaviemInputURL = Nothing
, _gdaviemCommon = Nothing
}
gdaviemProgressBytes :: Lens' GoogleDatastoreAdminV1beta1ImportEntitiesMetadata (Maybe GoogleDatastoreAdminV1beta1Progress)
gdaviemProgressBytes
= lens _gdaviemProgressBytes
(\ s a -> s{_gdaviemProgressBytes = a})
gdaviemProgressEntities :: Lens' GoogleDatastoreAdminV1beta1ImportEntitiesMetadata (Maybe GoogleDatastoreAdminV1beta1Progress)
gdaviemProgressEntities
= lens _gdaviemProgressEntities
(\ s a -> s{_gdaviemProgressEntities = a})
gdaviemEntityFilter :: Lens' GoogleDatastoreAdminV1beta1ImportEntitiesMetadata (Maybe GoogleDatastoreAdminV1beta1EntityFilter)
gdaviemEntityFilter
= lens _gdaviemEntityFilter
(\ s a -> s{_gdaviemEntityFilter = a})
gdaviemInputURL :: Lens' GoogleDatastoreAdminV1beta1ImportEntitiesMetadata (Maybe Text)
gdaviemInputURL
= lens _gdaviemInputURL
(\ s a -> s{_gdaviemInputURL = a})
gdaviemCommon :: Lens' GoogleDatastoreAdminV1beta1ImportEntitiesMetadata (Maybe GoogleDatastoreAdminV1beta1CommonMetadata)
gdaviemCommon
= lens _gdaviemCommon
(\ s a -> s{_gdaviemCommon = a})
instance FromJSON
GoogleDatastoreAdminV1beta1ImportEntitiesMetadata
where
parseJSON
= withObject
"GoogleDatastoreAdminV1beta1ImportEntitiesMetadata"
(\ o ->
GoogleDatastoreAdminV1beta1ImportEntitiesMetadata'
<$>
(o .:? "progressBytes") <*>
(o .:? "progressEntities")
<*> (o .:? "entityFilter")
<*> (o .:? "inputUrl")
<*> (o .:? "common"))
instance ToJSON
GoogleDatastoreAdminV1beta1ImportEntitiesMetadata
where
toJSON
GoogleDatastoreAdminV1beta1ImportEntitiesMetadata'{..}
= object
(catMaybes
[("progressBytes" .=) <$> _gdaviemProgressBytes,
("progressEntities" .=) <$> _gdaviemProgressEntities,
("entityFilter" .=) <$> _gdaviemEntityFilter,
("inputUrl" .=) <$> _gdaviemInputURL,
("common" .=) <$> _gdaviemCommon])
data GoogleDatastoreAdminV1beta1Progress = GoogleDatastoreAdminV1beta1Progress'
{ _gdavpWorkCompleted :: !(Maybe (Textual Int64))
, _gdavpWorkEstimated :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1beta1Progress
:: GoogleDatastoreAdminV1beta1Progress
googleDatastoreAdminV1beta1Progress =
GoogleDatastoreAdminV1beta1Progress'
{ _gdavpWorkCompleted = Nothing
, _gdavpWorkEstimated = Nothing
}
gdavpWorkCompleted :: Lens' GoogleDatastoreAdminV1beta1Progress (Maybe Int64)
gdavpWorkCompleted
= lens _gdavpWorkCompleted
(\ s a -> s{_gdavpWorkCompleted = a})
. mapping _Coerce
gdavpWorkEstimated :: Lens' GoogleDatastoreAdminV1beta1Progress (Maybe Int64)
gdavpWorkEstimated
= lens _gdavpWorkEstimated
(\ s a -> s{_gdavpWorkEstimated = a})
. mapping _Coerce
instance FromJSON GoogleDatastoreAdminV1beta1Progress
where
parseJSON
= withObject "GoogleDatastoreAdminV1beta1Progress"
(\ o ->
GoogleDatastoreAdminV1beta1Progress' <$>
(o .:? "workCompleted") <*> (o .:? "workEstimated"))
instance ToJSON GoogleDatastoreAdminV1beta1Progress
where
toJSON GoogleDatastoreAdminV1beta1Progress'{..}
= object
(catMaybes
[("workCompleted" .=) <$> _gdavpWorkCompleted,
("workEstimated" .=) <$> _gdavpWorkEstimated])
newtype BeginTransactionResponse = BeginTransactionResponse'
{ _btrTransaction :: Maybe Bytes
} deriving (Eq,Show,Data,Typeable,Generic)
beginTransactionResponse
:: BeginTransactionResponse
beginTransactionResponse =
BeginTransactionResponse'
{ _btrTransaction = Nothing
}
btrTransaction :: Lens' BeginTransactionResponse (Maybe ByteString)
btrTransaction
= lens _btrTransaction
(\ s a -> s{_btrTransaction = a})
. mapping _Bytes
instance FromJSON BeginTransactionResponse where
parseJSON
= withObject "BeginTransactionResponse"
(\ o ->
BeginTransactionResponse' <$> (o .:? "transaction"))
instance ToJSON BeginTransactionResponse where
toJSON BeginTransactionResponse'{..}
= object
(catMaybes [("transaction" .=) <$> _btrTransaction])
data MutationResult = MutationResult'
{ _mrConflictDetected :: !(Maybe Bool)
, _mrKey :: !(Maybe Key)
, _mrVersion :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
mutationResult
:: MutationResult
mutationResult =
MutationResult'
{ _mrConflictDetected = Nothing
, _mrKey = Nothing
, _mrVersion = Nothing
}
mrConflictDetected :: Lens' MutationResult (Maybe Bool)
mrConflictDetected
= lens _mrConflictDetected
(\ s a -> s{_mrConflictDetected = a})
mrKey :: Lens' MutationResult (Maybe Key)
mrKey = lens _mrKey (\ s a -> s{_mrKey = a})
mrVersion :: Lens' MutationResult (Maybe Int64)
mrVersion
= lens _mrVersion (\ s a -> s{_mrVersion = a}) .
mapping _Coerce
instance FromJSON MutationResult where
parseJSON
= withObject "MutationResult"
(\ o ->
MutationResult' <$>
(o .:? "conflictDetected") <*> (o .:? "key") <*>
(o .:? "version"))
instance ToJSON MutationResult where
toJSON MutationResult'{..}
= object
(catMaybes
[("conflictDetected" .=) <$> _mrConflictDetected,
("key" .=) <$> _mrKey,
("version" .=) <$> _mrVersion])
newtype AllocateIdsResponse = AllocateIdsResponse'
{ _aKeys :: Maybe [Key]
} deriving (Eq,Show,Data,Typeable,Generic)
allocateIdsResponse
:: AllocateIdsResponse
allocateIdsResponse =
AllocateIdsResponse'
{ _aKeys = Nothing
}
aKeys :: Lens' AllocateIdsResponse [Key]
aKeys
= lens _aKeys (\ s a -> s{_aKeys = a}) . _Default .
_Coerce
instance FromJSON AllocateIdsResponse where
parseJSON
= withObject "AllocateIdsResponse"
(\ o ->
AllocateIdsResponse' <$> (o .:? "keys" .!= mempty))
instance ToJSON AllocateIdsResponse where
toJSON AllocateIdsResponse'{..}
= object (catMaybes [("keys" .=) <$> _aKeys])
data GqlQuery = GqlQuery'
{ _gqPositionalBindings :: !(Maybe [GqlQueryParameter])
, _gqNamedBindings :: !(Maybe GqlQueryNamedBindings)
, _gqQueryString :: !(Maybe Text)
, _gqAllowLiterals :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
gqlQuery
:: GqlQuery
gqlQuery =
GqlQuery'
{ _gqPositionalBindings = Nothing
, _gqNamedBindings = Nothing
, _gqQueryString = Nothing
, _gqAllowLiterals = Nothing
}
gqPositionalBindings :: Lens' GqlQuery [GqlQueryParameter]
gqPositionalBindings
= lens _gqPositionalBindings
(\ s a -> s{_gqPositionalBindings = a})
. _Default
. _Coerce
gqNamedBindings :: Lens' GqlQuery (Maybe GqlQueryNamedBindings)
gqNamedBindings
= lens _gqNamedBindings
(\ s a -> s{_gqNamedBindings = a})
gqQueryString :: Lens' GqlQuery (Maybe Text)
gqQueryString
= lens _gqQueryString
(\ s a -> s{_gqQueryString = a})
gqAllowLiterals :: Lens' GqlQuery (Maybe Bool)
gqAllowLiterals
= lens _gqAllowLiterals
(\ s a -> s{_gqAllowLiterals = a})
instance FromJSON GqlQuery where
parseJSON
= withObject "GqlQuery"
(\ o ->
GqlQuery' <$>
(o .:? "positionalBindings" .!= mempty) <*>
(o .:? "namedBindings")
<*> (o .:? "queryString")
<*> (o .:? "allowLiterals"))
instance ToJSON GqlQuery where
toJSON GqlQuery'{..}
= object
(catMaybes
[("positionalBindings" .=) <$> _gqPositionalBindings,
("namedBindings" .=) <$> _gqNamedBindings,
("queryString" .=) <$> _gqQueryString,
("allowLiterals" .=) <$> _gqAllowLiterals])
data RunQueryResponse = RunQueryResponse'
{ _rBatch :: !(Maybe QueryResultBatch)
, _rQuery :: !(Maybe Query)
} deriving (Eq,Show,Data,Typeable,Generic)
runQueryResponse
:: RunQueryResponse
runQueryResponse =
RunQueryResponse'
{ _rBatch = Nothing
, _rQuery = Nothing
}
rBatch :: Lens' RunQueryResponse (Maybe QueryResultBatch)
rBatch = lens _rBatch (\ s a -> s{_rBatch = a})
rQuery :: Lens' RunQueryResponse (Maybe Query)
rQuery = lens _rQuery (\ s a -> s{_rQuery = a})
instance FromJSON RunQueryResponse where
parseJSON
= withObject "RunQueryResponse"
(\ o ->
RunQueryResponse' <$>
(o .:? "batch") <*> (o .:? "query"))
instance ToJSON RunQueryResponse where
toJSON RunQueryResponse'{..}
= object
(catMaybes
[("batch" .=) <$> _rBatch, ("query" .=) <$> _rQuery])
newtype GoogleDatastoreAdminV1ExportEntitiesRequestLabels = GoogleDatastoreAdminV1ExportEntitiesRequestLabels'
{ _gdaveerlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1ExportEntitiesRequestLabels
:: HashMap Text Text
-> GoogleDatastoreAdminV1ExportEntitiesRequestLabels
googleDatastoreAdminV1ExportEntitiesRequestLabels pGdaveerlAddtional_ =
GoogleDatastoreAdminV1ExportEntitiesRequestLabels'
{ _gdaveerlAddtional = _Coerce # pGdaveerlAddtional_
}
gdaveerlAddtional :: Lens' GoogleDatastoreAdminV1ExportEntitiesRequestLabels (HashMap Text Text)
gdaveerlAddtional
= lens _gdaveerlAddtional
(\ s a -> s{_gdaveerlAddtional = a})
. _Coerce
instance FromJSON
GoogleDatastoreAdminV1ExportEntitiesRequestLabels
where
parseJSON
= withObject
"GoogleDatastoreAdminV1ExportEntitiesRequestLabels"
(\ o ->
GoogleDatastoreAdminV1ExportEntitiesRequestLabels'
<$> (parseJSONObject o))
instance ToJSON
GoogleDatastoreAdminV1ExportEntitiesRequestLabels
where
toJSON = toJSON . _gdaveerlAddtional
data Value = Value'
{ _vKeyValue :: !(Maybe Key)
, _vGeoPointValue :: !(Maybe LatLng)
, _vIntegerValue :: !(Maybe (Textual Int64))
, _vTimestampValue :: !(Maybe DateTime')
, _vEntityValue :: !(Maybe Entity)
, _vExcludeFromIndexes :: !(Maybe Bool)
, _vDoubleValue :: !(Maybe (Textual Double))
, _vStringValue :: !(Maybe Text)
, _vBooleanValue :: !(Maybe Bool)
, _vMeaning :: !(Maybe (Textual Int32))
, _vArrayValue :: !(Maybe ArrayValue)
, _vNullValue :: !(Maybe ValueNullValue)
, _vBlobValue :: !(Maybe Bytes)
} deriving (Eq,Show,Data,Typeable,Generic)
value
:: Value
value =
Value'
{ _vKeyValue = Nothing
, _vGeoPointValue = Nothing
, _vIntegerValue = Nothing
, _vTimestampValue = Nothing
, _vEntityValue = Nothing
, _vExcludeFromIndexes = Nothing
, _vDoubleValue = Nothing
, _vStringValue = Nothing
, _vBooleanValue = Nothing
, _vMeaning = Nothing
, _vArrayValue = Nothing
, _vNullValue = Nothing
, _vBlobValue = Nothing
}
vKeyValue :: Lens' Value (Maybe Key)
vKeyValue
= lens _vKeyValue (\ s a -> s{_vKeyValue = a})
vGeoPointValue :: Lens' Value (Maybe LatLng)
vGeoPointValue
= lens _vGeoPointValue
(\ s a -> s{_vGeoPointValue = a})
vIntegerValue :: Lens' Value (Maybe Int64)
vIntegerValue
= lens _vIntegerValue
(\ s a -> s{_vIntegerValue = a})
. mapping _Coerce
vTimestampValue :: Lens' Value (Maybe UTCTime)
vTimestampValue
= lens _vTimestampValue
(\ s a -> s{_vTimestampValue = a})
. mapping _DateTime
vEntityValue :: Lens' Value (Maybe Entity)
vEntityValue
= lens _vEntityValue (\ s a -> s{_vEntityValue = a})
vExcludeFromIndexes :: Lens' Value (Maybe Bool)
vExcludeFromIndexes
= lens _vExcludeFromIndexes
(\ s a -> s{_vExcludeFromIndexes = a})
vDoubleValue :: Lens' Value (Maybe Double)
vDoubleValue
= lens _vDoubleValue (\ s a -> s{_vDoubleValue = a})
. mapping _Coerce
vStringValue :: Lens' Value (Maybe Text)
vStringValue
= lens _vStringValue (\ s a -> s{_vStringValue = a})
vBooleanValue :: Lens' Value (Maybe Bool)
vBooleanValue
= lens _vBooleanValue
(\ s a -> s{_vBooleanValue = a})
vMeaning :: Lens' Value (Maybe Int32)
vMeaning
= lens _vMeaning (\ s a -> s{_vMeaning = a}) .
mapping _Coerce
vArrayValue :: Lens' Value (Maybe ArrayValue)
vArrayValue
= lens _vArrayValue (\ s a -> s{_vArrayValue = a})
vNullValue :: Lens' Value (Maybe ValueNullValue)
vNullValue
= lens _vNullValue (\ s a -> s{_vNullValue = a})
vBlobValue :: Lens' Value (Maybe ByteString)
vBlobValue
= lens _vBlobValue (\ s a -> s{_vBlobValue = a}) .
mapping _Bytes
instance FromJSON Value where
parseJSON
= withObject "Value"
(\ o ->
Value' <$>
(o .:? "keyValue") <*> (o .:? "geoPointValue") <*>
(o .:? "integerValue")
<*> (o .:? "timestampValue")
<*> (o .:? "entityValue")
<*> (o .:? "excludeFromIndexes")
<*> (o .:? "doubleValue")
<*> (o .:? "stringValue")
<*> (o .:? "booleanValue")
<*> (o .:? "meaning")
<*> (o .:? "arrayValue")
<*> (o .:? "nullValue")
<*> (o .:? "blobValue"))
instance ToJSON Value where
toJSON Value'{..}
= object
(catMaybes
[("keyValue" .=) <$> _vKeyValue,
("geoPointValue" .=) <$> _vGeoPointValue,
("integerValue" .=) <$> _vIntegerValue,
("timestampValue" .=) <$> _vTimestampValue,
("entityValue" .=) <$> _vEntityValue,
("excludeFromIndexes" .=) <$> _vExcludeFromIndexes,
("doubleValue" .=) <$> _vDoubleValue,
("stringValue" .=) <$> _vStringValue,
("booleanValue" .=) <$> _vBooleanValue,
("meaning" .=) <$> _vMeaning,
("arrayValue" .=) <$> _vArrayValue,
("nullValue" .=) <$> _vNullValue,
("blobValue" .=) <$> _vBlobValue])
newtype GoogleDatastoreAdminV1CommonMetadataLabels = GoogleDatastoreAdminV1CommonMetadataLabels'
{ _gdavcmlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1CommonMetadataLabels
:: HashMap Text Text
-> GoogleDatastoreAdminV1CommonMetadataLabels
googleDatastoreAdminV1CommonMetadataLabels pGdavcmlAddtional_ =
GoogleDatastoreAdminV1CommonMetadataLabels'
{ _gdavcmlAddtional = _Coerce # pGdavcmlAddtional_
}
gdavcmlAddtional :: Lens' GoogleDatastoreAdminV1CommonMetadataLabels (HashMap Text Text)
gdavcmlAddtional
= lens _gdavcmlAddtional
(\ s a -> s{_gdavcmlAddtional = a})
. _Coerce
instance FromJSON
GoogleDatastoreAdminV1CommonMetadataLabels where
parseJSON
= withObject
"GoogleDatastoreAdminV1CommonMetadataLabels"
(\ o ->
GoogleDatastoreAdminV1CommonMetadataLabels' <$>
(parseJSONObject o))
instance ToJSON
GoogleDatastoreAdminV1CommonMetadataLabels where
toJSON = toJSON . _gdavcmlAddtional
newtype StatusDetailsItem = StatusDetailsItem'
{ _sdiAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
statusDetailsItem
:: HashMap Text JSONValue
-> StatusDetailsItem
statusDetailsItem pSdiAddtional_ =
StatusDetailsItem'
{ _sdiAddtional = _Coerce # pSdiAddtional_
}
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
sdiAddtional
= lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
. _Coerce
instance FromJSON StatusDetailsItem where
parseJSON
= withObject "StatusDetailsItem"
(\ o -> StatusDetailsItem' <$> (parseJSONObject o))
instance ToJSON StatusDetailsItem where
toJSON = toJSON . _sdiAddtional
data LookupRequest = LookupRequest'
{ _lrKeys :: !(Maybe [Key])
, _lrReadOptions :: !(Maybe ReadOptions)
} deriving (Eq,Show,Data,Typeable,Generic)
lookupRequest
:: LookupRequest
lookupRequest =
LookupRequest'
{ _lrKeys = Nothing
, _lrReadOptions = Nothing
}
lrKeys :: Lens' LookupRequest [Key]
lrKeys
= lens _lrKeys (\ s a -> s{_lrKeys = a}) . _Default .
_Coerce
lrReadOptions :: Lens' LookupRequest (Maybe ReadOptions)
lrReadOptions
= lens _lrReadOptions
(\ s a -> s{_lrReadOptions = a})
instance FromJSON LookupRequest where
parseJSON
= withObject "LookupRequest"
(\ o ->
LookupRequest' <$>
(o .:? "keys" .!= mempty) <*> (o .:? "readOptions"))
instance ToJSON LookupRequest where
toJSON LookupRequest'{..}
= object
(catMaybes
[("keys" .=) <$> _lrKeys,
("readOptions" .=) <$> _lrReadOptions])
data GoogleDatastoreAdminV1CommonMetadata = GoogleDatastoreAdminV1CommonMetadata'
{ _gState :: !(Maybe GoogleDatastoreAdminV1CommonMetadataState)
, _gStartTime :: !(Maybe DateTime')
, _gEndTime :: !(Maybe DateTime')
, _gLabels :: !(Maybe GoogleDatastoreAdminV1CommonMetadataLabels)
, _gOperationType :: !(Maybe GoogleDatastoreAdminV1CommonMetadataOperationType)
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1CommonMetadata
:: GoogleDatastoreAdminV1CommonMetadata
googleDatastoreAdminV1CommonMetadata =
GoogleDatastoreAdminV1CommonMetadata'
{ _gState = Nothing
, _gStartTime = Nothing
, _gEndTime = Nothing
, _gLabels = Nothing
, _gOperationType = Nothing
}
gState :: Lens' GoogleDatastoreAdminV1CommonMetadata (Maybe GoogleDatastoreAdminV1CommonMetadataState)
gState = lens _gState (\ s a -> s{_gState = a})
gStartTime :: Lens' GoogleDatastoreAdminV1CommonMetadata (Maybe UTCTime)
gStartTime
= lens _gStartTime (\ s a -> s{_gStartTime = a}) .
mapping _DateTime
gEndTime :: Lens' GoogleDatastoreAdminV1CommonMetadata (Maybe UTCTime)
gEndTime
= lens _gEndTime (\ s a -> s{_gEndTime = a}) .
mapping _DateTime
gLabels :: Lens' GoogleDatastoreAdminV1CommonMetadata (Maybe GoogleDatastoreAdminV1CommonMetadataLabels)
gLabels = lens _gLabels (\ s a -> s{_gLabels = a})
gOperationType :: Lens' GoogleDatastoreAdminV1CommonMetadata (Maybe GoogleDatastoreAdminV1CommonMetadataOperationType)
gOperationType
= lens _gOperationType
(\ s a -> s{_gOperationType = a})
instance FromJSON
GoogleDatastoreAdminV1CommonMetadata where
parseJSON
= withObject "GoogleDatastoreAdminV1CommonMetadata"
(\ o ->
GoogleDatastoreAdminV1CommonMetadata' <$>
(o .:? "state") <*> (o .:? "startTime") <*>
(o .:? "endTime")
<*> (o .:? "labels")
<*> (o .:? "operationType"))
instance ToJSON GoogleDatastoreAdminV1CommonMetadata
where
toJSON GoogleDatastoreAdminV1CommonMetadata'{..}
= object
(catMaybes
[("state" .=) <$> _gState,
("startTime" .=) <$> _gStartTime,
("endTime" .=) <$> _gEndTime,
("labels" .=) <$> _gLabels,
("operationType" .=) <$> _gOperationType])
data GoogleDatastoreAdminV1ExportEntitiesRequest = GoogleDatastoreAdminV1ExportEntitiesRequest'
{ _gdaveerOutputURLPrefix :: !(Maybe Text)
, _gdaveerEntityFilter :: !(Maybe GoogleDatastoreAdminV1EntityFilter)
, _gdaveerLabels :: !(Maybe GoogleDatastoreAdminV1ExportEntitiesRequestLabels)
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1ExportEntitiesRequest
:: GoogleDatastoreAdminV1ExportEntitiesRequest
googleDatastoreAdminV1ExportEntitiesRequest =
GoogleDatastoreAdminV1ExportEntitiesRequest'
{ _gdaveerOutputURLPrefix = Nothing
, _gdaveerEntityFilter = Nothing
, _gdaveerLabels = Nothing
}
gdaveerOutputURLPrefix :: Lens' GoogleDatastoreAdminV1ExportEntitiesRequest (Maybe Text)
gdaveerOutputURLPrefix
= lens _gdaveerOutputURLPrefix
(\ s a -> s{_gdaveerOutputURLPrefix = a})
gdaveerEntityFilter :: Lens' GoogleDatastoreAdminV1ExportEntitiesRequest (Maybe GoogleDatastoreAdminV1EntityFilter)
gdaveerEntityFilter
= lens _gdaveerEntityFilter
(\ s a -> s{_gdaveerEntityFilter = a})
gdaveerLabels :: Lens' GoogleDatastoreAdminV1ExportEntitiesRequest (Maybe GoogleDatastoreAdminV1ExportEntitiesRequestLabels)
gdaveerLabels
= lens _gdaveerLabels
(\ s a -> s{_gdaveerLabels = a})
instance FromJSON
GoogleDatastoreAdminV1ExportEntitiesRequest where
parseJSON
= withObject
"GoogleDatastoreAdminV1ExportEntitiesRequest"
(\ o ->
GoogleDatastoreAdminV1ExportEntitiesRequest' <$>
(o .:? "outputUrlPrefix") <*> (o .:? "entityFilter")
<*> (o .:? "labels"))
instance ToJSON
GoogleDatastoreAdminV1ExportEntitiesRequest where
toJSON
GoogleDatastoreAdminV1ExportEntitiesRequest'{..}
= object
(catMaybes
[("outputUrlPrefix" .=) <$> _gdaveerOutputURLPrefix,
("entityFilter" .=) <$> _gdaveerEntityFilter,
("labels" .=) <$> _gdaveerLabels])
data Mutation = Mutation'
{ _mBaseVersion :: !(Maybe (Textual Int64))
, _mInsert :: !(Maybe Entity)
, _mUpsert :: !(Maybe Entity)
, _mDelete :: !(Maybe Key)
, _mUpdate :: !(Maybe Entity)
} deriving (Eq,Show,Data,Typeable,Generic)
mutation
:: Mutation
mutation =
Mutation'
{ _mBaseVersion = Nothing
, _mInsert = Nothing
, _mUpsert = Nothing
, _mDelete = Nothing
, _mUpdate = Nothing
}
mBaseVersion :: Lens' Mutation (Maybe Int64)
mBaseVersion
= lens _mBaseVersion (\ s a -> s{_mBaseVersion = a})
. mapping _Coerce
mInsert :: Lens' Mutation (Maybe Entity)
mInsert = lens _mInsert (\ s a -> s{_mInsert = a})
mUpsert :: Lens' Mutation (Maybe Entity)
mUpsert = lens _mUpsert (\ s a -> s{_mUpsert = a})
mDelete :: Lens' Mutation (Maybe Key)
mDelete = lens _mDelete (\ s a -> s{_mDelete = a})
mUpdate :: Lens' Mutation (Maybe Entity)
mUpdate = lens _mUpdate (\ s a -> s{_mUpdate = a})
instance FromJSON Mutation where
parseJSON
= withObject "Mutation"
(\ o ->
Mutation' <$>
(o .:? "baseVersion") <*> (o .:? "insert") <*>
(o .:? "upsert")
<*> (o .:? "delete")
<*> (o .:? "update"))
instance ToJSON Mutation where
toJSON Mutation'{..}
= object
(catMaybes
[("baseVersion" .=) <$> _mBaseVersion,
("insert" .=) <$> _mInsert,
("upsert" .=) <$> _mUpsert,
("delete" .=) <$> _mDelete,
("update" .=) <$> _mUpdate])
newtype GqlQueryNamedBindings = GqlQueryNamedBindings'
{ _gqnbAddtional :: HashMap Text GqlQueryParameter
} deriving (Eq,Show,Data,Typeable,Generic)
gqlQueryNamedBindings
:: HashMap Text GqlQueryParameter
-> GqlQueryNamedBindings
gqlQueryNamedBindings pGqnbAddtional_ =
GqlQueryNamedBindings'
{ _gqnbAddtional = _Coerce # pGqnbAddtional_
}
gqnbAddtional :: Lens' GqlQueryNamedBindings (HashMap Text GqlQueryParameter)
gqnbAddtional
= lens _gqnbAddtional
(\ s a -> s{_gqnbAddtional = a})
. _Coerce
instance FromJSON GqlQueryNamedBindings where
parseJSON
= withObject "GqlQueryNamedBindings"
(\ o ->
GqlQueryNamedBindings' <$> (parseJSONObject o))
instance ToJSON GqlQueryNamedBindings where
toJSON = toJSON . _gqnbAddtional
newtype GoogleDatastoreAdminV1ExportEntitiesResponse = GoogleDatastoreAdminV1ExportEntitiesResponse'
{ _gOutputURL :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1ExportEntitiesResponse
:: GoogleDatastoreAdminV1ExportEntitiesResponse
googleDatastoreAdminV1ExportEntitiesResponse =
GoogleDatastoreAdminV1ExportEntitiesResponse'
{ _gOutputURL = Nothing
}
gOutputURL :: Lens' GoogleDatastoreAdminV1ExportEntitiesResponse (Maybe Text)
gOutputURL
= lens _gOutputURL (\ s a -> s{_gOutputURL = a})
instance FromJSON
GoogleDatastoreAdminV1ExportEntitiesResponse where
parseJSON
= withObject
"GoogleDatastoreAdminV1ExportEntitiesResponse"
(\ o ->
GoogleDatastoreAdminV1ExportEntitiesResponse' <$>
(o .:? "outputUrl"))
instance ToJSON
GoogleDatastoreAdminV1ExportEntitiesResponse where
toJSON
GoogleDatastoreAdminV1ExportEntitiesResponse'{..}
= object
(catMaybes [("outputUrl" .=) <$> _gOutputURL])
newtype PropertyReference = PropertyReference'
{ _prName :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
propertyReference
:: PropertyReference
propertyReference =
PropertyReference'
{ _prName = Nothing
}
prName :: Lens' PropertyReference (Maybe Text)
prName = lens _prName (\ s a -> s{_prName = a})
instance FromJSON PropertyReference where
parseJSON
= withObject "PropertyReference"
(\ o -> PropertyReference' <$> (o .:? "name"))
instance ToJSON PropertyReference where
toJSON PropertyReference'{..}
= object (catMaybes [("name" .=) <$> _prName])
data Key = Key'
{ _kPartitionId :: !(Maybe PartitionId)
, _kPath :: !(Maybe [PathElement])
} deriving (Eq,Show,Data,Typeable,Generic)
key
:: Key
key =
Key'
{ _kPartitionId = Nothing
, _kPath = Nothing
}
kPartitionId :: Lens' Key (Maybe PartitionId)
kPartitionId
= lens _kPartitionId (\ s a -> s{_kPartitionId = a})
kPath :: Lens' Key [PathElement]
kPath
= lens _kPath (\ s a -> s{_kPath = a}) . _Default .
_Coerce
instance FromJSON Key where
parseJSON
= withObject "Key"
(\ o ->
Key' <$>
(o .:? "partitionId") <*> (o .:? "path" .!= mempty))
instance ToJSON Key where
toJSON Key'{..}
= object
(catMaybes
[("partitionId" .=) <$> _kPartitionId,
("path" .=) <$> _kPath])
data GoogleDatastoreAdminV1ImportEntitiesRequest = GoogleDatastoreAdminV1ImportEntitiesRequest'
{ _gdavierEntityFilter :: !(Maybe GoogleDatastoreAdminV1EntityFilter)
, _gdavierInputURL :: !(Maybe Text)
, _gdavierLabels :: !(Maybe GoogleDatastoreAdminV1ImportEntitiesRequestLabels)
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1ImportEntitiesRequest
:: GoogleDatastoreAdminV1ImportEntitiesRequest
googleDatastoreAdminV1ImportEntitiesRequest =
GoogleDatastoreAdminV1ImportEntitiesRequest'
{ _gdavierEntityFilter = Nothing
, _gdavierInputURL = Nothing
, _gdavierLabels = Nothing
}
gdavierEntityFilter :: Lens' GoogleDatastoreAdminV1ImportEntitiesRequest (Maybe GoogleDatastoreAdminV1EntityFilter)
gdavierEntityFilter
= lens _gdavierEntityFilter
(\ s a -> s{_gdavierEntityFilter = a})
gdavierInputURL :: Lens' GoogleDatastoreAdminV1ImportEntitiesRequest (Maybe Text)
gdavierInputURL
= lens _gdavierInputURL
(\ s a -> s{_gdavierInputURL = a})
gdavierLabels :: Lens' GoogleDatastoreAdminV1ImportEntitiesRequest (Maybe GoogleDatastoreAdminV1ImportEntitiesRequestLabels)
gdavierLabels
= lens _gdavierLabels
(\ s a -> s{_gdavierLabels = a})
instance FromJSON
GoogleDatastoreAdminV1ImportEntitiesRequest where
parseJSON
= withObject
"GoogleDatastoreAdminV1ImportEntitiesRequest"
(\ o ->
GoogleDatastoreAdminV1ImportEntitiesRequest' <$>
(o .:? "entityFilter") <*> (o .:? "inputUrl") <*>
(o .:? "labels"))
instance ToJSON
GoogleDatastoreAdminV1ImportEntitiesRequest where
toJSON
GoogleDatastoreAdminV1ImportEntitiesRequest'{..}
= object
(catMaybes
[("entityFilter" .=) <$> _gdavierEntityFilter,
("inputUrl" .=) <$> _gdavierInputURL,
("labels" .=) <$> _gdavierLabels])
data PropertyFilter = PropertyFilter'
{ _pfProperty :: !(Maybe PropertyReference)
, _pfOp :: !(Maybe PropertyFilterOp)
, _pfValue :: !(Maybe Value)
} deriving (Eq,Show,Data,Typeable,Generic)
propertyFilter
:: PropertyFilter
propertyFilter =
PropertyFilter'
{ _pfProperty = Nothing
, _pfOp = Nothing
, _pfValue = Nothing
}
pfProperty :: Lens' PropertyFilter (Maybe PropertyReference)
pfProperty
= lens _pfProperty (\ s a -> s{_pfProperty = a})
pfOp :: Lens' PropertyFilter (Maybe PropertyFilterOp)
pfOp = lens _pfOp (\ s a -> s{_pfOp = a})
pfValue :: Lens' PropertyFilter (Maybe Value)
pfValue = lens _pfValue (\ s a -> s{_pfValue = a})
instance FromJSON PropertyFilter where
parseJSON
= withObject "PropertyFilter"
(\ o ->
PropertyFilter' <$>
(o .:? "property") <*> (o .:? "op") <*>
(o .:? "value"))
instance ToJSON PropertyFilter where
toJSON PropertyFilter'{..}
= object
(catMaybes
[("property" .=) <$> _pfProperty,
("op" .=) <$> _pfOp, ("value" .=) <$> _pfValue])
data Query = Query'
{ _qStartCursor :: !(Maybe Bytes)
, _qOffSet :: !(Maybe (Textual Int32))
, _qKind :: !(Maybe [KindExpression])
, _qDistinctOn :: !(Maybe [PropertyReference])
, _qEndCursor :: !(Maybe Bytes)
, _qLimit :: !(Maybe (Textual Int32))
, _qProjection :: !(Maybe [Projection])
, _qFilter :: !(Maybe Filter)
, _qOrder :: !(Maybe [PropertyOrder])
} deriving (Eq,Show,Data,Typeable,Generic)
query
:: Query
query =
Query'
{ _qStartCursor = Nothing
, _qOffSet = Nothing
, _qKind = Nothing
, _qDistinctOn = Nothing
, _qEndCursor = Nothing
, _qLimit = Nothing
, _qProjection = Nothing
, _qFilter = Nothing
, _qOrder = Nothing
}
qStartCursor :: Lens' Query (Maybe ByteString)
qStartCursor
= lens _qStartCursor (\ s a -> s{_qStartCursor = a})
. mapping _Bytes
qOffSet :: Lens' Query (Maybe Int32)
qOffSet
= lens _qOffSet (\ s a -> s{_qOffSet = a}) .
mapping _Coerce
qKind :: Lens' Query [KindExpression]
qKind
= lens _qKind (\ s a -> s{_qKind = a}) . _Default .
_Coerce
qDistinctOn :: Lens' Query [PropertyReference]
qDistinctOn
= lens _qDistinctOn (\ s a -> s{_qDistinctOn = a}) .
_Default
. _Coerce
qEndCursor :: Lens' Query (Maybe ByteString)
qEndCursor
= lens _qEndCursor (\ s a -> s{_qEndCursor = a}) .
mapping _Bytes
qLimit :: Lens' Query (Maybe Int32)
qLimit
= lens _qLimit (\ s a -> s{_qLimit = a}) .
mapping _Coerce
qProjection :: Lens' Query [Projection]
qProjection
= lens _qProjection (\ s a -> s{_qProjection = a}) .
_Default
. _Coerce
qFilter :: Lens' Query (Maybe Filter)
qFilter = lens _qFilter (\ s a -> s{_qFilter = a})
qOrder :: Lens' Query [PropertyOrder]
qOrder
= lens _qOrder (\ s a -> s{_qOrder = a}) . _Default .
_Coerce
instance FromJSON Query where
parseJSON
= withObject "Query"
(\ o ->
Query' <$>
(o .:? "startCursor") <*> (o .:? "offset") <*>
(o .:? "kind" .!= mempty)
<*> (o .:? "distinctOn" .!= mempty)
<*> (o .:? "endCursor")
<*> (o .:? "limit")
<*> (o .:? "projection" .!= mempty)
<*> (o .:? "filter")
<*> (o .:? "order" .!= mempty))
instance ToJSON Query where
toJSON Query'{..}
= object
(catMaybes
[("startCursor" .=) <$> _qStartCursor,
("offset" .=) <$> _qOffSet, ("kind" .=) <$> _qKind,
("distinctOn" .=) <$> _qDistinctOn,
("endCursor" .=) <$> _qEndCursor,
("limit" .=) <$> _qLimit,
("projection" .=) <$> _qProjection,
("filter" .=) <$> _qFilter,
("order" .=) <$> _qOrder])
newtype ArrayValue = ArrayValue'
{ _avValues :: Maybe [Value]
} deriving (Eq,Show,Data,Typeable,Generic)
arrayValue
:: ArrayValue
arrayValue =
ArrayValue'
{ _avValues = Nothing
}
avValues :: Lens' ArrayValue [Value]
avValues
= lens _avValues (\ s a -> s{_avValues = a}) .
_Default
. _Coerce
instance FromJSON ArrayValue where
parseJSON
= withObject "ArrayValue"
(\ o -> ArrayValue' <$> (o .:? "values" .!= mempty))
instance ToJSON ArrayValue where
toJSON ArrayValue'{..}
= object (catMaybes [("values" .=) <$> _avValues])
data EntityResult = EntityResult'
{ _erCursor :: !(Maybe Bytes)
, _erVersion :: !(Maybe (Textual Int64))
, _erEntity :: !(Maybe Entity)
} deriving (Eq,Show,Data,Typeable,Generic)
entityResult
:: EntityResult
entityResult =
EntityResult'
{ _erCursor = Nothing
, _erVersion = Nothing
, _erEntity = Nothing
}
erCursor :: Lens' EntityResult (Maybe ByteString)
erCursor
= lens _erCursor (\ s a -> s{_erCursor = a}) .
mapping _Bytes
erVersion :: Lens' EntityResult (Maybe Int64)
erVersion
= lens _erVersion (\ s a -> s{_erVersion = a}) .
mapping _Coerce
erEntity :: Lens' EntityResult (Maybe Entity)
erEntity = lens _erEntity (\ s a -> s{_erEntity = a})
instance FromJSON EntityResult where
parseJSON
= withObject "EntityResult"
(\ o ->
EntityResult' <$>
(o .:? "cursor") <*> (o .:? "version") <*>
(o .:? "entity"))
instance ToJSON EntityResult where
toJSON EntityResult'{..}
= object
(catMaybes
[("cursor" .=) <$> _erCursor,
("version" .=) <$> _erVersion,
("entity" .=) <$> _erEntity])
data CommitResponse = CommitResponse'
{ _crIndexUpdates :: !(Maybe (Textual Int32))
, _crMutationResults :: !(Maybe [MutationResult])
} deriving (Eq,Show,Data,Typeable,Generic)
commitResponse
:: CommitResponse
commitResponse =
CommitResponse'
{ _crIndexUpdates = Nothing
, _crMutationResults = Nothing
}
crIndexUpdates :: Lens' CommitResponse (Maybe Int32)
crIndexUpdates
= lens _crIndexUpdates
(\ s a -> s{_crIndexUpdates = a})
. mapping _Coerce
crMutationResults :: Lens' CommitResponse [MutationResult]
crMutationResults
= lens _crMutationResults
(\ s a -> s{_crMutationResults = a})
. _Default
. _Coerce
instance FromJSON CommitResponse where
parseJSON
= withObject "CommitResponse"
(\ o ->
CommitResponse' <$>
(o .:? "indexUpdates") <*>
(o .:? "mutationResults" .!= mempty))
instance ToJSON CommitResponse where
toJSON CommitResponse'{..}
= object
(catMaybes
[("indexUpdates" .=) <$> _crIndexUpdates,
("mutationResults" .=) <$> _crMutationResults])
newtype KindExpression = KindExpression'
{ _keName :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
kindExpression
:: KindExpression
kindExpression =
KindExpression'
{ _keName = Nothing
}
keName :: Lens' KindExpression (Maybe Text)
keName = lens _keName (\ s a -> s{_keName = a})
instance FromJSON KindExpression where
parseJSON
= withObject "KindExpression"
(\ o -> KindExpression' <$> (o .:? "name"))
instance ToJSON KindExpression where
toJSON KindExpression'{..}
= object (catMaybes [("name" .=) <$> _keName])
newtype GoogleLongrunningOperationResponse = GoogleLongrunningOperationResponse'
{ _glorAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
googleLongrunningOperationResponse
:: HashMap Text JSONValue
-> GoogleLongrunningOperationResponse
googleLongrunningOperationResponse pGlorAddtional_ =
GoogleLongrunningOperationResponse'
{ _glorAddtional = _Coerce # pGlorAddtional_
}
glorAddtional :: Lens' GoogleLongrunningOperationResponse (HashMap Text JSONValue)
glorAddtional
= lens _glorAddtional
(\ s a -> s{_glorAddtional = a})
. _Coerce
instance FromJSON GoogleLongrunningOperationResponse
where
parseJSON
= withObject "GoogleLongrunningOperationResponse"
(\ o ->
GoogleLongrunningOperationResponse' <$>
(parseJSONObject o))
instance ToJSON GoogleLongrunningOperationResponse
where
toJSON = toJSON . _glorAddtional
data ReadOptions = ReadOptions'
{ _roReadConsistency :: !(Maybe ReadOptionsReadConsistency)
, _roTransaction :: !(Maybe Bytes)
} deriving (Eq,Show,Data,Typeable,Generic)
readOptions
:: ReadOptions
readOptions =
ReadOptions'
{ _roReadConsistency = Nothing
, _roTransaction = Nothing
}
roReadConsistency :: Lens' ReadOptions (Maybe ReadOptionsReadConsistency)
roReadConsistency
= lens _roReadConsistency
(\ s a -> s{_roReadConsistency = a})
roTransaction :: Lens' ReadOptions (Maybe ByteString)
roTransaction
= lens _roTransaction
(\ s a -> s{_roTransaction = a})
. mapping _Bytes
instance FromJSON ReadOptions where
parseJSON
= withObject "ReadOptions"
(\ o ->
ReadOptions' <$>
(o .:? "readConsistency") <*> (o .:? "transaction"))
instance ToJSON ReadOptions where
toJSON ReadOptions'{..}
= object
(catMaybes
[("readConsistency" .=) <$> _roReadConsistency,
("transaction" .=) <$> _roTransaction])
data GoogleDatastoreAdminV1EntityFilter = GoogleDatastoreAdminV1EntityFilter'
{ _gdavefNamespaceIds :: !(Maybe [Text])
, _gdavefKinds :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1EntityFilter
:: GoogleDatastoreAdminV1EntityFilter
googleDatastoreAdminV1EntityFilter =
GoogleDatastoreAdminV1EntityFilter'
{ _gdavefNamespaceIds = Nothing
, _gdavefKinds = Nothing
}
gdavefNamespaceIds :: Lens' GoogleDatastoreAdminV1EntityFilter [Text]
gdavefNamespaceIds
= lens _gdavefNamespaceIds
(\ s a -> s{_gdavefNamespaceIds = a})
. _Default
. _Coerce
gdavefKinds :: Lens' GoogleDatastoreAdminV1EntityFilter [Text]
gdavefKinds
= lens _gdavefKinds (\ s a -> s{_gdavefKinds = a}) .
_Default
. _Coerce
instance FromJSON GoogleDatastoreAdminV1EntityFilter
where
parseJSON
= withObject "GoogleDatastoreAdminV1EntityFilter"
(\ o ->
GoogleDatastoreAdminV1EntityFilter' <$>
(o .:? "namespaceIds" .!= mempty) <*>
(o .:? "kinds" .!= mempty))
instance ToJSON GoogleDatastoreAdminV1EntityFilter
where
toJSON GoogleDatastoreAdminV1EntityFilter'{..}
= object
(catMaybes
[("namespaceIds" .=) <$> _gdavefNamespaceIds,
("kinds" .=) <$> _gdavefKinds])
data RollbackResponse =
RollbackResponse'
deriving (Eq,Show,Data,Typeable,Generic)
rollbackResponse
:: RollbackResponse
rollbackResponse = RollbackResponse'
instance FromJSON RollbackResponse where
parseJSON
= withObject "RollbackResponse"
(\ o -> pure RollbackResponse')
instance ToJSON RollbackResponse where
toJSON = const emptyObject
newtype Projection = Projection'
{ _pProperty :: Maybe PropertyReference
} deriving (Eq,Show,Data,Typeable,Generic)
projection
:: Projection
projection =
Projection'
{ _pProperty = Nothing
}
pProperty :: Lens' Projection (Maybe PropertyReference)
pProperty
= lens _pProperty (\ s a -> s{_pProperty = a})
instance FromJSON Projection where
parseJSON
= withObject "Projection"
(\ o -> Projection' <$> (o .:? "property"))
instance ToJSON Projection where
toJSON Projection'{..}
= object (catMaybes [("property" .=) <$> _pProperty])
data ReserveIdsResponse =
ReserveIdsResponse'
deriving (Eq,Show,Data,Typeable,Generic)
reserveIdsResponse
:: ReserveIdsResponse
reserveIdsResponse = ReserveIdsResponse'
instance FromJSON ReserveIdsResponse where
parseJSON
= withObject "ReserveIdsResponse"
(\ o -> pure ReserveIdsResponse')
instance ToJSON ReserveIdsResponse where
toJSON = const emptyObject
data Filter = Filter'
{ _fCompositeFilter :: !(Maybe CompositeFilter)
, _fPropertyFilter :: !(Maybe PropertyFilter)
} deriving (Eq,Show,Data,Typeable,Generic)
filter'
:: Filter
filter' =
Filter'
{ _fCompositeFilter = Nothing
, _fPropertyFilter = Nothing
}
fCompositeFilter :: Lens' Filter (Maybe CompositeFilter)
fCompositeFilter
= lens _fCompositeFilter
(\ s a -> s{_fCompositeFilter = a})
fPropertyFilter :: Lens' Filter (Maybe PropertyFilter)
fPropertyFilter
= lens _fPropertyFilter
(\ s a -> s{_fPropertyFilter = a})
instance FromJSON Filter where
parseJSON
= withObject "Filter"
(\ o ->
Filter' <$>
(o .:? "compositeFilter") <*>
(o .:? "propertyFilter"))
instance ToJSON Filter where
toJSON Filter'{..}
= object
(catMaybes
[("compositeFilter" .=) <$> _fCompositeFilter,
("propertyFilter" .=) <$> _fPropertyFilter])
data GoogleDatastoreAdminV1Index = GoogleDatastoreAdminV1Index'
{ _gdaviState :: !(Maybe GoogleDatastoreAdminV1IndexState)
, _gdaviKind :: !(Maybe Text)
, _gdaviProjectId :: !(Maybe Text)
, _gdaviIndexId :: !(Maybe Text)
, _gdaviAncestor :: !(Maybe GoogleDatastoreAdminV1IndexAncestor)
, _gdaviProperties :: !(Maybe [GoogleDatastoreAdminV1IndexedProperty])
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1Index
:: GoogleDatastoreAdminV1Index
googleDatastoreAdminV1Index =
GoogleDatastoreAdminV1Index'
{ _gdaviState = Nothing
, _gdaviKind = Nothing
, _gdaviProjectId = Nothing
, _gdaviIndexId = Nothing
, _gdaviAncestor = Nothing
, _gdaviProperties = Nothing
}
gdaviState :: Lens' GoogleDatastoreAdminV1Index (Maybe GoogleDatastoreAdminV1IndexState)
gdaviState
= lens _gdaviState (\ s a -> s{_gdaviState = a})
gdaviKind :: Lens' GoogleDatastoreAdminV1Index (Maybe Text)
gdaviKind
= lens _gdaviKind (\ s a -> s{_gdaviKind = a})
gdaviProjectId :: Lens' GoogleDatastoreAdminV1Index (Maybe Text)
gdaviProjectId
= lens _gdaviProjectId
(\ s a -> s{_gdaviProjectId = a})
gdaviIndexId :: Lens' GoogleDatastoreAdminV1Index (Maybe Text)
gdaviIndexId
= lens _gdaviIndexId (\ s a -> s{_gdaviIndexId = a})
gdaviAncestor :: Lens' GoogleDatastoreAdminV1Index (Maybe GoogleDatastoreAdminV1IndexAncestor)
gdaviAncestor
= lens _gdaviAncestor
(\ s a -> s{_gdaviAncestor = a})
gdaviProperties :: Lens' GoogleDatastoreAdminV1Index [GoogleDatastoreAdminV1IndexedProperty]
gdaviProperties
= lens _gdaviProperties
(\ s a -> s{_gdaviProperties = a})
. _Default
. _Coerce
instance FromJSON GoogleDatastoreAdminV1Index where
parseJSON
= withObject "GoogleDatastoreAdminV1Index"
(\ o ->
GoogleDatastoreAdminV1Index' <$>
(o .:? "state") <*> (o .:? "kind") <*>
(o .:? "projectId")
<*> (o .:? "indexId")
<*> (o .:? "ancestor")
<*> (o .:? "properties" .!= mempty))
instance ToJSON GoogleDatastoreAdminV1Index where
toJSON GoogleDatastoreAdminV1Index'{..}
= object
(catMaybes
[("state" .=) <$> _gdaviState,
("kind" .=) <$> _gdaviKind,
("projectId" .=) <$> _gdaviProjectId,
("indexId" .=) <$> _gdaviIndexId,
("ancestor" .=) <$> _gdaviAncestor,
("properties" .=) <$> _gdaviProperties])
newtype GoogleDatastoreAdminV1beta1CommonMetadataLabels = GoogleDatastoreAdminV1beta1CommonMetadataLabels'
{ _gAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1beta1CommonMetadataLabels
:: HashMap Text Text
-> GoogleDatastoreAdminV1beta1CommonMetadataLabels
googleDatastoreAdminV1beta1CommonMetadataLabels pGAddtional_ =
GoogleDatastoreAdminV1beta1CommonMetadataLabels'
{ _gAddtional = _Coerce # pGAddtional_
}
gAddtional :: Lens' GoogleDatastoreAdminV1beta1CommonMetadataLabels (HashMap Text Text)
gAddtional
= lens _gAddtional (\ s a -> s{_gAddtional = a}) .
_Coerce
instance FromJSON
GoogleDatastoreAdminV1beta1CommonMetadataLabels where
parseJSON
= withObject
"GoogleDatastoreAdminV1beta1CommonMetadataLabels"
(\ o ->
GoogleDatastoreAdminV1beta1CommonMetadataLabels' <$>
(parseJSONObject o))
instance ToJSON
GoogleDatastoreAdminV1beta1CommonMetadataLabels where
toJSON = toJSON . _gAddtional
data CommitRequest = CommitRequest'
{ _crMutations :: !(Maybe [Mutation])
, _crMode :: !(Maybe CommitRequestMode)
, _crTransaction :: !(Maybe Bytes)
} deriving (Eq,Show,Data,Typeable,Generic)
commitRequest
:: CommitRequest
commitRequest =
CommitRequest'
{ _crMutations = Nothing
, _crMode = Nothing
, _crTransaction = Nothing
}
crMutations :: Lens' CommitRequest [Mutation]
crMutations
= lens _crMutations (\ s a -> s{_crMutations = a}) .
_Default
. _Coerce
crMode :: Lens' CommitRequest (Maybe CommitRequestMode)
crMode = lens _crMode (\ s a -> s{_crMode = a})
crTransaction :: Lens' CommitRequest (Maybe ByteString)
crTransaction
= lens _crTransaction
(\ s a -> s{_crTransaction = a})
. mapping _Bytes
instance FromJSON CommitRequest where
parseJSON
= withObject "CommitRequest"
(\ o ->
CommitRequest' <$>
(o .:? "mutations" .!= mempty) <*> (o .:? "mode") <*>
(o .:? "transaction"))
instance ToJSON CommitRequest where
toJSON CommitRequest'{..}
= object
(catMaybes
[("mutations" .=) <$> _crMutations,
("mode" .=) <$> _crMode,
("transaction" .=) <$> _crTransaction])
data GoogleLongrunningListOperationsResponse = GoogleLongrunningListOperationsResponse'
{ _gllorNextPageToken :: !(Maybe Text)
, _gllorOperations :: !(Maybe [GoogleLongrunningOperation])
} deriving (Eq,Show,Data,Typeable,Generic)
googleLongrunningListOperationsResponse
:: GoogleLongrunningListOperationsResponse
googleLongrunningListOperationsResponse =
GoogleLongrunningListOperationsResponse'
{ _gllorNextPageToken = Nothing
, _gllorOperations = Nothing
}
gllorNextPageToken :: Lens' GoogleLongrunningListOperationsResponse (Maybe Text)
gllorNextPageToken
= lens _gllorNextPageToken
(\ s a -> s{_gllorNextPageToken = a})
gllorOperations :: Lens' GoogleLongrunningListOperationsResponse [GoogleLongrunningOperation]
gllorOperations
= lens _gllorOperations
(\ s a -> s{_gllorOperations = a})
. _Default
. _Coerce
instance FromJSON
GoogleLongrunningListOperationsResponse where
parseJSON
= withObject
"GoogleLongrunningListOperationsResponse"
(\ o ->
GoogleLongrunningListOperationsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "operations" .!= mempty))
instance ToJSON
GoogleLongrunningListOperationsResponse where
toJSON GoogleLongrunningListOperationsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _gllorNextPageToken,
("operations" .=) <$> _gllorOperations])
data GoogleDatastoreAdminV1ImportEntitiesMetadata = GoogleDatastoreAdminV1ImportEntitiesMetadata'
{ _gProgressBytes :: !(Maybe GoogleDatastoreAdminV1Progress)
, _gProgressEntities :: !(Maybe GoogleDatastoreAdminV1Progress)
, _gEntityFilter :: !(Maybe GoogleDatastoreAdminV1EntityFilter)
, _gInputURL :: !(Maybe Text)
, _gCommon :: !(Maybe GoogleDatastoreAdminV1CommonMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1ImportEntitiesMetadata
:: GoogleDatastoreAdminV1ImportEntitiesMetadata
googleDatastoreAdminV1ImportEntitiesMetadata =
GoogleDatastoreAdminV1ImportEntitiesMetadata'
{ _gProgressBytes = Nothing
, _gProgressEntities = Nothing
, _gEntityFilter = Nothing
, _gInputURL = Nothing
, _gCommon = Nothing
}
gProgressBytes :: Lens' GoogleDatastoreAdminV1ImportEntitiesMetadata (Maybe GoogleDatastoreAdminV1Progress)
gProgressBytes
= lens _gProgressBytes
(\ s a -> s{_gProgressBytes = a})
gProgressEntities :: Lens' GoogleDatastoreAdminV1ImportEntitiesMetadata (Maybe GoogleDatastoreAdminV1Progress)
gProgressEntities
= lens _gProgressEntities
(\ s a -> s{_gProgressEntities = a})
gEntityFilter :: Lens' GoogleDatastoreAdminV1ImportEntitiesMetadata (Maybe GoogleDatastoreAdminV1EntityFilter)
gEntityFilter
= lens _gEntityFilter
(\ s a -> s{_gEntityFilter = a})
gInputURL :: Lens' GoogleDatastoreAdminV1ImportEntitiesMetadata (Maybe Text)
gInputURL
= lens _gInputURL (\ s a -> s{_gInputURL = a})
gCommon :: Lens' GoogleDatastoreAdminV1ImportEntitiesMetadata (Maybe GoogleDatastoreAdminV1CommonMetadata)
gCommon = lens _gCommon (\ s a -> s{_gCommon = a})
instance FromJSON
GoogleDatastoreAdminV1ImportEntitiesMetadata where
parseJSON
= withObject
"GoogleDatastoreAdminV1ImportEntitiesMetadata"
(\ o ->
GoogleDatastoreAdminV1ImportEntitiesMetadata' <$>
(o .:? "progressBytes") <*>
(o .:? "progressEntities")
<*> (o .:? "entityFilter")
<*> (o .:? "inputUrl")
<*> (o .:? "common"))
instance ToJSON
GoogleDatastoreAdminV1ImportEntitiesMetadata where
toJSON
GoogleDatastoreAdminV1ImportEntitiesMetadata'{..}
= object
(catMaybes
[("progressBytes" .=) <$> _gProgressBytes,
("progressEntities" .=) <$> _gProgressEntities,
("entityFilter" .=) <$> _gEntityFilter,
("inputUrl" .=) <$> _gInputURL,
("common" .=) <$> _gCommon])
data GoogleDatastoreAdminV1Progress = GoogleDatastoreAdminV1Progress'
{ _gWorkCompleted :: !(Maybe (Textual Int64))
, _gWorkEstimated :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1Progress
:: GoogleDatastoreAdminV1Progress
googleDatastoreAdminV1Progress =
GoogleDatastoreAdminV1Progress'
{ _gWorkCompleted = Nothing
, _gWorkEstimated = Nothing
}
gWorkCompleted :: Lens' GoogleDatastoreAdminV1Progress (Maybe Int64)
gWorkCompleted
= lens _gWorkCompleted
(\ s a -> s{_gWorkCompleted = a})
. mapping _Coerce
gWorkEstimated :: Lens' GoogleDatastoreAdminV1Progress (Maybe Int64)
gWorkEstimated
= lens _gWorkEstimated
(\ s a -> s{_gWorkEstimated = a})
. mapping _Coerce
instance FromJSON GoogleDatastoreAdminV1Progress
where
parseJSON
= withObject "GoogleDatastoreAdminV1Progress"
(\ o ->
GoogleDatastoreAdminV1Progress' <$>
(o .:? "workCompleted") <*> (o .:? "workEstimated"))
instance ToJSON GoogleDatastoreAdminV1Progress where
toJSON GoogleDatastoreAdminV1Progress'{..}
= object
(catMaybes
[("workCompleted" .=) <$> _gWorkCompleted,
("workEstimated" .=) <$> _gWorkEstimated])
data PathElement = PathElement'
{ _peKind :: !(Maybe Text)
, _peName :: !(Maybe Text)
, _peId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
pathElement
:: PathElement
pathElement =
PathElement'
{ _peKind = Nothing
, _peName = Nothing
, _peId = Nothing
}
peKind :: Lens' PathElement (Maybe Text)
peKind = lens _peKind (\ s a -> s{_peKind = a})
peName :: Lens' PathElement (Maybe Text)
peName = lens _peName (\ s a -> s{_peName = a})
peId :: Lens' PathElement (Maybe Int64)
peId
= lens _peId (\ s a -> s{_peId = a}) .
mapping _Coerce
instance FromJSON PathElement where
parseJSON
= withObject "PathElement"
(\ o ->
PathElement' <$>
(o .:? "kind") <*> (o .:? "name") <*> (o .:? "id"))
instance ToJSON PathElement where
toJSON PathElement'{..}
= object
(catMaybes
[("kind" .=) <$> _peKind, ("name" .=) <$> _peName,
("id" .=) <$> _peId])
data Entity = Entity'
{ _eKey :: !(Maybe Key)
, _eProperties :: !(Maybe EntityProperties)
} deriving (Eq,Show,Data,Typeable,Generic)
entity
:: Entity
entity =
Entity'
{ _eKey = Nothing
, _eProperties = Nothing
}
eKey :: Lens' Entity (Maybe Key)
eKey = lens _eKey (\ s a -> s{_eKey = a})
eProperties :: Lens' Entity (Maybe EntityProperties)
eProperties
= lens _eProperties (\ s a -> s{_eProperties = a})
instance FromJSON Entity where
parseJSON
= withObject "Entity"
(\ o ->
Entity' <$> (o .:? "key") <*> (o .:? "properties"))
instance ToJSON Entity where
toJSON Entity'{..}
= object
(catMaybes
[("key" .=) <$> _eKey,
("properties" .=) <$> _eProperties])
data GoogleDatastoreAdminV1beta1EntityFilter = GoogleDatastoreAdminV1beta1EntityFilter'
{ _gNamespaceIds :: !(Maybe [Text])
, _gKinds :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1beta1EntityFilter
:: GoogleDatastoreAdminV1beta1EntityFilter
googleDatastoreAdminV1beta1EntityFilter =
GoogleDatastoreAdminV1beta1EntityFilter'
{ _gNamespaceIds = Nothing
, _gKinds = Nothing
}
gNamespaceIds :: Lens' GoogleDatastoreAdminV1beta1EntityFilter [Text]
gNamespaceIds
= lens _gNamespaceIds
(\ s a -> s{_gNamespaceIds = a})
. _Default
. _Coerce
gKinds :: Lens' GoogleDatastoreAdminV1beta1EntityFilter [Text]
gKinds
= lens _gKinds (\ s a -> s{_gKinds = a}) . _Default .
_Coerce
instance FromJSON
GoogleDatastoreAdminV1beta1EntityFilter where
parseJSON
= withObject
"GoogleDatastoreAdminV1beta1EntityFilter"
(\ o ->
GoogleDatastoreAdminV1beta1EntityFilter' <$>
(o .:? "namespaceIds" .!= mempty) <*>
(o .:? "kinds" .!= mempty))
instance ToJSON
GoogleDatastoreAdminV1beta1EntityFilter where
toJSON GoogleDatastoreAdminV1beta1EntityFilter'{..}
= object
(catMaybes
[("namespaceIds" .=) <$> _gNamespaceIds,
("kinds" .=) <$> _gKinds])
data ReadOnly =
ReadOnly'
deriving (Eq,Show,Data,Typeable,Generic)
readOnly
:: ReadOnly
readOnly = ReadOnly'
instance FromJSON ReadOnly where
parseJSON
= withObject "ReadOnly" (\ o -> pure ReadOnly')
instance ToJSON ReadOnly where
toJSON = const emptyObject
data GoogleDatastoreAdminV1IndexedProperty = GoogleDatastoreAdminV1IndexedProperty'
{ _gdavipDirection :: !(Maybe GoogleDatastoreAdminV1IndexedPropertyDirection)
, _gdavipName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
googleDatastoreAdminV1IndexedProperty
:: GoogleDatastoreAdminV1IndexedProperty
googleDatastoreAdminV1IndexedProperty =
GoogleDatastoreAdminV1IndexedProperty'
{ _gdavipDirection = Nothing
, _gdavipName = Nothing
}
gdavipDirection :: Lens' GoogleDatastoreAdminV1IndexedProperty (Maybe GoogleDatastoreAdminV1IndexedPropertyDirection)
gdavipDirection
= lens _gdavipDirection
(\ s a -> s{_gdavipDirection = a})
gdavipName :: Lens' GoogleDatastoreAdminV1IndexedProperty (Maybe Text)
gdavipName
= lens _gdavipName (\ s a -> s{_gdavipName = a})
instance FromJSON
GoogleDatastoreAdminV1IndexedProperty where
parseJSON
= withObject "GoogleDatastoreAdminV1IndexedProperty"
(\ o ->
GoogleDatastoreAdminV1IndexedProperty' <$>
(o .:? "direction") <*> (o .:? "name"))
instance ToJSON GoogleDatastoreAdminV1IndexedProperty
where
toJSON GoogleDatastoreAdminV1IndexedProperty'{..}
= object
(catMaybes
[("direction" .=) <$> _gdavipDirection,
("name" .=) <$> _gdavipName])
data LookupResponse = LookupResponse'
{ _lrDeferred :: !(Maybe [Key])
, _lrFound :: !(Maybe [EntityResult])
, _lrMissing :: !(Maybe [EntityResult])
} deriving (Eq,Show,Data,Typeable,Generic)
lookupResponse
:: LookupResponse
lookupResponse =
LookupResponse'
{ _lrDeferred = Nothing
, _lrFound = Nothing
, _lrMissing = Nothing
}
lrDeferred :: Lens' LookupResponse [Key]
lrDeferred
= lens _lrDeferred (\ s a -> s{_lrDeferred = a}) .
_Default
. _Coerce
lrFound :: Lens' LookupResponse [EntityResult]
lrFound
= lens _lrFound (\ s a -> s{_lrFound = a}) . _Default
. _Coerce
lrMissing :: Lens' LookupResponse [EntityResult]
lrMissing
= lens _lrMissing (\ s a -> s{_lrMissing = a}) .
_Default
. _Coerce
instance FromJSON LookupResponse where
parseJSON
= withObject "LookupResponse"
(\ o ->
LookupResponse' <$>
(o .:? "deferred" .!= mempty) <*>
(o .:? "found" .!= mempty)
<*> (o .:? "missing" .!= mempty))
instance ToJSON LookupResponse where
toJSON LookupResponse'{..}
= object
(catMaybes
[("deferred" .=) <$> _lrDeferred,
("found" .=) <$> _lrFound,
("missing" .=) <$> _lrMissing])
data GoogleLongrunningOperation = GoogleLongrunningOperation'
{ _gloDone :: !(Maybe Bool)
, _gloError :: !(Maybe Status)
, _gloResponse :: !(Maybe GoogleLongrunningOperationResponse)
, _gloName :: !(Maybe Text)
, _gloMetadata :: !(Maybe GoogleLongrunningOperationMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
googleLongrunningOperation
:: GoogleLongrunningOperation
googleLongrunningOperation =
GoogleLongrunningOperation'
{ _gloDone = Nothing
, _gloError = Nothing
, _gloResponse = Nothing
, _gloName = Nothing
, _gloMetadata = Nothing
}
gloDone :: Lens' GoogleLongrunningOperation (Maybe Bool)
gloDone = lens _gloDone (\ s a -> s{_gloDone = a})
gloError :: Lens' GoogleLongrunningOperation (Maybe Status)
gloError = lens _gloError (\ s a -> s{_gloError = a})
gloResponse :: Lens' GoogleLongrunningOperation (Maybe GoogleLongrunningOperationResponse)
gloResponse
= lens _gloResponse (\ s a -> s{_gloResponse = a})
gloName :: Lens' GoogleLongrunningOperation (Maybe Text)
gloName = lens _gloName (\ s a -> s{_gloName = a})
gloMetadata :: Lens' GoogleLongrunningOperation (Maybe GoogleLongrunningOperationMetadata)
gloMetadata
= lens _gloMetadata (\ s a -> s{_gloMetadata = a})
instance FromJSON GoogleLongrunningOperation where
parseJSON
= withObject "GoogleLongrunningOperation"
(\ o ->
GoogleLongrunningOperation' <$>
(o .:? "done") <*> (o .:? "error") <*>
(o .:? "response")
<*> (o .:? "name")
<*> (o .:? "metadata"))
instance ToJSON GoogleLongrunningOperation where
toJSON GoogleLongrunningOperation'{..}
= object
(catMaybes
[("done" .=) <$> _gloDone,
("error" .=) <$> _gloError,
("response" .=) <$> _gloResponse,
("name" .=) <$> _gloName,
("metadata" .=) <$> _gloMetadata])
data PropertyOrder = PropertyOrder'
{ _poProperty :: !(Maybe PropertyReference)
, _poDirection :: !(Maybe PropertyOrderDirection)
} deriving (Eq,Show,Data,Typeable,Generic)
propertyOrder
:: PropertyOrder
propertyOrder =
PropertyOrder'
{ _poProperty = Nothing
, _poDirection = Nothing
}
poProperty :: Lens' PropertyOrder (Maybe PropertyReference)
poProperty
= lens _poProperty (\ s a -> s{_poProperty = a})
poDirection :: Lens' PropertyOrder (Maybe PropertyOrderDirection)
poDirection
= lens _poDirection (\ s