gestione documentale avanzata 1 parte

This commit is contained in:
2026-05-28 09:34:28 +02:00
parent 3471befb1a
commit f2b0833b90
34482 changed files with 4312269 additions and 546 deletions
@@ -0,0 +1,116 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class Aggregation extends \Google\Model
{
/**
* Optional. Optional name of the property to store the result of the
* aggregation. If not provided, Datastore will pick a default name following
* the format `property_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS
* count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*)
* OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1,
* COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS
* property_2 OVER ( ... ); ``` Requires: * Must be unique across all
* aggregation aliases. * Conform to entity property name limitations.
*
* @var string
*/
public $alias;
protected $avgType = Avg::class;
protected $avgDataType = '';
protected $countType = Count::class;
protected $countDataType = '';
protected $sumType = Sum::class;
protected $sumDataType = '';
/**
* Optional. Optional name of the property to store the result of the
* aggregation. If not provided, Datastore will pick a default name following
* the format `property_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS
* count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*)
* OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1,
* COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS
* property_2 OVER ( ... ); ``` Requires: * Must be unique across all
* aggregation aliases. * Conform to entity property name limitations.
*
* @param string $alias
*/
public function setAlias($alias)
{
$this->alias = $alias;
}
/**
* @return string
*/
public function getAlias()
{
return $this->alias;
}
/**
* Average aggregator.
*
* @param Avg $avg
*/
public function setAvg(Avg $avg)
{
$this->avg = $avg;
}
/**
* @return Avg
*/
public function getAvg()
{
return $this->avg;
}
/**
* Count aggregator.
*
* @param Count $count
*/
public function setCount(Count $count)
{
$this->count = $count;
}
/**
* @return Count
*/
public function getCount()
{
return $this->count;
}
/**
* Sum aggregator.
*
* @param Sum $sum
*/
public function setSum(Sum $sum)
{
$this->sum = $sum;
}
/**
* @return Sum
*/
public function getSum()
{
return $this->sum;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Aggregation::class, 'Google_Service_Datastore_Aggregation');
@@ -0,0 +1,65 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class AggregationQuery extends \Google\Collection
{
protected $collection_key = 'aggregations';
protected $aggregationsType = Aggregation::class;
protected $aggregationsDataType = 'array';
protected $nestedQueryType = Query::class;
protected $nestedQueryDataType = '';
/**
* Optional. Series of aggregations to apply over the results of the
* `nested_query`. Requires: * A minimum of one and maximum of five
* aggregations per query.
*
* @param Aggregation[] $aggregations
*/
public function setAggregations($aggregations)
{
$this->aggregations = $aggregations;
}
/**
* @return Aggregation[]
*/
public function getAggregations()
{
return $this->aggregations;
}
/**
* Nested query for aggregation
*
* @param Query $nestedQuery
*/
public function setNestedQuery(Query $nestedQuery)
{
$this->nestedQuery = $nestedQuery;
}
/**
* @return Query
*/
public function getNestedQuery()
{
return $this->nestedQuery;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AggregationQuery::class, 'Google_Service_Datastore_AggregationQuery');
@@ -0,0 +1,46 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class AggregationResult extends \Google\Model
{
protected $aggregatePropertiesType = Value::class;
protected $aggregatePropertiesDataType = 'map';
/**
* The result of the aggregation functions, ex: `COUNT(*) AS total_entities`.
* The key is the alias assigned to the aggregation function on input and the
* size of this map equals the number of aggregation functions in the query.
*
* @param Value[] $aggregateProperties
*/
public function setAggregateProperties($aggregateProperties)
{
$this->aggregateProperties = $aggregateProperties;
}
/**
* @return Value[]
*/
public function getAggregateProperties()
{
return $this->aggregateProperties;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AggregationResult::class, 'Google_Service_Datastore_AggregationResult');
@@ -0,0 +1,120 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class AggregationResultBatch extends \Google\Collection
{
/**
* Unspecified. This value is never used.
*/
public const MORE_RESULTS_MORE_RESULTS_TYPE_UNSPECIFIED = 'MORE_RESULTS_TYPE_UNSPECIFIED';
/**
* There may be additional batches to fetch from this query.
*/
public const MORE_RESULTS_NOT_FINISHED = 'NOT_FINISHED';
/**
* The query is finished, but there may be more results after the limit.
*/
public const MORE_RESULTS_MORE_RESULTS_AFTER_LIMIT = 'MORE_RESULTS_AFTER_LIMIT';
/**
* The query is finished, but there may be more results after the end cursor.
*/
public const MORE_RESULTS_MORE_RESULTS_AFTER_CURSOR = 'MORE_RESULTS_AFTER_CURSOR';
/**
* The query is finished, and there are no more results.
*/
public const MORE_RESULTS_NO_MORE_RESULTS = 'NO_MORE_RESULTS';
protected $collection_key = 'aggregationResults';
protected $aggregationResultsType = AggregationResult::class;
protected $aggregationResultsDataType = 'array';
/**
* The state of the query after the current batch. Only COUNT(*) aggregations
* are supported in the initial launch. Therefore, expected result type is
* limited to `NO_MORE_RESULTS`.
*
* @var string
*/
public $moreResults;
/**
* Read timestamp this batch was returned from. In a single transaction,
* subsequent query result batches for the same query can have a greater
* timestamp. Each batch's read timestamp is valid for all preceding batches.
*
* @var string
*/
public $readTime;
/**
* The aggregation results for this batch.
*
* @param AggregationResult[] $aggregationResults
*/
public function setAggregationResults($aggregationResults)
{
$this->aggregationResults = $aggregationResults;
}
/**
* @return AggregationResult[]
*/
public function getAggregationResults()
{
return $this->aggregationResults;
}
/**
* The state of the query after the current batch. Only COUNT(*) aggregations
* are supported in the initial launch. Therefore, expected result type is
* limited to `NO_MORE_RESULTS`.
*
* Accepted values: MORE_RESULTS_TYPE_UNSPECIFIED, NOT_FINISHED,
* MORE_RESULTS_AFTER_LIMIT, MORE_RESULTS_AFTER_CURSOR, NO_MORE_RESULTS
*
* @param self::MORE_RESULTS_* $moreResults
*/
public function setMoreResults($moreResults)
{
$this->moreResults = $moreResults;
}
/**
* @return self::MORE_RESULTS_*
*/
public function getMoreResults()
{
return $this->moreResults;
}
/**
* Read timestamp this batch was returned from. In a single transaction,
* subsequent query result batches for the same query can have a greater
* timestamp. Each batch's read timestamp is valid for all preceding batches.
*
* @param string $readTime
*/
public function setReadTime($readTime)
{
$this->readTime = $readTime;
}
/**
* @return string
*/
public function getReadTime()
{
return $this->readTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AggregationResultBatch::class, 'Google_Service_Datastore_AggregationResultBatch');
@@ -0,0 +1,70 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class AllocateIdsRequest extends \Google\Collection
{
protected $collection_key = 'keys';
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @var string
*/
public $databaseId;
protected $keysType = Key::class;
protected $keysDataType = 'array';
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @param string $databaseId
*/
public function setDatabaseId($databaseId)
{
$this->databaseId = $databaseId;
}
/**
* @return string
*/
public function getDatabaseId()
{
return $this->databaseId;
}
/**
* Required. A list of keys with incomplete key paths for which to allocate
* IDs. No key may be reserved/read-only.
*
* @param Key[] $keys
*/
public function setKeys($keys)
{
$this->keys = $keys;
}
/**
* @return Key[]
*/
public function getKeys()
{
return $this->keys;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AllocateIdsRequest::class, 'Google_Service_Datastore_AllocateIdsRequest');
@@ -0,0 +1,46 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class AllocateIdsResponse extends \Google\Collection
{
protected $collection_key = 'keys';
protected $keysType = Key::class;
protected $keysDataType = 'array';
/**
* The keys specified in the request (in the same order), each with its key
* path completed with a newly allocated ID.
*
* @param Key[] $keys
*/
public function setKeys($keys)
{
$this->keys = $keys;
}
/**
* @return Key[]
*/
public function getKeys()
{
return $this->keys;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AllocateIdsResponse::class, 'Google_Service_Datastore_AllocateIdsResponse');
@@ -0,0 +1,46 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class ArrayValue extends \Google\Collection
{
protected $collection_key = 'values';
protected $valuesType = Value::class;
protected $valuesDataType = 'array';
/**
* Values in the array. The order of values in an array is preserved as long
* as all values have identical settings for 'exclude_from_indexes'.
*
* @param Value[] $values
*/
public function setValues($values)
{
$this->values = $values;
}
/**
* @return Value[]
*/
public function getValues()
{
return $this->values;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ArrayValue::class, 'Google_Service_Datastore_ArrayValue');
+44
View File
@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class Avg extends \Google\Model
{
protected $propertyType = PropertyReference::class;
protected $propertyDataType = '';
/**
* The property to aggregate on.
*
* @param PropertyReference $property
*/
public function setProperty(PropertyReference $property)
{
$this->property = $property;
}
/**
* @return PropertyReference
*/
public function getProperty()
{
return $this->property;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Avg::class, 'Google_Service_Datastore_Avg');
@@ -0,0 +1,68 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class BeginTransactionRequest extends \Google\Model
{
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @var string
*/
public $databaseId;
protected $transactionOptionsType = TransactionOptions::class;
protected $transactionOptionsDataType = '';
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @param string $databaseId
*/
public function setDatabaseId($databaseId)
{
$this->databaseId = $databaseId;
}
/**
* @return string
*/
public function getDatabaseId()
{
return $this->databaseId;
}
/**
* Options for a new transaction.
*
* @param TransactionOptions $transactionOptions
*/
public function setTransactionOptions(TransactionOptions $transactionOptions)
{
$this->transactionOptions = $transactionOptions;
}
/**
* @return TransactionOptions
*/
public function getTransactionOptions()
{
return $this->transactionOptions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BeginTransactionRequest::class, 'Google_Service_Datastore_BeginTransactionRequest');
@@ -0,0 +1,48 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class BeginTransactionResponse extends \Google\Model
{
/**
* The transaction identifier (always present).
*
* @var string
*/
public $transaction;
/**
* The transaction identifier (always present).
*
* @param string $transaction
*/
public function setTransaction($transaction)
{
$this->transaction = $transaction;
}
/**
* @return string
*/
public function getTransaction()
{
return $this->transaction;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BeginTransactionResponse::class, 'Google_Service_Datastore_BeginTransactionResponse');
@@ -0,0 +1,156 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class CommitRequest extends \Google\Collection
{
/**
* Unspecified. This value must not be used.
*/
public const MODE_MODE_UNSPECIFIED = 'MODE_UNSPECIFIED';
/**
* Transactional: The mutations are either all applied, or none are applied.
* Learn about transactions
* [here](https://cloud.google.com/datastore/docs/concepts/transactions).
*/
public const MODE_TRANSACTIONAL = 'TRANSACTIONAL';
/**
* Non-transactional: The mutations may not apply as all or none.
*/
public const MODE_NON_TRANSACTIONAL = 'NON_TRANSACTIONAL';
protected $collection_key = 'mutations';
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @var string
*/
public $databaseId;
/**
* The type of commit to perform. Defaults to `TRANSACTIONAL`.
*
* @var string
*/
public $mode;
protected $mutationsType = Mutation::class;
protected $mutationsDataType = 'array';
protected $singleUseTransactionType = TransactionOptions::class;
protected $singleUseTransactionDataType = '';
/**
* The identifier of the transaction associated with the commit. A transaction
* identifier is returned by a call to Datastore.BeginTransaction.
*
* @var string
*/
public $transaction;
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @param string $databaseId
*/
public function setDatabaseId($databaseId)
{
$this->databaseId = $databaseId;
}
/**
* @return string
*/
public function getDatabaseId()
{
return $this->databaseId;
}
/**
* The type of commit to perform. Defaults to `TRANSACTIONAL`.
*
* Accepted values: MODE_UNSPECIFIED, TRANSACTIONAL, NON_TRANSACTIONAL
*
* @param self::MODE_* $mode
*/
public function setMode($mode)
{
$this->mode = $mode;
}
/**
* @return self::MODE_*
*/
public function getMode()
{
return $this->mode;
}
/**
* 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.
*
* @param Mutation[] $mutations
*/
public function setMutations($mutations)
{
$this->mutations = $mutations;
}
/**
* @return Mutation[]
*/
public function getMutations()
{
return $this->mutations;
}
/**
* Options for beginning a new transaction for this request. The transaction
* is committed when the request completes. If specified,
* TransactionOptions.mode must be TransactionOptions.ReadWrite.
*
* @param TransactionOptions $singleUseTransaction
*/
public function setSingleUseTransaction(TransactionOptions $singleUseTransaction)
{
$this->singleUseTransaction = $singleUseTransaction;
}
/**
* @return TransactionOptions
*/
public function getSingleUseTransaction()
{
return $this->singleUseTransaction;
}
/**
* The identifier of the transaction associated with the commit. A transaction
* identifier is returned by a call to Datastore.BeginTransaction.
*
* @param string $transaction
*/
public function setTransaction($transaction)
{
$this->transaction = $transaction;
}
/**
* @return string
*/
public function getTransaction()
{
return $this->transaction;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CommitRequest::class, 'Google_Service_Datastore_CommitRequest');
@@ -0,0 +1,92 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class CommitResponse extends \Google\Collection
{
protected $collection_key = 'mutationResults';
/**
* The transaction commit timestamp. Not set for non-transactional commits.
*
* @var string
*/
public $commitTime;
/**
* The number of index entries updated during the commit, or zero if none were
* updated.
*
* @var int
*/
public $indexUpdates;
protected $mutationResultsType = MutationResult::class;
protected $mutationResultsDataType = 'array';
/**
* The transaction commit timestamp. Not set for non-transactional commits.
*
* @param string $commitTime
*/
public function setCommitTime($commitTime)
{
$this->commitTime = $commitTime;
}
/**
* @return string
*/
public function getCommitTime()
{
return $this->commitTime;
}
/**
* The number of index entries updated during the commit, or zero if none were
* updated.
*
* @param int $indexUpdates
*/
public function setIndexUpdates($indexUpdates)
{
$this->indexUpdates = $indexUpdates;
}
/**
* @return int
*/
public function getIndexUpdates()
{
return $this->indexUpdates;
}
/**
* The result of performing the mutations. The i-th mutation result
* corresponds to the i-th mutation in the request.
*
* @param MutationResult[] $mutationResults
*/
public function setMutationResults($mutationResults)
{
$this->mutationResults = $mutationResults;
}
/**
* @return MutationResult[]
*/
public function getMutationResults()
{
return $this->mutationResults;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CommitResponse::class, 'Google_Service_Datastore_CommitResponse');
@@ -0,0 +1,81 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class CompositeFilter extends \Google\Collection
{
/**
* Unspecified. This value must not be used.
*/
public const OP_OPERATOR_UNSPECIFIED = 'OPERATOR_UNSPECIFIED';
/**
* The results are required to satisfy each of the combined filters.
*/
public const OP_AND = 'AND';
/**
* Documents are required to satisfy at least one of the combined filters.
*/
public const OP_OR = 'OR';
protected $collection_key = 'filters';
protected $filtersType = Filter::class;
protected $filtersDataType = 'array';
/**
* The operator for combining multiple filters.
*
* @var string
*/
public $op;
/**
* The list of filters to combine. Requires: * At least one filter is present.
*
* @param Filter[] $filters
*/
public function setFilters($filters)
{
$this->filters = $filters;
}
/**
* @return Filter[]
*/
public function getFilters()
{
return $this->filters;
}
/**
* The operator for combining multiple filters.
*
* Accepted values: OPERATOR_UNSPECIFIED, AND, OR
*
* @param self::OP_* $op
*/
public function setOp($op)
{
$this->op = $op;
}
/**
* @return self::OP_*
*/
public function getOp()
{
return $this->op;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CompositeFilter::class, 'Google_Service_Datastore_CompositeFilter');
@@ -0,0 +1,58 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class Count extends \Google\Model
{
/**
* Optional. Optional constraint on the maximum number of entities to count.
* This provides a way to set an upper bound on the number of entities to
* scan, limiting latency, and cost. Unspecified is interpreted as no bound.
* If a zero value is provided, a count result of zero should always be
* expected. High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT
* * FROM k ); ``` Requires: * Must be non-negative when present.
*
* @var string
*/
public $upTo;
/**
* Optional. Optional constraint on the maximum number of entities to count.
* This provides a way to set an upper bound on the number of entities to
* scan, limiting latency, and cost. Unspecified is interpreted as no bound.
* If a zero value is provided, a count result of zero should always be
* expected. High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT
* * FROM k ); ``` Requires: * Must be non-negative when present.
*
* @param string $upTo
*/
public function setUpTo($upTo)
{
$this->upTo = $upTo;
}
/**
* @return string
*/
public function getUpTo()
{
return $this->upTo;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Count::class, 'Google_Service_Datastore_Count');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class DatastoreEmpty extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DatastoreEmpty::class, 'Google_Service_Datastore_DatastoreEmpty');
@@ -0,0 +1,54 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class DatastoreReadOnly extends \Google\Model
{
/**
* Reads entities at the given time. This must be a microsecond precision
* timestamp within the past one hour, or if Point-in-Time Recovery is
* enabled, can additionally be a whole minute timestamp within the past 7
* days.
*
* @var string
*/
public $readTime;
/**
* Reads entities at the given time. This must be a microsecond precision
* timestamp within the past one hour, or if Point-in-Time Recovery is
* enabled, can additionally be a whole minute timestamp within the past 7
* days.
*
* @param string $readTime
*/
public function setReadTime($readTime)
{
$this->readTime = $readTime;
}
/**
* @return string
*/
public function getReadTime()
{
return $this->readTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DatastoreReadOnly::class, 'Google_Service_Datastore_DatastoreReadOnly');
@@ -0,0 +1,68 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class Entity extends \Google\Model
{
protected $keyType = Key::class;
protected $keyDataType = '';
protected $propertiesType = Value::class;
protected $propertiesDataType = 'map';
/**
* 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.
*
* @param Key $key
*/
public function setKey(Key $key)
{
$this->key = $key;
}
/**
* @return Key
*/
public function getKey()
{
return $this->key;
}
/**
* The entity's properties. The map's keys are property names. A property name
* matching regex `__.*__` is reserved. A reserved property name is forbidden
* in certain documented contexts. The map keys, represented as UTF-8, must
* not exceed 1,500 bytes and cannot be empty.
*
* @param Value[] $properties
*/
public function setProperties($properties)
{
$this->properties = $properties;
}
/**
* @return Value[]
*/
public function getProperties()
{
return $this->properties;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Entity::class, 'Google_Service_Datastore_Entity');
@@ -0,0 +1,146 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class EntityResult extends \Google\Model
{
/**
* The time at which the entity was created. This field is set for `FULL`
* entity results. If this entity is missing, this field will not be set.
*
* @var string
*/
public $createTime;
/**
* A cursor that points to the position after the result entity. Set only when
* the `EntityResult` is part of a `QueryResultBatch` message.
*
* @var string
*/
public $cursor;
protected $entityType = Entity::class;
protected $entityDataType = '';
/**
* The time at which the entity was last changed. This field is set for `FULL`
* entity results. If this entity is missing, this field will not be set.
*
* @var string
*/
public $updateTime;
/**
* 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.
*
* @var string
*/
public $version;
/**
* The time at which the entity was created. This field is set for `FULL`
* entity results. If this entity is missing, this field will not be set.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* A cursor that points to the position after the result entity. Set only when
* the `EntityResult` is part of a `QueryResultBatch` message.
*
* @param string $cursor
*/
public function setCursor($cursor)
{
$this->cursor = $cursor;
}
/**
* @return string
*/
public function getCursor()
{
return $this->cursor;
}
/**
* The resulting entity.
*
* @param Entity $entity
*/
public function setEntity(Entity $entity)
{
$this->entity = $entity;
}
/**
* @return Entity
*/
public function getEntity()
{
return $this->entity;
}
/**
* The time at which the entity was last changed. This field is set for `FULL`
* entity results. If this entity is missing, this field will not be set.
*
* @param string $updateTime
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
/**
* 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.
*
* @param string $version
*/
public function setVersion($version)
{
$this->version = $version;
}
/**
* @return string
*/
public function getVersion()
{
return $this->version;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(EntityResult::class, 'Google_Service_Datastore_EntityResult');
@@ -0,0 +1,124 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class ExecutionStats extends \Google\Model
{
/**
* Debugging statistics from the execution of the query. Note that the
* debugging stats are subject to change as Firestore evolves. It could
* include: { "indexes_entries_scanned": "1000", "documents_scanned": "20",
* "billing_details" : { "documents_billable": "20", "index_entries_billable":
* "1000", "min_query_cost": "0" } }
*
* @var array[]
*/
public $debugStats;
/**
* Total time to execute the query in the backend.
*
* @var string
*/
public $executionDuration;
/**
* Total billable read operations.
*
* @var string
*/
public $readOperations;
/**
* Total number of results returned, including documents, projections,
* aggregation results, keys.
*
* @var string
*/
public $resultsReturned;
/**
* Debugging statistics from the execution of the query. Note that the
* debugging stats are subject to change as Firestore evolves. It could
* include: { "indexes_entries_scanned": "1000", "documents_scanned": "20",
* "billing_details" : { "documents_billable": "20", "index_entries_billable":
* "1000", "min_query_cost": "0" } }
*
* @param array[] $debugStats
*/
public function setDebugStats($debugStats)
{
$this->debugStats = $debugStats;
}
/**
* @return array[]
*/
public function getDebugStats()
{
return $this->debugStats;
}
/**
* Total time to execute the query in the backend.
*
* @param string $executionDuration
*/
public function setExecutionDuration($executionDuration)
{
$this->executionDuration = $executionDuration;
}
/**
* @return string
*/
public function getExecutionDuration()
{
return $this->executionDuration;
}
/**
* Total billable read operations.
*
* @param string $readOperations
*/
public function setReadOperations($readOperations)
{
$this->readOperations = $readOperations;
}
/**
* @return string
*/
public function getReadOperations()
{
return $this->readOperations;
}
/**
* Total number of results returned, including documents, projections,
* aggregation results, keys.
*
* @param string $resultsReturned
*/
public function setResultsReturned($resultsReturned)
{
$this->resultsReturned = $resultsReturned;
}
/**
* @return string
*/
public function getResultsReturned()
{
return $this->resultsReturned;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ExecutionStats::class, 'Google_Service_Datastore_ExecutionStats');
@@ -0,0 +1,63 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class ExplainMetrics extends \Google\Model
{
protected $executionStatsType = ExecutionStats::class;
protected $executionStatsDataType = '';
protected $planSummaryType = PlanSummary::class;
protected $planSummaryDataType = '';
/**
* Aggregated stats from the execution of the query. Only present when
* ExplainOptions.analyze is set to true.
*
* @param ExecutionStats $executionStats
*/
public function setExecutionStats(ExecutionStats $executionStats)
{
$this->executionStats = $executionStats;
}
/**
* @return ExecutionStats
*/
public function getExecutionStats()
{
return $this->executionStats;
}
/**
* Planning phase information for the query.
*
* @param PlanSummary $planSummary
*/
public function setPlanSummary(PlanSummary $planSummary)
{
$this->planSummary = $planSummary;
}
/**
* @return PlanSummary
*/
public function getPlanSummary()
{
return $this->planSummary;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ExplainMetrics::class, 'Google_Service_Datastore_ExplainMetrics');
@@ -0,0 +1,54 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class ExplainOptions extends \Google\Model
{
/**
* Optional. Whether to execute this query. When false (the default), the
* query will be planned, returning only metrics from the planning stages.
* When true, the query will be planned and executed, returning the full query
* results along with both planning and execution stage metrics.
*
* @var bool
*/
public $analyze;
/**
* Optional. Whether to execute this query. When false (the default), the
* query will be planned, returning only metrics from the planning stages.
* When true, the query will be planned and executed, returning the full query
* results along with both planning and execution stage metrics.
*
* @param bool $analyze
*/
public function setAnalyze($analyze)
{
$this->analyze = $analyze;
}
/**
* @return bool
*/
public function getAnalyze()
{
return $this->analyze;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ExplainOptions::class, 'Google_Service_Datastore_ExplainOptions');
@@ -0,0 +1,62 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class Filter extends \Google\Model
{
protected $compositeFilterType = CompositeFilter::class;
protected $compositeFilterDataType = '';
protected $propertyFilterType = PropertyFilter::class;
protected $propertyFilterDataType = '';
/**
* A composite filter.
*
* @param CompositeFilter $compositeFilter
*/
public function setCompositeFilter(CompositeFilter $compositeFilter)
{
$this->compositeFilter = $compositeFilter;
}
/**
* @return CompositeFilter
*/
public function getCompositeFilter()
{
return $this->compositeFilter;
}
/**
* A filter on a property.
*
* @param PropertyFilter $propertyFilter
*/
public function setPropertyFilter(PropertyFilter $propertyFilter)
{
$this->propertyFilter = $propertyFilter;
}
/**
* @return PropertyFilter
*/
public function getPropertyFilter()
{
return $this->propertyFilter;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Filter::class, 'Google_Service_Datastore_Filter');
@@ -0,0 +1,184 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class FindNearest extends \Google\Model
{
/**
* Should not be set.
*/
public const DISTANCE_MEASURE_DISTANCE_MEASURE_UNSPECIFIED = 'DISTANCE_MEASURE_UNSPECIFIED';
/**
* Measures the EUCLIDEAN distance between the vectors. See
* [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn
* more. The resulting distance decreases the more similar two vectors are.
*/
public const DISTANCE_MEASURE_EUCLIDEAN = 'EUCLIDEAN';
/**
* COSINE distance compares vectors based on the angle between them, which
* allows you to measure similarity that isn't based on the vectors magnitude.
* We recommend using DOT_PRODUCT with unit normalized vectors instead of
* COSINE distance, which is mathematically equivalent with better
* performance. See [Cosine
* Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn more
* about COSINE similarity and COSINE distance. The resulting COSINE distance
* decreases the more similar two vectors are.
*/
public const DISTANCE_MEASURE_COSINE = 'COSINE';
/**
* Similar to cosine but is affected by the magnitude of the vectors. See [Dot
* Product](https://en.wikipedia.org/wiki/Dot_product) to learn more. The
* resulting distance increases the more similar two vectors are.
*/
public const DISTANCE_MEASURE_DOT_PRODUCT = 'DOT_PRODUCT';
/**
* Required. The Distance Measure to use, required.
*
* @var string
*/
public $distanceMeasure;
/**
* Optional. Optional name of the field to output the result of the vector
* distance calculation. Must conform to entity property limitations.
*
* @var string
*/
public $distanceResultProperty;
/**
* Optional. Option to specify a threshold for which no less similar documents
* will be returned. The behavior of the specified `distance_measure` will
* affect the meaning of the distance threshold. Since DOT_PRODUCT distances
* increase when the vectors are more similar, the comparison is inverted. *
* For EUCLIDEAN, COSINE: WHERE distance <= distance_threshold * For
* DOT_PRODUCT: WHERE distance >= distance_threshold
*
* @var
*/
public $distanceThreshold;
/**
* Required. The number of nearest neighbors to return. Must be a positive
* integer of no more than 100.
*
* @var int
*/
public $limit;
protected $queryVectorType = Value::class;
protected $queryVectorDataType = '';
protected $vectorPropertyType = PropertyReference::class;
protected $vectorPropertyDataType = '';
/**
* Required. The Distance Measure to use, required.
*
* Accepted values: DISTANCE_MEASURE_UNSPECIFIED, EUCLIDEAN, COSINE,
* DOT_PRODUCT
*
* @param self::DISTANCE_MEASURE_* $distanceMeasure
*/
public function setDistanceMeasure($distanceMeasure)
{
$this->distanceMeasure = $distanceMeasure;
}
/**
* @return self::DISTANCE_MEASURE_*
*/
public function getDistanceMeasure()
{
return $this->distanceMeasure;
}
/**
* Optional. Optional name of the field to output the result of the vector
* distance calculation. Must conform to entity property limitations.
*
* @param string $distanceResultProperty
*/
public function setDistanceResultProperty($distanceResultProperty)
{
$this->distanceResultProperty = $distanceResultProperty;
}
/**
* @return string
*/
public function getDistanceResultProperty()
{
return $this->distanceResultProperty;
}
public function setDistanceThreshold($distanceThreshold)
{
$this->distanceThreshold = $distanceThreshold;
}
public function getDistanceThreshold()
{
return $this->distanceThreshold;
}
/**
* Required. The number of nearest neighbors to return. Must be a positive
* integer of no more than 100.
*
* @param int $limit
*/
public function setLimit($limit)
{
$this->limit = $limit;
}
/**
* @return int
*/
public function getLimit()
{
return $this->limit;
}
/**
* Required. The query vector that we are searching on. Must be a vector of no
* more than 2048 dimensions.
*
* @param Value $queryVector
*/
public function setQueryVector(Value $queryVector)
{
$this->queryVector = $queryVector;
}
/**
* @return Value
*/
public function getQueryVector()
{
return $this->queryVector;
}
/**
* Required. An indexed vector property to search upon. Only documents which
* contain vectors whose dimensionality match the query_vector can be
* returned.
*
* @param PropertyReference $vectorProperty
*/
public function setVectorProperty(PropertyReference $vectorProperty)
{
$this->vectorProperty = $vectorProperty;
}
/**
* @return PropertyReference
*/
public function getVectorProperty()
{
return $this->vectorProperty;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FindNearest::class, 'Google_Service_Datastore_FindNearest');
@@ -0,0 +1,200 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1CommonMetadata extends \Google\Model
{
/**
* Unspecified.
*/
public const OPERATION_TYPE_OPERATION_TYPE_UNSPECIFIED = 'OPERATION_TYPE_UNSPECIFIED';
/**
* ExportEntities.
*/
public const OPERATION_TYPE_EXPORT_ENTITIES = 'EXPORT_ENTITIES';
/**
* ImportEntities.
*/
public const OPERATION_TYPE_IMPORT_ENTITIES = 'IMPORT_ENTITIES';
/**
* CreateIndex.
*/
public const OPERATION_TYPE_CREATE_INDEX = 'CREATE_INDEX';
/**
* DeleteIndex.
*/
public const OPERATION_TYPE_DELETE_INDEX = 'DELETE_INDEX';
/**
* Unspecified.
*/
public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
/**
* Request is being prepared for processing.
*/
public const STATE_INITIALIZING = 'INITIALIZING';
/**
* Request is actively being processed.
*/
public const STATE_PROCESSING = 'PROCESSING';
/**
* Request is in the process of being cancelled after user called
* google.longrunning.Operations.CancelOperation on the operation.
*/
public const STATE_CANCELLING = 'CANCELLING';
/**
* Request has been processed and is in its finalization stage.
*/
public const STATE_FINALIZING = 'FINALIZING';
/**
* Request has completed successfully.
*/
public const STATE_SUCCESSFUL = 'SUCCESSFUL';
/**
* Request has finished being processed, but encountered an error.
*/
public const STATE_FAILED = 'FAILED';
/**
* Request has finished being cancelled after user called
* google.longrunning.Operations.CancelOperation.
*/
public const STATE_CANCELLED = 'CANCELLED';
/**
* The time the operation ended, either successfully or otherwise.
*
* @var string
*/
public $endTime;
/**
* The client-assigned labels which were provided when the operation was
* created. May also include additional labels.
*
* @var string[]
*/
public $labels;
/**
* The type of the operation. Can be used as a filter in
* ListOperationsRequest.
*
* @var string
*/
public $operationType;
/**
* The time that work began on the operation.
*
* @var string
*/
public $startTime;
/**
* The current state of the Operation.
*
* @var string
*/
public $state;
/**
* The time the operation ended, either successfully or otherwise.
*
* @param string $endTime
*/
public function setEndTime($endTime)
{
$this->endTime = $endTime;
}
/**
* @return string
*/
public function getEndTime()
{
return $this->endTime;
}
/**
* The client-assigned labels which were provided when the operation was
* created. May also include additional labels.
*
* @param string[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return string[]
*/
public function getLabels()
{
return $this->labels;
}
/**
* The type of the operation. Can be used as a filter in
* ListOperationsRequest.
*
* Accepted values: OPERATION_TYPE_UNSPECIFIED, EXPORT_ENTITIES,
* IMPORT_ENTITIES, CREATE_INDEX, DELETE_INDEX
*
* @param self::OPERATION_TYPE_* $operationType
*/
public function setOperationType($operationType)
{
$this->operationType = $operationType;
}
/**
* @return self::OPERATION_TYPE_*
*/
public function getOperationType()
{
return $this->operationType;
}
/**
* The time that work began on the operation.
*
* @param string $startTime
*/
public function setStartTime($startTime)
{
$this->startTime = $startTime;
}
/**
* @return string
*/
public function getStartTime()
{
return $this->startTime;
}
/**
* The current state of the Operation.
*
* Accepted values: STATE_UNSPECIFIED, INITIALIZING, PROCESSING, CANCELLING,
* FINALIZING, SUCCESSFUL, FAILED, CANCELLED
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1CommonMetadata::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1CommonMetadata');
@@ -0,0 +1,130 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1DatastoreFirestoreMigrationMetadata extends \Google\Model
{
/**
* Unspecified.
*/
public const MIGRATION_STATE_MIGRATION_STATE_UNSPECIFIED = 'MIGRATION_STATE_UNSPECIFIED';
/**
* The migration is running.
*/
public const MIGRATION_STATE_RUNNING = 'RUNNING';
/**
* The migration is paused.
*/
public const MIGRATION_STATE_PAUSED = 'PAUSED';
/**
* The migration is complete.
*/
public const MIGRATION_STATE_COMPLETE = 'COMPLETE';
/**
* Unspecified.
*/
public const MIGRATION_STEP_MIGRATION_STEP_UNSPECIFIED = 'MIGRATION_STEP_UNSPECIFIED';
/**
* Pre-migration: the database is prepared for migration.
*/
public const MIGRATION_STEP_PREPARE = 'PREPARE';
/**
* Start of migration.
*/
public const MIGRATION_STEP_START = 'START';
/**
* Writes are applied synchronously to at least one replica.
*/
public const MIGRATION_STEP_APPLY_WRITES_SYNCHRONOUSLY = 'APPLY_WRITES_SYNCHRONOUSLY';
/**
* Data is copied to Cloud Firestore and then verified to match the data in
* Cloud Datastore.
*/
public const MIGRATION_STEP_COPY_AND_VERIFY = 'COPY_AND_VERIFY';
/**
* Eventually-consistent reads are redirected to Cloud Firestore.
*/
public const MIGRATION_STEP_REDIRECT_EVENTUALLY_CONSISTENT_READS = 'REDIRECT_EVENTUALLY_CONSISTENT_READS';
/**
* Strongly-consistent reads are redirected to Cloud Firestore.
*/
public const MIGRATION_STEP_REDIRECT_STRONGLY_CONSISTENT_READS = 'REDIRECT_STRONGLY_CONSISTENT_READS';
/**
* Writes are redirected to Cloud Firestore.
*/
public const MIGRATION_STEP_REDIRECT_WRITES = 'REDIRECT_WRITES';
/**
* The current state of migration from Cloud Datastore to Cloud Firestore in
* Datastore mode.
*
* @var string
*/
public $migrationState;
/**
* The current step of migration from Cloud Datastore to Cloud Firestore in
* Datastore mode.
*
* @var string
*/
public $migrationStep;
/**
* The current state of migration from Cloud Datastore to Cloud Firestore in
* Datastore mode.
*
* Accepted values: MIGRATION_STATE_UNSPECIFIED, RUNNING, PAUSED, COMPLETE
*
* @param self::MIGRATION_STATE_* $migrationState
*/
public function setMigrationState($migrationState)
{
$this->migrationState = $migrationState;
}
/**
* @return self::MIGRATION_STATE_*
*/
public function getMigrationState()
{
return $this->migrationState;
}
/**
* The current step of migration from Cloud Datastore to Cloud Firestore in
* Datastore mode.
*
* Accepted values: MIGRATION_STEP_UNSPECIFIED, PREPARE, START,
* APPLY_WRITES_SYNCHRONOUSLY, COPY_AND_VERIFY,
* REDIRECT_EVENTUALLY_CONSISTENT_READS, REDIRECT_STRONGLY_CONSISTENT_READS,
* REDIRECT_WRITES
*
* @param self::MIGRATION_STEP_* $migrationStep
*/
public function setMigrationStep($migrationStep)
{
$this->migrationStep = $migrationStep;
}
/**
* @return self::MIGRATION_STEP_*
*/
public function getMigrationStep()
{
return $this->migrationStep;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1DatastoreFirestoreMigrationMetadata::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1DatastoreFirestoreMigrationMetadata');
@@ -0,0 +1,79 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1EntityFilter extends \Google\Collection
{
protected $collection_key = 'namespaceIds';
/**
* If empty, then this represents all kinds.
*
* @var string[]
*/
public $kinds;
/**
* An empty list represents all namespaces. This is the preferred usage for
* projects that don't use namespaces. An empty string element represents the
* default namespace. This should be used if the project has data in non-
* default namespaces, but doesn't want to include them. Each namespace in
* this list must be unique.
*
* @var string[]
*/
public $namespaceIds;
/**
* If empty, then this represents all kinds.
*
* @param string[] $kinds
*/
public function setKinds($kinds)
{
$this->kinds = $kinds;
}
/**
* @return string[]
*/
public function getKinds()
{
return $this->kinds;
}
/**
* An empty list represents all namespaces. This is the preferred usage for
* projects that don't use namespaces. An empty string element represents the
* default namespace. This should be used if the project has data in non-
* default namespaces, but doesn't want to include them. Each namespace in
* this list must be unique.
*
* @param string[] $namespaceIds
*/
public function setNamespaceIds($namespaceIds)
{
$this->namespaceIds = $namespaceIds;
}
/**
* @return string[]
*/
public function getNamespaceIds()
{
return $this->namespaceIds;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1EntityFilter::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1EntityFilter');
@@ -0,0 +1,128 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1ExportEntitiesMetadata extends \Google\Model
{
protected $commonType = GoogleDatastoreAdminV1CommonMetadata::class;
protected $commonDataType = '';
protected $entityFilterType = GoogleDatastoreAdminV1EntityFilter::class;
protected $entityFilterDataType = '';
/**
* Location for the export metadata and data files. This will be the same
* value as the
* google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix field.
* The final output location is provided in
* google.datastore.admin.v1.ExportEntitiesResponse.output_url.
*
* @var string
*/
public $outputUrlPrefix;
protected $progressBytesType = GoogleDatastoreAdminV1Progress::class;
protected $progressBytesDataType = '';
protected $progressEntitiesType = GoogleDatastoreAdminV1Progress::class;
protected $progressEntitiesDataType = '';
/**
* Metadata common to all Datastore Admin operations.
*
* @param GoogleDatastoreAdminV1CommonMetadata $common
*/
public function setCommon(GoogleDatastoreAdminV1CommonMetadata $common)
{
$this->common = $common;
}
/**
* @return GoogleDatastoreAdminV1CommonMetadata
*/
public function getCommon()
{
return $this->common;
}
/**
* Description of which entities are being exported.
*
* @param GoogleDatastoreAdminV1EntityFilter $entityFilter
*/
public function setEntityFilter(GoogleDatastoreAdminV1EntityFilter $entityFilter)
{
$this->entityFilter = $entityFilter;
}
/**
* @return GoogleDatastoreAdminV1EntityFilter
*/
public function getEntityFilter()
{
return $this->entityFilter;
}
/**
* Location for the export metadata and data files. This will be the same
* value as the
* google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix field.
* The final output location is provided in
* google.datastore.admin.v1.ExportEntitiesResponse.output_url.
*
* @param string $outputUrlPrefix
*/
public function setOutputUrlPrefix($outputUrlPrefix)
{
$this->outputUrlPrefix = $outputUrlPrefix;
}
/**
* @return string
*/
public function getOutputUrlPrefix()
{
return $this->outputUrlPrefix;
}
/**
* An estimate of the number of bytes processed.
*
* @param GoogleDatastoreAdminV1Progress $progressBytes
*/
public function setProgressBytes(GoogleDatastoreAdminV1Progress $progressBytes)
{
$this->progressBytes = $progressBytes;
}
/**
* @return GoogleDatastoreAdminV1Progress
*/
public function getProgressBytes()
{
return $this->progressBytes;
}
/**
* An estimate of the number of entities processed.
*
* @param GoogleDatastoreAdminV1Progress $progressEntities
*/
public function setProgressEntities(GoogleDatastoreAdminV1Progress $progressEntities)
{
$this->progressEntities = $progressEntities;
}
/**
* @return GoogleDatastoreAdminV1Progress
*/
public function getProgressEntities()
{
return $this->progressEntities;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1ExportEntitiesMetadata::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1ExportEntitiesMetadata');
@@ -0,0 +1,114 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1ExportEntitiesRequest extends \Google\Model
{
protected $entityFilterType = GoogleDatastoreAdminV1EntityFilter::class;
protected $entityFilterDataType = '';
/**
* Client-assigned labels.
*
* @var string[]
*/
public $labels;
/**
* Required. Location for the export metadata and data files. The full
* resource URL of the external storage location. Currently, only Google Cloud
* Storage is supported. So output_url_prefix should be of the form:
* `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name of the
* Cloud Storage bucket and `NAMESPACE_PATH` is an optional Cloud Storage
* namespace path (this is not a Cloud Datastore namespace). For more
* information about Cloud Storage namespace paths, see [Object name
* considerations](https://cloud.google.com/storage/docs/naming#object-
* considerations). The resulting files will be nested deeper than the
* specified URL prefix. The final output URL will be provided in the
* google.datastore.admin.v1.ExportEntitiesResponse.output_url field. That
* value should be used for subsequent ImportEntities operations. By nesting
* the data files deeper, the same Cloud Storage bucket can be used in
* multiple ExportEntities operations without conflict.
*
* @var string
*/
public $outputUrlPrefix;
/**
* Description of what data from the project is included in the export.
*
* @param GoogleDatastoreAdminV1EntityFilter $entityFilter
*/
public function setEntityFilter(GoogleDatastoreAdminV1EntityFilter $entityFilter)
{
$this->entityFilter = $entityFilter;
}
/**
* @return GoogleDatastoreAdminV1EntityFilter
*/
public function getEntityFilter()
{
return $this->entityFilter;
}
/**
* Client-assigned labels.
*
* @param string[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return string[]
*/
public function getLabels()
{
return $this->labels;
}
/**
* Required. Location for the export metadata and data files. The full
* resource URL of the external storage location. Currently, only Google Cloud
* Storage is supported. So output_url_prefix should be of the form:
* `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name of the
* Cloud Storage bucket and `NAMESPACE_PATH` is an optional Cloud Storage
* namespace path (this is not a Cloud Datastore namespace). For more
* information about Cloud Storage namespace paths, see [Object name
* considerations](https://cloud.google.com/storage/docs/naming#object-
* considerations). The resulting files will be nested deeper than the
* specified URL prefix. The final output URL will be provided in the
* google.datastore.admin.v1.ExportEntitiesResponse.output_url field. That
* value should be used for subsequent ImportEntities operations. By nesting
* the data files deeper, the same Cloud Storage bucket can be used in
* multiple ExportEntities operations without conflict.
*
* @param string $outputUrlPrefix
*/
public function setOutputUrlPrefix($outputUrlPrefix)
{
$this->outputUrlPrefix = $outputUrlPrefix;
}
/**
* @return string
*/
public function getOutputUrlPrefix()
{
return $this->outputUrlPrefix;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1ExportEntitiesRequest::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1ExportEntitiesRequest');
@@ -0,0 +1,54 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1ExportEntitiesResponse extends \Google\Model
{
/**
* Location of the output metadata file. This can be used to begin an import
* into Cloud Datastore (this project or another project). See
* google.datastore.admin.v1.ImportEntitiesRequest.input_url. Only present if
* the operation completed successfully.
*
* @var string
*/
public $outputUrl;
/**
* Location of the output metadata file. This can be used to begin an import
* into Cloud Datastore (this project or another project). See
* google.datastore.admin.v1.ImportEntitiesRequest.input_url. Only present if
* the operation completed successfully.
*
* @param string $outputUrl
*/
public function setOutputUrl($outputUrl)
{
$this->outputUrl = $outputUrl;
}
/**
* @return string
*/
public function getOutputUrl()
{
return $this->outputUrl;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1ExportEntitiesResponse::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1ExportEntitiesResponse');
@@ -0,0 +1,122 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1ImportEntitiesMetadata extends \Google\Model
{
protected $commonType = GoogleDatastoreAdminV1CommonMetadata::class;
protected $commonDataType = '';
protected $entityFilterType = GoogleDatastoreAdminV1EntityFilter::class;
protected $entityFilterDataType = '';
/**
* The location of the import metadata file. This will be the same value as
* the google.datastore.admin.v1.ExportEntitiesResponse.output_url field.
*
* @var string
*/
public $inputUrl;
protected $progressBytesType = GoogleDatastoreAdminV1Progress::class;
protected $progressBytesDataType = '';
protected $progressEntitiesType = GoogleDatastoreAdminV1Progress::class;
protected $progressEntitiesDataType = '';
/**
* Metadata common to all Datastore Admin operations.
*
* @param GoogleDatastoreAdminV1CommonMetadata $common
*/
public function setCommon(GoogleDatastoreAdminV1CommonMetadata $common)
{
$this->common = $common;
}
/**
* @return GoogleDatastoreAdminV1CommonMetadata
*/
public function getCommon()
{
return $this->common;
}
/**
* Description of which entities are being imported.
*
* @param GoogleDatastoreAdminV1EntityFilter $entityFilter
*/
public function setEntityFilter(GoogleDatastoreAdminV1EntityFilter $entityFilter)
{
$this->entityFilter = $entityFilter;
}
/**
* @return GoogleDatastoreAdminV1EntityFilter
*/
public function getEntityFilter()
{
return $this->entityFilter;
}
/**
* The location of the import metadata file. This will be the same value as
* the google.datastore.admin.v1.ExportEntitiesResponse.output_url field.
*
* @param string $inputUrl
*/
public function setInputUrl($inputUrl)
{
$this->inputUrl = $inputUrl;
}
/**
* @return string
*/
public function getInputUrl()
{
return $this->inputUrl;
}
/**
* An estimate of the number of bytes processed.
*
* @param GoogleDatastoreAdminV1Progress $progressBytes
*/
public function setProgressBytes(GoogleDatastoreAdminV1Progress $progressBytes)
{
$this->progressBytes = $progressBytes;
}
/**
* @return GoogleDatastoreAdminV1Progress
*/
public function getProgressBytes()
{
return $this->progressBytes;
}
/**
* An estimate of the number of entities processed.
*
* @param GoogleDatastoreAdminV1Progress $progressEntities
*/
public function setProgressEntities(GoogleDatastoreAdminV1Progress $progressEntities)
{
$this->progressEntities = $progressEntities;
}
/**
* @return GoogleDatastoreAdminV1Progress
*/
public function getProgressEntities()
{
return $this->progressEntities;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1ImportEntitiesMetadata::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1ImportEntitiesMetadata');
@@ -0,0 +1,113 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1ImportEntitiesRequest extends \Google\Model
{
protected $entityFilterType = GoogleDatastoreAdminV1EntityFilter::class;
protected $entityFilterDataType = '';
/**
* Required. The full resource URL of the external storage location.
* Currently, only Google Cloud Storage is supported. So input_url should be
* of the form:
* `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`, where
* `BUCKET_NAME` is the name of the Cloud Storage bucket, `NAMESPACE_PATH` is
* an optional Cloud Storage namespace path (this is not a Cloud Datastore
* namespace), and `OVERALL_EXPORT_METADATA_FILE` is the metadata file written
* by the ExportEntities operation. For more information about Cloud Storage
* namespace paths, see [Object name
* considerations](https://cloud.google.com/storage/docs/naming#object-
* considerations). For more information, see
* google.datastore.admin.v1.ExportEntitiesResponse.output_url.
*
* @var string
*/
public $inputUrl;
/**
* Client-assigned labels.
*
* @var string[]
*/
public $labels;
/**
* Optionally specify which kinds/namespaces are to be imported. If provided,
* the list must be a subset of the EntityFilter used in creating the export,
* otherwise a FAILED_PRECONDITION error will be returned. If no filter is
* specified then all entities from the export are imported.
*
* @param GoogleDatastoreAdminV1EntityFilter $entityFilter
*/
public function setEntityFilter(GoogleDatastoreAdminV1EntityFilter $entityFilter)
{
$this->entityFilter = $entityFilter;
}
/**
* @return GoogleDatastoreAdminV1EntityFilter
*/
public function getEntityFilter()
{
return $this->entityFilter;
}
/**
* Required. The full resource URL of the external storage location.
* Currently, only Google Cloud Storage is supported. So input_url should be
* of the form:
* `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`, where
* `BUCKET_NAME` is the name of the Cloud Storage bucket, `NAMESPACE_PATH` is
* an optional Cloud Storage namespace path (this is not a Cloud Datastore
* namespace), and `OVERALL_EXPORT_METADATA_FILE` is the metadata file written
* by the ExportEntities operation. For more information about Cloud Storage
* namespace paths, see [Object name
* considerations](https://cloud.google.com/storage/docs/naming#object-
* considerations). For more information, see
* google.datastore.admin.v1.ExportEntitiesResponse.output_url.
*
* @param string $inputUrl
*/
public function setInputUrl($inputUrl)
{
$this->inputUrl = $inputUrl;
}
/**
* @return string
*/
public function getInputUrl()
{
return $this->inputUrl;
}
/**
* Client-assigned labels.
*
* @param string[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return string[]
*/
public function getLabels()
{
return $this->labels;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1ImportEntitiesRequest::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1ImportEntitiesRequest');
@@ -0,0 +1,200 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1Index extends \Google\Collection
{
/**
* The ancestor mode is unspecified.
*/
public const ANCESTOR_ANCESTOR_MODE_UNSPECIFIED = 'ANCESTOR_MODE_UNSPECIFIED';
/**
* Do not include the entity's ancestors in the index.
*/
public const ANCESTOR_NONE = 'NONE';
/**
* Include all the entity's ancestors in the index.
*/
public const ANCESTOR_ALL_ANCESTORS = 'ALL_ANCESTORS';
/**
* The state is unspecified.
*/
public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
/**
* The index is being created, and cannot be used by queries. There is an
* active long-running operation for the index. The index is updated when
* writing an entity. Some index data may exist.
*/
public const STATE_CREATING = 'CREATING';
/**
* The index is ready to be used. The index is updated when writing an entity.
* The index is fully populated from all stored entities it applies to.
*/
public const STATE_READY = 'READY';
/**
* The index is being deleted, and cannot be used by queries. There is an
* active long-running operation for the index. The index is not updated when
* writing an entity. Some index data may exist.
*/
public const STATE_DELETING = 'DELETING';
/**
* The index was being created or deleted, but something went wrong. The index
* cannot by used by queries. There is no active long-running operation for
* the index, and the most recently finished long-running operation failed.
* The index is not updated when writing an entity. Some index data may exist.
*/
public const STATE_ERROR = 'ERROR';
protected $collection_key = 'properties';
/**
* Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
*
* @var string
*/
public $ancestor;
/**
* Output only. The resource ID of the index.
*
* @var string
*/
public $indexId;
/**
* Required. The entity kind to which this index applies.
*
* @var string
*/
public $kind;
/**
* Output only. Project ID.
*
* @var string
*/
public $projectId;
protected $propertiesType = GoogleDatastoreAdminV1IndexedProperty::class;
protected $propertiesDataType = 'array';
/**
* Output only. The state of the index.
*
* @var string
*/
public $state;
/**
* Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
*
* Accepted values: ANCESTOR_MODE_UNSPECIFIED, NONE, ALL_ANCESTORS
*
* @param self::ANCESTOR_* $ancestor
*/
public function setAncestor($ancestor)
{
$this->ancestor = $ancestor;
}
/**
* @return self::ANCESTOR_*
*/
public function getAncestor()
{
return $this->ancestor;
}
/**
* Output only. The resource ID of the index.
*
* @param string $indexId
*/
public function setIndexId($indexId)
{
$this->indexId = $indexId;
}
/**
* @return string
*/
public function getIndexId()
{
return $this->indexId;
}
/**
* Required. The entity kind to which this index applies.
*
* @param string $kind
*/
public function setKind($kind)
{
$this->kind = $kind;
}
/**
* @return string
*/
public function getKind()
{
return $this->kind;
}
/**
* Output only. Project ID.
*
* @param string $projectId
*/
public function setProjectId($projectId)
{
$this->projectId = $projectId;
}
/**
* @return string
*/
public function getProjectId()
{
return $this->projectId;
}
/**
* Required. An ordered sequence of property names and their index attributes.
* Requires: * A maximum of 100 properties.
*
* @param GoogleDatastoreAdminV1IndexedProperty[] $properties
*/
public function setProperties($properties)
{
$this->properties = $properties;
}
/**
* @return GoogleDatastoreAdminV1IndexedProperty[]
*/
public function getProperties()
{
return $this->properties;
}
/**
* Output only. The state of the index.
*
* Accepted values: STATE_UNSPECIFIED, CREATING, READY, DELETING, ERROR
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1Index::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1Index');
@@ -0,0 +1,84 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1IndexOperationMetadata extends \Google\Model
{
protected $commonType = GoogleDatastoreAdminV1CommonMetadata::class;
protected $commonDataType = '';
/**
* The index resource ID that this operation is acting on.
*
* @var string
*/
public $indexId;
protected $progressEntitiesType = GoogleDatastoreAdminV1Progress::class;
protected $progressEntitiesDataType = '';
/**
* Metadata common to all Datastore Admin operations.
*
* @param GoogleDatastoreAdminV1CommonMetadata $common
*/
public function setCommon(GoogleDatastoreAdminV1CommonMetadata $common)
{
$this->common = $common;
}
/**
* @return GoogleDatastoreAdminV1CommonMetadata
*/
public function getCommon()
{
return $this->common;
}
/**
* The index resource ID that this operation is acting on.
*
* @param string $indexId
*/
public function setIndexId($indexId)
{
$this->indexId = $indexId;
}
/**
* @return string
*/
public function getIndexId()
{
return $this->indexId;
}
/**
* An estimate of the number of entities processed.
*
* @param GoogleDatastoreAdminV1Progress $progressEntities
*/
public function setProgressEntities(GoogleDatastoreAdminV1Progress $progressEntities)
{
$this->progressEntities = $progressEntities;
}
/**
* @return GoogleDatastoreAdminV1Progress
*/
public function getProgressEntities()
{
return $this->progressEntities;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1IndexOperationMetadata::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1IndexOperationMetadata');
@@ -0,0 +1,88 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1IndexedProperty extends \Google\Model
{
/**
* The direction is unspecified.
*/
public const DIRECTION_DIRECTION_UNSPECIFIED = 'DIRECTION_UNSPECIFIED';
/**
* The property's values are indexed so as to support sequencing in ascending
* order and also query by <, >, <=, >=, and =.
*/
public const DIRECTION_ASCENDING = 'ASCENDING';
/**
* The property's values are indexed so as to support sequencing in descending
* order and also query by <, >, <=, >=, and =.
*/
public const DIRECTION_DESCENDING = 'DESCENDING';
/**
* Required. The indexed property's direction. Must not be
* DIRECTION_UNSPECIFIED.
*
* @var string
*/
public $direction;
/**
* Required. The property name to index.
*
* @var string
*/
public $name;
/**
* Required. The indexed property's direction. Must not be
* DIRECTION_UNSPECIFIED.
*
* Accepted values: DIRECTION_UNSPECIFIED, ASCENDING, DESCENDING
*
* @param self::DIRECTION_* $direction
*/
public function setDirection($direction)
{
$this->direction = $direction;
}
/**
* @return self::DIRECTION_*
*/
public function getDirection()
{
return $this->direction;
}
/**
* Required. The property name to index.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1IndexedProperty::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1IndexedProperty');
@@ -0,0 +1,67 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1ListIndexesResponse extends \Google\Collection
{
protected $collection_key = 'indexes';
protected $indexesType = GoogleDatastoreAdminV1Index::class;
protected $indexesDataType = 'array';
/**
* The standard List next-page token.
*
* @var string
*/
public $nextPageToken;
/**
* The indexes.
*
* @param GoogleDatastoreAdminV1Index[] $indexes
*/
public function setIndexes($indexes)
{
$this->indexes = $indexes;
}
/**
* @return GoogleDatastoreAdminV1Index[]
*/
public function getIndexes()
{
return $this->indexes;
}
/**
* The standard List next-page token.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1ListIndexesResponse::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1ListIndexesResponse');
@@ -0,0 +1,124 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1MigrationProgressEvent extends \Google\Model
{
/**
* Unspecified.
*/
public const STEP_MIGRATION_STEP_UNSPECIFIED = 'MIGRATION_STEP_UNSPECIFIED';
/**
* Pre-migration: the database is prepared for migration.
*/
public const STEP_PREPARE = 'PREPARE';
/**
* Start of migration.
*/
public const STEP_START = 'START';
/**
* Writes are applied synchronously to at least one replica.
*/
public const STEP_APPLY_WRITES_SYNCHRONOUSLY = 'APPLY_WRITES_SYNCHRONOUSLY';
/**
* Data is copied to Cloud Firestore and then verified to match the data in
* Cloud Datastore.
*/
public const STEP_COPY_AND_VERIFY = 'COPY_AND_VERIFY';
/**
* Eventually-consistent reads are redirected to Cloud Firestore.
*/
public const STEP_REDIRECT_EVENTUALLY_CONSISTENT_READS = 'REDIRECT_EVENTUALLY_CONSISTENT_READS';
/**
* Strongly-consistent reads are redirected to Cloud Firestore.
*/
public const STEP_REDIRECT_STRONGLY_CONSISTENT_READS = 'REDIRECT_STRONGLY_CONSISTENT_READS';
/**
* Writes are redirected to Cloud Firestore.
*/
public const STEP_REDIRECT_WRITES = 'REDIRECT_WRITES';
protected $prepareStepDetailsType = GoogleDatastoreAdminV1PrepareStepDetails::class;
protected $prepareStepDetailsDataType = '';
protected $redirectWritesStepDetailsType = GoogleDatastoreAdminV1RedirectWritesStepDetails::class;
protected $redirectWritesStepDetailsDataType = '';
/**
* The step that is starting. An event with step set to `START` indicates that
* the migration has been reverted back to the initial pre-migration state.
*
* @var string
*/
public $step;
/**
* Details for the `PREPARE` step.
*
* @param GoogleDatastoreAdminV1PrepareStepDetails $prepareStepDetails
*/
public function setPrepareStepDetails(GoogleDatastoreAdminV1PrepareStepDetails $prepareStepDetails)
{
$this->prepareStepDetails = $prepareStepDetails;
}
/**
* @return GoogleDatastoreAdminV1PrepareStepDetails
*/
public function getPrepareStepDetails()
{
return $this->prepareStepDetails;
}
/**
* Details for the `REDIRECT_WRITES` step.
*
* @param GoogleDatastoreAdminV1RedirectWritesStepDetails $redirectWritesStepDetails
*/
public function setRedirectWritesStepDetails(GoogleDatastoreAdminV1RedirectWritesStepDetails $redirectWritesStepDetails)
{
$this->redirectWritesStepDetails = $redirectWritesStepDetails;
}
/**
* @return GoogleDatastoreAdminV1RedirectWritesStepDetails
*/
public function getRedirectWritesStepDetails()
{
return $this->redirectWritesStepDetails;
}
/**
* The step that is starting. An event with step set to `START` indicates that
* the migration has been reverted back to the initial pre-migration state.
*
* Accepted values: MIGRATION_STEP_UNSPECIFIED, PREPARE, START,
* APPLY_WRITES_SYNCHRONOUSLY, COPY_AND_VERIFY,
* REDIRECT_EVENTUALLY_CONSISTENT_READS, REDIRECT_STRONGLY_CONSISTENT_READS,
* REDIRECT_WRITES
*
* @param self::STEP_* $step
*/
public function setStep($step)
{
$this->step = $step;
}
/**
* @return self::STEP_*
*/
public function getStep()
{
return $this->step;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1MigrationProgressEvent::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1MigrationProgressEvent');
@@ -0,0 +1,66 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1MigrationStateEvent extends \Google\Model
{
/**
* Unspecified.
*/
public const STATE_MIGRATION_STATE_UNSPECIFIED = 'MIGRATION_STATE_UNSPECIFIED';
/**
* The migration is running.
*/
public const STATE_RUNNING = 'RUNNING';
/**
* The migration is paused.
*/
public const STATE_PAUSED = 'PAUSED';
/**
* The migration is complete.
*/
public const STATE_COMPLETE = 'COMPLETE';
/**
* The new state of the migration.
*
* @var string
*/
public $state;
/**
* The new state of the migration.
*
* Accepted values: MIGRATION_STATE_UNSPECIFIED, RUNNING, PAUSED, COMPLETE
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1MigrationStateEvent::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1MigrationStateEvent');
@@ -0,0 +1,69 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1PrepareStepDetails extends \Google\Model
{
/**
* Unspecified.
*/
public const CONCURRENCY_MODE_CONCURRENCY_MODE_UNSPECIFIED = 'CONCURRENCY_MODE_UNSPECIFIED';
/**
* Pessimistic concurrency.
*/
public const CONCURRENCY_MODE_PESSIMISTIC = 'PESSIMISTIC';
/**
* Optimistic concurrency.
*/
public const CONCURRENCY_MODE_OPTIMISTIC = 'OPTIMISTIC';
/**
* Optimistic concurrency with entity groups.
*/
public const CONCURRENCY_MODE_OPTIMISTIC_WITH_ENTITY_GROUPS = 'OPTIMISTIC_WITH_ENTITY_GROUPS';
/**
* The concurrency mode this database will use when it reaches the
* `REDIRECT_WRITES` step.
*
* @var string
*/
public $concurrencyMode;
/**
* The concurrency mode this database will use when it reaches the
* `REDIRECT_WRITES` step.
*
* Accepted values: CONCURRENCY_MODE_UNSPECIFIED, PESSIMISTIC, OPTIMISTIC,
* OPTIMISTIC_WITH_ENTITY_GROUPS
*
* @param self::CONCURRENCY_MODE_* $concurrencyMode
*/
public function setConcurrencyMode($concurrencyMode)
{
$this->concurrencyMode = $concurrencyMode;
}
/**
* @return self::CONCURRENCY_MODE_*
*/
public function getConcurrencyMode()
{
return $this->concurrencyMode;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1PrepareStepDetails::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1PrepareStepDetails');
@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1Progress extends \Google\Model
{
/**
* The amount of work that has been completed. Note that this may be greater
* than work_estimated.
*
* @var string
*/
public $workCompleted;
/**
* An estimate of how much work needs to be performed. May be zero if the work
* estimate is unavailable.
*
* @var string
*/
public $workEstimated;
/**
* The amount of work that has been completed. Note that this may be greater
* than work_estimated.
*
* @param string $workCompleted
*/
public function setWorkCompleted($workCompleted)
{
$this->workCompleted = $workCompleted;
}
/**
* @return string
*/
public function getWorkCompleted()
{
return $this->workCompleted;
}
/**
* An estimate of how much work needs to be performed. May be zero if the work
* estimate is unavailable.
*
* @param string $workEstimated
*/
public function setWorkEstimated($workEstimated)
{
$this->workEstimated = $workEstimated;
}
/**
* @return string
*/
public function getWorkEstimated()
{
return $this->workEstimated;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1Progress::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1Progress');
@@ -0,0 +1,67 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1RedirectWritesStepDetails extends \Google\Model
{
/**
* Unspecified.
*/
public const CONCURRENCY_MODE_CONCURRENCY_MODE_UNSPECIFIED = 'CONCURRENCY_MODE_UNSPECIFIED';
/**
* Pessimistic concurrency.
*/
public const CONCURRENCY_MODE_PESSIMISTIC = 'PESSIMISTIC';
/**
* Optimistic concurrency.
*/
public const CONCURRENCY_MODE_OPTIMISTIC = 'OPTIMISTIC';
/**
* Optimistic concurrency with entity groups.
*/
public const CONCURRENCY_MODE_OPTIMISTIC_WITH_ENTITY_GROUPS = 'OPTIMISTIC_WITH_ENTITY_GROUPS';
/**
* The concurrency mode for this database.
*
* @var string
*/
public $concurrencyMode;
/**
* The concurrency mode for this database.
*
* Accepted values: CONCURRENCY_MODE_UNSPECIFIED, PESSIMISTIC, OPTIMISTIC,
* OPTIMISTIC_WITH_ENTITY_GROUPS
*
* @param self::CONCURRENCY_MODE_* $concurrencyMode
*/
public function setConcurrencyMode($concurrencyMode)
{
$this->concurrencyMode = $concurrencyMode;
}
/**
* @return self::CONCURRENCY_MODE_*
*/
public function getConcurrencyMode()
{
return $this->concurrencyMode;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1RedirectWritesStepDetails::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1RedirectWritesStepDetails');
@@ -0,0 +1,192 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1beta1CommonMetadata extends \Google\Model
{
/**
* Unspecified.
*/
public const OPERATION_TYPE_OPERATION_TYPE_UNSPECIFIED = 'OPERATION_TYPE_UNSPECIFIED';
/**
* ExportEntities.
*/
public const OPERATION_TYPE_EXPORT_ENTITIES = 'EXPORT_ENTITIES';
/**
* ImportEntities.
*/
public const OPERATION_TYPE_IMPORT_ENTITIES = 'IMPORT_ENTITIES';
/**
* Unspecified.
*/
public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
/**
* Request is being prepared for processing.
*/
public const STATE_INITIALIZING = 'INITIALIZING';
/**
* Request is actively being processed.
*/
public const STATE_PROCESSING = 'PROCESSING';
/**
* Request is in the process of being cancelled after user called
* google.longrunning.Operations.CancelOperation on the operation.
*/
public const STATE_CANCELLING = 'CANCELLING';
/**
* Request has been processed and is in its finalization stage.
*/
public const STATE_FINALIZING = 'FINALIZING';
/**
* Request has completed successfully.
*/
public const STATE_SUCCESSFUL = 'SUCCESSFUL';
/**
* Request has finished being processed, but encountered an error.
*/
public const STATE_FAILED = 'FAILED';
/**
* Request has finished being cancelled after user called
* google.longrunning.Operations.CancelOperation.
*/
public const STATE_CANCELLED = 'CANCELLED';
/**
* The time the operation ended, either successfully or otherwise.
*
* @var string
*/
public $endTime;
/**
* The client-assigned labels which were provided when the operation was
* created. May also include additional labels.
*
* @var string[]
*/
public $labels;
/**
* The type of the operation. Can be used as a filter in
* ListOperationsRequest.
*
* @var string
*/
public $operationType;
/**
* The time that work began on the operation.
*
* @var string
*/
public $startTime;
/**
* The current state of the Operation.
*
* @var string
*/
public $state;
/**
* The time the operation ended, either successfully or otherwise.
*
* @param string $endTime
*/
public function setEndTime($endTime)
{
$this->endTime = $endTime;
}
/**
* @return string
*/
public function getEndTime()
{
return $this->endTime;
}
/**
* The client-assigned labels which were provided when the operation was
* created. May also include additional labels.
*
* @param string[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return string[]
*/
public function getLabels()
{
return $this->labels;
}
/**
* The type of the operation. Can be used as a filter in
* ListOperationsRequest.
*
* Accepted values: OPERATION_TYPE_UNSPECIFIED, EXPORT_ENTITIES,
* IMPORT_ENTITIES
*
* @param self::OPERATION_TYPE_* $operationType
*/
public function setOperationType($operationType)
{
$this->operationType = $operationType;
}
/**
* @return self::OPERATION_TYPE_*
*/
public function getOperationType()
{
return $this->operationType;
}
/**
* The time that work began on the operation.
*
* @param string $startTime
*/
public function setStartTime($startTime)
{
$this->startTime = $startTime;
}
/**
* @return string
*/
public function getStartTime()
{
return $this->startTime;
}
/**
* The current state of the Operation.
*
* Accepted values: STATE_UNSPECIFIED, INITIALIZING, PROCESSING, CANCELLING,
* FINALIZING, SUCCESSFUL, FAILED, CANCELLED
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1beta1CommonMetadata::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1beta1CommonMetadata');
@@ -0,0 +1,79 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1beta1EntityFilter extends \Google\Collection
{
protected $collection_key = 'namespaceIds';
/**
* If empty, then this represents all kinds.
*
* @var string[]
*/
public $kinds;
/**
* An empty list represents all namespaces. This is the preferred usage for
* projects that don't use namespaces. An empty string element represents the
* default namespace. This should be used if the project has data in non-
* default namespaces, but doesn't want to include them. Each namespace in
* this list must be unique.
*
* @var string[]
*/
public $namespaceIds;
/**
* If empty, then this represents all kinds.
*
* @param string[] $kinds
*/
public function setKinds($kinds)
{
$this->kinds = $kinds;
}
/**
* @return string[]
*/
public function getKinds()
{
return $this->kinds;
}
/**
* An empty list represents all namespaces. This is the preferred usage for
* projects that don't use namespaces. An empty string element represents the
* default namespace. This should be used if the project has data in non-
* default namespaces, but doesn't want to include them. Each namespace in
* this list must be unique.
*
* @param string[] $namespaceIds
*/
public function setNamespaceIds($namespaceIds)
{
$this->namespaceIds = $namespaceIds;
}
/**
* @return string[]
*/
public function getNamespaceIds()
{
return $this->namespaceIds;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1beta1EntityFilter::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1beta1EntityFilter');
@@ -0,0 +1,128 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1beta1ExportEntitiesMetadata extends \Google\Model
{
protected $commonType = GoogleDatastoreAdminV1beta1CommonMetadata::class;
protected $commonDataType = '';
protected $entityFilterType = GoogleDatastoreAdminV1beta1EntityFilter::class;
protected $entityFilterDataType = '';
/**
* Location for the export metadata and data files. This will be the same
* value as the
* google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix
* field. The final output location is provided in
* google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url.
*
* @var string
*/
public $outputUrlPrefix;
protected $progressBytesType = GoogleDatastoreAdminV1beta1Progress::class;
protected $progressBytesDataType = '';
protected $progressEntitiesType = GoogleDatastoreAdminV1beta1Progress::class;
protected $progressEntitiesDataType = '';
/**
* Metadata common to all Datastore Admin operations.
*
* @param GoogleDatastoreAdminV1beta1CommonMetadata $common
*/
public function setCommon(GoogleDatastoreAdminV1beta1CommonMetadata $common)
{
$this->common = $common;
}
/**
* @return GoogleDatastoreAdminV1beta1CommonMetadata
*/
public function getCommon()
{
return $this->common;
}
/**
* Description of which entities are being exported.
*
* @param GoogleDatastoreAdminV1beta1EntityFilter $entityFilter
*/
public function setEntityFilter(GoogleDatastoreAdminV1beta1EntityFilter $entityFilter)
{
$this->entityFilter = $entityFilter;
}
/**
* @return GoogleDatastoreAdminV1beta1EntityFilter
*/
public function getEntityFilter()
{
return $this->entityFilter;
}
/**
* Location for the export metadata and data files. This will be the same
* value as the
* google.datastore.admin.v1beta1.ExportEntitiesRequest.output_url_prefix
* field. The final output location is provided in
* google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url.
*
* @param string $outputUrlPrefix
*/
public function setOutputUrlPrefix($outputUrlPrefix)
{
$this->outputUrlPrefix = $outputUrlPrefix;
}
/**
* @return string
*/
public function getOutputUrlPrefix()
{
return $this->outputUrlPrefix;
}
/**
* An estimate of the number of bytes processed.
*
* @param GoogleDatastoreAdminV1beta1Progress $progressBytes
*/
public function setProgressBytes(GoogleDatastoreAdminV1beta1Progress $progressBytes)
{
$this->progressBytes = $progressBytes;
}
/**
* @return GoogleDatastoreAdminV1beta1Progress
*/
public function getProgressBytes()
{
return $this->progressBytes;
}
/**
* An estimate of the number of entities processed.
*
* @param GoogleDatastoreAdminV1beta1Progress $progressEntities
*/
public function setProgressEntities(GoogleDatastoreAdminV1beta1Progress $progressEntities)
{
$this->progressEntities = $progressEntities;
}
/**
* @return GoogleDatastoreAdminV1beta1Progress
*/
public function getProgressEntities()
{
return $this->progressEntities;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1beta1ExportEntitiesMetadata::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1beta1ExportEntitiesMetadata');
@@ -0,0 +1,54 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1beta1ExportEntitiesResponse extends \Google\Model
{
/**
* Location of the output metadata file. This can be used to begin an import
* into Cloud Datastore (this project or another project). See
* google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url. Only
* present if the operation completed successfully.
*
* @var string
*/
public $outputUrl;
/**
* Location of the output metadata file. This can be used to begin an import
* into Cloud Datastore (this project or another project). See
* google.datastore.admin.v1beta1.ImportEntitiesRequest.input_url. Only
* present if the operation completed successfully.
*
* @param string $outputUrl
*/
public function setOutputUrl($outputUrl)
{
$this->outputUrl = $outputUrl;
}
/**
* @return string
*/
public function getOutputUrl()
{
return $this->outputUrl;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1beta1ExportEntitiesResponse::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1beta1ExportEntitiesResponse');
@@ -0,0 +1,122 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1beta1ImportEntitiesMetadata extends \Google\Model
{
protected $commonType = GoogleDatastoreAdminV1beta1CommonMetadata::class;
protected $commonDataType = '';
protected $entityFilterType = GoogleDatastoreAdminV1beta1EntityFilter::class;
protected $entityFilterDataType = '';
/**
* The location of the import metadata file. This will be the same value as
* the google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url field.
*
* @var string
*/
public $inputUrl;
protected $progressBytesType = GoogleDatastoreAdminV1beta1Progress::class;
protected $progressBytesDataType = '';
protected $progressEntitiesType = GoogleDatastoreAdminV1beta1Progress::class;
protected $progressEntitiesDataType = '';
/**
* Metadata common to all Datastore Admin operations.
*
* @param GoogleDatastoreAdminV1beta1CommonMetadata $common
*/
public function setCommon(GoogleDatastoreAdminV1beta1CommonMetadata $common)
{
$this->common = $common;
}
/**
* @return GoogleDatastoreAdminV1beta1CommonMetadata
*/
public function getCommon()
{
return $this->common;
}
/**
* Description of which entities are being imported.
*
* @param GoogleDatastoreAdminV1beta1EntityFilter $entityFilter
*/
public function setEntityFilter(GoogleDatastoreAdminV1beta1EntityFilter $entityFilter)
{
$this->entityFilter = $entityFilter;
}
/**
* @return GoogleDatastoreAdminV1beta1EntityFilter
*/
public function getEntityFilter()
{
return $this->entityFilter;
}
/**
* The location of the import metadata file. This will be the same value as
* the google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url field.
*
* @param string $inputUrl
*/
public function setInputUrl($inputUrl)
{
$this->inputUrl = $inputUrl;
}
/**
* @return string
*/
public function getInputUrl()
{
return $this->inputUrl;
}
/**
* An estimate of the number of bytes processed.
*
* @param GoogleDatastoreAdminV1beta1Progress $progressBytes
*/
public function setProgressBytes(GoogleDatastoreAdminV1beta1Progress $progressBytes)
{
$this->progressBytes = $progressBytes;
}
/**
* @return GoogleDatastoreAdminV1beta1Progress
*/
public function getProgressBytes()
{
return $this->progressBytes;
}
/**
* An estimate of the number of entities processed.
*
* @param GoogleDatastoreAdminV1beta1Progress $progressEntities
*/
public function setProgressEntities(GoogleDatastoreAdminV1beta1Progress $progressEntities)
{
$this->progressEntities = $progressEntities;
}
/**
* @return GoogleDatastoreAdminV1beta1Progress
*/
public function getProgressEntities()
{
return $this->progressEntities;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1beta1ImportEntitiesMetadata::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1beta1ImportEntitiesMetadata');
@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleDatastoreAdminV1beta1Progress extends \Google\Model
{
/**
* The amount of work that has been completed. Note that this may be greater
* than work_estimated.
*
* @var string
*/
public $workCompleted;
/**
* An estimate of how much work needs to be performed. May be zero if the work
* estimate is unavailable.
*
* @var string
*/
public $workEstimated;
/**
* The amount of work that has been completed. Note that this may be greater
* than work_estimated.
*
* @param string $workCompleted
*/
public function setWorkCompleted($workCompleted)
{
$this->workCompleted = $workCompleted;
}
/**
* @return string
*/
public function getWorkCompleted()
{
return $this->workCompleted;
}
/**
* An estimate of how much work needs to be performed. May be zero if the work
* estimate is unavailable.
*
* @param string $workEstimated
*/
public function setWorkEstimated($workEstimated)
{
$this->workEstimated = $workEstimated;
}
/**
* @return string
*/
public function getWorkEstimated()
{
return $this->workEstimated;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleDatastoreAdminV1beta1Progress::class, 'Google_Service_Datastore_GoogleDatastoreAdminV1beta1Progress');
@@ -0,0 +1,95 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleLongrunningListOperationsResponse extends \Google\Collection
{
protected $collection_key = 'unreachable';
/**
* The standard List next-page token.
*
* @var string
*/
public $nextPageToken;
protected $operationsType = GoogleLongrunningOperation::class;
protected $operationsDataType = 'array';
/**
* Unordered list. Unreachable resources. Populated when the request sets
* `ListOperationsRequest.return_partial_success` and reads across
* collections. For example, when attempting to list all resources across all
* supported locations.
*
* @var string[]
*/
public $unreachable;
/**
* The standard List next-page token.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* A list of operations that matches the specified filter in the request.
*
* @param GoogleLongrunningOperation[] $operations
*/
public function setOperations($operations)
{
$this->operations = $operations;
}
/**
* @return GoogleLongrunningOperation[]
*/
public function getOperations()
{
return $this->operations;
}
/**
* Unordered list. Unreachable resources. Populated when the request sets
* `ListOperationsRequest.return_partial_success` and reads across
* collections. For example, when attempting to list all resources across all
* supported locations.
*
* @param string[] $unreachable
*/
public function setUnreachable($unreachable)
{
$this->unreachable = $unreachable;
}
/**
* @return string[]
*/
public function getUnreachable()
{
return $this->unreachable;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleLongrunningListOperationsResponse::class, 'Google_Service_Datastore_GoogleLongrunningListOperationsResponse');
@@ -0,0 +1,158 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GoogleLongrunningOperation extends \Google\Model
{
/**
* If the value is `false`, it means the operation is still in progress. If
* `true`, the operation is completed, and either `error` or `response` is
* available.
*
* @var bool
*/
public $done;
protected $errorType = Status::class;
protected $errorDataType = '';
/**
* Service-specific metadata associated with the operation. It typically
* contains progress information and common metadata such as create time. Some
* services might not provide such metadata. Any method that returns a long-
* running operation should document the metadata type, if any.
*
* @var array[]
*/
public $metadata;
/**
* The server-assigned name, which is only unique within the same service that
* originally returns it. If you use the default HTTP mapping, the `name`
* should be a resource name ending with `operations/{unique_id}`.
*
* @var string
*/
public $name;
/**
* The normal, successful response of the operation. If the original method
* returns no data on success, such as `Delete`, the response is
* `google.protobuf.Empty`. If the original method is standard
* `Get`/`Create`/`Update`, the response should be the resource. For other
* methods, the response should have the type `XxxResponse`, where `Xxx` is
* the original method name. For example, if the original method name is
* `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
*
* @var array[]
*/
public $response;
/**
* If the value is `false`, it means the operation is still in progress. If
* `true`, the operation is completed, and either `error` or `response` is
* available.
*
* @param bool $done
*/
public function setDone($done)
{
$this->done = $done;
}
/**
* @return bool
*/
public function getDone()
{
return $this->done;
}
/**
* The error result of the operation in case of failure or cancellation.
*
* @param Status $error
*/
public function setError(Status $error)
{
$this->error = $error;
}
/**
* @return Status
*/
public function getError()
{
return $this->error;
}
/**
* Service-specific metadata associated with the operation. It typically
* contains progress information and common metadata such as create time. Some
* services might not provide such metadata. Any method that returns a long-
* running operation should document the metadata type, if any.
*
* @param array[] $metadata
*/
public function setMetadata($metadata)
{
$this->metadata = $metadata;
}
/**
* @return array[]
*/
public function getMetadata()
{
return $this->metadata;
}
/**
* The server-assigned name, which is only unique within the same service that
* originally returns it. If you use the default HTTP mapping, the `name`
* should be a resource name ending with `operations/{unique_id}`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The normal, successful response of the operation. If the original method
* returns no data on success, such as `Delete`, the response is
* `google.protobuf.Empty`. If the original method is standard
* `Get`/`Create`/`Update`, the response should be the resource. For other
* methods, the response should have the type `XxxResponse`, where `Xxx` is
* the original method name. For example, if the original method name is
* `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
*
* @param array[] $response
*/
public function setResponse($response)
{
$this->response = $response;
}
/**
* @return array[]
*/
public function getResponse()
{
return $this->response;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleLongrunningOperation::class, 'Google_Service_Datastore_GoogleLongrunningOperation');
@@ -0,0 +1,119 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GqlQuery extends \Google\Collection
{
protected $collection_key = 'positionalBindings';
/**
* 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.
*
* @var bool
*/
public $allowLiterals;
protected $namedBindingsType = GqlQueryParameter::class;
protected $namedBindingsDataType = 'map';
protected $positionalBindingsType = GqlQueryParameter::class;
protected $positionalBindingsDataType = 'array';
/**
* A string of the format described
* [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
*
* @var string
*/
public $queryString;
/**
* 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.
*
* @param bool $allowLiterals
*/
public function setAllowLiterals($allowLiterals)
{
$this->allowLiterals = $allowLiterals;
}
/**
* @return bool
*/
public function getAllowLiterals()
{
return $this->allowLiterals;
}
/**
* 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 `__.*__`, and must not be
* `""`.
*
* @param GqlQueryParameter[] $namedBindings
*/
public function setNamedBindings($namedBindings)
{
$this->namedBindings = $namedBindings;
}
/**
* @return GqlQueryParameter[]
*/
public function getNamedBindings()
{
return $this->namedBindings;
}
/**
* 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.
*
* @param GqlQueryParameter[] $positionalBindings
*/
public function setPositionalBindings($positionalBindings)
{
$this->positionalBindings = $positionalBindings;
}
/**
* @return GqlQueryParameter[]
*/
public function getPositionalBindings()
{
return $this->positionalBindings;
}
/**
* A string of the format described
* [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
*
* @param string $queryString
*/
public function setQueryString($queryString)
{
$this->queryString = $queryString;
}
/**
* @return string
*/
public function getQueryString()
{
return $this->queryString;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GqlQuery::class, 'Google_Service_Datastore_GqlQuery');
@@ -0,0 +1,66 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class GqlQueryParameter extends \Google\Model
{
/**
* A query cursor. Query cursors are returned in query result batches.
*
* @var string
*/
public $cursor;
protected $valueType = Value::class;
protected $valueDataType = '';
/**
* A query cursor. Query cursors are returned in query result batches.
*
* @param string $cursor
*/
public function setCursor($cursor)
{
$this->cursor = $cursor;
}
/**
* @return string
*/
public function getCursor()
{
return $this->cursor;
}
/**
* A value parameter.
*
* @param Value $value
*/
public function setValue(Value $value)
{
$this->value = $value;
}
/**
* @return Value
*/
public function getValue()
{
return $this->value;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GqlQueryParameter::class, 'Google_Service_Datastore_GqlQueryParameter');
+75
View File
@@ -0,0 +1,75 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class Key extends \Google\Collection
{
protected $collection_key = 'path';
protected $partitionIdType = PartitionId::class;
protected $partitionIdDataType = '';
protected $pathType = PathElement::class;
protected $pathDataType = 'array';
/**
* Entities are partitioned into subsets, currently identified by a project ID
* and namespace ID. Queries are scoped to a single partition.
*
* @param PartitionId $partitionId
*/
public function setPartitionId(PartitionId $partitionId)
{
$this->partitionId = $partitionId;
}
/**
* @return PartitionId
*/
public function getPartitionId()
{
return $this->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.
*
* @param PathElement[] $path
*/
public function setPath($path)
{
$this->path = $path;
}
/**
* @return PathElement[]
*/
public function getPath()
{
return $this->path;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Key::class, 'Google_Service_Datastore_Key');
@@ -0,0 +1,48 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class KindExpression extends \Google\Model
{
/**
* The name of the kind.
*
* @var string
*/
public $name;
/**
* The name of the kind.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(KindExpression::class, 'Google_Service_Datastore_KindExpression');
@@ -0,0 +1,54 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class LatLng extends \Google\Model
{
/**
* The latitude in degrees. It must be in the range [-90.0, +90.0].
*
* @var
*/
public $latitude;
/**
* The longitude in degrees. It must be in the range [-180.0, +180.0].
*
* @var
*/
public $longitude;
public function setLatitude($latitude)
{
$this->latitude = $latitude;
}
public function getLatitude()
{
return $this->latitude;
}
public function setLongitude($longitude)
{
$this->longitude = $longitude;
}
public function getLongitude()
{
return $this->longitude;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LatLng::class, 'Google_Service_Datastore_LatLng');
@@ -0,0 +1,108 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class LookupRequest extends \Google\Collection
{
protected $collection_key = 'keys';
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @var string
*/
public $databaseId;
protected $keysType = Key::class;
protected $keysDataType = 'array';
protected $propertyMaskType = PropertyMask::class;
protected $propertyMaskDataType = '';
protected $readOptionsType = ReadOptions::class;
protected $readOptionsDataType = '';
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @param string $databaseId
*/
public function setDatabaseId($databaseId)
{
$this->databaseId = $databaseId;
}
/**
* @return string
*/
public function getDatabaseId()
{
return $this->databaseId;
}
/**
* Required. Keys of entities to look up.
*
* @param Key[] $keys
*/
public function setKeys($keys)
{
$this->keys = $keys;
}
/**
* @return Key[]
*/
public function getKeys()
{
return $this->keys;
}
/**
* The properties to return. Defaults to returning all properties. If this
* field is set and an entity has a property not referenced in the mask, it
* will be absent from LookupResponse.found.entity.properties. The entity's
* key is always returned.
*
* @param PropertyMask $propertyMask
*/
public function setPropertyMask(PropertyMask $propertyMask)
{
$this->propertyMask = $propertyMask;
}
/**
* @return PropertyMask
*/
public function getPropertyMask()
{
return $this->propertyMask;
}
/**
* The options for this lookup request.
*
* @param ReadOptions $readOptions
*/
public function setReadOptions(ReadOptions $readOptions)
{
$this->readOptions = $readOptions;
}
/**
* @return ReadOptions
*/
public function getReadOptions()
{
return $this->readOptions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LookupRequest::class, 'Google_Service_Datastore_LookupRequest');
@@ -0,0 +1,135 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class LookupResponse extends \Google\Collection
{
protected $collection_key = 'missing';
protected $deferredType = Key::class;
protected $deferredDataType = 'array';
protected $foundType = EntityResult::class;
protected $foundDataType = 'array';
protected $missingType = EntityResult::class;
protected $missingDataType = 'array';
/**
* The time at which these entities were read or found missing.
*
* @var string
*/
public $readTime;
/**
* The identifier of the transaction that was started as part of this Lookup
* request. Set only when ReadOptions.new_transaction was set in
* LookupRequest.read_options.
*
* @var string
*/
public $transaction;
/**
* 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.
*
* @param Key[] $deferred
*/
public function setDeferred($deferred)
{
$this->deferred = $deferred;
}
/**
* @return Key[]
*/
public function getDeferred()
{
return $this->deferred;
}
/**
* 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.
*
* @param EntityResult[] $found
*/
public function setFound($found)
{
$this->found = $found;
}
/**
* @return EntityResult[]
*/
public function getFound()
{
return $this->found;
}
/**
* 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.
*
* @param EntityResult[] $missing
*/
public function setMissing($missing)
{
$this->missing = $missing;
}
/**
* @return EntityResult[]
*/
public function getMissing()
{
return $this->missing;
}
/**
* The time at which these entities were read or found missing.
*
* @param string $readTime
*/
public function setReadTime($readTime)
{
$this->readTime = $readTime;
}
/**
* @return string
*/
public function getReadTime()
{
return $this->readTime;
}
/**
* The identifier of the transaction that was started as part of this Lookup
* request. Set only when ReadOptions.new_transaction was set in
* LookupRequest.read_options.
*
* @param string $transaction
*/
public function setTransaction($transaction)
{
$this->transaction = $transaction;
}
/**
* @return string
*/
public function getTransaction()
{
return $this->transaction;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LookupResponse::class, 'Google_Service_Datastore_LookupResponse');
@@ -0,0 +1,236 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class Mutation extends \Google\Collection
{
/**
* Unspecified. Defaults to `SERVER_VALUE`.
*/
public const CONFLICT_RESOLUTION_STRATEGY_STRATEGY_UNSPECIFIED = 'STRATEGY_UNSPECIFIED';
/**
* The server entity is kept.
*/
public const CONFLICT_RESOLUTION_STRATEGY_SERVER_VALUE = 'SERVER_VALUE';
/**
* The whole commit request fails.
*/
public const CONFLICT_RESOLUTION_STRATEGY_FAIL = 'FAIL';
protected $collection_key = 'propertyTransforms';
/**
* 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.
*
* @var string
*/
public $baseVersion;
/**
* The strategy to use when a conflict is detected. Defaults to
* `SERVER_VALUE`. If this is set, then `conflict_detection_strategy` must
* also be set.
*
* @var string
*/
public $conflictResolutionStrategy;
protected $deleteType = Key::class;
protected $deleteDataType = '';
protected $insertType = Entity::class;
protected $insertDataType = '';
protected $propertyMaskType = PropertyMask::class;
protected $propertyMaskDataType = '';
protected $propertyTransformsType = PropertyTransform::class;
protected $propertyTransformsDataType = 'array';
protected $updateType = Entity::class;
protected $updateDataType = '';
/**
* The update time of the entity that this mutation is being applied to. If
* this does not match the current update time on the server, the mutation
* conflicts.
*
* @var string
*/
public $updateTime;
protected $upsertType = Entity::class;
protected $upsertDataType = '';
/**
* 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.
*
* @param string $baseVersion
*/
public function setBaseVersion($baseVersion)
{
$this->baseVersion = $baseVersion;
}
/**
* @return string
*/
public function getBaseVersion()
{
return $this->baseVersion;
}
/**
* The strategy to use when a conflict is detected. Defaults to
* `SERVER_VALUE`. If this is set, then `conflict_detection_strategy` must
* also be set.
*
* Accepted values: STRATEGY_UNSPECIFIED, SERVER_VALUE, FAIL
*
* @param self::CONFLICT_RESOLUTION_STRATEGY_* $conflictResolutionStrategy
*/
public function setConflictResolutionStrategy($conflictResolutionStrategy)
{
$this->conflictResolutionStrategy = $conflictResolutionStrategy;
}
/**
* @return self::CONFLICT_RESOLUTION_STRATEGY_*
*/
public function getConflictResolutionStrategy()
{
return $this->conflictResolutionStrategy;
}
/**
* 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.
*
* @param Key $delete
*/
public function setDelete(Key $delete)
{
$this->delete = $delete;
}
/**
* @return Key
*/
public function getDelete()
{
return $this->delete;
}
/**
* The entity to insert. The entity must not already exist. The entity key's
* final path element may be incomplete.
*
* @param Entity $insert
*/
public function setInsert(Entity $insert)
{
$this->insert = $insert;
}
/**
* @return Entity
*/
public function getInsert()
{
return $this->insert;
}
/**
* The properties to write in this mutation. None of the properties in the
* mask may have a reserved name, except for `__key__`. This field is ignored
* for `delete`. If the entity already exists, only properties referenced in
* the mask are updated, others are left untouched. Properties referenced in
* the mask but not in the entity are deleted.
*
* @param PropertyMask $propertyMask
*/
public function setPropertyMask(PropertyMask $propertyMask)
{
$this->propertyMask = $propertyMask;
}
/**
* @return PropertyMask
*/
public function getPropertyMask()
{
return $this->propertyMask;
}
/**
* Optional. The transforms to perform on the entity. This field can be set
* only when the operation is `insert`, `update`, or `upsert`. If present, the
* transforms are be applied to the entity regardless of the property mask, in
* order, after the operation.
*
* @param PropertyTransform[] $propertyTransforms
*/
public function setPropertyTransforms($propertyTransforms)
{
$this->propertyTransforms = $propertyTransforms;
}
/**
* @return PropertyTransform[]
*/
public function getPropertyTransforms()
{
return $this->propertyTransforms;
}
/**
* The entity to update. The entity must already exist. Must have a complete
* key path.
*
* @param Entity $update
*/
public function setUpdate(Entity $update)
{
$this->update = $update;
}
/**
* @return Entity
*/
public function getUpdate()
{
return $this->update;
}
/**
* The update time of the entity that this mutation is being applied to. If
* this does not match the current update time on the server, the mutation
* conflicts.
*
* @param string $updateTime
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
/**
* The entity to upsert. The entity may or may not already exist. The entity
* key's final path element may be incomplete.
*
* @param Entity $upsert
*/
public function setUpsert(Entity $upsert)
{
$this->upsert = $upsert;
}
/**
* @return Entity
*/
public function getUpsert()
{
return $this->upsert;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Mutation::class, 'Google_Service_Datastore_Mutation');
@@ -0,0 +1,169 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class MutationResult extends \Google\Collection
{
protected $collection_key = 'transformResults';
/**
* Whether a conflict was detected for this mutation. Always false when a
* conflict detection strategy field is not set in the mutation.
*
* @var bool
*/
public $conflictDetected;
/**
* The create time of the entity. This field will not be set after a 'delete'.
*
* @var string
*/
public $createTime;
protected $keyType = Key::class;
protected $keyDataType = '';
protected $transformResultsType = Value::class;
protected $transformResultsDataType = 'array';
/**
* The update time of the entity on the server after processing the mutation.
* If the mutation doesn't change anything on the server, then the timestamp
* will be the update timestamp of the current entity. This field will not be
* set after a 'delete'.
*
* @var string
*/
public $updateTime;
/**
* 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.
*
* @var string
*/
public $version;
/**
* Whether a conflict was detected for this mutation. Always false when a
* conflict detection strategy field is not set in the mutation.
*
* @param bool $conflictDetected
*/
public function setConflictDetected($conflictDetected)
{
$this->conflictDetected = $conflictDetected;
}
/**
* @return bool
*/
public function getConflictDetected()
{
return $this->conflictDetected;
}
/**
* The create time of the entity. This field will not be set after a 'delete'.
*
* @param string $createTime
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* The automatically allocated key. Set only when the mutation allocated a
* key.
*
* @param Key $key
*/
public function setKey(Key $key)
{
$this->key = $key;
}
/**
* @return Key
*/
public function getKey()
{
return $this->key;
}
/**
* The results of applying each PropertyTransform, in the same order of the
* request.
*
* @param Value[] $transformResults
*/
public function setTransformResults($transformResults)
{
$this->transformResults = $transformResults;
}
/**
* @return Value[]
*/
public function getTransformResults()
{
return $this->transformResults;
}
/**
* The update time of the entity on the server after processing the mutation.
* If the mutation doesn't change anything on the server, then the timestamp
* will be the update timestamp of the current entity. This field will not be
* set after a 'delete'.
*
* @param string $updateTime
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
/**
* 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.
*
* @param string $version
*/
public function setVersion($version)
{
$this->version = $version;
}
/**
* @return string
*/
public function getVersion()
{
return $this->version;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MutationResult::class, 'Google_Service_Datastore_MutationResult');
@@ -0,0 +1,92 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class PartitionId extends \Google\Model
{
/**
* If not empty, the ID of the database to which the entities belong.
*
* @var string
*/
public $databaseId;
/**
* If not empty, the ID of the namespace to which the entities belong.
*
* @var string
*/
public $namespaceId;
/**
* The ID of the project to which the entities belong.
*
* @var string
*/
public $projectId;
/**
* If not empty, the ID of the database to which the entities belong.
*
* @param string $databaseId
*/
public function setDatabaseId($databaseId)
{
$this->databaseId = $databaseId;
}
/**
* @return string
*/
public function getDatabaseId()
{
return $this->databaseId;
}
/**
* If not empty, the ID of the namespace to which the entities belong.
*
* @param string $namespaceId
*/
public function setNamespaceId($namespaceId)
{
$this->namespaceId = $namespaceId;
}
/**
* @return string
*/
public function getNamespaceId()
{
return $this->namespaceId;
}
/**
* The ID of the project to which the entities belong.
*
* @param string $projectId
*/
public function setProjectId($projectId)
{
$this->projectId = $projectId;
}
/**
* @return string
*/
public function getProjectId()
{
return $this->projectId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PartitionId::class, 'Google_Service_Datastore_PartitionId');
@@ -0,0 +1,108 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class PathElement extends \Google\Model
{
/**
* 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.
*
* @var string
*/
public $id;
/**
* The kind of the entity. A kind matching regex `__.*__` is reserved/read-
* only. A kind must not contain more than 1500 bytes when UTF-8 encoded.
* Cannot be `""`. Must be valid UTF-8 bytes. Legacy values that are not valid
* UTF-8 are encoded as `__bytes__` where `` is the base-64 encoding of the
* bytes.
*
* @var string
*/
public $kind;
/**
* The name of the entity. A name matching regex `__.*__` is reserved/read-
* only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be
* `""`. Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
* encoded as `__bytes__` where `` is the base-64 encoding of the bytes.
*
* @var string
*/
public $name;
/**
* 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.
*
* @param string $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* The kind of the entity. A kind matching regex `__.*__` is reserved/read-
* only. A kind must not contain more than 1500 bytes when UTF-8 encoded.
* Cannot be `""`. Must be valid UTF-8 bytes. Legacy values that are not valid
* UTF-8 are encoded as `__bytes__` where `` is the base-64 encoding of the
* bytes.
*
* @param string $kind
*/
public function setKind($kind)
{
$this->kind = $kind;
}
/**
* @return string
*/
public function getKind()
{
return $this->kind;
}
/**
* The name of the entity. A name matching regex `__.*__` is reserved/read-
* only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be
* `""`. Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
* encoded as `__bytes__` where `` is the base-64 encoding of the bytes.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PathElement::class, 'Google_Service_Datastore_PathElement');
@@ -0,0 +1,53 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class PlanSummary extends \Google\Collection
{
protected $collection_key = 'indexesUsed';
/**
* The indexes selected for the query. For example: [ {"query_scope":
* "Collection", "properties": "(foo ASC, __name__ ASC)"}, {"query_scope":
* "Collection", "properties": "(bar ASC, __name__ ASC)"} ]
*
* @var array[]
*/
public $indexesUsed;
/**
* The indexes selected for the query. For example: [ {"query_scope":
* "Collection", "properties": "(foo ASC, __name__ ASC)"}, {"query_scope":
* "Collection", "properties": "(bar ASC, __name__ ASC)"} ]
*
* @param array[] $indexesUsed
*/
public function setIndexesUsed($indexesUsed)
{
$this->indexesUsed = $indexesUsed;
}
/**
* @return array[]
*/
public function getIndexesUsed()
{
return $this->indexesUsed;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PlanSummary::class, 'Google_Service_Datastore_PlanSummary');
@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class Projection extends \Google\Model
{
protected $propertyType = PropertyReference::class;
protected $propertyDataType = '';
/**
* The property to project.
*
* @param PropertyReference $property
*/
public function setProperty(PropertyReference $property)
{
$this->property = $property;
}
/**
* @return PropertyReference
*/
public function getProperty()
{
return $this->property;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Projection::class, 'Google_Service_Datastore_Projection');
@@ -0,0 +1,141 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class PropertyFilter extends \Google\Model
{
/**
* Unspecified. This value must not be used.
*/
public const OP_OPERATOR_UNSPECIFIED = 'OPERATOR_UNSPECIFIED';
/**
* The given `property` is less than the given `value`. Requires: * That
* `property` comes first in `order_by`.
*/
public const OP_LESS_THAN = 'LESS_THAN';
/**
* The given `property` is less than or equal to the given `value`. Requires:
* * That `property` comes first in `order_by`.
*/
public const OP_LESS_THAN_OR_EQUAL = 'LESS_THAN_OR_EQUAL';
/**
* The given `property` is greater than the given `value`. Requires: * That
* `property` comes first in `order_by`.
*/
public const OP_GREATER_THAN = 'GREATER_THAN';
/**
* The given `property` is greater than or equal to the given `value`.
* Requires: * That `property` comes first in `order_by`.
*/
public const OP_GREATER_THAN_OR_EQUAL = 'GREATER_THAN_OR_EQUAL';
/**
* The given `property` is equal to the given `value`.
*/
public const OP_EQUAL = 'EQUAL';
/**
* The given `property` is equal to at least one value in the given array.
* Requires: * That `value` is a non-empty `ArrayValue`, subject to
* disjunction limits. * No `NOT_IN` is in the same query.
*/
public const OP_IN = 'IN';
/**
* The given `property` is not equal to the given `value`. Requires: * No
* other `NOT_EQUAL` or `NOT_IN` is in the same query. * That `property` comes
* first in the `order_by`.
*/
public const OP_NOT_EQUAL = 'NOT_EQUAL';
/**
* Limit the result set to the given entity and its descendants. Requires: *
* That `value` is an entity key. * All evaluated disjunctions must have the
* same `HAS_ANCESTOR` filter.
*/
public const OP_HAS_ANCESTOR = 'HAS_ANCESTOR';
/**
* The value of the `property` is not in the given array. Requires: * That
* `value` is a non-empty `ArrayValue` with at most 10 values. * No other
* `OR`, `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query. * That `field`
* comes first in the `order_by`.
*/
public const OP_NOT_IN = 'NOT_IN';
/**
* The operator to filter by.
*
* @var string
*/
public $op;
protected $propertyType = PropertyReference::class;
protected $propertyDataType = '';
protected $valueType = Value::class;
protected $valueDataType = '';
/**
* The operator to filter by.
*
* Accepted values: OPERATOR_UNSPECIFIED, LESS_THAN, LESS_THAN_OR_EQUAL,
* GREATER_THAN, GREATER_THAN_OR_EQUAL, EQUAL, IN, NOT_EQUAL, HAS_ANCESTOR,
* NOT_IN
*
* @param self::OP_* $op
*/
public function setOp($op)
{
$this->op = $op;
}
/**
* @return self::OP_*
*/
public function getOp()
{
return $this->op;
}
/**
* The property to filter by.
*
* @param PropertyReference $property
*/
public function setProperty(PropertyReference $property)
{
$this->property = $property;
}
/**
* @return PropertyReference
*/
public function getProperty()
{
return $this->property;
}
/**
* The value to compare the property to.
*
* @param Value $value
*/
public function setValue(Value $value)
{
$this->value = $value;
}
/**
* @return Value
*/
public function getValue()
{
return $this->value;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PropertyFilter::class, 'Google_Service_Datastore_PropertyFilter');
@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class PropertyMask extends \Google\Collection
{
protected $collection_key = 'paths';
/**
* The paths to the properties covered by this mask. A path is a list of
* property names separated by dots (`.`), for example `foo.bar` means the
* property `bar` inside the entity property `foo` inside the entity
* associated with this path. If a property name contains a dot `.` or a
* backslash `\`, then that name must be escaped. A path must not be empty,
* and may not reference a value inside an array value.
*
* @var string[]
*/
public $paths;
/**
* The paths to the properties covered by this mask. A path is a list of
* property names separated by dots (`.`), for example `foo.bar` means the
* property `bar` inside the entity property `foo` inside the entity
* associated with this path. If a property name contains a dot `.` or a
* backslash `\`, then that name must be escaped. A path must not be empty,
* and may not reference a value inside an array value.
*
* @param string[] $paths
*/
public function setPaths($paths)
{
$this->paths = $paths;
}
/**
* @return string[]
*/
public function getPaths()
{
return $this->paths;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PropertyMask::class, 'Google_Service_Datastore_PropertyMask');
@@ -0,0 +1,80 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class PropertyOrder extends \Google\Model
{
/**
* Unspecified. This value must not be used.
*/
public const DIRECTION_DIRECTION_UNSPECIFIED = 'DIRECTION_UNSPECIFIED';
/**
* Ascending.
*/
public const DIRECTION_ASCENDING = 'ASCENDING';
/**
* Descending.
*/
public const DIRECTION_DESCENDING = 'DESCENDING';
/**
* The direction to order by. Defaults to `ASCENDING`.
*
* @var string
*/
public $direction;
protected $propertyType = PropertyReference::class;
protected $propertyDataType = '';
/**
* The direction to order by. Defaults to `ASCENDING`.
*
* Accepted values: DIRECTION_UNSPECIFIED, ASCENDING, DESCENDING
*
* @param self::DIRECTION_* $direction
*/
public function setDirection($direction)
{
$this->direction = $direction;
}
/**
* @return self::DIRECTION_*
*/
public function getDirection()
{
return $this->direction;
}
/**
* The property to order by.
*
* @param PropertyReference $property
*/
public function setProperty(PropertyReference $property)
{
$this->property = $property;
}
/**
* @return PropertyReference
*/
public function getProperty()
{
return $this->property;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PropertyOrder::class, 'Google_Service_Datastore_PropertyOrder');
@@ -0,0 +1,52 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class PropertyReference extends \Google\Model
{
/**
* A reference to a property. Requires: * MUST be a dot-delimited (`.`) string
* of segments, where each segment conforms to entity property name
* limitations.
*
* @var string
*/
public $name;
/**
* A reference to a property. Requires: * MUST be a dot-delimited (`.`) string
* of segments, where each segment conforms to entity property name
* limitations.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PropertyReference::class, 'Google_Service_Datastore_PropertyReference');
@@ -0,0 +1,218 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class PropertyTransform extends \Google\Model
{
/**
* Unspecified. This value must not be used.
*/
public const SET_TO_SERVER_VALUE_SERVER_VALUE_UNSPECIFIED = 'SERVER_VALUE_UNSPECIFIED';
/**
* The time at which the server processed the request, with millisecond
* precision. If used on multiple properties (same or different entities) in a
* transaction, all the properties will get the same server timestamp.
*/
public const SET_TO_SERVER_VALUE_REQUEST_TIME = 'REQUEST_TIME';
protected $appendMissingElementsType = ArrayValue::class;
protected $appendMissingElementsDataType = '';
protected $incrementType = Value::class;
protected $incrementDataType = '';
protected $maximumType = Value::class;
protected $maximumDataType = '';
protected $minimumType = Value::class;
protected $minimumDataType = '';
/**
* Optional. The name of the property. Property paths (a list of property
* names separated by dots (`.`)) may be used to refer to properties inside
* entity values. For example `foo.bar` means the property `bar` inside the
* entity property `foo`. If a property name contains a dot `.` or a
* backlslash `\`, then that name must be escaped.
*
* @var string
*/
public $property;
protected $removeAllFromArrayType = ArrayValue::class;
protected $removeAllFromArrayDataType = '';
/**
* Sets the property to the given server value.
*
* @var string
*/
public $setToServerValue;
/**
* Appends the given elements in order if they are not already present in the
* current property value. If the property is not an array, or if the property
* does not yet exist, it is first set to the empty array. Equivalent numbers
* of different types (e.g. 3L and 3.0) are considered equal when checking if
* a value is missing. NaN is equal to NaN, and the null value is equal to the
* null value. If the input contains multiple equivalent values, only the
* first will be considered. The corresponding transform result will be the
* null value.
*
* @param ArrayValue $appendMissingElements
*/
public function setAppendMissingElements(ArrayValue $appendMissingElements)
{
$this->appendMissingElements = $appendMissingElements;
}
/**
* @return ArrayValue
*/
public function getAppendMissingElements()
{
return $this->appendMissingElements;
}
/**
* Adds the given value to the property's current value. This must be an
* integer or a double value. If the property is not an integer or double, or
* if the property does not yet exist, the transformation will set the
* property to the given value. If either of the given value or the current
* property value are doubles, both values will be interpreted as doubles.
* Double arithmetic and representation of double values follows IEEE 754
* semantics. If there is positive/negative integer overflow, the property is
* resolved to the largest magnitude positive/negative integer.
*
* @param Value $increment
*/
public function setIncrement(Value $increment)
{
$this->increment = $increment;
}
/**
* @return Value
*/
public function getIncrement()
{
return $this->increment;
}
/**
* Sets the property to the maximum of its current value and the given value.
* This must be an integer or a double value. If the property is not an
* integer or double, or if the property does not yet exist, the
* transformation will set the property to the given value. If a maximum
* operation is applied where the property and the input value are of mixed
* types (that is - one is an integer and one is a double) the property takes
* on the type of the larger operand. If the operands are equivalent (e.g. 3
* and 3.0), the property does not change. 0, 0.0, and -0.0 are all zero. The
* maximum of a zero stored value and zero input value is always the stored
* value. The maximum of any numeric value x and NaN is NaN.
*
* @param Value $maximum
*/
public function setMaximum(Value $maximum)
{
$this->maximum = $maximum;
}
/**
* @return Value
*/
public function getMaximum()
{
return $this->maximum;
}
/**
* Sets the property to the minimum of its current value and the given value.
* This must be an integer or a double value. If the property is not an
* integer or double, or if the property does not yet exist, the
* transformation will set the property to the input value. If a minimum
* operation is applied where the property and the input value are of mixed
* types (that is - one is an integer and one is a double) the property takes
* on the type of the smaller operand. If the operands are equivalent (e.g. 3
* and 3.0), the property does not change. 0, 0.0, and -0.0 are all zero. The
* minimum of a zero stored value and zero input value is always the stored
* value. The minimum of any numeric value x and NaN is NaN.
*
* @param Value $minimum
*/
public function setMinimum(Value $minimum)
{
$this->minimum = $minimum;
}
/**
* @return Value
*/
public function getMinimum()
{
return $this->minimum;
}
/**
* Optional. The name of the property. Property paths (a list of property
* names separated by dots (`.`)) may be used to refer to properties inside
* entity values. For example `foo.bar` means the property `bar` inside the
* entity property `foo`. If a property name contains a dot `.` or a
* backlslash `\`, then that name must be escaped.
*
* @param string $property
*/
public function setProperty($property)
{
$this->property = $property;
}
/**
* @return string
*/
public function getProperty()
{
return $this->property;
}
/**
* Removes all of the given elements from the array in the property. If the
* property is not an array, or if the property does not yet exist, it is set
* to the empty array. Equivalent numbers of different types (e.g. 3L and 3.0)
* are considered equal when deciding whether an element should be removed.
* NaN is equal to NaN, and the null value is equal to the null value. This
* will remove all equivalent values if there are duplicates. The
* corresponding transform result will be the null value.
*
* @param ArrayValue $removeAllFromArray
*/
public function setRemoveAllFromArray(ArrayValue $removeAllFromArray)
{
$this->removeAllFromArray = $removeAllFromArray;
}
/**
* @return ArrayValue
*/
public function getRemoveAllFromArray()
{
return $this->removeAllFromArray;
}
/**
* Sets the property to the given server value.
*
* Accepted values: SERVER_VALUE_UNSPECIFIED, REQUEST_TIME
*
* @param self::SET_TO_SERVER_VALUE_* $setToServerValue
*/
public function setSetToServerValue($setToServerValue)
{
$this->setToServerValue = $setToServerValue;
}
/**
* @return self::SET_TO_SERVER_VALUE_*
*/
public function getSetToServerValue()
{
return $this->setToServerValue;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PropertyTransform::class, 'Google_Service_Datastore_PropertyTransform');
+244
View File
@@ -0,0 +1,244 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class Query extends \Google\Collection
{
protected $collection_key = 'projection';
protected $distinctOnType = PropertyReference::class;
protected $distinctOnDataType = 'array';
/**
* An ending point for the query results. Query cursors are returned in query
* result batches and [can only be used to limit the same query](https://cloud
* .google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
*
* @var string
*/
public $endCursor;
protected $filterType = Filter::class;
protected $filterDataType = '';
protected $findNearestType = FindNearest::class;
protected $findNearestDataType = '';
protected $kindType = KindExpression::class;
protected $kindDataType = 'array';
/**
* The maximum number of results to return. Applies after all other
* constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0
* if specified.
*
* @var int
*/
public $limit;
/**
* The number of results to skip. Applies before limit, but after all other
* constraints. Optional. Must be >= 0 if specified.
*
* @var int
*/
public $offset;
protected $orderType = PropertyOrder::class;
protected $orderDataType = 'array';
protected $projectionType = Projection::class;
protected $projectionDataType = 'array';
/**
* A starting point for the query results. Query cursors are returned in query
* result batches and [can only be used to continue the same query](https://cl
* oud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
*
* @var string
*/
public $startCursor;
/**
* 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). Requires: * If `order` is specified, the
* set of distinct on properties must appear before the non-distinct on
* properties in `order`.
*
* @param PropertyReference[] $distinctOn
*/
public function setDistinctOn($distinctOn)
{
$this->distinctOn = $distinctOn;
}
/**
* @return PropertyReference[]
*/
public function getDistinctOn()
{
return $this->distinctOn;
}
/**
* An ending point for the query results. Query cursors are returned in query
* result batches and [can only be used to limit the same query](https://cloud
* .google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
*
* @param string $endCursor
*/
public function setEndCursor($endCursor)
{
$this->endCursor = $endCursor;
}
/**
* @return string
*/
public function getEndCursor()
{
return $this->endCursor;
}
/**
* The filter to apply.
*
* @param Filter $filter
*/
public function setFilter(Filter $filter)
{
$this->filter = $filter;
}
/**
* @return Filter
*/
public function getFilter()
{
return $this->filter;
}
/**
* Optional. A potential Nearest Neighbors Search. Applies after all other
* filters and ordering. Finds the closest vector embeddings to the given
* query vector.
*
* @param FindNearest $findNearest
*/
public function setFindNearest(FindNearest $findNearest)
{
$this->findNearest = $findNearest;
}
/**
* @return FindNearest
*/
public function getFindNearest()
{
return $this->findNearest;
}
/**
* The kinds to query (if empty, returns entities of all kinds). Currently at
* most 1 kind may be specified.
*
* @param KindExpression[] $kind
*/
public function setKind($kind)
{
$this->kind = $kind;
}
/**
* @return KindExpression[]
*/
public function getKind()
{
return $this->kind;
}
/**
* The maximum number of results to return. Applies after all other
* constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0
* if specified.
*
* @param int $limit
*/
public function setLimit($limit)
{
$this->limit = $limit;
}
/**
* @return int
*/
public function getLimit()
{
return $this->limit;
}
/**
* The number of results to skip. Applies before limit, but after all other
* constraints. Optional. Must be >= 0 if specified.
*
* @param int $offset
*/
public function setOffset($offset)
{
$this->offset = $offset;
}
/**
* @return int
*/
public function getOffset()
{
return $this->offset;
}
/**
* The order to apply to the query results (if empty, order is unspecified).
*
* @param PropertyOrder[] $order
*/
public function setOrder($order)
{
$this->order = $order;
}
/**
* @return PropertyOrder[]
*/
public function getOrder()
{
return $this->order;
}
/**
* The projection to return. Defaults to returning all properties.
*
* @param Projection[] $projection
*/
public function setProjection($projection)
{
$this->projection = $projection;
}
/**
* @return Projection[]
*/
public function getProjection()
{
return $this->projection;
}
/**
* A starting point for the query results. Query cursors are returned in query
* result batches and [can only be used to continue the same query](https://cl
* oud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
*
* @param string $startCursor
*/
public function setStartCursor($startCursor)
{
$this->startCursor = $startCursor;
}
/**
* @return string
*/
public function getStartCursor()
{
return $this->startCursor;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Query::class, 'Google_Service_Datastore_Query');
@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class QueryPlan extends \Google\Model
{
/**
* @var array[]
*/
public $planInfo;
/**
* @param array[]
*/
public function setPlanInfo($planInfo)
{
$this->planInfo = $planInfo;
}
/**
* @return array[]
*/
public function getPlanInfo()
{
return $this->planInfo;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QueryPlan::class, 'Google_Service_Datastore_QueryPlan');
@@ -0,0 +1,266 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class QueryResultBatch extends \Google\Collection
{
/**
* Unspecified. This value is never used.
*/
public const ENTITY_RESULT_TYPE_RESULT_TYPE_UNSPECIFIED = 'RESULT_TYPE_UNSPECIFIED';
/**
* The key and properties.
*/
public const ENTITY_RESULT_TYPE_FULL = 'FULL';
/**
* A projected subset of properties. The entity may have no key.
*/
public const ENTITY_RESULT_TYPE_PROJECTION = 'PROJECTION';
/**
* Only the key.
*/
public const ENTITY_RESULT_TYPE_KEY_ONLY = 'KEY_ONLY';
/**
* Unspecified. This value is never used.
*/
public const MORE_RESULTS_MORE_RESULTS_TYPE_UNSPECIFIED = 'MORE_RESULTS_TYPE_UNSPECIFIED';
/**
* There may be additional batches to fetch from this query.
*/
public const MORE_RESULTS_NOT_FINISHED = 'NOT_FINISHED';
/**
* The query is finished, but there may be more results after the limit.
*/
public const MORE_RESULTS_MORE_RESULTS_AFTER_LIMIT = 'MORE_RESULTS_AFTER_LIMIT';
/**
* The query is finished, but there may be more results after the end cursor.
*/
public const MORE_RESULTS_MORE_RESULTS_AFTER_CURSOR = 'MORE_RESULTS_AFTER_CURSOR';
/**
* The query is finished, and there are no more results.
*/
public const MORE_RESULTS_NO_MORE_RESULTS = 'NO_MORE_RESULTS';
protected $collection_key = 'entityResults';
/**
* A cursor that points to the position after the last result in the batch.
*
* @var string
*/
public $endCursor;
/**
* The result type for every entity in `entity_results`.
*
* @var string
*/
public $entityResultType;
protected $entityResultsType = EntityResult::class;
protected $entityResultsDataType = 'array';
/**
* The state of the query after the current batch.
*
* @var string
*/
public $moreResults;
/**
* Read timestamp 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 timestamp. Each batch's read timestamp is
* valid for all preceding batches. This value will not be set for eventually
* consistent queries in Cloud Datastore.
*
* @var string
*/
public $readTime;
/**
* A cursor that points to the position after the last skipped result. Will be
* set when `skipped_results` != 0.
*
* @var string
*/
public $skippedCursor;
/**
* The number of results skipped, typically because of an offset.
*
* @var int
*/
public $skippedResults;
/**
* 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.
*
* @var string
*/
public $snapshotVersion;
/**
* A cursor that points to the position after the last result in the batch.
*
* @param string $endCursor
*/
public function setEndCursor($endCursor)
{
$this->endCursor = $endCursor;
}
/**
* @return string
*/
public function getEndCursor()
{
return $this->endCursor;
}
/**
* The result type for every entity in `entity_results`.
*
* Accepted values: RESULT_TYPE_UNSPECIFIED, FULL, PROJECTION, KEY_ONLY
*
* @param self::ENTITY_RESULT_TYPE_* $entityResultType
*/
public function setEntityResultType($entityResultType)
{
$this->entityResultType = $entityResultType;
}
/**
* @return self::ENTITY_RESULT_TYPE_*
*/
public function getEntityResultType()
{
return $this->entityResultType;
}
/**
* The results for this batch.
*
* @param EntityResult[] $entityResults
*/
public function setEntityResults($entityResults)
{
$this->entityResults = $entityResults;
}
/**
* @return EntityResult[]
*/
public function getEntityResults()
{
return $this->entityResults;
}
/**
* The state of the query after the current batch.
*
* Accepted values: MORE_RESULTS_TYPE_UNSPECIFIED, NOT_FINISHED,
* MORE_RESULTS_AFTER_LIMIT, MORE_RESULTS_AFTER_CURSOR, NO_MORE_RESULTS
*
* @param self::MORE_RESULTS_* $moreResults
*/
public function setMoreResults($moreResults)
{
$this->moreResults = $moreResults;
}
/**
* @return self::MORE_RESULTS_*
*/
public function getMoreResults()
{
return $this->moreResults;
}
/**
* Read timestamp 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 timestamp. Each batch's read timestamp is
* valid for all preceding batches. This value will not be set for eventually
* consistent queries in Cloud Datastore.
*
* @param string $readTime
*/
public function setReadTime($readTime)
{
$this->readTime = $readTime;
}
/**
* @return string
*/
public function getReadTime()
{
return $this->readTime;
}
/**
* A cursor that points to the position after the last skipped result. Will be
* set when `skipped_results` != 0.
*
* @param string $skippedCursor
*/
public function setSkippedCursor($skippedCursor)
{
$this->skippedCursor = $skippedCursor;
}
/**
* @return string
*/
public function getSkippedCursor()
{
return $this->skippedCursor;
}
/**
* The number of results skipped, typically because of an offset.
*
* @param int $skippedResults
*/
public function setSkippedResults($skippedResults)
{
$this->skippedResults = $skippedResults;
}
/**
* @return int
*/
public function getSkippedResults()
{
return $this->skippedResults;
}
/**
* 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.
*
* @param string $snapshotVersion
*/
public function setSnapshotVersion($snapshotVersion)
{
$this->snapshotVersion = $snapshotVersion;
}
/**
* @return string
*/
public function getSnapshotVersion()
{
return $this->snapshotVersion;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(QueryResultBatch::class, 'Google_Service_Datastore_QueryResultBatch');
@@ -0,0 +1,136 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class ReadOptions extends \Google\Model
{
/**
* Unspecified. This value must not be used.
*/
public const READ_CONSISTENCY_READ_CONSISTENCY_UNSPECIFIED = 'READ_CONSISTENCY_UNSPECIFIED';
/**
* Strong consistency.
*/
public const READ_CONSISTENCY_STRONG = 'STRONG';
/**
* Eventual consistency.
*/
public const READ_CONSISTENCY_EVENTUAL = 'EVENTUAL';
protected $newTransactionType = TransactionOptions::class;
protected $newTransactionDataType = '';
/**
* The non-transactional read consistency to use.
*
* @var string
*/
public $readConsistency;
/**
* Reads entities as they were at the given time. This value is only supported
* for Cloud Firestore in Datastore mode. This must be a microsecond precision
* timestamp within the past one hour, or if Point-in-Time Recovery is
* enabled, can additionally be a whole minute timestamp within the past 7
* days.
*
* @var string
*/
public $readTime;
/**
* The identifier of the transaction in which to read. A transaction
* identifier is returned by a call to Datastore.BeginTransaction.
*
* @var string
*/
public $transaction;
/**
* Options for beginning a new transaction for this request. The new
* transaction identifier will be returned in the corresponding response as
* either LookupResponse.transaction or RunQueryResponse.transaction.
*
* @param TransactionOptions $newTransaction
*/
public function setNewTransaction(TransactionOptions $newTransaction)
{
$this->newTransaction = $newTransaction;
}
/**
* @return TransactionOptions
*/
public function getNewTransaction()
{
return $this->newTransaction;
}
/**
* The non-transactional read consistency to use.
*
* Accepted values: READ_CONSISTENCY_UNSPECIFIED, STRONG, EVENTUAL
*
* @param self::READ_CONSISTENCY_* $readConsistency
*/
public function setReadConsistency($readConsistency)
{
$this->readConsistency = $readConsistency;
}
/**
* @return self::READ_CONSISTENCY_*
*/
public function getReadConsistency()
{
return $this->readConsistency;
}
/**
* Reads entities as they were at the given time. This value is only supported
* for Cloud Firestore in Datastore mode. This must be a microsecond precision
* timestamp within the past one hour, or if Point-in-Time Recovery is
* enabled, can additionally be a whole minute timestamp within the past 7
* days.
*
* @param string $readTime
*/
public function setReadTime($readTime)
{
$this->readTime = $readTime;
}
/**
* @return string
*/
public function getReadTime()
{
return $this->readTime;
}
/**
* The identifier of the transaction in which to read. A transaction
* identifier is returned by a call to Datastore.BeginTransaction.
*
* @param string $transaction
*/
public function setTransaction($transaction)
{
$this->transaction = $transaction;
}
/**
* @return string
*/
public function getTransaction()
{
return $this->transaction;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReadOptions::class, 'Google_Service_Datastore_ReadOptions');
@@ -0,0 +1,48 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class ReadWrite extends \Google\Model
{
/**
* The transaction identifier of the transaction being retried.
*
* @var string
*/
public $previousTransaction;
/**
* The transaction identifier of the transaction being retried.
*
* @param string $previousTransaction
*/
public function setPreviousTransaction($previousTransaction)
{
$this->previousTransaction = $previousTransaction;
}
/**
* @return string
*/
public function getPreviousTransaction()
{
return $this->previousTransaction;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReadWrite::class, 'Google_Service_Datastore_ReadWrite');
@@ -0,0 +1,70 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class ReserveIdsRequest extends \Google\Collection
{
protected $collection_key = 'keys';
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @var string
*/
public $databaseId;
protected $keysType = Key::class;
protected $keysDataType = 'array';
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @param string $databaseId
*/
public function setDatabaseId($databaseId)
{
$this->databaseId = $databaseId;
}
/**
* @return string
*/
public function getDatabaseId()
{
return $this->databaseId;
}
/**
* Required. A list of keys with complete key paths whose numeric IDs should
* not be auto-allocated.
*
* @param Key[] $keys
*/
public function setKeys($keys)
{
$this->keys = $keys;
}
/**
* @return Key[]
*/
public function getKeys()
{
return $this->keys;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReserveIdsRequest::class, 'Google_Service_Datastore_ReserveIdsRequest');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class ReserveIdsResponse extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReserveIdsResponse::class, 'Google_Service_Datastore_ReserveIdsResponse');
@@ -0,0 +1,227 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore\Resource;
use Google\Service\Datastore\AllocateIdsRequest;
use Google\Service\Datastore\AllocateIdsResponse;
use Google\Service\Datastore\BeginTransactionRequest;
use Google\Service\Datastore\BeginTransactionResponse;
use Google\Service\Datastore\CommitRequest;
use Google\Service\Datastore\CommitResponse;
use Google\Service\Datastore\GoogleDatastoreAdminV1ExportEntitiesRequest;
use Google\Service\Datastore\GoogleDatastoreAdminV1ImportEntitiesRequest;
use Google\Service\Datastore\GoogleLongrunningOperation;
use Google\Service\Datastore\LookupRequest;
use Google\Service\Datastore\LookupResponse;
use Google\Service\Datastore\ReserveIdsRequest;
use Google\Service\Datastore\ReserveIdsResponse;
use Google\Service\Datastore\RollbackRequest;
use Google\Service\Datastore\RollbackResponse;
use Google\Service\Datastore\RunAggregationQueryRequest;
use Google\Service\Datastore\RunAggregationQueryResponse;
use Google\Service\Datastore\RunQueryRequest;
use Google\Service\Datastore\RunQueryResponse;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $datastoreService = new Google\Service\Datastore(...);
* $projects = $datastoreService->projects;
* </code>
*/
class Projects extends \Google\Service\Resource
{
/**
* Allocates IDs for the given keys, which is useful for referencing an entity
* before it is inserted. (projects.allocateIds)
*
* @param string $projectId Required. The ID of the project against which to
* make the request.
* @param AllocateIdsRequest $postBody
* @param array $optParams Optional parameters.
* @return AllocateIdsResponse
* @throws \Google\Service\Exception
*/
public function allocateIds($projectId, AllocateIdsRequest $postBody, $optParams = [])
{
$params = ['projectId' => $projectId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('allocateIds', [$params], AllocateIdsResponse::class);
}
/**
* Begins a new transaction. (projects.beginTransaction)
*
* @param string $projectId Required. The ID of the project against which to
* make the request.
* @param BeginTransactionRequest $postBody
* @param array $optParams Optional parameters.
* @return BeginTransactionResponse
* @throws \Google\Service\Exception
*/
public function beginTransaction($projectId, BeginTransactionRequest $postBody, $optParams = [])
{
$params = ['projectId' => $projectId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('beginTransaction', [$params], BeginTransactionResponse::class);
}
/**
* Commits a transaction, optionally creating, deleting or modifying some
* entities. (projects.commit)
*
* @param string $projectId Required. The ID of the project against which to
* make the request.
* @param CommitRequest $postBody
* @param array $optParams Optional parameters.
* @return CommitResponse
* @throws \Google\Service\Exception
*/
public function commit($projectId, CommitRequest $postBody, $optParams = [])
{
$params = ['projectId' => $projectId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('commit', [$params], CommitResponse::class);
}
/**
* Exports a copy of all or a subset of entities from Google Cloud Datastore to
* another storage system, such as Google Cloud Storage. Recent updates to
* entities may not be reflected in the export. The export occurs in the
* background and its progress can be monitored and managed via the Operation
* resource that is created. The output of an export may only be used once the
* associated operation is done. If an export operation is cancelled before
* completion it may leave partial data behind in Google Cloud Storage.
* (projects.export)
*
* @param string $projectId Required. Project ID against which to make the
* request.
* @param GoogleDatastoreAdminV1ExportEntitiesRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function export($projectId, GoogleDatastoreAdminV1ExportEntitiesRequest $postBody, $optParams = [])
{
$params = ['projectId' => $projectId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('export', [$params], GoogleLongrunningOperation::class);
}
/**
* Imports entities into Google Cloud Datastore. Existing entities with the same
* key are overwritten. The import occurs in the background and its progress can
* be monitored and managed via the Operation resource that is created. If an
* ImportEntities operation is cancelled, it is possible that a subset of the
* data has already been imported to Cloud Datastore. (projects.import)
*
* @param string $projectId Required. Project ID against which to make the
* request.
* @param GoogleDatastoreAdminV1ImportEntitiesRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function import($projectId, GoogleDatastoreAdminV1ImportEntitiesRequest $postBody, $optParams = [])
{
$params = ['projectId' => $projectId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('import', [$params], GoogleLongrunningOperation::class);
}
/**
* Looks up entities by key. (projects.lookup)
*
* @param string $projectId Required. The ID of the project against which to
* make the request.
* @param LookupRequest $postBody
* @param array $optParams Optional parameters.
* @return LookupResponse
* @throws \Google\Service\Exception
*/
public function lookup($projectId, LookupRequest $postBody, $optParams = [])
{
$params = ['projectId' => $projectId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('lookup', [$params], LookupResponse::class);
}
/**
* Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
* (projects.reserveIds)
*
* @param string $projectId Required. The ID of the project against which to
* make the request.
* @param ReserveIdsRequest $postBody
* @param array $optParams Optional parameters.
* @return ReserveIdsResponse
* @throws \Google\Service\Exception
*/
public function reserveIds($projectId, ReserveIdsRequest $postBody, $optParams = [])
{
$params = ['projectId' => $projectId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('reserveIds', [$params], ReserveIdsResponse::class);
}
/**
* Rolls back a transaction. (projects.rollback)
*
* @param string $projectId Required. The ID of the project against which to
* make the request.
* @param RollbackRequest $postBody
* @param array $optParams Optional parameters.
* @return RollbackResponse
* @throws \Google\Service\Exception
*/
public function rollback($projectId, RollbackRequest $postBody, $optParams = [])
{
$params = ['projectId' => $projectId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('rollback', [$params], RollbackResponse::class);
}
/**
* Runs an aggregation query. (projects.runAggregationQuery)
*
* @param string $projectId Required. The ID of the project against which to
* make the request.
* @param RunAggregationQueryRequest $postBody
* @param array $optParams Optional parameters.
* @return RunAggregationQueryResponse
* @throws \Google\Service\Exception
*/
public function runAggregationQuery($projectId, RunAggregationQueryRequest $postBody, $optParams = [])
{
$params = ['projectId' => $projectId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('runAggregationQuery', [$params], RunAggregationQueryResponse::class);
}
/**
* Queries for entities. (projects.runQuery)
*
* @param string $projectId Required. The ID of the project against which to
* make the request.
* @param RunQueryRequest $postBody
* @param array $optParams Optional parameters.
* @return RunQueryResponse
* @throws \Google\Service\Exception
*/
public function runQuery($projectId, RunQueryRequest $postBody, $optParams = [])
{
$params = ['projectId' => $projectId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('runQuery', [$params], RunQueryResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Projects::class, 'Google_Service_Datastore_Resource_Projects');
@@ -0,0 +1,117 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore\Resource;
use Google\Service\Datastore\GoogleDatastoreAdminV1Index;
use Google\Service\Datastore\GoogleDatastoreAdminV1ListIndexesResponse;
use Google\Service\Datastore\GoogleLongrunningOperation;
/**
* The "indexes" collection of methods.
* Typical usage is:
* <code>
* $datastoreService = new Google\Service\Datastore(...);
* $indexes = $datastoreService->projects_indexes;
* </code>
*/
class ProjectsIndexes extends \Google\Service\Resource
{
/**
* Creates the specified index. A newly created index's initial state is
* `CREATING`. On completion of the returned google.longrunning.Operation, the
* state will be `READY`. If the index already exists, the call will return an
* `ALREADY_EXISTS` status. During index creation, the process could result in
* an error, in which case the index will move to the `ERROR` state. The process
* can be recovered by fixing the data that caused the error, removing the index
* with delete, then re-creating the index with create. Indexes with a single
* property cannot be created. (indexes.create)
*
* @param string $projectId Project ID against which to make the request.
* @param GoogleDatastoreAdminV1Index $postBody
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function create($projectId, GoogleDatastoreAdminV1Index $postBody, $optParams = [])
{
$params = ['projectId' => $projectId, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], GoogleLongrunningOperation::class);
}
/**
* Deletes an existing index. An index can only be deleted if it is in a `READY`
* or `ERROR` state. On successful execution of the request, the index will be
* in a `DELETING` state. And on completion of the returned
* google.longrunning.Operation, the index will be removed. During index
* deletion, the process could result in an error, in which case the index will
* move to the `ERROR` state. The process can be recovered by fixing the data
* that caused the error, followed by calling delete again. (indexes.delete)
*
* @param string $projectId Project ID against which to make the request.
* @param string $indexId The resource ID of the index to delete.
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function delete($projectId, $indexId, $optParams = [])
{
$params = ['projectId' => $projectId, 'indexId' => $indexId];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], GoogleLongrunningOperation::class);
}
/**
* Gets an index. (indexes.get)
*
* @param string $projectId Project ID against which to make the request.
* @param string $indexId The resource ID of the index to get.
* @param array $optParams Optional parameters.
* @return GoogleDatastoreAdminV1Index
* @throws \Google\Service\Exception
*/
public function get($projectId, $indexId, $optParams = [])
{
$params = ['projectId' => $projectId, 'indexId' => $indexId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleDatastoreAdminV1Index::class);
}
/**
* Lists the indexes that match the specified filters. Datastore uses an
* eventually consistent query to fetch the list of indexes and may occasionally
* return stale results. (indexes.listProjectsIndexes)
*
* @param string $projectId Project ID against which to make the request.
* @param array $optParams Optional parameters.
*
* @opt_param string filter
* @opt_param int pageSize The maximum number of items to return. If zero, then
* all results will be returned.
* @opt_param string pageToken The next_page_token value returned from a
* previous List request, if any.
* @return GoogleDatastoreAdminV1ListIndexesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsIndexes($projectId, $optParams = [])
{
$params = ['projectId' => $projectId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleDatastoreAdminV1ListIndexesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsIndexes::class, 'Google_Service_Datastore_Resource_ProjectsIndexes');
@@ -0,0 +1,119 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore\Resource;
use Google\Service\Datastore\DatastoreEmpty;
use Google\Service\Datastore\GoogleLongrunningListOperationsResponse;
use Google\Service\Datastore\GoogleLongrunningOperation;
/**
* The "operations" collection of methods.
* Typical usage is:
* <code>
* $datastoreService = new Google\Service\Datastore(...);
* $operations = $datastoreService->projects_operations;
* </code>
*/
class ProjectsOperations extends \Google\Service\Resource
{
/**
* Starts asynchronous cancellation on a long-running operation. The server
* makes a best effort to cancel the operation, but success is not guaranteed.
* If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
* other methods to check whether the cancellation succeeded or whether the
* operation completed despite cancellation. On successful cancellation, the
* operation is not deleted; instead, it becomes an operation with an
* Operation.error value with a google.rpc.Status.code of `1`, corresponding to
* `Code.CANCELLED`. (operations.cancel)
*
* @param string $name The name of the operation resource to be cancelled.
* @param array $optParams Optional parameters.
* @return DatastoreEmpty
* @throws \Google\Service\Exception
*/
public function cancel($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('cancel', [$params], DatastoreEmpty::class);
}
/**
* Deletes a long-running operation. This method indicates that the client is no
* longer interested in the operation result. It does not cancel the operation.
* If the server doesn't support this method, it returns
* `google.rpc.Code.UNIMPLEMENTED`. (operations.delete)
*
* @param string $name The name of the operation resource to be deleted.
* @param array $optParams Optional parameters.
* @return DatastoreEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], DatastoreEmpty::class);
}
/**
* Gets the latest state of a long-running operation. Clients can use this
* method to poll the operation result at intervals as recommended by the API
* service. (operations.get)
*
* @param string $name The name of the operation resource.
* @param array $optParams Optional parameters.
* @return GoogleLongrunningOperation
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], GoogleLongrunningOperation::class);
}
/**
* Lists operations that match the specified filter in the request. If the
* server doesn't support this method, it returns `UNIMPLEMENTED`.
* (operations.listProjectsOperations)
*
* @param string $name The name of the operation's parent resource.
* @param array $optParams Optional parameters.
*
* @opt_param string filter The standard list filter.
* @opt_param int pageSize The standard list page size.
* @opt_param string pageToken The standard list page token.
* @opt_param bool returnPartialSuccess When set to `true`, operations that are
* reachable are returned as normal, and those that are unreachable are returned
* in the ListOperationsResponse.unreachable field. This can only be `true` when
* reading across collections. For example, when `parent` is set to
* `"projects/example/locations/-"`. This field is not supported by default and
* will result in an `UNIMPLEMENTED` error if set unless explicitly documented
* otherwise in service or product specific documentation.
* @return GoogleLongrunningListOperationsResponse
* @throws \Google\Service\Exception
*/
public function listProjectsOperations($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], GoogleLongrunningListOperationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsOperations::class, 'Google_Service_Datastore_Resource_ProjectsOperations');
@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class ResultSetStats extends \Google\Model
{
protected $queryPlanType = QueryPlan::class;
protected $queryPlanDataType = '';
/**
* @var array[]
*/
public $queryStats;
/**
* @param QueryPlan
*/
public function setQueryPlan(QueryPlan $queryPlan)
{
$this->queryPlan = $queryPlan;
}
/**
* @return QueryPlan
*/
public function getQueryPlan()
{
return $this->queryPlan;
}
/**
* @param array[]
*/
public function setQueryStats($queryStats)
{
$this->queryStats = $queryStats;
}
/**
* @return array[]
*/
public function getQueryStats()
{
return $this->queryStats;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ResultSetStats::class, 'Google_Service_Datastore_ResultSetStats');
@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class RollbackRequest extends \Google\Model
{
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @var string
*/
public $databaseId;
/**
* Required. The transaction identifier, returned by a call to
* Datastore.BeginTransaction.
*
* @var string
*/
public $transaction;
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @param string $databaseId
*/
public function setDatabaseId($databaseId)
{
$this->databaseId = $databaseId;
}
/**
* @return string
*/
public function getDatabaseId()
{
return $this->databaseId;
}
/**
* Required. The transaction identifier, returned by a call to
* Datastore.BeginTransaction.
*
* @param string $transaction
*/
public function setTransaction($transaction)
{
$this->transaction = $transaction;
}
/**
* @return string
*/
public function getTransaction()
{
return $this->transaction;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RollbackRequest::class, 'Google_Service_Datastore_RollbackRequest');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class RollbackResponse extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RollbackResponse::class, 'Google_Service_Datastore_RollbackResponse');
@@ -0,0 +1,143 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class RunAggregationQueryRequest extends \Google\Model
{
protected $aggregationQueryType = AggregationQuery::class;
protected $aggregationQueryDataType = '';
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @var string
*/
public $databaseId;
protected $explainOptionsType = ExplainOptions::class;
protected $explainOptionsDataType = '';
protected $gqlQueryType = GqlQuery::class;
protected $gqlQueryDataType = '';
protected $partitionIdType = PartitionId::class;
protected $partitionIdDataType = '';
protected $readOptionsType = ReadOptions::class;
protected $readOptionsDataType = '';
/**
* The query to run.
*
* @param AggregationQuery $aggregationQuery
*/
public function setAggregationQuery(AggregationQuery $aggregationQuery)
{
$this->aggregationQuery = $aggregationQuery;
}
/**
* @return AggregationQuery
*/
public function getAggregationQuery()
{
return $this->aggregationQuery;
}
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @param string $databaseId
*/
public function setDatabaseId($databaseId)
{
$this->databaseId = $databaseId;
}
/**
* @return string
*/
public function getDatabaseId()
{
return $this->databaseId;
}
/**
* Optional. Explain options for the query. If set, additional query
* statistics will be returned. If not, only query results will be returned.
*
* @param ExplainOptions $explainOptions
*/
public function setExplainOptions(ExplainOptions $explainOptions)
{
$this->explainOptions = $explainOptions;
}
/**
* @return ExplainOptions
*/
public function getExplainOptions()
{
return $this->explainOptions;
}
/**
* The GQL query to run. This query must be an aggregation query.
*
* @param GqlQuery $gqlQuery
*/
public function setGqlQuery(GqlQuery $gqlQuery)
{
$this->gqlQuery = $gqlQuery;
}
/**
* @return GqlQuery
*/
public function getGqlQuery()
{
return $this->gqlQuery;
}
/**
* 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.
*
* @param PartitionId $partitionId
*/
public function setPartitionId(PartitionId $partitionId)
{
$this->partitionId = $partitionId;
}
/**
* @return PartitionId
*/
public function getPartitionId()
{
return $this->partitionId;
}
/**
* The options for this query.
*
* @param ReadOptions $readOptions
*/
public function setReadOptions(ReadOptions $readOptions)
{
$this->readOptions = $readOptions;
}
/**
* @return ReadOptions
*/
public function getReadOptions()
{
return $this->readOptions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RunAggregationQueryRequest::class, 'Google_Service_Datastore_RunAggregationQueryRequest');
@@ -0,0 +1,108 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class RunAggregationQueryResponse extends \Google\Model
{
protected $batchType = AggregationResultBatch::class;
protected $batchDataType = '';
protected $explainMetricsType = ExplainMetrics::class;
protected $explainMetricsDataType = '';
protected $queryType = AggregationQuery::class;
protected $queryDataType = '';
/**
* The identifier of the transaction that was started as part of this
* RunAggregationQuery request. Set only when ReadOptions.new_transaction was
* set in RunAggregationQueryRequest.read_options.
*
* @var string
*/
public $transaction;
/**
* A batch of aggregation results. Always present.
*
* @param AggregationResultBatch $batch
*/
public function setBatch(AggregationResultBatch $batch)
{
$this->batch = $batch;
}
/**
* @return AggregationResultBatch
*/
public function getBatch()
{
return $this->batch;
}
/**
* Query explain metrics. This is only present when the
* RunAggregationQueryRequest.explain_options is provided, and it is sent only
* once with the last response in the stream.
*
* @param ExplainMetrics $explainMetrics
*/
public function setExplainMetrics(ExplainMetrics $explainMetrics)
{
$this->explainMetrics = $explainMetrics;
}
/**
* @return ExplainMetrics
*/
public function getExplainMetrics()
{
return $this->explainMetrics;
}
/**
* The parsed form of the `GqlQuery` from the request, if it was set.
*
* @param AggregationQuery $query
*/
public function setQuery(AggregationQuery $query)
{
$this->query = $query;
}
/**
* @return AggregationQuery
*/
public function getQuery()
{
return $this->query;
}
/**
* The identifier of the transaction that was started as part of this
* RunAggregationQuery request. Set only when ReadOptions.new_transaction was
* set in RunAggregationQueryRequest.read_options.
*
* @param string $transaction
*/
public function setTransaction($transaction)
{
$this->transaction = $transaction;
}
/**
* @return string
*/
public function getTransaction()
{
return $this->transaction;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RunAggregationQueryResponse::class, 'Google_Service_Datastore_RunAggregationQueryResponse');
@@ -0,0 +1,162 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class RunQueryRequest extends \Google\Model
{
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @var string
*/
public $databaseId;
protected $explainOptionsType = ExplainOptions::class;
protected $explainOptionsDataType = '';
protected $gqlQueryType = GqlQuery::class;
protected $gqlQueryDataType = '';
protected $partitionIdType = PartitionId::class;
protected $partitionIdDataType = '';
protected $propertyMaskType = PropertyMask::class;
protected $propertyMaskDataType = '';
protected $queryType = Query::class;
protected $queryDataType = '';
protected $readOptionsType = ReadOptions::class;
protected $readOptionsDataType = '';
/**
* The ID of the database against which to make the request. '(default)' is
* not allowed; please use empty string '' to refer the default database.
*
* @param string $databaseId
*/
public function setDatabaseId($databaseId)
{
$this->databaseId = $databaseId;
}
/**
* @return string
*/
public function getDatabaseId()
{
return $this->databaseId;
}
/**
* Optional. Explain options for the query. If set, additional query
* statistics will be returned. If not, only query results will be returned.
*
* @param ExplainOptions $explainOptions
*/
public function setExplainOptions(ExplainOptions $explainOptions)
{
$this->explainOptions = $explainOptions;
}
/**
* @return ExplainOptions
*/
public function getExplainOptions()
{
return $this->explainOptions;
}
/**
* The GQL query to run. This query must be a non-aggregation query.
*
* @param GqlQuery $gqlQuery
*/
public function setGqlQuery(GqlQuery $gqlQuery)
{
$this->gqlQuery = $gqlQuery;
}
/**
* @return GqlQuery
*/
public function getGqlQuery()
{
return $this->gqlQuery;
}
/**
* 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.
*
* @param PartitionId $partitionId
*/
public function setPartitionId(PartitionId $partitionId)
{
$this->partitionId = $partitionId;
}
/**
* @return PartitionId
*/
public function getPartitionId()
{
return $this->partitionId;
}
/**
* The properties to return. This field must not be set for a projection
* query. See LookupRequest.property_mask.
*
* @param PropertyMask $propertyMask
*/
public function setPropertyMask(PropertyMask $propertyMask)
{
$this->propertyMask = $propertyMask;
}
/**
* @return PropertyMask
*/
public function getPropertyMask()
{
return $this->propertyMask;
}
/**
* The query to run.
*
* @param Query $query
*/
public function setQuery(Query $query)
{
$this->query = $query;
}
/**
* @return Query
*/
public function getQuery()
{
return $this->query;
}
/**
* The options for this query.
*
* @param ReadOptions $readOptions
*/
public function setReadOptions(ReadOptions $readOptions)
{
$this->readOptions = $readOptions;
}
/**
* @return ReadOptions
*/
public function getReadOptions()
{
return $this->readOptions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RunQueryRequest::class, 'Google_Service_Datastore_RunQueryRequest');
@@ -0,0 +1,110 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class RunQueryResponse extends \Google\Model
{
protected $batchType = QueryResultBatch::class;
protected $batchDataType = '';
protected $explainMetricsType = ExplainMetrics::class;
protected $explainMetricsDataType = '';
protected $queryType = Query::class;
protected $queryDataType = '';
/**
* The identifier of the transaction that was started as part of this RunQuery
* request. Set only when ReadOptions.new_transaction was set in
* RunQueryRequest.read_options.
*
* @var string
*/
public $transaction;
/**
* A batch of query results. This is always present unless running a query
* under explain-only mode: RunQueryRequest.explain_options was provided and
* ExplainOptions.analyze was set to false.
*
* @param QueryResultBatch $batch
*/
public function setBatch(QueryResultBatch $batch)
{
$this->batch = $batch;
}
/**
* @return QueryResultBatch
*/
public function getBatch()
{
return $this->batch;
}
/**
* Query explain metrics. This is only present when the
* RunQueryRequest.explain_options is provided, and it is sent only once with
* the last response in the stream.
*
* @param ExplainMetrics $explainMetrics
*/
public function setExplainMetrics(ExplainMetrics $explainMetrics)
{
$this->explainMetrics = $explainMetrics;
}
/**
* @return ExplainMetrics
*/
public function getExplainMetrics()
{
return $this->explainMetrics;
}
/**
* The parsed form of the `GqlQuery` from the request, if it was set.
*
* @param Query $query
*/
public function setQuery(Query $query)
{
$this->query = $query;
}
/**
* @return Query
*/
public function getQuery()
{
return $this->query;
}
/**
* The identifier of the transaction that was started as part of this RunQuery
* request. Set only when ReadOptions.new_transaction was set in
* RunQueryRequest.read_options.
*
* @param string $transaction
*/
public function setTransaction($transaction)
{
$this->transaction = $transaction;
}
/**
* @return string
*/
public function getTransaction()
{
return $this->transaction;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RunQueryResponse::class, 'Google_Service_Datastore_RunQueryResponse');
@@ -0,0 +1,99 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class Status extends \Google\Collection
{
protected $collection_key = 'details';
/**
* The status code, which should be an enum value of google.rpc.Code.
*
* @var int
*/
public $code;
/**
* A list of messages that carry the error details. There is a common set of
* message types for APIs to use.
*
* @var array[]
*/
public $details;
/**
* A developer-facing error message, which should be in English. Any user-
* facing error message should be localized and sent in the
* google.rpc.Status.details field, or localized by the client.
*
* @var string
*/
public $message;
/**
* The status code, which should be an enum value of google.rpc.Code.
*
* @param int $code
*/
public function setCode($code)
{
$this->code = $code;
}
/**
* @return int
*/
public function getCode()
{
return $this->code;
}
/**
* A list of messages that carry the error details. There is a common set of
* message types for APIs to use.
*
* @param array[] $details
*/
public function setDetails($details)
{
$this->details = $details;
}
/**
* @return array[]
*/
public function getDetails()
{
return $this->details;
}
/**
* A developer-facing error message, which should be in English. Any user-
* facing error message should be localized and sent in the
* google.rpc.Status.details field, or localized by the client.
*
* @param string $message
*/
public function setMessage($message)
{
$this->message = $message;
}
/**
* @return string
*/
public function getMessage()
{
return $this->message;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Status::class, 'Google_Service_Datastore_Status');
+44
View File
@@ -0,0 +1,44 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class Sum extends \Google\Model
{
protected $propertyType = PropertyReference::class;
protected $propertyDataType = '';
/**
* The property to aggregate on.
*
* @param PropertyReference $property
*/
public function setProperty(PropertyReference $property)
{
$this->property = $property;
}
/**
* @return PropertyReference
*/
public function getProperty()
{
return $this->property;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Sum::class, 'Google_Service_Datastore_Sum');
@@ -0,0 +1,62 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class TransactionOptions extends \Google\Model
{
protected $readOnlyType = DatastoreReadOnly::class;
protected $readOnlyDataType = '';
protected $readWriteType = ReadWrite::class;
protected $readWriteDataType = '';
/**
* The transaction should only allow reads.
*
* @param DatastoreReadOnly $readOnly
*/
public function setReadOnly(DatastoreReadOnly $readOnly)
{
$this->readOnly = $readOnly;
}
/**
* @return DatastoreReadOnly
*/
public function getReadOnly()
{
return $this->readOnly;
}
/**
* The transaction should allow both reads and writes.
*
* @param ReadWrite $readWrite
*/
public function setReadWrite(ReadWrite $readWrite)
{
$this->readWrite = $readWrite;
}
/**
* @return ReadWrite
*/
public function getReadWrite()
{
return $this->readWrite;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TransactionOptions::class, 'Google_Service_Datastore_TransactionOptions');
+309
View File
@@ -0,0 +1,309 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Datastore;
class Value extends \Google\Model
{
/**
* Null value.
*/
public const NULL_VALUE_NULL_VALUE = 'NULL_VALUE';
protected $arrayValueType = ArrayValue::class;
protected $arrayValueDataType = '';
/**
* 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.
*
* @var string
*/
public $blobValue;
/**
* A boolean value.
*
* @var bool
*/
public $booleanValue;
/**
* A double value.
*
* @var
*/
public $doubleValue;
protected $entityValueType = Entity::class;
protected $entityValueDataType = '';
/**
* If the value should be excluded from all indexes including those defined
* explicitly.
*
* @var bool
*/
public $excludeFromIndexes;
protected $geoPointValueType = LatLng::class;
protected $geoPointValueDataType = '';
/**
* An integer value.
*
* @var string
*/
public $integerValue;
protected $keyValueType = Key::class;
protected $keyValueDataType = '';
/**
* The `meaning` field should only be populated for backwards compatibility.
*
* @var int
*/
public $meaning;
/**
* A null value.
*
* @var string
*/
public $nullValue;
/**
* 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 most
* 1,000,000 bytes.
*
* @var string
*/
public $stringValue;
/**
* A timestamp value. When stored in the Datastore, precise only to
* microseconds; any additional precision is rounded down.
*
* @var string
*/
public $timestampValue;
/**
* 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`.
*
* @param ArrayValue $arrayValue
*/
public function setArrayValue(ArrayValue $arrayValue)
{
$this->arrayValue = $arrayValue;
}
/**
* @return ArrayValue
*/
public function getArrayValue()
{
return $this->arrayValue;
}
/**
* 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.
*
* @param string $blobValue
*/
public function setBlobValue($blobValue)
{
$this->blobValue = $blobValue;
}
/**
* @return string
*/
public function getBlobValue()
{
return $this->blobValue;
}
/**
* A boolean value.
*
* @param bool $booleanValue
*/
public function setBooleanValue($booleanValue)
{
$this->booleanValue = $booleanValue;
}
/**
* @return bool
*/
public function getBooleanValue()
{
return $this->booleanValue;
}
public function setDoubleValue($doubleValue)
{
$this->doubleValue = $doubleValue;
}
public function getDoubleValue()
{
return $this->doubleValue;
}
/**
* An entity value. - May have no key. - May have a key with an incomplete key
* path. - May have a reserved/read-only key.
*
* @param Entity $entityValue
*/
public function setEntityValue(Entity $entityValue)
{
$this->entityValue = $entityValue;
}
/**
* @return Entity
*/
public function getEntityValue()
{
return $this->entityValue;
}
/**
* If the value should be excluded from all indexes including those defined
* explicitly.
*
* @param bool $excludeFromIndexes
*/
public function setExcludeFromIndexes($excludeFromIndexes)
{
$this->excludeFromIndexes = $excludeFromIndexes;
}
/**
* @return bool
*/
public function getExcludeFromIndexes()
{
return $this->excludeFromIndexes;
}
/**
* A geo point value representing a point on the surface of Earth.
*
* @param LatLng $geoPointValue
*/
public function setGeoPointValue(LatLng $geoPointValue)
{
$this->geoPointValue = $geoPointValue;
}
/**
* @return LatLng
*/
public function getGeoPointValue()
{
return $this->geoPointValue;
}
/**
* An integer value.
*
* @param string $integerValue
*/
public function setIntegerValue($integerValue)
{
$this->integerValue = $integerValue;
}
/**
* @return string
*/
public function getIntegerValue()
{
return $this->integerValue;
}
/**
* A key value.
*
* @param Key $keyValue
*/
public function setKeyValue(Key $keyValue)
{
$this->keyValue = $keyValue;
}
/**
* @return Key
*/
public function getKeyValue()
{
return $this->keyValue;
}
/**
* The `meaning` field should only be populated for backwards compatibility.
*
* @param int $meaning
*/
public function setMeaning($meaning)
{
$this->meaning = $meaning;
}
/**
* @return int
*/
public function getMeaning()
{
return $this->meaning;
}
/**
* A null value.
*
* Accepted values: NULL_VALUE
*
* @param self::NULL_VALUE_* $nullValue
*/
public function setNullValue($nullValue)
{
$this->nullValue = $nullValue;
}
/**
* @return self::NULL_VALUE_*
*/
public function getNullValue()
{
return $this->nullValue;
}
/**
* 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 most
* 1,000,000 bytes.
*
* @param string $stringValue
*/
public function setStringValue($stringValue)
{
$this->stringValue = $stringValue;
}
/**
* @return string
*/
public function getStringValue()
{
return $this->stringValue;
}
/**
* A timestamp value. When stored in the Datastore, precise only to
* microseconds; any additional precision is rounded down.
*
* @param string $timestampValue
*/
public function setTimestampValue($timestampValue)
{
$this->timestampValue = $timestampValue;
}
/**
* @return string
*/
public function getTimestampValue()
{
return $this->timestampValue;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Value::class, 'Google_Service_Datastore_Value');