-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Google Cloud Datastore SDK.
--   
--   Accesses the schemaless NoSQL database to provide fully managed,
--   robust, scalable storage for your application.
--   
--   <i>Warning:</i> This is an experimental prototype/preview release
--   which is still under exploratory development and not intended for
--   public use, caveat emptor!
--   
--   This library is compatible with version <tt>v1</tt> of the API.
@package gogol-datastore
@version 0.3.0


module Network.Google.Datastore.Types

-- | Default request referring to version <tt>v1</tt> of the Google Cloud
--   Datastore API. This contains the host and root path used as a starting
--   point for constructing service requests.
datastoreService :: ServiceConfig

-- | View and manage your data across Google Cloud Platform services
cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]

-- | View and manage your Google Cloud Datastore data
datastoreScope :: Proxy '["https://www.googleapis.com/auth/datastore"]

-- | An object representing a latitude/longitude pair. This is expressed as
--   a pair of doubles representing degrees latitude and degrees longitude.
--   Unless specified otherwise, this must conform to the <a>WGS84
--   standard</a>. Values must be within normalized ranges. Example of
--   normalization code in Python: def NormalizeLongitude(longitude):
--   """Wraps decimal degrees longitude to [-180.0, 180.0].""" q, r =
--   divmod(longitude, 360.0) if r &gt; 180.0 or (r == 180.0 and q &lt;=
--   -1.0): return r - 360.0 return r def NormalizeLatLng(latitude,
--   longitude): """Wraps decimal degrees latitude and longitude to [-90.0,
--   90.0] and [-180.0, 180.0], respectively.""" r = latitude % 360.0 if r
--   &lt;= 90.0: return r, NormalizeLongitude(longitude) elif r &gt;=
--   270.0: return r - 360, NormalizeLongitude(longitude) else: return 180
--   - r, NormalizeLongitude(longitude + 180.0) assert 180.0 ==
--   NormalizeLongitude(180.0) assert -180.0 == NormalizeLongitude(-180.0)
--   assert -179.0 == NormalizeLongitude(181.0) assert (0.0, 0.0) ==
--   NormalizeLatLng(360.0, 0.0) assert (0.0, 0.0) ==
--   NormalizeLatLng(-360.0, 0.0) assert (85.0, 180.0) ==
--   NormalizeLatLng(95.0, 0.0) assert (-85.0, -170.0) ==
--   NormalizeLatLng(-95.0, 10.0) assert (90.0, 10.0) ==
--   NormalizeLatLng(90.0, 10.0) assert (-90.0, -10.0) ==
--   NormalizeLatLng(-90.0, -10.0) assert (0.0, -170.0) ==
--   NormalizeLatLng(-180.0, 10.0) assert (0.0, -170.0) ==
--   NormalizeLatLng(180.0, 10.0) assert (-90.0, 10.0) ==
--   NormalizeLatLng(270.0, 10.0) assert (90.0, 10.0) ==
--   NormalizeLatLng(-270.0, 10.0) The code in
--   logs/storage/validator/logs_validator_traits.cc treats this type as if
--   it were annotated as ST_LOCATION.
--   
--   <i>See:</i> <a>latLng</a> smart constructor.
data LatLng

-- | Creates a value of <a>LatLng</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>llLatitude</a></li>
--   <li><a>llLongitude</a></li>
--   </ul>
latLng :: LatLng

-- | The latitude in degrees. It must be in the range [-90.0, +90.0].
llLatitude :: Lens' LatLng (Maybe Double)

-- | The longitude in degrees. It must be in the range [-180.0, +180.0].
llLongitude :: Lens' LatLng (Maybe Double)

-- | The direction to order by. Defaults to `ASCENDING`.
data PropertyOrderDirection

-- | <tt>DIRECTION_UNSPECIFIED</tt> Unspecified. This value must not be
--   used.
DirectionUnspecified :: PropertyOrderDirection

-- | <tt>ASCENDING</tt> Ascending.
Ascending :: PropertyOrderDirection

-- | <tt>DESCENDING</tt> Descending.
Descending :: PropertyOrderDirection

-- | The request for Datastore.Rollback.
--   
--   <i>See:</i> <a>rollbackRequest</a> smart constructor.
data RollbackRequest

-- | Creates a value of <a>RollbackRequest</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rrTransaction</a></li>
--   </ul>
rollbackRequest :: RollbackRequest

-- | The transaction identifier, returned by a call to
--   Datastore.BeginTransaction.
rrTransaction :: Lens' RollbackRequest (Maybe ByteString)

-- | A partition ID identifies a grouping of entities. The grouping is
--   always by project and namespace, however the namespace ID may be
--   empty. A partition ID contains several dimensions: project ID and
--   namespace ID. Partition dimensions: - May be `""`. - Must be valid
--   UTF-8 bytes. - Must have values that match regex
--   `[A-Za-z\d\.\-_]{1,100}` If the value of any dimension matches regex
--   `<b>.*</b>`, the partition is reserved/read-only. A reserved/read-only
--   partition ID is forbidden in certain documented contexts. Foreign
--   partition IDs (in which the project ID does not match the context
--   project ID ) are discouraged. Reads and writes of foreign partition
--   IDs may fail if the project is not in an active state.
--   
--   <i>See:</i> <a>partitionId</a> smart constructor.
data PartitionId

-- | Creates a value of <a>PartitionId</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>piNamespaceId</a></li>
--   <li><a>piProjectId</a></li>
--   </ul>
partitionId :: PartitionId

-- | If not empty, the ID of the namespace to which the entities belong.
piNamespaceId :: Lens' PartitionId (Maybe Text)

-- | The ID of the project to which the entities belong.
piProjectId :: Lens' PartitionId (Maybe Text)

-- | A batch of results produced by a query.
--   
--   <i>See:</i> <a>queryResultBatch</a> smart constructor.
data QueryResultBatch

-- | Creates a value of <a>QueryResultBatch</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>qrbSkippedResults</a></li>
--   <li><a>qrbSkippedCursor</a></li>
--   <li><a>qrbEntityResultType</a></li>
--   <li><a>qrbSnapshotVersion</a></li>
--   <li><a>qrbEntityResults</a></li>
--   <li><a>qrbMoreResults</a></li>
--   <li><a>qrbEndCursor</a></li>
--   </ul>
queryResultBatch :: QueryResultBatch

-- | The number of results skipped, typically because of an offset.
qrbSkippedResults :: Lens' QueryResultBatch (Maybe Int32)

-- | A cursor that points to the position after the last skipped result.
--   Will be set when `skipped_results` != 0.
qrbSkippedCursor :: Lens' QueryResultBatch (Maybe ByteString)

-- | The result type for every entity in `entity_results`.
qrbEntityResultType :: Lens' QueryResultBatch (Maybe QueryResultBatchEntityResultType)

-- | The version number of the snapshot this batch was returned from. This
--   applies to the range of results from the query's `start_cursor` (or
--   the beginning of the query if no cursor was given) to this batch's
--   `end_cursor` (not the query's `end_cursor`). In a single transaction,
--   subsequent query result batches for the same query can have a greater
--   snapshot version number. Each batch's snapshot version is valid for
--   all preceding batches. The value will be zero for eventually
--   consistent queries.
qrbSnapshotVersion :: Lens' QueryResultBatch (Maybe Int64)

-- | The results for this batch.
qrbEntityResults :: Lens' QueryResultBatch [EntityResult]

-- | The state of the query after the current batch.
qrbMoreResults :: Lens' QueryResultBatch (Maybe QueryResultBatchMoreResults)

-- | A cursor that points to the position after the last result in the
--   batch.
qrbEndCursor :: Lens' QueryResultBatch (Maybe ByteString)

-- | The operator for combining multiple filters.
data CompositeFilterOp

-- | <tt>OPERATOR_UNSPECIFIED</tt> Unspecified. This value must not be
--   used.
OperatorUnspecified :: CompositeFilterOp

-- | <tt>AND</tt> The results are required to satisfy each of the combined
--   filters.
And :: CompositeFilterOp

-- | The entity's properties. The map's keys are property names. A property
--   name matching regex `<b>.*</b>` is reserved. A reserved property name
--   is forbidden in certain documented contexts. The name must not contain
--   more than 500 characters. The name cannot be `""`.
--   
--   <i>See:</i> <a>entityProperties</a> smart constructor.
data EntityProperties

-- | Creates a value of <a>EntityProperties</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>epAddtional</a></li>
--   </ul>
entityProperties :: HashMap Text Value -> EntityProperties
epAddtional :: Lens' EntityProperties (HashMap Text Value)

-- | The request for Datastore.BeginTransaction.
--   
--   <i>See:</i> <a>beginTransactionRequest</a> smart constructor.
data BeginTransactionRequest

-- | Creates a value of <a>BeginTransactionRequest</a> with the minimum
--   fields required to make a request.
beginTransactionRequest :: BeginTransactionRequest

-- | The request for Datastore.RunQuery.
--   
--   <i>See:</i> <a>runQueryRequest</a> smart constructor.
data RunQueryRequest

-- | Creates a value of <a>RunQueryRequest</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rqrPartitionId</a></li>
--   <li><a>rqrGqlQuery</a></li>
--   <li><a>rqrQuery</a></li>
--   <li><a>rqrReadOptions</a></li>
--   </ul>
runQueryRequest :: RunQueryRequest

-- | Entities are partitioned into subsets, identified by a partition ID.
--   Queries are scoped to a single partition. This partition ID is
--   normalized with the standard default context partition ID.
rqrPartitionId :: Lens' RunQueryRequest (Maybe PartitionId)

-- | The GQL query to run.
rqrGqlQuery :: Lens' RunQueryRequest (Maybe GqlQuery)

-- | The query to run.
rqrQuery :: Lens' RunQueryRequest (Maybe Query)

-- | The options for this query.
rqrReadOptions :: Lens' RunQueryRequest (Maybe ReadOptions)

-- | The request for Datastore.AllocateIds.
--   
--   <i>See:</i> <a>allocateIdsRequest</a> smart constructor.
data AllocateIdsRequest

-- | Creates a value of <a>AllocateIdsRequest</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>airKeys</a></li>
--   </ul>
allocateIdsRequest :: AllocateIdsRequest

-- | A list of keys with incomplete key paths for which to allocate IDs. No
--   key may be reserved/read-only.
airKeys :: Lens' AllocateIdsRequest [Key]

-- | The result type for every entity in `entity_results`.
data QueryResultBatchEntityResultType

-- | <tt>RESULT_TYPE_UNSPECIFIED</tt> Unspecified. This value is never
--   used.
QRBERTResultTypeUnspecified :: QueryResultBatchEntityResultType

-- | <tt>FULL</tt> The key and properties.
QRBERTFull :: QueryResultBatchEntityResultType

-- | <tt>PROJECTION</tt> A projected subset of properties. The entity may
--   have no key.
QRBERTProjection :: QueryResultBatchEntityResultType

-- | <tt>KEY_ONLY</tt> Only the key.
QRBERTKeyOnly :: QueryResultBatchEntityResultType

-- | A filter that merges multiple other filters using the given operator.
--   
--   <i>See:</i> <a>compositeFilter</a> smart constructor.
data CompositeFilter

-- | Creates a value of <a>CompositeFilter</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>cfOp</a></li>
--   <li><a>cfFilters</a></li>
--   </ul>
compositeFilter :: CompositeFilter

-- | The operator for combining multiple filters.
cfOp :: Lens' CompositeFilter (Maybe CompositeFilterOp)

-- | The list of filters to combine. Must contain at least one filter.
cfFilters :: Lens' CompositeFilter [Filter]

-- | The state of the query after the current batch.
data QueryResultBatchMoreResults

-- | <tt>MORE_RESULTS_TYPE_UNSPECIFIED</tt> Unspecified. This value is
--   never used.
MoreResultsTypeUnspecified :: QueryResultBatchMoreResults

-- | <tt>NOT_FINISHED</tt> There may be additional batches to fetch from
--   this query.
NotFinished :: QueryResultBatchMoreResults

-- | <tt>MORE_RESULTS_AFTER_LIMIT</tt> The query is finished, but there may
--   be more results after the limit.
MoreResultsAfterLimit :: QueryResultBatchMoreResults

-- | <tt>MORE_RESULTS_AFTER_CURSOR</tt> The query is finished, but there
--   may be more results after the end cursor.
MoreResultsAfterCursor :: QueryResultBatchMoreResults

-- | <tt>NO_MORE_RESULTS</tt> The query has been exhausted.
NoMoreResults :: QueryResultBatchMoreResults

-- | The response for Datastore.BeginTransaction.
--   
--   <i>See:</i> <a>beginTransactionResponse</a> smart constructor.
data BeginTransactionResponse

-- | Creates a value of <a>BeginTransactionResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>btrTransaction</a></li>
--   </ul>
beginTransactionResponse :: BeginTransactionResponse

-- | The transaction identifier (always present).
btrTransaction :: Lens' BeginTransactionResponse (Maybe ByteString)

-- | The result of applying a mutation.
--   
--   <i>See:</i> <a>mutationResult</a> smart constructor.
data MutationResult

-- | Creates a value of <a>MutationResult</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>mrConflictDetected</a></li>
--   <li><a>mrKey</a></li>
--   <li><a>mrVersion</a></li>
--   </ul>
mutationResult :: MutationResult

-- | Whether a conflict was detected for this mutation. Always false when a
--   conflict detection strategy field is not set in the mutation.
mrConflictDetected :: Lens' MutationResult (Maybe Bool)

-- | The automatically allocated key. Set only when the mutation allocated
--   a key.
mrKey :: Lens' MutationResult (Maybe Key)

-- | The version of the entity on the server after processing the mutation.
--   If the mutation doesn't change anything on the server, then the
--   version will be the version of the current entity or, if no entity is
--   present, a version that is strictly greater than the version of any
--   previous entity and less than the version of any possible future
--   entity.
mrVersion :: Lens' MutationResult (Maybe Int64)

-- | The response for Datastore.AllocateIds.
--   
--   <i>See:</i> <a>allocateIdsResponse</a> smart constructor.
data AllocateIdsResponse

-- | Creates a value of <a>AllocateIdsResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aKeys</a></li>
--   </ul>
allocateIdsResponse :: AllocateIdsResponse

-- | The keys specified in the request (in the same order), each with its
--   key path completed with a newly allocated ID.
aKeys :: Lens' AllocateIdsResponse [Key]

-- | A <a>GQL query</a>.
--   
--   <i>See:</i> <a>gqlQuery</a> smart constructor.
data GqlQuery

-- | Creates a value of <a>GqlQuery</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gqPositionalBindings</a></li>
--   <li><a>gqNamedBindings</a></li>
--   <li><a>gqQueryString</a></li>
--   <li><a>gqAllowLiterals</a></li>
--   </ul>
gqlQuery :: GqlQuery

-- | Numbered binding site '1 references the first numbered parameter,
--   effectively using 1-based indexing, rather than the usual 0. For each
--   binding site numbered i in `query_string`, there must be an i-th
--   numbered parameter. The inverse must also be true.
gqPositionalBindings :: Lens' GqlQuery [GqlQueryParameter]

-- | For each non-reserved named binding site in the query string, there
--   must be a named parameter with that name, but not necessarily the
--   inverse. Key must match regex `A-Za-z_$*`, must not match regex
--   `<b>.*</b>`, and must not be `""`.
gqNamedBindings :: Lens' GqlQuery (Maybe GqlQueryNamedBindings)

-- | A string of the format described <a>here</a>.
gqQueryString :: Lens' GqlQuery (Maybe Text)

-- | When false, the query string must not contain any literals and instead
--   must bind all values. For example, `SELECT * FROM Kind WHERE a =
--   'string literal'` is not allowed, while `SELECT * FROM Kind WHERE a =
--   'value` is.
gqAllowLiterals :: Lens' GqlQuery (Maybe Bool)

-- | The response for Datastore.RunQuery.
--   
--   <i>See:</i> <a>runQueryResponse</a> smart constructor.
data RunQueryResponse

-- | Creates a value of <a>RunQueryResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rBatch</a></li>
--   <li><a>rQuery</a></li>
--   </ul>
runQueryResponse :: RunQueryResponse

-- | A batch of query results (always present).
rBatch :: Lens' RunQueryResponse (Maybe QueryResultBatch)

-- | The parsed form of the `GqlQuery` from the request, if it was set.
rQuery :: Lens' RunQueryResponse (Maybe Query)

-- | A message that can hold any of the supported value types and
--   associated metadata.
--   
--   <i>See:</i> <a>value</a> smart constructor.
data Value

-- | Creates a value of <a>Value</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>vKeyValue</a></li>
--   <li><a>vGeoPointValue</a></li>
--   <li><a>vIntegerValue</a></li>
--   <li><a>vTimestampValue</a></li>
--   <li><a>vEntityValue</a></li>
--   <li><a>vExcludeFromIndexes</a></li>
--   <li><a>vDoubleValue</a></li>
--   <li><a>vStringValue</a></li>
--   <li><a>vBooleanValue</a></li>
--   <li><a>vMeaning</a></li>
--   <li><a>vArrayValue</a></li>
--   <li><a>vNullValue</a></li>
--   <li><a>vBlobValue</a></li>
--   </ul>
value :: Value

-- | A key value.
vKeyValue :: Lens' Value (Maybe Key)

-- | A geo point value representing a point on the surface of Earth.
vGeoPointValue :: Lens' Value (Maybe LatLng)

-- | An integer value.
vIntegerValue :: Lens' Value (Maybe Int64)

-- | A timestamp value. When stored in the Datastore, precise only to
--   microseconds; any additional precision is rounded down.
vTimestampValue :: Lens' Value (Maybe UTCTime)

-- | An entity value. - May have no key. - May have a key with an
--   incomplete key path. - May have a reserved/read-only key.
vEntityValue :: Lens' Value (Maybe Entity)

-- | If the value should be excluded from all indexes including those
--   defined explicitly.
vExcludeFromIndexes :: Lens' Value (Maybe Bool)

-- | A double value.
vDoubleValue :: Lens' Value (Maybe Double)

-- | A UTF-8 encoded string value. When `exclude_from_indexes` is false (it
--   is indexed) , may have at most 1500 bytes. Otherwise, may be set to at
--   least 1,000,000 bytes.
vStringValue :: Lens' Value (Maybe Text)

-- | A boolean value.
vBooleanValue :: Lens' Value (Maybe Bool)

-- | The `meaning` field should only be populated for backwards
--   compatibility.
vMeaning :: Lens' Value (Maybe Int32)

-- | An array value. Cannot contain another array value. A `Value` instance
--   that sets field `array_value` must not set fields `meaning` or
--   `exclude_from_indexes`.
vArrayValue :: Lens' Value (Maybe ArrayValue)

-- | A null value.
vNullValue :: Lens' Value (Maybe ValueNullValue)

-- | A blob value. May have at most 1,000,000 bytes. When
--   `exclude_from_indexes` is false, may have at most 1500 bytes. In JSON
--   requests, must be base64-encoded.
vBlobValue :: Lens' Value (Maybe ByteString)

-- | A null value.
data ValueNullValue

-- | <tt>NULL_VALUE</tt> Null value.
NullValue :: ValueNullValue

-- | The request for Datastore.Lookup.
--   
--   <i>See:</i> <a>lookupRequest</a> smart constructor.
data LookupRequest

-- | Creates a value of <a>LookupRequest</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lrKeys</a></li>
--   <li><a>lrReadOptions</a></li>
--   </ul>
lookupRequest :: LookupRequest

-- | Keys of entities to look up.
lrKeys :: Lens' LookupRequest [Key]

-- | The options for this lookup request.
lrReadOptions :: Lens' LookupRequest (Maybe ReadOptions)

-- | The non-transactional read consistency to use. Cannot be set to
--   `STRONG` for global queries.
data ReadOptionsReadConsistency

-- | <tt>READ_CONSISTENCY_UNSPECIFIED</tt> Unspecified. This value must not
--   be used.
ReadConsistencyUnspecified :: ReadOptionsReadConsistency

-- | <tt>STRONG</tt> Strong consistency.
Strong :: ReadOptionsReadConsistency

-- | <tt>EVENTUAL</tt> Eventual consistency.
Eventual :: ReadOptionsReadConsistency

-- | A mutation to apply to an entity.
--   
--   <i>See:</i> <a>mutation</a> smart constructor.
data Mutation

-- | Creates a value of <a>Mutation</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>mBaseVersion</a></li>
--   <li><a>mInsert</a></li>
--   <li><a>mUpsert</a></li>
--   <li><a>mDelete</a></li>
--   <li><a>mUpdate</a></li>
--   </ul>
mutation :: Mutation

-- | The version of the entity that this mutation is being applied to. If
--   this does not match the current version on the server, the mutation
--   conflicts.
mBaseVersion :: Lens' Mutation (Maybe Int64)

-- | The entity to insert. The entity must not already exist. The entity
--   key's final path element may be incomplete.
mInsert :: Lens' Mutation (Maybe Entity)

-- | The entity to upsert. The entity may or may not already exist. The
--   entity key's final path element may be incomplete.
mUpsert :: Lens' Mutation (Maybe Entity)

-- | The key of the entity to delete. The entity may or may not already
--   exist. Must have a complete key path and must not be
--   reserved/read-only.
mDelete :: Lens' Mutation (Maybe Key)

-- | The entity to update. The entity must already exist. Must have a
--   complete key path.
mUpdate :: Lens' Mutation (Maybe Entity)

-- | For each non-reserved named binding site in the query string, there
--   must be a named parameter with that name, but not necessarily the
--   inverse. Key must match regex `A-Za-z_$*`, must not match regex
--   `<b>.*</b>`, and must not be `""`.
--   
--   <i>See:</i> <a>gqlQueryNamedBindings</a> smart constructor.
data GqlQueryNamedBindings

-- | Creates a value of <a>GqlQueryNamedBindings</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gqnbAddtional</a></li>
--   </ul>
gqlQueryNamedBindings :: HashMap Text GqlQueryParameter -> GqlQueryNamedBindings
gqnbAddtional :: Lens' GqlQueryNamedBindings (HashMap Text GqlQueryParameter)

-- | A reference to a property relative to the kind expressions.
--   
--   <i>See:</i> <a>propertyReference</a> smart constructor.
data PropertyReference

-- | Creates a value of <a>PropertyReference</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>prName</a></li>
--   </ul>
propertyReference :: PropertyReference

-- | The name of the property. If name includes "."s, it may be interpreted
--   as a property name path.
prName :: Lens' PropertyReference (Maybe Text)

-- | A unique identifier for an entity. If a key's partition ID or any of
--   its path kinds or names are reserved/read-only, the key is
--   reserved/read-only. A reserved/read-only key is forbidden in certain
--   documented contexts.
--   
--   <i>See:</i> <a>key</a> smart constructor.
data Key

-- | Creates a value of <a>Key</a> with the minimum fields required to make
--   a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>kPartitionId</a></li>
--   <li><a>kPath</a></li>
--   </ul>
key :: Key

-- | Entities are partitioned into subsets, currently identified by a
--   project ID and namespace ID. Queries are scoped to a single partition.
kPartitionId :: Lens' Key (Maybe PartitionId)

-- | The entity path. An entity path consists of one or more elements
--   composed of a kind and a string or numerical identifier, which
--   identify entities. The first element identifies a _root entity_, the
--   second element identifies a _child_ of the root entity, the third
--   element identifies a child of the second entity, and so forth. The
--   entities identified by all prefixes of the path are called the
--   element's _ancestors_. An entity path is always fully complete: *all*
--   of the entity's ancestors are required to be in the path along with
--   the entity identifier itself. The only exception is that in some
--   documented cases, the identifier in the last path element (for the
--   entity) itself may be omitted. For example, the last path element of
--   the key of `Mutation.insert` may have no identifier. A path can never
--   be empty, and a path can have at most 100 elements.
kPath :: Lens' Key [PathElement]

-- | A filter on a specific property.
--   
--   <i>See:</i> <a>propertyFilter</a> smart constructor.
data PropertyFilter

-- | Creates a value of <a>PropertyFilter</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pfProperty</a></li>
--   <li><a>pfOp</a></li>
--   <li><a>pfValue</a></li>
--   </ul>
propertyFilter :: PropertyFilter

-- | The property to filter by.
pfProperty :: Lens' PropertyFilter (Maybe PropertyReference)

-- | The operator to filter by.
pfOp :: Lens' PropertyFilter (Maybe PropertyFilterOp)

-- | The value to compare the property to.
pfValue :: Lens' PropertyFilter (Maybe Value)

-- | A query for entities.
--   
--   <i>See:</i> <a>query</a> smart constructor.
data Query

-- | Creates a value of <a>Query</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>qStartCursor</a></li>
--   <li><a>qOffSet</a></li>
--   <li><a>qKind</a></li>
--   <li><a>qDistinctOn</a></li>
--   <li><a>qEndCursor</a></li>
--   <li><a>qLimit</a></li>
--   <li><a>qProjection</a></li>
--   <li><a>qFilter</a></li>
--   <li><a>qOrder</a></li>
--   </ul>
query :: Query

-- | A starting point for the query results. Query cursors are returned in
--   query result batches and <a>can only be used to continue the same
--   query</a>.
qStartCursor :: Lens' Query (Maybe ByteString)

-- | The number of results to skip. Applies before limit, but after all
--   other constraints. Optional. Must be &gt;= 0 if specified.
qOffSet :: Lens' Query (Maybe Int32)

-- | The kinds to query (if empty, returns entities of all kinds).
--   Currently at most 1 kind may be specified.
qKind :: Lens' Query [KindExpression]

-- | The properties to make distinct. The query results will contain the
--   first result for each distinct combination of values for the given
--   properties (if empty, all results are returned).
qDistinctOn :: Lens' Query [PropertyReference]

-- | An ending point for the query results. Query cursors are returned in
--   query result batches and <a>can only be used to limit the same
--   query</a>.
qEndCursor :: Lens' Query (Maybe ByteString)

-- | The maximum number of results to return. Applies after all other
--   constraints. Optional. Unspecified is interpreted as no limit. Must be
--   &gt;= 0 if specified.
qLimit :: Lens' Query (Maybe Int32)

-- | The projection to return. Defaults to returning all properties.
qProjection :: Lens' Query [Projection]

-- | The filter to apply.
qFilter :: Lens' Query (Maybe Filter)

-- | The order to apply to the query results (if empty, order is
--   unspecified).
qOrder :: Lens' Query [PropertyOrder]

-- | An array value.
--   
--   <i>See:</i> <a>arrayValue</a> smart constructor.
data ArrayValue

-- | Creates a value of <a>ArrayValue</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>avValues</a></li>
--   </ul>
arrayValue :: ArrayValue

-- | Values in the array. The order of this array may not be preserved if
--   it contains a mix of indexed and unindexed values.
avValues :: Lens' ArrayValue [Value]

-- | The result of fetching an entity from Datastore.
--   
--   <i>See:</i> <a>entityResult</a> smart constructor.
data EntityResult

-- | Creates a value of <a>EntityResult</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>erCursor</a></li>
--   <li><a>erVersion</a></li>
--   <li><a>erEntity</a></li>
--   </ul>
entityResult :: EntityResult

-- | A cursor that points to the position after the result entity. Set only
--   when the `EntityResult` is part of a `QueryResultBatch` message.
erCursor :: Lens' EntityResult (Maybe ByteString)

-- | The version of the entity, a strictly positive number that
--   monotonically increases with changes to the entity. This field is set
--   for `FULL` entity results. For missing entities in `LookupResponse`,
--   this is the version of the snapshot that was used to look up the
--   entity, and it is always set except for eventually consistent reads.
erVersion :: Lens' EntityResult (Maybe Int64)

-- | The resulting entity.
erEntity :: Lens' EntityResult (Maybe Entity)

-- | V1 error format.
data Xgafv

-- | <tt>1</tt> v1 error format
X1 :: Xgafv

-- | <tt>2</tt> v2 error format
X2 :: Xgafv

-- | The response for Datastore.Commit.
--   
--   <i>See:</i> <a>commitResponse</a> smart constructor.
data CommitResponse

-- | Creates a value of <a>CommitResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>crIndexUpdates</a></li>
--   <li><a>crMutationResults</a></li>
--   </ul>
commitResponse :: CommitResponse

-- | The number of index entries updated during the commit, or zero if none
--   were updated.
crIndexUpdates :: Lens' CommitResponse (Maybe Int32)

-- | The result of performing the mutations. The i-th mutation result
--   corresponds to the i-th mutation in the request.
crMutationResults :: Lens' CommitResponse [MutationResult]

-- | A representation of a kind.
--   
--   <i>See:</i> <a>kindExpression</a> smart constructor.
data KindExpression

-- | Creates a value of <a>KindExpression</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>keName</a></li>
--   </ul>
kindExpression :: KindExpression

-- | The name of the kind.
keName :: Lens' KindExpression (Maybe Text)

-- | The options shared by read requests.
--   
--   <i>See:</i> <a>readOptions</a> smart constructor.
data ReadOptions

-- | Creates a value of <a>ReadOptions</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>roReadConsistency</a></li>
--   <li><a>roTransaction</a></li>
--   </ul>
readOptions :: ReadOptions

-- | The non-transactional read consistency to use. Cannot be set to
--   `STRONG` for global queries.
roReadConsistency :: Lens' ReadOptions (Maybe ReadOptionsReadConsistency)

-- | The identifier of the transaction in which to read. A transaction
--   identifier is returned by a call to Datastore.BeginTransaction.
roTransaction :: Lens' ReadOptions (Maybe ByteString)

-- | The response for Datastore.Rollback. (an empty message).
--   
--   <i>See:</i> <a>rollbackResponse</a> smart constructor.
data RollbackResponse

-- | Creates a value of <a>RollbackResponse</a> with the minimum fields
--   required to make a request.
rollbackResponse :: RollbackResponse

-- | A representation of a property in a projection.
--   
--   <i>See:</i> <a>projection</a> smart constructor.
data Projection

-- | Creates a value of <a>Projection</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pProperty</a></li>
--   </ul>
projection :: Projection

-- | The property to project.
pProperty :: Lens' Projection (Maybe PropertyReference)

-- | A holder for any type of filter.
--   
--   <i>See:</i> <a>filter'</a> smart constructor.
data Filter

-- | Creates a value of <a>Filter</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>fCompositeFilter</a></li>
--   <li><a>fPropertyFilter</a></li>
--   </ul>
filter' :: Filter

-- | A composite filter.
fCompositeFilter :: Lens' Filter (Maybe CompositeFilter)

-- | A filter on a property.
fPropertyFilter :: Lens' Filter (Maybe PropertyFilter)

-- | The operator to filter by.
data PropertyFilterOp

-- | <tt>OPERATOR_UNSPECIFIED</tt> Unspecified. This value must not be
--   used.
PFOOperatorUnspecified :: PropertyFilterOp

-- | <tt>LESS_THAN</tt> Less than.
PFOLessThan :: PropertyFilterOp

-- | <tt>LESS_THAN_OR_EQUAL</tt> Less than or equal.
PFOLessThanOrEqual :: PropertyFilterOp

-- | <tt>GREATER_THAN</tt> Greater than.
PFOGreaterThan :: PropertyFilterOp

-- | <tt>GREATER_THAN_OR_EQUAL</tt> Greater than or equal.
PFOGreaterThanOrEqual :: PropertyFilterOp

-- | <tt>EQUAL</tt> Equal.
PFOEqual :: PropertyFilterOp

-- | <tt>HAS_ANCESTOR</tt> Has ancestor.
PFOHasAncestor :: PropertyFilterOp

-- | The request for Datastore.Commit.
--   
--   <i>See:</i> <a>commitRequest</a> smart constructor.
data CommitRequest

-- | Creates a value of <a>CommitRequest</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>crMutations</a></li>
--   <li><a>crMode</a></li>
--   <li><a>crTransaction</a></li>
--   </ul>
commitRequest :: CommitRequest

-- | The mutations to perform. When mode is `TRANSACTIONAL`, mutations
--   affecting a single entity are applied in order. The following
--   sequences of mutations affecting a single entity are not permitted in
--   a single `Commit` request: - `insert` followed by `insert` - `update`
--   followed by `insert` - `upsert` followed by `insert` - `delete`
--   followed by `update` When mode is `NON_TRANSACTIONAL`, no two
--   mutations may affect a single entity.
crMutations :: Lens' CommitRequest [Mutation]

-- | The type of commit to perform. Defaults to `TRANSACTIONAL`.
crMode :: Lens' CommitRequest (Maybe CommitRequestMode)

-- | The identifier of the transaction associated with the commit. A
--   transaction identifier is returned by a call to
--   Datastore.BeginTransaction.
crTransaction :: Lens' CommitRequest (Maybe ByteString)

-- | The type of commit to perform. Defaults to `TRANSACTIONAL`.
data CommitRequestMode

-- | <tt>MODE_UNSPECIFIED</tt> Unspecified. This value must not be used.
ModeUnspecified :: CommitRequestMode

-- | <tt>TRANSACTIONAL</tt> Transactional: The mutations are either all
--   applied, or none are applied. Learn about transactions <a>here</a>.
Transactional :: CommitRequestMode

-- | <tt>NON_TRANSACTIONAL</tt> Non-transactional: The mutations may not
--   apply as all or none.
NonTransactional :: CommitRequestMode

-- | A (kind, ID/name) pair used to construct a key path. If either name or
--   ID is set, the element is complete. If neither is set, the element is
--   incomplete.
--   
--   <i>See:</i> <a>pathElement</a> smart constructor.
data PathElement

-- | Creates a value of <a>PathElement</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>peKind</a></li>
--   <li><a>peName</a></li>
--   <li><a>peId</a></li>
--   </ul>
pathElement :: PathElement

-- | The kind of the entity. A kind matching regex `<b>.*</b>` is
--   reserved/read-only. A kind must not contain more than 1500 bytes when
--   UTF-8 encoded. Cannot be `""`.
peKind :: Lens' PathElement (Maybe Text)

-- | The name of the entity. A name matching regex `<b>.*</b>` is
--   reserved/read-only. A name must not be more than 1500 bytes when UTF-8
--   encoded. Cannot be `""`.
peName :: Lens' PathElement (Maybe Text)

-- | The auto-allocated ID of the entity. Never equal to zero. Values less
--   than zero are discouraged and may not be supported in the future.
peId :: Lens' PathElement (Maybe Int64)

-- | A Datastore data object. An entity is limited to 1 megabyte when
--   stored. That _roughly_ corresponds to a limit of 1 megabyte for the
--   serialized form of this message.
--   
--   <i>See:</i> <a>entity</a> smart constructor.
data Entity

-- | Creates a value of <a>Entity</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>eKey</a></li>
--   <li><a>eProperties</a></li>
--   </ul>
entity :: Entity

-- | The entity's key. An entity must have a key, unless otherwise
--   documented (for example, an entity in `Value.entity_value` may have no
--   key). An entity's kind is its key path's last element's kind, or null
--   if it has no key.
eKey :: Lens' Entity (Maybe Key)

-- | The entity's properties. The map's keys are property names. A property
--   name matching regex `<b>.*</b>` is reserved. A reserved property name
--   is forbidden in certain documented contexts. The name must not contain
--   more than 500 characters. The name cannot be `""`.
eProperties :: Lens' Entity (Maybe EntityProperties)

-- | The response for Datastore.Lookup.
--   
--   <i>See:</i> <a>lookupResponse</a> smart constructor.
data LookupResponse

-- | Creates a value of <a>LookupResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lrDeferred</a></li>
--   <li><a>lrFound</a></li>
--   <li><a>lrMissing</a></li>
--   </ul>
lookupResponse :: LookupResponse

-- | A list of keys that were not looked up due to resource constraints.
--   The order of results in this field is undefined and has no relation to
--   the order of the keys in the input.
lrDeferred :: Lens' LookupResponse [Key]

-- | Entities found as `ResultType.FULL` entities. The order of results in
--   this field is undefined and has no relation to the order of the keys
--   in the input.
lrFound :: Lens' LookupResponse [EntityResult]

-- | Entities not found as `ResultType.KEY_ONLY` entities. The order of
--   results in this field is undefined and has no relation to the order of
--   the keys in the input.
lrMissing :: Lens' LookupResponse [EntityResult]

-- | The desired order for a specific property.
--   
--   <i>See:</i> <a>propertyOrder</a> smart constructor.
data PropertyOrder

-- | Creates a value of <a>PropertyOrder</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>poProperty</a></li>
--   <li><a>poDirection</a></li>
--   </ul>
propertyOrder :: PropertyOrder

-- | The property to order by.
poProperty :: Lens' PropertyOrder (Maybe PropertyReference)

-- | The direction to order by. Defaults to `ASCENDING`.
poDirection :: Lens' PropertyOrder (Maybe PropertyOrderDirection)

-- | A binding parameter for a GQL query.
--   
--   <i>See:</i> <a>gqlQueryParameter</a> smart constructor.
data GqlQueryParameter

-- | Creates a value of <a>GqlQueryParameter</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gqpCursor</a></li>
--   <li><a>gqpValue</a></li>
--   </ul>
gqlQueryParameter :: GqlQueryParameter

-- | A query cursor. Query cursors are returned in query result batches.
gqpCursor :: Lens' GqlQueryParameter (Maybe ByteString)

-- | A value parameter.
gqpValue :: Lens' GqlQueryParameter (Maybe Value)


-- | Allocates IDs for the given keys, which is useful for referencing an
--   entity before it is inserted.
--   
--   <i>See:</i> <a>Google Cloud Datastore API Reference</a> for
--   <tt>datastore.projects.allocateIds</tt>.
module Network.Google.Resource.Datastore.Projects.AllocateIds

-- | A resource alias for <tt>datastore.projects.allocateIds</tt> method
--   which the <a>ProjectsAllocateIds</a> request conforms to.
type ProjectsAllocateIdsResource = "v1" :> ("projects" :> (CaptureMode "projectId" "allocateIds" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] AllocateIdsRequest :> Post '[JSON] AllocateIdsResponse)))))))))))

-- | Creates a value of <a>ProjectsAllocateIds</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>paiXgafv</a></li>
--   <li><a>paiUploadProtocol</a></li>
--   <li><a>paiPp</a></li>
--   <li><a>paiAccessToken</a></li>
--   <li><a>paiUploadType</a></li>
--   <li><a>paiPayload</a></li>
--   <li><a>paiBearerToken</a></li>
--   <li><a>paiProjectId</a></li>
--   <li><a>paiCallback</a></li>
--   </ul>
projectsAllocateIds :: AllocateIdsRequest -> Text -> ProjectsAllocateIds

-- | Allocates IDs for the given keys, which is useful for referencing an
--   entity before it is inserted.
--   
--   <i>See:</i> <a>projectsAllocateIds</a> smart constructor.
data ProjectsAllocateIds

-- | V1 error format.
paiXgafv :: Lens' ProjectsAllocateIds (Maybe Xgafv)

-- | Upload protocol for media (e.g. "raw", "multipart").
paiUploadProtocol :: Lens' ProjectsAllocateIds (Maybe Text)

-- | Pretty-print response.
paiPp :: Lens' ProjectsAllocateIds Bool

-- | OAuth access token.
paiAccessToken :: Lens' ProjectsAllocateIds (Maybe Text)

-- | Legacy upload protocol for media (e.g. "media", "multipart").
paiUploadType :: Lens' ProjectsAllocateIds (Maybe Text)

-- | Multipart request metadata.
paiPayload :: Lens' ProjectsAllocateIds AllocateIdsRequest

-- | OAuth bearer token.
paiBearerToken :: Lens' ProjectsAllocateIds (Maybe Text)

-- | The ID of the project against which to make the request.
paiProjectId :: Lens' ProjectsAllocateIds Text

-- | JSONP
paiCallback :: Lens' ProjectsAllocateIds (Maybe Text)
instance GHC.Generics.Generic Network.Google.Resource.Datastore.Projects.AllocateIds.ProjectsAllocateIds
instance Data.Data.Data Network.Google.Resource.Datastore.Projects.AllocateIds.ProjectsAllocateIds
instance GHC.Show.Show Network.Google.Resource.Datastore.Projects.AllocateIds.ProjectsAllocateIds
instance GHC.Classes.Eq Network.Google.Resource.Datastore.Projects.AllocateIds.ProjectsAllocateIds
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Datastore.Projects.AllocateIds.ProjectsAllocateIds


-- | Begins a new transaction.
--   
--   <i>See:</i> <a>Google Cloud Datastore API Reference</a> for
--   <tt>datastore.projects.beginTransaction</tt>.
module Network.Google.Resource.Datastore.Projects.BeginTransaction

-- | A resource alias for <tt>datastore.projects.beginTransaction</tt>
--   method which the <a>ProjectsBeginTransaction</a> request conforms to.
type ProjectsBeginTransactionResource = "v1" :> ("projects" :> (CaptureMode "projectId" "beginTransaction" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] BeginTransactionRequest :> Post '[JSON] BeginTransactionResponse)))))))))))

-- | Creates a value of <a>ProjectsBeginTransaction</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pbtXgafv</a></li>
--   <li><a>pbtUploadProtocol</a></li>
--   <li><a>pbtPp</a></li>
--   <li><a>pbtAccessToken</a></li>
--   <li><a>pbtUploadType</a></li>
--   <li><a>pbtPayload</a></li>
--   <li><a>pbtBearerToken</a></li>
--   <li><a>pbtProjectId</a></li>
--   <li><a>pbtCallback</a></li>
--   </ul>
projectsBeginTransaction :: BeginTransactionRequest -> Text -> ProjectsBeginTransaction

-- | Begins a new transaction.
--   
--   <i>See:</i> <a>projectsBeginTransaction</a> smart constructor.
data ProjectsBeginTransaction

-- | V1 error format.
pbtXgafv :: Lens' ProjectsBeginTransaction (Maybe Xgafv)

-- | Upload protocol for media (e.g. "raw", "multipart").
pbtUploadProtocol :: Lens' ProjectsBeginTransaction (Maybe Text)

-- | Pretty-print response.
pbtPp :: Lens' ProjectsBeginTransaction Bool

-- | OAuth access token.
pbtAccessToken :: Lens' ProjectsBeginTransaction (Maybe Text)

-- | Legacy upload protocol for media (e.g. "media", "multipart").
pbtUploadType :: Lens' ProjectsBeginTransaction (Maybe Text)

-- | Multipart request metadata.
pbtPayload :: Lens' ProjectsBeginTransaction BeginTransactionRequest

-- | OAuth bearer token.
pbtBearerToken :: Lens' ProjectsBeginTransaction (Maybe Text)

-- | The ID of the project against which to make the request.
pbtProjectId :: Lens' ProjectsBeginTransaction Text

-- | JSONP
pbtCallback :: Lens' ProjectsBeginTransaction (Maybe Text)
instance GHC.Generics.Generic Network.Google.Resource.Datastore.Projects.BeginTransaction.ProjectsBeginTransaction
instance Data.Data.Data Network.Google.Resource.Datastore.Projects.BeginTransaction.ProjectsBeginTransaction
instance GHC.Show.Show Network.Google.Resource.Datastore.Projects.BeginTransaction.ProjectsBeginTransaction
instance GHC.Classes.Eq Network.Google.Resource.Datastore.Projects.BeginTransaction.ProjectsBeginTransaction
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Datastore.Projects.BeginTransaction.ProjectsBeginTransaction


-- | Commits a transaction, optionally creating, deleting or modifying some
--   entities.
--   
--   <i>See:</i> <a>Google Cloud Datastore API Reference</a> for
--   <tt>datastore.projects.commit</tt>.
module Network.Google.Resource.Datastore.Projects.Commit

-- | A resource alias for <tt>datastore.projects.commit</tt> method which
--   the <a>ProjectsCommit</a> request conforms to.
type ProjectsCommitResource = "v1" :> ("projects" :> (CaptureMode "projectId" "commit" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] CommitRequest :> Post '[JSON] CommitResponse)))))))))))

-- | Creates a value of <a>ProjectsCommit</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pcXgafv</a></li>
--   <li><a>pcUploadProtocol</a></li>
--   <li><a>pcPp</a></li>
--   <li><a>pcAccessToken</a></li>
--   <li><a>pcUploadType</a></li>
--   <li><a>pcPayload</a></li>
--   <li><a>pcBearerToken</a></li>
--   <li><a>pcProjectId</a></li>
--   <li><a>pcCallback</a></li>
--   </ul>
projectsCommit :: CommitRequest -> Text -> ProjectsCommit

-- | Commits a transaction, optionally creating, deleting or modifying some
--   entities.
--   
--   <i>See:</i> <a>projectsCommit</a> smart constructor.
data ProjectsCommit

-- | V1 error format.
pcXgafv :: Lens' ProjectsCommit (Maybe Xgafv)

-- | Upload protocol for media (e.g. "raw", "multipart").
pcUploadProtocol :: Lens' ProjectsCommit (Maybe Text)

-- | Pretty-print response.
pcPp :: Lens' ProjectsCommit Bool

-- | OAuth access token.
pcAccessToken :: Lens' ProjectsCommit (Maybe Text)

-- | Legacy upload protocol for media (e.g. "media", "multipart").
pcUploadType :: Lens' ProjectsCommit (Maybe Text)

-- | Multipart request metadata.
pcPayload :: Lens' ProjectsCommit CommitRequest

-- | OAuth bearer token.
pcBearerToken :: Lens' ProjectsCommit (Maybe Text)

-- | The ID of the project against which to make the request.
pcProjectId :: Lens' ProjectsCommit Text

-- | JSONP
pcCallback :: Lens' ProjectsCommit (Maybe Text)
instance GHC.Generics.Generic Network.Google.Resource.Datastore.Projects.Commit.ProjectsCommit
instance Data.Data.Data Network.Google.Resource.Datastore.Projects.Commit.ProjectsCommit
instance GHC.Show.Show Network.Google.Resource.Datastore.Projects.Commit.ProjectsCommit
instance GHC.Classes.Eq Network.Google.Resource.Datastore.Projects.Commit.ProjectsCommit
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Datastore.Projects.Commit.ProjectsCommit


-- | Looks up entities by key.
--   
--   <i>See:</i> <a>Google Cloud Datastore API Reference</a> for
--   <tt>datastore.projects.lookup</tt>.
module Network.Google.Resource.Datastore.Projects.Lookup

-- | A resource alias for <tt>datastore.projects.lookup</tt> method which
--   the <a>ProjectsLookup</a> request conforms to.
type ProjectsLookupResource = "v1" :> ("projects" :> (CaptureMode "projectId" "lookup" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] LookupRequest :> Post '[JSON] LookupResponse)))))))))))

-- | Creates a value of <a>ProjectsLookup</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>plXgafv</a></li>
--   <li><a>plUploadProtocol</a></li>
--   <li><a>plPp</a></li>
--   <li><a>plAccessToken</a></li>
--   <li><a>plUploadType</a></li>
--   <li><a>plPayload</a></li>
--   <li><a>plBearerToken</a></li>
--   <li><a>plProjectId</a></li>
--   <li><a>plCallback</a></li>
--   </ul>
projectsLookup :: LookupRequest -> Text -> ProjectsLookup

-- | Looks up entities by key.
--   
--   <i>See:</i> <a>projectsLookup</a> smart constructor.
data ProjectsLookup

-- | V1 error format.
plXgafv :: Lens' ProjectsLookup (Maybe Xgafv)

-- | Upload protocol for media (e.g. "raw", "multipart").
plUploadProtocol :: Lens' ProjectsLookup (Maybe Text)

-- | Pretty-print response.
plPp :: Lens' ProjectsLookup Bool

-- | OAuth access token.
plAccessToken :: Lens' ProjectsLookup (Maybe Text)

-- | Legacy upload protocol for media (e.g. "media", "multipart").
plUploadType :: Lens' ProjectsLookup (Maybe Text)

-- | Multipart request metadata.
plPayload :: Lens' ProjectsLookup LookupRequest

-- | OAuth bearer token.
plBearerToken :: Lens' ProjectsLookup (Maybe Text)

-- | The ID of the project against which to make the request.
plProjectId :: Lens' ProjectsLookup Text

-- | JSONP
plCallback :: Lens' ProjectsLookup (Maybe Text)
instance GHC.Generics.Generic Network.Google.Resource.Datastore.Projects.Lookup.ProjectsLookup
instance Data.Data.Data Network.Google.Resource.Datastore.Projects.Lookup.ProjectsLookup
instance GHC.Show.Show Network.Google.Resource.Datastore.Projects.Lookup.ProjectsLookup
instance GHC.Classes.Eq Network.Google.Resource.Datastore.Projects.Lookup.ProjectsLookup
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Datastore.Projects.Lookup.ProjectsLookup


-- | Rolls back a transaction.
--   
--   <i>See:</i> <a>Google Cloud Datastore API Reference</a> for
--   <tt>datastore.projects.rollback</tt>.
module Network.Google.Resource.Datastore.Projects.Rollback

-- | A resource alias for <tt>datastore.projects.rollback</tt> method which
--   the <a>ProjectsRollback</a> request conforms to.
type ProjectsRollbackResource = "v1" :> ("projects" :> (CaptureMode "projectId" "rollback" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] RollbackRequest :> Post '[JSON] RollbackResponse)))))))))))

-- | Creates a value of <a>ProjectsRollback</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>prXgafv</a></li>
--   <li><a>prUploadProtocol</a></li>
--   <li><a>prPp</a></li>
--   <li><a>prAccessToken</a></li>
--   <li><a>prUploadType</a></li>
--   <li><a>prPayload</a></li>
--   <li><a>prBearerToken</a></li>
--   <li><a>prProjectId</a></li>
--   <li><a>prCallback</a></li>
--   </ul>
projectsRollback :: RollbackRequest -> Text -> ProjectsRollback

-- | Rolls back a transaction.
--   
--   <i>See:</i> <a>projectsRollback</a> smart constructor.
data ProjectsRollback

-- | V1 error format.
prXgafv :: Lens' ProjectsRollback (Maybe Xgafv)

-- | Upload protocol for media (e.g. "raw", "multipart").
prUploadProtocol :: Lens' ProjectsRollback (Maybe Text)

-- | Pretty-print response.
prPp :: Lens' ProjectsRollback Bool

-- | OAuth access token.
prAccessToken :: Lens' ProjectsRollback (Maybe Text)

-- | Legacy upload protocol for media (e.g. "media", "multipart").
prUploadType :: Lens' ProjectsRollback (Maybe Text)

-- | Multipart request metadata.
prPayload :: Lens' ProjectsRollback RollbackRequest

-- | OAuth bearer token.
prBearerToken :: Lens' ProjectsRollback (Maybe Text)

-- | The ID of the project against which to make the request.
prProjectId :: Lens' ProjectsRollback Text

-- | JSONP
prCallback :: Lens' ProjectsRollback (Maybe Text)
instance GHC.Generics.Generic Network.Google.Resource.Datastore.Projects.Rollback.ProjectsRollback
instance Data.Data.Data Network.Google.Resource.Datastore.Projects.Rollback.ProjectsRollback
instance GHC.Show.Show Network.Google.Resource.Datastore.Projects.Rollback.ProjectsRollback
instance GHC.Classes.Eq Network.Google.Resource.Datastore.Projects.Rollback.ProjectsRollback
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Datastore.Projects.Rollback.ProjectsRollback


-- | Queries for entities.
--   
--   <i>See:</i> <a>Google Cloud Datastore API Reference</a> for
--   <tt>datastore.projects.runQuery</tt>.
module Network.Google.Resource.Datastore.Projects.RunQuery

-- | A resource alias for <tt>datastore.projects.runQuery</tt> method which
--   the <a>ProjectsRunQuery</a> request conforms to.
type ProjectsRunQueryResource = "v1" :> ("projects" :> (CaptureMode "projectId" "runQuery" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "pp" Bool :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "bearer_token" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] RunQueryRequest :> Post '[JSON] RunQueryResponse)))))))))))

-- | Creates a value of <a>ProjectsRunQuery</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>prqXgafv</a></li>
--   <li><a>prqUploadProtocol</a></li>
--   <li><a>prqPp</a></li>
--   <li><a>prqAccessToken</a></li>
--   <li><a>prqUploadType</a></li>
--   <li><a>prqPayload</a></li>
--   <li><a>prqBearerToken</a></li>
--   <li><a>prqProjectId</a></li>
--   <li><a>prqCallback</a></li>
--   </ul>
projectsRunQuery :: RunQueryRequest -> Text -> ProjectsRunQuery

-- | Queries for entities.
--   
--   <i>See:</i> <a>projectsRunQuery</a> smart constructor.
data ProjectsRunQuery

-- | V1 error format.
prqXgafv :: Lens' ProjectsRunQuery (Maybe Xgafv)

-- | Upload protocol for media (e.g. "raw", "multipart").
prqUploadProtocol :: Lens' ProjectsRunQuery (Maybe Text)

-- | Pretty-print response.
prqPp :: Lens' ProjectsRunQuery Bool

-- | OAuth access token.
prqAccessToken :: Lens' ProjectsRunQuery (Maybe Text)

-- | Legacy upload protocol for media (e.g. "media", "multipart").
prqUploadType :: Lens' ProjectsRunQuery (Maybe Text)

-- | Multipart request metadata.
prqPayload :: Lens' ProjectsRunQuery RunQueryRequest

-- | OAuth bearer token.
prqBearerToken :: Lens' ProjectsRunQuery (Maybe Text)

-- | The ID of the project against which to make the request.
prqProjectId :: Lens' ProjectsRunQuery Text

-- | JSONP
prqCallback :: Lens' ProjectsRunQuery (Maybe Text)
instance GHC.Generics.Generic Network.Google.Resource.Datastore.Projects.RunQuery.ProjectsRunQuery
instance Data.Data.Data Network.Google.Resource.Datastore.Projects.RunQuery.ProjectsRunQuery
instance GHC.Show.Show Network.Google.Resource.Datastore.Projects.RunQuery.ProjectsRunQuery
instance GHC.Classes.Eq Network.Google.Resource.Datastore.Projects.RunQuery.ProjectsRunQuery
instance Network.Google.Types.GoogleRequest Network.Google.Resource.Datastore.Projects.RunQuery.ProjectsRunQuery


-- | Accesses the schemaless NoSQL database to provide fully managed,
--   robust, scalable storage for your application.
--   
--   <i>See:</i> <a>Google Cloud Datastore API Reference</a>
module Network.Google.Datastore

-- | Default request referring to version <tt>v1</tt> of the Google Cloud
--   Datastore API. This contains the host and root path used as a starting
--   point for constructing service requests.
datastoreService :: ServiceConfig

-- | View and manage your data across Google Cloud Platform services
cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"]

-- | View and manage your Google Cloud Datastore data
datastoreScope :: Proxy '["https://www.googleapis.com/auth/datastore"]

-- | Represents the entirety of the methods and resources available for the
--   Google Cloud Datastore API service.
type DatastoreAPI = ProjectsBeginTransactionResource :<|> (ProjectsAllocateIdsResource :<|> (ProjectsRunQueryResource :<|> (ProjectsRollbackResource :<|> (ProjectsLookupResource :<|> ProjectsCommitResource))))

-- | An object representing a latitude/longitude pair. This is expressed as
--   a pair of doubles representing degrees latitude and degrees longitude.
--   Unless specified otherwise, this must conform to the <a>WGS84
--   standard</a>. Values must be within normalized ranges. Example of
--   normalization code in Python: def NormalizeLongitude(longitude):
--   """Wraps decimal degrees longitude to [-180.0, 180.0].""" q, r =
--   divmod(longitude, 360.0) if r &gt; 180.0 or (r == 180.0 and q &lt;=
--   -1.0): return r - 360.0 return r def NormalizeLatLng(latitude,
--   longitude): """Wraps decimal degrees latitude and longitude to [-90.0,
--   90.0] and [-180.0, 180.0], respectively.""" r = latitude % 360.0 if r
--   &lt;= 90.0: return r, NormalizeLongitude(longitude) elif r &gt;=
--   270.0: return r - 360, NormalizeLongitude(longitude) else: return 180
--   - r, NormalizeLongitude(longitude + 180.0) assert 180.0 ==
--   NormalizeLongitude(180.0) assert -180.0 == NormalizeLongitude(-180.0)
--   assert -179.0 == NormalizeLongitude(181.0) assert (0.0, 0.0) ==
--   NormalizeLatLng(360.0, 0.0) assert (0.0, 0.0) ==
--   NormalizeLatLng(-360.0, 0.0) assert (85.0, 180.0) ==
--   NormalizeLatLng(95.0, 0.0) assert (-85.0, -170.0) ==
--   NormalizeLatLng(-95.0, 10.0) assert (90.0, 10.0) ==
--   NormalizeLatLng(90.0, 10.0) assert (-90.0, -10.0) ==
--   NormalizeLatLng(-90.0, -10.0) assert (0.0, -170.0) ==
--   NormalizeLatLng(-180.0, 10.0) assert (0.0, -170.0) ==
--   NormalizeLatLng(180.0, 10.0) assert (-90.0, 10.0) ==
--   NormalizeLatLng(270.0, 10.0) assert (90.0, 10.0) ==
--   NormalizeLatLng(-270.0, 10.0) The code in
--   logs/storage/validator/logs_validator_traits.cc treats this type as if
--   it were annotated as ST_LOCATION.
--   
--   <i>See:</i> <a>latLng</a> smart constructor.
data LatLng

-- | Creates a value of <a>LatLng</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>llLatitude</a></li>
--   <li><a>llLongitude</a></li>
--   </ul>
latLng :: LatLng

-- | The latitude in degrees. It must be in the range [-90.0, +90.0].
llLatitude :: Lens' LatLng (Maybe Double)

-- | The longitude in degrees. It must be in the range [-180.0, +180.0].
llLongitude :: Lens' LatLng (Maybe Double)

-- | The direction to order by. Defaults to `ASCENDING`.
data PropertyOrderDirection

-- | <tt>DIRECTION_UNSPECIFIED</tt> Unspecified. This value must not be
--   used.
DirectionUnspecified :: PropertyOrderDirection

-- | <tt>ASCENDING</tt> Ascending.
Ascending :: PropertyOrderDirection

-- | <tt>DESCENDING</tt> Descending.
Descending :: PropertyOrderDirection

-- | The request for Datastore.Rollback.
--   
--   <i>See:</i> <a>rollbackRequest</a> smart constructor.
data RollbackRequest

-- | Creates a value of <a>RollbackRequest</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rrTransaction</a></li>
--   </ul>
rollbackRequest :: RollbackRequest

-- | The transaction identifier, returned by a call to
--   Datastore.BeginTransaction.
rrTransaction :: Lens' RollbackRequest (Maybe ByteString)

-- | A partition ID identifies a grouping of entities. The grouping is
--   always by project and namespace, however the namespace ID may be
--   empty. A partition ID contains several dimensions: project ID and
--   namespace ID. Partition dimensions: - May be `""`. - Must be valid
--   UTF-8 bytes. - Must have values that match regex
--   `[A-Za-z\d\.\-_]{1,100}` If the value of any dimension matches regex
--   `<b>.*</b>`, the partition is reserved/read-only. A reserved/read-only
--   partition ID is forbidden in certain documented contexts. Foreign
--   partition IDs (in which the project ID does not match the context
--   project ID ) are discouraged. Reads and writes of foreign partition
--   IDs may fail if the project is not in an active state.
--   
--   <i>See:</i> <a>partitionId</a> smart constructor.
data PartitionId

-- | Creates a value of <a>PartitionId</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>piNamespaceId</a></li>
--   <li><a>piProjectId</a></li>
--   </ul>
partitionId :: PartitionId

-- | If not empty, the ID of the namespace to which the entities belong.
piNamespaceId :: Lens' PartitionId (Maybe Text)

-- | The ID of the project to which the entities belong.
piProjectId :: Lens' PartitionId (Maybe Text)

-- | A batch of results produced by a query.
--   
--   <i>See:</i> <a>queryResultBatch</a> smart constructor.
data QueryResultBatch

-- | Creates a value of <a>QueryResultBatch</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>qrbSkippedResults</a></li>
--   <li><a>qrbSkippedCursor</a></li>
--   <li><a>qrbEntityResultType</a></li>
--   <li><a>qrbSnapshotVersion</a></li>
--   <li><a>qrbEntityResults</a></li>
--   <li><a>qrbMoreResults</a></li>
--   <li><a>qrbEndCursor</a></li>
--   </ul>
queryResultBatch :: QueryResultBatch

-- | The number of results skipped, typically because of an offset.
qrbSkippedResults :: Lens' QueryResultBatch (Maybe Int32)

-- | A cursor that points to the position after the last skipped result.
--   Will be set when `skipped_results` != 0.
qrbSkippedCursor :: Lens' QueryResultBatch (Maybe ByteString)

-- | The result type for every entity in `entity_results`.
qrbEntityResultType :: Lens' QueryResultBatch (Maybe QueryResultBatchEntityResultType)

-- | The version number of the snapshot this batch was returned from. This
--   applies to the range of results from the query's `start_cursor` (or
--   the beginning of the query if no cursor was given) to this batch's
--   `end_cursor` (not the query's `end_cursor`). In a single transaction,
--   subsequent query result batches for the same query can have a greater
--   snapshot version number. Each batch's snapshot version is valid for
--   all preceding batches. The value will be zero for eventually
--   consistent queries.
qrbSnapshotVersion :: Lens' QueryResultBatch (Maybe Int64)

-- | The results for this batch.
qrbEntityResults :: Lens' QueryResultBatch [EntityResult]

-- | The state of the query after the current batch.
qrbMoreResults :: Lens' QueryResultBatch (Maybe QueryResultBatchMoreResults)

-- | A cursor that points to the position after the last result in the
--   batch.
qrbEndCursor :: Lens' QueryResultBatch (Maybe ByteString)

-- | The operator for combining multiple filters.
data CompositeFilterOp

-- | <tt>OPERATOR_UNSPECIFIED</tt> Unspecified. This value must not be
--   used.
OperatorUnspecified :: CompositeFilterOp

-- | <tt>AND</tt> The results are required to satisfy each of the combined
--   filters.
And :: CompositeFilterOp

-- | The entity's properties. The map's keys are property names. A property
--   name matching regex `<b>.*</b>` is reserved. A reserved property name
--   is forbidden in certain documented contexts. The name must not contain
--   more than 500 characters. The name cannot be `""`.
--   
--   <i>See:</i> <a>entityProperties</a> smart constructor.
data EntityProperties

-- | Creates a value of <a>EntityProperties</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>epAddtional</a></li>
--   </ul>
entityProperties :: HashMap Text Value -> EntityProperties
epAddtional :: Lens' EntityProperties (HashMap Text Value)

-- | The request for Datastore.BeginTransaction.
--   
--   <i>See:</i> <a>beginTransactionRequest</a> smart constructor.
data BeginTransactionRequest

-- | Creates a value of <a>BeginTransactionRequest</a> with the minimum
--   fields required to make a request.
beginTransactionRequest :: BeginTransactionRequest

-- | The request for Datastore.RunQuery.
--   
--   <i>See:</i> <a>runQueryRequest</a> smart constructor.
data RunQueryRequest

-- | Creates a value of <a>RunQueryRequest</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rqrPartitionId</a></li>
--   <li><a>rqrGqlQuery</a></li>
--   <li><a>rqrQuery</a></li>
--   <li><a>rqrReadOptions</a></li>
--   </ul>
runQueryRequest :: RunQueryRequest

-- | Entities are partitioned into subsets, identified by a partition ID.
--   Queries are scoped to a single partition. This partition ID is
--   normalized with the standard default context partition ID.
rqrPartitionId :: Lens' RunQueryRequest (Maybe PartitionId)

-- | The GQL query to run.
rqrGqlQuery :: Lens' RunQueryRequest (Maybe GqlQuery)

-- | The query to run.
rqrQuery :: Lens' RunQueryRequest (Maybe Query)

-- | The options for this query.
rqrReadOptions :: Lens' RunQueryRequest (Maybe ReadOptions)

-- | The request for Datastore.AllocateIds.
--   
--   <i>See:</i> <a>allocateIdsRequest</a> smart constructor.
data AllocateIdsRequest

-- | Creates a value of <a>AllocateIdsRequest</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>airKeys</a></li>
--   </ul>
allocateIdsRequest :: AllocateIdsRequest

-- | A list of keys with incomplete key paths for which to allocate IDs. No
--   key may be reserved/read-only.
airKeys :: Lens' AllocateIdsRequest [Key]

-- | The result type for every entity in `entity_results`.
data QueryResultBatchEntityResultType

-- | <tt>RESULT_TYPE_UNSPECIFIED</tt> Unspecified. This value is never
--   used.
QRBERTResultTypeUnspecified :: QueryResultBatchEntityResultType

-- | <tt>FULL</tt> The key and properties.
QRBERTFull :: QueryResultBatchEntityResultType

-- | <tt>PROJECTION</tt> A projected subset of properties. The entity may
--   have no key.
QRBERTProjection :: QueryResultBatchEntityResultType

-- | <tt>KEY_ONLY</tt> Only the key.
QRBERTKeyOnly :: QueryResultBatchEntityResultType

-- | A filter that merges multiple other filters using the given operator.
--   
--   <i>See:</i> <a>compositeFilter</a> smart constructor.
data CompositeFilter

-- | Creates a value of <a>CompositeFilter</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>cfOp</a></li>
--   <li><a>cfFilters</a></li>
--   </ul>
compositeFilter :: CompositeFilter

-- | The operator for combining multiple filters.
cfOp :: Lens' CompositeFilter (Maybe CompositeFilterOp)

-- | The list of filters to combine. Must contain at least one filter.
cfFilters :: Lens' CompositeFilter [Filter]

-- | The state of the query after the current batch.
data QueryResultBatchMoreResults

-- | <tt>MORE_RESULTS_TYPE_UNSPECIFIED</tt> Unspecified. This value is
--   never used.
MoreResultsTypeUnspecified :: QueryResultBatchMoreResults

-- | <tt>NOT_FINISHED</tt> There may be additional batches to fetch from
--   this query.
NotFinished :: QueryResultBatchMoreResults

-- | <tt>MORE_RESULTS_AFTER_LIMIT</tt> The query is finished, but there may
--   be more results after the limit.
MoreResultsAfterLimit :: QueryResultBatchMoreResults

-- | <tt>MORE_RESULTS_AFTER_CURSOR</tt> The query is finished, but there
--   may be more results after the end cursor.
MoreResultsAfterCursor :: QueryResultBatchMoreResults

-- | <tt>NO_MORE_RESULTS</tt> The query has been exhausted.
NoMoreResults :: QueryResultBatchMoreResults

-- | The response for Datastore.BeginTransaction.
--   
--   <i>See:</i> <a>beginTransactionResponse</a> smart constructor.
data BeginTransactionResponse

-- | Creates a value of <a>BeginTransactionResponse</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>btrTransaction</a></li>
--   </ul>
beginTransactionResponse :: BeginTransactionResponse

-- | The transaction identifier (always present).
btrTransaction :: Lens' BeginTransactionResponse (Maybe ByteString)

-- | The result of applying a mutation.
--   
--   <i>See:</i> <a>mutationResult</a> smart constructor.
data MutationResult

-- | Creates a value of <a>MutationResult</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>mrConflictDetected</a></li>
--   <li><a>mrKey</a></li>
--   <li><a>mrVersion</a></li>
--   </ul>
mutationResult :: MutationResult

-- | Whether a conflict was detected for this mutation. Always false when a
--   conflict detection strategy field is not set in the mutation.
mrConflictDetected :: Lens' MutationResult (Maybe Bool)

-- | The automatically allocated key. Set only when the mutation allocated
--   a key.
mrKey :: Lens' MutationResult (Maybe Key)

-- | The version of the entity on the server after processing the mutation.
--   If the mutation doesn't change anything on the server, then the
--   version will be the version of the current entity or, if no entity is
--   present, a version that is strictly greater than the version of any
--   previous entity and less than the version of any possible future
--   entity.
mrVersion :: Lens' MutationResult (Maybe Int64)

-- | The response for Datastore.AllocateIds.
--   
--   <i>See:</i> <a>allocateIdsResponse</a> smart constructor.
data AllocateIdsResponse

-- | Creates a value of <a>AllocateIdsResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>aKeys</a></li>
--   </ul>
allocateIdsResponse :: AllocateIdsResponse

-- | The keys specified in the request (in the same order), each with its
--   key path completed with a newly allocated ID.
aKeys :: Lens' AllocateIdsResponse [Key]

-- | A <a>GQL query</a>.
--   
--   <i>See:</i> <a>gqlQuery</a> smart constructor.
data GqlQuery

-- | Creates a value of <a>GqlQuery</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gqPositionalBindings</a></li>
--   <li><a>gqNamedBindings</a></li>
--   <li><a>gqQueryString</a></li>
--   <li><a>gqAllowLiterals</a></li>
--   </ul>
gqlQuery :: GqlQuery

-- | Numbered binding site '1 references the first numbered parameter,
--   effectively using 1-based indexing, rather than the usual 0. For each
--   binding site numbered i in `query_string`, there must be an i-th
--   numbered parameter. The inverse must also be true.
gqPositionalBindings :: Lens' GqlQuery [GqlQueryParameter]

-- | For each non-reserved named binding site in the query string, there
--   must be a named parameter with that name, but not necessarily the
--   inverse. Key must match regex `A-Za-z_$*`, must not match regex
--   `<b>.*</b>`, and must not be `""`.
gqNamedBindings :: Lens' GqlQuery (Maybe GqlQueryNamedBindings)

-- | A string of the format described <a>here</a>.
gqQueryString :: Lens' GqlQuery (Maybe Text)

-- | When false, the query string must not contain any literals and instead
--   must bind all values. For example, `SELECT * FROM Kind WHERE a =
--   'string literal'` is not allowed, while `SELECT * FROM Kind WHERE a =
--   'value` is.
gqAllowLiterals :: Lens' GqlQuery (Maybe Bool)

-- | The response for Datastore.RunQuery.
--   
--   <i>See:</i> <a>runQueryResponse</a> smart constructor.
data RunQueryResponse

-- | Creates a value of <a>RunQueryResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rBatch</a></li>
--   <li><a>rQuery</a></li>
--   </ul>
runQueryResponse :: RunQueryResponse

-- | A batch of query results (always present).
rBatch :: Lens' RunQueryResponse (Maybe QueryResultBatch)

-- | The parsed form of the `GqlQuery` from the request, if it was set.
rQuery :: Lens' RunQueryResponse (Maybe Query)

-- | A message that can hold any of the supported value types and
--   associated metadata.
--   
--   <i>See:</i> <a>value</a> smart constructor.
data Value

-- | Creates a value of <a>Value</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>vKeyValue</a></li>
--   <li><a>vGeoPointValue</a></li>
--   <li><a>vIntegerValue</a></li>
--   <li><a>vTimestampValue</a></li>
--   <li><a>vEntityValue</a></li>
--   <li><a>vExcludeFromIndexes</a></li>
--   <li><a>vDoubleValue</a></li>
--   <li><a>vStringValue</a></li>
--   <li><a>vBooleanValue</a></li>
--   <li><a>vMeaning</a></li>
--   <li><a>vArrayValue</a></li>
--   <li><a>vNullValue</a></li>
--   <li><a>vBlobValue</a></li>
--   </ul>
value :: Value

-- | A key value.
vKeyValue :: Lens' Value (Maybe Key)

-- | A geo point value representing a point on the surface of Earth.
vGeoPointValue :: Lens' Value (Maybe LatLng)

-- | An integer value.
vIntegerValue :: Lens' Value (Maybe Int64)

-- | A timestamp value. When stored in the Datastore, precise only to
--   microseconds; any additional precision is rounded down.
vTimestampValue :: Lens' Value (Maybe UTCTime)

-- | An entity value. - May have no key. - May have a key with an
--   incomplete key path. - May have a reserved/read-only key.
vEntityValue :: Lens' Value (Maybe Entity)

-- | If the value should be excluded from all indexes including those
--   defined explicitly.
vExcludeFromIndexes :: Lens' Value (Maybe Bool)

-- | A double value.
vDoubleValue :: Lens' Value (Maybe Double)

-- | A UTF-8 encoded string value. When `exclude_from_indexes` is false (it
--   is indexed) , may have at most 1500 bytes. Otherwise, may be set to at
--   least 1,000,000 bytes.
vStringValue :: Lens' Value (Maybe Text)

-- | A boolean value.
vBooleanValue :: Lens' Value (Maybe Bool)

-- | The `meaning` field should only be populated for backwards
--   compatibility.
vMeaning :: Lens' Value (Maybe Int32)

-- | An array value. Cannot contain another array value. A `Value` instance
--   that sets field `array_value` must not set fields `meaning` or
--   `exclude_from_indexes`.
vArrayValue :: Lens' Value (Maybe ArrayValue)

-- | A null value.
vNullValue :: Lens' Value (Maybe ValueNullValue)

-- | A blob value. May have at most 1,000,000 bytes. When
--   `exclude_from_indexes` is false, may have at most 1500 bytes. In JSON
--   requests, must be base64-encoded.
vBlobValue :: Lens' Value (Maybe ByteString)

-- | A null value.
data ValueNullValue

-- | <tt>NULL_VALUE</tt> Null value.
NullValue :: ValueNullValue

-- | The request for Datastore.Lookup.
--   
--   <i>See:</i> <a>lookupRequest</a> smart constructor.
data LookupRequest

-- | Creates a value of <a>LookupRequest</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lrKeys</a></li>
--   <li><a>lrReadOptions</a></li>
--   </ul>
lookupRequest :: LookupRequest

-- | Keys of entities to look up.
lrKeys :: Lens' LookupRequest [Key]

-- | The options for this lookup request.
lrReadOptions :: Lens' LookupRequest (Maybe ReadOptions)

-- | The non-transactional read consistency to use. Cannot be set to
--   `STRONG` for global queries.
data ReadOptionsReadConsistency

-- | <tt>READ_CONSISTENCY_UNSPECIFIED</tt> Unspecified. This value must not
--   be used.
ReadConsistencyUnspecified :: ReadOptionsReadConsistency

-- | <tt>STRONG</tt> Strong consistency.
Strong :: ReadOptionsReadConsistency

-- | <tt>EVENTUAL</tt> Eventual consistency.
Eventual :: ReadOptionsReadConsistency

-- | A mutation to apply to an entity.
--   
--   <i>See:</i> <a>mutation</a> smart constructor.
data Mutation

-- | Creates a value of <a>Mutation</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>mBaseVersion</a></li>
--   <li><a>mInsert</a></li>
--   <li><a>mUpsert</a></li>
--   <li><a>mDelete</a></li>
--   <li><a>mUpdate</a></li>
--   </ul>
mutation :: Mutation

-- | The version of the entity that this mutation is being applied to. If
--   this does not match the current version on the server, the mutation
--   conflicts.
mBaseVersion :: Lens' Mutation (Maybe Int64)

-- | The entity to insert. The entity must not already exist. The entity
--   key's final path element may be incomplete.
mInsert :: Lens' Mutation (Maybe Entity)

-- | The entity to upsert. The entity may or may not already exist. The
--   entity key's final path element may be incomplete.
mUpsert :: Lens' Mutation (Maybe Entity)

-- | The key of the entity to delete. The entity may or may not already
--   exist. Must have a complete key path and must not be
--   reserved/read-only.
mDelete :: Lens' Mutation (Maybe Key)

-- | The entity to update. The entity must already exist. Must have a
--   complete key path.
mUpdate :: Lens' Mutation (Maybe Entity)

-- | For each non-reserved named binding site in the query string, there
--   must be a named parameter with that name, but not necessarily the
--   inverse. Key must match regex `A-Za-z_$*`, must not match regex
--   `<b>.*</b>`, and must not be `""`.
--   
--   <i>See:</i> <a>gqlQueryNamedBindings</a> smart constructor.
data GqlQueryNamedBindings

-- | Creates a value of <a>GqlQueryNamedBindings</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gqnbAddtional</a></li>
--   </ul>
gqlQueryNamedBindings :: HashMap Text GqlQueryParameter -> GqlQueryNamedBindings
gqnbAddtional :: Lens' GqlQueryNamedBindings (HashMap Text GqlQueryParameter)

-- | A reference to a property relative to the kind expressions.
--   
--   <i>See:</i> <a>propertyReference</a> smart constructor.
data PropertyReference

-- | Creates a value of <a>PropertyReference</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>prName</a></li>
--   </ul>
propertyReference :: PropertyReference

-- | The name of the property. If name includes "."s, it may be interpreted
--   as a property name path.
prName :: Lens' PropertyReference (Maybe Text)

-- | A unique identifier for an entity. If a key's partition ID or any of
--   its path kinds or names are reserved/read-only, the key is
--   reserved/read-only. A reserved/read-only key is forbidden in certain
--   documented contexts.
--   
--   <i>See:</i> <a>key</a> smart constructor.
data Key

-- | Creates a value of <a>Key</a> with the minimum fields required to make
--   a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>kPartitionId</a></li>
--   <li><a>kPath</a></li>
--   </ul>
key :: Key

-- | Entities are partitioned into subsets, currently identified by a
--   project ID and namespace ID. Queries are scoped to a single partition.
kPartitionId :: Lens' Key (Maybe PartitionId)

-- | The entity path. An entity path consists of one or more elements
--   composed of a kind and a string or numerical identifier, which
--   identify entities. The first element identifies a _root entity_, the
--   second element identifies a _child_ of the root entity, the third
--   element identifies a child of the second entity, and so forth. The
--   entities identified by all prefixes of the path are called the
--   element's _ancestors_. An entity path is always fully complete: *all*
--   of the entity's ancestors are required to be in the path along with
--   the entity identifier itself. The only exception is that in some
--   documented cases, the identifier in the last path element (for the
--   entity) itself may be omitted. For example, the last path element of
--   the key of `Mutation.insert` may have no identifier. A path can never
--   be empty, and a path can have at most 100 elements.
kPath :: Lens' Key [PathElement]

-- | A filter on a specific property.
--   
--   <i>See:</i> <a>propertyFilter</a> smart constructor.
data PropertyFilter

-- | Creates a value of <a>PropertyFilter</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pfProperty</a></li>
--   <li><a>pfOp</a></li>
--   <li><a>pfValue</a></li>
--   </ul>
propertyFilter :: PropertyFilter

-- | The property to filter by.
pfProperty :: Lens' PropertyFilter (Maybe PropertyReference)

-- | The operator to filter by.
pfOp :: Lens' PropertyFilter (Maybe PropertyFilterOp)

-- | The value to compare the property to.
pfValue :: Lens' PropertyFilter (Maybe Value)

-- | A query for entities.
--   
--   <i>See:</i> <a>query</a> smart constructor.
data Query

-- | Creates a value of <a>Query</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>qStartCursor</a></li>
--   <li><a>qOffSet</a></li>
--   <li><a>qKind</a></li>
--   <li><a>qDistinctOn</a></li>
--   <li><a>qEndCursor</a></li>
--   <li><a>qLimit</a></li>
--   <li><a>qProjection</a></li>
--   <li><a>qFilter</a></li>
--   <li><a>qOrder</a></li>
--   </ul>
query :: Query

-- | A starting point for the query results. Query cursors are returned in
--   query result batches and <a>can only be used to continue the same
--   query</a>.
qStartCursor :: Lens' Query (Maybe ByteString)

-- | The number of results to skip. Applies before limit, but after all
--   other constraints. Optional. Must be &gt;= 0 if specified.
qOffSet :: Lens' Query (Maybe Int32)

-- | The kinds to query (if empty, returns entities of all kinds).
--   Currently at most 1 kind may be specified.
qKind :: Lens' Query [KindExpression]

-- | The properties to make distinct. The query results will contain the
--   first result for each distinct combination of values for the given
--   properties (if empty, all results are returned).
qDistinctOn :: Lens' Query [PropertyReference]

-- | An ending point for the query results. Query cursors are returned in
--   query result batches and <a>can only be used to limit the same
--   query</a>.
qEndCursor :: Lens' Query (Maybe ByteString)

-- | The maximum number of results to return. Applies after all other
--   constraints. Optional. Unspecified is interpreted as no limit. Must be
--   &gt;= 0 if specified.
qLimit :: Lens' Query (Maybe Int32)

-- | The projection to return. Defaults to returning all properties.
qProjection :: Lens' Query [Projection]

-- | The filter to apply.
qFilter :: Lens' Query (Maybe Filter)

-- | The order to apply to the query results (if empty, order is
--   unspecified).
qOrder :: Lens' Query [PropertyOrder]

-- | An array value.
--   
--   <i>See:</i> <a>arrayValue</a> smart constructor.
data ArrayValue

-- | Creates a value of <a>ArrayValue</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>avValues</a></li>
--   </ul>
arrayValue :: ArrayValue

-- | Values in the array. The order of this array may not be preserved if
--   it contains a mix of indexed and unindexed values.
avValues :: Lens' ArrayValue [Value]

-- | The result of fetching an entity from Datastore.
--   
--   <i>See:</i> <a>entityResult</a> smart constructor.
data EntityResult

-- | Creates a value of <a>EntityResult</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>erCursor</a></li>
--   <li><a>erVersion</a></li>
--   <li><a>erEntity</a></li>
--   </ul>
entityResult :: EntityResult

-- | A cursor that points to the position after the result entity. Set only
--   when the `EntityResult` is part of a `QueryResultBatch` message.
erCursor :: Lens' EntityResult (Maybe ByteString)

-- | The version of the entity, a strictly positive number that
--   monotonically increases with changes to the entity. This field is set
--   for `FULL` entity results. For missing entities in `LookupResponse`,
--   this is the version of the snapshot that was used to look up the
--   entity, and it is always set except for eventually consistent reads.
erVersion :: Lens' EntityResult (Maybe Int64)

-- | The resulting entity.
erEntity :: Lens' EntityResult (Maybe Entity)

-- | V1 error format.
data Xgafv

-- | <tt>1</tt> v1 error format
X1 :: Xgafv

-- | <tt>2</tt> v2 error format
X2 :: Xgafv

-- | The response for Datastore.Commit.
--   
--   <i>See:</i> <a>commitResponse</a> smart constructor.
data CommitResponse

-- | Creates a value of <a>CommitResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>crIndexUpdates</a></li>
--   <li><a>crMutationResults</a></li>
--   </ul>
commitResponse :: CommitResponse

-- | The number of index entries updated during the commit, or zero if none
--   were updated.
crIndexUpdates :: Lens' CommitResponse (Maybe Int32)

-- | The result of performing the mutations. The i-th mutation result
--   corresponds to the i-th mutation in the request.
crMutationResults :: Lens' CommitResponse [MutationResult]

-- | A representation of a kind.
--   
--   <i>See:</i> <a>kindExpression</a> smart constructor.
data KindExpression

-- | Creates a value of <a>KindExpression</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>keName</a></li>
--   </ul>
kindExpression :: KindExpression

-- | The name of the kind.
keName :: Lens' KindExpression (Maybe Text)

-- | The options shared by read requests.
--   
--   <i>See:</i> <a>readOptions</a> smart constructor.
data ReadOptions

-- | Creates a value of <a>ReadOptions</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>roReadConsistency</a></li>
--   <li><a>roTransaction</a></li>
--   </ul>
readOptions :: ReadOptions

-- | The non-transactional read consistency to use. Cannot be set to
--   `STRONG` for global queries.
roReadConsistency :: Lens' ReadOptions (Maybe ReadOptionsReadConsistency)

-- | The identifier of the transaction in which to read. A transaction
--   identifier is returned by a call to Datastore.BeginTransaction.
roTransaction :: Lens' ReadOptions (Maybe ByteString)

-- | The response for Datastore.Rollback. (an empty message).
--   
--   <i>See:</i> <a>rollbackResponse</a> smart constructor.
data RollbackResponse

-- | Creates a value of <a>RollbackResponse</a> with the minimum fields
--   required to make a request.
rollbackResponse :: RollbackResponse

-- | A representation of a property in a projection.
--   
--   <i>See:</i> <a>projection</a> smart constructor.
data Projection

-- | Creates a value of <a>Projection</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>pProperty</a></li>
--   </ul>
projection :: Projection

-- | The property to project.
pProperty :: Lens' Projection (Maybe PropertyReference)

-- | A holder for any type of filter.
--   
--   <i>See:</i> <a>filter'</a> smart constructor.
data Filter

-- | Creates a value of <a>Filter</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>fCompositeFilter</a></li>
--   <li><a>fPropertyFilter</a></li>
--   </ul>
filter' :: Filter

-- | A composite filter.
fCompositeFilter :: Lens' Filter (Maybe CompositeFilter)

-- | A filter on a property.
fPropertyFilter :: Lens' Filter (Maybe PropertyFilter)

-- | The operator to filter by.
data PropertyFilterOp

-- | <tt>OPERATOR_UNSPECIFIED</tt> Unspecified. This value must not be
--   used.
PFOOperatorUnspecified :: PropertyFilterOp

-- | <tt>LESS_THAN</tt> Less than.
PFOLessThan :: PropertyFilterOp

-- | <tt>LESS_THAN_OR_EQUAL</tt> Less than or equal.
PFOLessThanOrEqual :: PropertyFilterOp

-- | <tt>GREATER_THAN</tt> Greater than.
PFOGreaterThan :: PropertyFilterOp

-- | <tt>GREATER_THAN_OR_EQUAL</tt> Greater than or equal.
PFOGreaterThanOrEqual :: PropertyFilterOp

-- | <tt>EQUAL</tt> Equal.
PFOEqual :: PropertyFilterOp

-- | <tt>HAS_ANCESTOR</tt> Has ancestor.
PFOHasAncestor :: PropertyFilterOp

-- | The request for Datastore.Commit.
--   
--   <i>See:</i> <a>commitRequest</a> smart constructor.
data CommitRequest

-- | Creates a value of <a>CommitRequest</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>crMutations</a></li>
--   <li><a>crMode</a></li>
--   <li><a>crTransaction</a></li>
--   </ul>
commitRequest :: CommitRequest

-- | The mutations to perform. When mode is `TRANSACTIONAL`, mutations
--   affecting a single entity are applied in order. The following
--   sequences of mutations affecting a single entity are not permitted in
--   a single `Commit` request: - `insert` followed by `insert` - `update`
--   followed by `insert` - `upsert` followed by `insert` - `delete`
--   followed by `update` When mode is `NON_TRANSACTIONAL`, no two
--   mutations may affect a single entity.
crMutations :: Lens' CommitRequest [Mutation]

-- | The type of commit to perform. Defaults to `TRANSACTIONAL`.
crMode :: Lens' CommitRequest (Maybe CommitRequestMode)

-- | The identifier of the transaction associated with the commit. A
--   transaction identifier is returned by a call to
--   Datastore.BeginTransaction.
crTransaction :: Lens' CommitRequest (Maybe ByteString)

-- | The type of commit to perform. Defaults to `TRANSACTIONAL`.
data CommitRequestMode

-- | <tt>MODE_UNSPECIFIED</tt> Unspecified. This value must not be used.
ModeUnspecified :: CommitRequestMode

-- | <tt>TRANSACTIONAL</tt> Transactional: The mutations are either all
--   applied, or none are applied. Learn about transactions <a>here</a>.
Transactional :: CommitRequestMode

-- | <tt>NON_TRANSACTIONAL</tt> Non-transactional: The mutations may not
--   apply as all or none.
NonTransactional :: CommitRequestMode

-- | A (kind, ID/name) pair used to construct a key path. If either name or
--   ID is set, the element is complete. If neither is set, the element is
--   incomplete.
--   
--   <i>See:</i> <a>pathElement</a> smart constructor.
data PathElement

-- | Creates a value of <a>PathElement</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>peKind</a></li>
--   <li><a>peName</a></li>
--   <li><a>peId</a></li>
--   </ul>
pathElement :: PathElement

-- | The kind of the entity. A kind matching regex `<b>.*</b>` is
--   reserved/read-only. A kind must not contain more than 1500 bytes when
--   UTF-8 encoded. Cannot be `""`.
peKind :: Lens' PathElement (Maybe Text)

-- | The name of the entity. A name matching regex `<b>.*</b>` is
--   reserved/read-only. A name must not be more than 1500 bytes when UTF-8
--   encoded. Cannot be `""`.
peName :: Lens' PathElement (Maybe Text)

-- | The auto-allocated ID of the entity. Never equal to zero. Values less
--   than zero are discouraged and may not be supported in the future.
peId :: Lens' PathElement (Maybe Int64)

-- | A Datastore data object. An entity is limited to 1 megabyte when
--   stored. That _roughly_ corresponds to a limit of 1 megabyte for the
--   serialized form of this message.
--   
--   <i>See:</i> <a>entity</a> smart constructor.
data Entity

-- | Creates a value of <a>Entity</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>eKey</a></li>
--   <li><a>eProperties</a></li>
--   </ul>
entity :: Entity

-- | The entity's key. An entity must have a key, unless otherwise
--   documented (for example, an entity in `Value.entity_value` may have no
--   key). An entity's kind is its key path's last element's kind, or null
--   if it has no key.
eKey :: Lens' Entity (Maybe Key)

-- | The entity's properties. The map's keys are property names. A property
--   name matching regex `<b>.*</b>` is reserved. A reserved property name
--   is forbidden in certain documented contexts. The name must not contain
--   more than 500 characters. The name cannot be `""`.
eProperties :: Lens' Entity (Maybe EntityProperties)

-- | The response for Datastore.Lookup.
--   
--   <i>See:</i> <a>lookupResponse</a> smart constructor.
data LookupResponse

-- | Creates a value of <a>LookupResponse</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>lrDeferred</a></li>
--   <li><a>lrFound</a></li>
--   <li><a>lrMissing</a></li>
--   </ul>
lookupResponse :: LookupResponse

-- | A list of keys that were not looked up due to resource constraints.
--   The order of results in this field is undefined and has no relation to
--   the order of the keys in the input.
lrDeferred :: Lens' LookupResponse [Key]

-- | Entities found as `ResultType.FULL` entities. The order of results in
--   this field is undefined and has no relation to the order of the keys
--   in the input.
lrFound :: Lens' LookupResponse [EntityResult]

-- | Entities not found as `ResultType.KEY_ONLY` entities. The order of
--   results in this field is undefined and has no relation to the order of
--   the keys in the input.
lrMissing :: Lens' LookupResponse [EntityResult]

-- | The desired order for a specific property.
--   
--   <i>See:</i> <a>propertyOrder</a> smart constructor.
data PropertyOrder

-- | Creates a value of <a>PropertyOrder</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>poProperty</a></li>
--   <li><a>poDirection</a></li>
--   </ul>
propertyOrder :: PropertyOrder

-- | The property to order by.
poProperty :: Lens' PropertyOrder (Maybe PropertyReference)

-- | The direction to order by. Defaults to `ASCENDING`.
poDirection :: Lens' PropertyOrder (Maybe PropertyOrderDirection)

-- | A binding parameter for a GQL query.
--   
--   <i>See:</i> <a>gqlQueryParameter</a> smart constructor.
data GqlQueryParameter

-- | Creates a value of <a>GqlQueryParameter</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>gqpCursor</a></li>
--   <li><a>gqpValue</a></li>
--   </ul>
gqlQueryParameter :: GqlQueryParameter

-- | A query cursor. Query cursors are returned in query result batches.
gqpCursor :: Lens' GqlQueryParameter (Maybe ByteString)

-- | A value parameter.
gqpValue :: Lens' GqlQueryParameter (Maybe Value)
