gogol-datastore-0.0.1: Google Cloud Datastore SDK.

Copyright(c) 2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.Datastore.Types

Contents

Description

 

Synopsis

Service Configuration

datastoreService :: Service Source

Default request referring to version v1beta2 of the Google Cloud Datastore API. This contains the host and root path used as a starting point for constructing service requests.

OAuth Scopes

userinfoEmailScope :: OAuthScope Source

View your email address

cloudPlatformScope :: OAuthScope Source

View and manage your data across Google Cloud Platform services

datastoreScope :: OAuthScope Source

View and manage your Google Cloud Datastore data

PropertyOrderDirection

RollbackRequest

rollbackRequest :: RollbackRequest Source

Creates a value of RollbackRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rrTransaction :: Lens' RollbackRequest (Maybe Word8) Source

The transaction identifier, returned by a call to beginTransaction.

Property

property :: Property Source

Creates a value of Property with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

pEntityValue :: Lens' Property (Maybe Entity) Source

An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.

pStringValue :: Lens' Property (Maybe Text) Source

A UTF-8 encoded string value. When indexed is true, may have at most 500 characters.

pListValue :: Lens' Property [Value] Source

A list value. Cannot contain another list value. A Value instance that sets field list_value must not set field meaning or field indexed.

pIndexed :: Lens' Property (Maybe Bool) Source

If the value should be indexed. The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.

pMeaning :: Lens' Property (Maybe Int32) Source

The meaning field is reserved and should not be used.

pBlobValue :: Lens' Property (Maybe Word8) Source

A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, may have at most 500 bytes.

PartitionId

data PartitionId Source

An identifier for a particular subset of entities. Entities are partitioned into various subsets, each used by different datasets and different namespaces within a dataset and so forth.

See: partitionId smart constructor.

partitionId :: PartitionId Source

Creates a value of PartitionId with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

QueryResultBatch

queryResultBatch :: QueryResultBatch Source

Creates a value of QueryResultBatch with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

qrbSkippedResults :: Lens' QueryResultBatch (Maybe Int32) Source

The number of results skipped because of Query.offset.

qrbEntityResultType :: Lens' QueryResultBatch (Maybe QueryResultBatchEntityResultType) Source

The result type for every entity in entityResults. full for full entities, projection for entities with only projected properties, keyOnly for entities with only a key.

qrbMoreResults :: Lens' QueryResultBatch (Maybe QueryResultBatchMoreResults) Source

The state of the query after the current batch. One of notFinished, moreResultsAfterLimit, noMoreResults.

qrbEndCursor :: Lens' QueryResultBatch (Maybe Word8) Source

A cursor that points to the position after the last result in the batch. May be absent. TODO(arfuller): Once all plans produce cursors update documentation here.

EntityProperties

entityProperties Source

Creates a value of EntityProperties with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

epAddtional :: Lens' EntityProperties (HashMap Text Property) Source

The name of the property. A property name matching regex ".*" is reserved. A reserved property name is forbidden in certain documented contexts. The name must not contain more than 500 characters. Cannot be "".

BeginTransactionRequest

beginTransactionRequest :: BeginTransactionRequest Source

Creates a value of BeginTransactionRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

btrIsolationLevel :: Lens' BeginTransactionRequest (Maybe BeginTransactionRequestIsolationLevel) Source

The transaction isolation level. Either snapshot or serializable. The default isolation level is snapshot isolation, which means that another transaction may not concurrently modify the data that is modified by this transaction. Optionally, a transaction can request to be made serializable which means that another transaction cannot concurrently modify the data that is read or modified by this transaction.

RunQueryRequest

runQueryRequest :: RunQueryRequest Source

Creates a value of RunQueryRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rqrPartitionId :: Lens' RunQueryRequest (Maybe PartitionId) Source

Entities are partitioned into subsets, identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID, but all other partition IDs in RunQueryRequest are normalized with this partition ID as the context partition ID.

rqrGqlQuery :: Lens' RunQueryRequest (Maybe GqlQuery) Source

The GQL query to run. Either this field or field query must be set, but not both.

rqrQuery :: Lens' RunQueryRequest (Maybe Query) Source

The query to run. Either this field or field gql_query must be set, but not both.

AllocateIdsRequest

allocateIdsRequest :: AllocateIdsRequest Source

Creates a value of AllocateIdsRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

airKeys :: Lens' AllocateIdsRequest [Key] Source

A list of keys with incomplete key paths to allocate IDs for. No key may be reserved/read-only.

QueryResultBatchEntityResultType

CompositeFilter

data CompositeFilter Source

A filter that merges the multiple other filters using the given operation.

See: compositeFilter smart constructor.

compositeFilter :: CompositeFilter Source

Creates a value of CompositeFilter with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

cfOperator :: Lens' CompositeFilter (Maybe CompositeFilterOperator) Source

The operator for combining multiple filters. Only "and" is currently supported.

cfFilters :: Lens' CompositeFilter [Filter] Source

The list of filters to combine. Must contain at least one filter.

CompositeFilterOperator

QueryResultBatchMoreResults

BeginTransactionResponse

beginTransactionResponse :: BeginTransactionResponse Source

Creates a value of BeginTransactionResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

btrTransaction :: Lens' BeginTransactionResponse (Maybe Word8) Source

The transaction identifier (always present).

MutationResult

mutationResult :: MutationResult Source

Creates a value of MutationResult with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

mrInsertAutoIdKeys :: Lens' MutationResult [Key] Source

Keys for insertAutoId entities. One per entity from the request, in the same order.

mrIndexUpdates :: Lens' MutationResult (Maybe Int32) Source

Number of index writes.

AllocateIdsResponse

allocateIdsResponse :: AllocateIdsResponse Source

Creates a value of AllocateIdsResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

aKeys :: Lens' AllocateIdsResponse [Key] Source

The keys specified in the request (in the same order), each with its key path completed with a newly allocated ID.

GqlQuery

gqlQuery :: GqlQuery Source

Creates a value of GqlQuery with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

gqAllowLiteral :: Lens' GqlQuery (Maybe Bool) Source

When false, the query string must not contain a literal.

gqNumberArgs :: Lens' GqlQuery [GqlQueryArg] Source

Numbered binding site '1 references the first numbered argument, effectively using 1-based indexing, rather than the usual 0. A numbered argument must NOT set field GqlQueryArg.name. For each binding site numbered i in query_string, there must be an ith numbered argument. The inverse must also be true.

gqNameArgs :: Lens' GqlQuery [GqlQueryArg] Source

A named argument must set field GqlQueryArg.name. No two named arguments may have the same name. For each non-reserved named binding site in the query string, there must be a named argument with that name, but not necessarily the inverse.

RunQueryResponse

runQueryResponse :: RunQueryResponse Source

Creates a value of RunQueryResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rqrBatch :: Lens' RunQueryResponse (Maybe QueryResultBatch) Source

A batch of query results (always present).

Value

data Value Source

A message that can hold any of the supported value types and associated metadata.

See: value smart constructor.

value :: Value Source

Creates a value of Value with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

vKeyValue :: Lens' Value (Maybe Key) Source

A key value.

vBlobKeyValue :: Lens' Value (Maybe Text) Source

A blob key value.

vDateTimeValue :: Lens' Value (Maybe UTCTime) Source

A timestamp value.

vIntegerValue :: Lens' Value (Maybe Int64) Source

An integer value.

vEntityValue :: Lens' Value (Maybe Entity) Source

An entity value. May have no key. May have a key with an incomplete key path. May have a reserved/read-only key.

vStringValue :: Lens' Value (Maybe Text) Source

A UTF-8 encoded string value. When indexed is true, may have at most 500 characters.

vListValue :: Lens' Value [Value] Source

A list value. Cannot contain another list value. A Value instance that sets field list_value must not set field meaning or field indexed.

vIndexed :: Lens' Value (Maybe Bool) Source

If the value should be indexed. The indexed property may be set for a null value. When indexed is true, stringValue is limited to 500 characters and the blob value is limited to 500 bytes. Input values by default have indexed set to true; however, you can explicitly set indexed to true if you want. (An output value never has indexed explicitly set to true.) If a value is itself an entity, it cannot have indexed set to true.

vBooleanValue :: Lens' Value (Maybe Bool) Source

A boolean value.

vMeaning :: Lens' Value (Maybe Int32) Source

The meaning field is reserved and should not be used.

vBlobValue :: Lens' Value (Maybe Word8) Source

A blob value. May be a maximum of 1,000,000 bytes. When indexed is true, may have at most 500 bytes.

LookupRequest

lookupRequest :: LookupRequest Source

Creates a value of LookupRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

lrKeys :: Lens' LookupRequest [Key] Source

Keys of entities to look up from the datastore.

lrReadOptions :: Lens' LookupRequest (Maybe ReadOptions) Source

Options for this lookup request. Optional.

ReadOptionsReadConsistency

Mutation

mutation :: Mutation Source

Creates a value of Mutation with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

mInsert :: Lens' Mutation [Entity] Source

Entities to insert. Each inserted entity's key must have a complete path and must not be reserved/read-only.

mForce :: Lens' Mutation (Maybe Bool) Source

Ignore a user specified read-only period. Optional.

mInsertAutoId :: Lens' Mutation [Entity] Source

Insert entities with a newly allocated ID. Each inserted entity's key must omit the final identifier in its path and must not be reserved/read-only.

mUpsert :: Lens' Mutation [Entity] Source

Entities to upsert. Each upserted entity's key must have a complete path and must not be reserved/read-only.

mDelete :: Lens' Mutation [Key] Source

Keys of entities to delete. Each key must have a complete key path and must not be reserved/read-only.

mUpdate :: Lens' Mutation [Entity] Source

Entities to update. Each updated entity's key must have a complete path and must not be reserved/read-only.

ResponseHeader

responseHeader :: ResponseHeader Source

Creates a value of ResponseHeader with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rhKind :: Lens' ResponseHeader Text Source

Identifies what kind of resource this is. Value: the fixed string "datastore#responseHeader".

KeyPathElement

data KeyPathElement Source

A (kind, ID/name) pair used to construct a key path. At most one of name or ID may be set. If either is set, the element is complete. If neither is set, the element is incomplete.

See: keyPathElement smart constructor.

keyPathElement :: KeyPathElement Source

Creates a value of KeyPathElement with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

kpeKind :: Lens' KeyPathElement (Maybe Text) Source

The kind of the entity. A kind matching regex ".*" is reserved/read-only. A kind must not contain more than 500 characters. Cannot be "".

kpeName :: Lens' KeyPathElement (Maybe Text) Source

The name of the entity. A name matching regex ".*" is reserved/read-only. A name must not be more than 500 characters. Cannot be "".

kpeId :: Lens' KeyPathElement (Maybe Int64) Source

The ID of the entity. Never equal to zero. Values less than zero are discouraged and will not be supported in the future.

PropertyReference

propertyReference :: PropertyReference Source

Creates a value of PropertyReference with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

prName :: Lens' PropertyReference (Maybe Text) Source

The name of the property.

GqlQueryArg

gqlQueryArg :: GqlQueryArg Source

Creates a value of GqlQueryArg with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

gqaName :: Lens' GqlQueryArg (Maybe Text) Source

Must match regex "[A-Za-z_$][A-Za-z_$0-9]*". Must not match regex ".*". Must not be "".

Key

data Key Source

A unique identifier for an entity.

See: key smart constructor.

key :: Key Source

Creates a value of Key with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

kPartitionId :: Lens' Key (Maybe PartitionId) Source

Entities are partitioned into subsets, currently identified by a dataset (usually implicitly specified by the project) and namespace ID. Queries are scoped to a single partition.

kPath :: Lens' Key [KeyPathElement] Source

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 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. A path can never be empty. The path can have at most 100 elements.

PropertyFilterOperator

PropertyFilter

propertyFilter :: PropertyFilter Source

Creates a value of PropertyFilter with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

pfOperator :: Lens' PropertyFilter (Maybe PropertyFilterOperator) Source

The operator to filter by. One of lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual, equal, or hasAncestor.

pfValue :: Lens' PropertyFilter (Maybe Value) Source

The value to compare the property to.

Query

query :: Query Source

Creates a value of Query with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

qGroupBy :: Lens' Query [PropertyReference] Source

The properties to group by (if empty, no grouping is applied to the result set).

qStartCursor :: Lens' Query (Maybe Word8) Source

A starting point for the query results. Optional. Query cursors are returned in query result batches.

qOffSet :: Lens' Query (Maybe Int32) Source

The number of results to skip. Applies before limit, but after all other constraints (optional, defaults to 0).

qEndCursor :: Lens' Query (Maybe Word8) Source

An ending point for the query results. Optional. Query cursors are returned in query result batches.

qLimit :: Lens' Query (Maybe Int32) Source

The maximum number of results to return. Applies after all other constraints. Optional.

qProjection :: Lens' Query [PropertyExpression] Source

The projection to return. If not set the entire entity is returned.

qFilter :: Lens' Query (Maybe Filter) Source

The filter to apply (optional).

qKinds :: Lens' Query [KindExpression] Source

The kinds to query (if empty, returns entities from all kinds).

qOrder :: Lens' Query [PropertyOrder] Source

The order to apply to the query results (if empty, order is unspecified).

EntityResult

entityResult :: EntityResult Source

Creates a value of EntityResult with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

erEntity :: Lens' EntityResult (Maybe Entity) Source

The resulting entity.

CommitResponse

commitResponse :: CommitResponse Source

Creates a value of CommitResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

crMutationResult :: Lens' CommitResponse (Maybe MutationResult) Source

The result of performing the mutation (if any).

KindExpression

kindExpression :: KindExpression Source

Creates a value of KindExpression with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

keName :: Lens' KindExpression (Maybe Text) Source

The name of the kind.

ReadOptions

readOptions :: ReadOptions Source

Creates a value of ReadOptions with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

roReadConsistency :: Lens' ReadOptions (Maybe ReadOptionsReadConsistency) Source

The read consistency to use. One of default, strong, or eventual. Cannot be set when transaction is set. Lookup and ancestor queries default to strong, global queries default to eventual and cannot be set to strong. Optional. Default is default.

roTransaction :: Lens' ReadOptions (Maybe Word8) Source

The transaction to use. Optional.

RollbackResponse

rollbackResponse :: RollbackResponse Source

Creates a value of RollbackResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

PropertyExpression

propertyExpression :: PropertyExpression Source

Creates a value of PropertyExpression with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

peAggregationFunction :: Lens' PropertyExpression (Maybe PropertyExpressionAggregationFunction) Source

The aggregation function to apply to the property. Optional. Can only be used when grouping by at least one property. Must then be set on all properties in the projection that are not being grouped by. Aggregation functions: first selects the first result as determined by the query's order.

Filter

data Filter Source

A holder for any type of filter. Exactly one field should be specified.

See: filter' smart constructor.

filter' :: Filter Source

Creates a value of Filter with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

BeginTransactionRequestIsolationLevel

data BeginTransactionRequestIsolationLevel Source

The transaction isolation level. Either snapshot or serializable. The default isolation level is snapshot isolation, which means that another transaction may not concurrently modify the data that is modified by this transaction. Optionally, a transaction can request to be made serializable which means that another transaction cannot concurrently modify the data that is read or modified by this transaction.

Constructors

Serializable
SERIALIZABLE
Snapshot
SNAPSHOT

CommitRequest

commitRequest :: CommitRequest Source

Creates a value of CommitRequest with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

crMode :: Lens' CommitRequest (Maybe CommitRequestMode) Source

The type of commit to perform. Either TRANSACTIONAL or NON_TRANSACTIONAL.

crMutation :: Lens' CommitRequest (Maybe Mutation) Source

The mutation to perform. Optional.

crTransaction :: Lens' CommitRequest (Maybe Word8) Source

The transaction identifier, returned by a call to beginTransaction. Must be set when mode is TRANSACTIONAL.

CommitRequestMode

PropertyExpressionAggregationFunction

Entity

entity :: Entity Source

Creates a value of Entity with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

eKey :: Lens' Entity (Maybe Key) Source

The entity's key. An entity must have a key, unless otherwise documented (for example, an entity in Value.entityValue may have no key). An entity's kind is its key's path's last element's kind, or null if it has no key.

eProperties :: Lens' Entity (Maybe EntityProperties) Source

The entity's properties.

LookupResponse

lookupResponse :: LookupResponse Source

Creates a value of LookupResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

lrDeferred :: Lens' LookupResponse [Key] Source

A list of keys that were not looked up due to resource constraints.

lrMissing :: Lens' LookupResponse [EntityResult] Source

Entities not found, with only the key populated.

PropertyOrder

propertyOrder :: PropertyOrder Source

Creates a value of PropertyOrder with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

poDirection :: Lens' PropertyOrder (Maybe PropertyOrderDirection) Source

The direction to order by. One of ascending or descending. Optional, defaults to ascending.